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IhrC,SAASm0G,SAAWC,KAAK17G,SAASuF,KAK1D,IAAIo2G,EAAkB,CACrB,IAAK,GAaNhC,EAAoBO,EAAEK,EAAKqB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4Bp5F,KACvD,IAGIk3F,EAAUgC,GAHTzB,EAAU4B,EAAaC,GAAWt5F,EAGhB0oB,EAAI,EAC3B,GAAG+uE,EAAShuF,MAAMt3B,GAAgC,IAAxB8mH,EAAgB9mH,KAAa,CACtD,IAAI+kH,KAAYmC,EACZpC,EAAoB31D,EAAE+3D,EAAanC,KACrCD,EAAoBK,EAAEJ,GAAYmC,EAAYnC,IAGhD,GAAGoC,EAAS,IAAIj6G,EAASi6G,EAAQrC,EAClC,CAEA,IADGmC,GAA4BA,EAA2Bp5F,GACrD0oB,EAAI+uE,EAASztG,OAAQ0+B,IACzBwwE,EAAUzB,EAAS/uE,GAChBuuE,EAAoB31D,EAAE23D,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOjC,EAAoBO,EAAEn4G,EAAO,EAGjCk6G,EAAqBP,KAAgC,0BAAIA,KAAgC,2BAAK,GAClGO,EAAmB78G,QAAQy8G,EAAqBloF,KAAK,KAAM,IAC3DsoF,EAAmBj6G,KAAO65G,EAAqBloF,KAAK,KAAMsoF,EAAmBj6G,KAAK2xB,KAAKsoF,G,KChDvFtC,EAAoBuC,QAAKj9G,ECGzB06G,EAAoBO,OAAEj7G,EAAW,CAAC,MAAM,IAAO06G,EAAoB,SACnEA,EAAoBO,OAAEj7G,EAAW,CAAC,MAAM,IAAO06G,EAAoB,QACnE,IAAIwC,EAAsBxC,EAAoBO,OAAEj7G,EAAW,CAAC,MAAM,IAAO06G,EAAoB,SAC7FwC,EAAsBxC,EAAoBO,EAAEiC,E","sources":["webpack://core-frontend/webpack/runtime/chunk loaded","webpack://core-frontend/webpack/runtime/create fake namespace object","webpack://core-frontend/./src/config/chains.toml","webpack://core-frontend/./src/config/environments.toml","webpack://core-frontend/./src/shared/utils/styled.ts","webpack://core-frontend/./src/components/Spinner.tsx","webpack://core-frontend/./src/components/Button.tsx","webpack://core-frontend/./src/components/EmptyState.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/CheckmarkIcon.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/MapIcons.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/SocialIcons.tsx","webpack://core-frontend/./src/shared/components/SvgIcon/index.tsx","webpack://core-frontend/./src/utils/exceptions.ts","webpack://core-frontend/./src/modals/BaseModal.tsx","webpack://core-frontend/./src/modals/LightModal.tsx","webpack://core-frontend/./src/utils/Layer.ts","webpack://core-frontend/./src/consts.tsx","webpack://core-frontend/./src/utils/formatConfigUrl.ts","webpack://core-frontend/./src/utils/chainConfigExtension.ts","webpack://core-frontend/./src/utils/chains.ts","webpack://core-frontend/./src/utils/routes.ts","webpack://core-frontend/./src/components/DisclaimerBar.tsx","webpack://core-frontend/./src/components/Footer.tsx","webpack://core-frontend/./src/components/Helmet.tsx","webpack://core-frontend/./src/components/Anchor.tsx","webpack://core-frontend/./src/components/SimpleDropdown.tsx","webpack://core-frontend/./src/getters/getEnvironmentConfig.ts","webpack://core-frontend/./src/shared/components/NetworkIcon/index.tsx","webpack://core-frontend/./src/errors/index.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/MarketplaceV4__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/RemoteMarketplaceV1__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/Marketplace/Uniswap2AdapterV4__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/ProjectRegistry/ProjectRegistryV1__factory.ts","webpack://core-frontend/./src/generated/types/hub/factories/ProjectStaking/ProjectStakingV1__factory.ts","webpack://core-frontend/./src/generated/types/local/factories/Token__factory.ts","webpack://core-frontend/./src/utils/contracts.ts","webpack://core-frontend/./src/getters/getGraphClient.ts","webpack://core-frontend/./src/getters/getClientConfig.ts","webpack://core-frontend/./src/errors/BehindIndexError.ts","webpack://core-frontend/./src/generated/gql/ens.ts","webpack://core-frontend/./src/generated/gql/network.ts","webpack://core-frontend/./src/parsers/Parsable.ts","webpack://core-frontend/./src/parsers/OperatorMetadata.ts","webpack://core-frontend/./src/parsers/Operator.ts","webpack://core-frontend/./src/parsers/Sponsorship.ts","webpack://core-frontend/./src/shared/toasts/AbstractToast.tsx","webpack://core-frontend/./src/shared/toasts/Toast.tsx","webpack://core-frontend/./src/shared/types/index.ts","webpack://core-frontend/./src/types/index.ts","webpack://core-frontend/./src/utils/providers.ts","webpack://core-frontend/./src/utils/toast.tsx","webpack://core-frontend/./src/getters/index.ts","webpack://core-frontend/./src/shared/errors/TimeoutError.ts","webpack://core-frontend/./src/shared/hooks/useIsMounted.ts","webpack://core-frontend/./src/modals/ConnectModal.tsx","webpack://core-frontend/./src/utils/errors.ts","webpack://core-frontend/./src/shared/stores/wallet.ts","webpack://core-frontend/./src/components/Buttons.tsx","webpack://core-frontend/./src/shared/components/PngIcon/index.tsx","webpack://core-frontend/./src/modals/Modal.tsx","webpack://core-frontend/./src/modals/SwitchNetworkModal.tsx","webpack://core-frontend/./src/utils/web3/getChainId.ts","webpack://core-frontend/./src/utils/networkPreflight.ts","webpack://core-frontend/./src/getters/getStreamrClient.ts","webpack://core-frontend/./src/shared/components/Link/index.tsx","webpack://core-frontend/./src/modals/GetCryptoModal.tsx","webpack://core-frontend/./src/shared/utils/text.ts","webpack://core-frontend/./src/parsers/StreamParser.ts","webpack://core-frontend/./src/shared/errors/InsufficientFundsError.ts","webpack://core-frontend/./src/shared/errors/StreamNotFoundError.ts","webpack://core-frontend/./src/shared/utils/nativeToken.ts","webpack://core-frontend/./src/utils/balance.ts","webpack://core-frontend/./src/shared/utils/requirePositiveBalance.ts","webpack://core-frontend/./src/utils/draft.ts","webpack://core-frontend/./src/shared/toasts/TransactionListToast.tsx","webpack://core-frontend/./src/utils/toastedOperation.ts","webpack://core-frontend/./src/stores/streamDraft.tsx","webpack://core-frontend/./src/components/ChainSelector.tsx","webpack://core-frontend/./src/getters/getConfigValueFromChain.ts","webpack://core-frontend/./src/hooks/index.tsx","webpack://core-frontend/./src/modals/ConfirmationModal.tsx","webpack://core-frontend/./src/getters/confirm.ts","webpack://core-frontend/./src/components/Alert.tsx","webpack://core-frontend/./src/components/Slider.tsx","webpack://core-frontend/./src/shared/components/Ui/StateColors.ts","webpack://core-frontend/./src/shared/components/Ui/Label.tsx","webpack://core-frontend/./src/modals/FormModal.tsx","webpack://core-frontend/./src/components/CropImageModal/CropImageModal.tsx","webpack://core-frontend/./src/components/Tooltip.tsx","webpack://core-frontend/./src/components/Hint.tsx","webpack://core-frontend/./src/components/PropertyDropdown.tsx","webpack://core-frontend/./src/shared/errors/RequestError.ts","webpack://core-frontend/./src/shared/utils/request.ts","webpack://core-frontend/./src/services/images.ts","webpack://core-frontend/./src/shared/utils/api.ts","webpack://core-frontend/./src/utils/tx.ts","webpack://core-frontend/./src/services/operators.ts","webpack://core-frontend/./src/shared/components/Logo/index.tsx","webpack://core-frontend/./src/components/FallbackImage.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/Initials.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/Identicon.tsx","webpack://core-frontend/./src/shared/components/AvatarImage/index.tsx","webpack://core-frontend/./src/modals/OperatorModal.tsx","webpack://core-frontend/./src/utils/blocks.ts","webpack://core-frontend/./src/utils/index.tsx","webpack://core-frontend/./src/hooks/operators.tsx","webpack://core-frontend/./src/utils/tokens.ts","webpack://core-frontend/./src/getters/getSponsorshipTokenInfo.ts","webpack://core-frontend/./src/hooks/useSponsorshipFundingHistoryQuery.ts","webpack://core-frontend/./src/getters/getSponsoringEvents.ts","webpack://core-frontend/./src/components/SponsorshipPaymentTokenName.tsx","webpack://core-frontend/./src/components/Decimals.tsx","webpack://core-frontend/./src/shared/components/Checkbox/index.tsx","webpack://core-frontend/./src/components/SponsorshipDisclaimer.tsx","webpack://core-frontend/./src/services/streams.ts","webpack://core-frontend/./src/components/DropdownMenuItem.tsx","webpack://core-frontend/./src/components/StreamIdDropdown.tsx","webpack://core-frontend/./src/utils/sponsorships.tsx","webpack://core-frontend/./src/forms/createSponsorshipForm.ts","webpack://core-frontend/./src/shared/stores/uncollectedEarnings.ts","webpack://core-frontend/./src/services/sponsorships.ts","webpack://core-frontend/./src/modals/CreateSponsorshipModal.tsx","webpack://core-frontend/./src/modals/EditStakeModal.tsx","webpack://core-frontend/./src/utils/pluralizeUnit.ts","webpack://core-frontend/./src/modals/FundSponsorshipModal.tsx","webpack://core-frontend/./src/hooks/useInterceptHeartbeats.ts","webpack://core-frontend/./src/hooks/useOperatorLiveNodes.ts","webpack://core-frontend/./src/marketplace/components/SelectField2/selectField2.styles.tsx","webpack://core-frontend/./src/marketplace/components/SelectField2/index.tsx","webpack://core-frontend/./src/shared/hooks/useCopy.ts","webpack://core-frontend/./src/shared/utils/nodeVersion.ts","webpack://core-frontend/./src/shared/utils/time.ts","webpack://core-frontend/./src/modals/JoinSponsorshipModal.tsx","webpack://core-frontend/./src/shared/stores/flags.ts","webpack://core-frontend/./src/hooks/sponsorships.ts","webpack://core-frontend/./src/getters/getSponsorshipStats.ts","webpack://core-frontend/./src/modals/DelegateFundsModal.tsx","webpack://core-frontend/./src/components/StreamDescription.tsx","webpack://core-frontend/./src/components/avatars.tsx","webpack://core-frontend/./src/components/Table.tsx","webpack://core-frontend/./src/shared/components/Radio/index.tsx","webpack://core-frontend/./src/components/LoadMore.tsx","webpack://core-frontend/./src/components/Meatball.tsx","webpack://core-frontend/./src/shared/utils/compose.ts","webpack://core-frontend/./src/shared/components/Ui/Text/FlushHistoryDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/OnCommitDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/RevertOnEscapeDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/SelectAllOnFocusDecorator.tsx","webpack://core-frontend/./src/shared/components/Ui/Text/StyledInput.ts","webpack://core-frontend/./src/shared/components/Ui/Text/index.tsx","webpack://core-frontend/./src/generated/gql/du.ts","webpack://core-frontend/./src/getters/du.ts","webpack://core-frontend/./src/shared/utils/Transaction/index.ts","webpack://core-frontend/./src/marketplace/modules/dataUnion/services.ts","webpack://core-frontend/./src/shared/utils/timeUnit.ts","webpack://core-frontend/./src/types/projects.ts","webpack://core-frontend/./src/marketplace/utils/time.ts","webpack://core-frontend/./src/utils/price.ts","webpack://core-frontend/./src/services/projects.ts","webpack://core-frontend/./src/shared/utils/constants.ts","webpack://core-frontend/./src/marketplace/utils/price.ts","webpack://core-frontend/./src/parsers/ProjectParser.ts","webpack://core-frontend/./src/getters/hub.ts","webpack://core-frontend/./src/shared/utils/tokenAssets.ts","webpack://core-frontend/./src/shared/components/GenericTokenLogo.tsx","webpack://core-frontend/./src/shared/components/TokenLogo.tsx","webpack://core-frontend/./src/modals/ProjectModal.tsx","webpack://core-frontend/./src/modals/AccessPeriodModal.tsx","webpack://core-frontend/./src/shared/components/LoadingIndicator.tsx","webpack://core-frontend/./src/modals/AccessingProjectModal.tsx","webpack://core-frontend/./src/modals/AllowanceModal.tsx","webpack://core-frontend/./src/shared/utils/coingecko.ts","webpack://core-frontend/./src/modals/ChainSelectorModal.tsx","webpack://core-frontend/./src/modals/ConfirmPurchaseModal.tsx","webpack://core-frontend/./src/modals/FailedPurchaseModal.tsx","webpack://core-frontend/./src/modals/PurchaseCompleteModal.tsx","webpack://core-frontend/./src/shared/stores/purchases.ts","webpack://core-frontend/./src/stores/projectDraft.tsx","webpack://core-frontend/./src/components/SalePointSelector/BeneficiaryAddressEditor.tsx","webpack://core-frontend/./src/shared/components/NoData.tsx","webpack://core-frontend/./src/shared/components/ScrollTable/ScrollTable.styles.tsx","webpack://core-frontend/./src/shared/components/ScrollTable/ScrollTable.tsx","webpack://core-frontend/./src/modals/ForceUndelegateModal.tsx","webpack://core-frontend/./src/modals/UndelegateFundsModal.tsx","webpack://core-frontend/./src/components/Nav/User.tsx","webpack://core-frontend/./src/components/Nav/Nav.styles.tsx","webpack://core-frontend/./src/components/Nav/NetworkDropdown.tsx","webpack://core-frontend/./src/components/Nav/NetworkAccordion.tsx","webpack://core-frontend/./src/components/Nav/index.tsx","webpack://core-frontend/./src/components/Layout.tsx","webpack://core-frontend/./src/shared/hooks/useScrollToTop.ts","webpack://core-frontend/./src/pages/GenericErrorPage.tsx","webpack://core-frontend/./src/utils/isPreventable.ts","webpack://core-frontend/./src/shared/components/Tabs.tsx","webpack://core-frontend/./src/components/ChartPeriodTabs.tsx","webpack://core-frontend/./src/components/NetworkChartDisplay.tsx","webpack://core-frontend/./src/components/ColoredBox.tsx","webpack://core-frontend/./src/components/NetworkPageSegment.tsx","webpack://core-frontend/./src/components/QueriedSponsorshipsTable.tsx","webpack://core-frontend/./src/components/Separator.ts","webpack://core-frontend/./src/components/StatGrid.tsx","webpack://core-frontend/./src/components/NoWalletOverlay.tsx","webpack://core-frontend/./src/components/WalletPass.tsx","webpack://core-frontend/./src/generated/gql/indexer.ts","webpack://core-frontend/./src/shared/components/TimeSeriesGraph/index.tsx","webpack://core-frontend/./src/shared/components/TimeSeriesGraph/chartUtils.ts","webpack://core-frontend/./src/pages/NetworkOverviewPage.tsx","webpack://core-frontend/./src/getters/getDelegationStats.ts","webpack://core-frontend/./src/pages/NotFoundPage.tsx","webpack://core-frontend/./src/modals/AddAddressModal.tsx","webpack://core-frontend/./src/components/AddressTable.tsx","webpack://core-frontend/./src/components/BehindBlockErrorDisplay.tsx","webpack://core-frontend/./src/shared/stores/operatorReachability.ts","webpack://core-frontend/./src/pages/OperatorPage/LiveNodesTable.tsx","webpack://core-frontend/./src/components/ActionBars/NetworkActionBar.styles.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorActionBar.tsx","webpack://core-frontend/./src/stores/blockNumberDependencies.ts","webpack://core-frontend/./src/pages/OperatorPage/OperatorChecklist.tsx","webpack://core-frontend/./src/components/IconButton.tsx","webpack://core-frontend/./src/icons.tsx","webpack://core-frontend/./src/components/CopyButton.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorDetails.tsx","webpack://core-frontend/./src/pages/OperatorPage/OperatorSummary.tsx","webpack://core-frontend/./src/pages/OperatorPage/SponsorshipTable.tsx","webpack://core-frontend/./src/pages/OperatorPage/UndelegationQueue.tsx","webpack://core-frontend/./src/pages/OperatorPage/index.tsx","webpack://core-frontend/./src/getters/getOperatorStats.ts","webpack://core-frontend/./src/shared/components/SearchBar/index.tsx","webpack://core-frontend/./src/components/ActionBars/NetworkActionBar.tsx","webpack://core-frontend/./src/hooks/useTableOrder.ts","webpack://core-frontend/./src/hooks/useUrlParams.ts","webpack://core-frontend/./src/pages/OperatorsPage.tsx","webpack://core-frontend/./src/components/ActionBar.styles.tsx","webpack://core-frontend/./src/components/SalePointSelector/SalePointTokenSelector.tsx","webpack://core-frontend/./src/components/SalePointSelector/SalePointOption.tsx","webpack://core-frontend/./src/modals/ProjectTypeFilter.tsx","webpack://core-frontend/./src/components/ActionBar.tsx","webpack://core-frontend/./src/shared/components/Rect.tsx","webpack://core-frontend/./src/shared/components/Skeleton.tsx","webpack://core-frontend/./src/getters/getStreamStats.ts","webpack://core-frontend/./src/getters/getNeighbors.ts","webpack://core-frontend/./src/shared/components/Tile/Badge.tsx","webpack://core-frontend/./src/hooks/useStreamStats.tsx","webpack://core-frontend/./src/shared/components/Tile/Summary.tsx","webpack://core-frontend/./src/shared/components/Tile/index.tsx","webpack://core-frontend/./src/components/DottedLoadingIndicator.tsx","webpack://core-frontend/./src/marketplace/components/Projects/NoProductsView.tsx","webpack://core-frontend/./src/marketplace/components/Projects/index.tsx","webpack://core-frontend/./src/shared/contexts/ModalApi/index.tsx","webpack://core-frontend/./src/shared/hooks/useModal.ts","webpack://core-frontend/./src/marketplace/components/ProjectTypeChooser/index.tsx","webpack://core-frontend/./src/shared/contexts/ModalPortal/index.tsx","webpack://core-frontend/./src/shared/errors/NoModalRootError/index.ts","webpack://core-frontend/./src/shared/components/ModalPortal/index.ts","webpack://core-frontend/./src/shared/components/ModalDialog/accessibility.ts","webpack://core-frontend/./src/shared/components/ModalDialog/index.tsx","webpack://core-frontend/./src/marketplace/containers/CreateProjectModal/index.tsx","webpack://core-frontend/./src/pages/ProjectListingPage.tsx","webpack://core-frontend/./src/hooks/streams.tsx","webpack://core-frontend/./src/components/QueriedStreamsTable.tsx","webpack://core-frontend/./src/components/TermsOfUse.tsx","webpack://core-frontend/./src/marketplace/containers/ProjectPage/Hero/ProjectHero2.styles.ts","webpack://core-frontend/./src/marketplace/containers/ProjectPage/Hero/ProjectHero2.tsx","webpack://core-frontend/./src/shared/components/DetailsPageHeader/index.tsx","webpack://core-frontend/./src/shared/components/Segment.ts","webpack://core-frontend/./src/shared/stores/streamAbilities.ts","webpack://core-frontend/./src/shared/components/StreamConnect/index.tsx","webpack://core-frontend/./src/shared/components/Ui/Errors.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Cell.ts","webpack://core-frontend/./src/shared/components/StreamPreview/Layout.ts","webpack://core-frontend/./src/shared/components/StreamPreview/ModalStreamSelector.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/IconButton.ts","webpack://core-frontend/./src/shared/components/StreamPreview/Selector.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Toolbar.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Feed.tsx","webpack://core-frontend/./src/shared/components/StreamPreview/Foot.ts","webpack://core-frontend/./src/shared/components/StreamPreview/index.tsx","webpack://core-frontend/./src/shared/hooks/useStreamData.ts","webpack://core-frontend/./src/shared/stores/projectAbilities.ts","webpack://core-frontend/./src/components/FormattedPaymentRate.tsx","webpack://core-frontend/./src/pages/ProjectPage/AccessManifest.tsx","webpack://core-frontend/./src/pages/ProjectPage/GetAccess.tsx","webpack://core-frontend/./src/pages/ProjectPage/ProjectLinkTabs.tsx","webpack://core-frontend/./src/pages/ProjectPage/TermsOfUse.tsx","webpack://core-frontend/./src/pages/ProjectPage/DataUnionFee.tsx","webpack://core-frontend/./src/pages/ProjectPage/DataUnionPayment.tsx","webpack://core-frontend/./src/components/RichTextEditor.tsx","webpack://core-frontend/./src/components/ImageFilePicker.tsx","webpack://core-frontend/./src/pages/ProjectPage/CoverImage.tsx","webpack://core-frontend/./src/pages/ProjectPage/EditorHero.tsx","webpack://core-frontend/./src/components/FloatingToolbar.tsx","webpack://core-frontend/./src/hooks/useInViewport.ts","webpack://core-frontend/./src/pages/ProjectPage/EditorNav.tsx","webpack://core-frontend/./src/marketplace/components/LoadMore/index.tsx","webpack://core-frontend/./src/shared/components/StreamSelectTable/index.tsx","webpack://core-frontend/./src/pages/ProjectPage/EditorStreams.tsx","webpack://core-frontend/./src/pages/ProjectPage/ProjectEditorPage.tsx","webpack://core-frontend/./src/pages/ProjectPage/index.tsx","webpack://core-frontend/./src/hooks/projects.tsx","webpack://core-frontend/./src/components/ActionBars/AboutEntity.tsx","webpack://core-frontend/./src/components/ActionBars/AboutSponsorship.tsx","webpack://core-frontend/./src/components/ActionBars/ActionBarButton.tsx","webpack://core-frontend/./src/components/ActionBars/AbstractActionBar.tsx","webpack://core-frontend/./src/components/ActionBars/SponsorshipActionBar.tsx","webpack://core-frontend/./src/pages/SponsorshipPage/SponsorshipSummary.tsx","webpack://core-frontend/./src/pages/SingleSponsorshipPage.tsx","webpack://core-frontend/./src/shared/components/Toggle/index.tsx","webpack://core-frontend/./src/components/SponsorshipFilterButton.tsx","webpack://core-frontend/./src/pages/SponsorshipsPage.tsx","webpack://core-frontend/./src/components/Stats.tsx","webpack://core-frontend/./src/components/StreamSummary.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/Section.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/Checkbox.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionEditor.tsx","webpack://core-frontend/./src/modals/NewStreamPermissionsModal.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionItem.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/PermissionList.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/StreamTypeSelector.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/AccessControlSection/index.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/CreateProjectHint.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/DeleteSection.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/StorageNodeItem.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/StorageNodeList.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/HistorySection/index.tsx","webpack://core-frontend/./src/shared/components/Surround.tsx","webpack://core-frontend/./src/shared/components/Ui/Select.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/useStreamOwnerOptionGroups.ts","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/StreamId.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/InfoSection/index.tsx","webpack://core-frontend/./src/shared/components/StatusLabel/index.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/PartitionsSection.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/RelatedProjects.tsx","webpack://core-frontend/./src/pages/AbstractStreamEditPage/SponsorshipsTable.tsx","webpack://core-frontend/./src/pages/StreamPage/index.tsx","webpack://core-frontend/./src/pages/StreamsPage.tsx","webpack://core-frontend/./src/shared/components/Globals.tsx","webpack://core-frontend/./src/utils/sentry.ts","webpack://core-frontend/./src/shared/components/StreamrClientProvider.tsx","webpack://core-frontend/./src/utils/setupSnippets.ts","webpack://core-frontend/./src/app.tsx","webpack://core-frontend/./index.tsx","webpack://core-frontend/./setup.ts","webpack://core-frontend/./src/analytics.ts","webpack://core-frontend/./src/shared/utils/diagnostics.ts","webpack://core-frontend/./src/utils/bn.ts","webpack://core-frontend/webpack/bootstrap","webpack://core-frontend/webpack/runtime/amd options","webpack://core-frontend/webpack/runtime/compat get default export","webpack://core-frontend/webpack/runtime/define property getters","webpack://core-frontend/webpack/runtime/global","webpack://core-frontend/webpack/runtime/hasOwnProperty shorthand","webpack://core-frontend/webpack/runtime/make namespace object","webpack://core-frontend/webpack/runtime/node module decorator","webpack://core-frontend/webpack/runtime/publicPath","webpack://core-frontend/webpack/runtime/jsonp chunk loading","webpack://core-frontend/webpack/runtime/nonce","webpack://core-frontend/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","module.exports    = {\n\t\"ethereum\": {\n\t\t\"displayName\": \"Ethereum Mainnet\"\n\t},\n\t\"binance\": {\n\t\t\"coingeckoNetworkId\": \"binance-smart-chain\",\n\t\t\"displayName\": \"BNB Smart Chain\"\n\t},\n\t\"gnosis\": {\n\t\t\"coingeckoNetworkId\": \"xdai\",\n\t\t\"displayName\": \"Gnosis\"\n\t},\n\t\"dev0\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"displayName\": \"Dev0\"\n\t},\n\t\"dev1\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"displayName\": \"Dev1\"\n\t},\n\t\"dev2\": {\n\t\t\"coingeckoNetworkId\": \"ethereum\",\n\t\t\"dataUnionJoinServerUrl\": \":5555\",\n\t\t\"displayName\": \"Dev2\",\n\t\t\"dockerHost\": \"localhost\",\n\t\t\"marketplaceChains\": [\n\t\t\t\"dev2\"\n\t\t],\n\t\t\"networkSubgraphUrl\": \":8800/subgraphs/name/streamr-dev/network-subgraphs\",\n\t\t\"streamIndexerUrl\": \":4001/api\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Local (broker-node-storage-1)\",\n\t\t\t\t\"address\": \"0xde1112f631486CfC759A50196853011528bC5FA0\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 31337,\n\t\t\t\t\"name\": \"streamr-dev/dataunion\"\n\t\t\t}\n\t\t]\n\t},\n\t\"polygonAmoy\": {\n\t\t\"dataUnionJoinServerUrl\": \"https://join.dataunions.org/\",\n\t\t\"displayName\": \"Amoy\",\n\t\t\"marketplaceChains\": [\n\t\t\t\"polygonAmoy\"\n\t\t],\n\t\t\"slug\": \"amoy\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Streamr Germany\",\n\t\t\t\t\"address\": \"0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 80002,\n\t\t\t\t\"name\": \"samt1803/dataunion-subgraphs\"\n\t\t\t}\n\t\t]\n\t},\n\t\"polygon\": {\n\t\t\"marketplaceChains\": [\n\t\t\t\"gnosis\",\n\t\t\t\"polygon\"\n\t\t],\n\t\t\"networkSubgraphUrl\": \"https://gateway-arbitrum.network.thegraph.com/api/8bcbd55cdd1369cadb0bb813d9817776/subgraphs/id/EGWFdhhiWypDuz22Uy7b3F69E9MEkyfU9iAQMttkH5Rj\",\n\t\t\"streamIndexerUrl\": \"https://stream-metrics.streamr.network/api\",\n\t\t\"storageNodes\": [\n\t\t\t{\n\t\t\t\t\"name\": \"Streamr Germany\",\n\t\t\t\t\"address\": \"0x31546eEA76F2B2b3C5cC06B1c93601dc35c9D916\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"name\": \"LogStore Decentralized Storage\",\n\t\t\t\t\"address\": \"0x17f98084757a75add72bf6c5b5a6f69008c28a57\",\n\t\t\t\t\"thirdPartyUrl\": \"https://docs.usher.so/logstore/network/specifics/overview#streamr-storage-provider\"\n\t\t\t}\n\t\t],\n\t\t\"dataunionGraphNames\": [\n\t\t\t{\n\t\t\t\t\"chainId\": 100,\n\t\t\t\t\"name\": \"dataunions/data-unions-gnosis\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"chainId\": 137,\n\t\t\t\t\"name\": \"dataunions/data-unions-polygon\"\n\t\t\t}\n\t\t]\n\t}\n}","module.exports    = {\n\t\"development\": {\n\t\t\"availableChains\": [\n\t\t\t\"dev2\",\n\t\t\t\"polygon\",\n\t\t\t\"polygonAmoy\"\n\t\t],\n\t\t\"platformOriginUrl\": \"\",\n\t\t\"streamrUrl\": \"\"\n\t},\n\t\"polygonAmoy\": {\n\t\t\"availableChains\": [\n\t\t\t\"polygonAmoy\",\n\t\t\t\"polygon\"\n\t\t],\n\t\t\"platformOriginUrl\": \"https://staging.streamr.network\",\n\t\t\"streamrUrl\": \"https://staging.streamr.network\"\n\t},\n\t\"production\": {\n\t\t\"availableChains\": [\n\t\t\t\"polygon\",\n\t\t\t\"polygonAmoy\"\n\t\t]\n\t}\n}","const SM = 375;\nexport const MD = 744;\nconst MDLG = 1100;\nexport const LG = 1440;\nexport const XL = 1920;\nexport const LIGHT = 300;\nexport const REGULAR = 400;\nexport const MEDIUM = 500;\nexport const SANS = \"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif\";\nexport const PHONE = `(min-width: ${SM}px)`;\nexport const TABLET = `(min-width: ${MD}px)`;\nexport const LAPTOP = `(min-width: ${MDLG}px)`;\nexport const DESKTOP = `(min-width: ${LG}px)`;\nexport const MAX_CONTENT_WIDTH = '678px';\nexport const MAX_BODY_WIDTH = 1296;\nexport const COLORS = {\n    primary: '#323232',\n    primaryLight: '#525252',\n    primaryContrast: '#FFF',\n    primaryDisabled: '#A3A3A3',\n    secondary: '#F5F5F5',\n    secondaryHover: '#E7E7E7',\n    secondaryLight: '#F8F8F8',\n    focus: '#9BC1FB',\n    click: '#DEEBFF',\n    selection: '#CCE9FD',\n    disabled: '#ADADAD',\n    section: '#F1F1F1',\n    inputBackground: '#F1F1F1',\n    radioBorder: '#CDCDCD',\n    close: '#848484',\n    link: '#0324FF',\n    linkInactive: '#CDD3FF',\n    error: '#D90C25',\n    warning: '#FFF6F1',\n    dialogBorder: '#F3F3F3',\n    black: '#000',\n    active: '#0EAC1B',\n    greenSpinner: '#29C236',\n    spinnerBorder: '#ADADAD7F',\n    activeBackground: '#0eac1b1a',\n    alertInfoBackground: '#DEEBFF',\n    alertErrorBackground: '#FFF4EE',\n    alertSuccessBackground: '#E7F7E8',\n    // New naming\n    SecondaryText: '#868686',\n    Border: '#efefef',\n    Background: '#ffffff',\n    Text: '#323232',\n};\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nconst rotate = keyframes `\n    100% {\n        transform: rotate(360deg);\n    }\n`;\nfunction UnstyledSpinner({ coverage = 0.6, fixed = false, color = 'green', size: sizeProp = 16, strokeWidth = 2, innerRef, ...props }) {\n    const size = sizeProp === 'medium' ? 22 : sizeProp === 'large' ? 40 : sizeProp;\n    const r = (size - strokeWidth) / 2;\n    const d = 2 * Math.PI * r;\n    const [ringColor = COLORS.spinnerBorder, strokeColor] = (() => {\n        switch (color) {\n            case 'green':\n                return [, COLORS.greenSpinner];\n            case 'blue':\n                return [, COLORS.link];\n            case 'white':\n                return [, COLORS.primaryContrast];\n            case 'gray':\n                return [COLORS.primaryContrast, COLORS.spinnerBorder];\n        }\n        const { ring, stroke } = color;\n        return [ring, stroke];\n    })();\n    return (React.createElement(SpinnerRoot, { ...props, \"$animate\": !fixed, ref: innerRef, style: {\n            width: `${size}px`,\n            height: `${size}px`,\n        } },\n        React.createElement(\"svg\", { viewBox: `0 0 ${size} ${size}` },\n            React.createElement(\"circle\", { cx: size / 2, cy: size / 2, r: r, fill: \"none\", strokeWidth: strokeWidth, stroke: ringColor, strokeLinecap: \"round\", strokeDasharray: `${d}, 0`, strokeDashoffset: \"0\" }),\n            React.createElement(\"circle\", { cx: size / 2, cy: size / 2, r: r, fill: \"none\", strokeWidth: strokeWidth, stroke: strokeColor, strokeLinecap: \"round\", strokeDasharray: `${coverage * d}, ${(1 - coverage) * d}`, strokeDashoffset: \"0\" }))));\n}\nconst SpinnerRoot = styled.div.withConfig({ displayName: \"SpinnerRoot\", componentId: \"sc-1ev439o\" }) `\n    svg {\n        display: block;\n        transform: rotate(-90deg);\n    }\n\n    ${({ $animate = false }) => $animate &&\n    css `\n            svg {\n                animation: ${rotate} 1.1s linear infinite;\n                transform: rotate(0);\n            }\n        `}\n`;\nconst Spinner = styled(UnstyledSpinner).withConfig({ displayName: \"Spinner\", componentId: \"sc-1szkycn\" }) ``;\nexport default Spinner;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport PrestyledSpinner from '~/components/Spinner';\nfunction kindCss({ kind = 'primary', outline = false }) {\n    switch (kind) {\n        case 'primary':\n            return css `\n                background-color: #0324ff;\n                border-color: #0324ff;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #0d009a;\n                    border-color: #0d009a;\n                }\n\n                :active {\n                    background-color: #09006d;\n                    border-color: #09006d;\n                }\n\n                &[disabled] {\n                    background-color: #0324ff;\n                    border-color: #0324ff;\n                    color: rgba(255, 255, 255, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    &,\n                    &[href] {\n                        color: rgb(3, 36, 255, 1);\n                        border-color: #0324ff;\n                    }\n\n                    :hover,\n                    :focus {\n                        color: #0d009a;\n                        border-color: #0d009a;\n                    }\n\n                    :active {\n                        color: #09006d;\n                        border-color: #09006d;\n                    }\n\n                    &[disabled] {\n                        color: rgb(3, 36, 255, 0.5);\n                        border-color: #0324ff;\n                    }\n                `}\n            `;\n        case 'secondary':\n            return css `\n                background-color: #f5f5f5;\n                border-color: #f5f5f5;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: rgba(82, 82, 82, 1);\n                }\n\n                :hover,\n                :focus {\n                    color: inherit;\n                    background-color: #e7e7e7;\n                    border-color: #e7e7e7;\n                }\n\n                :active {\n                    background-color: #d8d8d8;\n                    border-color: #d8d8d8;\n                }\n\n                &[disabled] {\n                    background-color: #f5f5f5;\n                    border-color: #f5f5f5;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    border-color: #525252;\n\n                    :hover,\n                    :focus {\n                        border-color: #323232;\n                    }\n\n                    :active {\n                        border-color: #525252;\n                    }\n\n                    &[disabled] {\n                        border-color: #efefef;\n                    }\n                `}\n            `;\n        case 'destructive':\n            return css `\n                background-color: #ff0f2d;\n                border-color: #ff0f2d;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #ea112c;\n                    border-color: #ea112c;\n                }\n\n                :active {\n                    background-color: #d50f28;\n                    border-color: #d50f28;\n                }\n\n                &[disabled] {\n                    background-color: #ff0f2d;\n                    border-color: #ff0f2d;\n                    color: rgba(255, 255, 255, 0.5);\n                }\n\n                ${outline &&\n                css `\n                    &,\n                    :link,\n                    :active,\n                    :visited {\n                        color: #ff0f2d;\n                    }\n                `}\n            `;\n        case 'link':\n            return css `\n                background-color: transparent;\n                border-color: transparent;\n                font-weight: var(--regular);\n                padding: 0 0.5rem !important; /* ignore \"size\" classes */\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #525252;\n                }\n\n                :hover,\n                :focus {\n                    color: #323232;\n                    transform: scale(1) translate3d(0, 0, 0);\n                }\n\n                :active {\n                    color: rgba(82, 82, 82, 0.8);\n                    transform: scale(1) translate3d(0, 0, 0);\n                }\n\n                &[disabled] {\n                    border-color: transparent;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n            `;\n        case 'special':\n            return css `\n                background-color: rgba(255, 255, 255, 0.9);\n                border-color: rgba(255, 255, 255, 0.9);\n                border-radius: 20px;\n                font: var(--sans);\n                font-size: 12px !important; /* ignore \"size\" classes */\n                font-weight: var(--medium);\n                height: 40px !important; /* ignore \"size\" classes */\n                letter-spacing: 1px;\n                line-height: 12px !important; /* ignore \"size\" classes */\n                padding: 0 1.5rem !important; /* ignore \"size\" classes */\n                text-transform: uppercase;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: rgba(50, 50, 50, 1);\n                }\n\n                :hover,\n                :focus {\n                    color: inherit;\n                    background-color: rgba(255, 255, 255, 1);\n                    border-color: rgba(255, 255, 255, 1);\n                }\n\n                :active {\n                    background-color: rgba(255, 255, 255, 0.8);\n                    border-color: rgba(255, 255, 255, 0.8);\n                }\n\n                &[disabled] {\n                    background-color: rgba(255, 255, 255, 0.9);\n                    border-color: rgba(255, 255, 255, 0.9);\n                    color: rgba(50, 50, 50, 0.5);\n                }\n            `;\n        case 'primary2':\n            return css `\n                background-color: #323232;\n                border-color: #323232;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #ffffff;\n                }\n\n                :hover,\n                :focus {\n                    background-color: #525252;\n                    border-color: #525252;\n                }\n\n                :active {\n                    background-color: #525252;\n                    border-color: #525252;\n                }\n\n                &[disabled] {\n                    background-color: #323232;\n                    border-color: #323232;\n                    color: #a3a3a3;\n                }\n            `;\n        case 'transparent':\n            return css `\n                background-color: transparent;\n                border-color: transparent;\n\n                &,\n                :link,\n                :active,\n                :visited {\n                    color: #525252;\n                }\n\n                &:hover,\n                &:focus {\n                    background-color: transparent;\n                    border-color: transparent;\n                }\n\n                :active {\n                    background-color: transparent;\n                    border-color: transparent;\n                }\n\n                &[disabled] {\n                    background-color: transparent;\n                    border-color: transparent;\n                    color: rgba(82, 82, 82, 0.5);\n                }\n            `;\n        default:\n            return null;\n    }\n}\nfunction sizeCss({ size = 'normal' }) {\n    switch (size) {\n        case 'mini':\n            return css `\n                height: 32px;\n                padding: 0 0.5rem;\n                font-size: 14px;\n                line-height: 16px;\n            `;\n        case 'normal':\n            return css `\n                height: 40px;\n                padding: 0 1rem;\n                font-size: 14px;\n                line-height: 22px;\n            `;\n        case 'big':\n            return css `\n                height: 48px;\n                padding: 0 2rem;\n                font-size: 16px;\n                line-height: 24px;\n            `;\n        default:\n            return null;\n    }\n}\nfunction outlineCss({ outline }) {\n    if (outline) {\n        return css `\n            background-color: transparent !important;\n        `;\n    }\n}\nfunction getButtonAttrs({ children, waiting = false, outline = false, disabled = false, onClick, kind = 'primary', ...props }) {\n    return {\n        ...props,\n        disabled: disabled || waiting,\n        children: (React.createElement(React.Fragment, null,\n            children,\n            waiting && (React.createElement(Spinner, { color: !outline && (kind === 'primary' || kind === 'destructive')\n                    ? 'white'\n                    : 'gray' })))),\n        tabIndex: disabled ? -1 : 0,\n        onClick: (e) => {\n            if (disabled) {\n                e.preventDefault();\n                return;\n            }\n            if (e.currentTarget instanceof HTMLElement) {\n                // Make sure we make the button lose focus after click\n                e.currentTarget.blur();\n            }\n            onClick?.(e);\n        },\n    };\n}\nexport const Button = styled.button.attrs(getButtonAttrs).withConfig({ displayName: \"Button\", componentId: \"sc-1pom3xf\" }) `\n    -webkit-font-smoothing: subpixel-antialiased;\n    align-items: center;\n    backface-visibility: hidden;\n    background-color: transparent;\n    border: 1px solid;\n    border-radius: 8px;\n    cursor: pointer;\n    display: inline-flex;\n    font: var(--sans);\n    font-weight: var(--medium);\n    justify-content: center;\n    letter-spacing: 0;\n    padding: 0;\n    position: relative;\n    text-align: center;\n    transform: translate3d(0, 0, 0);\n    transition: 200ms ease-in-out;\n    transition-property: border-color, background-color, color, transform;\n    user-select: none;\n    white-space: nowrap;\n\n    &,\n    :active,\n    :visited,\n    :hover,\n    :focus {\n        text-decoration: none;\n        outline: none;\n    }\n\n    :hover,\n    :focus {\n        transition-duration: 5ms;\n        transform: scale(1.05) translate3d(0, 0, 0);\n    }\n\n    :active {\n        transform: scale(0.95) translate3d(0, 0, 0);\n    }\n\n    * {\n        width: 100%;\n    }\n\n    &[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n        transform: scale(1) translate3d(0, 0, 0);\n    }\n\n    ${outlineCss}\n\n    ${kindCss}\n\n    ${sizeCss}\n`;\nconst Spinner = styled(PrestyledSpinner).withConfig({ displayName: \"Spinner\", componentId: \"sc-t1h0tf\" }) `\n    width: 16px;\n    height: 16px;\n    margin-left: 0.5rem;\n`;\n/**\n * @todo Create a better button out of the `Button` and `Buttonesque` components.\n * The latter one was brought to existance because extending `Button`\n * is expensive maintenance-wise.\n */\nexport const Buttonesque = styled.button.withConfig({ displayName: \"Buttonesque\", componentId: \"sc-555l0l\" }) `\n    -webkit-font-smoothing: subpixel-antialiased;\n    align-items: center;\n    backface-visibility: hidden;\n    background-color: var(--backgroundColor, transparent);\n    border: var(--border, 0);\n    border-radius: var(--borderRadius, 8px);\n    color: var(--color, inherit);\n    cursor: pointer;\n    display: inline-flex;\n    font: var(--sans);\n    font-size: var(--fontSize, 12px);\n    font-weight: var(--fontWeight, var(--medium));\n    height: var(--height, 32px);\n    justify-content: center;\n    letter-spacing: 0;\n    padding: 0;\n    position: relative;\n    text-align: center;\n    transform: translate3d(0, 0, 0);\n    transition: 200ms ease-in-out;\n    transition-property: border-color, background-color, color, transform;\n    user-select: none;\n    white-space: nowrap;\n\n    &,\n    &:active,\n    &:visited,\n    &:hover,\n    &:focus {\n        text-decoration: none;\n        outline: none;\n    }\n\n    &:hover,\n    &:focus {\n        transition-duration: 5ms;\n        transform: scale(1.05) translate3d(0, 0, 0);\n    }\n\n    &:active {\n        transform: scale(0.95) translate3d(0, 0, 0);\n    }\n\n    * {\n        width: 100%;\n    }\n\n    &[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n        transform: scale(1) translate3d(0, 0, 0);\n    }\n\n    &:hover,\n    &:focus {\n        background-color: var(\n            --hoverBackgroundColor,\n            var(--backgroundColor, transparent)\n        );\n        border: var(--hoverBorder, var(--border, 0));\n        color: var(--hoverColor, var(--color, inherit));\n    }\n\n    ${(props) => props.$css};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nexport function EmptyState({ children, image, className, link, linkOnMobile }) {\n    return (React.createElement(Root, { className: className },\n        image && React.createElement(ImageWrap, null, image),\n        children,\n        !!link && React.createElement(LinkWrap, { \"$linkOnMobile\": linkOnMobile }, link)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1v8mw0q\" }) `\n    color: var(--greyDark);\n    font-size: 16px;\n    font-weight: var(--regular);\n    padding: 6em 0;\n    text-align: center;\n\n    img {\n        display: block;\n        margin: 0 auto;\n        max-width: 60%;\n    }\n\n    small {\n        display: block;\n        font-size: 12px;\n        margin-top: 0.25em;\n    }\n\n    @media (min-width: 376px) {\n        font-size: 16px;\n\n        small {\n            font-size: 12px;\n        }\n    }\n\n    @media (min-width: 745px) {\n        font-size: 20px;\n        padding: 5em 0;\n\n        a + a {\n            margin-left: 32px;\n        }\n\n        small {\n            font-size: 14px;\n        }\n    }\n\n    @media (min-width: 1441px) {\n        font-size: 24px;\n        padding: 3.75em 0;\n\n        small {\n            font-size: 16px;\n        }\n    }\n`;\nconst ImageWrap = styled.div.withConfig({ displayName: \"ImageWrap\", componentId: \"sc-xodmec\" }) `\n    margin-bottom: 32px;\n`;\nconst LinkWrap = styled.div.withConfig({ displayName: \"LinkWrap\", componentId: \"sc-1f9dhu6\" }) `\n    align-items: center;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    margin-top: 1.25em;\n\n    a + a {\n        margin-left: 0;\n        margin-top: 16px;\n    }\n\n    @media (min-width: 745px) {\n        align-items: unset;\n        flex-direction: row;\n        margin-top: 1.5em;\n\n        a + a {\n            margin: 0 0 0 32px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nexport function CheckmarkIcon() {\n    return (React.createElement(Root, { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 20 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"10\", cy: \"10\", r: \"10\", fill: \"#2AC437\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", d: \"M6.271 10.55l2.2 2.39 5.657-5.658\" }))));\n}\nconst Root = styled.svg.withConfig({ displayName: \"Root\", componentId: \"sc-8nlukj\" }) `\n    display: inline-block;\n    height: 20px;\n    width: 20px;\n`;\n","import React from 'react';\nexport const CircleIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 12\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { transform: \"translate(-6 -6)\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M0 0h24v24H0z\", fill: \"none\" }),\n        React.createElement(\"circle\", { fill: color, cx: \"12\", cy: \"12\", r: \"6\" }))));\nCircleIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const PinIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { transform: \"translate(-6 -6)\", fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M0 0h24v24H0z\" }),\n        React.createElement(\"path\", { d: \"M12 20c.049 0 6-4.686 6-8a6 6 0 1 0-12 0c0 3.314 5.92 8 6 8z\", fill: color }),\n        React.createElement(\"circle\", { fill: \"#FFF\", cx: \"12\", cy: \"12\", r: \"2\" }))));\nPinIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const ArrowIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 11 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-7-7h24v24H-7z\" }),\n        React.createElement(\"path\", { d: \"M6.5 3.361V8.84a1 1 0 0 1-2 0V3.338L1.86 5.873A1 1 0 0 1 .473 4.431L4.784.294a.997.997 0 0 1 .704-.279.997.997 0 0 1 .705.279l4.309 4.137a1 1 0 0 1-1.385 1.442L6.5 3.361z\", fill: color, fillRule: \"nonzero\" }))));\nArrowIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const ArrowHeadIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 8 9\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-8-7h24v24H-8z\" }),\n        React.createElement(\"path\", { d: \"M.13 7.7L3.477.897A.5.5 0 0 1 4.37.892l3.478 6.842a.5.5 0 0 1-.772.605L3.917 5.613.913 8.293A.5.5 0 0 1 .13 7.7z\", fill: color }))));\nArrowHeadIcon.defaultProps = {\n    color: '#FFFFFF',\n};\nexport const LongArrowIcon = ({ color }) => (React.createElement(\"svg\", { viewBox: \"0 0 11 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n    React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M-7-4h24v24H-7z\" }),\n        React.createElement(\"path\", { d: \"M6.333 3.346v11.4a1 1 0 1 1-2 0V3.322l-2.64 2.535A1 1 0 1 1 .307 4.416L4.617.279A.997.997 0 0 1 5.32 0a.997.997 0 0 1 .705.279l4.31 4.137A1 1 0 1 1 8.95 5.858L6.333 3.346z\", fill: color, fillRule: \"nonzero\" }))));\nLongArrowIcon.defaultProps = {\n    color: '#FFFFFF',\n};\n","/* eslint-disable max-len */\nimport React from 'react';\nexport const GitHub = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M11.999 0C5.373 0 0 5.279 0 11.791c0 5.21 3.438 9.629 8.207 11.188.6.109.819-.255.819-.568 0-.28-.01-1.021-.017-2.005-3.337.712-4.042-1.581-4.042-1.581-.546-1.362-1.332-1.725-1.332-1.725-1.09-.731.082-.717.082-.717 1.205.084 1.838 1.216 1.838 1.216 1.07 1.801 2.81 1.281 3.493.98.109-.762.419-1.282.762-1.577-2.665-.297-5.467-1.31-5.467-5.827 0-1.287.468-2.34 1.236-3.164-.124-.298-.536-1.498.118-3.12 0 0 1.007-.318 3.3 1.208A11.685 11.685 0 0 1 12 5.702c1.02.005 2.046.135 3.005.397C17.295 4.573 18.3 4.89 18.3 4.89c.655 1.623.243 2.823.12 3.12.77.824 1.233 1.878 1.233 3.165 0 4.53-2.806 5.526-5.478 5.818.43.364.814 1.084.814 2.184 0 1.576-.015 2.847-.015 3.234 0 .315.217.682.825.567C20.565 21.416 24 17 24 11.791 24 5.28 18.627 0 11.999 0\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Medium = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M0 0h24v24H0V0zm5.727 8.027v7.126a.82.82 0 0 1-.218.707l-1.694 2.054v.271h4.803v-.27L6.924 15.86a.85.85 0 0 1-.233-.707V8.99l4.215 9.195h.49l3.62-9.195v7.33c0 .195 0 .232-.128.36l-1.302 1.264v.271h6.322v-.27l-1.257-1.235a.376.376 0 0 1-.143-.36V7.281a.376.376 0 0 1 .143-.362l1.287-1.234v-.27h-4.456l-3.176 7.923-3.613-7.924H4.019v.271L5.524 7.5a.624.624 0 0 1 .203.527z\", fill: \"currentColor\" })));\nexport const Peepeth = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"g\", { fill: \"currentColor\", fillRule: \"evenodd\" },\n        React.createElement(\"path\", { d: \"M22.665 12.513c-1.269-1.527-3.205-3.036-5.04-2.751-1.836.285-2.804 1.442-3.138 1.795.05-.872.801-3.07 2.97-3.07 3.672 0 5.008 3.07 5.208 4.026zm-21.313 0c.2-.956 1.535-4.026 5.207-4.026 2.17 0 2.92 2.198 2.97 3.07-.333-.353-1.3-1.51-3.137-1.795-1.836-.285-3.772 1.224-5.04 2.75z\", opacity: \".503\" }),\n        React.createElement(\"path\", { d: \"M3.466 13.394c.128.168.33.276.556.276a.704.704 0 1 0 .435-1.257 1.757 1.757 0 0 1 2.386 1.643c0 .973-.785 1.761-1.753 1.761a1.757 1.757 0 0 1-1.752-1.761c0-.234.045-.457.128-.662zm13.836 0c.128.168.33.276.556.276a.704.704 0 1 0 .435-1.257 1.757 1.757 0 0 1 2.386 1.643c0 .973-.785 1.761-1.753 1.761a1.757 1.757 0 0 1-1.752-1.761c0-.234.045-.457.128-.662zM.778 16.824c-1.552-2.987-.567-7.6 1.069-10.133C3.482 4.16 5.769 1.98 12.628 0c-.2.403-.267.42-.6 1.04 3.087 0 6.074 1.09 8.695 3.656 2.62 2.567 4.34 7.9 2.52 12.127 0-1.446-.16-3.928-1.152-5.736-.717-1.308-2.653-2.801-4.79-2.6-2.506.236-2.837 2.7-2.837 3.791 0 1.09.567 2.063 1.302 3.74-.4-.447-1.63-1.867-3.689-4.26a472.851 472.851 0 0 1-3.822 4.294c.501-1.191.768-1.627 1.252-3.17.084-.445.09-.905.025-1.353-.216-1.512-1.227-2.883-2.695-3.025-1.903-.185-4.08 1.003-4.99 2.75-.551 1.058-1.052 2.886-1.069 5.57z\" }),\n        React.createElement(\"path\", { d: \"M8.248 16.794l3.785-1.212v2.834l-3.788-1.618z\" }),\n        React.createElement(\"path\", { opacity: \".703\", d: \"M12.033 18.93v2.054L8.245 17.31l3.788 1.62z\" }),\n        React.createElement(\"path\", { opacity: \".497\", d: \"M12.035 15.59l-3.79 1.208 3.79-4.352z\" }),\n        React.createElement(\"path\", { d: \"M15.819 16.794l-3.786-1.212v2.834l3.789-1.618z\" }),\n        React.createElement(\"path\", { opacity: \".499\", d: \"M12.033 18.93v2.054l3.789-3.674-3.789 1.62z\" }),\n        React.createElement(\"path\", { opacity: \".697\", d: \"M12.031 15.59l3.791 1.208-3.79-4.352z\" }))));\nexport const Reddit = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M15.8 14.195a1.8 1.8 0 1 1 0-3.6 1.8 1.8 0 0 1 0 3.6m-.048 3.004c-1.37.741-2.639.994-3.728.994-2.248 0-3.74-1.073-3.831-1.14a.48.48 0 0 1-.104-.664.462.462 0 0 1 .651-.105c.12.087 2.906 2.06 6.574.077a.464.464 0 0 1 .631.196.479.479 0 0 1-.193.642M6.8 12.395a1.8 1.8 0 1 1 3.6 0 1.8 1.8 0 0 1-3.6 0M19.8 2.2a1.4 1.4 0 0 1 0 2.799c-.772 0-1.4-.628-1.4-1.4 0-.772.628-1.4 1.4-1.4m4.2 8.215c0-1.499-1.231-2.718-2.744-2.718a2.75 2.75 0 0 0-1.837.7c-1.848-1.173-4.224-1.859-6.789-1.963l1.364-4.429 3.659 1.542c0 .016-.003.031-.003.047 0 1.205.99 2.185 2.206 2.185 1.217 0 2.207-.98 2.207-2.185 0-1.204-.99-2.184-2.207-2.184-.895 0-1.666.531-2.011 1.292L13.89 1.034a.434.434 0 0 0-.58.268l-1.577 5.119c-2.713.034-5.246.716-7.2 1.937a2.757 2.757 0 0 0-1.79-.662C1.231 7.696 0 8.916 0 10.414a2.69 2.69 0 0 0 1.254 2.279c-.046.269-.07.54-.07.812 0 1.928 1.144 3.728 3.222 5.067 2.02 1.302 4.698 2.02 7.54 2.02 2.842 0 5.52-.718 7.54-2.02 2.078-1.34 3.223-3.14 3.223-5.067 0-.25-.022-.501-.061-.75A2.709 2.709 0 0 0 24 10.414\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Telegram = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M11.995.045C5.37.045 0 5.415 0 12.04c0 6.624 5.37 11.994 11.995 11.994 6.624 0 11.994-5.37 11.994-11.994C23.99 5.415 18.62.045 11.995.045zM7.824 13.477l-3.027-1.02s-.464-.164-.509-.523c-.045-.36.524-.555.524-.555l12.03-4.719s.99-.434.99.285l-2.143 10.801s-.3.75-1.124.39l-3.048-2.337-1.956 1.783s-.152.116-.32.043l.395-3.37s5.483-4.928 5.708-5.138c.225-.21.15-.255.15-.255.015-.254-.405 0-.405 0l-7.265 4.615z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Trello = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M21 0a3 3 0 0 1 3 3v18a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3h18zm-1.56 3.12H15a1.44 1.44 0 0 0-1.44 1.44v7.62c0 .795.645 1.44 1.44 1.44h4.44a1.44 1.44 0 0 0 1.44-1.44V4.56a1.44 1.44 0 0 0-1.44-1.44zM9 3.12H4.56a1.44 1.44 0 0 0-1.44 1.44v13.62c0 .795.645 1.44 1.44 1.44H9a1.44 1.44 0 0 0 1.44-1.44V4.56A1.44 1.44 0 0 0 9 3.12z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Twitter = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M7.539 21.592c9.056 0 14.012-7.54 14.012-14.067 0-.212 0-.425-.01-.637A10.055 10.055 0 0 0 24 4.324a9.95 9.95 0 0 1-2.833.78 4.97 4.97 0 0 0 2.17-2.738 9.773 9.773 0 0 1-3.13 1.196A4.906 4.906 0 0 0 16.614 2c-2.718 0-4.927 2.218-4.927 4.946 0 .386.048.762.125 1.128C7.72 7.872 4.09 5.895 1.66 2.906A4.96 4.96 0 0 0 1 5.394c0 1.716.874 3.23 2.19 4.117a4.966 4.966 0 0 1-2.23-.617v.067a4.95 4.95 0 0 0 3.948 4.85 4.784 4.784 0 0 1-1.297.174c-.317 0-.624-.03-.922-.087a4.927 4.927 0 0 0 4.6 3.432 9.853 9.853 0 0 1-6.117 2.121A9.44 9.44 0 0 1 0 19.384a13.968 13.968 0 0 0 7.539 2.208\", fill: \"currentColor\" })));\nexport const Youtube = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M23.498 6.64C24 8.524 24 12.455 24 12.455s0 3.93-.502 5.814a3.016 3.016 0 0 1-2.121 2.135c-1.872.505-9.377.505-9.377.505s-7.505 0-9.377-.505A3.016 3.016 0 0 1 .501 18.27C0 16.385 0 12.455 0 12.455s0-3.93.501-5.815a3.015 3.015 0 0 1 2.122-2.135C4.495 4 12 4 12 4s7.505 0 9.377.505a3.015 3.015 0 0 1 2.121 2.135zM9.545 16.023l6.273-3.568-6.273-3.569v7.137z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const LinkedIn = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M2.87 5.351c1.791 0 2.906-1.19 2.906-2.676C5.743 1.157 4.661 0 2.906 0 1.147 0 0 1.157 0 2.675c0 1.486 1.114 2.676 2.838 2.676h.033zM.304 22.95V7.465h5.135v15.484H.303zM8 22.847S8.067 8.816 8 7.364h5.135v2.245H13.1C13.776 8.552 14.992 7 17.763 7c3.378 0 5.911 2.213 5.911 6.97v8.877H18.54v-8.283c0-2.081-.743-3.502-2.602-3.502-1.418 0-2.263.958-2.634 1.883-.136.33-.17.793-.17 1.255v8.647H8z\", fill: \"currentColor\", fillRule: \"evenodd\" })));\nexport const Facebook = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 12 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M3 8H0v4h3v12h5V12h3.642L12 8H8V6.333C8 5.378 8.192 5 9.115 5H12V0H8.192C4.596 0 3 1.583 3 4.615V8z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\nexport const Instagram = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { d: \"M14.829 6.302c-.738-.034-.96-.04-2.829-.04-1.869 0-2.09.007-2.828.04-1.899.087-2.783.986-2.87 2.87-.033.738-.041.959-.041 2.828 0 1.869.008 2.09.041 2.829.087 1.879.967 2.783 2.87 2.87.737.033.959.041 2.828.041 1.87 0 2.091-.007 2.829-.041 1.899-.086 2.782-.988 2.87-2.87.033-.738.04-.96.04-2.829 0-1.869-.007-2.09-.04-2.828-.088-1.883-.973-2.783-2.87-2.87zM12 15.595a3.595 3.595 0 110-7.19 3.595 3.595 0 010 7.19zm3.737-6.491a.84.84 0 110-1.68.84.84 0 010 1.68zM14.333 12a2.333 2.333 0 11-4.666 0 2.333 2.333 0 014.666 0zM12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm6.958 14.886c-.115 2.545-1.532 3.955-4.071 4.072-.747.034-.986.042-2.887.042s-2.139-.008-2.886-.042c-2.544-.117-3.955-1.529-4.072-4.072C5.008 14.14 5 13.901 5 12c0-1.901.008-2.139.042-2.886.117-2.544 1.529-3.955 4.072-4.071C9.861 5.008 10.099 5 12 5c1.901 0 2.14.008 2.887.043 2.545.117 3.957 1.532 4.071 4.071.034.747.042.985.042 2.886 0 1.901-.008 2.14-.042 2.886z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\nexport const Web = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"currentColor\" }),\n    React.createElement(\"path\", { fill: \"#fff\", fillRule: \"evenodd\", d: \"M5.23 7.737A8 8 0 0 1 12 4a8 8 0 0 1 6.77 3.737l.01.016A7.96 7.96 0 0 1 20 12a7.96 7.96 0 0 1-1.227 4.26l-.002.003A8 8 0 0 1 12 20a8 8 0 0 1-6.77-3.737l-.01-.016A7.96 7.96 0 0 1 4 12a7.96 7.96 0 0 1 1.22-4.247zM13.393 19c.428-.627.789-1.486 1.06-2.498H9.546c.248.929.572 1.728.954 2.338q.727.16 1.5.16l.307-.007q.459-.02.9-.097l.289-.057zm-4.88-2.498H6.64a7 7 0 0 0 2.504 1.891c-.246-.563-.457-1.2-.629-1.891m6.342 1.891a7 7 0 0 0 2.505-1.891h-1.876a12 12 0 0 1-.629 1.891m-6.555-2.89a19.6 19.6 0 0 1-.295-3.001H5.018a6.96 6.96 0 0 0 .919 3zm9.762-.002a6.96 6.96 0 0 0 .92-3h-2.989a19.6 19.6 0 0 1-.295 3.001zm-3.382 0c.178-.924.287-1.94.313-3H9.006c.026 1.06.135 2.076.313 3zm-6.675-4a19.6 19.6 0 0 1 .295-3H5.936a6.96 6.96 0 0 0-.918 3zm6.988 0a18.5 18.5 0 0 0-.312-3H9.318c-.177.925-.286 1.94-.312 3zm3.07-3H15.7c.169.937.27 1.95.295 3h2.989a6.96 6.96 0 0 0-.92-3m-9.55-1c.172-.692.383-1.329.63-1.892l-.076.034A7 7 0 0 0 6.638 7.5zm8.848 0a7 7 0 0 0-2.505-1.892l.108.26c.2.496.375 1.044.52 1.632zM13.5 5.16A7 7 0 0 0 12 5l-.307.007a7 7 0 0 0-.9.097l-.29.056.103-.159c-.428.627-.789 1.486-1.06 2.499h4.908c-.249-.93-.573-1.729-.955-2.34\" })));\nexport const X = ({ className }) => (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\", className: className },\n    React.createElement(\"path\", { fill: \"currentColor\", d: \"M18.88 1.16h3.68l-8.08 9.2 9.44 12.48h-7.408l-5.8-7.584-6.64 7.584H.392L8.952 13-.088 1.16h7.592l5.24 6.928zm-1.288 19.52h2.04L6.432 3.24H4.24z\" })));\n","import React from 'react';\nimport styled from 'styled-components';\nimport { CheckmarkIcon } from './CheckmarkIcon';\nimport * as MapIcons from './MapIcons';\nimport * as SocialIcons from './SocialIcons';\nconst DefaultPath = styled.path.withConfig({ displayName: \"DefaultPath\", componentId: \"sc-qys7lb\" }) `\n    stroke: #323232;\n`;\n/* eslint-disable max-len */\nconst sources = {\n    back: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 14\" },\n        React.createElement(\"path\", { stroke: \"currentColor\", strokeWidth: \"1.5\", d: \"M7 13L1 7l6-6\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    backArrow: (React.createElement(\"svg\", { width: \"23\", height: \"18\", viewBox: \"0 0 23 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8.1895 17.4096C8.57392 17.794 9.1972 17.794 9.58162 17.4096C9.96604 17.0251 9.96604 16.4019 9.58162 16.0174L3.8364 10.2722L21.8796 10.2722C22.4232 10.2722 22.8639 9.83151 22.8639 9.28785C22.8639 8.74419 22.4232 8.30348 21.8796 8.30348L3.83846 8.30348L9.58162 2.56032C9.96604 2.17589 9.96604 1.55262 9.58162 1.1682C9.19719 0.783777 8.57392 0.783778 8.1895 1.1682L0.774414 8.58329C0.760749 8.59662 0.74747 8.61035 0.734597 8.62446C0.380737 9.01071 0.390831 9.61089 0.764879 9.98494L8.1895 17.4096Z\", fill: \"currentColor\" }))),\n    forward: (React.createElement(\"svg\", { viewBox: \"0 0 8 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M1 1.342l5.66 5.66-5.656 5.656\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" })))),\n    caretUp: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 11 6\" },\n        React.createElement(\"path\", { d: \"M1 5.245L5.245 1l4.243 4.243\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    caretDown: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 11 6\" },\n        React.createElement(\"path\", { d: \"M9.488 1.243L5.243 5.488 1 1.245\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    close: (React.createElement(\"svg\", { width: \"9\", height: \"9\", viewBox: \"0 0 9 9\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M7.46875 1.57343L1.53125 7.51092\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { d: \"M1.53125 1.57343L7.46875 7.51092\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }))),\n    disconnect: (React.createElement(\"svg\", { width: \"12\", height: \"12\", viewBox: \"0 0 12 12\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M11.1242 6.31172L8.82734 8.60859C8.74336 8.68887 8.6318 8.73388 8.51562 8.73438C8.42887 8.73423 8.34412 8.7083 8.27214 8.65987C8.20016 8.61145 8.14421 8.54271 8.11138 8.46241C8.07856 8.38211 8.07035 8.29386 8.0878 8.20888C8.10525 8.1239 8.14756 8.04603 8.20937 7.98516L9.75703 6.4375H4.6875C4.57147 6.4375 4.46019 6.39141 4.37814 6.30936C4.29609 6.22731 4.25 6.11603 4.25 6C4.25 5.88397 4.29609 5.77269 4.37814 5.69064C4.46019 5.60859 4.57147 5.5625 4.6875 5.5625H9.75703L8.20937 4.01484C8.1267 3.9329 8.07997 3.82146 8.07946 3.70506C8.07894 3.58865 8.12469 3.47681 8.20664 3.39414C8.28859 3.31147 8.40002 3.26473 8.51643 3.26422C8.63283 3.26371 8.74467 3.30946 8.82734 3.39141L11.1242 5.68828C11.2064 5.77123 11.2525 5.88325 11.2525 6C11.2525 6.11675 11.2064 6.22877 11.1242 6.31172ZM4.6875 10.375H1.625V1.625H4.6875C4.80353 1.625 4.91481 1.57891 4.99686 1.49686C5.07891 1.41481 5.125 1.30353 5.125 1.1875C5.125 1.07147 5.07891 0.960188 4.99686 0.878141C4.91481 0.796094 4.80353 0.75 4.6875 0.75H1.625C1.39294 0.75 1.17038 0.842187 1.00628 1.00628C0.842187 1.17038 0.75 1.39294 0.75 1.625V10.375C0.75 10.6071 0.842187 10.8296 1.00628 10.9937C1.17038 11.1578 1.39294 11.25 1.625 11.25H4.6875C4.80353 11.25 4.91481 11.2039 4.99686 11.1219C5.07891 11.0398 5.125 10.9285 5.125 10.8125C5.125 10.6965 5.07891 10.5852 4.99686 10.5031C4.91481 10.4211 4.80353 10.375 4.6875 10.375Z\", fill: \"currentColor\" }))),\n    tick: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 8\" },\n        React.createElement(\"path\", { d: \"M1.271 4.55l2.2 2.39 5.657-5.658\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    exclamation: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 2 8\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M1 1v3.918M.986 6.904L1 6.918\" })))),\n    cross: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 15 15\" },\n        React.createElement(DefaultPath, { d: \"M1 1l13.2 13.2m0-13.2L1 14.2\", fill: \"none\" }))),\n    crossMedium: (React.createElement(\"svg\", { viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M.757.757l8.486 8.486m0-8.486L.757 9.243\", strokeWidth: \"1.5\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" }))),\n    crossHeavy: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 8\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M7.182 6.975L1.525 1.318M1.525 6.975l5.657-5.657\" })))),\n    linkOut: (React.createElement(\"svg\", { width: \"42\", height: \"42\", viewBox: \"0 0 42 42\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M27.8906 24.5684V14.0684H17.3906\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M27.8906 14.0684L13.4531 28.5059\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    play: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\" },\n        React.createElement(DefaultPath, { d: \"M12 22l10-6-10-6z\", strokeLinejoin: \"round\", fill: \"none\", fillRule: \"evenodd\" }))),\n    pause: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\" },\n        React.createElement(DefaultPath, { d: \"M11 10h3v12h-3zm7 0h3v12h-3z\", strokeLinejoin: \"round\", fill: \"none\", fillRule: \"evenodd\" }))),\n    minus: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 2\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { stroke: \"currentColor\", strokeLinecap: \"round\", d: \"M7.2 1H.8\" })))),\n    minusSmall: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 2\" },\n        React.createElement(\"path\", { fill: \"none\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"2\", d: \"M1 1h8\" }))),\n    plus: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 8 8\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { stroke: \"currentColor\", strokeLinecap: \"round\" },\n                React.createElement(\"path\", { d: \"M4 .8v6.4M7.2 4H.8\" }))))),\n    plusSmall: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 10 10\" },\n        React.createElement(\"path\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"2\", d: \"M1 5h8M5 1v8\" }))),\n    user: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 30 30\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M8.188 7.711a10.622 10.622 0 0 0 11.838 2.381\" }),\n            React.createElement(\"circle\", { cx: \"13.696\", cy: \"10.957\", r: \"6.391\" }),\n            React.createElement(\"path\", { d: \"M22.111 24.501a11.865 11.865 0 0 0-16.831 0\" }),\n            React.createElement(\"circle\", { cx: \"13.696\", cy: \"13.696\", r: \"13.696\" })))),\n    userFull: (React.createElement(\"svg\", { width: \"46\", height: \"46\", viewBox: \"0 0 46 46\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M23 46C35.7025 46 46 35.7025 46 23C46 10.2975 35.7025 0 23 0C10.2975 0 0 10.2975 0 23C0 35.7025 10.2975 46 23 46Z\", fill: \"currentColor\" }),\n        React.createElement(\"path\", { d: \"M18.971 28.8528V29.705C18.971 32.0553 20.882 33.9606 23.2394 33.9606C25.5968 33.9606 27.5078 32.0553 27.5078 29.705V28.8528\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M19.3626 14.958C17.4573 16.5774 16.7666 19.2092 17.6321 21.5514C18.4976 23.8936 20.7358 25.4496 23.2394 25.4496C25.743 25.4496 27.9812 23.8936 28.8467 21.5514C29.7122 19.2092 29.0214 16.5774 27.1162 14.958\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M25.8004 12.6826C24.2645 12.6835 22.9171 11.6619 22.5075 10.186C20.6608 10.277 19.1578 11.6997 18.971 13.5338C18.971 15.4141 20.8821 16.9382 23.2394 16.9382C25.5967 16.9382 27.5078 15.4141 27.5078 13.5338C27.5078 13.0637 27.1256 12.6826 26.6541 12.6826H25.8004Z\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M33.8011 35.6629C32.3186 31.0967 28.0533 28.0034 23.2394 28.0034C18.4255 28.0034 14.1602 31.0967 12.6777 35.6629\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    checkmark: React.createElement(CheckmarkIcon, null),\n    checkmarkOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 112 113\", fill: \"none\" },\n        React.createElement(\"circle\", { opacity: \".1\", cx: \"56\", cy: \"56.5\", r: \"56\", fill: \"#0EAC1B\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M101.833 56.5c0 25.313-20.52 45.833-45.834 45.833-25.313 0-45.833-20.52-45.833-45.833s20.52-45.833 45.833-45.833 45.834 20.52 45.834 45.833Zm-57.831-4.267c.56.24 1.065.589 1.488 1.027l5.926 5.926 15.093-15.093a4.583 4.583 0 1 1 6.48 6.48L54.657 68.908a4.583 4.583 0 0 1-6.48 0l-9.167-9.166a4.585 4.585 0 0 1 3.224-7.88c.608.005 1.21.131 1.769.372Z\", fill: \"#0EAC1B\" }))),\n    checkMarkMono: (React.createElement(\"svg\", { width: \"14\", height: \"11\", viewBox: \"0 0 14 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M0.76361 5.82623L4.25997 9.59981L12.5685 1.29131\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    error: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 20 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"10\", cy: \"10\", r: \"10\", fill: \"#FF5C00\", fillRule: \"nonzero\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", d: \"M10 11.562V5M10 14.562v-.052\" })))),\n    warning: (React.createElement(\"svg\", { width: \"24px\", height: \"24px\", viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"none\", strokeWidth: \"1\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { transform: \"translate(-505.000000, -2598.000000)\", stroke: \"#0324FF\", strokeWidth: \"1.5\" },\n                React.createElement(\"path\", { d: \"M517,2614.5 C516.792893,2614.5 516.625,2614.66789 516.625,2614.875 C516.625,2615.08211 516.792893,2615.25 517,2615.25 C517.207107,2615.25 517.375,2615.08211 517.375,2614.875 C517.375,2614.66789 517.207107,2614.5 517,2614.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { d: \"M517,2611.5 L517,2603.25\", strokeLinecap: \"round\" }),\n                React.createElement(\"circle\", { cx: \"517\", cy: \"2610\", r: \"11.25\" }))))),\n    refresh: (React.createElement(\"svg\", { viewBox: \"0 0 12 12\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M-6-6h24v24H-6z\" }),\n            React.createElement(\"g\", { stroke: \"currentColor\", strokeLinecap: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"path\", { d: \"M10.016 3.02a5.001 5.001 0 0 0-8.607.996m.599 4.995a5.001 5.001 0 0 0 8.57-.999\" }),\n                React.createElement(\"path\", { d: \"M1 11V8h3M11 1v3H8\", strokeLinejoin: \"round\" }))))),\n    circle: React.createElement(MapIcons.CircleIcon, null),\n    pin: React.createElement(MapIcons.PinIcon, null),\n    arrow: React.createElement(MapIcons.ArrowIcon, null),\n    longArrow: React.createElement(MapIcons.LongArrowIcon, null),\n    arrowhead: React.createElement(MapIcons.ArrowHeadIcon, null),\n    keyboard: (React.createElement(\"svg\", { viewBox: \"0 0 24 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"rect\", { x: \".75\", y: \".25\", width: \"22.5\", height: \"12\", rx: \"3\" }),\n            React.createElement(\"path\", { d: \"M6.75 3.25h1.5M15.75 3.25h1.5M11.25 3.25h1.5M4.5 6.25H6M9 6.25h1.5M13.5 6.25H15M18 6.25h1.5M6.75 9.25h10.5\" })))),\n    share: (React.createElement(\"svg\", { viewBox: \"0 0 19 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(0 -2)\", stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M17.788 5.375h-7.013c-1.408 0-2.55 1.12-2.55 2.5V11\" }),\n            React.createElement(\"path\", { d: \"M13.963 9.125l3.825-3.75-3.825-3.75M15.238 12.875v6.25c0 .69-.571 1.25-1.275 1.25H2.488c-.705 0-1.276-.56-1.276-1.25v-10c0-.69.571-1.25 1.276-1.25H4.4\" })))),\n    emptyAvatarUpload: (React.createElement(\"svg\", { viewBox: \"0 0 80 80\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(20 20)\", stroke: \"#D8D8D8\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M13.817 10.489A11.927 11.927 0 0 0 27.11 13.16\" }),\n            React.createElement(\"circle\", { cx: \"20\", cy: \"14.13\", r: \"7.174\" }),\n            React.createElement(\"path\", { d: \"M.435 10.871V3.043A2.609 2.609 0 0 1 3.043.435h7.827M39.565 10.871V3.043A2.609 2.609 0 0 0 36.957.435H29.13M.435 29.13v7.827a2.609 2.609 0 0 0 2.608 2.608h7.827M39.565 29.13v7.827a2.609 2.609 0 0 1-2.608 2.608H29.13M31.02 31.74a11.673 11.673 0 0 0-22.04 0\" })))),\n    profileMan: (React.createElement(\"svg\", { viewBox: \"0 0 80 80\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"g\", { opacity: \"0.5\" },\n                React.createElement(\"ellipse\", { stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\", cx: \"40.5\", cy: \"28\", rx: \"10.762\", ry: \"10.5\" }),\n                React.createElement(\"path\", { d: \"M32.813 44.498V46c0 4.142 3.441 7.5 7.687 7.5s7.688-3.358 7.688-7.5v-1.502\", stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { d: \"M31.226 22.668c3.367 3.408 8.01 5.333 12.861 5.332 2.433 0 4.84-.483 7.073-1.422M20.512 62.5c0-10.77 8.95-19.5 19.988-19.5 11.039 0 19.987 8.73 19.987 19.5\", stroke: \"#525252\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))),\n    hamburger: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 12 10\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M1 9h10M1 5h10M1 1h10\" })))),\n    search: (React.createElement(\"svg\", { viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", transform: \"translate(-1 -1)\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"circle\", { transform: \"rotate(-23.025 7.593 7.592)\", cx: \"7.593\", cy: \"7.592\", r: \"5.371\" }),\n            React.createElement(\"path\", { d: \"M11.39 11.39l4.166 4.166\" })))),\n    questionMark: (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M9.1 9.286a.75.75 0 0 1-1.5-.001 4.287 4.287 0 1 1 5.716 4.044 1.018 1.018 0 0 0-.68.96v.744a.75.75 0 0 1-1.5 0v-.744a2.52 2.52 0 0 1 1.68-2.374A2.787 2.787 0 1 0 9.1 9.285zm2.782 10.074a1.19 1.19 0 1 1 0-2.38 1.19 1.19 0 0 1 0 2.38z\", fill: \"#525252\" }))),\n    outlineQuestionMark: (React.createElement(\"svg\", { viewBox: \"0 0 18 18\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\" }),\n            React.createElement(\"g\", { strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.071\" },\n                React.createElement(\"path\", { d: \"M7.925 12.005a.316.316 0 100 .632.316.316 0 000-.632h0M5.398 5.975a2.526 2.526 0 113.369 2.383 1.263 1.263 0 00-.842 1.19v.532\" }))))),\n    outlineQuestionMark2: (React.createElement(\"svg\", { viewBox: \"0 0 17 17\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M8.25 16.5a8.25 8.25 0 1 0 0-16.5 8.25 8.25 0 0 0 0 16.5Z\", fill: \"#A3A3A3\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M8.435 11.41a1.05 1.05 0 1 0 0 2.1 1.05 1.05 0 0 0 0-2.1Z\", fill: \"#fff\" }),\n        React.createElement(\"path\", { d: \"M6.225 5.853a2.21 2.21 0 1 1 2.947 2.085 1.105 1.105 0 0 0-.737 1.042v.465\", stroke: \"#fff\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    lockOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 18 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"rect\", { width: \"16.5\", height: \"13.5\", x: \"0.75\", y: \"9.75\", rx: \"1.5\" }),\n            React.createElement(\"path\", { d: \"M3.75 9.75V6a5.25 5.25 0 1110.5 0v3.75M9 15v3\" })))),\n    lock: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 19 25\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\", transform: \"translate(1 1)\" },\n            React.createElement(\"path\", { stroke: \"currentColor\", d: \"M3 9V5.25a5.25 5.25 0 1110.5 0\" }),\n            React.createElement(\"rect\", { width: \"16.5\", height: \"13.5\", y: \"9\", fill: \"currentColor\", stroke: \"currentColor\", rx: \"1.5\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", d: \"M8.5 14v3\" })))),\n    lockClosed: (React.createElement(\"svg\", { fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"9.5 8 13 16\" },\n        React.createElement(\"path\", { d: \"M19.75 15H19v-2a3 3 0 0 0-6 0v2h-.75a.751.751 0 0 0-.75.75v5.5a.751.751 0 0 0 .75.75h7.5a.751.751 0 0 0 .75-.75v-5.5a.751.751 0 0 0-.75-.75Zm-3.275 3.875c.014.04.022.082.025.125a.5.5 0 0 1-1 0 .485.485 0 0 1 .025-.125 1 1 0 1 1 .95 0ZM18 15h-4v-2a2 2 0 0 1 4 0v2Z\", fill: \"currentColor\" }))),\n    checkBadgeOutline: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"currentColor\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { d: \"M15.75 9.749l-3.981 5.308a.75.75 0 01-1.13.08L8.25 12.749\" }),\n            React.createElement(\"path\", { d: \"M10.73 1.357a1.63 1.63 0 012.54 0l1.512 1.881c.348.434.893.66 1.446.6l2.4-.261a1.63 1.63 0 011.8 1.8l-.261 2.4c-.06.553.166 1.098.6 1.446l1.881 1.512a1.63 1.63 0 010 2.54l-1.887 1.505a1.63 1.63 0 00-.6 1.447l.261 2.4a1.629 1.629 0 01-1.8 1.8l-2.4-.261a1.628 1.628 0 00-1.446.6L13.27 22.64a1.629 1.629 0 01-2.54 0l-1.511-1.88a1.631 1.631 0 00-1.447-.6l-2.4.261a1.628 1.628 0 01-1.8-1.8l.261-2.4a1.631 1.631 0 00-.6-1.447l-1.88-1.511a1.629 1.629 0 010-2.54l1.88-1.512c.434-.348.66-.893.6-1.446l-.261-2.4a1.629 1.629 0 011.8-1.8l2.4.261a1.632 1.632 0 001.447-.6l1.511-1.869z\" })))),\n    checkBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { fill: \"currentColor\", stroke: \"currentColor\", d: \"M10.73 1.357a1.63 1.63 0 012.54 0l1.512 1.881c.348.434.893.66 1.446.6l2.4-.261a1.63 1.63 0 011.8 1.8l-.261 2.4c-.06.553.166 1.098.6 1.446l1.881 1.512a1.63 1.63 0 010 2.54l-1.887 1.505a1.63 1.63 0 00-.6 1.447l.261 2.4a1.629 1.629 0 01-1.8 1.8l-2.4-.261a1.628 1.628 0 00-1.446.6L13.27 22.64a1.629 1.629 0 01-2.54 0l-1.511-1.88a1.631 1.631 0 00-1.447-.6l-2.4.261a1.628 1.628 0 01-1.8-1.8l.261-2.4a1.631 1.631 0 00-.6-1.447l-1.88-1.511a1.629 1.629 0 010-2.54l1.88-1.512c.434-.348.66-.893.6-1.446l-.261-2.4a1.629 1.629 0 011.8-1.8l2.4.261a1.632 1.632 0 001.447-.6l1.511-1.869z\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", d: \"M15.75 9.749l-3.981 5.308a.75.75 0 01-1.13.08L8.25 12.749\" })))),\n    checkBadgeHD: (React.createElement(\"svg\", { viewBox: \"0 0 16 16\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { fill: \"#0324FF\", d: \"M8 14.88l-1.56.966-1.073-1.49-1.812.296-.42-1.787-1.787-.42.296-1.812L.154 9.56 1.12 8 .154 6.44l1.49-1.073-.296-1.812 1.787-.42.42-1.787 1.812.296L6.44.154 8 1.12 9.56.154l1.073 1.49 1.812-.296.42 1.787 1.787.42-.296 1.812 1.49 1.072L14.88 8l.966 1.56-1.49 1.073.296 1.812-1.787.42-.42 1.787-1.812-.296-1.072 1.49z\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\", d: \"M4.865 8.172l1.65 1.792 4.243-4.243\" })))),\n    dropPlus: (React.createElement(\"svg\", { viewBox: \"0 0 25 25\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1 1)\", fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { fill: \"#FCFBF9\", cx: \"11.5\", cy: \"11.5\", r: \"11.5\" }),\n            React.createElement(\"path\", { d: \"M11.5 23C17.851 23 23 17.851 23 11.5S17.851 0 11.5 0 0 5.149 0 11.5C.007 17.848 5.152 22.993 11.5 23zm-6-12.5h4.75a.25.25 0 0 0 .25-.25V5.5a1 1 0 0 1 2 0v4.75c0 .138.112.25.25.25h4.75a1 1 0 0 1 0 2h-4.75a.25.25 0 0 0-.25.25v4.75a1 1 0 0 1-2 0v-4.75a.25.25 0 0 0-.25-.25H5.5a1 1 0 0 1 0-2z\", fill: \"#FF5C00\", fillRule: \"nonzero\" })))),\n    infoBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", transform: \"matrix(1 0 0 -1 0 16)\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#0324FF\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M8 11.5v.1m0-2.8V4\" })))),\n    warnBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#FF5C00\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M8 11.5v.1m0-2.8V4\" })))),\n    errorBadge: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 16 16\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"#FF0F2D\" }),\n            React.createElement(\"path\", { stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"2\", d: \"M4.606 4.606l6.788 6.788m0-6.788l-6.788 6.788\" })))),\n    clear: (React.createElement(\"svg\", { viewBox: \"0 0 14 14\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(.25 .25)\", fill: \"none\" },\n            React.createElement(\"circle\", { stroke: \"#CDCDCD\", fill: \"#CDCDCD\", cx: \"6.75\", cy: \"6.75\", r: \"6.188\" }),\n            React.createElement(\"path\", { d: \"M4.84 4.84l3.82 3.82m0-3.82L4.84 8.66\", stroke: \"#FFF\" })))),\n    trash: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 15 14\" },\n        React.createElement(\"path\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"#A3A3A3\", strokeLinecap: \"round\", strokeLinejoin: \"round\", d: \"M11.167 13h-7a1 1 0 01-1-1V3h9v9a1 1 0 01-1 1zm-5-3V6m3 4V6m-8-3h13m-5-2h-3a1 1 0 00-1 1v1h5V2a1 1 0 00-1-1z\" }))),\n    brevetDown: (React.createElement(\"svg\", { viewBox: \"0 0 10 6\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M.756 1l4.245 4.245 4.243-4.242\", stroke: \"#CDCDCD\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    // TODO check if is used and delete if not\n    x: (React.createElement(\"svg\", { viewBox: \"0 0 10 10\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"#A3A3A3\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M.757.757l8.486 8.486M9.243.757L.757 9.243\" })))),\n    transfer: (React.createElement(\"svg\", { viewBox: \"0 0 24 24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"rect\", { fill: \"currentColor\", width: \"24\", height: \"24\", rx: \"3\" }),\n            React.createElement(\"path\", { d: \"M8.8 8h8.8M14.4 4.8L17.6 8l-3.2 3.2M15.2 16H6.4M9.6 19.2L6.4 16l3.2-3.2\", stroke: \"#FDFDFD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })))),\n    dataUnion: (React.createElement(\"svg\", { viewBox: \"0 0 16 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1)\", stroke: \"currentColor\", strokeWidth: \"1.125\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M2.489 8.93C1.71 7.05 2.33 4.9 4.003 3.676a4.805 4.805 0 0 1 5.655.011c1.668 1.23 2.278 3.382 1.492 5.26\" }),\n            React.createElement(\"path\", { d: \"M1.314 10.81C-.656 8.111-.216 4.416 2.34 2.22c2.555-2.197 6.413-2.197 8.968 0 2.556 2.197 2.997 5.892 1.026 8.591\" }),\n            React.createElement(\"ellipse\", { cx: \"6.824\", cy: \"6.978\", rx: \"2.042\", ry: \"1.969\" }),\n            React.createElement(\"path\", { d: \"M10.111 11.76c-.487-1.348-1.805-2.251-3.286-2.251-1.48 0-2.798.903-3.285 2.25h6.571z\" })))),\n    DATA: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"path\", { d: \"M12 24C5.372 24 0 18.628 0 12S5.372 0 12 0s12 5.372 12 12-5.372 12-12 12z\", fill: \"#CDCDCD\", fillRule: \"nonzero\" }),\n            React.createElement(\"path\", { d: \"M13.878 5.193v-.432a.26.26 0 00-.271-.26 5.63 5.63 0 00-5.355 5.393c.006.182.154.23.241.23h.44a.26.26 0 00.26-.248 4.693 4.693 0 014.444-4.438c.183-.023.241-.123.241-.245m-3.953 4.931h.42a.26.26 0 00.258-.242 3.285 3.285 0 013.055-3.035.235.235 0 00.22-.248V6.17a.261.261 0 00-.279-.26 4.224 4.224 0 00-3.935 3.934c-.01.15.11.279.26.279m3.954-2.541v.43c0 .176-.152.239-.227.248a1.878 1.878 0 00-1.635 1.63.262.262 0 01-.26.233h-.42a.26.26 0 01-.259-.284 2.816 2.816 0 012.518-2.517.26.26 0 01.283.26zm4.929 6.282c-.122 0-.222-.058-.245-.241a4.693 4.693 0 00-4.439-4.444.26.26 0 01-.248-.26v-.44c0-.086.048-.234.23-.24a5.631 5.631 0 015.395 5.353.26.26 0 01-.26.272h-.433zm-4.932-3.953c0-.151.128-.27.28-.26a4.224 4.224 0 013.934 3.934c.01.15-.109.28-.26.28h-.428a.235.235 0 01-.248-.221 3.285 3.285 0 00-3.035-3.055.26.26 0 01-.243-.258v-.42zm2.542 3.953h-.43c-.176 0-.24-.153-.248-.227a1.878 1.878 0 00-1.632-1.635.262.262 0 01-.232-.26v-.42a.26.26 0 01.284-.259 2.816 2.816 0 012.518 2.517.26.26 0 01-.26.284zM5.193 10.123c.122 0 .222.059.245.241a4.693 4.693 0 004.439 4.444.26.26 0 01.248.26v.44c0 .086-.048.234-.23.24A5.631 5.631 0 014.5 10.395a.26.26 0 01.26-.272h.433zm4.932 3.953c0 .151-.128.27-.28.26a4.224 4.224 0 01-3.934-3.934.261.261 0 01.26-.28h.428c.189 0 .244.149.248.222a3.285 3.285 0 003.035 3.054.26.26 0 01.243.258v.42zm-2.542-3.953h.43c.176 0 .24.153.248.227.103.853.779 1.53 1.632 1.635a.262.262 0 01.232.26v.42a.26.26 0 01-.284.259 2.816 2.816 0 01-2.518-2.517.26.26 0 01.26-.284zm2.543 8.684c0-.122.059-.222.241-.245a4.693 4.693 0 004.445-4.438.26.26 0 01.26-.248h.44c.086 0 .234.048.24.23a5.631 5.631 0 01-5.354 5.394.26.26 0 01-.272-.26v-.433zm3.954-4.931c.151 0 .27.128.26.28a4.224 4.224 0 01-3.935 3.934.261.261 0 01-.28-.26V17.4c0-.189.149-.243.222-.248a3.285 3.285 0 003.055-3.035.26.26 0 01.257-.242h.42zm-3.954 2.541v-.43c0-.176.153-.239.227-.248a1.878 1.878 0 001.636-1.63.262.262 0 01.259-.233h.42a.26.26 0 01.26.284 2.816 2.816 0 01-2.518 2.517.26.26 0 01-.284-.26z\", fill: \"#FFF\" })))),\n    DATAColor: (React.createElement(\"svg\", { fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", width: \"24\", height: \"24\", viewBox: \"0 0 24 24\" },\n        React.createElement(\"circle\", { cx: \"12\", cy: \"12\", r: \"12\", fill: \"#F7600A\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M14.104 4.377v-.485c0-.166-.138-.3-.304-.292a6.307 6.307 0 0 0-5.998 6.041c.007.204.173.258.27.258h.492a.292.292 0 0 0 .292-.278 5.256 5.256 0 0 1 4.978-4.97c.204-.026.27-.138.27-.274ZM9.676 9.899h.47a.29.29 0 0 0 .289-.272 3.68 3.68 0 0 1 3.422-3.398.263.263 0 0 0 .247-.278v-.48a.293.293 0 0 0-.313-.291 4.73 4.73 0 0 0-4.407 4.406.293.293 0 0 0 .292.313Zm6.257 4.202c.097 0 .263.054.27.258a6.307 6.307 0 0 1-5.998 6.04.292.292 0 0 1-.304-.291v-.484c0-.137.066-.248.27-.275a5.256 5.256 0 0 0 4.978-4.97.292.292 0 0 1 .292-.278h.492Zm-1.604 0c.17 0 .303.144.292.313a4.73 4.73 0 0 1-4.407 4.406.293.293 0 0 1-.313-.291v-.48c0-.211.165-.272.247-.278a3.68 3.68 0 0 0 3.422-3.398.29.29 0 0 1 .289-.272h.47Zm-1.581 0c.171 0 .308.147.29.318a3.154 3.154 0 0 1-2.82 2.82.291.291 0 0 1-.317-.292v-.481c0-.197.171-.268.255-.278a2.103 2.103 0 0 0 1.831-1.827.294.294 0 0 1 .29-.26h.47ZM4.377 9.898c.136 0 .248.065.274.27a5.256 5.256 0 0 0 4.971 4.977.292.292 0 0 1 .278.292v.492c0 .097-.054.262-.258.27A6.307 6.307 0 0 1 3.6 10.201a.292.292 0 0 1 .292-.304h.485Zm1.574 0c.212 0 .273.165.278.247a3.68 3.68 0 0 0 3.4 3.421.29.29 0 0 1 .27.289v.47c0 .17-.143.303-.312.292A4.73 4.73 0 0 1 5.18 10.21a.293.293 0 0 1 .291-.312h.48Zm8.407-2.11a6.307 6.307 0 0 1 6.042 5.997.292.292 0 0 1-.292.304h-.485c-.136 0-.248-.066-.274-.27a5.256 5.256 0 0 0-4.971-4.978.292.292 0 0 1-.278-.29v-.493c0-.097.054-.263.258-.27Zm.055 1.582a4.73 4.73 0 0 1 4.407 4.406.293.293 0 0 1-.291.313h-.48a.263.263 0 0 1-.278-.247 3.68 3.68 0 0 0-3.4-3.421.29.29 0 0 1-.27-.289v-.47c0-.17.143-.303.312-.292Zm.005 1.582a3.154 3.154 0 0 1 2.82 2.82.291.291 0 0 1-.291.317h-.482c-.197 0-.268-.171-.278-.254a2.103 2.103 0 0 0-1.827-1.832.293.293 0 0 1-.26-.29v-.47c0-.172.148-.308.318-.291ZM7.535 9.898c.197 0 .268.17.278.254a2.103 2.103 0 0 0 1.827 1.832c.148.018.26.14.26.29v.47a.291.291 0 0 1-.318.29 3.154 3.154 0 0 1-2.82-2.819.291.291 0 0 1 .291-.317h.482Zm6.569-2.845v.481c0 .197-.171.268-.254.278a2.103 2.103 0 0 0-1.832 1.827.294.294 0 0 1-.29.26h-.47a.29.29 0 0 1-.291-.318 3.154 3.154 0 0 1 2.82-2.82c.17-.016.317.12.317.292Z\", fill: \"#fff\" }))),\n    ETH: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fillRule: \"nonzero\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12 24C5.372 24 0 18.628 0 12S5.372 0 12 0s12 5.372 12 12-5.372 12-12 12zm5.995-11.836L12.373 3 6.75 12.165l5.623 3.265 5.623-3.266zM18 13.212l-5.627 3.263-5.623-3.262 5.623 7.783L18 13.212z\", fill: \"#CDCDCD\" }),\n            React.createElement(\"g\", { opacity: \".497\" },\n                React.createElement(\"path\", { d: \"M12.373 3v6.652l5.623 2.513L12.374 3zm0 13.476v4.52L18 13.212l-5.627 3.264z\", fillOpacity: \".298\", fill: \"#000\" }),\n                React.createElement(\"path\", { fill: \"#525252\", d: \"M12.373 15.43l5.623-3.265-5.622-2.511z\" }),\n                React.createElement(\"path\", { fill: \"#ADADAD\", d: \"M6.75 12.165l5.623 3.265V9.654z\" }))))),\n    DAI: (React.createElement(\"svg\", { width: \"24\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { fillRule: \"nonzero\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12 0C5.371 0 0 5.371 0 12s5.371 12 12 12 12-5.371 12-12S18.629 0 12 0z\", fill: \"#CDCDCD\" }),\n            React.createElement(\"path\", { d: \"M18 10.245h-1.29C16.002 8.323 14.094 7 11.577 7H7.438v3.245H6v1.164h1.438v1.22H6v1.165h1.438V17h4.138c2.488 0 4.382-1.31 5.11-3.206H18V12.63h-1.025c.026-.205.036-.418.036-.63v-.028c0-.191-.01-.379-.029-.563H18v-1.164zM8.596 8.04h2.98c1.847 0 3.22.889 3.853 2.205H8.596V8.04zm2.98 7.916h-2.98v-2.162h6.826c-.641 1.295-2.006 2.162-3.846 2.162zm4.24-3.928c0 .206-.014.407-.043.602H8.596v-1.22h7.18c.026.19.04.388.04.59v.028z\", fill: \"#FFF\" })))),\n    unknownToken: (React.createElement(\"svg\", { width: \"24\", height: \"24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M11.942 23.885c6.596 0 11.943-5.347 11.943-11.943C23.885 5.347 18.538 0 11.942 0 5.347 0 0 5.347 0 11.942c0 6.596 5.347 11.943 11.942 11.943Z\", fill: \"#CDCDCD\" }),\n        React.createElement(\"path\", { d: \"M15.833 8.167a.572.572 0 0 0-.585-.138 10.257 10.257 0 0 1-6.496 0 .571.571 0 0 0-.723.723 10.256 10.256 0 0 1 0 6.496.571.571 0 0 0 .723.723 10.337 10.337 0 0 1 6.496 0 .571.571 0 0 0 .723-.723 10.257 10.257 0 0 1 0-6.496.572.572 0 0 0-.138-.585ZM12 14.305c-.874 0-1.749.099-2.601.297a11.393 11.393 0 0 0 0-5.203 11.391 11.391 0 0 0 5.202 0 11.394 11.394 0 0 0 0 5.203A11.498 11.498 0 0 0 12 14.305Z\", fill: \"#fff\" }),\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 2.7c-5.042 0-9.3 4.222-9.3 9.3 0 5.042 4.222 9.3 9.3 9.3 5.042 0 9.3-4.222 9.3-9.3 0-5.042-4.222-9.3-9.3-9.3Zm0 17.113c-4.232 0-7.813-3.58-7.813-7.813 0-4.232 3.581-7.813 7.813-7.813 4.232 0 7.814 3.58 7.814 7.813 0 4.232-3.582 7.813-7.814 7.813ZM9.882 3.261A8.717 8.717 0 0 1 12 3c4.912 0 9 4.123 9 9 0 4.17-2.973 7.747-6.855 8.732C18.028 19.748 21 16.171 21 12c0-4.877-4.088-9-9-9-.726 0-1.436.09-2.118.261ZM12 20.113c-4.398 0-8.113-3.715-8.113-8.113 0-3.747 2.697-6.999 6.216-7.88-3.519.881-6.216 4.133-6.216 7.88 0 4.398 3.715 8.113 8.113 8.113Z\", fill: \"#fff\" }))),\n    console: (React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 23 20\" },\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\", stroke: \"#A3A3A3\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n            React.createElement(\"path\", { d: \"M2.525 18.775a1.35 1.35 0 01-1.35-1.35V2.678a1.458 1.458 0 011.453-1.453h17.35a1.45 1.45 0 011.447 1.446v14.65a1.458 1.458 0 01-1.454 1.454H2.525zm18.9-13.5H1.175m10.8 6.75h4.05\" }),\n            React.createElement(\"path\", { d: \"M6.575 9.325l2.7 2.7-2.7 2.7\" })))),\n    copy: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M23 5H13C11.6193 5 10.5 6.11929 10.5 7.5V8.5H9.5C8.11929 8.5 7 9.61929 7 11V24C7 25.3807 8.11929 26.5 9.5 26.5H19.5C20.8807 26.5 22 25.3807 22 24V23H23C24.3807 23 25.5 21.8807 25.5 20.5V7.5C25.5 6.11929 24.3807 5 23 5ZM20.5 23H13C11.6193 23 10.5 21.8807 10.5 20.5V10H9.5C8.94772 10 8.5 10.4477 8.5 11V24C8.5 24.5523 8.94772 25 9.5 25H19.5C20.0523 25 20.5 24.5523 20.5 24V23ZM12 7.5C12 6.94772 12.4477 6.5 13 6.5H23C23.5523 6.5 24 6.94772 24 7.5V20.5C24 21.0523 23.5523 21.5 23 21.5H13C12.4477 21.5 12 21.0523 12 20.5V7.5Z\", fill: \"currentColor\" }))),\n    alarmBell: (React.createElement(\"svg\", { viewBox: \"0 0 16 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { strokeWidth: \"1.5\", stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M6.444 17.917a1.623 1.623 0 003.115 0M8 3.333v-1.75M8 3.333a5.833 5.833 0 015.833 5.834c0 5.48 1.167 6.416 1.167 6.416H1s1.167-1.49 1.167-6.416A5.833 5.833 0 018 3.333z\" })))),\n    product: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"defs\", null,\n            React.createElement(\"rect\", { id: \"a\", x: \"0\", y: \"0\", width: \"32\", height: \"32\", rx: \"4\" })),\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"mask\", { id: \"b\", fill: \"#fff\" },\n                React.createElement(\"use\", { xlinkHref: \"#a\" })),\n            React.createElement(\"use\", { fill: \"#97BAC0\", xlinkHref: \"#a\" }),\n            React.createElement(\"g\", { mask: \"url(#b)\", stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"g\", { transform: \"translate(6 7)\" },\n                    React.createElement(\"rect\", { x: \".455\", y: \".227\", width: \"19.091\", height: \"17.727\", rx: \"1.5\" }),\n                    React.createElement(\"path\", { d: \"M.455 4.318h19.09\" }),\n                    React.createElement(\"rect\", { x: \"3.182\", y: \"8.045\", width: \"5.455\", height: \"4.545\", rx: \".75\" }),\n                    React.createElement(\"path\", { d: \"M11.818 13.5h5M11.818 8.045h5M11.818 10.773h5\" })))))),\n    stream: (React.createElement(\"svg\", { viewBox: \"0 0 32 32\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"defs\", null,\n            React.createElement(\"rect\", { id: \"a\", x: \"0\", y: \"0\", width: \"32\", height: \"32\", rx: \"4\" })),\n        React.createElement(\"g\", { fill: \"none\", fillRule: \"evenodd\" },\n            React.createElement(\"use\", { fill: \"#97BAC0\", xlinkHref: \"#a\" }),\n            React.createElement(\"g\", { transform: \"translate(9 9)\", stroke: \"#FFF\", strokeLinecap: \"round\", strokeLinejoin: \"round\", strokeWidth: \"1.5\" },\n                React.createElement(\"circle\", { cx: \"2.5\", cy: \"11.497\", r: \"2.25\" }),\n                React.createElement(\"path\", { d: \"M.205 5.126a6.807 6.807 0 018.4 9.36M.359.445a11.279 11.279 0 0113 14.08\" }))))),\n    clipboardPlus: (React.createElement(\"svg\", { viewBox: \"0 0 11 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\" },\n            React.createElement(\"path\", { d: \"M7.375 2.875H9.25a.75.75 0 01.75.75V11.5a.75.75 0 01-.75.75h-7.5A.75.75 0 011 11.5V3.625a.75.75 0 01.75-.75h1.875a1.875 1.875 0 113.75 0z\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M5.529 2.883a.187.187 0 11-.058.37.187.187 0 01.058-.37\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M3.5 7.5h4M5.5 5.5v4\" })))),\n    clipboardCheck: (React.createElement(\"svg\", { viewBox: \"0 0 11 13\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { stroke: \"currentColor\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M7.375 2.875H9.25a.75.75 0 01.75.75V11.5a.75.75 0 01-.75.75h-7.5A.75.75 0 011 11.5V3.625a.75.75 0 01.75-.75h1.875a1.875 1.875 0 113.75 0z\" }),\n            React.createElement(\"path\", { d: \"M5.529 2.883a.187.187 0 11-.058.37.187.187 0 01.058-.37M7.612 6L4.816 8.796a.409.409 0 01-.579 0L3.3 7.858\" })))),\n    expand: (React.createElement(\"svg\", { width: \"25\", height: \"24\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { transform: \"translate(1)\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", fill: \"none\", fillRule: \"evenodd\", strokeLinecap: \"round\", strokeLinejoin: \"round\" },\n            React.createElement(\"path\", { d: \"M5.25 17.998L0 23.248M22.5 6.748v-6h-6M0 17.248v6h6M22.5.748l-5.25 5.25M17.25 17.998l5.25 5.25M0 6.748v-6h6M22.5 17.248v6h-6M0 .748l5.25 5.25\" }),\n            React.createElement(\"rect\", { x: \"7.5\", y: \"8.248\", width: \"7.5\", height: \"7.5\", rx: \".75\" })))),\n    list: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"rect\", { fill: \"none\", x: \".75\", y: \".75\", width: \"18.5\", height: \"18.5\", rx: \"1.25\", stroke: \"currentColor\", strokeWidth: \"1.5\" }),\n        React.createElement(\"path\", { stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", d: \"M5.75 4.979h8.5M5.75 7.479h5.167M5.75 9.979h8.5M5.75 12.479h5.167M5.75 14.979h8.5\" }))),\n    listInspect: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M10.02 5.06h-4.5M7.77 8.04H5.52M5.52 11.02h2.632M5.52 13.998h2.563\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 6.923V3.474a2 2 0 00-2-2H3.38a2 2 0 00-2 2v12a2 2 0 002 2h4.866\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.072 16.9a3.451 3.451 0 100-6.903 3.451 3.451 0 000 6.902zM16.502 15.899L18.621 18\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    listSettings: (React.createElement(\"svg\", { viewBox: \"0 0 20 20\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { fill: \"none\", d: \"M10.02 5.06h-4.5M7.77 8.04H5.52M5.52 11.02h2.632M5.52 13.998h2.563\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 6.923V3.474a2 2 0 00-2-2H3.38a2 2 0 00-2 2v12a2 2 0 002 2h4.866\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M14.59 15.505a1 1 0 100-2.001 1 1 0 000 2.001z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { fill: \"none\", d: \"M15.44 10.635l.294.969a.663.663 0 00.784.454l.982-.227a.894.894 0 01.85 1.48l-.688.74a.667.667 0 000 .91l.688.74a.893.893 0 01-.85 1.48l-.982-.227a.663.663 0 00-.784.454l-.294.966a.887.887 0 01-1.7 0l-.295-.97a.663.663 0 00-.784-.454l-.982.228a.893.893 0 01-.85-1.48l.687-.741a.667.667 0 000-.91l-.687-.74a.894.894 0 01.85-1.48l.982.227a.663.663 0 00.784-.454l.294-.97a.887.887 0 011.7.005z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    page: (React.createElement(\"svg\", { width: \"15\", height: \"18\", viewBox: \"0 0 15 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { id: \"page\", fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12.5 0H2.5C1.11929 0 0 1.11929 0 2.5V15.5C0 16.8807 1.11929 18 2.5 18H12.5C13.8807 18 15 16.8807 15 15.5V2.5C15 1.11929 13.8807 0 12.5 0ZM1.5 2.5C1.5 1.94772 1.94772 1.5 2.5 1.5H12.5C13.0523 1.5 13.5 1.94772 13.5 2.5V15.5C13.5 16.0523 13.0523 16.5 12.5 16.5H2.5C1.94772 16.5 1.5 16.0523 1.5 15.5V2.5ZM8.85748 4.56053C8.85748 4.97475 8.5217 5.31053 8.10748 5.31053H5.02067C4.60646 5.31053 4.27067 4.97474 4.27067 4.56053C4.27067 4.14632 4.60646 3.81053 5.02067 3.81053L8.10748 3.81053C8.5217 3.81053 8.85748 4.14632 8.85748 4.56053ZM8.02069 7.53983C8.02069 7.95404 7.6849 8.28983 7.27069 8.28983H5.02069C4.60648 8.28983 4.27069 7.95404 4.27069 7.53983C4.27069 7.12561 4.60648 6.78983 5.02069 6.78983H7.27069C7.6849 6.78983 8.02069 7.12561 8.02069 7.53983ZM5.02069 9.76912C4.60648 9.76912 4.27069 10.1049 4.27069 10.5191C4.27069 10.9333 4.60648 11.2691 5.02069 11.2691H8.78803C9.20225 11.2691 9.53803 10.9333 9.53803 10.5191C9.53803 10.1049 9.20225 9.76912 8.78803 9.76912H5.02069ZM8.33316 13.4984C8.33316 13.9126 7.99737 14.2484 7.58316 14.2484H5.02068C4.60647 14.2484 4.27068 13.9126 4.27068 13.4984C4.27068 13.0842 4.60647 12.7484 5.02068 12.7484H7.58316C7.99737 12.7484 8.33316 13.0842 8.33316 13.4984Z\", fill: \"currentColor\" }))),\n    fullScreen: (React.createElement(\"svg\", { width: \"24\", height: \"24\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"mingcute:fullscreen-line\", clipPath: \"url(#clip0_4518_586)\" },\n            React.createElement(\"g\", { id: \"Group\" },\n                React.createElement(\"path\", { id: \"Vector\", d: \"M4 15C4.26522 15 4.51957 15.1054 4.70711 15.2929C4.89464 15.4804 5 15.7348 5 16V19H8C8.26522 19 8.51957 19.1054 8.70711 19.2929C8.89464 19.4804 9 19.7348 9 20C9 20.2652 8.89464 20.5196 8.70711 20.7071C8.51957 20.8946 8.26522 21 8 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V16C3 15.7348 3.10536 15.4804 3.29289 15.2929C3.48043 15.1054 3.73478 15 4 15ZM20 15C20.2449 15 20.4813 15.09 20.6644 15.2527C20.8474 15.4155 20.9643 15.6397 20.993 15.883L21 16V19C21.0002 19.5046 20.8096 19.9906 20.4665 20.3605C20.1234 20.7305 19.6532 20.9572 19.15 20.995L19 21H16C15.7451 20.9997 15.5 20.9021 15.3146 20.7272C15.1293 20.5522 15.0178 20.313 15.0028 20.0586C14.9879 19.8042 15.0707 19.5536 15.2343 19.3582C15.3979 19.1627 15.6299 19.0371 15.883 19.007L16 19H19V16C19 15.7348 19.1054 15.4804 19.2929 15.2929C19.4804 15.1054 19.7348 15 20 15ZM19 3C19.5046 2.99984 19.9906 3.19041 20.3605 3.5335C20.7305 3.87659 20.9572 4.34684 20.995 4.85L21 5V8C20.9997 8.25488 20.9021 8.50003 20.7272 8.68537C20.5522 8.8707 20.313 8.98224 20.0586 8.99717C19.8042 9.01211 19.5536 8.92933 19.3582 8.76574C19.1627 8.60215 19.0371 8.3701 19.007 8.117L19 8V5H16C15.7451 4.99972 15.5 4.90212 15.3146 4.72715C15.1293 4.55218 15.0178 4.31305 15.0028 4.05861C14.9879 3.80416 15.0707 3.55362 15.2343 3.35817C15.3979 3.16271 15.6299 3.0371 15.883 3.007L16 3H19ZM8 3C8.25488 3.00028 8.50003 3.09788 8.68537 3.27285C8.8707 3.44782 8.98224 3.68695 8.99717 3.94139C9.01211 4.19584 8.92933 4.44638 8.76574 4.64183C8.60215 4.83729 8.3701 4.9629 8.117 4.993L8 5H5V8C4.99972 8.25488 4.90212 8.50003 4.72715 8.68537C4.55218 8.8707 4.31305 8.98224 4.05861 8.99717C3.80416 9.01211 3.55362 8.92933 3.35817 8.76574C3.16271 8.60215 3.0371 8.3701 3.007 8.117L3 8V5C2.99984 4.49542 3.19041 4.00943 3.5335 3.63945C3.87659 3.26947 4.34684 3.04284 4.85 3.005L5 3H8Z\", fill: \"currentColor\" }))),\n        React.createElement(\"defs\", null,\n            React.createElement(\"clipPath\", { id: \"clip0_4518_586\" },\n                React.createElement(\"rect\", { width: \"24\", height: \"24\", fill: \"white\" }))))),\n    externalLink: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M22.0008 13.4286V10H18.5723\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M21.9994 10L14.2852 17.7143\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M15.5 12.5713H10.7857C10.3518 12.5713 10 12.9231 10 13.357V21.2141C10 21.6481 10.3518 21.9999 10.7857 21.9999H18.6429C19.0768 21.9999 19.4286 21.6481 19.4286 21.2141V16.4999\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    pencil: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M22.3402 9.65976C22.1283 9.44871 21.8766 9.28175 21.5998 9.16852C21.3229 9.05528 21.0264 8.99803 20.7273 9.00005C20.4282 9.00208 20.1324 9.06334 19.8571 9.18031C19.5819 9.29728 19.3325 9.46764 19.1234 9.68154L10.1013 18.7036L9 23L13.2964 21.8981L22.3185 12.876C22.5324 12.667 22.7028 12.4177 22.8198 12.1424C22.9368 11.8672 22.9981 11.5715 23.0002 11.2724C23.0022 10.9733 22.9449 10.6768 22.8316 10.4C22.7184 10.1232 22.5513 9.87162 22.3402 9.65976V9.65976Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M18.8652 9.93994L22.0597 13.1344\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M10.1016 18.7031L13.2991 21.8951\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    pencilFull: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M14.0833 5.43734L10.5417 1.93734L11.7083 0.770671C12.0278 0.451226 12.4203 0.291504 12.8858 0.291504C13.3508 0.291504 13.7431 0.451226 14.0625 0.770671L15.2292 1.93734C15.5486 2.25678 15.7153 2.64234 15.7292 3.094C15.7431 3.54511 15.5903 3.93039 15.2708 4.24984L14.0833 5.43734ZM1.33333 15.4998C1.09722 15.4998 0.899445 15.4198 0.74 15.2598C0.58 15.1004 0.5 14.9026 0.5 14.6665V12.3123C0.5 12.2012 0.520833 12.0937 0.5625 11.9898C0.604167 11.8854 0.666667 11.7915 0.75 11.7082L9.33333 3.12484L12.875 6.6665L4.29167 15.2498C4.20833 15.3332 4.11472 15.3957 4.01083 15.4373C3.90639 15.479 3.79861 15.4998 3.6875 15.4998H1.33333Z\", fill: \"currentColor\" }))),\n    eye: (React.createElement(\"svg\", { width: \"32\", height: \"32\", viewBox: \"0 0 32 32\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M15.9988 10.501C12.774 10.4466 9.43872 12.7002 7.34189 15.0082C7.1218 15.2526 7 15.5698 7 15.8986C7 16.2275 7.1218 16.5447 7.34189 16.789C9.39312 19.0483 12.7188 21.3539 15.9988 21.2987C19.2788 21.3539 22.6053 19.0483 24.6581 16.789C24.8782 16.5447 25 16.2275 25 15.8986C25 15.5698 24.8782 15.2526 24.6581 15.0082C22.5589 12.7002 19.2236 10.4466 15.9988 10.501Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n        React.createElement(\"path\", { d: \"M18.9981 15.9003C18.998 16.4936 18.8219 17.0735 18.4921 17.5668C18.1624 18.06 17.6938 18.4444 17.1456 18.6714C16.5974 18.8983 15.9942 18.9576 15.4123 18.8417C14.8304 18.7259 14.2959 18.4401 13.8765 18.0205C13.457 17.6009 13.1713 17.0664 13.0556 16.4844C12.9399 15.9025 12.9994 15.2993 13.2265 14.7512C13.4536 14.2031 13.8381 13.7346 14.3314 13.405C14.8248 13.0753 15.4048 12.8994 15.9981 12.8994C16.3922 12.8993 16.7824 12.9769 17.1465 13.1276C17.5105 13.2784 17.8413 13.4995 18.1199 13.7782C18.3986 14.0568 18.6195 14.3877 18.7702 14.7518C18.9209 15.1159 18.9983 15.5062 18.9981 15.9003Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    ellipse: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"7\", stroke: \"currentColor\", strokeWidth: \"2\" }))),\n    email: (React.createElement(\"svg\", { width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { clipPath: \"url(#clip0_1889_4457)\" },\n            React.createElement(\"g\", { clipPath: \"url(#clip1_1889_4457)\" },\n                React.createElement(\"circle\", { cx: \"8\", cy: \"8\", r: \"8\", fill: \"currentColor\" }),\n                React.createElement(\"path\", { d: \"M3.33203 5.5013C3.33203 5.28029 3.43036 5.06833 3.6054 4.91205C3.78043 4.75577 4.01783 4.66797 4.26536 4.66797H11.732C11.9796 4.66797 12.217 4.75577 12.392 4.91205C12.567 5.06833 12.6654 5.28029 12.6654 5.5013V10.5013C12.6654 10.7223 12.567 10.9343 12.392 11.0906C12.217 11.2468 11.9796 11.3346 11.732 11.3346H4.26536C4.01783 11.3346 3.78043 11.2468 3.6054 11.0906C3.43036 10.9343 3.33203 10.7223 3.33203 10.5013V5.5013ZM4.97423 5.5013L7.9987 7.86422L11.0232 5.5013H4.9747H4.97423ZM11.732 6.05505L8.30623 8.73172C8.22113 8.79829 8.11184 8.83499 7.9987 8.83499C7.88555 8.83499 7.77626 8.79829 7.69116 8.73172L4.26536 6.05505V10.5013H11.732V6.05505Z\", fill: \"white\" }))),\n        React.createElement(\"defs\", null,\n            React.createElement(\"clipPath\", { id: \"clip0_1889_4457\" },\n                React.createElement(\"rect\", { width: \"16\", height: \"16\", fill: \"white\" })),\n            React.createElement(\"clipPath\", { id: \"clip1_1889_4457\" },\n                React.createElement(\"rect\", { width: \"16\", height: \"16\", fill: \"white\" }))))),\n    zoomOut: (React.createElement(\"svg\", { width: \"17\", height: \"16\", viewBox: \"0 0 17 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"iconamoon:zoom-out\" },\n            React.createElement(\"path\", { id: \"Vector\", d: \"M14.5 13.9999L11.6047 11.1046M11.6047 11.1046C12.0999 10.6093 12.4928 10.0213 12.7608 9.37426C13.0289 8.72717 13.1668 8.03363 13.1668 7.33323C13.1668 6.63283 13.0289 5.93928 12.7608 5.2922C12.4928 4.64511 12.0999 4.05715 11.6047 3.56189C11.1094 3.06663 10.5215 2.67377 9.87438 2.40574C9.22729 2.13771 8.53375 1.99976 7.83335 1.99976C7.13295 1.99976 6.4394 2.13771 5.79232 2.40574C5.14523 2.67377 4.55727 3.06663 4.06202 3.56189C3.0618 4.56211 2.49988 5.9187 2.49988 7.33323C2.49988 8.74775 3.0618 10.1043 4.06202 11.1046C5.06224 12.1048 6.41882 12.6667 7.83335 12.6667C9.24787 12.6667 10.6045 12.1048 11.6047 11.1046ZM5.83335 7.33323H9.83335\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" })))),\n    zoomIn: (React.createElement(\"svg\", { width: \"17\", height: \"16\", viewBox: \"0 0 17 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"g\", { id: \"lucide:zoom-in\" },\n            React.createElement(\"g\", { id: \"Group\" },\n                React.createElement(\"path\", { id: \"Vector\", d: \"M7.83333 12.6667C10.7789 12.6667 13.1667 10.2789 13.1667 7.33333C13.1667 4.38781 10.7789 2 7.83333 2C4.88781 2 2.5 4.38781 2.5 7.33333C2.5 10.2789 4.88781 12.6667 7.83333 12.6667Z\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                React.createElement(\"path\", { id: \"Vector_2\", d: \"M14.5 13.9999L11.6 11.0999M7.83331 5.33325V9.33325M5.83331 7.33325H9.83331\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))),\n    faders: (React.createElement(\"svg\", { width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n        React.createElement(\"path\", { d: \"M10 9.375v7.5M10 3.125v3.75M15.625 15.625v1.25M15.625 3.125v10M17.5 13.125h-3.75M4.375 13.125v3.75M4.375 3.125v7.5M2.5 10.625h3.75M11.875 6.875h-3.75\", stroke: \"currentColor\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))),\n    github: React.createElement(SocialIcons.GitHub, null),\n    medium: React.createElement(SocialIcons.Medium, null),\n    peepeth: React.createElement(SocialIcons.Peepeth, null),\n    reddit: React.createElement(SocialIcons.Reddit, null),\n    telegram: React.createElement(SocialIcons.Telegram, null),\n    trello: React.createElement(SocialIcons.Trello, null),\n    twitter: React.createElement(SocialIcons.Twitter, null),\n    youtube: React.createElement(SocialIcons.Youtube, null),\n    linkedin: React.createElement(SocialIcons.LinkedIn, null),\n    instagram: React.createElement(SocialIcons.Instagram, null),\n    facebook: React.createElement(SocialIcons.Facebook, null),\n    web: React.createElement(SocialIcons.Web, null),\n    xCom: React.createElement(SocialIcons.X, null),\n};\nconst SvgIcon = React.forwardRef(({ name, ...props }, ref) => React.cloneElement(sources[name], { ...props, ref }));\nSvgIcon.displayName = 'SvgIcon';\nexport default SvgIcon;\nexport const SvgIconNames = Object.keys(sources).sort();\n","import { z } from 'zod';\nexport const RejectionReason = {\n    CloseButton: Symbol('close button'),\n    Backdrop: Symbol('backdrop'),\n    EscapeKey: Symbol('escape key'),\n    CancelButton: Symbol('cancel'),\n    BackButton: Symbol('back button'),\n};\nexport function isRejectionReason(value) {\n    return (value === RejectionReason.CloseButton ||\n        value === RejectionReason.Backdrop ||\n        value === RejectionReason.EscapeKey ||\n        value === RejectionReason.CancelButton ||\n        value === RejectionReason.BackButton);\n}\nconst CodedError = z.object({\n    code: z.number(),\n});\nexport function isCodedError(e) {\n    return CodedError.safeParse(e).success;\n}\nconst ObjectWithMessage = z.object({\n    message: z.string(),\n});\nexport function isMessagedObject(e) {\n    return ObjectWithMessage.safeParse(e).success;\n}\nexport function isTransactionRejection(e) {\n    return ((isCodedError(e) && e.code === 4001) ||\n        (isMessagedObject(e) && /action_rejected/i.test(e.message)));\n}\n","import React, { useEffect, useReducer, useRef } from 'react';\nimport styled, { createGlobalStyle, css, keyframes } from 'styled-components';\nimport { useDiscardableEffect } from 'toasterhea';\nimport gsap from 'gsap';\nimport { TABLET } from '~/shared/utils/styled';\nimport { RejectionReason } from '~/utils/exceptions';\nconst bringIn = keyframes `\n    from {\n        opacity: 0;\n        transform: translateY(1%) translateZ(0) scale(0.98);\n    }\n    to {\n        opacity: 1;\n        transform: translateZ(0) scale(1) translateY(0);\n    }\n`;\nconst bringOut = keyframes `\n    from {\n        transform: translateZ(0) scale(1) translateY(0);\n    }\n    to {\n        transform: translateY(1%) translateZ(0) scale(0.98);\n    }\n`;\nconst fadeAway = keyframes `\n    from {\n        opacity: 1;\n    }\n    to {\n        opacity: 0;\n    }\n`;\nexport default function BaseModal({ children, darkBackdrop, onBeforeAbort, onReject, onResolve: _, ...props }) {\n    const [dismissed, dismiss] = useReducer(() => true, false);\n    const rootRef = useRef(null);\n    useDiscardableEffect((discard) => {\n        const { current: root } = rootRef;\n        root?.addEventListener('animationend', ({ animationName }) => {\n            if (animationName === fadeAway.getName()) {\n                discard();\n            }\n        });\n        dismiss();\n    });\n    const wigglyRef = useRef(null);\n    const tweenRef = useRef();\n    function wiggle() {\n        tweenRef.current?.kill();\n        tweenRef.current = gsap.to({}, {\n            duration: 0.75,\n            onUpdate() {\n                const { current: wiggly } = wigglyRef;\n                if (!wiggly) {\n                    return;\n                }\n                const p = this.progress();\n                const intensity = (1 + Math.sin((p * 2 - 0.5) * Math.PI)) * 0.5;\n                const wave = 5 * Math.sin(6 * p * Math.PI);\n                wiggly.style.transform = `rotate(${intensity * wave}deg)`;\n            },\n        });\n    }\n    function close(reason) {\n        const beforeAbort = onBeforeAbort?.(reason);\n        if (beforeAbort === false) {\n            wiggle();\n        }\n        if (beforeAbort === null || beforeAbort === false) {\n            return;\n        }\n        onReject?.(reason);\n    }\n    const closeRef = useRef(close);\n    closeRef.current = close;\n    useEffect(() => {\n        function onKeyDown({ key }) {\n            if (key === 'Escape') {\n                closeRef.current(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, []);\n    return (React.createElement(Root, { ref: rootRef, \"$dismissed\": dismissed, \"$dark\": darkBackdrop, ...props },\n        React.createElement(NoScrollStyles, null),\n        React.createElement(Backdrop, { onMouseDown: () => void close(RejectionReason.Backdrop) }),\n        React.createElement(OuterWrap, null,\n            React.createElement(InnerWrap, null,\n                React.createElement(Pad, null,\n                    React.createElement(Interactive, null,\n                        React.createElement(AnimatedWrap, { \"$dismissed\": dismissed },\n                            React.createElement(Wigglable, { ref: wigglyRef }, typeof children === 'function'\n                                ? children(close)\n                                : children))))))));\n}\nconst NoScrollStyles = createGlobalStyle `\n    body {\n        overflow: hidden !important;\n        overflow-y: hidden !important;\n        overflow-x: hidden !important;\n    }\n`;\nconst AnimatedWrap = styled.div.withConfig({ displayName: \"AnimatedWrap\", componentId: \"sc-1we8sni\" }) `\n    animation: 300ms ${({ $dismissed = false }) => ($dismissed ? bringOut : bringIn)}\n        ease-in-out 1;\n    animation-fill-mode: both;\n    backface-visibility: hidden;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-q8xzs3\" }) `\n    backdrop-filter: blur(8px);\n    background-color: rgba(255, 255, 255, 0.9);\n    height: 100%;\n    left: 0;\n    line-height: 24px;\n    overflow: auto;\n    position: fixed;\n    top: 0;\n    transform: translate3d(0, 0, 0);\n    width: 100%;\n    z-index: 1;\n\n    ${({ $dismissed = false }) => $dismissed &&\n    css `\n            animation: 300ms ${fadeAway} ease-in-out 1;\n            animation-fill-mode: both;\n        `}\n\n    ${({ $dark = false }) => $dark &&\n    css `\n            background-color: rgba(50, 50, 50, 0.5);\n        `}\n`;\nconst Backdrop = styled.div.withConfig({ displayName: \"Backdrop\", componentId: \"sc-5mc9iw\" }) `\n    position: fixed;\n    width: 100%;\n    height: 100%;\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-1p8mcx5\" }) `\n    align-items: center;\n    color: #323232;\n    display: flex;\n    height: 100%;\n    justify-content: center;\n    pointer-events: none;\n    position: relative;\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1qr84ko\" }) `\n    max-height: 100%;\n    overflow: visible;\n`;\nconst Pad = styled.div.withConfig({ displayName: \"Pad\", componentId: \"sc-197oo3a\" }) `\n    padding-top: 40px;\n    padding-bottom: 40px;\n    padding-top: 64px;\n    padding-bottom: 64px;\n`;\nconst Interactive = styled.div.withConfig({ displayName: \"Interactive\", componentId: \"sc-100g7sv\" }) `\n    max-width: 90vw;\n    min-width: 12rem;\n    pointer-events: auto;\n    width: max-content;\n`;\nconst Wigglable = styled.div.withConfig({ displayName: \"Wigglable\", componentId: \"sc-wq793j\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    min-height: 160px;\n`;\nexport const Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-o56xd4\" }) `\n    align-items: center;\n    display: flex;\n    height: 80px;\n    padding: 0 40px;\n    width: 100%;\n\n    ${({ $borderless = false }) => !$borderless &&\n    css `\n            border-top: 1px solid #f3f3f3;\n        `}\n\n    ${({ $spacious = false }) => $spacious &&\n    css `\n            @media ${TABLET} {\n                height: 120px;\n            }\n        `}\n\n    ${({ $autoHeight = false }) => $autoHeight &&\n    css `\n            height: auto !important;\n        `}\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS, SANS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { RejectionReason } from '~/utils/exceptions';\nimport BaseModal from './BaseModal';\n/**\n * `BaseModal` with left-aligned title bar and a close button.\n */\nexport default function LightModal({ children, title = 'Untitled modal', ...props }) {\n    return (React.createElement(BaseModal, { ...props }, (close) => (React.createElement(Root, null,\n        React.createElement(Head, null,\n            React.createElement(Title, null, title),\n            React.createElement(CloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton) },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(Content, null, typeof children === 'function' ? children(close) : children)))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1xqz3vu\" }) `\n    max-width: 560px;\n    width: 90vw;\n    padding: 40px;\n    display: grid;\n    grid-template-rows: auto auto;\n    gap: 24px;\n`;\nconst Head = styled.div.withConfig({ displayName: \"Head\", componentId: \"sc-16xfdfh\" }) `\n    display: flex;\n    font-family: ${SANS};\n    font-size: 20px;\n    font-weight: normal;\n    line-height: 32px;\n    margin: 0;\n    position: relative;\n    text-align: left;\n    width: 100%;\n    align-items: center;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1f9439v\" }) `\n    flex-grow: 1;\n    color: ${COLORS.primary};\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1cojb88\" }) `\n    font-size: 16px;\n    font-weight: 400;\n    line-height: 24px;\n    color: ${COLORS.primaryLight};\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-6okpin\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\n","export const Layer = {\n    Modal: 'modals',\n    Toast: 'toasts',\n};\n","export const MaxSearchPhraseLength = 250;\nexport const address0 = '0x0000000000000000000000000000000000000000';\nexport const StreamGptApiUrl = process.env.STREAM_GPT_API_URL;\n/**\n * A minute in milliseconds.\n */\nexport const Minute = 60000;\nexport const DayInSeconds = 86400;\nexport const defaultChainKey = 'polygon';\n","export default function formatConfigUrl(url, options = {}) {\n    const { protocol = 'http' } = options;\n    const dockerHost = process.env.STREAMR_DOCKER_DEV_HOST || options.dockerHost;\n    // Config contains references to local docker environment (10.200.10.1).\n    // Make sure we are compatible with other docker hosts as well.\n    if (url.includes('10.200.10.1') && dockerHost != null) {\n        url = url.replace('10.200.10.1', dockerHost);\n    }\n    return url && !/^[:/]/.test(url) ? url : `${protocol}://${dockerHost}${url}`;\n}\n","import { produce } from 'immer';\nimport { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport config from '~/config/chains.toml';\nimport formatConfigUrl from '~/utils/formatConfigUrl';\nconst ChainConfigExtension = z.object({\n    coingeckoNetworkId: z.string().optional(),\n    dataUnionJoinServerUrl: z.string().optional(),\n    dataunionGraphNames: z\n        .array(z.object({\n        chainId: z.number(),\n        name: z.string(),\n    }))\n        .optional()\n        .default([]),\n    displayName: z.string().optional(),\n    dockerHost: z.string().optional(),\n    ipfs: z\n        .object({\n        apiSecretKey: z.string(),\n        ipfsGatewayUrl: z.string(),\n        ipfsUploadEndpoint: z.string(),\n        projectId: z.string(),\n    })\n        .optional()\n        .default({\n        apiSecretKey: 'c39492773b28820c8b3654178bf26946',\n        ipfsGatewayUrl: 'https://streamr-hub.infura-ipfs.io/ipfs/',\n        ipfsUploadEndpoint: 'https://ipfs.infura.io:5001/api/v0/add',\n        projectId: '2KjYUpR265h6R5M5njkSue5RGm7',\n    }),\n    marketplaceChains: z.array(z.string()).optional().default([]),\n    networkSubgraphUrl: z.string().optional(),\n    slug: z.string().optional(),\n    sponsorshipPaymentToken: z.string().optional().default('DATA'),\n    storageNodes: z\n        .array(z.object({\n        name: z.string(),\n        address: z.string().refine(isAddress, 'Invalid storage node address'),\n        thirdPartyUrl: z.string().optional(),\n    }))\n        .optional()\n        .default([]),\n    streamIndexerUrl: z.string().optional(),\n});\nexport const fallbackChainConfigExtension = ChainConfigExtension.parse({});\nexport const parsedChainConfigExtension = z\n    .record(z.string(), z.union([ChainConfigExtension, z.undefined()]))\n    .transform((value) => produce(value, (draft) => {\n    Object.values(draft).forEach(function dockerizeUrls(extension) {\n        if (!extension) {\n            return;\n        }\n        const { dataUnionJoinServerUrl, dockerHost, networkSubgraphUrl, streamIndexerUrl, } = extension;\n        if (networkSubgraphUrl) {\n            extension.networkSubgraphUrl = formatConfigUrl(networkSubgraphUrl, {\n                dockerHost,\n            });\n        }\n        if (typeof dataUnionJoinServerUrl === 'string') {\n            extension.dataUnionJoinServerUrl = formatConfigUrl(dataUnionJoinServerUrl, {\n                dockerHost,\n            });\n        }\n        if (typeof streamIndexerUrl === 'string') {\n            extension.streamIndexerUrl = formatConfigUrl(streamIndexerUrl, {\n                dockerHost,\n            });\n        }\n    });\n}))\n    .parse(config);\n","import { config as configs } from '@streamr/config';\nimport { produce } from 'immer';\nimport { useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { defaultChainKey } from '~/consts';\nimport { fallbackChainConfigExtension, parsedChainConfigExtension, } from '~/utils/chainConfigExtension';\nimport formatConfigUrl from './formatConfigUrl';\nconst lowerCasedChainKeyToChainKeyMap = {};\n/**\n * @param candidate Chain key or chain slug (from config extension) or chain number. Defaults\n * to the default chain key (currently 'polygon').\n */\nexport function getChainKey(candidate) {\n    const key = typeof candidate === 'number' ? candidate : candidate.toLowerCase();\n    if (lowerCasedChainKeyToChainKeyMap[key] === null) {\n        return defaultChainKey;\n    }\n    if (lowerCasedChainKeyToChainKeyMap[key]) {\n        return lowerCasedChainKeyToChainKeyMap[key];\n    }\n    for (const chainKey in configs) {\n        if (!isChainKey(chainKey)) {\n            continue;\n        }\n        if (typeof key === 'number') {\n            if (configs[chainKey].id === key) {\n                lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n                return chainKey;\n            }\n            continue;\n        }\n        if (chainKey.toLowerCase() === key) {\n            lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n            return chainKey;\n        }\n        const slug = parsedChainConfigExtension[chainKey]?.slug?.toLowerCase();\n        if (key === slug) {\n            lowerCasedChainKeyToChainKeyMap[key] = chainKey;\n            return chainKey;\n        }\n    }\n    console.warn(`Could not find a proper chain key for \"${candidate}\". Using default key (${defaultChainKey}).`);\n    lowerCasedChainKeyToChainKeyMap[key] = null;\n    return defaultChainKey;\n}\nexport function getCurrentChain() {\n    return getChainConfig(new URLSearchParams(window.location.search).get('chain') || defaultChainKey);\n}\nexport function getCurrentChainId() {\n    return getCurrentChain().id;\n}\nexport function useCurrentChain() {\n    const chainName = useSearchParams()[0].get('chain') || defaultChainKey;\n    return useMemo(() => getChainConfig(chainName), [chainName]);\n}\nexport function useCurrentChainId() {\n    return useCurrentChain().id;\n}\nexport function useCurrentChainKey() {\n    return getChainKey(useCurrentChainId());\n}\n/**\n * @todo rename to `useCurrentFullChainName`.\n */\nexport function useCurrentChainFullName() {\n    return getChainDisplayName(useCurrentChainId());\n}\nconst chainKeyToChainEntryMap = {};\nfunction getChainEntry(chainKey) {\n    if (chainKeyToChainEntryMap[chainKey]) {\n        return chainKeyToChainEntryMap[chainKey];\n    }\n    const config = configs[chainKey];\n    const configExtension = parsedChainConfigExtension[chainKey] || fallbackChainConfigExtension;\n    const { dockerHost } = configExtension;\n    const sanitizedConfig = produce(config, (draft) => {\n        for (const rpc of draft.rpcEndpoints) {\n            rpc.url = formatConfigUrl(rpc.url, {\n                dockerHost,\n            });\n        }\n        if (draft.entryPoints) {\n            for (const entrypoint of draft.entryPoints) {\n                entrypoint.websocket.host = formatConfigUrl(entrypoint.websocket.host, {\n                    dockerHost,\n                });\n            }\n        }\n        if (draft.theGraphUrl) {\n            draft.theGraphUrl = formatConfigUrl(draft.theGraphUrl, { dockerHost });\n        }\n    });\n    const entry = {\n        chainKey,\n        config: sanitizedConfig,\n        configExtension,\n    };\n    chainKeyToChainEntryMap[chainKey] = entry;\n    return entry;\n}\nexport function getChainConfig(chainIdOrChainKey) {\n    return getChainEntry(getChainKey(chainIdOrChainKey)).config;\n}\nexport function getChainConfigExtension(chainId) {\n    return getChainEntry(getChainKey(chainId)).configExtension;\n}\nexport function getChainSlug(chainIdOrChainKey) {\n    const chainEntry = getChainEntry(getChainKey(chainIdOrChainKey));\n    return chainEntry.configExtension.slug || chainEntry.chainKey;\n}\n/**\n * Checks if a given string is a `ChainKey`.\n * @param candidate Any string.\n * @returns `true` if the given string is config's own key.\n */\nexport function isChainKey(candidate) {\n    return Object.prototype.hasOwnProperty.call(configs, candidate);\n}\nexport function isKnownChainId(candidate) {\n    return Object.entries(configs).some(([, { id }]) => id === candidate);\n}\nexport function getChainDisplayName(chainIdOrChainKey) {\n    const { config, configExtension } = getChainEntry(getChainKey(chainIdOrChainKey));\n    return configExtension.displayName || config.name;\n}\nexport function getMarketplaceChainConfigs(chainIdOrChainKey) {\n    const marketplaceChainKeys = getChainEntry(getChainKey(chainIdOrChainKey))\n        .configExtension.marketplaceChains;\n    const result = [];\n    for (const key of marketplaceChainKeys) {\n        if (isChainKey(key)) {\n            result.push(getChainConfig(key));\n        }\n    }\n    return result;\n}\nexport function getCoingeckoNetworkId(chainIdOrChainKey) {\n    const { config, configExtension } = getChainEntry(getChainKey(chainIdOrChainKey));\n    return configExtension.coingeckoNetworkId || config.name;\n}\n","import queryString from 'query-string';\nimport { defaultChainKey } from '~/consts';\nimport { getChainSlug } from './chains';\nexport function routeOptions(chainIdOrChainKey, search = {}, hash = '') {\n    return {\n        search: {\n            ...search,\n            chain: getChainSlug(chainIdOrChainKey),\n        },\n        hash,\n    };\n}\nfunction withSuffix(pathname, options = {}) {\n    const { hash = '' } = options;\n    const { chain, ...search } = options.search || {};\n    const qs = options.search\n        ? queryString.stringify(chain === defaultChainKey\n            ? search\n            : {\n                ...search,\n                chain,\n            })\n        : '';\n    return `${pathname}${qs && `?${qs}`}${hash && `#${hash}`}`;\n}\nfunction encode(uriComponent) {\n    if (/:\\w+/.test(uriComponent)) {\n        return uriComponent;\n    }\n    return encodeURIComponent(uriComponent);\n}\nexport const Route = {\n    allowanceInfo() {\n        return 'https://tokenallowance.io';\n    },\n    blog() {\n        return 'https://blog.streamr.network/';\n    },\n    contactGeneral() {\n        return 'mailto:contact@streamr.com';\n    },\n    contactJobs() {\n        return 'mailto:jobs@streamr.com';\n    },\n    contactLabs() {\n        return 'mailto:labs@streamr.com';\n    },\n    contactMedia() {\n        return 'mailto:media@streamr.com';\n    },\n    createOperator(options) {\n        return withSuffix('/hub/network/operators/new', options);\n    },\n    docs(pathname) {\n        return `https://docs.streamr.network${(pathname ?? '/')}`;\n    },\n    error(options) {\n        return withSuffix('/error', options);\n    },\n    giveFeedback() {\n        return 'https://github.com/streamr-dev/streamr-platform/issues';\n    },\n    hub(options) {\n        return withSuffix('/hub', options);\n    },\n    network(options) {\n        return withSuffix('/hub/network', options);\n    },\n    networkExplorer() {\n        return 'https://streamr.network/network-explorer';\n    },\n    networkOverview(options) {\n        return withSuffix('/hub/network/overview', options);\n    },\n    operator(id, options) {\n        return withSuffix(`/hub/network/operators/${encode(id)}`, options);\n    },\n    operators(options) {\n        return withSuffix('/hub/network/operators', options);\n    },\n    privacyPolicy() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-privacy-policy.pdf';\n    },\n    project(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}`, options);\n    },\n    projectConnect(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/connect`, options);\n    },\n    projectEdit(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/edit`, options);\n    },\n    projectLiveData(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/live-data`, options);\n    },\n    projectOverview(id, options) {\n        return withSuffix(`/hub/projects/${encode(id)}/overview`, options);\n    },\n    projects(options) {\n        return withSuffix('/hub/projects', options);\n    },\n    publisherTerms() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-data-provider-agreement.pdf';\n    },\n    resetAllowanceInfo() {\n        return 'https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729';\n    },\n    root() {\n        return '/';\n    },\n    siteAbout() {\n        return '/about';\n    },\n    siteDataToken() {\n        return '/discover/data-token';\n    },\n    siteDataUnions() {\n        return '/discover/data-unions';\n    },\n    siteDesign() {\n        return '/design';\n    },\n    siteEcosystem() {\n        return '/ecosystem';\n    },\n    siteFund() {\n        return '/fund';\n    },\n    siteMarketplace() {\n        return '/discover/marketplace';\n    },\n    siteNetwork() {\n        return '/discover/network';\n    },\n    sitePapers() {\n        return '/papers';\n    },\n    siteRoadmap() {\n        return '/roadmap';\n    },\n    siteTokenMigration() {\n        return '/token-migration';\n    },\n    stream(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}`, options);\n    },\n    streamConnect(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/connect`, options);\n    },\n    streamLiveData(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/live-data`, options);\n    },\n    streamOverview(id, options) {\n        return withSuffix(`/hub/streams/${encode(id)}/overview`, options);\n    },\n    streams(options) {\n        return withSuffix(`/hub/streams`, options);\n    },\n    sponsorship(id, options) {\n        return withSuffix(`/hub/network/sponsorships/${encode(id)}`, options);\n    },\n    sponsorships(options) {\n        return withSuffix('/hub/network/sponsorships', options);\n    },\n    tos() {\n        return 'https://s3.amazonaws.com/streamr-public/streamr-terms-of-use.pdf';\n    },\n};\n","import React from 'react';\nimport { useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport LightModal from '~/modals/LightModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nexport const DisclaimerBar = () => {\n    const { pathname } = useLocation();\n    // Show disclaimer only for Overview, Sponsorships, Sponsorship, Operators, Operator pages\n    if (!pathname.includes(R.network())) {\n        return null;\n    }\n    return (React.createElement(Root, null,\n        React.createElement(SvgIcon, { name: \"infoBadge\" }),\n        React.createElement(\"div\", null,\n            \"Smart contracts enable sponsorship, staking, and delegation \\u2014 your capital is at risk.\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs('/guides/how-to-stake-and-earn'), target: \"_blank\", rel: \"noopener noreferrer\", onClick: async (e) => {\n                    e.preventDefault();\n                    try {\n                        await toaster(LightModal, Layer.Modal).pop({\n                            title: 'Disclaimer',\n                            children: (React.createElement(\"p\", null,\n                                \"Streamr\\u2019s operator, sponsorship, staking, and delegation smart contracts carry inherent risks. Do your own research and participate at your own risk \\u2014 funds may be irreversibly lost. Always stay cautious and never share your private key. There is no support desk, so beware of scammers pretending to offer help or asking you to use apps that could drain your wallet.\",\n                                ' ',\n                                React.createElement(\"a\", { href: R.docs('/guides/how-to-stake-and-earn'), target: \"_blank\", rel: \"noopener noreferrer\" }, \"Learn more\"),\n                                \".\")),\n                        });\n                    }\n                    catch (_) { }\n                } }, \"Learn more\"),\n            \".\")));\n};\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-xkkmn2\" }) `\n    display: grid;\n    grid-template-columns: auto auto;\n    width: 100%;\n    padding: 12px 72px 12px 40px;\n    align-items: center;\n    justify-content: left;\n    color: white;\n    background: #323232;\n    font-size: 14px;\n    font-weight: 400;\n    line-height: normal;\n\n    padding: 12px 72px 12px 24px;\n\n    @media (${TABLET}) {\n        padding: 12px 72px 12px 24px;\n    }\n\n    @media (${DESKTOP}) {\n        padding: 12px 72px 12px 40px;\n    }\n\n    // Make it stick to top\n    position: sticky;\n    top: 0;\n    z-index: 1000;\n\n    & > svg {\n        width: 16px;\n        height: 16px;\n        margin-right: 8px;\n        & circle {\n            fill: #525252;\n        }\n    }\n\n    & a {\n        color: inherit !important;\n        text-decoration: underline !important;\n    }\n`;\n","import { FooterColumn, SocialChannels, FooterColumns as UnstyledFooterColumns, Footer as UnstyledLayoutFooter, MadeBy as UnstyledMadeBy, } from '@streamr/streamr-layout';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst MadeBy = styled(UnstyledMadeBy).withConfig({ displayName: \"MadeBy\", componentId: \"sc-1i53sas\" }) `\n    padding: 0 0 32px;\n    text-align: center;\n\n    @media (min-width: 1200px) {\n        padding: 32px 0;\n        text-align: left;\n    }\n`;\nconst LayoutFooter = styled(UnstyledLayoutFooter).withConfig({ displayName: \"LayoutFooter\", componentId: \"sc-1vn5rs0\" }) `\n    background-color: ${COLORS.secondary};\n`;\nconst FooterColumns = styled(UnstyledFooterColumns).withConfig({ displayName: \"FooterColumns\", componentId: \"sc-16fbn9y\" }) `\n    border-top: ${({ separate = false }) => (separate ? '1px' : '0')} solid #d8d8d8;\n`;\nconst Footer = ({ topBorder = false }) => {\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(LayoutFooter, null,\n        React.createElement(FooterColumns, { separate: topBorder },\n            React.createElement(FooterColumn, { title: \"Discover\" },\n                React.createElement(\"a\", { href: R.root() }, \"Top\"),\n                React.createElement(\"a\", { href: R.siteDataToken() }, \"DATA Token\"),\n                React.createElement(\"a\", { href: R.siteDataUnions() }, \"Data Unions\"),\n                React.createElement(\"a\", { href: R.siteMarketplace() }, \"Marketplace\"),\n                React.createElement(\"a\", { href: R.siteNetwork() }, \"Network\")),\n            React.createElement(FooterColumn, { title: \"Project\" },\n                React.createElement(\"a\", { href: R.siteAbout() }, \"About\"),\n                React.createElement(\"a\", { href: R.siteRoadmap() }, \"Roadmap\"),\n                React.createElement(\"a\", { href: R.siteEcosystem() }, \"Ecosystem\"),\n                React.createElement(\"a\", { href: R.sitePapers() }, \"Papers\"),\n                React.createElement(\"a\", { href: R.blog() }, \"Blog\")),\n            React.createElement(FooterColumn, { title: \"Developers\" },\n                React.createElement(\"a\", { href: R.docs() }, \"Docs\"),\n                React.createElement(\"a\", { href: R.siteFund() }, \"Data Fund\"),\n                React.createElement(\"a\", { href: R.siteDesign() }, \"Design Assets\")),\n            React.createElement(FooterColumn, { title: \"Apps\" },\n                React.createElement(\"a\", { href: R.networkExplorer() }, \"Network Explorer\"),\n                React.createElement(\"a\", { href: R.hub(routeOptions(chainKey)) }, \"Hub\")),\n            React.createElement(FooterColumn, { title: \"Contact\" },\n                React.createElement(\"a\", { href: R.contactGeneral() }, \"General\"),\n                React.createElement(\"a\", { href: R.contactMedia() }, \"Media\"),\n                React.createElement(\"a\", { href: R.contactJobs() }, \"Jobs\"),\n                React.createElement(\"a\", { href: R.contactLabs() }, \"Business\")),\n            React.createElement(FooterColumn, { title: \"Legal\" },\n                React.createElement(\"a\", { href: R.tos() }, \"Terms & Conditions\"),\n                React.createElement(\"a\", { href: R.privacyPolicy() }, \"Privacy\"))),\n        React.createElement(SocialChannels, null),\n        React.createElement(MadeBy, null)));\n};\nexport default Footer;\n","import React from 'react';\nimport { Helmet as ReactHelmet } from 'react-helmet';\nconst PosterUrl = 'https://streamr.network/resources/social/marketplace.png';\nexport default function Helmet({ description = 'Discover, create and consume data streams on the Streamr Hub', title, otherTags, ...props }) {\n    return (React.createElement(ReactHelmet, { ...props, title: [title, 'Streamr Hub'].filter(Boolean).join(' | ') },\n        React.createElement(\"meta\", { name: \"description\", content: description }),\n        React.createElement(\"meta\", { property: \"og:title\", content: title }),\n        React.createElement(\"meta\", { property: \"og:description\", content: description }),\n        React.createElement(\"meta\", { property: \"og:image\", content: PosterUrl }),\n        React.createElement(\"meta\", { name: \"twitter:card\", content: \"summary_large_image\" }),\n        React.createElement(\"meta\", { name: \"twitter:title\", content: title }),\n        React.createElement(\"meta\", { name: \"twitter:description\", content: description }),\n        React.createElement(\"meta\", { name: \"twitter:image\", content: PosterUrl }),\n        otherTags));\n}\nexport function NetworkHelmet({ description = 'Operate your Streamr nodes. Create, join and delegate to stream Sponsorships.', otherTags = React.createElement(\"meta\", { name: \"robots\", content: \"noindex\" }), ...props }) {\n    return React.createElement(Helmet, { ...props, description: description, otherTags: otherTags });\n}\n","import React, { useRef, useSyncExternalStore } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled from 'styled-components';\n/**\n * Mounts given function component inside `#hub-anchors` (see `index.html`) and passes\n * wrapped element's coordinates to it.\n */\nexport function Anchor({ indicateOrigin = false, translate, component: Component, componentProps, children, display, ...props }) {\n    const ref = useRef(null);\n    const [x, y] = useBoundingClientRect(ref, (rect) => translate?.(rect) || [0, 0]);\n    return (React.createElement(Root, { ...props, ref: ref, \"$display\": display },\n        children,\n        createPortal(React.createElement(Component, { x: x, y: y, ...componentProps }), document.getElementById('hub-anchors')),\n        indicateOrigin &&\n            createPortal(React.createElement(OriginIndicator, { x: x, y: y }), document.getElementById('hub-anchors'))));\n}\nfunction resizeSubscribe(cb) {\n    window.addEventListener('resize', cb);\n    window.addEventListener('scroll', cb);\n    return () => {\n        window.removeEventListener('resize', cb);\n        window.removeEventListener('scroll', cb);\n    };\n}\nfunction OriginIndicator({ x, y }) {\n    return (React.createElement(Point, { style: {\n            transform: `translate(-50%, -50%) translate(${x}px, ${y}px)`,\n        } }));\n}\nconst Point = styled.div.withConfig({ displayName: \"Point\", componentId: \"sc-192pfex\" }) `\n    background: red;\n    border-radius: 50%;\n    height: 10px;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 10px;\n    z-index: 19999;\n`;\nexport function useBoundingClientRect(ref, translate) {\n    return JSON.parse(useSyncExternalStore(resizeSubscribe, () => JSON.stringify(translate(ref.current?.getBoundingClientRect()))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y9ehtf\" }) `\n    display: ${({ $display }) => $display};\n`;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useBoundingClientRect } from './Anchor';\nexport function SimpleDropdown({ children, detached = false, disabled = false, menu, menuWrapComponent: MenuWrap = SimpleDropdownMenu, onToggle, align = 'left', ...props }) {\n    const [isOpen, setIsOpen] = useState(false);\n    const toggle = useCallback((value) => {\n        if (disabled) {\n            return;\n        }\n        setIsOpen(value);\n    }, [disabled]);\n    const rootRef = useRef(null);\n    const menuRef = useRef(null);\n    useEffect(() => {\n        function onMouseDown({ target }) {\n            if (!(target instanceof HTMLElement)) {\n                return;\n            }\n            if (rootRef.current?.contains(target) || menuRef.current?.contains(target)) {\n                return;\n            }\n            setIsOpen(false);\n        }\n        document.addEventListener('mousedown', onMouseDown);\n        return () => {\n            document.removeEventListener('mousedown', onMouseDown);\n        };\n    }, []);\n    const onToggleRef = useRef(onToggle);\n    if (onToggleRef.current !== onToggle) {\n        onToggleRef.current = onToggle;\n    }\n    useEffect(() => {\n        onToggleRef.current?.(isOpen);\n    }, [isOpen]);\n    useEffect(() => {\n        if (!isOpen) {\n            return;\n        }\n        function onKeyDown(e) {\n            if (e.key === 'Escape') {\n                e.stopPropagation();\n                e.preventDefault();\n                setIsOpen(false);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [isOpen]);\n    useEffect(() => {\n        if (disabled) {\n            setIsOpen(false);\n        }\n    }, [disabled]);\n    useEffect(() => {\n        if (!isOpen) {\n            return;\n        }\n        function onFocus(e) {\n            if (!rootRef.current?.contains(e.target) &&\n                !menuRef.current?.contains(e.target)) {\n                setIsOpen(false);\n            }\n        }\n        document.body.addEventListener('focus', onFocus, true);\n        return () => {\n            document.body.removeEventListener('focus', onFocus, true);\n        };\n    }, [isOpen]);\n    const posRef = useRef(null);\n    const [x, y] = useBoundingClientRect(posRef, (r) => [\n        r?.x || 0,\n        (r?.y || 0) + window.scrollY,\n    ]);\n    const [dx, maxWidth] = useBoundingClientRect(menuRef, (rect) => {\n        const { clientWidth } = document.documentElement;\n        const maxWidth = clientWidth - 8;\n        if (!rect) {\n            return [0, maxWidth];\n        }\n        if (align === 'left') {\n            return [Math.min(0, clientWidth - x - Math.round(rect.width) - 4), maxWidth];\n        }\n        const myWidth = rootRef.current?.clientWidth ?? 0;\n        return [-Math.round(rect.width) + myWidth - 4, maxWidth];\n    });\n    return (React.createElement(SimpleDropdownRoot, { ref: rootRef, \"$disabled\": disabled, ...props },\n        typeof children === 'function' ? children(toggle, isOpen) : children,\n        React.createElement(\"div\", { ref: posRef }),\n        detached ? (createPortal(React.createElement(MenuWrap, { \"$visible\": isOpen, ref: menuRef, style: {\n                transform: `translateX(${dx}px)`,\n                maxWidth,\n                top: `${y}px`,\n                left: `${x}px`,\n            } }, typeof menu === 'function' ? menu(setIsOpen, isOpen) : menu), document.getElementById('hub-anchors'))) : (React.createElement(MenuWrap, { \"$visible\": isOpen, ref: menuRef, style: {\n                transform: `translateX(${dx}px)`,\n                maxWidth,\n            } }, typeof menu === 'function' ? menu(setIsOpen, isOpen) : menu))));\n}\nconst SimpleDropdownRoot = styled.div.withConfig({ displayName: \"SimpleDropdownRoot\", componentId: \"sc-1adbh4g\" }) `\n    position: relative;\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.5;\n        `}\n`;\nexport const SimpleDropdownMenu = styled.div.withConfig({ displayName: \"SimpleDropdownMenu\", componentId: \"sc-1lgrp07\" }) `\n    min-height: 16px;\n    min-width: 16px;\n    opacity: 0;\n    pointer-events: none;\n    position: absolute;\n    transition: 250ms;\n    transition-delay: 250ms, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n    z-index: 1000;\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            visibility: visible;\n            transition-delay: 0s;\n        `}\n`;\nexport const SimpleListDropdownMenu = styled.div.withConfig({ displayName: \"SimpleListDropdownMenu\", componentId: \"sc-1c82mdd\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    color: ${COLORS.primary};\n    margin-top: 8px;\n    min-height: 16px;\n    padding: 8px 0;\n\n    p {\n        font-size: 14px;\n        line-height: 20px;\n        margin: 0;\n    }\n\n    p + p {\n        margin-top: 8px;\n    }\n\n    ul {\n        list-style: none;\n        padding: 0;\n        margin: 0;\n    }\n`;\nexport const DefaultSimpleDropdownMenu = styled(SimpleListDropdownMenu).withConfig({ displayName: \"DefaultSimpleDropdownMenu\", componentId: \"sc-rfv0n8\" }) `\n    padding: 20px 16px;\n    max-width: 100%;\n    width: 460px;\n`;\n","import { z } from 'zod';\nimport config from '~/config/environments.toml';\nimport { defaultChainKey } from '~/consts';\nimport { getChainConfig } from '~/utils/chains';\nconst EnvironmentConfig = z\n    .object({\n    availableChains: z.array(z.string()).min(1),\n    defaultChain: z.string().optional(),\n    platformOriginUrl: z.string().optional().default('https://streamr.network'),\n    streamrUrl: z.string().optional().default('https://streamr.network'),\n})\n    .refine(({ defaultChain, availableChains }) => !defaultChain || availableChains.includes(defaultChain), 'Default chain is not listed in the collection of available chains')\n    .transform(({ availableChains, defaultChain, ...rest }) => {\n    const availableChainConfigs = availableChains.map(getChainConfig);\n    const defaultChainConfig = defaultChain\n        ? getChainConfig(defaultChain)\n        : availableChainConfigs[0];\n    return {\n        ...rest,\n        availableChains: availableChainConfigs,\n        defaultChain: defaultChainConfig,\n    };\n});\nconst fallbackEnvironmentConfig = EnvironmentConfig.parse({\n    availableChains: [defaultChainKey],\n});\nconst parsedConfig = z\n    .record(z.string(), z.union([EnvironmentConfig, z.undefined()]))\n    .parse(config);\nconst { NODE_ENV: actualEnvironment = 'production' } = process.env;\nexport function getEnvironmentConfig() {\n    const env = process.env.HUB_CONFIG_ENV ||\n        (actualEnvironment === 'test' ? 'development' : actualEnvironment);\n    const environmentConfig = parsedConfig[env];\n    if (!environmentConfig) {\n        return fallbackEnvironmentConfig;\n    }\n    return environmentConfig;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport ethereumIcon from './assets/ethereum.svg';\nimport xDaiIcon from './assets/xdai.svg';\nimport polygonIcon from './assets/polygon.svg';\nimport bscIcon from './assets/bsc.svg';\nimport unknownIcon from './assets/unknown.svg';\nconst icons = {\n    '1': ethereumIcon,\n    '100': xDaiIcon,\n    '137': polygonIcon,\n    '56': bscIcon,\n    '8995': ethereumIcon,\n    '8997': xDaiIcon,\n    '80002': polygonIcon,\n};\nconst UnstyledNetworkIcon = ({ chainId, className, emptyIcon, alt = '', }) => (React.createElement(\"div\", { className: className },\n    React.createElement(\"img\", { src: icons[String(chainId)] || emptyIcon || unknownIcon, alt: alt })));\nconst NetworkIcon = styled(UnstyledNetworkIcon).withConfig({ displayName: \"NetworkIcon\", componentId: \"sc-n5z9vr\" }) `\n    img {\n        width: 100%;\n        display: flex;\n        align-items: center;\n    }\n`;\nexport default NetworkIcon;\n","export class DraftValidationError extends Error {\n    constructor(key, message) {\n        super(message);\n        this.key = key;\n        this.message = message;\n        this.name = 'DraftValidationError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, DraftValidationError);\n        }\n        Object.setPrototypeOf(this, DraftValidationError.prototype);\n    }\n}\nexport class ValidationError extends Error {\n    constructor(messages) {\n        super(messages.join(', '));\n        this.messages = messages;\n        this.name = 'ValidationError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, ValidationError);\n        }\n        Object.setPrototypeOf(this, ValidationError.prototype);\n    }\n}\nexport class ParseError extends Error {\n    constructor(entity, error) {\n        super('Failed to parse');\n        this.entity = entity;\n        this.error = error;\n        this.name = 'ParseError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, ParseError);\n        }\n        Object.setPrototypeOf(this, ParseError.prototype);\n    }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [],\n        name: \"Halted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"previousOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"OwnershipTransferred\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"ProjectPurchased\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [],\n        name: \"Resumed\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"uint256\",\n                name: \"newTxFee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"TxFeeChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"mailboxAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addMailbox\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"remoteChainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"remoteMarketplaceAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addRemoteMarketplace\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buy\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"buyFor\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"chainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"claimOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"originDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"getPurchaseInfo\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"getSubscriptionInfo\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"halt\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"halted\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_origin\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"bytes32\",\n                name: \"_sender\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"_message\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"handle\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_projectRegistry\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"_chainId\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"mailbox\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"owner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"pendingOwner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"remoteMarketplaces\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"renounceOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"resume\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"newTxFee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"setTxFee\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"txFee\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b5060805161263661004c60003960008181610873015281816108b3015281816109d601528181610a160152610aa501526126366000f3fe60806040526004361061019c5760003560e01c80635ed7ca5b116100ec578063b9b8af0b1161008a578063d5438eae11610064578063d5438eae146104f3578063e30c397814610513578063f05d16f714610533578063f2fde38b1461055357600080fd5b8063b9b8af0b1461049c578063c5e4c9f9146104bd578063cf820461146104dd57600080fd5b80638da5cb5b116100c65780638da5cb5b146103e8578063940083f6146104065780639a8a059214610443578063a4c0ed361461047c57600080fd5b80635ed7ca5b1461038857806360d68d4e1461039d578063715018a6146103d357600080fd5b80634e71e0c81161015957806356d5d4751161013357806356d5d475146102a8578063572b6c05146102c85780635a33d8dc146102f85780635b1a21061461033057600080fd5b80634e71e0c8146102585780634f1ef2861461026d57806352d1902d1461028057600080fd5b806303987512146101a1578063046f7da2146101c35780630676d52f146101d85780630ddeb632146101f85780632eb62c8a146102185780633659cfe614610238575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611f5c565b610573565b005b3480156101cf57600080fd5b506101c1610733565b3480156101e457600080fd5b506101c16101f3366004611fae565b610773565b34801561020457600080fd5b506101c1610213366004611fe5565b6107b1565b34801561022457600080fd5b506101c1610233366004612007565b61083f565b34801561024457600080fd5b506101c1610253366004612007565b610869565b34801561026457600080fd5b506101c1610948565b6101c161027b36600461203a565b6109cc565b34801561028c57600080fd5b50610295610a98565b6040519081526020015b60405180910390f35b3480156102b457600080fd5b506101c16102c3366004612147565b610b4b565b3480156102d457600080fd5b506102e86102e3366004612007565b610cab565b604051901515815260200161029f565b34801561030457600080fd5b5060cb54610318906001600160a01b031681565b6040516001600160a01b03909116815260200161029f565b34801561033c57600080fd5b5061035061034b3660046121a1565b610d3a565b604080516001600160a01b039788168152969095166020870152938501929092526060840152608083015260a082015260c00161029f565b34801561039457600080fd5b506101c1610e24565b3480156103a957600080fd5b506103186103b83660046121de565b60cd602052600090815260409020546001600160a01b031681565b3480156103df57600080fd5b506101c1610e6a565b3480156103f457600080fd5b506033546001600160a01b0316610318565b34801561041257600080fd5b506104266104213660046121f9565b610e74565b60408051931515845260208401929092529082015260600161029f565b34801561044f57600080fd5b5060cb5461046790600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161029f565b34801561048857600080fd5b506101c1610497366004612231565b610f01565b3480156104a857600080fd5b5060ca546102e890600160a01b900460ff1681565b3480156104c957600080fd5b506101c16104d8366004612252565b6110d1565b3480156104e957600080fd5b5061029560c95481565b3480156104ff57600080fd5b5060cc54610318906001600160a01b031681565b34801561051f57600080fd5b5060ca54610318906001600160a01b031681565b34801561053f57600080fd5b506101c161054e366004612287565b611223565b34801561055f57600080fd5b506101c161056e366004612007565b6112ab565b60ca54600160a01b900460ff1615806105b5575061058f61133a565b6001600160a01b03166105aa6033546001600160a01b031690565b6001600160a01b0316145b6105f55760405162461bcd60e51b815260206004820152600c60248201526b195c9c9bdc97da185b1d195960a21b60448201526064015b60405180910390fd5b60cb54604051630e14293760e01b8152600481018590526001600160a01b03838116602483015290911690630e14293790604401602060405180830381865afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a91906122b0565b6106b65760405162461bcd60e51b815260206004820152601860248201527f6572726f725f756e61626c65546f42757950726f6a656374000000000000000060448201526064016105ec565b60cb54604051631f4e09af60e01b815260048101859052602481018490526001600160a01b03838116604483015290911690631f4e09af90606401600060405180830381600087803b15801561070b57600080fd5b505af115801561071f573d6000803e3d6000fd5b5050505061072e83838361135c565b505050565b61073b611959565b60ca805460ff60a01b191690556040517f62451d457bc659158be6e6247f56ec1df424a5c7597f71c20c2bc44e0965c8f990600090a1565b61077b611959565b63ffffffff91909116600090815260cd6020526040902080546001600160a01b0319166001600160a01b03909216919091179055565b60ca54600160a01b900460ff1615806107f357506107cd61133a565b6001600160a01b03166107e86033546001600160a01b031690565b6001600160a01b0316145b61082e5760405162461bcd60e51b815260206004820152600c60248201526b195c9c9bdc97da185b1d195960a21b60448201526064016105ec565b61083b82826101bc61133a565b5050565b610847611959565b60cc80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036108b15760405162461bcd60e51b81526004016105ec906122cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166108fa6000805160206125ba833981519152546001600160a01b031690565b6001600160a01b0316146109205760405162461bcd60e51b81526004016105ec90612317565b610929816119d2565b60408051600080825260208201909252610945918391906119da565b50565b60ca546001600160a01b031661095c61133a565b6001600160a01b0316146109a55760405162461bcd60e51b815260206004820152601060248201526f37b7363ca832b73234b733a7bbb732b960811b60448201526064016105ec565b60ca546109ba906001600160a01b0316611b45565b60ca80546001600160a01b0319169055565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610a145760405162461bcd60e51b81526004016105ec906122cb565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610a5d6000805160206125ba833981519152546001600160a01b031690565b6001600160a01b031614610a835760405162461bcd60e51b81526004016105ec90612317565b610a8c826119d2565b61083b828260016119da565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b385760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016105ec565b506000805160206125ba83398151915290565b60cc54849084906001600160a01b03163314610ba95760405162461bcd60e51b815260206004820152601960248201527f6572726f725f6e6f7448797065726c616e654d61696c626f780000000000000060448201526064016105ec565b63ffffffff8216600090815260cd60205260409020546001600160a01b03808316911614610c195760405162461bcd60e51b815260206004820152601a60248201527f6572726f725f6e6f7452656d6f74654d61726b6574706c61636500000000000060448201526064016105ec565b60008080610c29868801886121f9565b60cb54604051631f4e09af60e01b815260048101859052602481018390526001600160a01b0380851660448301529497509295509093509190911690631f4e09af90606401600060405180830381600087803b158015610c8857600080fd5b505af1158015610c9c573d6000803e3d6000fd5b50505050505050505050505050565b60cb546000906001600160a01b0316610cc657506000919050565b60cb5460405163572b6c0560e01b81526001600160a01b0384811660048301529091169063572b6c0590602401602060405180830381865afa158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3491906122b0565b92915050565b60cb54604051630abfe91960e21b81526004810186905263ffffffff841660248201526000918291829182918291829182918291829182916001600160a01b0390911690632affa46490604401608060405180830381865afa158015610da4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc89190612363565b93509350935093506000828e610dde91906123c1565b9050848482670de0b6b3a76400008460c954610dfa91906123c1565b610e0491906123e0565b8f869a509a509a509a509a509a5050505050509499939850945094509450565b610e2c611959565b60ca805460ff60a01b1916600160a01b1790556040517f1ee9080f6b55ca44ce58681c8162e6c1ac1c47e1da791a4a1c1ec6186d8af1f390600090a1565b610e72611959565b565b60cb546040516317ca32dd60e21b8152600481018590526001600160a01b0384811660248301526000928392839283928392911690635f28cb74906044016040805180830381865afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190612402565b90999098509596505050505050565b60208114610f465760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b60448201526064016105ec565b60cb54604051630abfe91960e21b8152833560048201819052600160a01b830463ffffffff1660248301529160009182916001600160a01b031690632affa46490604401608060405180830381865afa158015610fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fcb9190612363565b509250925050816001600160a01b0316610fe361133a565b6001600160a01b0316146110395760405162461bcd60e51b815260206004820152601760248201527f6572726f725f77726f6e6750726963696e67546f6b656e00000000000000000060448201526064016105ec565b6000670de0b6b3a764000061104e83896123e0565b61105891906123e0565b60cb54604051631f4e09af60e01b815260048101879052602481018390526001600160a01b038b81166044830152929350911690631f4e09af90606401600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b505050505050505050505050565b600054610100900460ff16158080156110f15750600054600160ff909116105b8061110b5750303b15801561110b575060005460ff166001145b61116e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105ec565b6000805460ff191660011790558015611191576000805461ff0019166101001790555b611199611b97565b6111a1611bc6565b60ca805460ff60a01b1916905560cb805463ffffffff8416600160a01b026001600160c01b03199091166001600160a01b03861617179055801561072e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b61122b611959565b670de0b6b3a76400008111156112785760405162461bcd60e51b81526020600482015260126024820152716572726f725f696e76616c6964547846656560701b60448201526064016105ec565b60c981905560405181907f3115e922830fe4bd99b46316ef2a8939b665b45d008bc585fb784f754abf038b90600090a250565b6112b3611959565b6001600160a01b0381166113185760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ec565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b600061134533610cab565b15611357575060131936013560601c90565b503390565b60cb54604051630abfe91960e21b815260048101859052600160a01b820463ffffffff166024820152600091829182916001600160a01b031690632affa46490604401608060405180830381865afa1580156113bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e09190612363565b509250925092506000811161144b5760405162461bcd60e51b815260206004820152602b60248201527f6572726f725f6672656550726f6a656374734e6f74537570706f727465644f6e60448201526a4d61726b6574706c61636560a81b60648201526084016105ec565b600061145782876123c1565b90506000670de0b6b3a76400008260c95461147291906123c1565b61147c91906123e0565b9050836001600160a01b0381166323b872dd61149661133a565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018690526064016020604051808303816000875af11580156114e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150d91906122b0565b6115295760405162461bcd60e51b81526004016105ec9061242e565b60cb546040516317ca32dd60e21b8152600481018b90526001600160a01b0389811660248301526000921690635f28cb74906044016040805180830381865afa15801561157a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159e9190612402565b9150506001600160a01b038216634000aea0886115bb868861245b565b8d8c868a8a6040516020016115d4959493929190612472565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611601939291906124ff565b6020604051808303816000875af192505050801561163c575060408051601f3d908101601f19168201909252611639918101906122b0565b60015b6116ea576001600160a01b03821663a9059cbb8861165a868861245b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156116a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c991906122b0565b6116e55760405162461bcd60e51b81526004016105ec9061242e565b611739565b806117375760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f7472616e73666572416e6443616c6c50726f6a6563740000000060448201526064016105ec565b505b82156118e857816001600160a01b0316634000aea06117606033546001600160a01b031690565b858d8c868a8a60405160200161177a959493929190612472565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016117a7939291906124ff565b6020604051808303816000875af19250505080156117e2575060408051601f3d908101601f191682019092526117df918101906122b0565b60015b61189957816001600160a01b031663a9059cbb6118076033546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303816000875af1158015611854573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187891906122b0565b6118945760405162461bcd60e51b81526004016105ec9061242e565b6118e8565b806118e65760405162461bcd60e51b815260206004820152601860248201527f6572726f725f7472616e73666572416e6443616c6c466565000000000000000060448201526064016105ec565b505b6118f6878b8a848888611bed565b604080518b81526001600160a01b038a1660208201529081018a905260608101859052608081018490527fa7be1aeb0b9a4d9bea919fec8883707f0d3d2cb1d3dce9f54d98ab22fbddc7c59060a00160405180910390a150505050505050505050565b61196161133a565b6001600160a01b031661197c6033546001600160a01b031690565b6001600160a01b031614610e725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ec565b610945611959565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a0d5761072e83611ccb565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a67575060408051601f3d908101601f19168201909252611a6491810190612526565b60015b611aca5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016105ec565b6000805160206125ba8339815191528114611b395760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016105ec565b5061072e838383611d67565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611bbe5760405162461bcd60e51b81526004016105ec9061253f565b610e72611d92565b600054610100900460ff16610e725760405162461bcd60e51b81526004016105ec9061253f565b853b8015611cc2576040516301290e7360e61b8152600481018790526001600160a01b038681166024830152604482018690526064820185905260848201849052881690634a439cc09060a4016020604051808303816000875af1925050508015611c75575060408051601f3d908101601f19168201909252611c72918101906122b0565b60015b15611cc25780611cc05760405162461bcd60e51b815260206004820152601660248201527532b93937b92fb932b532b1ba32b2213ca9b2b63632b960511b60448201526064016105ec565b505b50505050505050565b6001600160a01b0381163b611d385760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016105ec565b6000805160206125ba83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611d7083611dc9565b600082511180611d7d5750805b1561072e57611d8c8383611e09565b50505050565b600054610100900460ff16611db95760405162461bcd60e51b81526004016105ec9061253f565b610e72611dc461133a565b611b45565b611dd281611ccb565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b611e715760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016105ec565b600080846001600160a01b031684604051611e8c919061258a565b600060405180830381855af49150503d8060008114611ec7576040519150601f19603f3d011682016040523d82523d6000602084013e611ecc565b606091505b5091509150611ef482826040518060600160405280602781526020016125da60279139611efd565b95945050505050565b60608315611f0c575081611f16565b611f168383611f1d565b9392505050565b815115611f2d5781518083602001fd5b8060405162461bcd60e51b81526004016105ec91906125a6565b6001600160a01b038116811461094557600080fd5b600080600060608486031215611f7157600080fd5b83359250602084013591506040840135611f8a81611f47565b809150509250925092565b803563ffffffff81168114611fa957600080fd5b919050565b60008060408385031215611fc157600080fd5b611fca83611f95565b91506020830135611fda81611f47565b809150509250929050565b60008060408385031215611ff857600080fd5b50508035926020909101359150565b60006020828403121561201957600080fd5b8135611f1681611f47565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561204d57600080fd5b823561205881611f47565b9150602083013567ffffffffffffffff8082111561207557600080fd5b818501915085601f83011261208957600080fd5b81358181111561209b5761209b612024565b604051601f8201601f19908116603f011681019083821181831017156120c3576120c3612024565b816040528281528860208487010111156120dc57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008083601f84011261211057600080fd5b50813567ffffffffffffffff81111561212857600080fd5b60208301915083602082850101111561214057600080fd5b9250929050565b6000806000806060858703121561215d57600080fd5b61216685611f95565b935060208501359250604085013567ffffffffffffffff81111561218957600080fd5b612195878288016120fe565b95989497509550505050565b600080600080608085870312156121b757600080fd5b84359350602085013592506121ce60408601611f95565b9396929550929360600135925050565b6000602082840312156121f057600080fd5b611f1682611f95565b60008060006060848603121561220e57600080fd5b83359250602084013561222081611f47565b929592945050506040919091013590565b6000806000806060858703121561224757600080fd5b843561216681611f47565b6000806040838503121561226557600080fd5b823561227081611f47565b915061227e60208401611f95565b90509250929050565b60006020828403121561229957600080fd5b5035919050565b80518015158114611fa957600080fd5b6000602082840312156122c257600080fd5b611f16826122a0565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000806000806080858703121561237957600080fd5b845161238481611f47565b602086015190945061239581611f47565b6040860151606090960151949790965092505050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156123db576123db6123ab565b500290565b6000826123fd57634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561241557600080fd5b61241e836122a0565b9150602083015190509250929050565b602080825260139082015272195c9c9bdc97dc185e5b595b9d11985a5b1959606a1b604082015260600190565b60008282101561246d5761246d6123ab565b500390565b94855260609390931b6bffffffffffffffffffffffff1916602085015260348401919091526054830152607482015260940190565b60005b838110156124c25781810151838201526020016124aa565b83811115611d8c5750506000910152565b600081518084526124eb8160208601602086016124a7565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000611ef460608301846124d3565b60006020828403121561253857600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161259c8184602087016124a7565b9190910192915050565b602081526000611f1660208301846124d356fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212203aab32c78b799d512b138c18986919e4f1acd4bd9332de70c3b265d451dee18664736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class MarketplaceV4__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nMarketplaceV4__factory.bytecode = _bytecode;\nMarketplaceV4__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"previousOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"OwnershipTransferred\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"ProjectPurchasedFromRemote\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_destinationDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_recipientContractAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"addRecipient\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buy\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"buyFor\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"destinationDomainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"gasPaymaster\",\n        outputs: [\n            {\n                internalType: \"contract IInterchainGasPaymaster\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"streamsCount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"handlePurchaseInfo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subEndTimestamp\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"purchaseId\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"handleSubscriptionState\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint32\",\n                name: \"_originDomainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_queryRouter\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_mailboxAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_gasPaymaster\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"mailbox\",\n        outputs: [\n            {\n                internalType: \"contract IMailbox\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"originDomainId\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"owner\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"purchaseCount\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"purchases\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"buyer\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"requestTimestamp\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"price\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"fee\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"queryRouter\",\n        outputs: [\n            {\n                internalType: \"contract IInterchainQueryRouter\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"recipientAddress\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"renounceOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newOwner\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferOwnership\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"withdraw\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        stateMutability: \"payable\",\n        type: \"receive\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b5060805161257c61004c6000396000818161064501528181610685015281816107240152818161076401526107f3015261257c6000f3fe60806040526004361061012e5760003560e01c80638392fe31116100ab578063d5438eae1161006f578063d5438eae146103e1578063e1489d5314610401578063ebda2bd814610421578063f2fde38b14610441578063f8f60eec14610461578063fb6bf74c1461048157600080fd5b80638392fe31146102815780638d1014fd1461034d5780638da5cb5b1461036d578063be0d61ed1461038b578063c1c16a6d146103c457600080fd5b80634f1ef286116100f25780634f1ef286146101e557806352d1902d146101f85780635aff59991461020d578063715018a61461024c578063805ef6e81461026157600080fd5b8063039875121461013a5780630ddeb6321461015c5780632b85ed9c1461017c5780632e1a7d4d146101a55780633659cfe6146101c557600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611f65565b6104a1565b005b34801561016857600080fd5b5061015a610177366004611f9a565b6105a2565b34801561018857600080fd5b5061019260c95481565b6040519081526020015b60405180910390f35b3480156101b157600080fd5b5061015a6101c0366004611fbc565b6105b1565b3480156101d157600080fd5b5061015a6101e0366004611fd5565b61063b565b61015a6101f3366004612006565b61071a565b34801561020457600080fd5b506101926107e6565b34801561021957600080fd5b5060cb5461023490600160401b90046001600160a01b031681565b6040516001600160a01b03909116815260200161019c565b34801561025857600080fd5b5061015a610899565b34801561026d57600080fd5b5060ce54610234906001600160a01b031681565b34801561028d57600080fd5b506102f761029c366004611fbc565b60ca6020526000908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460089098015496976001600160a01b0396871697958716969485169594909316939192909189565b60408051998a526001600160a01b0398891660208b015296881696890196909652938616606088015294909116608086015260a085015260c084019290925260e08301919091526101008201526101200161019c565b34801561035957600080fd5b5061015a6103683660046120c8565b6108ad565b34801561037957600080fd5b506033546001600160a01b0316610234565b34801561039757600080fd5b5060cb546103af90600160201b900463ffffffff1681565b60405163ffffffff909116815260200161019c565b3480156103d057600080fd5b5060cb546103af9063ffffffff1681565b3480156103ed57600080fd5b5060cc54610234906001600160a01b031681565b34801561040d57600080fd5b5061015a61041c36600461212b565b610c70565b34801561042d57600080fd5b5060cd54610234906001600160a01b031681565b34801561044d57600080fd5b5061015a61045c366004611fd5565b611289565b34801561046d57600080fd5b5061015a61047c366004612174565b6112ff565b34801561048d57600080fd5b5061015a61049c3660046121a7565b61135b565b600060c9600081546104b290612211565b918290555060408051610120810182528681523360208083019182526001600160a01b038781168486019081526000606086018181526080870182815260a088018d81524260c08a0190815260e08a018581526101008b018681528d875260ca9099529a9094209851895596516001890180546001600160a01b031990811692881692909217905593516002890180548616918716919091179055905160038801805485169186169190911790555160048701805490931693169290921790559151600584015590516006830155915160078201559051600890910155905061059c8484836114cb565b50505050565b6105ad8282336104a1565b5050565b6105b96115fe565b4781111561060e5760405162461bcd60e51b815260206004820152601960248201527f6572726f725f696e73756666696369656e7442616c616e63650000000000000060448201526064015b60405180910390fd5b604051339082156108fc029083906000818181858888f193505050501580156105ad573d6000803e3d6000fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036106835760405162461bcd60e51b81526004016106059061222a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106cc600080516020612500833981519152546001600160a01b031690565b6001600160a01b0316146106f25760405162461bcd60e51b815260040161060590612276565b6106fb81611658565b6040805160008082526020820190925261071791839190611660565b50565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036107625760405162461bcd60e51b81526004016106059061222a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107ab600080516020612500833981519152546001600160a01b031690565b6001600160a01b0316146107d15760405162461bcd60e51b815260040161060590612276565b6107da82611658565b6105ad82826001611660565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108865760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610605565b5060008051602061250083398151915290565b6108a16115fe565b6108ab60006117d0565b565b60cd546001600160a01b031633146108ff5760405162461bcd60e51b815260206004820152601560248201527432b93937b92fb7b7363ca8bab2b93ca937baba32b960591b6044820152606401610605565b600060ca600084815260200190815260200160002060405180610120016040529081600082015481526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016002820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016003820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016004820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b0316815260200160058201548152602001600682015481526020016007820154815260200160088201548152505090508681606001906001600160a01b031690816001600160a01b0316815250508581608001906001600160a01b031690816001600160a01b031681525050848160e001818152505083816101000181815250508060ca60008581526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155905050600086905085816001600160a01b031663dd62ed3e8460200151306040518363ffffffff1660e01b8152600401610bac9291906001600160a01b0392831681529116602082015260400190565b602060405180830381865afa158015610bc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bed91906122c2565b1015610c3b5760405162461bcd60e51b815260206004820152601b60248201527f6572726f725f696e73756666696369656e74416c6c6f77616e636500000000006044820152606401610605565b610c53826000015183604001518460a0015186611822565b610c6682600001518360400151866118fe565b5050505050505050565b60cd546001600160a01b03163314610cc25760405162461bcd60e51b815260206004820152601560248201527432b93937b92fb7b7363ca8bab2b93ca937baba32b960591b6044820152606401610605565b600081815260ca60209081526040918290208251610120810184528154815260018201546001600160a01b03908116938201939093526002820154831693810193909352600381015482166060840152600481015490911660808301819052600582015460a0840152600682015460c0840152600782015460e0840152600890910154610100830152848015610d6b57508160a001518260c00151610d6791906122db565b8410155b1561122557602082015160e08301516040516323b872dd60e01b81526001600160a01b0392831660048201523060248201526044810191909152908216906323b872dd906064016020604051808303816000875af1158015610dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df591906122f3565b610e115760405162461bcd60e51b815260040161060590612310565b806001600160a01b0316634000aea083606001518461010001518560e00151610e3a919061233d565b855160408088015160e08901516101008a01519251610e5f94938d9291602001612354565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610e8c939291906123e1565b6020604051808303816000875af1925050508015610ec7575060408051601f3d908101601f19168201909252610ec4918101906122f3565b60015b610f8457806001600160a01b031663a9059cbb83606001518461010001518560e00151610ef4919061233d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6391906122f3565b610f7f5760405162461bcd60e51b815260040161060590612310565b610fd3565b80610fd15760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f7472616e73666572416e6443616c6c50726f6a656374000000006044820152606401610605565b505b6101008201511561119757806001600160a01b0316634000aea0610fff6033546001600160a01b031690565b610100850151855160408088015160e0890151915161102593928c918690602001612354565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611052939291906123e1565b6020604051808303816000875af192505050801561108d575060408051601f3d908101601f1916820190925261108a918101906122f3565b60015b61114857806001600160a01b031663a9059cbb6110b26033546001600160a01b031690565b6101008501516040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611103573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112791906122f3565b6111435760405162461bcd60e51b815260040161060590612310565b611197565b806111955760405162461bcd60e51b815260206004820152601860248201527f6572726f725f7472616e73666572416e6443616c6c46656500000000000000006044820152606401610605565b505b6111ba826060015183600001518460400151878660e00151876101000151611a1d565b815160408084015160a08086015160e087015161010088015185519687526001600160a01b03909416602087015293850152606084019290925260808301527f2d62582880564814e5c47b0e01616a4bc40d2c2be3cdd331ad10ce1655c0d399910160405180910390a15b5050600090815260ca602052604081208181556001810180546001600160a01b031990811690915560028201805482169055600382018054821690556004820180549091169055600581018290556006810182905560078101829055600801555050565b6112916115fe565b6001600160a01b0381166112f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610605565b610717816117d0565b6113076115fe565b60cb80546001600160a01b03909216600160401b0268010000000000000000600160e01b031963ffffffff909416600160201b0293909316640100000000600160e01b031990921691909117919091179055565b600054610100900460ff161580801561137b5750600054600160ff909116105b806113955750303b158015611395575060005460ff166001145b6113f85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610605565b6000805460ff19166001179055801561141b576000805461ff0019166101001790555b611423611af9565b61142b611b28565b60cb805463ffffffff191663ffffffff871617905560cd80546001600160a01b03199081166001600160a01b038781169190911790925560cc8054821686841617905560ce805490911691841691909117905580156114c4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60cd5460cb546040805180820182526001600160a01b03600160401b8404811682529151602481018890526044810187905263ffffffff80851660648301526084820187905260009593909316936395b1f3b393600160201b909104169190602082019060a40160408051601f19818403018152918152602080830180516001600160e01b0316632d8d108360e11b179052919092529051638d1014fd60e01b918101919091526024016040516020818303038152906040526040518463ffffffff1660e01b81526004016115a293929190612408565b6020604051808303816000875af11580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e591906122c2565b905060006115f1611b4f565b90506114c4828230611b67565b6033546001600160a01b031633146108ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610605565b6107176115fe565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156116985761169383611c78565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156116f2575060408051601f3d908101601f191682019092526116ef918101906122c2565b60015b6117555760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610605565b60008051602061250083398151915281146117c45760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610605565b50611693838383611d14565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cc5460cb5460408051602081018890526001600160a01b0387811682840152606080830188905283518084039091018152608083019384905263fa31de0160e01b90935260009481169363fa31de01936118999363ffffffff600160201b84041693600160401b90930490921691608401612460565b6020604051808303816000875af11580156118b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118dc91906122c2565b905060006118e983611d39565b90506118f6828230611b67565b505050505050565b60cd5460cb546040805180820182526001600160a01b03600160401b84048116825291516024810188905286831660448201526064810186905260009492909216926395b1f3b392600160201b90910463ffffffff169190602082019060840160408051601f19818403018152918152602080830180516001600160e01b0316634a0041fb60e11b17905291909252905163e1489d5360e01b918101919091526024016040516020818303038152906040526040518463ffffffff1660e01b81526004016119ce93929190612408565b6020604051808303816000875af11580156119ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1191906122c2565b905060006115f1611d89565b853b8015611af0576040516301290e7360e61b8152600481018790526001600160a01b038681166024830152604482018690526064820185905260848201849052881690634a439cc09060a4016020604051808303816000875af1925050508015611aa5575060408051601f3d908101601f19168201909252611aa2918101906122f3565b60015b15611af05780610c665760405162461bcd60e51b815260206004820152601660248201527532b93937b92fb932b532b1ba32b2213ca9b2b63632b960511b6044820152606401610605565b50505050505050565b600054610100900460ff16611b205760405162461bcd60e51b815260040161060590612485565b6108ab611d9b565b600054610100900460ff166108ab5760405162461bcd60e51b815260040161060590612485565b600061806d611b6162013880826122db565b92915050565b60ce5460cb5460405163a692979360e01b8152600160201b90910463ffffffff166004820152602481018490526000916001600160a01b03169063a692979390604401602060405180830381865afa158015611bc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611beb91906122c2565b60ce5460cb54604051630237e58360e31b815260048101889052600160201b90910463ffffffff166024820152604481018690526001600160a01b0385811660648301529293509116906311bf2c189083906084016000604051808303818588803b158015611c5957600080fd5b505af1158015611c6d573d6000803e3d6000fd5b505050505050505050565b6001600160a01b0381163b611ce55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610605565b60008051602061250083398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611d1d83611dcb565b600082511180611d2a5750805b156116935761059c8383611e0b565b600062010fcd6001839003611d5757611d5461dd61826122db565b90505b60015b83811015611d8257611d6e61aa82836122db565b915080611d7a81612211565b915050611d5a565b5092915050565b60006164a8611b6162013880826122db565b600054610100900460ff16611dc25760405162461bcd60e51b815260040161060590612485565b6108ab336117d0565b611dd481611c78565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b611e735760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610605565b600080846001600160a01b031684604051611e8e91906124d0565b600060405180830381855af49150503d8060008114611ec9576040519150601f19603f3d011682016040523d82523d6000602084013e611ece565b606091505b5091509150611ef6828260405180606001604052806027815260200161252060279139611eff565b95945050505050565b60608315611f0e575081611f18565b611f188383611f1f565b9392505050565b815115611f2f5781518083602001fd5b8060405162461bcd60e51b815260040161060591906124ec565b80356001600160a01b0381168114611f6057600080fd5b919050565b600080600060608486031215611f7a57600080fd5b8335925060208401359150611f9160408501611f49565b90509250925092565b60008060408385031215611fad57600080fd5b50508035926020909101359150565b600060208284031215611fce57600080fd5b5035919050565b600060208284031215611fe757600080fd5b611f1882611f49565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561201957600080fd5b61202283611f49565b9150602083013567ffffffffffffffff8082111561203f57600080fd5b818501915085601f83011261205357600080fd5b81358181111561206557612065611ff0565b604051601f8201601f19908116603f0116810190838211818310171561208d5761208d611ff0565b816040528281528860208487010111156120a657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060008060008060c087890312156120e157600080fd5b6120ea87611f49565b95506120f860208801611f49565b95989597505050506040840135936060810135936080820135935060a0909101359150565b801515811461071757600080fd5b60008060006060848603121561214057600080fd5b833561214b8161211d565b95602085013595506040909401359392505050565b803563ffffffff81168114611f6057600080fd5b6000806040838503121561218757600080fd5b61219083612160565b915061219e60208401611f49565b90509250929050565b600080600080608085870312156121bd57600080fd5b6121c685612160565b93506121d460208601611f49565b92506121e260408601611f49565b91506121f060608601611f49565b905092959194509250565b634e487b7160e01b600052601160045260246000fd5b600060018201612223576122236121fb565b5060010190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602082840312156122d457600080fd5b5051919050565b600082198211156122ee576122ee6121fb565b500190565b60006020828403121561230557600080fd5b8151611f188161211d565b602080825260139082015272195c9c9bdc97dc185e5b595b9d11985a5b1959606a1b604082015260600190565b60008282101561234f5761234f6121fb565b500390565b94855260609390931b6bffffffffffffffffffffffff1916602085015260348401919091526054830152607482015260940190565b60005b838110156123a457818101518382015260200161238c565b8381111561059c5750506000910152565b600081518084526123cd816020860160208601612389565b601f01601f19169290920160200192915050565b60018060a01b0384168152826020820152606060408201526000611ef660608301846123b5565b63ffffffff841681526060602082015260018060a01b038351166060820152600060208401516040608084015261244260a08401826123b5565b9050828103604084015261245681856123b5565b9695505050505050565b63ffffffff84168152826020820152606060408201526000611ef660608301846123b5565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516124e2818460208701612389565b9190910192915050565b602081526000611f1860208301846123b556fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122098c81cf791959d30c2bff569f1d3fd5b9e253b020c1172d777b5fc9b7a3998f064736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class RemoteMarketplaceV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nRemoteMarketplaceV1__factory.bytecode = _bytecode;\nRemoteMarketplaceV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_marketplace\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_projectRegistry\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"_uniswapRouter\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"_deployedOnDomainId\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"timeWindow\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"erc20Address\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buyWithERC20\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"timeWindow\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"buyWithETH\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"uint256\",\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"domainIds\",\n        outputs: [\n            {\n                internalType: \"uint32\",\n                name: \"\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"liquidityToken\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"marketplace\",\n        outputs: [\n            {\n                internalType: \"contract IMarketplaceV4\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"uniswapRouter\",\n        outputs: [\n            {\n                internalType: \"contract IUniswapV2Router02\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60806040523480156200001157600080fd5b5060405162001afb38038062001afb8339810160408190526200003491620000f5565b600080546001600160a01b031990811682556001805482166001600160a01b039788161781556002805483169688169690961790955560038054909116939095169290921790935560058054928301815590527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db06008820401805460079092166004026101000a63ffffffff8181021990931692909316929092021790556200015c565b80516001600160a01b0381168114620000f057600080fd5b919050565b600080600080608085870312156200010c57600080fd5b6200011785620000d8565b93506200012760208601620000d8565b92506200013760408601620000d8565b9150606085015163ffffffff811681146200015157600080fd5b939692955090935050565b61198f806200016c6000396000f3fe6080604052600436106100865760003560e01c80635a33d8dc116100595780635a33d8dc14610142578063735de9f7146101625780639030d0f714610182578063a4c0ed36146101a2578063abc8c7af146101c257600080fd5b80631b04c9571461008b57806343cd8f7e146100a057806356a5dd3c146100dd578063572b6c0514610112575b600080fd5b61009e610099366004611175565b6101e2565b005b3480156100ac57600080fd5b506004546100c0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100e957600080fd5b506100fd6100f83660046111a1565b610346565b60405163ffffffff90911681526020016100d4565b34801561011e57600080fd5b5061013261012d3660046111d2565b610380565b60405190151581526020016100d4565b34801561014e57600080fd5b506002546100c0906001600160a01b031681565b34801561016e57600080fd5b506003546100c0906001600160a01b031681565b34801561018e57600080fd5b5061009e61019d3660046111f6565b6103f5565b3480156101ae57600080fd5b5061009e6101bd36600461123f565b6106ec565b3480156101ce57600080fd5b506001546100c0906001600160a01b031681565b6000806101ee85610af1565b9150915060006101fc610c75565b9050826000036102b8573415610243576040516001600160a01b038216903480156108fc02916000818181858888f19350505050158015610241573d6000803e3d6000fd5b505b6001546040516301cc3a8960e11b815260048101889052602481018790526001600160a01b03838116604483015290911690630398751290606401600060405180830381600087803b15801561029857600080fd5b505af11580156102ac573d6000803e3d6000fd5b50505050505050505050565b61033e818787878734600360009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610314573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033891906112c8565b89610c84565b505050505050565b6005818154811061035657600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b60025460405163572b6c0560e01b81526001600160a01b038381166004830152600092169063572b6c0590602401602060405180830381865afa1580156103cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ef91906112e5565b92915050565b6001600160a01b0382166104495760405162461bcd60e51b81526020600482015260166024820152751d5cd948189d5e55da5d1a115512081a5b9cdd19585960521b60448201526064015b60405180910390fd5b60008061045587610af1565b915091506000610463610c75565b9050826000036104e2576001546040516301cc3a8960e11b8152600481018a9052602481018990526001600160a01b03838116604483015290911690630398751290606401600060405180830381600087803b1580156104c257600080fd5b505af11580156104d6573d6000803e3d6000fd5b505050505050506106e5565b6040516323b872dd60e01b81526001600160a01b038281166004830152306024830152604482018690528691908216906323b872dd906064016020604051808303816000875af115801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e91906112e5565b6105aa5760405162461bcd60e51b815260206004820152601f60248201527f6d7573742070726520617070726f766520746f6b656e207472616e73666572006044820152606401610440565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152600060248201529082169063095ea7b3906044016020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062191906112e5565b61063d5760405162461bcd60e51b815260040161044090611307565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529082169063095ea7b3906044016020604051808303816000875af1158015610690573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b491906112e5565b6106d05760405162461bcd60e51b815260040161044090611307565b6106e0828a8a8a888a8c8a610c84565b505050505b5050505050565b602081146107315760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b6044820152606401610440565b8135600061073d610c75565b60035460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291925082169063095ea7b3906044016020604051808303816000875af1158015610792573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b691906112e5565b6107d25760405162461bcd60e51b815260040161044090611307565b60035460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529082169063095ea7b3906044016020604051808303816000875af1158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084991906112e5565b6108655760405162461bcd60e51b815260040161044090611307565b60008061087184610af1565b915091506000610888610882610c75565b83610ff3565b6003549091506000906001600160a01b03166338ed17398a600185306108b14262015180611346565b6040518663ffffffff1660e01b81526004016108d19594939291906113a2565b6000604051808303816000875af11580156108f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109189190810190611472565b600183516109269190611508565b815181106109365761093661151f565b602090810291909101015160015460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291925084169063095ea7b3906044016020604051808303816000875af1158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba91906112e5565b6109d65760405162461bcd60e51b815260040161044090611307565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529084169063095ea7b3906044016020604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d91906112e5565b610a695760405162461bcd60e51b815260040161044090611307565b6000610a758583611535565b6001546040516301cc3a8960e11b8152600481018a9052602481018390526001600160a01b038e81166044830152929350911690630398751290606401600060405180830381600087803b158015610acc57600080fd5b505af1158015610ae0573d6000803e3d6000fd5b505050505050505050505050505050565b600254604051630e29a66960e21b81526004810183905260009182916001600160a01b03909116906338a699a490602401602060405180830381865afa158015610b3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6391906112e5565b610baf5760405162461bcd60e51b815260206004820152601960248201527f6572726f725f70726f6a656374446f65734e6f744578697374000000000000006044820152606401610440565b6002546040516351ec389f60e11b81526000916001600160a01b03169063a3d8713e90610be3908790600590600401611557565b600060405180830381865afa158015610c00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c2891908101906117fb565b505050905080600081518110610c4057610c4061151f565b602002602001015160400151925080600081518110610c6157610c6161151f565b602002602001015160200151915050915091565b6000610c7f611153565b905090565b6000610c908383610ff3565b90506000610c9e8742611346565b90506000600360009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1991906112c8565b6001600160a01b0316856001600160a01b031603610dde57600354604051637ff36ab560e01b81526001600160a01b0390911690637ff36ab5908890610d6a90600190889030908990600401611924565b60006040518083038185885af1158015610d88573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610db19190810190611472565b60018451610dbf9190611508565b81518110610dcf57610dcf61151f565b60200260200101519050610e87565b6003546040516338ed173960e01b81526001600160a01b03909116906338ed173990610e179089906001908890309089906004016113a2565b6000604051808303816000875af1158015610e36573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e5e9190810190611472565b60018451610e6c9190611508565b81518110610e7c57610e7c61151f565b602002602001015190505b6000610e938883611535565b905089811015610ee55760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6d696e537562736372697074696f6e5365636f6e6473000000006044820152606401610440565b60015460405163095ea7b360e01b81526001600160a01b039182166004820152602481018490529086169063095ea7b3906044016020604051808303816000875af1158015610f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5c91906112e5565b610f785760405162461bcd60e51b815260040161044090611307565b6001546040516301cc3a8960e11b8152600481018d9052602481018390526001600160a01b038e8116604483015290911690630398751290606401600060405180830381600087803b158015610fcd57600080fd5b505af1158015610fe1573d6000803e3d6000fd5b50505050505050505050505050505050565b6004546060906001600160a01b0316611093576040805160028082526060820183529091602083019080368337019050509050828160008151811061103a5761103a61151f565b60200260200101906001600160a01b031690816001600160a01b031681525050818160018151811061106e5761106e61151f565b60200260200101906001600160a01b031690816001600160a01b0316815250506103ef565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106110c8576110c861151f565b6001600160a01b0392831660209182029290920101526004548251911690829060019081106110f9576110f961151f565b60200260200101906001600160a01b031690816001600160a01b031681525050818160028151811061112d5761112d61151f565b60200260200101906001600160a01b031690816001600160a01b03168152505092915050565b600061115e33610380565b15611170575060131936013560601c90565b503390565b60008060006060848603121561118a57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156111b357600080fd5b5035919050565b6001600160a01b03811681146111cf57600080fd5b50565b6000602082840312156111e457600080fd5b81356111ef816111ba565b9392505050565b600080600080600060a0868803121561120e57600080fd5b853594506020860135935060408601359250606086013561122e816111ba565b949793965091946080013592915050565b6000806000806060858703121561125557600080fd5b8435611260816111ba565b935060208501359250604085013567ffffffffffffffff8082111561128457600080fd5b818701915087601f83011261129857600080fd5b8135818111156112a757600080fd5b8860208285010111156112b957600080fd5b95989497505060200194505050565b6000602082840312156112da57600080fd5b81516111ef816111ba565b6000602082840312156112f757600080fd5b815180151581146111ef57600080fd5b6020808252600f908201526e185c1c1c9bdd985b0819985a5b1959608a1b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561135957611359611330565b500190565b600081518084526020808501945080840160005b838110156113975781516001600160a01b031687529582019590820190600101611372565b509495945050505050565b85815284602082015260a0604082015260006113c160a083018661135e565b6001600160a01b0394909416606083015250608001529392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715611417576114176113de565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611446576114466113de565b604052919050565b600067ffffffffffffffff821115611468576114686113de565b5060051b60200190565b6000602080838503121561148557600080fd5b825167ffffffffffffffff81111561149c57600080fd5b8301601f810185136114ad57600080fd5b80516114c06114bb8261144e565b61141d565b81815260059190911b820183019083810190878311156114df57600080fd5b928401925b828410156114fd578351825292840192908401906114e4565b979650505050505050565b60008282101561151a5761151a611330565b500390565b634e487b7160e01b600052603260045260246000fd5b60008261155257634e487b7160e01b600052601260045260246000fd5b500490565b6000604080830185845260208281860152818654611579818590815260200190565b60008981526020812095509092505b816007820110156115fc57845463ffffffff808216855281861c81168686015281881c811688860152606082811c821690860152608082811c82169086015260a082811c82169086015260c082811c9091169085015260e090811c9084015260019094019361010090920191600801611588565b935493818110156116185763ffffffff85168352918301916001015b818110156116335784841c63ffffffff168352918301916001015b8181101561164e5784861c63ffffffff168352918301916001015b8181101561166b57606085901c63ffffffff168352918301916001015b8181101561168857608085901c63ffffffff168352918301916001015b818110156116a55760a085901c63ffffffff168352918301916001015b818110156116c25760c085901c63ffffffff168352918301916001015b818110156116d65760e085901c8352918301915b509098975050505050505050565b600082601f8301126116f557600080fd5b815167ffffffffffffffff81111561170f5761170f6113de565b6020611723601f8301601f1916820161141d565b828152858284870101111561173757600080fd5b60005b8381101561175557858101830151828201840152820161173a565b838111156117665760008385840101525b5095945050505050565b600082601f83011261178157600080fd5b815160206117916114bb8361144e565b82815260059290921b840181019181810190868411156117b057600080fd5b8286015b848110156117f057805167ffffffffffffffff8111156117d45760008081fd5b6117e28986838b01016116e4565b8452509183019183016117b4565b509695505050505050565b6000806000806080858703121561181157600080fd5b845167ffffffffffffffff8082111561182957600080fd5b818701915087601f83011261183d57600080fd5b8151602061184d6114bb8361144e565b8281526060928302850182019282820191908c85111561186c57600080fd5b958301955b848710156118c85780878e0312156118895760008081fd5b6118916113f4565b875161189c816111ba565b8152878501516118ab816111ba565b818601526040888101519082015283529586019591830191611871565b819a50838c0151995060408c01519650858711156118e557600080fd5b6118f18d888e016116e4565b9850808c0151965050505050508082111561190b57600080fd5b5061191887828801611770565b91505092959194509250565b84815260806020820152600061193d608083018661135e565b6001600160a01b0394909416604083015250606001529291505056fea2646970667358221220f68b23c3192b90f3d4a69a290e5fd70bf970ba2fc679637f0757ee815b5566b164736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class Uniswap2AdapterV4__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides) {\n        return super.getDeployTransaction(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides || {});\n    }\n    deploy(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides) {\n        return super.deploy(_marketplace, _projectRegistry, _uniswapRouter, _deployedOnDomainId, overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nUniswap2AdapterV4__factory.bytecode = _bytecode;\nUniswap2AdapterV4__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"NewSubscription\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"PaymentDetailsByChainUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canDelete\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                indexed: false,\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"PermissionUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                indexed: false,\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n        ],\n        name: \"ProjectCreated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"ProjectDeleted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                indexed: false,\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n        ],\n        name: \"ProjectUpdated\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"previousAdminRole\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"newAdminRole\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"RoleAdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleGranted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleRevoked\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"StreamAdded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: false,\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"StreamRemoved\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Subscribed\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"SubscriptionExtended\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [],\n        name: \"DEFAULT_ADMIN_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"TRUSTED_FORWARDER_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"TRUSTED_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"addStream\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streamIds\",\n                type: \"string[]\",\n            },\n        ],\n        name: \"addStreams\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"buyer\",\n                type: \"address\",\n            },\n        ],\n        name: \"canBuyProject\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isPurchable\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"isPublicPurchable\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"createProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"deleteProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"enablePermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"exists\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"getAddressKey\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getOwnSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n        ],\n        name: \"getPaymentDetailsByChain\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingTokenAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"streamsCount\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"getPermission\",\n        outputs: [\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission\",\n                name: \"permission\",\n                type: \"tuple\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n        ],\n        name: \"getProject\",\n        outputs: [\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetails\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getRoleAdmin\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"getSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"endTimestamp\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"getTrustedRole\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"pure\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"subscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantSubscription\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"hasPermissionType\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"userHasPermissionType\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasRole\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"subscriber\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasValidSubscription\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"isValid\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"_streamRegistry\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"isDeleted\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"isStreamAdded\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"forwarder\",\n                type: \"address\",\n            },\n        ],\n        name: \"isTrustedForwarder\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"projects\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadata\",\n                type: \"string\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"state\",\n                type: \"uint32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string\",\n                name: \"streamId\",\n                type: \"string\",\n            },\n        ],\n        name: \"removeStream\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"renounceRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeAllPermissionsForUser\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"revokePermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"deletePerm\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"setPermissionBooleans\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32[]\",\n                name: \"projectIds\",\n                type: \"bytes32[]\",\n            },\n            {\n                internalType: \"address[][]\",\n                name: \"users\",\n                type: \"address[][]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[][]\",\n                name: \"permissions\",\n                type: \"tuple[][]\",\n            },\n        ],\n        name: \"setPermissionsForMultipleProjects\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address[]\",\n                name: \"users\",\n                type: \"address[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[]\",\n                name: \"permissions\",\n                type: \"tuple[]\",\n            },\n        ],\n        name: \"setPermissionsForMultipleUsers\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"newStreams\",\n                type: \"string[]\",\n            },\n        ],\n        name: \"setStreams\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"streamRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IStreamRegistry\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes4\",\n                name: \"interfaceId\",\n                type: \"bytes4\",\n            },\n        ],\n        name: \"supportsInterface\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"recipient\",\n                type: \"address\",\n            },\n        ],\n        name: \"transferAllPermissionsToUser\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"recipient\",\n                type: \"address\",\n            },\n            {\n                internalType: \"enum IProjectRegistryV1.PermissionType\",\n                name: \"permissionType\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"transferPermissionType\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"id\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"isPublicPurchable\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"trustedCreateProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canBuy\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"deletePerm\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canEdit\",\n                type: \"bool\",\n            },\n            {\n                internalType: \"bool\",\n                name: \"canGrant\",\n                type: \"bool\",\n            },\n        ],\n        name: \"trustedSetPermissions\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32[]\",\n                name: \"projectIds\",\n                type: \"bytes32[]\",\n            },\n            {\n                internalType: \"address[]\",\n                name: \"users\",\n                type: \"address[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"bool\",\n                        name: \"canBuy\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canDelete\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canEdit\",\n                        type: \"bool\",\n                    },\n                    {\n                        internalType: \"bool\",\n                        name: \"canGrant\",\n                        type: \"bool\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.Permission[]\",\n                name: \"permissions\",\n                type: \"tuple[]\",\n            },\n        ],\n        name: \"trustedSetPermissionsForMultipleProjects\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32\",\n                name: \"domainId\",\n                type: \"uint32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"beneficiary\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"pricingToken\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"pricePerSecond\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"updatePaymentDetailsByChain\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint32[]\",\n                name: \"domainIds\",\n                type: \"uint32[]\",\n            },\n            {\n                components: [\n                    {\n                        internalType: \"address\",\n                        name: \"beneficiary\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"address\",\n                        name: \"pricingTokenAddress\",\n                        type: \"address\",\n                    },\n                    {\n                        internalType: \"uint256\",\n                        name: \"pricePerSecond\",\n                        type: \"uint256\",\n                    },\n                ],\n                internalType: \"struct IProjectRegistryV1.PaymentDetailsByChain[]\",\n                name: \"paymentDetailsByChain\",\n                type: \"tuple[]\",\n            },\n            {\n                internalType: \"string[]\",\n                name: \"streams\",\n                type: \"string[]\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"minimumSubscriptionSeconds\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"string\",\n                name: \"metadataJsonString\",\n                type: \"string\",\n            },\n        ],\n        name: \"updateProject\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60c06040523060805234801561001457600080fd5b50600060a05260805160a0516157f8620000596000396000505060008181611166015281816111a601528181611585015281816115c501526117cc01526157f86000f3fe6080604052600436106102ac5760003560e01c806357c6c5041161017557806391d14854116100dc578063d0a1895811610095578063ec5379c81161006f578063ec5379c814610964578063ef8514b314610984578063f5e0e0fb146109a4578063ff00bef6146109c457600080fd5b8063d0a18958146108eb578063d547741f1461090b578063e36421531461092b57600080fd5b806391d1485414610816578063a217fddf14610836578063a3d8713e1461084b578063b14f84321461087b578063b96ea12d1461089b578063c4d66de8146108cb57600080fd5b80636b4918b51161012e5780636b4918b5146107565780636ed84c141461077657806378d34a4e146107965780638459c68d146107b65780638fb8855d146107d65780639018998d146107f657600080fd5b806357c6c5041461062857806358006646146106485780635901692e146106685780635f28cb741461068a57806360d6c7cf146106c1578063678233251461071c57600080fd5b80632f2ff15d1161021957806349993c4b116101d257806349993c4b146105805780634f1ef286146105a0578063501b6bde146105b357806351cfeb9d146105d357806352d1902d146105f3578063572b6c051461060857600080fd5b80632f2ff15d146104a5578063353f8500146104c557806336568abe146104e65780633659cfe61461050657806338a699a41461052657806343e198b81461056057600080fd5b806318b0edf61161026b57806318b0edf6146103aa5780631aa198ee146103ca5780631f4e09af146103ea578063248a9ca31461040a5780632a3d99101461043a5780632affa4641461045a57600080fd5b8062cba943146102b1578062cf76a5146102f857806301ffc9a71461031a5780630e1429371461034a57806312f465611461036a57806317e770021461038a575b600080fd5b3480156102bd57600080fd5b506102e57fd3df22cd6a774f62b0ae21ffd602cc92e7f3390518eee8b33307fc70380da7d281565b6040519081526020015b60405180910390f35b34801561030457600080fd5b506103186103133660046141ac565b6109e4565b005b34801561032657600080fd5b5061033a610335366004614225565b610a75565b60405190151581526020016102ef565b34801561035657600080fd5b5061033a61036536600461424f565b610aac565b34801561037657600080fd5b506102e561038536600461424f565b610ad3565b34801561039657600080fd5b506103186103a536600461430e565b610b21565b3480156103b657600080fd5b506103186103c5366004614387565b610c80565b3480156103d657600080fd5b506103186103e5366004614452565b610cfd565b3480156103f657600080fd5b50610318610405366004614540565b610d4a565b34801561041657600080fd5b506102e561042536600461456e565b600090815260fb602052604090206001015490565b34801561044657600080fd5b5061033a610455366004614387565b610e24565b34801561046657600080fd5b5061047a61047536600461459b565b61100c565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016102ef565b3480156104b157600080fd5b506103186104c036600461424f565b6110a4565b3480156104d157600080fd5b5060008051602061577c8339815191526102e5565b3480156104f257600080fd5b5061031861050136600461424f565b6110ce565b34801561051257600080fd5b506103186105213660046145c7565b61115c565b34801561053257600080fd5b5061033a61054136600461456e565b600090815261012e602052604090206005015463ffffffff1660011490565b34801561056c57600080fd5b5061031861057b3660046145e4565b61123b565b34801561058c57600080fd5b5061031861059b3660046146f5565b6112b8565b6103186105ae3660046147dd565b61157b565b3480156105bf57600080fd5b506103186105ce36600461424f565b611647565b3480156105df57600080fd5b506103186105ee366004614387565b611740565b3480156105ff57600080fd5b506102e56117bf565b34801561061457600080fd5b5061033a6106233660046145c7565b611872565b34801561063457600080fd5b50610318610643366004614840565b61189e565b34801561065457600080fd5b50610318610663366004614387565b611ae5565b34801561067457600080fd5b506102e560008051602061577c83398151915281565b34801561069657600080fd5b506106aa6106a536600461424f565b611b5b565b6040805192151583526020830191909152016102ef565b3480156106cd57600080fd5b506106e16106dc36600461424f565b611bd2565b6040516102ef919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561072857600080fd5b5061033a61073736600461456e565b600090815261012e602052604090206005015463ffffffff1660021490565b34801561076257600080fd5b50610318610771366004614919565b611cb4565b34801561078257600080fd5b506103186107913660046149b2565b611da7565b3480156107a257600080fd5b506103186107b136600461424f565b611ed6565b3480156107c257600080fd5b506103186107d1366004614a0b565b611fc0565b3480156107e257600080fd5b506103186107f1366004614a3b565b61225e565b34801561080257600080fd5b506103186108113660046146f5565b612363565b34801561082257600080fd5b5061033a61083136600461424f565b612439565b34801561084257600080fd5b506102e5600081565b34801561085757600080fd5b5061086b610866366004614ac2565b612464565b6040516102ef9493929190614c27565b34801561088757600080fd5b5061033a61089636600461424f565b612747565b3480156108a757600080fd5b506108bb6108b636600461456e565b612753565b6040516102ef9493929190614cbc565b3480156108d757600080fd5b506103186108e63660046145c7565b61280b565b3480156108f757600080fd5b5061031861090636600461456e565b612943565b34801561091757600080fd5b5061031861092636600461424f565b612a2f565b34801561093757600080fd5b5061012d5461094c906001600160a01b031681565b6040516001600160a01b0390911681526020016102ef565b34801561097057600080fd5b5061031861097f3660046141ac565b612a54565b34801561099057600080fd5b506106aa61099f36600461456e565b612a98565b3480156109b057600080fd5b506103186109bf366004614cf2565b612af1565b3480156109d057600080fd5b5061033a6109df366004614cf2565b612bbd565b85610a0881600090815261012e602052604090206005015463ffffffff1660011490565b610a2d5760405162461bcd60e51b8152600401610a2490614d30565b60405180910390fd5b86610a4181610a3a612c3e565b6003610e24565b610a5d5760405162461bcd60e51b8152600401610a2490614d67565b610a6b888888888888612c4d565b5050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610aa657506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000610aba83600080610e24565b80610acc5750610acc83836000610e24565b9392505050565b600091825261012e602090815260409283902060050154835163ffffffff909116818301526001600160a01b0392909216828401528251808303840181526060909201909252805191012090565b84610b4581600090815261012e602052604090206005015463ffffffff1660011490565b610b615760405162461bcd60e51b8152600401610a2490614d30565b85610b6e81610a3a612c3e565b610b8a5760405162461bcd60e51b8152600401610a2490614d67565b848314610be95760405162461bcd60e51b815260206004820152602760248201527f6572726f725f696e76616c6964557365725065726d697373696f6e41727261796044820152664c656e6774687360c81b6064820152608401610a24565b8460005b81811015610c75576000868683818110610c0957610c09614d9e565b905060800201803603810190610c1f9190614db4565b9050610c628a8a8a85818110610c3757610c37614d9e565b9050602002016020810190610c4c91906145c7565b8351602085015160408601516060870151612c4d565b5080610c6d81614e4e565b915050610bed565b505050505050505050565b82610ca481600090815261012e602052604090206005015463ffffffff1660011490565b610cc05760405162461bcd60e51b8152600401610a2490614d30565b83610ccd81610a3a612c3e565b610ce95760405162461bcd60e51b8152600401610a2490614d67565b610cf68585856001612d47565b5050505050565b610d0f8b8b8b8b8b8b8b8b8a8a612f3c565b610d268b610d1b612c3e565b600180600180612c4d565b8215610d3d57610d3d8b6000600180600180612c4d565b5050505050505050505050565b82610d6e81600090815261012e602052604090206005015463ffffffff1660011490565b610d8a5760405162461bcd60e51b8152600401610a2490614d30565b83610d9781610a3a612c3e565b80610db75750610db760008051602061577c833981519152610831612c3e565b610e0f5760405162461bcd60e51b815260206004820152602360248201527f6572726f725f6e6f4772616e745065726d697373696f6e4f724e6f74547275736044820152621d195960ea1b6064820152608401610a24565b610e1a8585856132a9565b610cf68584613488565b600083610e4a81600090815261012e602052604090206005015463ffffffff1660011490565b610e665760405162461bcd60e51b8152600401610a2490614d30565b6000836003811115610e7a57610e7a614e67565b03610eb757600085815261012e6020526040812060070190610e9c8787610ad3565b815260208101919091526040016000205460ff169150611004565b6001836003811115610ecb57610ecb614e67565b03610f0d57600085815261012e6020526040812060070190610eed8787610ad3565b8152602081019190915260400160002054610100900460ff169150611004565b6002836003811115610f2157610f21614e67565b03610f6457600085815261012e6020526040812060070190610f438787610ad3565b815260208101919091526040016000205462010000900460ff169150611004565b6003836003811115610f7857610f78614e67565b03610fbc57600085815261012e6020526040812060070190610f9a8787610ad3565b81526020810191909152604001600020546301000000900460ff169150611004565b60405162461bcd60e51b815260206004820152601b60248201527f6572726f725f696e76616c69645065726d697373696f6e5479706500000000006044820152606401610a24565b509392505050565b6000806000808561103681600090815261012e602052604090206005015463ffffffff1660011490565b6110525760405162461bcd60e51b8152600401610a2490614d30565b5050506000938452505061012e6020908152604080842063ffffffff93909316845260028084019092529092208054600182015491909301546006909201546001600160a01b03938416949390911692565b600082815260fb60205260409020600101546110bf816135ab565b6110c983836135bc565b505050565b6110d6612c3e565b6001600160a01b0316816001600160a01b03161461114e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a24565b6111588282613643565b5050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036111a45760405162461bcd60e51b8152600401610a2490614e7d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111ed60008051602061575c833981519152546001600160a01b031690565b6001600160a01b0316146112135760405162461bcd60e51b8152600401610a2490614ec9565b61121c816136c8565b60408051600080825260208201909252611238918391906136fe565b50565b61125560008051602061577c833981519152610831612c3e565b6112715760405162461bcd60e51b8152600401610a2490614f15565b6112838c8c8c8c8c8c8c8c8a8a612f3c565b6112938c85600180600180612c4d565b82156112aa576112aa8c6000600180600180612c4d565b505050505050505050505050565b826112dc81600090815261012e602052604090206005015463ffffffff1660011490565b6112f85760405162461bcd60e51b8152600401610a2490614d30565b8361130c81611305612c3e565b6002610e24565b6113285760405162461bcd60e51b8152600401610a2490614f4c565b600085815261012e60205260408120600681018054919290919060088401905b878110156113e3573660008a8a8481811061136557611365614d9e565b90506020028101906113779190614f7c565b91509150600084838360405161138e929190614fc2565b90815260200160405180910390205411156113ce57670de0b6b3a76400008483836040516113bd929190614fc2565b908152604051908190036020019020555b505080806113db90614e4e565b915050611348565b506000805b8381101561151a57600085828154811061140457611404614d9e565b906000526020600020019050838160405161141f919061500c565b908152602001604051809103902054670de0b6b3a7640000036114ac578282111561147a578086848154811061145757611457614d9e565b9060005260206000200190805461146d90614fd2565b611478929190613fac565b505b8261148481614e4e565b935050828482604051611497919061500c565b90815260405190819003602001902055611507565b83816040516114bb919061500c565b9081526020016040518091039020600090557f57371a8f367da21930d86f4c1df1dd17ad2a3cc972538f07ee7b81bc4e3929358c826040516114fe92919061507e565b60405180910390a15b508061151281614e4e565b9150506113e8565b505b8281101561156457838054806115345761153461510b565b6001900381819060005260206000200160006115509190614037565b90558061155c81614e4e565b91505061151c565b61156f8a8a8a612363565b50505050505050505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036115c35760405162461bcd60e51b8152600401610a2490614e7d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661160c60008051602061575c833981519152546001600160a01b031690565b6001600160a01b0316146116325760405162461bcd60e51b8152600401610a2490614ec9565b61163b826136c8565b611158828260016136fe565b6000611655836106dc612c3e565b805190915080611666575080602001515b80611672575080604001515b8061167e575080606001515b6116ca5760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6e6f5065726d697373696f6e546f5472616e73666572000000006044820152606401610a24565b60006116d68484611bd2565b905061172384848460000151806116eb575083515b8560200151806116fc575084602001515b86604001518061170d575085604001515b87606001518061171e575086606001515b612c4d565b61173a8461172f612c3e565b600080600080612c4d565b50505050565b6117528361174c612c3e565b83610e24565b61179e5760405162461bcd60e51b815260206004820152601c60248201527f6572726f725f6e6f5065726d697373696f6e546f5472616e73666572000000006044820152606401610a24565b6117b2836117aa612c3e565b836000612d47565b6110c98383836001612d47565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461185f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a24565b5060008051602061575c83398151915290565b6000610aa67fd3df22cd6a774f62b0ae21ffd602cc92e7f3390518eee8b33307fc70380da7d283612439565b896118c281600090815261012e602052604090206005015463ffffffff1660011490565b6118de5760405162461bcd60e51b8152600401610a2490614d30565b8a6118eb81611305612c3e565b6119075760405162461bcd60e51b8152600401610a2490614f4c565b60008c815261012e602052604090206001810186905561192b600482018686614071565b5080546119399089896112b8565b8c7f51c034fd819648c77e0ca81612e46789853c82fdb09810a790590a6a706f46b88d8d8d8d8d8d8d8d8d604051611979999897969594939291906151cd565b60405180910390a260005b8b811015611ad5578a8a8281811061199e5761199e614d9e565b9050606002018260020160008f8f858181106119bc576119bc614d9e565b90506020020160208101906119d191906152b4565b63ffffffff16815260208101919091526040016000206119f182826152ef565b9050508d7f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e5670048e8e84818110611a2857611a28614d9e565b9050602002016020810190611a3d91906152b4565b8d8d85818110611a4f57611a4f614d9e565b611a6592602060609092020190810191506145c7565b8e8e86818110611a7757611a77614d9e565b9050606002016020016020810190611a8f91906145c7565b8f8f87818110611aa157611aa1614d9e565b90506060020160400135604051611abb949392919061532f565b60405180910390a280611acd81614e4e565b915050611984565b5050505050505050505050505050565b82611b0981600090815261012e602052604090206005015463ffffffff1660011490565b611b255760405162461bcd60e51b8152600401610a2490614d30565b83611b3281610a3a612c3e565b611b4e5760405162461bcd60e51b8152600401610a2490614d67565b610cf68585856000612d47565b60008083611b8281600090815261012e602052604090206005015463ffffffff1660011490565b611b9e5760405162461bcd60e51b8152600401610a2490614d30565b505050600091825261012e602090815260408084206001600160a01b03939093168452600390920190529020544281101591565b60408051608081018252600080825260208201819052918101829052606081019190915282611c1a81600090815261012e602052604090206005015463ffffffff1660011490565b611c365760405162461bcd60e51b8152600401610a2490614d30565b600084815261012e6020526040812060070190611c538686610ad3565b815260208082019290925260409081016000208151608081018352905460ff80821615158352610100820481161515948301949094526201000081048416151592820192909252630100000090910490911615156060820152949350505050565b8281148015611cc257508085145b611d255760405162461bcd60e51b815260206004820152602e60248201527f6572726f725f696e76616c696450726f6a656374557365725065726d6973736960448201526d6f6e41727261794c656e6774687360901b6064820152608401610a24565b8460005b81811015610a6b57611d95888883818110611d4657611d46614d9e565b90506020020135878784818110611d5f57611d5f614d9e565b9050602002810190611d71919061535c565b878786818110611d8357611d83614d9e565b90506020028101906103a591906153a5565b80611d9f81614e4e565b915050611d29565b84611dcb81600090815261012e602052604090206005015463ffffffff1660011490565b611de75760405162461bcd60e51b8152600401610a2490614d30565b85611df481611305612c3e565b611e105760405162461bcd60e51b8152600401610a2490614f4c565b604080516060810182526001600160a01b038088168252868116602080840191825283850188815260008d815261012e835286812063ffffffff8e168252600280820190945290879020865181549087166001600160a01b031991821617825594516001820180549190971695169490941790945551910155915190919089907f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e56700490611ec3908b908b908b908b9061532f565b60405180910390a2505050505050505050565b81611efa81600090815261012e602052604090206005015463ffffffff1660011490565b611f165760405162461bcd60e51b8152600401610a2490614d30565b82611f2381610a3a612c3e565b611f3f5760405162461bcd60e51b8152600401610a2490614d67565b600084815261012e6020526040812060070190611f5c8686610ad3565b8152602081019190915260409081016000908120805463ffffffff1916905590517f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd91611fb291879187918190819081906153ee565b60405180910390a150505050565b81611fe481600090815261012e602052604090206005015463ffffffff1660011490565b6120005760405162461bcd60e51b8152600401610a2490614d30565b8261200d81611305612c3e565b6120295760405162461bcd60e51b8152600401610a2490614f4c565b600084815261012e602052604080822090516006820192600890920191908290612054908890615425565b9081526020016040518091039020549050600081116120ac5760405162461bcd60e51b8152602060048201526014602482015273195c9c9bdc97dcdd1c99585b539bdd119bdd5b9960621b6044820152606401610a24565b8254600110156121cd57825460009084906120c990600190615441565b815481106120d9576120d9614d9e565b9060005260206000200180546120ee90614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461211a90614fd2565b80156121675780601f1061213c57610100808354040283529160200191612167565b820191906000526020600020905b81548152906001019060200180831161214a57829003601f168201915b50505050509050808460018461217d9190615441565b8154811061218d5761218d614d9e565b9060005260206000200190805190602001906121aa9291906140e5565b508183826040516121bb9190615425565b90815260405190819003602001902055505b828054806121dd576121dd61510b565b6001900381819060005260206000200160006121f99190614037565b9055818660405161220a9190615425565b9081526020016040518091039020600090557f57371a8f367da21930d86f4c1df1dd17ad2a3cc972538f07ee7b81bc4e392935878760405161224d929190615458565b60405180910390a150505050505050565b61227860008051602061577c833981519152610831612c3e565b6122945760405162461bcd60e51b8152600401610a2490614f15565b8281146122e35760405162461bcd60e51b815260206004820152601e60248201527f6572726f725f696e76616c6964496e70757441727261794c656e6774687300006044820152606401610a24565b8460005b81811015610a6b57600088888381811061230357612303614d9e565b905060200201359050600085858481811061232057612320614d9e565b9050608002018036038101906123369190614db4565b905061234e82898986818110610c3757610c37614d9e565b5050808061235b90614e4e565b9150506122e7565b8261238781600090815261012e602052604090206005015463ffffffff1660011490565b6123a35760405162461bcd60e51b8152600401610a2490614d30565b836123b081611305612c3e565b6123cc5760405162461bcd60e51b8152600401610a2490614f4c565b60005b83811015612431573660008686848181106123ec576123ec614d9e565b90506020028101906123fe9190614f7c565b9150915061240d888383612bbd565b61241c5761241c888383613869565b5050808061242990614e4e565b9150506123cf565b505050505050565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b606060006060808561248f81600090815261012e602052604090206005015463ffffffff1660011490565b6124ab5760405162461bcd60e51b8152600401610a2490614d30565b600087815261012e6020526040902086516001600160401b038111156124d3576124d3614740565b60405190808252806020026020018201604052801561251e57816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816124f15790505b50955060005b87518110156125c65781600201600089838151811061254557612545614d9e565b60209081029190910181015163ffffffff168252818101929092526040908101600020815160608101835281546001600160a01b03908116825260018301541693810193909352600201549082015287518890839081106125a8576125a8614d9e565b602002602001018190525080806125be90614e4e565b915050612524565b5085816001015482600401836006018180546125e190614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461260d90614fd2565b801561265a5780601f1061262f5761010080835404028352916020019161265a565b820191906000526020600020905b81548152906001019060200180831161263d57829003601f168201915b5050505050915080805480602002602001604051908101604052809291908181526020016000905b8282101561272e5783829060005260206000200180546126a190614fd2565b80601f01602080910402602001604051908101604052809291908181526020018280546126cd90614fd2565b801561271a5780601f106126ef5761010080835404028352916020019161271a565b820191906000526020600020905b8154815290600101906020018083116126fd57829003601f168201915b505050505081526020019060010190612682565b5050505090509550955095509550505092959194509250565b60006110048383611b5b565b61012e602052600090815260409020805460018201546004830180549293919261277c90614fd2565b80601f01602080910402602001604051908101604052809291908181526020018280546127a890614fd2565b80156127f55780601f106127ca576101008083540402835291602001916127f5565b820191906000526020600020905b8154815290600101906020018083116127d857829003601f168201915b5050506005909301549192505063ffffffff1684565b600054610100900460ff161580801561282b5750600054600160ff909116105b806128455750303b158015612845575060005460ff166001145b6128a85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610a24565b6000805460ff1916600117905580156128cb576000805461ff0019166101001790555b6128d36139de565b6128de600033613a4b565b61012d80546001600160a01b0319166001600160a01b0384161790558015611158576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b8061296781600090815261012e602052604090206005015463ffffffff1660011490565b6129835760405162461bcd60e51b8152600401610a2490614d30565b8161299781612990612c3e565b6001610e24565b6129e35760405162461bcd60e51b815260206004820152601860248201527f6572726f725f6e6f44656c6574655065726d697373696f6e00000000000000006044820152606401610a24565b600083815261012e6020526040808220600501805463ffffffff191660021790555184917f9ab5c00c5b6d37ab8d5d4557762bab6573be95818d4d9122abc6f9d8f71cd51c91a2505050565b600082815260fb6020526040902060010154612a4a816135ab565b6110c98383613643565b612a6e60008051602061577c833981519152610831612c3e565b612a8a5760405162461bcd60e51b8152600401610a2490614f15565b612431868686868686612c4d565b60008082612abf81600090815261012e602052604090206005015463ffffffff1660011490565b612adb5760405162461bcd60e51b8152600401610a2490614d30565b612ae7846106a5612c3e565b9250925050915091565b82612b1581600090815261012e602052604090206005015463ffffffff1660011490565b612b315760405162461bcd60e51b8152600401610a2490614d30565b83612b3e81611305612c3e565b612b5a5760405162461bcd60e51b8152600401610a2490614f4c565b612b65858585612bbd565b15612bb25760405162461bcd60e51b815260206004820152601860248201527f6572726f725f73747265616d416c7265616479416464656400000000000000006044820152606401610a24565b610cf6858585613869565b600083612be381600090815261012e602052604090206005015463ffffffff1660011490565b612bff5760405162461bcd60e51b8152600401610a2490614d30565b600085815261012e60205260408082209051600890910190612c249087908790614fc2565b908152602001604051809103902054119150509392505050565b6000612c48613a55565b905090565b6000604051806080016040528086151581526020018515158152602001841515815260200183151581525090508061012e60008981526020019081526020016000206007016000612c9e8a8a610ad3565b81526020808201929092526040908101600020835181549385015185840151606090960151151563010000000263ff0000001996151562010000029690961663ffff0000199115156101000261ff00199315159390931661ffff1990961695909517919091171692909217929092179055517f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd9061224d908990899089908990899089906153ee565b6000826003811115612d5b57612d5b614e67565b03612da557600084815261012e602052604081208291600790910190612d818787610ad3565b81526020810191909152604001600020805460ff1916911515919091179055612ed6565b6001826003811115612db957612db9614e67565b03612e0a57600084815261012e602052604081208291600790910190612ddf8787610ad3565b8152602081019190915260400160002080549115156101000261ff0019909216919091179055612ed6565b6002826003811115612e1e57612e1e614e67565b03612e7157600084815261012e602052604081208291600790910190612e448787610ad3565b815260208101919091526040016000208054911515620100000262ff000019909216919091179055612ed6565b6003826003811115612e8557612e85614e67565b03610fbc57600084815261012e602052604081208291600790910190612eab8787610ad3565b81526020810191909152604001600020805491151563010000000263ff000000199092169190911790555b6000612ee28585611bd2565b90507f9aceeb9d8b751f2606e1109c003817477a669e7426397c1d22f1b9362e3e4ccd85858360000151846020015185604001518660600151604051612f2d969594939291906153ee565b60405180910390a15050505050565b60008a9003612f835760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97db9d5b1b141c9bda9958dd1259606a1b6044820152606401610a24565b60008a815261012e602052604090206005015463ffffffff16600203612fe15760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97dd5cd959141c9bda9958dd1259606a1b6044820152606401610a24565b6130048a600090815261012e602052604090206005015463ffffffff1660011490565b156130475760405162461bcd60e51b81526020600482015260136024820152726572726f725f616c726561647945786973747360681b6044820152606401610a24565b8786146130a15760405162461bcd60e51b815260206004820152602260248201527f6572726f725f696e76616c69645061796d656e7444657461696c73427943686160448201526134b760f11b6064820152608401610a24565b60008a815261012e602052604081208b8155905b858110156130fc576130ea8c8888848181106130d3576130d3614d9e565b90506020028101906130e59190614f7c565b613869565b806130f481614e4e565b9150506130b5565b5060018101849055613112600482018484614071565b5060058101805463ffffffff191660011790556040518b907f122f53e958319de8a721dfd51145febb3aa3ad7561f1439c0c9e9aa26212ef1690613167908d908d908d908d908d908d908d908d908d906151cd565b60405180910390a260005b898110156112aa57600089898381811061318e5761318e614d9e565b9050606002018036038101906131a49190615479565b9050808360020160008e8e868181106131bf576131bf614d9e565b90506020020160208101906131d491906152b4565b63ffffffff1681526020808201929092526040908101600020835181546001600160a01b03199081166001600160a01b039283161783559385015160018301805490951691161790925591909101516002909101558c7f53b13732e3009cbbdd98bd95648df424951030e4fc01a624bbc49ef53e5670048d8d8581811061325d5761325d614d9e565b905060200201602081019061327291906152b4565b83516020850151604080870151905161328e949392919061532f565b60405180910390a250806132a181614e4e565b915050613172565b600083815261012e602090815260408083206001600160a01b038516845260038101909252822080549192909142101561337b57600085116133235760405162461bcd60e51b8152602060048201526013602482015272195c9c9bdc97dd1bdc155c151bdbd4db585b1b606a1b6044820152606401610a24565b81546133309086906154e3565b80835583546040518281529192506001600160a01b038616917f602ca7f17c81aa5e62b3381000dd445f5af7c333574da85f4b246288afc073229060200160405180910390a361343f565b82600101548510156133cf5760405162461bcd60e51b815260206004820152601d60248201527f6572726f725f6e6577537562736372697074696f6e546f6f536d616c6c0000006044820152606401610a24565b6133d985426154e3565b60408051602080820183528382526001600160a01b0388166000818152600389018352849020835190558754935185815294955091939192917f9c3ab7e86c11d820cc311335294ebdf7299d8637d47253b930c4120b775d7cca910160405180910390a3505b82546040518281526001600160a01b03861691907fe22e8c2d8a284063fec10f270bc3c776ffb40bcf816b73eef36354d5f3d7b3d49060200160405180910390a3505050505050565b600082815261012e6020908152604080832060060180548251818502810185019093528083529192909190849084015b828210156135645783829060005260206000200180546134d790614fd2565b80601f016020809104026020016040519081016040528092919081815260200182805461350390614fd2565b80156135505780601f1061352557610100808354040283529160200191613550565b820191906000526020600020905b81548152906001019060200180831161353357829003601f168201915b5050505050815260200190600101906134b8565b50505050905060005b815181101561173a5761359982828151811061358b5761358b614d9e565b602002602001015184613a77565b806135a381614e4e565b91505061356d565b611238816135b7612c3e565b613b73565b6135c68282612439565b61115857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135ff612c3e565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61364d8282612439565b1561115857600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19169055613684612c3e565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6136e260008051602061577c833981519152610831612c3e565b6112385760405162461bcd60e51b8152600401610a2490614f15565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613731576110c983613bcc565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561378b575060408051601f3d908101601f19168201909252613788918101906154fb565b60015b6137ee5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a24565b60008051602061575c833981519152811461385d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a24565b506110c9838383613c68565b61012d546001600160a01b03166388b210388383613885612c3e565b60046040518563ffffffff1660e01b81526004016138a69493929190615514565b602060405180830381865afa1580156138c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138e79190615566565b6139335760405162461bcd60e51b815260206004820181905260248201527f6572726f725f6e6f4772616e745065726d697373696f6e466f7253747265616d6044820152606401610a24565b600083815261012e6020908152604082206006018054600181018255908352912061396091018383614071565b50600083815261012e6020526040908190206006810154915160089091019061398c9085908590614fc2565b9081526020016040518091039020819055507f369d82649fc61d1d3254d152682f60119e0889b51886e817df5a3021ee301f9f8383836040516139d193929190615583565b60405180910390a1505050565b600054610100900460ff16613a495760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610a24565b565b61115882826135bc565b6000613a6033611872565b15613a72575060131936013560601c90565b503390565b61012d54604051637479c14760e11b81526000916001600160a01b03169063e8f3828e90613aab908690869060040161559d565b60a060405180830381865afa158015613ac8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aec91906155c7565b61012d54815160208301516040808501516080860151915163b6a9159760e01b81529596506001600160a01b039094169463b6a9159794613b3c948a948a9491939092916000199160040161564e565b600060405180830381600087803b158015613b5657600080fd5b505af1158015613b6a573d6000803e3d6000fd5b50505050505050565b613b7d8282612439565b61115857613b8a81613c8d565b613b95836020613c9f565b604051602001613ba692919061569d565b60408051601f198184030181529082905262461bcd60e51b8252610a2491600401615712565b6001600160a01b0381163b613c395760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a24565b60008051602061575c83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613c7183613e3a565b600082511180613c7e5750805b156110c95761173a8383613e7a565b6060610aa66001600160a01b03831660145b60606000613cae836002615725565b613cb99060026154e3565b6001600160401b03811115613cd057613cd0614740565b6040519080825280601f01601f191660200182016040528015613cfa576020820181803683370190505b509050600360fc1b81600081518110613d1557613d15614d9e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613d4457613d44614d9e565b60200101906001600160f81b031916908160001a9053506000613d68846002615725565b613d739060016154e3565b90505b6001811115613deb576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613da757613da7614d9e565b1a60f81b828281518110613dbd57613dbd614d9e565b60200101906001600160f81b031916908160001a90535060049490941c93613de481615744565b9050613d76565b508315610acc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a24565b613e4381613bcc565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b613ee25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610a24565b600080846001600160a01b031684604051613efd9190615425565b600060405180830381855af49150503d8060008114613f38576040519150601f19603f3d011682016040523d82523d6000602084013e613f3d565b606091505b5091509150613f65828260405180606001604052806027815260200161579c60279139613f6e565b95945050505050565b60608315613f7d575081610acc565b610acc8383815115613f925781518083602001fd5b8060405162461bcd60e51b8152600401610a249190615712565b828054613fb890614fd2565b90600052602060002090601f016020900481019282613fda5760008555614027565b82601f10613feb5780548555614027565b8280016001018555821561402757600052602060002091601f016020900482015b8281111561402757825482559160010191906001019061400c565b50614033929150614159565b5090565b50805461404390614fd2565b6000825580601f10614053575050565b601f0160209004906000526020600020908101906112389190614159565b82805461407d90614fd2565b90600052602060002090601f01602090048101928261409f5760008555614027565b82601f106140b85782800160ff19823516178555614027565b82800160010185558215614027579182015b828111156140275782358255916020019190600101906140ca565b8280546140f190614fd2565b90600052602060002090601f0160209004810192826141135760008555614027565b82601f1061412c57805160ff1916838001178555614027565b82800160010185558215614027579182015b8281111561402757825182559160200191906001019061413e565b5b80821115614033576000815560010161415a565b6001600160a01b038116811461123857600080fd5b803561418e8161416e565b919050565b801515811461123857600080fd5b803561418e81614193565b60008060008060008060c087890312156141c557600080fd5b8635955060208701356141d78161416e565b945060408701356141e781614193565b935060608701356141f781614193565b9250608087013561420781614193565b915060a087013561421781614193565b809150509295509295509295565b60006020828403121561423757600080fd5b81356001600160e01b031981168114610acc57600080fd5b6000806040838503121561426257600080fd5b8235915060208301356142748161416e565b809150509250929050565b60008083601f84011261429157600080fd5b5081356001600160401b038111156142a857600080fd5b6020830191508360208260051b85010111156142c357600080fd5b9250929050565b60008083601f8401126142dc57600080fd5b5081356001600160401b038111156142f357600080fd5b6020830191508360208260071b85010111156142c357600080fd5b60008060008060006060868803121561432657600080fd5b8535945060208601356001600160401b038082111561434457600080fd5b61435089838a0161427f565b9096509450604088013591508082111561436957600080fd5b50614376888289016142ca565b969995985093965092949392505050565b60008060006060848603121561439c57600080fd5b8335925060208401356143ae8161416e565b91506040840135600481106143c257600080fd5b809150509250925092565b60008083601f8401126143df57600080fd5b5081356001600160401b038111156143f657600080fd5b6020830191508360206060830285010111156142c357600080fd5b60008083601f84011261442357600080fd5b5081356001600160401b0381111561443a57600080fd5b6020830191508360208285010111156142c357600080fd5b600080600080600080600080600080600060e08c8e03121561447357600080fd5b8b359a506001600160401b038060208e0135111561449057600080fd5b6144a08e60208f01358f0161427f565b909b50995060408d01358110156144b657600080fd5b6144c68e60408f01358f016143cd565b909950975060608d01358110156144dc57600080fd5b6144ec8e60608f01358f0161427f565b909750955060808d0135945061450460a08e016141a1565b93508060c08e0135111561451757600080fd5b506145288d60c08e01358e01614411565b81935080925050509295989b509295989b9093969950565b60008060006060848603121561455557600080fd5b833592506020840135915060408401356143c28161416e565b60006020828403121561458057600080fd5b5035919050565b803563ffffffff8116811461418e57600080fd5b600080604083850312156145ae57600080fd5b823591506145be60208401614587565b90509250929050565b6000602082840312156145d957600080fd5b8135610acc8161416e565b6000806000806000806000806000806000806101008d8f03121561460757600080fd5b8c359b506001600160401b0360208e0135111561462357600080fd5b6146338e60208f01358f0161427f565b909b5099506001600160401b0360408e0135111561465057600080fd5b6146608e60408f01358f016143cd565b90995097506001600160401b0360608e0135111561467d57600080fd5b61468d8e60608f01358f0161427f565b909750955060808d013594506146a560a08e01614183565b93506146b360c08e016141a1565b92506001600160401b0360e08e013511156146cd57600080fd5b6146dd8e60e08f01358f01614411565b81935080925050509295989b509295989b509295989b565b60008060006040848603121561470a57600080fd5b8335925060208401356001600160401b0381111561472757600080fd5b6147338682870161427f565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561477e5761477e614740565b604052919050565b60006001600160401b0383111561479f5761479f614740565b6147b2601f8401601f1916602001614756565b90508281528383830111156147c657600080fd5b828260208301376000602084830101529392505050565b600080604083850312156147f057600080fd5b82356147fb8161416e565b915060208301356001600160401b0381111561481657600080fd5b8301601f8101851361482757600080fd5b61483685823560208401614786565b9150509250929050565b60008060008060008060008060008060c08b8d03121561485f57600080fd5b8a35995060208b01356001600160401b038082111561487d57600080fd5b6148898e838f0161427f565b909b50995060408d01359150808211156148a257600080fd5b6148ae8e838f016143cd565b909950975060608d01359150808211156148c757600080fd5b6148d38e838f0161427f565b909750955060808d0135945060a08d01359150808211156148f357600080fd5b506149008d828e01614411565b915080935050809150509295989b9194979a5092959850565b6000806000806000806060878903121561493257600080fd5b86356001600160401b038082111561494957600080fd5b6149558a838b0161427f565b9098509650602089013591508082111561496e57600080fd5b61497a8a838b0161427f565b9096509450604089013591508082111561499357600080fd5b506149a089828a0161427f565b979a9699509497509295939492505050565b600080600080600060a086880312156149ca57600080fd5b853594506149da60208701614587565b935060408601356149ea8161416e565b925060608601356149fa8161416e565b949793965091946080013592915050565b60008060408385031215614a1e57600080fd5b8235915060208301356001600160401b0381111561481657600080fd5b60008060008060008060608789031215614a5457600080fd5b86356001600160401b0380821115614a6b57600080fd5b614a778a838b0161427f565b90985096506020890135915080821115614a9057600080fd5b614a9c8a838b0161427f565b90965094506040890135915080821115614ab557600080fd5b506149a089828a016142ca565b60008060408385031215614ad557600080fd5b823591506020808401356001600160401b0380821115614af457600080fd5b818601915086601f830112614b0857600080fd5b813581811115614b1a57614b1a614740565b8060051b9150614b2b848301614756565b8181529183018401918481019089841115614b4557600080fd5b938501935b83851015614b6a57614b5b85614587565b82529385019390850190614b4a565b8096505050505050509250929050565b60005b83811015614b95578181015183820152602001614b7d565b8381111561173a5750506000910152565b60008151808452614bbe816020860160208601614b7a565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b85811015614c1a578284038952614c08848351614ba6565b98850198935090840190600101614bf0565b5091979650505050505050565b6080808252855190820181905260009060209060a0840190828901845b82811015614c8257815180516001600160a01b0390811686528682015116868601526040908101519085015260609093019290840190600101614c44565b50505086828501528381036040850152614c9c8187614ba6565b9150508281036060840152614cb18185614bd2565b979650505050505050565b848152836020820152608060408201526000614cdb6080830185614ba6565b905063ffffffff8316606083015295945050505050565b600080600060408486031215614d0757600080fd5b8335925060208401356001600160401b03811115614d2457600080fd5b61473386828701614411565b60208082526019908201527f6572726f725f70726f6a656374446f65734e6f74457869737400000000000000604082015260600190565b60208082526017908201527f6572726f725f6e6f4772616e745065726d697373696f6e000000000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060808284031215614dc657600080fd5b604051608081018181106001600160401b0382111715614de857614de8614740565b6040528235614df681614193565b81526020830135614e0681614193565b60208201526040830135614e1981614193565b60408201526060830135614e2c81614193565b60608201529392505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614e6057614e60614e38565b5060010190565b634e487b7160e01b600052602160045260246000fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526017908201527f6572726f725f6d757374426554727573746564526f6c65000000000000000000604082015260600190565b60208082526016908201527532b93937b92fb737a2b234ba2832b936b4b9b9b4b7b760511b604082015260600190565b6000808335601e19843603018112614f9357600080fd5b8301803591506001600160401b03821115614fad57600080fd5b6020019150368190038213156142c357600080fd5b8183823760009101908152919050565b600181811c90821680614fe657607f821691505b60208210810361500657634e487b7160e01b600052602260045260246000fd5b50919050565b600080835461501a81614fd2565b60018281168015615032576001811461504357615072565b60ff19841687528287019450615072565b8760005260208060002060005b858110156150695781548a820152908401908201615050565b50505082870194505b50929695505050505050565b828152600060206040818401526000845461509881614fd2565b80604087015260606001808416600081146150ba57600181146150ce576150fc565b60ff198516898401526080890195506150fc565b896000528660002060005b858110156150f45781548b82018601529083019088016150d9565b8a0184019650505b50939998505050505050505050565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b81835260006020808501808196508560051b810191508460005b87811015614c1a5782840389528135601e1988360301811261518557600080fd5b870180356001600160401b0381111561519d57600080fd5b8036038913156151ac57600080fd5b6151b98682898501615121565b9a87019a9550505090840190600101615164565b60a0808252810189905260008a60c08301825b8c81101561520b5763ffffffff6151f684614587565b168252602092830192909101906001016151e0565b508381036020858101919091528a825291508a90820160005b8b8110156152735782356152378161416e565b6001600160a01b03908116835283850135906152528261416e565b16828501526040838101359083015260609283019290910190600101615224565b508481036040860152615287818a8c61514a565b9250505085606084015282810360808401526152a4818587615121565b9c9b505050505050505050505050565b6000602082840312156152c657600080fd5b610acc82614587565b80546001600160a01b0319166001600160a01b0392909216919091179055565b81356152fa8161416e565b61530481836152cf565b5060208201356153138161416e565b61532081600184016152cf565b50604082013560028201555050565b63ffffffff9490941684526001600160a01b03928316602085015291166040830152606082015260800190565b6000808335601e1984360301811261537357600080fd5b8301803591506001600160401b0382111561538d57600080fd5b6020019150600581901b36038213156142c357600080fd5b6000808335601e198436030181126153bc57600080fd5b8301803591506001600160401b038211156153d657600080fd5b6020019150600781901b36038213156142c357600080fd5b9586526001600160a01b0394909416602086015291151560408501521515606084015215156080830152151560a082015260c00190565b60008251615437818460208701614b7a565b9190910192915050565b60008282101561545357615453614e38565b500390565b8281526040602082015260006154716040830184614ba6565b949350505050565b60006060828403121561548b57600080fd5b604051606081018181106001600160401b03821117156154ad576154ad614740565b60405282356154bb8161416e565b815260208301356154cb8161416e565b60208201526040928301359281019290925250919050565b600082198211156154f6576154f6614e38565b500190565b60006020828403121561550d57600080fd5b5051919050565b606081526000615528606083018688615121565b6001600160a01b038516602084015290506005831061555757634e487b7160e01b600052602160045260246000fd5b82604083015295945050505050565b60006020828403121561557857600080fd5b8151610acc81614193565b838152604060208201526000613f65604083018486615121565b6040815260006155b06040830185614ba6565b905060018060a01b03831660208301529392505050565b600060a082840312156155d957600080fd5b60405160a081018181106001600160401b03821117156155fb576155fb614740565b604052825161560981614193565b8152602083015161561981614193565b806020830152506040830151604082015260608301516060820152608083015161564281614193565b60808201529392505050565b60e08152600061566160e083018a614ba6565b6001600160a01b039890981660208301525094151560408601529215156060850152608084019190915260a0830152151560c090910152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516156d5816017850160208801614b7a565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615706816028840160208801614b7a565b01602801949350505050565b602081526000610acc6020830184614ba6565b600081600019048311821515161561573f5761573f614e38565b500290565b60008161575357615753614e38565b50600019019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc2de84d9fbdf6d06e2cc584295043dbd76046423b9f8bae9426d4fa5e7c03f4a7416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220367c630a8745ae5041bcceac9225522efb9510e5e8377954d7dd8344c5141f2c64736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class ProjectRegistryV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nProjectRegistryV1__factory.bytecode = _bytecode;\nProjectRegistryV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, ContractFactory, Interface, } from \"ethers\";\nconst _abi = [\n    {\n        inputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"constructor\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"previousAdmin\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"address\",\n                name: \"newAdmin\",\n                type: \"address\",\n            },\n        ],\n        name: \"AdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"beacon\",\n                type: \"address\",\n            },\n        ],\n        name: \"BeaconUpgraded\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                internalType: \"uint8\",\n                name: \"version\",\n                type: \"uint8\",\n            },\n        ],\n        name: \"Initialized\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"previousAdminRole\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"newAdminRole\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"RoleAdminChanged\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleGranted\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n        ],\n        name: \"RoleRevoked\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Stake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Stake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Unstake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"user\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                indexed: false,\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Unstake\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                internalType: \"address\",\n                name: \"implementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"Upgraded\",\n        type: \"event\",\n    },\n    {\n        inputs: [],\n        name: \"DEFAULT_ADMIN_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"UPGRADER_ROLE\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getProjectStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"projectStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n        ],\n        name: \"getRoleAdmin\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"getTotalStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"totalStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"userAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"getUserStake\",\n        outputs: [\n            {\n                internalType: \"uint256\",\n                name: \"userStake\",\n                type: \"uint256\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"grantRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"hasRole\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"projectRegistryAddress\",\n                type: \"address\",\n            },\n            {\n                internalType: \"address\",\n                name: \"tokenAddress\",\n                type: \"address\",\n            },\n        ],\n        name: \"initialize\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"sender\",\n                type: \"address\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"onTokenTransfer\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"projectRegistry\",\n        outputs: [\n            {\n                internalType: \"contract IProjectRegistryV1\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"proxiableUUID\",\n        outputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"\",\n                type: \"bytes32\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"renounceRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"role\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"address\",\n                name: \"account\",\n                type: \"address\",\n            },\n        ],\n        name: \"revokeRole\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"stake\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [],\n        name: \"stakingTokenAddress\",\n        outputs: [\n            {\n                internalType: \"address\",\n                name: \"\",\n                type: \"address\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes4\",\n                name: \"interfaceId\",\n                type: \"bytes4\",\n            },\n        ],\n        name: \"supportsInterface\",\n        outputs: [\n            {\n                internalType: \"bool\",\n                name: \"\",\n                type: \"bool\",\n            },\n        ],\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"bytes32\",\n                name: \"projectId\",\n                type: \"bytes32\",\n            },\n            {\n                internalType: \"uint256\",\n                name: \"amount\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"unstake\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n        ],\n        name: \"upgradeTo\",\n        outputs: [],\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        inputs: [\n            {\n                internalType: \"address\",\n                name: \"newImplementation\",\n                type: \"address\",\n            },\n            {\n                internalType: \"bytes\",\n                name: \"data\",\n                type: \"bytes\",\n            },\n        ],\n        name: \"upgradeToAndCall\",\n        outputs: [],\n        stateMutability: \"payable\",\n        type: \"function\",\n    },\n];\nconst _bytecode = \"0x60a06040523060805234801561001457600080fd5b50608051611ae661004c6000396000818161055f0152818161059f015281816107bd015281816107fd015261088c0152611ae66000f3fe60806040526004361061011f5760003560e01c80635a33d8dc116100a0578063a217fddf11610064578063a217fddf1461033c578063a4c0ed3614610351578063bbadc93a14610371578063d547741f146103a7578063f72c0d8b146103c757600080fd5b80635a33d8dc146102995780637bc74225146102b95780637e591001146102cf5780638caa5230146102fc57806391d148541461031c57600080fd5b80633659cfe6116100e75780633659cfe6146101f9578063485cc955146102195780634f1ef286146102395780635298b8691461024c57806352d1902d1461028457600080fd5b806301ffc9a71461012457806316ae261d14610159578063248a9ca31461017b5780632f2ff15d146101b957806336568abe146101d9575b600080fd5b34801561013057600080fd5b5061014461013f3660046115c4565b6103fb565b60405190151581526020015b60405180910390f35b34801561016557600080fd5b506101796101743660046115ee565b610432565b005b34801561018757600080fd5b506101ab610196366004611610565b60009081526065602052604090206001015490565b604051908152602001610150565b3480156101c557600080fd5b506101796101d4366004611645565b6104b2565b3480156101e557600080fd5b506101796101f4366004611645565b6104d7565b34801561020557600080fd5b50610179610214366004611671565b610555565b34801561022557600080fd5b5061017961023436600461168c565b610634565b6101796102473660046116cc565b6107b3565b34801561025857600080fd5b5060fc5461026c906001600160a01b031681565b6040516001600160a01b039091168152602001610150565b34801561029057600080fd5b506101ab61087f565b3480156102a557600080fd5b5060fb5461026c906001600160a01b031681565b3480156102c557600080fd5b50610100546101ab565b3480156102db57600080fd5b506101ab6102ea366004611610565b600090815260fe602052604090205490565b34801561030857600080fd5b506101796103173660046115ee565b610932565b34801561032857600080fd5b50610144610337366004611645565b610a6a565b34801561034857600080fd5b506101ab600081565b34801561035d57600080fd5b5061017961036c36600461178e565b610a95565b34801561037d57600080fd5b506101ab61038c366004611671565b6001600160a01b0316600090815260ff602052604090205490565b3480156103b357600080fd5b506101796103c2366004611645565b610bf8565b3480156103d357600080fd5b506101ab7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216637965db0b60e01b148061042c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b33600090815260fd60209081526040808320858452909152902054818110156104a25760405162461bcd60e51b815260206004820152601b60248201527f6572726f725f6e6f74456e6f756768546f6b656e735374616b6564000000000060448201526064015b60405180910390fd5b6104ad838333610c1d565b505050565b6000828152606560205260409020600101546104cd81610d91565b6104ad8383610d9b565b6001600160a01b03811633146105475760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610499565b6105518282610e21565b5050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361059d5760405162461bcd60e51b815260040161049990611815565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105e6600080516020611a6a833981519152546001600160a01b031690565b6001600160a01b03161461060c5760405162461bcd60e51b815260040161049990611861565b61061581610e88565b6040805160008082526020820190925261063191839190610eb2565b50565b600054610100900460ff16158080156106545750600054600160ff909116105b8061066e5750303b15801561066e575060005460ff166001145b6106d15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610499565b6000805460ff1916600117905580156106f4576000805461ff0019166101001790555b6106fc61101d565b61070461101d565b61070f600033610d9b565b6107397f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333610d9b565b60fb80546001600160a01b038086166001600160a01b03199283161790925560fc80549285169290911691909117905580156104ad576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036107fb5760405162461bcd60e51b815260040161049990611815565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610844600080516020611a6a833981519152546001600160a01b031690565b6001600160a01b03161461086a5760405162461bcd60e51b815260040161049990611861565b61087382610e88565b61055182826001610eb2565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461091f5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610499565b50600080516020611a6a83398151915290565b60fb54604051630e29a66960e21b81526004810184905283916001600160a01b0316906338a699a490602401602060405180830381865afa15801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f91906118ad565b6109e35760405162461bcd60e51b8152602060048201526015602482015274195c9c9bdc97dc1c9bda9958dd139bdd119bdd5b99605a1b6044820152606401610499565b60fc546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610a3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5e91906118ad565b506104ad83833361108a565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60208114610ada5760405162461bcd60e51b8152602060048201526012602482015271195c9c9bdc97d89859141c9bda9958dd125960721b6044820152606401610499565b60fc546001600160a01b03163314610b345760405162461bcd60e51b815260206004820152601760248201527f6572726f725f77726f6e675374616b696e67546f6b656e0000000000000000006044820152606401610499565b60fb54604051630e29a66960e21b8152833560048201819052916001600160a01b0316906338a699a490602401602060405180830381865afa158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba291906118ad565b610be65760405162461bcd60e51b8152602060048201526015602482015274195c9c9bdc97dc1c9bda9958dd139bdd119bdd5b99605a1b6044820152606401610499565b610bf181858761108a565b5050505050565b600082815260656020526040902060010154610c1381610d91565b6104ad8383610e21565b6001600160a01b038116600090815260fd6020908152604080832086845290915281208054849290610c509084906118e5565b9091555050600083815260fe602052604081208054849290610c739084906118e5565b90915550506001600160a01b038116600090815260ff602052604081208054849290610ca09084906118e5565b92505081905550816101006000828254610cba91906118e5565b909155505060fc5460405163a9059cbb60e01b81526001600160a01b038381166004830152602482018590529091169063a9059cbb906044016020604051808303816000875af1158015610d12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3691906118ad565b50600083815260fe6020908152604091829020548251858152918201526001600160a01b0383169185917f246e3b2e1792018ed0c6d518ad1fe01f2c7f445f1a459ab6dcf929089582892f91015b60405180910390a3505050565b610631813361117d565b610da58282610a6a565b6105515760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055610ddd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610e2b8282610a6a565b156105515760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e361055181610d91565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610ee5576104ad836111d6565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610f3f575060408051601f3d908101601f19168201909252610f3c918101906118fc565b60015b610fa25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610499565b600080516020611a6a83398151915281146110115760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610499565b506104ad838383611272565b600054610100900460ff166110885760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610499565b565b6001600160a01b038116600090815260fd60209081526040808320868452909152812080548492906110bd908490611915565b9091555050600083815260fe6020526040812080548492906110e0908490611915565b90915550506001600160a01b038116600090815260ff60205260408120805484929061110d908490611915565b925050819055508161010060008282546111279190611915565b9091555050600083815260fe6020908152604091829020548251858152918201526001600160a01b0383169185917f2bdde1c9d1017e533748fb83ed29c7cc39586ea82c3be3a2ffa08b7f048b214d9101610d84565b6111878282610a6a565b610551576111948161129d565b61119f8360206112af565b6040516020016111b0929190611959565b60408051601f198184030181529082905262461bcd60e51b8252610499916004016119ce565b6001600160a01b0381163b6112435760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610499565b600080516020611a6a83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61127b83611452565b6000825111806112885750805b156104ad576112978383611492565b50505050565b606061042c6001600160a01b03831660145b606060006112be836002611a01565b6112c9906002611915565b67ffffffffffffffff8111156112e1576112e16116b6565b6040519080825280601f01601f19166020018201604052801561130b576020820181803683370190505b509050600360fc1b8160008151811061132657611326611a20565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061135557611355611a20565b60200101906001600160f81b031916908160001a9053506000611379846002611a01565b611384906001611915565b90505b60018111156113fc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113b8576113b8611a20565b1a60f81b8282815181106113ce576113ce611a20565b60200101906001600160f81b031916908160001a90535060049490941c936113f581611a36565b9050611387565b50831561144b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610499565b9392505050565b61145b816111d6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6114fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610499565b600080846001600160a01b0316846040516115159190611a4d565b600060405180830381855af49150503d8060008114611550576040519150601f19603f3d011682016040523d82523d6000602084013e611555565b606091505b509150915061157d8282604051806060016040528060278152602001611a8a60279139611586565b95945050505050565b6060831561159557508161144b565b61144b83838151156115aa5781518083602001fd5b8060405162461bcd60e51b815260040161049991906119ce565b6000602082840312156115d657600080fd5b81356001600160e01b03198116811461144b57600080fd5b6000806040838503121561160157600080fd5b50508035926020909101359150565b60006020828403121561162257600080fd5b5035919050565b80356001600160a01b038116811461164057600080fd5b919050565b6000806040838503121561165857600080fd5b8235915061166860208401611629565b90509250929050565b60006020828403121561168357600080fd5b61144b82611629565b6000806040838503121561169f57600080fd5b6116a883611629565b915061166860208401611629565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156116df57600080fd5b6116e883611629565b9150602083013567ffffffffffffffff8082111561170557600080fd5b818501915085601f83011261171957600080fd5b81358181111561172b5761172b6116b6565b604051601f8201601f19908116603f01168101908382118183101715611753576117536116b6565b8160405282815288602084870101111561176c57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080600080606085870312156117a457600080fd5b6117ad85611629565b935060208501359250604085013567ffffffffffffffff808211156117d157600080fd5b818701915087601f8301126117e557600080fd5b8135818111156117f457600080fd5b88602082850101111561180657600080fd5b95989497505060200194505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6000602082840312156118bf57600080fd5b8151801515811461144b57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000828210156118f7576118f76118cf565b500390565b60006020828403121561190e57600080fd5b5051919050565b60008219821115611928576119286118cf565b500190565b60005b83811015611948578181015183820152602001611930565b838111156112975750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161199181601785016020880161192d565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516119c281602884016020880161192d565b01602801949350505050565b60208152600082518060208401526119ed81604085016020870161192d565b601f01601f19169190910160400192915050565b6000816000190483118215151615611a1b57611a1b6118cf565b500290565b634e487b7160e01b600052603260045260246000fd5b600081611a4557611a456118cf565b506000190190565b60008251611a5f81846020870161192d565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ac120d1bb5b25050b642540f502d3ae5701bcd4626260f27fa5ed072a127318964736f6c634300080d0033\";\nconst isSuperArgs = (xs) => xs.length > 1;\nexport class ProjectStakingV1__factory extends ContractFactory {\n    constructor(...args) {\n        if (isSuperArgs(args)) {\n            super(...args);\n        }\n        else {\n            super(_abi, _bytecode, args[0]);\n        }\n    }\n    getDeployTransaction(overrides) {\n        return super.getDeployTransaction(overrides || {});\n    }\n    deploy(overrides) {\n        return super.deploy(overrides || {});\n    }\n    connect(runner) {\n        return super.connect(runner);\n    }\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nProjectStakingV1__factory.bytecode = _bytecode;\nProjectStakingV1__factory.abi = _abi;\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\nimport { Contract, Interface } from \"ethers\";\nconst _abi = [\n    {\n        constant: true,\n        inputs: [],\n        name: \"name\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"string\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"spender\",\n                type: \"address\",\n            },\n            {\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"approve\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"totalSupply\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"transferFrom\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"decimals\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"uint8\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"mint\",\n        outputs: [],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [\n            {\n                name: \"owner\",\n                type: \"address\",\n            },\n        ],\n        name: \"balanceOf\",\n        outputs: [\n            {\n                name: \"balance\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [],\n        name: \"symbol\",\n        outputs: [\n            {\n                name: \"\",\n                type: \"string\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        constant: false,\n        inputs: [\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                name: \"value\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"transfer\",\n        outputs: [\n            {\n                name: \"success\",\n                type: \"bool\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"nonpayable\",\n        type: \"function\",\n    },\n    {\n        constant: true,\n        inputs: [\n            {\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                name: \"to\",\n                type: \"address\",\n            },\n        ],\n        name: \"allowance\",\n        outputs: [\n            {\n                name: \"remaining\",\n                type: \"uint256\",\n            },\n        ],\n        payable: false,\n        stateMutability: \"view\",\n        type: \"function\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: \"from\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                name: \"to\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Transfer\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: true,\n                name: \"tokenOwner\",\n                type: \"address\",\n            },\n            {\n                indexed: true,\n                name: \"spender\",\n                type: \"address\",\n            },\n            {\n                indexed: false,\n                name: \"tokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Approval\",\n        type: \"event\",\n    },\n    {\n        anonymous: false,\n        inputs: [\n            {\n                indexed: false,\n                name: \"newTokens\",\n                type: \"uint256\",\n            },\n        ],\n        name: \"Minted\",\n        type: \"event\",\n    },\n];\nexport class Token__factory {\n    static createInterface() {\n        return new Interface(_abi);\n    }\n    static connect(address, runner) {\n        return new Contract(address, _abi, runner);\n    }\n}\nToken__factory.abi = _abi;\n","import { ERC677ABI as erc677ABI, operatorABI, operatorFactoryABI, sponsorshipABI, streamrConfigABI, } from 'network-contracts-ethers6';\nimport { MarketplaceV4__factory, ProjectRegistryV1__factory } from '~/generated/types/hub';\nimport { Token__factory } from '~/generated/types/local';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nexport function getContractAbi(contractKey) {\n    switch (contractKey) {\n        case 'config':\n            return streamrConfigABI;\n        case 'projectRegistry':\n            return ProjectRegistryV1__factory.abi;\n        case 'erc20':\n            return Token__factory.abi;\n        case 'marketplace':\n            return MarketplaceV4__factory.abi;\n        case 'sponsorship':\n            return sponsorshipABI;\n        case 'operatorFactory':\n            return operatorFactoryABI;\n        case 'operator':\n            return operatorABI;\n        case 'erc677':\n            return erc677ABI;\n    }\n}\nexport function getContractAddress(addressKey, chainId) {\n    const { contracts } = getChainConfig(chainId);\n    const address = (() => {\n        switch (addressKey) {\n            case 'config':\n                return contracts.StreamrConfig;\n            case 'marketplace':\n                return (contracts.MarketplaceV4 ||\n                    contracts.RemoteMarketplaceV1 ||\n                    contracts.MarketplaceV3);\n            case 'operatorFactory':\n                return contracts.OperatorFactory;\n            case 'projectRegistry':\n                return contracts.ProjectRegistryV1;\n            case 'data':\n                return contracts.DATA;\n            case 'operatorDefaultDelegationPolicy':\n                return contracts.OperatorDefaultDelegationPolicy;\n            case 'operatorDefaultExchangeRatePolicy':\n                return contracts.OperatorDefaultExchangeRatePolicy;\n            case 'operatorDefaultUndelegationPolicy':\n                return contracts.OperatorDefaultUndelegationPolicy;\n            case 'sponsorshipPaymentToken':\n                return contracts[getChainConfigExtension(chainId).sponsorshipPaymentToken];\n            case 'sponsorshipDefaultLeavePolicy':\n                return contracts.SponsorshipDefaultLeavePolicy;\n            case 'sponsorshipFactory':\n                return contracts.SponsorshipFactory;\n            case 'sponsorshipMaxOperatorsJoinPolicy':\n                return contracts.SponsorshipMaxOperatorsJoinPolicy;\n            case 'sponsorshipStakeWeightedAllocationPolicy':\n                return contracts.SponsorshipStakeWeightedAllocationPolicy;\n            case 'sponsorshipVoteKickPolicy':\n                return contracts.SponsorshipVoteKickPolicy;\n            case 'streamRegistry':\n                return contracts.StreamRegistry;\n            case 'streamStorage':\n                return contracts.StreamStorageRegistry;\n            case 'dataUnionFactory':\n                return contracts.DataUnionFactory;\n        }\n    })();\n    if (!address) {\n        throw new Error(`No \"${addressKey}\" contract address found for chain ${chainId}`);\n    }\n    return address;\n}\n","import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nconst graphClients = {};\nexport function getGraphClient(chainId) {\n    const graphClient = graphClients[chainId] ||\n        new ApolloClient({\n            uri: getGraphUrl(chainId),\n            cache: new InMemoryCache(),\n        });\n    if (!graphClients[chainId]) {\n        graphClients[chainId] = graphClient;\n    }\n    return graphClient;\n}\nexport function getGraphUrl(chainId) {\n    const { theGraphUrl: defaultUrl } = getChainConfig(chainId);\n    const { networkSubgraphUrl: customUrl } = getChainConfigExtension(chainId);\n    const url = customUrl || defaultUrl;\n    if (!url) {\n        throw new Error(`Missing network subgraph url for chain ${chainId}`);\n    }\n    return url;\n}\nconst dataUnionGraphClients = {};\nexport function getDataUnionGraphClient(chainId) {\n    const { dataunionGraphNames } = getChainConfigExtension(chainId);\n    const item = dataunionGraphNames.find((i) => i.chainId === chainId);\n    if (typeof item?.name !== 'string') {\n        throw new Error(`No dataunionGraphNames defined in config for chain ${chainId}!`);\n    }\n    const networkSubgraphUrl = getGraphUrl(chainId);\n    const { origin } = new URL(networkSubgraphUrl);\n    const client = dataUnionGraphClients[chainId] ||\n        new ApolloClient({\n            uri: `${origin}/subgraphs/name/${item.name}`,\n            cache: new InMemoryCache(),\n        });\n    if (!dataUnionGraphClients[chainId]) {\n        dataUnionGraphClients[chainId] = client;\n    }\n    return client;\n}\nconst indexerGraphClients = {};\nexport function getIndexerClient(chainId) {\n    const uri = getChainConfigExtension(chainId).streamIndexerUrl;\n    if (!uri) {\n        return null;\n    }\n    const client = indexerGraphClients[chainId] ||\n        new ApolloClient({\n            uri,\n            cache: new InMemoryCache(),\n        });\n    if (!indexerGraphClients[chainId]) {\n        indexerGraphClients[chainId] = client;\n    }\n    return client;\n}\n","import { getChainConfig } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { getGraphUrl } from './getGraphClient';\nexport default function getClientConfig(chainId, mods = {}) {\n    const chainConfig = getChainConfig(chainId);\n    const config = {\n        metrics: false,\n    };\n    // Set network entrypoints if provided\n    if (chainConfig.entryPoints && chainConfig.entryPoints.length > 0) {\n        config.network = {\n            controlLayer: {\n                entryPoints: [...chainConfig.entryPoints],\n            },\n        };\n    }\n    config.contracts = {\n        ethereumNetwork: {\n            chainId,\n        },\n        rpcs: chainConfig.rpcEndpoints.map(rpc => ({ url: rpc.url })),\n        streamRegistryChainAddress: getContractAddress('streamRegistry', chainId),\n        streamStorageRegistryChainAddress: getContractAddress('streamStorage', chainId),\n        theGraphUrl: getGraphUrl(chainId),\n    };\n    return {\n        ...config,\n        ...mods,\n    };\n}\n","import { isMessagedObject } from '~/utils/exceptions';\nexport class BehindIndexError {\n    constructor(expectedBlockNumber, actualBlockNumber) {\n        this.expectedBlockNumber = expectedBlockNumber;\n        this.actualBlockNumber = actualBlockNumber;\n    }\n}\nexport function prehandleBehindBlockError(e, expectedBlockNumber) {\n    /**\n     * api.thegraph.com responds with the following error response for future blocks:\n     * \"indexed up to block number <X> and data for block number <Y> is therefore not yet available\"\n     */\n    const blockRegexp0 = /indexed up to block number (\\d+)/i;\n    /**\n     * gateway-arbitrum.network.thegraph.com responds with the following error response for future blocks:\n     * \"block not found: <Z>\"\n     */\n    const blockRegexp1 = /block not found: (\\d+)/i;\n    if (!isMessagedObject(e)) {\n        return;\n    }\n    if (blockRegexp0.test(e.message)) {\n        throw new BehindIndexError(expectedBlockNumber, Number(e.message.match(blockRegexp0)[1]));\n    }\n    if (blockRegexp1.test(e.message)) {\n        /**\n         * Block number in the error message (see `blockRegexp1`) could not be found thus the latest\n         * ingested one is the one prior.\n         */\n        throw new BehindIndexError(expectedBlockNumber, Number(e.message.match(blockRegexp1)[1]) - 1);\n    }\n}\n","import { gql } from '@apollo/client';\nexport var AbiChanged_OrderBy;\n(function (AbiChanged_OrderBy) {\n    AbiChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AbiChanged_OrderBy[\"ContentType\"] = \"contentType\";\n    AbiChanged_OrderBy[\"Id\"] = \"id\";\n    AbiChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AbiChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AbiChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AbiChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AbiChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AbiChanged_OrderBy || (AbiChanged_OrderBy = {}));\nexport var Account_OrderBy;\n(function (Account_OrderBy) {\n    Account_OrderBy[\"Domains\"] = \"domains\";\n    Account_OrderBy[\"Id\"] = \"id\";\n    Account_OrderBy[\"Registrations\"] = \"registrations\";\n    Account_OrderBy[\"WrappedDomains\"] = \"wrappedDomains\";\n})(Account_OrderBy || (Account_OrderBy = {}));\nexport var AddrChanged_OrderBy;\n(function (AddrChanged_OrderBy) {\n    AddrChanged_OrderBy[\"Addr\"] = \"addr\";\n    AddrChanged_OrderBy[\"AddrId\"] = \"addr__id\";\n    AddrChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AddrChanged_OrderBy[\"Id\"] = \"id\";\n    AddrChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AddrChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AddrChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AddrChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AddrChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AddrChanged_OrderBy || (AddrChanged_OrderBy = {}));\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var AuthorisationChanged_OrderBy;\n(function (AuthorisationChanged_OrderBy) {\n    AuthorisationChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    AuthorisationChanged_OrderBy[\"Id\"] = \"id\";\n    AuthorisationChanged_OrderBy[\"IsAuthorized\"] = \"isAuthorized\";\n    AuthorisationChanged_OrderBy[\"Owner\"] = \"owner\";\n    AuthorisationChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    AuthorisationChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    AuthorisationChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    AuthorisationChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    AuthorisationChanged_OrderBy[\"Target\"] = \"target\";\n    AuthorisationChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(AuthorisationChanged_OrderBy || (AuthorisationChanged_OrderBy = {}));\nexport var ContenthashChanged_OrderBy;\n(function (ContenthashChanged_OrderBy) {\n    ContenthashChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ContenthashChanged_OrderBy[\"Hash\"] = \"hash\";\n    ContenthashChanged_OrderBy[\"Id\"] = \"id\";\n    ContenthashChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    ContenthashChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    ContenthashChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    ContenthashChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    ContenthashChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ContenthashChanged_OrderBy || (ContenthashChanged_OrderBy = {}));\nexport var DomainEvent_OrderBy;\n(function (DomainEvent_OrderBy) {\n    DomainEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    DomainEvent_OrderBy[\"Domain\"] = \"domain\";\n    DomainEvent_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    DomainEvent_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    DomainEvent_OrderBy[\"DomainId\"] = \"domain__id\";\n    DomainEvent_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    DomainEvent_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    DomainEvent_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    DomainEvent_OrderBy[\"DomainName\"] = \"domain__name\";\n    DomainEvent_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    DomainEvent_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    DomainEvent_OrderBy[\"Id\"] = \"id\";\n    DomainEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(DomainEvent_OrderBy || (DomainEvent_OrderBy = {}));\nexport var Domain_OrderBy;\n(function (Domain_OrderBy) {\n    Domain_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Domain_OrderBy[\"Events\"] = \"events\";\n    Domain_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    Domain_OrderBy[\"Id\"] = \"id\";\n    Domain_OrderBy[\"IsMigrated\"] = \"isMigrated\";\n    Domain_OrderBy[\"LabelName\"] = \"labelName\";\n    Domain_OrderBy[\"Labelhash\"] = \"labelhash\";\n    Domain_OrderBy[\"Name\"] = \"name\";\n    Domain_OrderBy[\"Owner\"] = \"owner\";\n    Domain_OrderBy[\"OwnerId\"] = \"owner__id\";\n    Domain_OrderBy[\"Parent\"] = \"parent\";\n    Domain_OrderBy[\"ParentCreatedAt\"] = \"parent__createdAt\";\n    Domain_OrderBy[\"ParentExpiryDate\"] = \"parent__expiryDate\";\n    Domain_OrderBy[\"ParentId\"] = \"parent__id\";\n    Domain_OrderBy[\"ParentIsMigrated\"] = \"parent__isMigrated\";\n    Domain_OrderBy[\"ParentLabelName\"] = \"parent__labelName\";\n    Domain_OrderBy[\"ParentLabelhash\"] = \"parent__labelhash\";\n    Domain_OrderBy[\"ParentName\"] = \"parent__name\";\n    Domain_OrderBy[\"ParentSubdomainCount\"] = \"parent__subdomainCount\";\n    Domain_OrderBy[\"ParentTtl\"] = \"parent__ttl\";\n    Domain_OrderBy[\"Registrant\"] = \"registrant\";\n    Domain_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    Domain_OrderBy[\"Registration\"] = \"registration\";\n    Domain_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    Domain_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    Domain_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    Domain_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    Domain_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    Domain_OrderBy[\"ResolvedAddress\"] = \"resolvedAddress\";\n    Domain_OrderBy[\"ResolvedAddressId\"] = \"resolvedAddress__id\";\n    Domain_OrderBy[\"Resolver\"] = \"resolver\";\n    Domain_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    Domain_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    Domain_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    Domain_OrderBy[\"SubdomainCount\"] = \"subdomainCount\";\n    Domain_OrderBy[\"Subdomains\"] = \"subdomains\";\n    Domain_OrderBy[\"Ttl\"] = \"ttl\";\n    Domain_OrderBy[\"WrappedDomain\"] = \"wrappedDomain\";\n    Domain_OrderBy[\"WrappedDomainExpiryDate\"] = \"wrappedDomain__expiryDate\";\n    Domain_OrderBy[\"WrappedDomainFuses\"] = \"wrappedDomain__fuses\";\n    Domain_OrderBy[\"WrappedDomainId\"] = \"wrappedDomain__id\";\n    Domain_OrderBy[\"WrappedDomainName\"] = \"wrappedDomain__name\";\n    Domain_OrderBy[\"WrappedOwner\"] = \"wrappedOwner\";\n    Domain_OrderBy[\"WrappedOwnerId\"] = \"wrappedOwner__id\";\n})(Domain_OrderBy || (Domain_OrderBy = {}));\nexport var ExpiryExtended_OrderBy;\n(function (ExpiryExtended_OrderBy) {\n    ExpiryExtended_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ExpiryExtended_OrderBy[\"Domain\"] = \"domain\";\n    ExpiryExtended_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    ExpiryExtended_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    ExpiryExtended_OrderBy[\"DomainId\"] = \"domain__id\";\n    ExpiryExtended_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    ExpiryExtended_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    ExpiryExtended_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    ExpiryExtended_OrderBy[\"DomainName\"] = \"domain__name\";\n    ExpiryExtended_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    ExpiryExtended_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    ExpiryExtended_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    ExpiryExtended_OrderBy[\"Id\"] = \"id\";\n    ExpiryExtended_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ExpiryExtended_OrderBy || (ExpiryExtended_OrderBy = {}));\nexport var FusesSet_OrderBy;\n(function (FusesSet_OrderBy) {\n    FusesSet_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    FusesSet_OrderBy[\"Domain\"] = \"domain\";\n    FusesSet_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    FusesSet_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    FusesSet_OrderBy[\"DomainId\"] = \"domain__id\";\n    FusesSet_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    FusesSet_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    FusesSet_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    FusesSet_OrderBy[\"DomainName\"] = \"domain__name\";\n    FusesSet_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    FusesSet_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    FusesSet_OrderBy[\"Fuses\"] = \"fuses\";\n    FusesSet_OrderBy[\"Id\"] = \"id\";\n    FusesSet_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(FusesSet_OrderBy || (FusesSet_OrderBy = {}));\nexport var InterfaceChanged_OrderBy;\n(function (InterfaceChanged_OrderBy) {\n    InterfaceChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    InterfaceChanged_OrderBy[\"Id\"] = \"id\";\n    InterfaceChanged_OrderBy[\"Implementer\"] = \"implementer\";\n    InterfaceChanged_OrderBy[\"InterfaceId\"] = \"interfaceID\";\n    InterfaceChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    InterfaceChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    InterfaceChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    InterfaceChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    InterfaceChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(InterfaceChanged_OrderBy || (InterfaceChanged_OrderBy = {}));\nexport var MulticoinAddrChanged_OrderBy;\n(function (MulticoinAddrChanged_OrderBy) {\n    MulticoinAddrChanged_OrderBy[\"Addr\"] = \"addr\";\n    MulticoinAddrChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    MulticoinAddrChanged_OrderBy[\"CoinType\"] = \"coinType\";\n    MulticoinAddrChanged_OrderBy[\"Id\"] = \"id\";\n    MulticoinAddrChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    MulticoinAddrChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    MulticoinAddrChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    MulticoinAddrChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    MulticoinAddrChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(MulticoinAddrChanged_OrderBy || (MulticoinAddrChanged_OrderBy = {}));\nexport var NameChanged_OrderBy;\n(function (NameChanged_OrderBy) {\n    NameChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameChanged_OrderBy[\"Id\"] = \"id\";\n    NameChanged_OrderBy[\"Name\"] = \"name\";\n    NameChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    NameChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    NameChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    NameChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    NameChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameChanged_OrderBy || (NameChanged_OrderBy = {}));\nexport var NameRegistered_OrderBy;\n(function (NameRegistered_OrderBy) {\n    NameRegistered_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameRegistered_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameRegistered_OrderBy[\"Id\"] = \"id\";\n    NameRegistered_OrderBy[\"Registrant\"] = \"registrant\";\n    NameRegistered_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    NameRegistered_OrderBy[\"Registration\"] = \"registration\";\n    NameRegistered_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameRegistered_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameRegistered_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameRegistered_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameRegistered_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameRegistered_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameRegistered_OrderBy || (NameRegistered_OrderBy = {}));\nexport var NameRenewed_OrderBy;\n(function (NameRenewed_OrderBy) {\n    NameRenewed_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameRenewed_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameRenewed_OrderBy[\"Id\"] = \"id\";\n    NameRenewed_OrderBy[\"Registration\"] = \"registration\";\n    NameRenewed_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameRenewed_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameRenewed_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameRenewed_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameRenewed_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameRenewed_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameRenewed_OrderBy || (NameRenewed_OrderBy = {}));\nexport var NameTransferred_OrderBy;\n(function (NameTransferred_OrderBy) {\n    NameTransferred_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameTransferred_OrderBy[\"Id\"] = \"id\";\n    NameTransferred_OrderBy[\"NewOwner\"] = \"newOwner\";\n    NameTransferred_OrderBy[\"NewOwnerId\"] = \"newOwner__id\";\n    NameTransferred_OrderBy[\"Registration\"] = \"registration\";\n    NameTransferred_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    NameTransferred_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    NameTransferred_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    NameTransferred_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    NameTransferred_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    NameTransferred_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameTransferred_OrderBy || (NameTransferred_OrderBy = {}));\nexport var NameUnwrapped_OrderBy;\n(function (NameUnwrapped_OrderBy) {\n    NameUnwrapped_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameUnwrapped_OrderBy[\"Domain\"] = \"domain\";\n    NameUnwrapped_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NameUnwrapped_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NameUnwrapped_OrderBy[\"DomainId\"] = \"domain__id\";\n    NameUnwrapped_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NameUnwrapped_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NameUnwrapped_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NameUnwrapped_OrderBy[\"DomainName\"] = \"domain__name\";\n    NameUnwrapped_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NameUnwrapped_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NameUnwrapped_OrderBy[\"Id\"] = \"id\";\n    NameUnwrapped_OrderBy[\"Owner\"] = \"owner\";\n    NameUnwrapped_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NameUnwrapped_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameUnwrapped_OrderBy || (NameUnwrapped_OrderBy = {}));\nexport var NameWrapped_OrderBy;\n(function (NameWrapped_OrderBy) {\n    NameWrapped_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NameWrapped_OrderBy[\"Domain\"] = \"domain\";\n    NameWrapped_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NameWrapped_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NameWrapped_OrderBy[\"DomainId\"] = \"domain__id\";\n    NameWrapped_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NameWrapped_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NameWrapped_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NameWrapped_OrderBy[\"DomainName\"] = \"domain__name\";\n    NameWrapped_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NameWrapped_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NameWrapped_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    NameWrapped_OrderBy[\"Fuses\"] = \"fuses\";\n    NameWrapped_OrderBy[\"Id\"] = \"id\";\n    NameWrapped_OrderBy[\"Name\"] = \"name\";\n    NameWrapped_OrderBy[\"Owner\"] = \"owner\";\n    NameWrapped_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NameWrapped_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NameWrapped_OrderBy || (NameWrapped_OrderBy = {}));\nexport var NewOwner_OrderBy;\n(function (NewOwner_OrderBy) {\n    NewOwner_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewOwner_OrderBy[\"Domain\"] = \"domain\";\n    NewOwner_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewOwner_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewOwner_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewOwner_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewOwner_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewOwner_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewOwner_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewOwner_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewOwner_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewOwner_OrderBy[\"Id\"] = \"id\";\n    NewOwner_OrderBy[\"Owner\"] = \"owner\";\n    NewOwner_OrderBy[\"OwnerId\"] = \"owner__id\";\n    NewOwner_OrderBy[\"ParentDomain\"] = \"parentDomain\";\n    NewOwner_OrderBy[\"ParentDomainCreatedAt\"] = \"parentDomain__createdAt\";\n    NewOwner_OrderBy[\"ParentDomainExpiryDate\"] = \"parentDomain__expiryDate\";\n    NewOwner_OrderBy[\"ParentDomainId\"] = \"parentDomain__id\";\n    NewOwner_OrderBy[\"ParentDomainIsMigrated\"] = \"parentDomain__isMigrated\";\n    NewOwner_OrderBy[\"ParentDomainLabelName\"] = \"parentDomain__labelName\";\n    NewOwner_OrderBy[\"ParentDomainLabelhash\"] = \"parentDomain__labelhash\";\n    NewOwner_OrderBy[\"ParentDomainName\"] = \"parentDomain__name\";\n    NewOwner_OrderBy[\"ParentDomainSubdomainCount\"] = \"parentDomain__subdomainCount\";\n    NewOwner_OrderBy[\"ParentDomainTtl\"] = \"parentDomain__ttl\";\n    NewOwner_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NewOwner_OrderBy || (NewOwner_OrderBy = {}));\nexport var NewResolver_OrderBy;\n(function (NewResolver_OrderBy) {\n    NewResolver_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewResolver_OrderBy[\"Domain\"] = \"domain\";\n    NewResolver_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewResolver_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewResolver_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewResolver_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewResolver_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewResolver_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewResolver_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewResolver_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewResolver_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewResolver_OrderBy[\"Id\"] = \"id\";\n    NewResolver_OrderBy[\"Resolver\"] = \"resolver\";\n    NewResolver_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    NewResolver_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    NewResolver_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    NewResolver_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(NewResolver_OrderBy || (NewResolver_OrderBy = {}));\nexport var NewTtl_OrderBy;\n(function (NewTtl_OrderBy) {\n    NewTtl_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    NewTtl_OrderBy[\"Domain\"] = \"domain\";\n    NewTtl_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    NewTtl_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    NewTtl_OrderBy[\"DomainId\"] = \"domain__id\";\n    NewTtl_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    NewTtl_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    NewTtl_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    NewTtl_OrderBy[\"DomainName\"] = \"domain__name\";\n    NewTtl_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    NewTtl_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    NewTtl_OrderBy[\"Id\"] = \"id\";\n    NewTtl_OrderBy[\"TransactionId\"] = \"transactionID\";\n    NewTtl_OrderBy[\"Ttl\"] = \"ttl\";\n})(NewTtl_OrderBy || (NewTtl_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var PubkeyChanged_OrderBy;\n(function (PubkeyChanged_OrderBy) {\n    PubkeyChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    PubkeyChanged_OrderBy[\"Id\"] = \"id\";\n    PubkeyChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    PubkeyChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    PubkeyChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    PubkeyChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    PubkeyChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    PubkeyChanged_OrderBy[\"X\"] = \"x\";\n    PubkeyChanged_OrderBy[\"Y\"] = \"y\";\n})(PubkeyChanged_OrderBy || (PubkeyChanged_OrderBy = {}));\nexport var RegistrationEvent_OrderBy;\n(function (RegistrationEvent_OrderBy) {\n    RegistrationEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    RegistrationEvent_OrderBy[\"Id\"] = \"id\";\n    RegistrationEvent_OrderBy[\"Registration\"] = \"registration\";\n    RegistrationEvent_OrderBy[\"RegistrationCost\"] = \"registration__cost\";\n    RegistrationEvent_OrderBy[\"RegistrationExpiryDate\"] = \"registration__expiryDate\";\n    RegistrationEvent_OrderBy[\"RegistrationId\"] = \"registration__id\";\n    RegistrationEvent_OrderBy[\"RegistrationLabelName\"] = \"registration__labelName\";\n    RegistrationEvent_OrderBy[\"RegistrationRegistrationDate\"] = \"registration__registrationDate\";\n    RegistrationEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(RegistrationEvent_OrderBy || (RegistrationEvent_OrderBy = {}));\nexport var Registration_OrderBy;\n(function (Registration_OrderBy) {\n    Registration_OrderBy[\"Cost\"] = \"cost\";\n    Registration_OrderBy[\"Domain\"] = \"domain\";\n    Registration_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Registration_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Registration_OrderBy[\"DomainId\"] = \"domain__id\";\n    Registration_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Registration_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Registration_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Registration_OrderBy[\"DomainName\"] = \"domain__name\";\n    Registration_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Registration_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Registration_OrderBy[\"Events\"] = \"events\";\n    Registration_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    Registration_OrderBy[\"Id\"] = \"id\";\n    Registration_OrderBy[\"LabelName\"] = \"labelName\";\n    Registration_OrderBy[\"Registrant\"] = \"registrant\";\n    Registration_OrderBy[\"RegistrantId\"] = \"registrant__id\";\n    Registration_OrderBy[\"RegistrationDate\"] = \"registrationDate\";\n})(Registration_OrderBy || (Registration_OrderBy = {}));\nexport var ResolverEvent_OrderBy;\n(function (ResolverEvent_OrderBy) {\n    ResolverEvent_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    ResolverEvent_OrderBy[\"Id\"] = \"id\";\n    ResolverEvent_OrderBy[\"Resolver\"] = \"resolver\";\n    ResolverEvent_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    ResolverEvent_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    ResolverEvent_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    ResolverEvent_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(ResolverEvent_OrderBy || (ResolverEvent_OrderBy = {}));\nexport var Resolver_OrderBy;\n(function (Resolver_OrderBy) {\n    Resolver_OrderBy[\"Addr\"] = \"addr\";\n    Resolver_OrderBy[\"AddrId\"] = \"addr__id\";\n    Resolver_OrderBy[\"Address\"] = \"address\";\n    Resolver_OrderBy[\"CoinTypes\"] = \"coinTypes\";\n    Resolver_OrderBy[\"ContentHash\"] = \"contentHash\";\n    Resolver_OrderBy[\"Domain\"] = \"domain\";\n    Resolver_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Resolver_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Resolver_OrderBy[\"DomainId\"] = \"domain__id\";\n    Resolver_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Resolver_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Resolver_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Resolver_OrderBy[\"DomainName\"] = \"domain__name\";\n    Resolver_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Resolver_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Resolver_OrderBy[\"Events\"] = \"events\";\n    Resolver_OrderBy[\"Id\"] = \"id\";\n    Resolver_OrderBy[\"Texts\"] = \"texts\";\n})(Resolver_OrderBy || (Resolver_OrderBy = {}));\nexport var TextChanged_OrderBy;\n(function (TextChanged_OrderBy) {\n    TextChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    TextChanged_OrderBy[\"Id\"] = \"id\";\n    TextChanged_OrderBy[\"Key\"] = \"key\";\n    TextChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    TextChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    TextChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    TextChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    TextChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    TextChanged_OrderBy[\"Value\"] = \"value\";\n})(TextChanged_OrderBy || (TextChanged_OrderBy = {}));\nexport var Transfer_OrderBy;\n(function (Transfer_OrderBy) {\n    Transfer_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    Transfer_OrderBy[\"Domain\"] = \"domain\";\n    Transfer_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    Transfer_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    Transfer_OrderBy[\"DomainId\"] = \"domain__id\";\n    Transfer_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    Transfer_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    Transfer_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    Transfer_OrderBy[\"DomainName\"] = \"domain__name\";\n    Transfer_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    Transfer_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    Transfer_OrderBy[\"Id\"] = \"id\";\n    Transfer_OrderBy[\"Owner\"] = \"owner\";\n    Transfer_OrderBy[\"OwnerId\"] = \"owner__id\";\n    Transfer_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(Transfer_OrderBy || (Transfer_OrderBy = {}));\nexport var VersionChanged_OrderBy;\n(function (VersionChanged_OrderBy) {\n    VersionChanged_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    VersionChanged_OrderBy[\"Id\"] = \"id\";\n    VersionChanged_OrderBy[\"Resolver\"] = \"resolver\";\n    VersionChanged_OrderBy[\"ResolverAddress\"] = \"resolver__address\";\n    VersionChanged_OrderBy[\"ResolverContentHash\"] = \"resolver__contentHash\";\n    VersionChanged_OrderBy[\"ResolverId\"] = \"resolver__id\";\n    VersionChanged_OrderBy[\"TransactionId\"] = \"transactionID\";\n    VersionChanged_OrderBy[\"Version\"] = \"version\";\n})(VersionChanged_OrderBy || (VersionChanged_OrderBy = {}));\nexport var WrappedDomain_OrderBy;\n(function (WrappedDomain_OrderBy) {\n    WrappedDomain_OrderBy[\"Domain\"] = \"domain\";\n    WrappedDomain_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    WrappedDomain_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    WrappedDomain_OrderBy[\"DomainId\"] = \"domain__id\";\n    WrappedDomain_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    WrappedDomain_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    WrappedDomain_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    WrappedDomain_OrderBy[\"DomainName\"] = \"domain__name\";\n    WrappedDomain_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    WrappedDomain_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    WrappedDomain_OrderBy[\"ExpiryDate\"] = \"expiryDate\";\n    WrappedDomain_OrderBy[\"Fuses\"] = \"fuses\";\n    WrappedDomain_OrderBy[\"Id\"] = \"id\";\n    WrappedDomain_OrderBy[\"Name\"] = \"name\";\n    WrappedDomain_OrderBy[\"Owner\"] = \"owner\";\n    WrappedDomain_OrderBy[\"OwnerId\"] = \"owner__id\";\n})(WrappedDomain_OrderBy || (WrappedDomain_OrderBy = {}));\nexport var WrappedTransfer_OrderBy;\n(function (WrappedTransfer_OrderBy) {\n    WrappedTransfer_OrderBy[\"BlockNumber\"] = \"blockNumber\";\n    WrappedTransfer_OrderBy[\"Domain\"] = \"domain\";\n    WrappedTransfer_OrderBy[\"DomainCreatedAt\"] = \"domain__createdAt\";\n    WrappedTransfer_OrderBy[\"DomainExpiryDate\"] = \"domain__expiryDate\";\n    WrappedTransfer_OrderBy[\"DomainId\"] = \"domain__id\";\n    WrappedTransfer_OrderBy[\"DomainIsMigrated\"] = \"domain__isMigrated\";\n    WrappedTransfer_OrderBy[\"DomainLabelName\"] = \"domain__labelName\";\n    WrappedTransfer_OrderBy[\"DomainLabelhash\"] = \"domain__labelhash\";\n    WrappedTransfer_OrderBy[\"DomainName\"] = \"domain__name\";\n    WrappedTransfer_OrderBy[\"DomainSubdomainCount\"] = \"domain__subdomainCount\";\n    WrappedTransfer_OrderBy[\"DomainTtl\"] = \"domain__ttl\";\n    WrappedTransfer_OrderBy[\"Id\"] = \"id\";\n    WrappedTransfer_OrderBy[\"Owner\"] = \"owner\";\n    WrappedTransfer_OrderBy[\"OwnerId\"] = \"owner__id\";\n    WrappedTransfer_OrderBy[\"TransactionId\"] = \"transactionID\";\n})(WrappedTransfer_OrderBy || (WrappedTransfer_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const GetEnsDomainsForAccountDocument = gql `\n    query getEnsDomainsForAccount($account: String!) {\n  domains(where: {owner_in: [$account]}, orderBy: name) {\n    name\n  }\n  wrappedDomains(where: {owner_in: [$account]}, orderBy: name) {\n    name\n  }\n}\n    `;\n","import { gql } from '@apollo/client';\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var Delegation_OrderBy;\n(function (Delegation_OrderBy) {\n    Delegation_OrderBy[\"ValueDataWei\"] = \"_valueDataWei\";\n    Delegation_OrderBy[\"Delegator\"] = \"delegator\";\n    Delegation_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    Delegation_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    Delegation_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    Delegation_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    Delegation_OrderBy[\"EarliestUndelegationTimestamp\"] = \"earliestUndelegationTimestamp\";\n    Delegation_OrderBy[\"Id\"] = \"id\";\n    Delegation_OrderBy[\"IsSelfDelegation\"] = \"isSelfDelegation\";\n    Delegation_OrderBy[\"LatestDelegationTimestamp\"] = \"latestDelegationTimestamp\";\n    Delegation_OrderBy[\"Operator\"] = \"operator\";\n    Delegation_OrderBy[\"OperatorTokenBalanceWei\"] = \"operatorTokenBalanceWei\";\n    Delegation_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    Delegation_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    Delegation_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    Delegation_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    Delegation_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    Delegation_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    Delegation_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    Delegation_OrderBy[\"OperatorId\"] = \"operator__id\";\n    Delegation_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    Delegation_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    Delegation_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    Delegation_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    Delegation_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    Delegation_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    Delegation_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    Delegation_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    Delegation_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    Delegation_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    Delegation_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    Delegation_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    Delegation_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n})(Delegation_OrderBy || (Delegation_OrderBy = {}));\nexport var DelegatorDailyBucket_OrderBy;\n(function (DelegatorDailyBucket_OrderBy) {\n    DelegatorDailyBucket_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    DelegatorDailyBucket_OrderBy[\"Date\"] = \"date\";\n    DelegatorDailyBucket_OrderBy[\"Delegator\"] = \"delegator\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    DelegatorDailyBucket_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    DelegatorDailyBucket_OrderBy[\"Id\"] = \"id\";\n    DelegatorDailyBucket_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    DelegatorDailyBucket_OrderBy[\"TotalValueDataWei\"] = \"totalValueDataWei\";\n})(DelegatorDailyBucket_OrderBy || (DelegatorDailyBucket_OrderBy = {}));\nexport var Delegator_OrderBy;\n(function (Delegator_OrderBy) {\n    Delegator_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    Delegator_OrderBy[\"Delegations\"] = \"delegations\";\n    Delegator_OrderBy[\"Id\"] = \"id\";\n    Delegator_OrderBy[\"NumberOfDelegations\"] = \"numberOfDelegations\";\n    Delegator_OrderBy[\"QueueEntries\"] = \"queueEntries\";\n    Delegator_OrderBy[\"TotalValueDataWei\"] = \"totalValueDataWei\";\n})(Delegator_OrderBy || (Delegator_OrderBy = {}));\nexport var Flag_OrderBy;\n(function (Flag_OrderBy) {\n    Flag_OrderBy[\"FlagResolutionTimestamp\"] = \"flagResolutionTimestamp\";\n    Flag_OrderBy[\"Flagger\"] = \"flagger\";\n    Flag_OrderBy[\"FlaggerContractVersion\"] = \"flagger__contractVersion\";\n    Flag_OrderBy[\"FlaggerCumulativeEarningsWei\"] = \"flagger__cumulativeEarningsWei\";\n    Flag_OrderBy[\"FlaggerCumulativeOperatorsCutWei\"] = \"flagger__cumulativeOperatorsCutWei\";\n    Flag_OrderBy[\"FlaggerCumulativeProfitsWei\"] = \"flagger__cumulativeProfitsWei\";\n    Flag_OrderBy[\"FlaggerDataTokenBalanceWei\"] = \"flagger__dataTokenBalanceWei\";\n    Flag_OrderBy[\"FlaggerDelegatorCount\"] = \"flagger__delegatorCount\";\n    Flag_OrderBy[\"FlaggerExchangeRate\"] = \"flagger__exchangeRate\";\n    Flag_OrderBy[\"FlaggerId\"] = \"flagger__id\";\n    Flag_OrderBy[\"FlaggerIsEligibleToVote\"] = \"flagger__isEligibleToVote\";\n    Flag_OrderBy[\"FlaggerLatestHeartbeatMetadata\"] = \"flagger__latestHeartbeatMetadata\";\n    Flag_OrderBy[\"FlaggerLatestHeartbeatTimestamp\"] = \"flagger__latestHeartbeatTimestamp\";\n    Flag_OrderBy[\"FlaggerMetadataJsonString\"] = \"flagger__metadataJsonString\";\n    Flag_OrderBy[\"FlaggerOperatorTokenTotalSupplyWei\"] = \"flagger__operatorTokenTotalSupplyWei\";\n    Flag_OrderBy[\"FlaggerOperatorsCutFraction\"] = \"flagger__operatorsCutFraction\";\n    Flag_OrderBy[\"FlaggerOwner\"] = \"flagger__owner\";\n    Flag_OrderBy[\"FlaggerProtectionEndTimestamp\"] = \"flagger__protectionEndTimestamp\";\n    Flag_OrderBy[\"FlaggerSlashingsCount\"] = \"flagger__slashingsCount\";\n    Flag_OrderBy[\"FlaggerTotalStakeInSponsorshipsWei\"] = \"flagger__totalStakeInSponsorshipsWei\";\n    Flag_OrderBy[\"FlaggerValueUpdateBlockNumber\"] = \"flagger__valueUpdateBlockNumber\";\n    Flag_OrderBy[\"FlaggerValueUpdateTimestamp\"] = \"flagger__valueUpdateTimestamp\";\n    Flag_OrderBy[\"FlaggerValueWithoutEarnings\"] = \"flagger__valueWithoutEarnings\";\n    Flag_OrderBy[\"FlaggingTimestamp\"] = \"flaggingTimestamp\";\n    Flag_OrderBy[\"Id\"] = \"id\";\n    Flag_OrderBy[\"LastFlagIndex\"] = \"lastFlagIndex\";\n    Flag_OrderBy[\"Metadata\"] = \"metadata\";\n    Flag_OrderBy[\"ProtectionEndTimestamp\"] = \"protectionEndTimestamp\";\n    Flag_OrderBy[\"Result\"] = \"result\";\n    Flag_OrderBy[\"ReviewerCount\"] = \"reviewerCount\";\n    Flag_OrderBy[\"Reviewers\"] = \"reviewers\";\n    Flag_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    Flag_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    Flag_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    Flag_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    Flag_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    Flag_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    Flag_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    Flag_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    Flag_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    Flag_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    Flag_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    Flag_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    Flag_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    Flag_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    Flag_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    Flag_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    Flag_OrderBy[\"Target\"] = \"target\";\n    Flag_OrderBy[\"TargetStakeAtRiskWei\"] = \"targetStakeAtRiskWei\";\n    Flag_OrderBy[\"TargetContractVersion\"] = \"target__contractVersion\";\n    Flag_OrderBy[\"TargetCumulativeEarningsWei\"] = \"target__cumulativeEarningsWei\";\n    Flag_OrderBy[\"TargetCumulativeOperatorsCutWei\"] = \"target__cumulativeOperatorsCutWei\";\n    Flag_OrderBy[\"TargetCumulativeProfitsWei\"] = \"target__cumulativeProfitsWei\";\n    Flag_OrderBy[\"TargetDataTokenBalanceWei\"] = \"target__dataTokenBalanceWei\";\n    Flag_OrderBy[\"TargetDelegatorCount\"] = \"target__delegatorCount\";\n    Flag_OrderBy[\"TargetExchangeRate\"] = \"target__exchangeRate\";\n    Flag_OrderBy[\"TargetId\"] = \"target__id\";\n    Flag_OrderBy[\"TargetIsEligibleToVote\"] = \"target__isEligibleToVote\";\n    Flag_OrderBy[\"TargetLatestHeartbeatMetadata\"] = \"target__latestHeartbeatMetadata\";\n    Flag_OrderBy[\"TargetLatestHeartbeatTimestamp\"] = \"target__latestHeartbeatTimestamp\";\n    Flag_OrderBy[\"TargetMetadataJsonString\"] = \"target__metadataJsonString\";\n    Flag_OrderBy[\"TargetOperatorTokenTotalSupplyWei\"] = \"target__operatorTokenTotalSupplyWei\";\n    Flag_OrderBy[\"TargetOperatorsCutFraction\"] = \"target__operatorsCutFraction\";\n    Flag_OrderBy[\"TargetOwner\"] = \"target__owner\";\n    Flag_OrderBy[\"TargetProtectionEndTimestamp\"] = \"target__protectionEndTimestamp\";\n    Flag_OrderBy[\"TargetSlashingsCount\"] = \"target__slashingsCount\";\n    Flag_OrderBy[\"TargetTotalStakeInSponsorshipsWei\"] = \"target__totalStakeInSponsorshipsWei\";\n    Flag_OrderBy[\"TargetValueUpdateBlockNumber\"] = \"target__valueUpdateBlockNumber\";\n    Flag_OrderBy[\"TargetValueUpdateTimestamp\"] = \"target__valueUpdateTimestamp\";\n    Flag_OrderBy[\"TargetValueWithoutEarnings\"] = \"target__valueWithoutEarnings\";\n    Flag_OrderBy[\"VoteEndTimestamp\"] = \"voteEndTimestamp\";\n    Flag_OrderBy[\"VoteStartTimestamp\"] = \"voteStartTimestamp\";\n    Flag_OrderBy[\"Votes\"] = \"votes\";\n    Flag_OrderBy[\"VotesAgainstKick\"] = \"votesAgainstKick\";\n    Flag_OrderBy[\"VotesForKick\"] = \"votesForKick\";\n})(Flag_OrderBy || (Flag_OrderBy = {}));\nexport var Network_OrderBy;\n(function (Network_OrderBy) {\n    Network_OrderBy[\"EarlyLeaverPenaltyWei\"] = \"earlyLeaverPenaltyWei\";\n    Network_OrderBy[\"EligibleVotersCount\"] = \"eligibleVotersCount\";\n    Network_OrderBy[\"FishermanRewardFraction\"] = \"fishermanRewardFraction\";\n    Network_OrderBy[\"FlagProtectionSeconds\"] = \"flagProtectionSeconds\";\n    Network_OrderBy[\"FlagReviewerCount\"] = \"flagReviewerCount\";\n    Network_OrderBy[\"FlagReviewerRewardWei\"] = \"flagReviewerRewardWei\";\n    Network_OrderBy[\"FlagReviewerSelectionIterations\"] = \"flagReviewerSelectionIterations\";\n    Network_OrderBy[\"FlagStakeWei\"] = \"flagStakeWei\";\n    Network_OrderBy[\"FlaggerRewardWei\"] = \"flaggerRewardWei\";\n    Network_OrderBy[\"FundedSponsorshipsCount\"] = \"fundedSponsorshipsCount\";\n    Network_OrderBy[\"Id\"] = \"id\";\n    Network_OrderBy[\"MaxAllowedEarningsFraction\"] = \"maxAllowedEarningsFraction\";\n    Network_OrderBy[\"MaxPenaltyPeriodSeconds\"] = \"maxPenaltyPeriodSeconds\";\n    Network_OrderBy[\"MaxQueueSeconds\"] = \"maxQueueSeconds\";\n    Network_OrderBy[\"MinEligibleVoterAge\"] = \"minEligibleVoterAge\";\n    Network_OrderBy[\"MinEligibleVoterFractionOfAllStake\"] = \"minEligibleVoterFractionOfAllStake\";\n    Network_OrderBy[\"MinimumDelegationSeconds\"] = \"minimumDelegationSeconds\";\n    Network_OrderBy[\"MinimumDelegationWei\"] = \"minimumDelegationWei\";\n    Network_OrderBy[\"MinimumSelfDelegationFraction\"] = \"minimumSelfDelegationFraction\";\n    Network_OrderBy[\"MinimumStakeWei\"] = \"minimumStakeWei\";\n    Network_OrderBy[\"OperatorContractOnlyJoinPolicy\"] = \"operatorContractOnlyJoinPolicy\";\n    Network_OrderBy[\"OperatorFactory\"] = \"operatorFactory\";\n    Network_OrderBy[\"OperatorsCount\"] = \"operatorsCount\";\n    Network_OrderBy[\"ProtocolFeeBeneficiary\"] = \"protocolFeeBeneficiary\";\n    Network_OrderBy[\"ProtocolFeeFraction\"] = \"protocolFeeFraction\";\n    Network_OrderBy[\"RandomOracle\"] = \"randomOracle\";\n    Network_OrderBy[\"ReviewPeriodSeconds\"] = \"reviewPeriodSeconds\";\n    Network_OrderBy[\"SlashingFraction\"] = \"slashingFraction\";\n    Network_OrderBy[\"SponsorshipFactory\"] = \"sponsorshipFactory\";\n    Network_OrderBy[\"SponsorshipsCount\"] = \"sponsorshipsCount\";\n    Network_OrderBy[\"StreamRegistryAddress\"] = \"streamRegistryAddress\";\n    Network_OrderBy[\"TotalDelegated\"] = \"totalDelegated\";\n    Network_OrderBy[\"TotalStake\"] = \"totalStake\";\n    Network_OrderBy[\"TotalUndelegated\"] = \"totalUndelegated\";\n    Network_OrderBy[\"TrustedForwarder\"] = \"trustedForwarder\";\n    Network_OrderBy[\"VoterRegistry\"] = \"voterRegistry\";\n    Network_OrderBy[\"VotingPeriodSeconds\"] = \"votingPeriodSeconds\";\n})(Network_OrderBy || (Network_OrderBy = {}));\nexport var Node_OrderBy;\n(function (Node_OrderBy) {\n    Node_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Node_OrderBy[\"Id\"] = \"id\";\n    Node_OrderBy[\"LastSeen\"] = \"lastSeen\";\n    Node_OrderBy[\"Metadata\"] = \"metadata\";\n    Node_OrderBy[\"StoredStreams\"] = \"storedStreams\";\n})(Node_OrderBy || (Node_OrderBy = {}));\nexport var OperatorDailyBucket_OrderBy;\n(function (OperatorDailyBucket_OrderBy) {\n    OperatorDailyBucket_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    OperatorDailyBucket_OrderBy[\"DataTokenBalanceWei\"] = \"dataTokenBalanceWei\";\n    OperatorDailyBucket_OrderBy[\"Date\"] = \"date\";\n    OperatorDailyBucket_OrderBy[\"DelegatorCountAtStart\"] = \"delegatorCountAtStart\";\n    OperatorDailyBucket_OrderBy[\"DelegatorCountChange\"] = \"delegatorCountChange\";\n    OperatorDailyBucket_OrderBy[\"Id\"] = \"id\";\n    OperatorDailyBucket_OrderBy[\"LossesWei\"] = \"lossesWei\";\n    OperatorDailyBucket_OrderBy[\"Operator\"] = \"operator\";\n    OperatorDailyBucket_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    OperatorDailyBucket_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    OperatorDailyBucket_OrderBy[\"OperatorId\"] = \"operator__id\";\n    OperatorDailyBucket_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    OperatorDailyBucket_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    OperatorDailyBucket_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    OperatorDailyBucket_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    OperatorDailyBucket_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    OperatorDailyBucket_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    OperatorDailyBucket_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    OperatorDailyBucket_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    OperatorDailyBucket_OrderBy[\"OperatorsCutWei\"] = \"operatorsCutWei\";\n    OperatorDailyBucket_OrderBy[\"ProfitsWei\"] = \"profitsWei\";\n    OperatorDailyBucket_OrderBy[\"TotalDelegatedWei\"] = \"totalDelegatedWei\";\n    OperatorDailyBucket_OrderBy[\"TotalStakeInSponsorshipsWei\"] = \"totalStakeInSponsorshipsWei\";\n    OperatorDailyBucket_OrderBy[\"TotalUndelegatedWei\"] = \"totalUndelegatedWei\";\n    OperatorDailyBucket_OrderBy[\"ValueWithoutEarnings\"] = \"valueWithoutEarnings\";\n})(OperatorDailyBucket_OrderBy || (OperatorDailyBucket_OrderBy = {}));\nexport var Operator_OrderBy;\n(function (Operator_OrderBy) {\n    Operator_OrderBy[\"ContractVersion\"] = \"contractVersion\";\n    Operator_OrderBy[\"Controllers\"] = \"controllers\";\n    Operator_OrderBy[\"CumulativeEarningsWei\"] = \"cumulativeEarningsWei\";\n    Operator_OrderBy[\"CumulativeOperatorsCutWei\"] = \"cumulativeOperatorsCutWei\";\n    Operator_OrderBy[\"CumulativeProfitsWei\"] = \"cumulativeProfitsWei\";\n    Operator_OrderBy[\"DataTokenBalanceWei\"] = \"dataTokenBalanceWei\";\n    Operator_OrderBy[\"Delegations\"] = \"delegations\";\n    Operator_OrderBy[\"DelegatorCount\"] = \"delegatorCount\";\n    Operator_OrderBy[\"ExchangeRate\"] = \"exchangeRate\";\n    Operator_OrderBy[\"FlagsOpened\"] = \"flagsOpened\";\n    Operator_OrderBy[\"FlagsTargeted\"] = \"flagsTargeted\";\n    Operator_OrderBy[\"Id\"] = \"id\";\n    Operator_OrderBy[\"IsEligibleToVote\"] = \"isEligibleToVote\";\n    Operator_OrderBy[\"LatestHeartbeatMetadata\"] = \"latestHeartbeatMetadata\";\n    Operator_OrderBy[\"LatestHeartbeatTimestamp\"] = \"latestHeartbeatTimestamp\";\n    Operator_OrderBy[\"MetadataJsonString\"] = \"metadataJsonString\";\n    Operator_OrderBy[\"Nodes\"] = \"nodes\";\n    Operator_OrderBy[\"OperatorTokenTotalSupplyWei\"] = \"operatorTokenTotalSupplyWei\";\n    Operator_OrderBy[\"OperatorsCutFraction\"] = \"operatorsCutFraction\";\n    Operator_OrderBy[\"Owner\"] = \"owner\";\n    Operator_OrderBy[\"ProtectionEndTimestamp\"] = \"protectionEndTimestamp\";\n    Operator_OrderBy[\"QueueEntries\"] = \"queueEntries\";\n    Operator_OrderBy[\"RaisedFlags\"] = \"raisedFlags\";\n    Operator_OrderBy[\"ReceivedFlags\"] = \"receivedFlags\";\n    Operator_OrderBy[\"SlashingEvents\"] = \"slashingEvents\";\n    Operator_OrderBy[\"SlashingsCount\"] = \"slashingsCount\";\n    Operator_OrderBy[\"Stakes\"] = \"stakes\";\n    Operator_OrderBy[\"StakingEvents\"] = \"stakingEvents\";\n    Operator_OrderBy[\"TotalStakeInSponsorshipsWei\"] = \"totalStakeInSponsorshipsWei\";\n    Operator_OrderBy[\"ValueUpdateBlockNumber\"] = \"valueUpdateBlockNumber\";\n    Operator_OrderBy[\"ValueUpdateTimestamp\"] = \"valueUpdateTimestamp\";\n    Operator_OrderBy[\"ValueWithoutEarnings\"] = \"valueWithoutEarnings\";\n    Operator_OrderBy[\"VotesOnFlags\"] = \"votesOnFlags\";\n})(Operator_OrderBy || (Operator_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var ProjectPaymentDetails_OrderBy;\n(function (ProjectPaymentDetails_OrderBy) {\n    ProjectPaymentDetails_OrderBy[\"Beneficiary\"] = \"beneficiary\";\n    ProjectPaymentDetails_OrderBy[\"DomainId\"] = \"domainId\";\n    ProjectPaymentDetails_OrderBy[\"Id\"] = \"id\";\n    ProjectPaymentDetails_OrderBy[\"PricePerSecond\"] = \"pricePerSecond\";\n    ProjectPaymentDetails_OrderBy[\"PricingTokenAddress\"] = \"pricingTokenAddress\";\n    ProjectPaymentDetails_OrderBy[\"Project\"] = \"project\";\n    ProjectPaymentDetails_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPaymentDetails_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPaymentDetails_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPaymentDetails_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPaymentDetails_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPaymentDetails_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPaymentDetails_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPaymentDetails_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPaymentDetails_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n})(ProjectPaymentDetails_OrderBy || (ProjectPaymentDetails_OrderBy = {}));\nexport var ProjectPermission_OrderBy;\n(function (ProjectPermission_OrderBy) {\n    ProjectPermission_OrderBy[\"CanBuy\"] = \"canBuy\";\n    ProjectPermission_OrderBy[\"CanDelete\"] = \"canDelete\";\n    ProjectPermission_OrderBy[\"CanEdit\"] = \"canEdit\";\n    ProjectPermission_OrderBy[\"CanGrant\"] = \"canGrant\";\n    ProjectPermission_OrderBy[\"Id\"] = \"id\";\n    ProjectPermission_OrderBy[\"Project\"] = \"project\";\n    ProjectPermission_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPermission_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPermission_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPermission_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPermission_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPermission_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPermission_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPermission_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPermission_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectPermission_OrderBy[\"UserAddress\"] = \"userAddress\";\n})(ProjectPermission_OrderBy || (ProjectPermission_OrderBy = {}));\nexport var ProjectPurchase_OrderBy;\n(function (ProjectPurchase_OrderBy) {\n    ProjectPurchase_OrderBy[\"Fee\"] = \"fee\";\n    ProjectPurchase_OrderBy[\"Id\"] = \"id\";\n    ProjectPurchase_OrderBy[\"Price\"] = \"price\";\n    ProjectPurchase_OrderBy[\"Project\"] = \"project\";\n    ProjectPurchase_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectPurchase_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectPurchase_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectPurchase_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectPurchase_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectPurchase_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectPurchase_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectPurchase_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectPurchase_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectPurchase_OrderBy[\"PurchasedAt\"] = \"purchasedAt\";\n    ProjectPurchase_OrderBy[\"Subscriber\"] = \"subscriber\";\n    ProjectPurchase_OrderBy[\"SubscriptionSeconds\"] = \"subscriptionSeconds\";\n})(ProjectPurchase_OrderBy || (ProjectPurchase_OrderBy = {}));\nexport var ProjectStakeByUser_OrderBy;\n(function (ProjectStakeByUser_OrderBy) {\n    ProjectStakeByUser_OrderBy[\"Id\"] = \"id\";\n    ProjectStakeByUser_OrderBy[\"Project\"] = \"project\";\n    ProjectStakeByUser_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectStakeByUser_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectStakeByUser_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectStakeByUser_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectStakeByUser_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectStakeByUser_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectStakeByUser_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectStakeByUser_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectStakeByUser_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectStakeByUser_OrderBy[\"User\"] = \"user\";\n    ProjectStakeByUser_OrderBy[\"UserStake\"] = \"userStake\";\n})(ProjectStakeByUser_OrderBy || (ProjectStakeByUser_OrderBy = {}));\nexport var ProjectStakingDayBucket_OrderBy;\n(function (ProjectStakingDayBucket_OrderBy) {\n    ProjectStakingDayBucket_OrderBy[\"Date\"] = \"date\";\n    ProjectStakingDayBucket_OrderBy[\"Id\"] = \"id\";\n    ProjectStakingDayBucket_OrderBy[\"Project\"] = \"project\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectStakingDayBucket_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectStakingDayBucket_OrderBy[\"StakeAtStart\"] = \"stakeAtStart\";\n    ProjectStakingDayBucket_OrderBy[\"StakeChange\"] = \"stakeChange\";\n    ProjectStakingDayBucket_OrderBy[\"StakingsWei\"] = \"stakingsWei\";\n    ProjectStakingDayBucket_OrderBy[\"UnstakingsWei\"] = \"unstakingsWei\";\n})(ProjectStakingDayBucket_OrderBy || (ProjectStakingDayBucket_OrderBy = {}));\nexport var ProjectSubscription_OrderBy;\n(function (ProjectSubscription_OrderBy) {\n    ProjectSubscription_OrderBy[\"EndTimestamp\"] = \"endTimestamp\";\n    ProjectSubscription_OrderBy[\"Id\"] = \"id\";\n    ProjectSubscription_OrderBy[\"Project\"] = \"project\";\n    ProjectSubscription_OrderBy[\"ProjectCounter\"] = \"project__counter\";\n    ProjectSubscription_OrderBy[\"ProjectCreatedAt\"] = \"project__createdAt\";\n    ProjectSubscription_OrderBy[\"ProjectId\"] = \"project__id\";\n    ProjectSubscription_OrderBy[\"ProjectIsDataUnion\"] = \"project__isDataUnion\";\n    ProjectSubscription_OrderBy[\"ProjectMetadata\"] = \"project__metadata\";\n    ProjectSubscription_OrderBy[\"ProjectMinimumSubscriptionSeconds\"] = \"project__minimumSubscriptionSeconds\";\n    ProjectSubscription_OrderBy[\"ProjectScore\"] = \"project__score\";\n    ProjectSubscription_OrderBy[\"ProjectStakedWei\"] = \"project__stakedWei\";\n    ProjectSubscription_OrderBy[\"ProjectUpdatedAt\"] = \"project__updatedAt\";\n    ProjectSubscription_OrderBy[\"UserAddress\"] = \"userAddress\";\n})(ProjectSubscription_OrderBy || (ProjectSubscription_OrderBy = {}));\nexport var Project_OrderBy;\n(function (Project_OrderBy) {\n    Project_OrderBy[\"Counter\"] = \"counter\";\n    Project_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Project_OrderBy[\"DomainIds\"] = \"domainIds\";\n    Project_OrderBy[\"Id\"] = \"id\";\n    Project_OrderBy[\"IsDataUnion\"] = \"isDataUnion\";\n    Project_OrderBy[\"Metadata\"] = \"metadata\";\n    Project_OrderBy[\"MinimumSubscriptionSeconds\"] = \"minimumSubscriptionSeconds\";\n    Project_OrderBy[\"PaymentDetails\"] = \"paymentDetails\";\n    Project_OrderBy[\"Permissions\"] = \"permissions\";\n    Project_OrderBy[\"Purchases\"] = \"purchases\";\n    Project_OrderBy[\"Score\"] = \"score\";\n    Project_OrderBy[\"StakedWei\"] = \"stakedWei\";\n    Project_OrderBy[\"Streams\"] = \"streams\";\n    Project_OrderBy[\"Subscriptions\"] = \"subscriptions\";\n    Project_OrderBy[\"UpdatedAt\"] = \"updatedAt\";\n})(Project_OrderBy || (Project_OrderBy = {}));\nexport var QueueEntry_OrderBy;\n(function (QueueEntry_OrderBy) {\n    QueueEntry_OrderBy[\"Amount\"] = \"amount\";\n    QueueEntry_OrderBy[\"Date\"] = \"date\";\n    QueueEntry_OrderBy[\"Delegator\"] = \"delegator\";\n    QueueEntry_OrderBy[\"DelegatorCumulativeEarningsWei\"] = \"delegator__cumulativeEarningsWei\";\n    QueueEntry_OrderBy[\"DelegatorId\"] = \"delegator__id\";\n    QueueEntry_OrderBy[\"DelegatorNumberOfDelegations\"] = \"delegator__numberOfDelegations\";\n    QueueEntry_OrderBy[\"DelegatorTotalValueDataWei\"] = \"delegator__totalValueDataWei\";\n    QueueEntry_OrderBy[\"Id\"] = \"id\";\n    QueueEntry_OrderBy[\"Operator\"] = \"operator\";\n    QueueEntry_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    QueueEntry_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    QueueEntry_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    QueueEntry_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    QueueEntry_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    QueueEntry_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    QueueEntry_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    QueueEntry_OrderBy[\"OperatorId\"] = \"operator__id\";\n    QueueEntry_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    QueueEntry_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    QueueEntry_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    QueueEntry_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    QueueEntry_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    QueueEntry_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    QueueEntry_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    QueueEntry_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    QueueEntry_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    QueueEntry_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    QueueEntry_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    QueueEntry_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    QueueEntry_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n})(QueueEntry_OrderBy || (QueueEntry_OrderBy = {}));\nexport var SlashingEvent_OrderBy;\n(function (SlashingEvent_OrderBy) {\n    SlashingEvent_OrderBy[\"Amount\"] = \"amount\";\n    SlashingEvent_OrderBy[\"Date\"] = \"date\";\n    SlashingEvent_OrderBy[\"Id\"] = \"id\";\n    SlashingEvent_OrderBy[\"Operator\"] = \"operator\";\n    SlashingEvent_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    SlashingEvent_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    SlashingEvent_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    SlashingEvent_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    SlashingEvent_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    SlashingEvent_OrderBy[\"OperatorId\"] = \"operator__id\";\n    SlashingEvent_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    SlashingEvent_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    SlashingEvent_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    SlashingEvent_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    SlashingEvent_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    SlashingEvent_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    SlashingEvent_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    SlashingEvent_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    SlashingEvent_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    SlashingEvent_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    SlashingEvent_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    SlashingEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SlashingEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SlashingEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SlashingEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SlashingEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SlashingEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SlashingEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SlashingEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SlashingEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SlashingEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SlashingEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SlashingEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SlashingEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SlashingEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SlashingEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SlashingEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(SlashingEvent_OrderBy || (SlashingEvent_OrderBy = {}));\nexport var SponsoringEvent_OrderBy;\n(function (SponsoringEvent_OrderBy) {\n    SponsoringEvent_OrderBy[\"Amount\"] = \"amount\";\n    SponsoringEvent_OrderBy[\"Date\"] = \"date\";\n    SponsoringEvent_OrderBy[\"Id\"] = \"id\";\n    SponsoringEvent_OrderBy[\"Sponsor\"] = \"sponsor\";\n    SponsoringEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SponsoringEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SponsoringEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SponsoringEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SponsoringEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SponsoringEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SponsoringEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SponsoringEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SponsoringEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SponsoringEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SponsoringEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SponsoringEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SponsoringEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SponsoringEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SponsoringEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SponsoringEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(SponsoringEvent_OrderBy || (SponsoringEvent_OrderBy = {}));\nexport var SponsorshipDailyBucket_OrderBy;\n(function (SponsorshipDailyBucket_OrderBy) {\n    SponsorshipDailyBucket_OrderBy[\"Date\"] = \"date\";\n    SponsorshipDailyBucket_OrderBy[\"Id\"] = \"id\";\n    SponsorshipDailyBucket_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    SponsorshipDailyBucket_OrderBy[\"ProjectedInsolvency\"] = \"projectedInsolvency\";\n    SponsorshipDailyBucket_OrderBy[\"RemainingWei\"] = \"remainingWei\";\n    SponsorshipDailyBucket_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    SponsorshipDailyBucket_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    SponsorshipDailyBucket_OrderBy[\"SpotApy\"] = \"spotAPY\";\n    SponsorshipDailyBucket_OrderBy[\"TotalStakedWei\"] = \"totalStakedWei\";\n})(SponsorshipDailyBucket_OrderBy || (SponsorshipDailyBucket_OrderBy = {}));\nexport var Sponsorship_OrderBy;\n(function (Sponsorship_OrderBy) {\n    Sponsorship_OrderBy[\"Creator\"] = \"creator\";\n    Sponsorship_OrderBy[\"CumulativeSponsoring\"] = \"cumulativeSponsoring\";\n    Sponsorship_OrderBy[\"Flags\"] = \"flags\";\n    Sponsorship_OrderBy[\"Id\"] = \"id\";\n    Sponsorship_OrderBy[\"IsRunning\"] = \"isRunning\";\n    Sponsorship_OrderBy[\"MaxOperators\"] = \"maxOperators\";\n    Sponsorship_OrderBy[\"Metadata\"] = \"metadata\";\n    Sponsorship_OrderBy[\"MinOperators\"] = \"minOperators\";\n    Sponsorship_OrderBy[\"MinimumStakingPeriodSeconds\"] = \"minimumStakingPeriodSeconds\";\n    Sponsorship_OrderBy[\"OperatorCount\"] = \"operatorCount\";\n    Sponsorship_OrderBy[\"ProjectedInsolvency\"] = \"projectedInsolvency\";\n    Sponsorship_OrderBy[\"RemainingWei\"] = \"remainingWei\";\n    Sponsorship_OrderBy[\"RemainingWeiUpdateTimestamp\"] = \"remainingWeiUpdateTimestamp\";\n    Sponsorship_OrderBy[\"SlashingEvents\"] = \"slashingEvents\";\n    Sponsorship_OrderBy[\"SponsoringEvents\"] = \"sponsoringEvents\";\n    Sponsorship_OrderBy[\"SpotApy\"] = \"spotAPY\";\n    Sponsorship_OrderBy[\"Stakes\"] = \"stakes\";\n    Sponsorship_OrderBy[\"StakingEvents\"] = \"stakingEvents\";\n    Sponsorship_OrderBy[\"Stream\"] = \"stream\";\n    Sponsorship_OrderBy[\"StreamCreatedAt\"] = \"stream__createdAt\";\n    Sponsorship_OrderBy[\"StreamId\"] = \"stream__id\";\n    Sponsorship_OrderBy[\"StreamMetadata\"] = \"stream__metadata\";\n    Sponsorship_OrderBy[\"StreamUpdatedAt\"] = \"stream__updatedAt\";\n    Sponsorship_OrderBy[\"TotalPayoutWeiPerSec\"] = \"totalPayoutWeiPerSec\";\n    Sponsorship_OrderBy[\"TotalStakedWei\"] = \"totalStakedWei\";\n})(Sponsorship_OrderBy || (Sponsorship_OrderBy = {}));\nexport var Stake_OrderBy;\n(function (Stake_OrderBy) {\n    Stake_OrderBy[\"AmountWei\"] = \"amountWei\";\n    Stake_OrderBy[\"EarningsWei\"] = \"earningsWei\";\n    Stake_OrderBy[\"Id\"] = \"id\";\n    Stake_OrderBy[\"JoinTimestamp\"] = \"joinTimestamp\";\n    Stake_OrderBy[\"LockedWei\"] = \"lockedWei\";\n    Stake_OrderBy[\"MinimumStakeWei\"] = \"minimumStakeWei\";\n    Stake_OrderBy[\"Operator\"] = \"operator\";\n    Stake_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    Stake_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    Stake_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    Stake_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    Stake_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    Stake_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    Stake_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    Stake_OrderBy[\"OperatorId\"] = \"operator__id\";\n    Stake_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    Stake_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    Stake_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    Stake_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    Stake_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    Stake_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    Stake_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    Stake_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    Stake_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    Stake_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    Stake_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    Stake_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    Stake_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    Stake_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    Stake_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    Stake_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    Stake_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    Stake_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    Stake_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    Stake_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    Stake_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    Stake_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    Stake_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    Stake_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    Stake_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    Stake_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    Stake_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    Stake_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    Stake_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n    Stake_OrderBy[\"UpdateTimestamp\"] = \"updateTimestamp\";\n})(Stake_OrderBy || (Stake_OrderBy = {}));\nexport var StakingEvent_OrderBy;\n(function (StakingEvent_OrderBy) {\n    StakingEvent_OrderBy[\"Amount\"] = \"amount\";\n    StakingEvent_OrderBy[\"Date\"] = \"date\";\n    StakingEvent_OrderBy[\"Id\"] = \"id\";\n    StakingEvent_OrderBy[\"Operator\"] = \"operator\";\n    StakingEvent_OrderBy[\"OperatorContractVersion\"] = \"operator__contractVersion\";\n    StakingEvent_OrderBy[\"OperatorCumulativeEarningsWei\"] = \"operator__cumulativeEarningsWei\";\n    StakingEvent_OrderBy[\"OperatorCumulativeOperatorsCutWei\"] = \"operator__cumulativeOperatorsCutWei\";\n    StakingEvent_OrderBy[\"OperatorCumulativeProfitsWei\"] = \"operator__cumulativeProfitsWei\";\n    StakingEvent_OrderBy[\"OperatorDataTokenBalanceWei\"] = \"operator__dataTokenBalanceWei\";\n    StakingEvent_OrderBy[\"OperatorDelegatorCount\"] = \"operator__delegatorCount\";\n    StakingEvent_OrderBy[\"OperatorExchangeRate\"] = \"operator__exchangeRate\";\n    StakingEvent_OrderBy[\"OperatorId\"] = \"operator__id\";\n    StakingEvent_OrderBy[\"OperatorIsEligibleToVote\"] = \"operator__isEligibleToVote\";\n    StakingEvent_OrderBy[\"OperatorLatestHeartbeatMetadata\"] = \"operator__latestHeartbeatMetadata\";\n    StakingEvent_OrderBy[\"OperatorLatestHeartbeatTimestamp\"] = \"operator__latestHeartbeatTimestamp\";\n    StakingEvent_OrderBy[\"OperatorMetadataJsonString\"] = \"operator__metadataJsonString\";\n    StakingEvent_OrderBy[\"OperatorOperatorTokenTotalSupplyWei\"] = \"operator__operatorTokenTotalSupplyWei\";\n    StakingEvent_OrderBy[\"OperatorOperatorsCutFraction\"] = \"operator__operatorsCutFraction\";\n    StakingEvent_OrderBy[\"OperatorOwner\"] = \"operator__owner\";\n    StakingEvent_OrderBy[\"OperatorProtectionEndTimestamp\"] = \"operator__protectionEndTimestamp\";\n    StakingEvent_OrderBy[\"OperatorSlashingsCount\"] = \"operator__slashingsCount\";\n    StakingEvent_OrderBy[\"OperatorTotalStakeInSponsorshipsWei\"] = \"operator__totalStakeInSponsorshipsWei\";\n    StakingEvent_OrderBy[\"OperatorValueUpdateBlockNumber\"] = \"operator__valueUpdateBlockNumber\";\n    StakingEvent_OrderBy[\"OperatorValueUpdateTimestamp\"] = \"operator__valueUpdateTimestamp\";\n    StakingEvent_OrderBy[\"OperatorValueWithoutEarnings\"] = \"operator__valueWithoutEarnings\";\n    StakingEvent_OrderBy[\"Sponsorship\"] = \"sponsorship\";\n    StakingEvent_OrderBy[\"SponsorshipCreator\"] = \"sponsorship__creator\";\n    StakingEvent_OrderBy[\"SponsorshipCumulativeSponsoring\"] = \"sponsorship__cumulativeSponsoring\";\n    StakingEvent_OrderBy[\"SponsorshipId\"] = \"sponsorship__id\";\n    StakingEvent_OrderBy[\"SponsorshipIsRunning\"] = \"sponsorship__isRunning\";\n    StakingEvent_OrderBy[\"SponsorshipMaxOperators\"] = \"sponsorship__maxOperators\";\n    StakingEvent_OrderBy[\"SponsorshipMetadata\"] = \"sponsorship__metadata\";\n    StakingEvent_OrderBy[\"SponsorshipMinOperators\"] = \"sponsorship__minOperators\";\n    StakingEvent_OrderBy[\"SponsorshipMinimumStakingPeriodSeconds\"] = \"sponsorship__minimumStakingPeriodSeconds\";\n    StakingEvent_OrderBy[\"SponsorshipOperatorCount\"] = \"sponsorship__operatorCount\";\n    StakingEvent_OrderBy[\"SponsorshipProjectedInsolvency\"] = \"sponsorship__projectedInsolvency\";\n    StakingEvent_OrderBy[\"SponsorshipRemainingWei\"] = \"sponsorship__remainingWei\";\n    StakingEvent_OrderBy[\"SponsorshipRemainingWeiUpdateTimestamp\"] = \"sponsorship__remainingWeiUpdateTimestamp\";\n    StakingEvent_OrderBy[\"SponsorshipSpotApy\"] = \"sponsorship__spotAPY\";\n    StakingEvent_OrderBy[\"SponsorshipTotalPayoutWeiPerSec\"] = \"sponsorship__totalPayoutWeiPerSec\";\n    StakingEvent_OrderBy[\"SponsorshipTotalStakedWei\"] = \"sponsorship__totalStakedWei\";\n})(StakingEvent_OrderBy || (StakingEvent_OrderBy = {}));\nexport var StreamPermission_OrderBy;\n(function (StreamPermission_OrderBy) {\n    StreamPermission_OrderBy[\"CanDelete\"] = \"canDelete\";\n    StreamPermission_OrderBy[\"CanEdit\"] = \"canEdit\";\n    StreamPermission_OrderBy[\"CanGrant\"] = \"canGrant\";\n    StreamPermission_OrderBy[\"Id\"] = \"id\";\n    StreamPermission_OrderBy[\"PublishExpiration\"] = \"publishExpiration\";\n    StreamPermission_OrderBy[\"Stream\"] = \"stream\";\n    StreamPermission_OrderBy[\"StreamCreatedAt\"] = \"stream__createdAt\";\n    StreamPermission_OrderBy[\"StreamId\"] = \"stream__id\";\n    StreamPermission_OrderBy[\"StreamMetadata\"] = \"stream__metadata\";\n    StreamPermission_OrderBy[\"StreamUpdatedAt\"] = \"stream__updatedAt\";\n    StreamPermission_OrderBy[\"SubscribeExpiration\"] = \"subscribeExpiration\";\n    StreamPermission_OrderBy[\"UserAddress\"] = \"userAddress\";\n    StreamPermission_OrderBy[\"UserId\"] = \"userId\";\n})(StreamPermission_OrderBy || (StreamPermission_OrderBy = {}));\nexport var Stream_OrderBy;\n(function (Stream_OrderBy) {\n    Stream_OrderBy[\"CreatedAt\"] = \"createdAt\";\n    Stream_OrderBy[\"Id\"] = \"id\";\n    Stream_OrderBy[\"Metadata\"] = \"metadata\";\n    Stream_OrderBy[\"Permissions\"] = \"permissions\";\n    Stream_OrderBy[\"Sponsorships\"] = \"sponsorships\";\n    Stream_OrderBy[\"StorageNodes\"] = \"storageNodes\";\n    Stream_OrderBy[\"UpdatedAt\"] = \"updatedAt\";\n})(Stream_OrderBy || (Stream_OrderBy = {}));\nexport var Vote_OrderBy;\n(function (Vote_OrderBy) {\n    Vote_OrderBy[\"Flag\"] = \"flag\";\n    Vote_OrderBy[\"FlagFlagResolutionTimestamp\"] = \"flag__flagResolutionTimestamp\";\n    Vote_OrderBy[\"FlagFlaggingTimestamp\"] = \"flag__flaggingTimestamp\";\n    Vote_OrderBy[\"FlagId\"] = \"flag__id\";\n    Vote_OrderBy[\"FlagLastFlagIndex\"] = \"flag__lastFlagIndex\";\n    Vote_OrderBy[\"FlagMetadata\"] = \"flag__metadata\";\n    Vote_OrderBy[\"FlagProtectionEndTimestamp\"] = \"flag__protectionEndTimestamp\";\n    Vote_OrderBy[\"FlagResult\"] = \"flag__result\";\n    Vote_OrderBy[\"FlagReviewerCount\"] = \"flag__reviewerCount\";\n    Vote_OrderBy[\"FlagTargetStakeAtRiskWei\"] = \"flag__targetStakeAtRiskWei\";\n    Vote_OrderBy[\"FlagVoteEndTimestamp\"] = \"flag__voteEndTimestamp\";\n    Vote_OrderBy[\"FlagVoteStartTimestamp\"] = \"flag__voteStartTimestamp\";\n    Vote_OrderBy[\"FlagVotesAgainstKick\"] = \"flag__votesAgainstKick\";\n    Vote_OrderBy[\"FlagVotesForKick\"] = \"flag__votesForKick\";\n    Vote_OrderBy[\"Id\"] = \"id\";\n    Vote_OrderBy[\"Timestamp\"] = \"timestamp\";\n    Vote_OrderBy[\"VotedKick\"] = \"votedKick\";\n    Vote_OrderBy[\"Voter\"] = \"voter\";\n    Vote_OrderBy[\"VoterWeight\"] = \"voterWeight\";\n    Vote_OrderBy[\"VoterContractVersion\"] = \"voter__contractVersion\";\n    Vote_OrderBy[\"VoterCumulativeEarningsWei\"] = \"voter__cumulativeEarningsWei\";\n    Vote_OrderBy[\"VoterCumulativeOperatorsCutWei\"] = \"voter__cumulativeOperatorsCutWei\";\n    Vote_OrderBy[\"VoterCumulativeProfitsWei\"] = \"voter__cumulativeProfitsWei\";\n    Vote_OrderBy[\"VoterDataTokenBalanceWei\"] = \"voter__dataTokenBalanceWei\";\n    Vote_OrderBy[\"VoterDelegatorCount\"] = \"voter__delegatorCount\";\n    Vote_OrderBy[\"VoterExchangeRate\"] = \"voter__exchangeRate\";\n    Vote_OrderBy[\"VoterId\"] = \"voter__id\";\n    Vote_OrderBy[\"VoterIsEligibleToVote\"] = \"voter__isEligibleToVote\";\n    Vote_OrderBy[\"VoterLatestHeartbeatMetadata\"] = \"voter__latestHeartbeatMetadata\";\n    Vote_OrderBy[\"VoterLatestHeartbeatTimestamp\"] = \"voter__latestHeartbeatTimestamp\";\n    Vote_OrderBy[\"VoterMetadataJsonString\"] = \"voter__metadataJsonString\";\n    Vote_OrderBy[\"VoterOperatorTokenTotalSupplyWei\"] = \"voter__operatorTokenTotalSupplyWei\";\n    Vote_OrderBy[\"VoterOperatorsCutFraction\"] = \"voter__operatorsCutFraction\";\n    Vote_OrderBy[\"VoterOwner\"] = \"voter__owner\";\n    Vote_OrderBy[\"VoterProtectionEndTimestamp\"] = \"voter__protectionEndTimestamp\";\n    Vote_OrderBy[\"VoterSlashingsCount\"] = \"voter__slashingsCount\";\n    Vote_OrderBy[\"VoterTotalStakeInSponsorshipsWei\"] = \"voter__totalStakeInSponsorshipsWei\";\n    Vote_OrderBy[\"VoterValueUpdateBlockNumber\"] = \"voter__valueUpdateBlockNumber\";\n    Vote_OrderBy[\"VoterValueUpdateTimestamp\"] = \"voter__valueUpdateTimestamp\";\n    Vote_OrderBy[\"VoterValueWithoutEarnings\"] = \"voter__valueWithoutEarnings\";\n})(Vote_OrderBy || (Vote_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const StakeFieldsFragmentDoc = gql `\n    fragment StakeFields on Stake {\n  operator {\n    id\n    metadataJsonString\n  }\n  amountWei\n  earningsWei\n  lockedWei\n  joinTimestamp\n}\n    `;\nexport const SponsorshipFieldsFragmentDoc = gql `\n    fragment SponsorshipFields on Sponsorship {\n  id\n  stream {\n    id\n    metadata\n  }\n  metadata\n  isRunning\n  totalPayoutWeiPerSec\n  stakes(first: 1000, orderBy: amountWei, orderDirection: desc) {\n    ...StakeFields\n  }\n  operatorCount\n  minOperators\n  maxOperators\n  totalStakedWei\n  remainingWei\n  remainingWeiUpdateTimestamp\n  projectedInsolvency\n  cumulativeSponsoring\n  minimumStakingPeriodSeconds\n  creator\n  spotAPY\n}\n    ${StakeFieldsFragmentDoc}`;\nexport const OperatorFieldsFragmentDoc = gql `\n    fragment OperatorFields on Operator {\n  id\n  stakes(first: 1000) {\n    ...StakeFields\n    sponsorship {\n      ...SponsorshipFields\n    }\n  }\n  delegations(first: 1000) {\n    delegator {\n      id\n    }\n    operatorTokenBalanceWei\n    latestDelegationTimestamp\n    earliestUndelegationTimestamp\n    id\n  }\n  slashingEvents(first: 1000) {\n    amount\n    date\n    sponsorship {\n      id\n      stream {\n        id\n      }\n    }\n  }\n  queueEntries(first: 1000) {\n    amount\n    date\n    delegator {\n      id\n    }\n    id\n  }\n  delegatorCount\n  valueWithoutEarnings\n  totalStakeInSponsorshipsWei\n  dataTokenBalanceWei\n  operatorTokenTotalSupplyWei\n  metadataJsonString\n  owner\n  nodes\n  cumulativeProfitsWei\n  cumulativeOperatorsCutWei\n  operatorsCutFraction\n  contractVersion\n  exchangeRate\n  controllers\n}\n    ${StakeFieldsFragmentDoc}\n${SponsorshipFieldsFragmentDoc}`;\nexport const ProjectFieldsFragmentDoc = gql `\n    fragment ProjectFields on Project {\n  id\n  domainIds\n  score\n  metadata\n  streams\n  minimumSubscriptionSeconds\n  createdAt\n  updatedAt\n  isDataUnion\n  paymentDetails {\n    domainId\n    beneficiary\n    pricingTokenAddress\n    pricePerSecond\n  }\n  subscriptions {\n    userAddress\n    endTimestamp\n  }\n  permissions {\n    userAddress\n    canBuy\n    canDelete\n    canEdit\n    canGrant\n  }\n  purchases {\n    subscriber\n    subscriptionSeconds\n    price\n    fee\n    purchasedAt\n  }\n}\n    `;\nexport const StreamFieldsFragmentDoc = gql `\n    fragment StreamFields on Stream {\n  id\n  metadata\n  permissions {\n    id\n    canGrant\n    canEdit\n    canDelete\n    userId\n    subscribeExpiration\n    publishExpiration\n  }\n}\n    `;\nexport const SponsorshipDailyBucketFieldsFragmentDoc = gql `\n    fragment SponsorshipDailyBucketFields on SponsorshipDailyBucket {\n  id\n  operatorCount\n  projectedInsolvency\n  spotAPY\n  totalStakedWei\n  remainingWei\n  date\n  sponsorship {\n    id\n  }\n}\n    `;\nexport const SponsoringEventFieldsFragmentDoc = gql `\n    fragment SponsoringEventFields on SponsoringEvent {\n  id\n  amount\n  date\n  sponsor\n}\n    `;\nexport const OperatorDailyBucketFieldsFragmentDoc = gql `\n    fragment OperatorDailyBucketFields on OperatorDailyBucket {\n  date\n  id\n  dataTokenBalanceWei\n  delegatorCountChange\n  delegatorCountAtStart\n  lossesWei\n  operatorsCutWei\n  valueWithoutEarnings\n  profitsWei\n  cumulativeEarningsWei\n  totalDelegatedWei\n  totalUndelegatedWei\n  totalStakeInSponsorshipsWei\n}\n    `;\nexport const DelegatorDailyBucketFieldsFragmentDoc = gql `\n    fragment DelegatorDailyBucketFields on DelegatorDailyBucket {\n  id\n  totalValueDataWei\n  date\n  cumulativeEarningsWei\n  operatorCount\n}\n    `;\nexport const GetAllOperatorsDocument = gql `\n    query getAllOperators($first: Int, $skip: Int, $searchQuery: ID, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const SearchOperatorsByMetadataDocument = gql `\n    query searchOperatorsByMetadata($first: Int, $skip: Int, $searchQuery: String, $id: ID!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {or: [{id: $id}, {metadataJsonString_contains_nocase: $searchQuery}, {stakes_: {sponsorship_contains_nocase: $searchQuery}}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorByIdDocument = gql `\n    query getOperatorById($operatorId: ID!, $minBlockNumber: Int = 0) {\n  operator(id: $operatorId, block: {number_gte: $minBlockNumber}) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationDocument = gql `\n    query getOperatorsByDelegation($first: Int, $skip: Int, $delegator: String!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationAndIdDocument = gql `\n    query getOperatorsByDelegationAndId($first: Int, $skip: Int, $delegator: String!, $operatorId: ID!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}, id: $operatorId}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByDelegationAndMetadataDocument = gql `\n    query getOperatorsByDelegationAndMetadata($first: Int, $skip: Int, $delegator: String!, $searchQuery: String!, $orderBy: Operator_orderBy, $orderDirection: OrderDirection) {\n  operators(\n    first: $first\n    skip: $skip\n    where: {delegations_: {delegator: $delegator}, metadataJsonString_contains_nocase: $searchQuery}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorByOwnerAddressDocument = gql `\n    query getOperatorByOwnerAddress($owner: String!, $minBlockNumber: Int = 0) {\n  operators(\n    first: 1\n    block: {number_gte: $minBlockNumber}\n    where: {owner: $owner}\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetOperatorsByOwnerOrControllerAddressDocument = gql `\n    query getOperatorsByOwnerOrControllerAddress($owner: String!, $minBlockNumber: Int = 0) {\n  operators(\n    block: {number_gte: $minBlockNumber}\n    where: {or: [{owner: $owner}, {controllers_contains_nocase: [$owner]}]}\n  ) {\n    ...OperatorFields\n  }\n}\n    ${OperatorFieldsFragmentDoc}`;\nexport const GetAllSponsorshipsDocument = gql `\n    query getAllSponsorships($first: Int, $skip: Int, $searchQuery: String!, $id: ID!, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {or: [{stream_contains_nocase: $searchQuery}, {id: $id}, {stakes_: {operator_contains_nocase: $searchQuery}}]}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipsByCreatorDocument = gql `\n    query getSponsorshipsByCreator($first: Int, $skip: Int, $searchQuery: String!, $id: ID!, $creator: String!, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {creator: $creator}, {or: [{stream_contains_nocase: $searchQuery}, {id: $id}, {stakes_: {operator_contains_nocase: $searchQuery}}]}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipByIdDocument = gql `\n    query getSponsorshipById($sponsorshipId: ID!, $minBlockNumber: Int = 0) {\n  sponsorship(id: $sponsorshipId, block: {number_gte: $minBlockNumber}) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetSponsorshipByStreamIdDocument = gql `\n    query getSponsorshipByStreamId($first: Int, $skip: Int, $orderBy: Sponsorship_orderBy, $orderDirection: OrderDirection, $streamId: String!, $whereFilters: Sponsorship_filter) {\n  sponsorships(\n    first: $first\n    skip: $skip\n    where: {and: [$whereFilters, {stream_contains_nocase: $streamId}]}\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n  ) {\n    ...SponsorshipFields\n  }\n}\n    ${SponsorshipFieldsFragmentDoc}`;\nexport const GetProjectDocument = gql `\n    query getProject($id: ID!, $minBlockNumber: Int = 0) {\n  project(id: $id, block: {number_gte: $minBlockNumber}) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectsDocument = gql `\n    query getProjects($first: Int, $skip: Int, $where: Project_filter) {\n  projects(\n    first: $first\n    skip: $skip\n    orderBy: score\n    orderDirection: desc\n    where: $where\n  ) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectsByTextDocument = gql `\n    query getProjectsByText($first: Int, $skip: Int, $text: String!, $where: Project_filter) {\n  projectSearch(first: $first, skip: $skip, text: $text, where: $where) {\n    ...ProjectFields\n  }\n}\n    ${ProjectFieldsFragmentDoc}`;\nexport const GetProjectSubscriptionsDocument = gql `\n    query getProjectSubscriptions($id: ID!) {\n  project(id: $id) {\n    subscriptions {\n      userAddress\n      endTimestamp\n    }\n  }\n}\n    `;\nexport const GetStreamByIdDocument = gql `\n    query getStreamById($streamId: ID!) {\n  stream(id: $streamId) {\n    ...StreamFields\n  }\n}\n    ${StreamFieldsFragmentDoc}`;\nexport const GetPagedStreamsDocument = gql `\n    query getPagedStreams($first: Int, $orderBy: Stream_orderBy, $orderDirection: OrderDirection, $where: Stream_filter) {\n  streams(\n    first: $first\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n    where: $where\n  ) {\n    ...StreamFields\n  }\n}\n    ${StreamFieldsFragmentDoc}`;\nexport const GetSponsorshipDailyBucketsDocument = gql `\n    query getSponsorshipDailyBuckets($where: SponsorshipDailyBucket_filter!, $first: Int, $skip: Int) {\n  sponsorshipDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...SponsorshipDailyBucketFields\n  }\n}\n    ${SponsorshipDailyBucketFieldsFragmentDoc}`;\nexport const GetSponsoringEventsDocument = gql `\n    query getSponsoringEvents($sponsorshipId: ID!, $first: Int, $skip: Int) {\n  sponsoringEvents(\n    where: {sponsorship_: {id: $sponsorshipId}}\n    first: $first\n    skip: $skip\n    orderBy: date\n    orderDirection: desc\n  ) {\n    ...SponsoringEventFields\n  }\n}\n    ${SponsoringEventFieldsFragmentDoc}`;\nexport const GetOperatorDailyBucketsDocument = gql `\n    query getOperatorDailyBuckets($where: OperatorDailyBucket_filter!, $first: Int, $skip: Int) {\n  operatorDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...OperatorDailyBucketFields\n  }\n}\n    ${OperatorDailyBucketFieldsFragmentDoc}`;\nexport const GetDelegatorDailyBucketsDocument = gql `\n    query getDelegatorDailyBuckets($where: DelegatorDailyBucket_filter!, $first: Int, $skip: Int) {\n  delegatorDailyBuckets(first: $first, skip: $skip, where: $where) {\n    ...DelegatorDailyBucketFields\n  }\n}\n    ${DelegatorDailyBucketFieldsFragmentDoc}`;\nexport const GetMetadataDocument = gql `\n    query getMetadata {\n  _meta {\n    block {\n      hash\n      number\n      timestamp\n    }\n  }\n}\n    `;\nexport const GetNetworkStatsDocument = gql `\n    query getNetworkStats {\n  networks(first: 1) {\n    totalStake\n    operatorsCount\n    sponsorshipsCount\n  }\n}\n    `;\n","export class Parsable {\n    constructor(raw, chainId) {\n        this.raw = raw;\n        this.chainId = chainId;\n        this.cache = {};\n        this.preparsed = {};\n        this.preparsed = this.preparse();\n    }\n    preparse() {\n        throw new Error('Not implemented');\n    }\n    getValue(key, parser) {\n        const cachedValue = this.cache[key];\n        if (key in this.cache) {\n            return cachedValue;\n        }\n        const value = parser ? parser(this.preparsed[key]) : this.preparsed[key];\n        this.cache[key] = value;\n        return value;\n    }\n}\n","import { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { Parsable } from '~/parsers/Parsable';\nimport { getChainConfigExtension } from '~/utils/chains';\nconst RawOperatorMetadata = z\n    .union([\n    z.string().transform((value) => {\n        try {\n            return JSON.parse(value);\n        }\n        catch (e) {\n            if (e instanceof SyntaxError) {\n                return {};\n            }\n            throw e;\n        }\n    }),\n    z.record(z.string(), z.unknown()),\n])\n    .default({})\n    .catch({})\n    .pipe(z.object({\n    name: z.unknown(),\n    description: z.unknown(),\n    imageIpfsCid: z.unknown(),\n    redundancyFactor: z.unknown(),\n    url: z.unknown(),\n    email: z.unknown(),\n    twitter: z.unknown(),\n    x: z.unknown(),\n    telegram: z.unknown(),\n    reddit: z.unknown(),\n    linkedIn: z.unknown(),\n}));\nconst UrlParser = z\n    .string()\n    .url()\n    .optional()\n    .catch(() => '')\n    .default('');\nexport class OperatorMetadata extends Parsable {\n    static parse(raw, chainId) {\n        try {\n            return new OperatorMetadata(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawOperatorMetadata.parse(this.raw);\n    }\n    get name() {\n        return this.getValue('name', (raw) => {\n            return z\n                .string()\n                .catch(() => '')\n                .parse(raw);\n        });\n    }\n    get description() {\n        return this.getValue('description', (raw) => {\n            return z\n                .string()\n                .catch(() => '')\n                .parse(raw);\n        });\n    }\n    get imageIpfsCid() {\n        return this.getValue('imageIpfsCid', (raw) => {\n            return z\n                .string()\n                .trim()\n                .optional()\n                .catch(() => undefined)\n                .transform((v) => v || undefined)\n                .parse(raw);\n        });\n    }\n    get imageUrl() {\n        const { imageIpfsCid, chainId } = this;\n        const { ipfsGatewayUrl } = getChainConfigExtension(chainId).ipfs;\n        return imageIpfsCid && `${ipfsGatewayUrl}${imageIpfsCid}`;\n    }\n    get redundancyFactor() {\n        return this.getValue('redundancyFactor', (raw) => {\n            return z.coerce\n                .number()\n                .int()\n                .min(1)\n                .optional()\n                .catch(() => undefined)\n                .parse(raw);\n        });\n    }\n    get url() {\n        return this.getValue('url', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get email() {\n        return this.getValue('email', (raw) => {\n            return z\n                .string()\n                .email()\n                .optional()\n                .catch(() => '')\n                .default('')\n                .parse(raw);\n        });\n    }\n    get twitter() {\n        return this.getValue('twitter', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get x() {\n        return this.getValue('x', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get telegram() {\n        return this.getValue('telegram', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get reddit() {\n        return this.getValue('reddit', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n    get linkedIn() {\n        return this.getValue('linkedIn', (raw) => {\n            return UrlParser.parse(raw);\n        });\n    }\n}\n","import { ZeroAddress } from 'ethers';\nimport { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { getDelegatedAmountForWallet, getSpotApy } from '~/getters';\nimport { OperatorMetadata } from '~/parsers/OperatorMetadata';\nimport { Parsable } from '~/parsers/Parsable';\nimport { toBigInt, toBN, toFloat } from '~/utils/bn';\nconst RawOperator = z.object({\n    contractVersion: z.unknown(),\n    controllers: z.unknown(),\n    cumulativeOperatorsCutWei: z.unknown(),\n    cumulativeProfitsWei: z.unknown(),\n    dataTokenBalanceWei: z.unknown(),\n    delegations: z.unknown(),\n    delegatorCount: z.unknown(),\n    exchangeRate: z.unknown(),\n    id: z.string(),\n    metadataJsonString: z.unknown(),\n    nodes: z.unknown(),\n    operatorsCutFraction: z.unknown(),\n    operatorTokenTotalSupplyWei: z.unknown(),\n    owner: z.unknown(),\n    queueEntries: z.unknown(),\n    slashingEvents: z.unknown(),\n    stakes: z.unknown(),\n    totalStakeInSponsorshipsWei: z.unknown(),\n    valueUpdateBlockNumber: z.unknown(),\n    valueUpdateTimestamp: z.unknown(),\n    valueWithoutEarnings: z.unknown(),\n});\nexport class Operator extends Parsable {\n    constructor() {\n        super(...arguments);\n        this._shares = {};\n    }\n    static parse(raw, chainId) {\n        try {\n            return new Operator(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawOperator.parse(this.raw);\n    }\n    get contractVersion() {\n        return this.getValue('contractVersion', (raw) => {\n            return z\n                .union([z.number(), z.string().transform(Number).pipe(z.number())])\n                .catch(-1)\n                .parse(raw);\n        });\n    }\n    get controllers() {\n        return this.getValue('controllers', (raw) => {\n            return z\n                .array(z.string().catch(''))\n                .catch([])\n                .transform((value) => {\n                const result = [];\n                for (const addr of value) {\n                    if (!addr) {\n                        continue;\n                    }\n                    result.push({\n                        address: addr.toLowerCase(),\n                        enabled: true,\n                        persisted: true,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get cumulativeOperatorsCutWei() {\n        return this.getValue('cumulativeOperatorsCutWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get cumulativeProfitsWei() {\n        return this.getValue('cumulativeProfitsWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get dataTokenBalanceWei() {\n        return this.getValue('dataTokenBalanceWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get delegations() {\n        return this.getValue('delegations', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    id: z.string(),\n                    delegator: z.object({\n                        id: z.string(),\n                    }),\n                    operatorTokenBalanceWei: z\n                        .string()\n                        .transform((v) => toBigInt(v || 0)),\n                    latestDelegationTimestamp: z.coerce.number(),\n                    earliestUndelegationTimestamp: z.coerce.number(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((delegations) => {\n                const result = [];\n                for (const d of delegations) {\n                    if (d) {\n                        result.push({\n                            ...d,\n                            delegator: d.delegator.id,\n                            amount: toBigInt(toBN(d.operatorTokenBalanceWei).multipliedBy(this.exchangeRate)),\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get delegatorCount() {\n        return this.getValue('delegatorCount', (raw) => {\n            return z.number().catch(0).parse(raw);\n        });\n    }\n    get exchangeRate() {\n        return this.getValue('exchangeRate', (raw) => {\n            return z\n                .union([z.string(), z.number().min(0)])\n                .transform((v) => toBN(v || 0))\n                .catch(toBN(0))\n                .parse(raw);\n        });\n    }\n    get id() {\n        return this.getValue('id');\n    }\n    get metadata() {\n        return this.getValue('metadataJsonString', (raw) => {\n            return new OperatorMetadata(raw, this.chainId);\n        });\n    }\n    get nodes() {\n        return this.getValue('nodes', (raw) => {\n            return z\n                .array(z.string().catch(''))\n                .catch([])\n                .transform((value) => {\n                const result = [];\n                for (const addr of value) {\n                    if (!addr) {\n                        continue;\n                    }\n                    result.push({\n                        address: addr.toLowerCase(),\n                        enabled: true,\n                        persisted: true,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get operatorsCut() {\n        return this.getValue('operatorsCutFraction', (raw) => {\n            return z\n                .string()\n                .transform((v) => toFloat(toBigInt(v || 0), 18n)\n                .multipliedBy(100)\n                .toNumber())\n                .catch(0)\n                .parse(raw);\n        });\n    }\n    get operatorTokenTotalSupplyWei() {\n        return this.getValue('operatorTokenTotalSupplyWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get owner() {\n        return this.getValue('owner', (raw) => {\n            return z.string().catch(ZeroAddress).parse(raw);\n        });\n    }\n    get queueEntries() {\n        return this.getValue('queueEntries', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amount: z.string().transform((v) => toBigInt(v || 0)),\n                    date: z.coerce.number(),\n                    delegator: z.object({ id: z.string() }),\n                    id: z.string(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((entries) => {\n                const result = [];\n                for (const e of entries) {\n                    if (e) {\n                        const { date, ...rest } = e;\n                        result.push({\n                            ...rest,\n                            queuedAt: new Date(date * 1000),\n                            delegator: rest.delegator.id,\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get slashingEvents() {\n        return this.getValue('slashingEvents', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amount: z.string().transform((v) => toBigInt(v || 0)),\n                    date: z.coerce.number(),\n                    sponsorship: z.object({\n                        id: z.string(),\n                        stream: z.object({\n                            id: z.string(),\n                        }),\n                    }),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((events) => {\n                const result = [];\n                for (const e of events) {\n                    if (e) {\n                        const { id: sponsorshipId, stream } = e.sponsorship;\n                        result.push({\n                            ...e,\n                            sponsorshipId,\n                            streamId: stream.id,\n                        });\n                    }\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get stakes() {\n        return this.getValue('stakes', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    amountWei: z.string().transform((v) => toBigInt(v)),\n                    earningsWei: z.string().transform((v) => toBigInt(v)),\n                    joinTimestamp: z.coerce.number(),\n                    operator: z.object({\n                        id: z.string(),\n                    }),\n                    sponsorship: z.object({\n                        id: z.string(),\n                        isRunning: z.boolean(),\n                        remainingWei: z\n                            .string()\n                            .transform((v) => toBigInt(v)),\n                        minimumStakingPeriodSeconds: z.coerce.number(),\n                        spotAPY: z.string().transform(toBN),\n                        projectedInsolvency: z\n                            .union([z.string(), z.null()])\n                            .transform((v) => (v == null ? null : Number(v))),\n                        stream: z.union([\n                            z.object({\n                                id: z.string(),\n                            }),\n                            z.null(),\n                        ]),\n                    }),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((stakes) => {\n                const result = [];\n                for (const s of stakes) {\n                    if (!s) {\n                        continue;\n                    }\n                    const { amountWei, earningsWei, joinTimestamp, operator, sponsorship, } = s;\n                    const { id: sponsorshipId, projectedInsolvency, remainingWei, spotAPY, stream, } = sponsorship;\n                    result.push({\n                        amountWei,\n                        earningsWei,\n                        isSponsorshipPaying: sponsorship.isRunning && sponsorship.remainingWei > 0n,\n                        joinedAt: new Date(joinTimestamp * 1000),\n                        minimumStakingPeriodSeconds: sponsorship.minimumStakingPeriodSeconds,\n                        operatorId: operator.id,\n                        projectedInsolvencyAt: projectedInsolvency != null\n                            ? new Date(projectedInsolvency * 1000)\n                            : null,\n                        remainingWei,\n                        sponsorshipId,\n                        spotAPY,\n                        streamId: stream?.id,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get totalStakeInSponsorshipsWei() {\n        return this.getValue('totalStakeInSponsorshipsWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get valueUpdateBlockNumber() {\n        return this.getValue('valueUpdateBlockNumber', (raw) => {\n            return z.coerce.number().optional().catch(undefined).parse(raw);\n        });\n    }\n    get valueUpdateTimestamp() {\n        return this.getValue('valueUpdateTimestamp', (raw) => {\n            return z.coerce.number().optional().catch(undefined).parse(raw);\n        });\n    }\n    get valueWithoutEarnings() {\n        return this.getValue('valueWithoutEarnings', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get apy() {\n        if (this._apy != null) {\n            return this._apy;\n        }\n        this._apy = getSpotApy(this);\n        return this._apy;\n    }\n    share(wallet) {\n        const addr = wallet.toLowerCase();\n        if (this._shares[addr] != null) {\n            return this._shares[addr];\n        }\n        this._shares[addr] = getDelegatedAmountForWallet(wallet, this);\n        return this._shares[addr];\n    }\n}\n","import { z } from 'zod';\nimport { ParseError } from '~/errors';\nimport { OperatorMetadata } from '~/parsers/OperatorMetadata';\nimport { Parsable } from '~/parsers/Parsable';\nimport { toBigInt } from '~/utils/bn';\nconst RawSponsorship = z.object({\n    cumulativeSponsoring: z.unknown(),\n    id: z.string(),\n    isRunning: z.unknown(),\n    minOperators: z.unknown(),\n    maxOperators: z.unknown(),\n    minimumStakingPeriodSeconds: z.unknown(),\n    operatorCount: z.unknown(),\n    projectedInsolvency: z.unknown(),\n    remainingWei: z.unknown(),\n    remainingWeiUpdateTimestamp: z.unknown(),\n    spotAPY: z.unknown(),\n    stream: z.unknown(),\n    stakes: z.unknown(),\n    totalPayoutWeiPerSec: z.unknown(),\n    totalStakedWei: z.unknown(),\n});\nexport class Sponsorship extends Parsable {\n    static parse(raw, chainId) {\n        try {\n            return new Sponsorship(raw, chainId);\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                throw new ParseError(raw, e);\n            }\n            throw e;\n        }\n    }\n    preparse() {\n        return RawSponsorship.parse(this.raw);\n    }\n    get cumulativeSponsoring() {\n        return this.getValue('cumulativeSponsoring', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get id() {\n        return this.getValue('id');\n    }\n    get isRunning() {\n        return this.getValue('isRunning', (raw) => {\n            return z.boolean().catch(false).parse(raw);\n        });\n    }\n    get minOperators() {\n        return this.getValue('minOperators', (raw) => {\n            return z.coerce.number().int().min(0).catch(0).parse(raw);\n        });\n    }\n    get maxOperators() {\n        return this.getValue('maxOperators', (raw) => {\n            return z.number().int().min(0).default(Infinity).catch(Infinity).parse(raw);\n        });\n    }\n    get minimumStakingPeriodSeconds() {\n        return this.getValue('minimumStakingPeriodSeconds', (raw) => {\n            return z.coerce.number().min(0).catch(0).parse(raw);\n        });\n    }\n    get operatorCount() {\n        return this.getValue('operatorCount', (raw) => {\n            return z.coerce.number().int().min(0).catch(0).parse(raw);\n        });\n    }\n    get projectedInsolvencyAt() {\n        return this.getValue('projectedInsolvency', (raw) => {\n            return z\n                .union([\n                z.string().transform(Number).pipe(z.number()),\n                z.number(),\n                z.null(),\n            ])\n                .catch(null)\n                .transform((v) => (v === null ? null : new Date(Number(v) * 1000)))\n                .parse(raw);\n        });\n    }\n    get remainingBalanceWei() {\n        return this.getValue('remainingWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get remainingBalanceUpdatedAt() {\n        return this.getValue('remainingWeiUpdateTimestamp', (raw) => {\n            return z\n                .union([\n                z.string().transform(Number).pipe(z.number()),\n                z.number(),\n                z.null(),\n            ])\n                .catch(null)\n                .transform((v) => (v === null ? null : new Date(Number(v) * 1000)))\n                .parse(raw);\n        });\n    }\n    get spotApy() {\n        return this.getValue('spotAPY', (raw) => {\n            return z.coerce.number().catch(0).parse(raw);\n        });\n    }\n    get streamId() {\n        return this.getValue('stream', (raw) => {\n            return z\n                .union([\n                z.null(),\n                z.object({\n                    id: z.string(),\n                }),\n            ])\n                .catch(null)\n                .parse(raw)?.id;\n        });\n    }\n    get stakes() {\n        return this.getValue('stakes', (raw) => {\n            return z\n                .array(z\n                .union([\n                z.null(),\n                z.object({\n                    operator: z.object({\n                        id: z.string(),\n                        metadataJsonString: z.unknown(),\n                    }),\n                    amountWei: z.string().transform((v) => toBigInt(v)),\n                    lockedWei: z.string().transform((v) => toBigInt(v)),\n                    joinTimestamp: z.coerce.number(),\n                }),\n            ])\n                .catch(null))\n                .catch([])\n                .transform((stakes) => {\n                const result = [];\n                for (const s of stakes) {\n                    if (!s) {\n                        continue;\n                    }\n                    const { operator, joinTimestamp, ...rest } = s;\n                    result.push({\n                        ...rest,\n                        joinedAt: new Date(joinTimestamp * 1000),\n                        metadata: OperatorMetadata.parse(operator.metadataJsonString, this.chainId),\n                        operatorId: operator.id,\n                    });\n                }\n                return result;\n            })\n                .parse(raw);\n        });\n    }\n    get payoutPerSecond() {\n        return this.getValue('totalPayoutWeiPerSec', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    get payoutPerDay() {\n        return this.payoutPerSecond * 86400n;\n    }\n    get totalStakedWei() {\n        return this.getValue('totalStakedWei', (raw) => {\n            return z\n                .union([z.string(), z.number().int().min(0)])\n                .transform((v) => toBigInt(v || 0))\n                .catch(0n)\n                .parse(raw);\n        });\n    }\n    timeCorrectedRemainingBalanceWeiAt(timestampInMillis) {\n        const time = timestampInMillis - (timestampInMillis % 1000);\n        if (!this.isRunning) {\n            return this.remainingBalanceWei;\n        }\n        const secondsElapsed = Math.max(0, time - (this.remainingBalanceUpdatedAt?.getTime() ?? time)) / 1000;\n        const result = this.remainingBalanceWei - toBigInt(secondsElapsed) * this.payoutPerSecond;\n        return result > 0n ? result : 0n;\n    }\n}\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { useDiscardableEffect } from 'toasterhea';\nimport { useLayoutEffect, useReducer, useRef, useState } from 'react';\nconst toastIn = keyframes `\n    from {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n    to {\n        transform: translateX(0) translateZ(0);\n    }\n`;\nconst toastSqueeze = keyframes `\n    from {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n    to {\n        height: 0;\n        margin-top: 0;\n        margin-left: 0;\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n`;\nconst toastOut = keyframes `\n    from {\n        transform: translateX(0) translateZ(0);\n    }\n    to {\n        transform: translateX(-100%) translateX(-24px) translateZ(0);\n    }\n`;\nexport default function AbstractToast({ children, ...props }) {\n    const [hidden, hide] = useReducer(() => true, false);\n    const [squeezed, squeeze] = useReducer(() => true, false);\n    const [height, setHeight] = useState(0);\n    const ref = useRef(null);\n    const innerRef = useRef(null);\n    const mountedAtRef = useRef(performance.now());\n    useDiscardableEffect((discard) => {\n        const { current: root } = ref;\n        root?.addEventListener('animationend', ({ animationName }) => {\n            if (animationName === toastOut.getName()) {\n                squeeze();\n            }\n            if (animationName === toastSqueeze.getName()) {\n                discard();\n            }\n        });\n        /**\n         * Let's make sure each open toast stays visible for at least a second. Otherwise\n         * it's jumpy and a bit confusing.\n         */\n        setTimeout(hide, Math.max(0, 1000 - (performance.now() - mountedAtRef.current)));\n    });\n    useLayoutEffect(() => {\n        const { current: root } = innerRef;\n        if (!root) {\n            return;\n        }\n        const { height } = root.getBoundingClientRect();\n        setHeight(height);\n    }, [children]);\n    return (React.createElement(Root, { ref: ref, style: {\n            height: `${height}px`,\n        }, \"$hidden\": hidden, \"$squeezed\": squeezed },\n        React.createElement(\"div\", { ...props, ref: innerRef }, children)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1p8pheq\" }) `\n    background: white;\n    box-shadow: 0 8px 12px 0 #52525226, 0 0 1px 0 #00000040;\n    border-radius: 8px;\n    color: #323232;\n    margin-top: 12px;\n    margin-left: 24px;\n    transition: 200ms height;\n    width: max-content;\n\n    ${({ $hidden, $squeezed }) => {\n    if (!$hidden) {\n        return css `\n                animation: 0.15s 1 ${toastIn} both ease-in;\n            `;\n    }\n    if ($squeezed) {\n        return css `\n                animation: 0.15s 1 ${toastSqueeze} forwards ease-in;\n            `;\n    }\n    return css `\n            animation: 0.15s 1 ${toastOut} forwards ease-in;\n        `;\n}}\n`;\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport InfoIcon from '@atlaskit/icon/glyph/info';\nimport ErrorIcon from '@atlaskit/icon/glyph/error';\nimport CrossIcon from '@atlaskit/icon/glyph/cross';\nimport Spinner from '~/components/Spinner';\nimport { MEDIUM } from '../utils/styled';\nimport AbstractToast from './AbstractToast';\nexport var ToastType;\n(function (ToastType) {\n    ToastType[\"Info\"] = \"info\";\n    ToastType[\"Processing\"] = \"processing\";\n    ToastType[\"Success\"] = \"success\";\n    ToastType[\"Warning\"] = \"warn\";\n})(ToastType || (ToastType = {}));\nconst defaultAutoCloseAfter = 3;\nexport default function Toast({ type = ToastType.Info, title = 'внимание!', desc, okLabel, cancelLabel, onResolve, onReject, canSubmit = true, autoCloseAfter: autoCloseAfterProp = true, }) {\n    const autoCloseAfter = type !== ToastType.Processing && okLabel == null && cancelLabel == null\n        ? autoCloseAfterProp === true\n            ? defaultAutoCloseAfter\n            : autoCloseAfterProp\n        : false;\n    useEffect(() => {\n        if (autoCloseAfter === false) {\n            return () => void 0;\n        }\n        const timeoutId = setTimeout(() => void onReject?.(), autoCloseAfter * 1000);\n        return () => void clearTimeout(timeoutId);\n    }, [autoCloseAfter, onReject]);\n    return (React.createElement(AbstractToast, null,\n        React.createElement(Form, { onSubmit: (e) => {\n                e.preventDefault();\n                if (canSubmit) {\n                    onResolve?.();\n                }\n            } },\n            React.createElement(React.Fragment, null,\n                type === ToastType.Success && (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n                    React.createElement(CheckCircleIcon, { label: \"Success\" }))),\n                type === ToastType.Info && (React.createElement(IconWrap, { \"$color\": \"#6240AF\" },\n                    React.createElement(InfoIcon, { label: \"Info\" }))),\n                type === ToastType.Warning && (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n                    React.createElement(ErrorIcon, { label: \"Error\" }))),\n                type === ToastType.Processing && (React.createElement(IconWrap, null,\n                    React.createElement(Spinner, { color: \"blue\" })))),\n            React.createElement(Body, null,\n                React.createElement(\"h4\", null, title),\n                typeof desc === 'string' ? React.createElement(\"p\", null, desc) : desc,\n                (okLabel || cancelLabel) != null && (React.createElement(Buttons, null,\n                    okLabel != null && (React.createElement(Button, { type: \"submit\", disabled: !canSubmit }, okLabel)),\n                    okLabel != null && cancelLabel != null && React.createElement(Dot, null),\n                    cancelLabel != null && (React.createElement(Button, { type: \"button\", onClick: () => void onReject?.() }, cancelLabel))))),\n            type !== ToastType.Processing && (React.createElement(CloseButton, { onClick: () => void onReject?.(), type: \"button\" },\n                React.createElement(CrossIcon, { label: \"Dismiss\", size: \"small\" }))))));\n}\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-1lvr7ii\" }) `\n    align-items: center;\n    appearance: none;\n    color: #525252;\n    display: flex;\n    flex-shrink: 0;\n    height: 24px;\n    justify-content: center;\n    margin-left: 16px;\n    width: 24px;\n    padding: 0;\n    outline: 0;\n    border: 0;\n    background: none;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-qj1d6o\" }) `\n    background: #525252;\n    height: 3px;\n    margin-left: 8px;\n    margin-right: 8px;\n    width: 3px;\n`;\nconst Form = styled.form.withConfig({ displayName: \"Form\", componentId: \"sc-1cm9afn\" }) `\n    align-items: start;\n    display: flex;\n    max-width: 100%;\n    padding-left: 16px;\n    padding-right: 16px;\n    padding-top: 20px;\n    padding-bottom: 20px;\n    width: 400px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1vb6m9z\" }) `\n    height: 24px;\n    width: 24px;\n    position: relative;\n    display: flex;\n    items-center;\n    justify-content: center;\n    flex-shrink: 0;\n    margin-right: 16px;\n    color: ${({ $color = 'inherit' }) => $color};\n`;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-jfn3zx\" }) `\n    flex-grow: 1;\n    min-width: 0;\n    padding: 3px 0;\n    font-size: 14px;\n\n    p,\n    h4,\n    ul,\n    ol {\n        font-size: inherit;\n        overflow-wrap: break-word;\n    }\n\n    h4 {\n        margin: 0;\n        line-height: normal;\n    }\n\n    p,\n    ul,\n    ol {\n        margin: 8px 0 0;\n        line-height: 20px;\n        padding: 0;\n    }\n\n    h4 {\n        font-weight: ${MEDIUM};\n    }\n\n    ol {\n        list-style-position: inside;\n    }\n`;\nconst Buttons = styled.div.withConfig({ displayName: \"Buttons\", componentId: \"sc-753gay\" }) `\n    align-items: center;\n    display: flex;\n    line-height: normal;\n    margin-top: 8px;\n`;\nconst Button = styled.button.withConfig({ displayName: \"Button\", componentId: \"sc-1dee5n8\" }) `\n    background: none;\n    border: 0;\n    color: #0324ff;\n    display: block;\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    outline: 0;\n    padding: 0;\n\n    :hover {\n        color: #000d67;\n    }\n\n    :disabled {\n        color: inherit;\n        opacity: 0.5;\n    }\n`;\n","export var ProjectType;\n(function (ProjectType) {\n    ProjectType[\"OpenData\"] = \"OPEN_DATA\";\n    ProjectType[\"PaidData\"] = \"PAID_DATA\";\n    ProjectType[\"DataUnion\"] = \"DATA_UNION\";\n})(ProjectType || (ProjectType = {}));\nexport var TheGraph;\n(function (TheGraph) {\n    let ProjectType;\n    (function (ProjectType) {\n        ProjectType[\"Open\"] = \"openData\";\n        ProjectType[\"Paid\"] = \"paidData\";\n        ProjectType[\"DataUnion\"] = \"dataUnion\";\n    })(ProjectType = TheGraph.ProjectType || (TheGraph.ProjectType = {}));\n})(TheGraph || (TheGraph = {}));\n","export var ChartPeriod;\n(function (ChartPeriod) {\n    ChartPeriod[\"SevenDays\"] = \"7d\";\n    ChartPeriod[\"OneMonth\"] = \"1m\";\n    ChartPeriod[\"ThreeMonths\"] = \"3m\";\n    ChartPeriod[\"OneYear\"] = \"1y\";\n    ChartPeriod[\"YearToDate\"] = \"ytd\";\n    ChartPeriod[\"All\"] = \"all\";\n})(ChartPeriod || (ChartPeriod = {}));\nexport function isChartPeriod(value) {\n    return Object.values(ChartPeriod).includes(value);\n}\n","import { getStreamrClientInstance } from '~/getters/getStreamrClient';\nconst providers = {};\nexport async function getPublicProvider(chainId) {\n    const provider = providers[chainId];\n    if (provider) {\n        return provider;\n    }\n    const client = await getStreamrClientInstance(chainId);\n    const { provider: newProvider } = await client.getSigner();\n    providers[chainId] = newProvider;\n    return newProvider;\n}\n","import React from 'react';\nimport { toaster } from 'toasterhea';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { Layer } from './Layer';\nexport default function toast(props, t) {\n    setTimeout(async () => {\n        try {\n            await (t || toaster(Toast, Layer.Toast)).pop(props);\n        }\n        catch (_) {\n            // Do nothing\n        }\n    });\n}\nexport function successToast(props, t) {\n    toast({\n        type: ToastType.Success,\n        ...props,\n    }, t);\n}\nexport function errorToast(props, t) {\n    toast({\n        type: ToastType.Warning,\n        ...props,\n    }, t);\n}\nconst vet = toaster(Toast, Layer.Toast);\nexport function validationErrorToast({ title, error }) {\n    toast({\n        title,\n        type: ToastType.Warning,\n        desc: (React.createElement(\"ul\", null, error.messages.map((message, index) => (React.createElement(\"li\", { key: index }, message))))),\n    }, vet);\n}\n","import { ApolloClient, InMemoryCache } from '@apollo/client';\nimport { Contract } from 'ethers';\nimport moment from 'moment';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { prehandleBehindBlockError } from '~/errors/BehindIndexError';\nimport { GetEnsDomainsForAccountDocument, } from '~/generated/gql/ens';\nimport { GetAllOperatorsDocument, GetAllSponsorshipsDocument, GetDelegatorDailyBucketsDocument, GetNetworkStatsDocument, GetOperatorByIdDocument, GetOperatorByOwnerAddressDocument, GetOperatorDailyBucketsDocument, GetOperatorsByDelegationAndIdDocument, GetOperatorsByDelegationAndMetadataDocument, GetOperatorsByDelegationDocument, GetOperatorsByOwnerOrControllerAddressDocument, GetSponsorshipByIdDocument, GetSponsorshipByStreamIdDocument, GetSponsorshipDailyBucketsDocument, GetSponsorshipsByCreatorDocument, GetStreamByIdDocument, Operator_OrderBy, OrderDirection, SearchOperatorsByMetadataDocument, Sponsorship_OrderBy, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { Operator } from '~/parsers/Operator';\nimport { Sponsorship } from '~/parsers/Sponsorship';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { ProjectType } from '~/shared/types';\nimport { ChartPeriod } from '~/types';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt } from '~/utils/bn';\nimport { getChainConfigExtension } from '~/utils/chains';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport { getPublicProvider } from '~/utils/providers';\nimport { errorToast } from '~/utils/toast';\nconst DEFAULT_OPERATOR_ORDER_BY = Operator_OrderBy.Id;\nconst DEFAULT_SPONSORSHIP_ORDER_BY = Sponsorship_OrderBy.Id;\nconst DEFAULT_ORDER_DIRECTION = OrderDirection.Asc;\nexport function getProjectRegistryContract({ chainId, provider, }) {\n    return new Contract(getContractAddress('projectRegistry', chainId), getContractAbi('projectRegistry'), provider);\n}\nexport function getERC20TokenContract({ tokenAddress, provider, }) {\n    return new Contract(tokenAddress, getContractAbi('erc20'), provider);\n}\nexport function getMarketplaceContract({ chainId, provider, }) {\n    return new Contract(getContractAddress('marketplace', chainId), getContractAbi('marketplace'), provider);\n}\nexport async function getAllowance(chainId, tokenAddress, account, { recover = false } = {}) {\n    while (true) {\n        try {\n            const provider = await getPublicProvider(chainId);\n            return await getERC20TokenContract({\n                tokenAddress,\n                provider,\n            }).allowance(account, getContractAddress('marketplace', chainId));\n        }\n        catch (e) {\n            console.warn('Allowance check failed', e);\n            if (!recover) {\n                throw e;\n            }\n            try {\n                await toaster(Toast, Layer.Toast).pop({\n                    title: 'Allowance check failed',\n                    type: ToastType.Warning,\n                    desc: 'Would you like to try again?',\n                    okLabel: 'Yes',\n                    cancelLabel: 'No',\n                });\n                continue;\n            }\n            catch (_) {\n                throw e;\n            }\n        }\n    }\n}\nexport async function getProjectPermissions(chainId, projectId, account) {\n    if (account === address0) {\n        return {\n            canBuy: false,\n            canDelete: false,\n            canEdit: false,\n            canGrant: false,\n        };\n    }\n    const provider = await getPublicProvider(chainId);\n    const response = await getProjectRegistryContract({\n        chainId,\n        provider,\n    }).getPermission(projectId, account);\n    const [canBuy = false, canDelete = false, canEdit = false, canGrant = false] = z\n        .array(z.boolean())\n        .parse(response);\n    return {\n        canBuy,\n        canDelete,\n        canEdit,\n        canGrant,\n    };\n}\nexport function getProjectTypeName(projectType) {\n    switch (projectType) {\n        case ProjectType.DataUnion:\n            return 'Data Union';\n        case ProjectType.OpenData:\n            return 'open data project';\n        case ProjectType.PaidData:\n            return 'paid data project';\n    }\n}\nexport function getProjectTypeTitle(projectType) {\n    switch (projectType) {\n        case ProjectType.DataUnion:\n            return 'Data Union';\n        case ProjectType.OpenData:\n            return 'Open Data';\n        case ProjectType.PaidData:\n            return 'Paid Data';\n    }\n}\nexport function getProjectImageUrl(chainId, { imageUrl, imageIpfsCid, }) {\n    const { ipfsGatewayUrl } = getChainConfigExtension(chainId).ipfs;\n    if (imageIpfsCid) {\n        return `${ipfsGatewayUrl}${imageIpfsCid}`;\n    }\n    if (!imageUrl) {\n        return;\n    }\n    return `${imageUrl.replace(/^https:\\/\\/ipfs\\.io\\/ipfs\\//, ipfsGatewayUrl)}`;\n}\nexport async function getAllSponsorships({ chainId, first, skip, searchQuery = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = true, includeWithoutFunding = true, includeExpiredFunding = true, hasOperatorId = undefined, }) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetAllSponsorshipsDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery.toLowerCase(),\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getSponsorshipsByStreamId({ chainId, first, skip, streamId = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = false, includeWithoutFunding = false, includeExpiredFunding = false, hasOperatorId, }) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetSponsorshipByStreamIdDocument,\n        variables: {\n            first,\n            skip,\n            streamId,\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getParsedSponsorshipById(chainId, sponsorshipId, { force = false, minBlockNumber = 0 } = {}) {\n    let rawSponsorship;\n    try {\n        const { data } = await getGraphClient(chainId).query({\n            query: GetSponsorshipByIdDocument,\n            variables: {\n                sponsorshipId: sponsorshipId.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        rawSponsorship = (data.sponsorship || null);\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        console.warn('Failed to fetch a Sponsorship', e);\n        errorToast({ title: 'Could not fetch Sponsorship details' });\n    }\n    if (rawSponsorship) {\n        return Sponsorship.parse(rawSponsorship, chainId);\n    }\n    return null;\n}\nexport async function getSponsorshipsByCreator(chainId, creator, { first, skip, searchQuery = '', orderBy = DEFAULT_SPONSORSHIP_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, includeInactive = false, includeWithoutFunding = false, includeExpiredFunding = false, hasOperatorId, } = {}) {\n    const whereFilters = {};\n    if (!includeInactive) {\n        whereFilters.isRunning = true;\n    }\n    if (!includeWithoutFunding) {\n        whereFilters.remainingWei_gt = 0;\n    }\n    if (!includeExpiredFunding) {\n        whereFilters.projectedInsolvency_gt = Math.floor(Date.now() / 1000);\n    }\n    if (hasOperatorId != null) {\n        whereFilters.stakes_ = { operator_contains_nocase: hasOperatorId };\n    }\n    const { data: { sponsorships }, } = await getGraphClient(chainId).query({\n        query: GetSponsorshipsByCreatorDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery.toLowerCase(),\n            creator,\n            orderBy,\n            orderDirection,\n            whereFilters,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsorships;\n}\nexport async function getAllOperators({ chainId, first, skip, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetAllOperatorsDocument,\n        variables: {\n            first,\n            skip,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegation({ chainId, first, skip, address, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegationAndId({ chainId, first, skip, address, operatorId, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationAndIdDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            operatorId,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorsByDelegationAndMetadata({ chainId, first, skip, address, searchQuery, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: GetOperatorsByDelegationAndMetadataDocument,\n        variables: {\n            first,\n            skip,\n            delegator: address,\n            searchQuery,\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function searchOperatorsByMetadata({ chainId, first, skip, searchQuery, orderBy = DEFAULT_OPERATOR_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, force = false, }) {\n    const { data: { operators }, } = await getGraphClient(chainId).query({\n        query: SearchOperatorsByMetadataDocument,\n        variables: {\n            first,\n            skip,\n            searchQuery,\n            id: searchQuery?.toLowerCase() || '',\n            orderBy,\n            orderDirection,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return operators;\n}\nexport async function getOperatorById(chainId, operatorId, { force = false, minBlockNumber = 0 } = {}) {\n    try {\n        const { data: { operator }, } = await getGraphClient(chainId).query({\n            query: GetOperatorByIdDocument,\n            variables: {\n                operatorId,\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        return operator || null;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n}\nexport async function getParsedOperatorByOwnerAddress(chainId, address, { force = false, minBlockNumber = 0 } = {}) {\n    let operator = null;\n    try {\n        const { data: { operators }, } = await getGraphClient(chainId).query({\n            query: GetOperatorByOwnerAddressDocument,\n            variables: {\n                owner: address.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        operator = operators?.[0] || null;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n    if (operator) {\n        return Operator.parse(operator, chainId);\n    }\n    return null;\n}\nexport async function getParsedOperatorsByOwnerOrControllerAddress(chainId, address, { force = false, minBlockNumber = 0 } = {}) {\n    let queryResult = [];\n    try {\n        const { data: { operators }, } = await getGraphClient(chainId).query({\n            query: GetOperatorsByOwnerOrControllerAddressDocument,\n            variables: {\n                owner: address.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        queryResult = operators;\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n    const result = [];\n    for (const operator of queryResult) {\n        result.push(Operator.parse(operator, chainId));\n    }\n    return result;\n}\nexport async function getBase64ForFile(file) {\n    return new Promise((resolve, reject) => {\n        const reader = new FileReader();\n        reader.readAsDataURL(file);\n        reader.onload = () => void resolve(reader.result);\n        reader.onerror = reject;\n    });\n}\n/**\n * Fetches stream descriptions from the Graph.\n * @param streamId Stream ID\n * @returns A string\n */\nexport async function getStreamDescription(chainId, streamId, { force = false } = {}) {\n    const { data: { stream }, } = await getGraphClient(chainId).query({\n        query: GetStreamByIdDocument,\n        variables: {\n            streamId,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return stream ? getDescription(stream) : '';\n}\n/**\n * Gets a collection of parsed Operators.\n * @param getter Callback that \"gets\" raw Operator objects.\n * @param options.mapper A mapping function that translates `Operator` instances into\n * something different.\n */\nexport async function getParsedOperators(getter, options) {\n    const { chainId } = options;\n    const rawOperators = await getter();\n    const operators = [];\n    const mapper = options.mapper || ((x) => x);\n    for (const raw of rawOperators) {\n        operators.push(mapper(Operator.parse(raw, chainId)));\n    }\n    return operators;\n}\n/**\n * Compute projected yearly earnings based on the current yield.\n * @param operator.valueWithoutEarnings Total value of the pool.\n * @param operator.stakes Collection of basic stake information (amount, spot apy, projected insolvency date).\n * @returns Number representing the APY factor (0.01 is 1%).\n */\nexport function getSpotApy(operator) {\n    const { valueWithoutEarnings, stakes } = operator;\n    if (valueWithoutEarnings === 0n) {\n        return 0;\n    }\n    const now = Date.now();\n    const yearlyIncome = stakes.reduce((sum, { spotAPY, projectedInsolvencyAt, amountWei, isSponsorshipPaying }) => {\n        if (projectedInsolvencyAt == null ||\n            projectedInsolvencyAt.getTime() < now ||\n            !isSponsorshipPaying) {\n            /**\n             * Skip expired stakes.\n             */\n            return sum;\n        }\n        return sum.plus(toBN(amountWei).multipliedBy(spotAPY));\n    }, toBN(0));\n    if (yearlyIncome.isEqualTo(0)) {\n        return 0;\n    }\n    return yearlyIncome.dividedBy(toBN(valueWithoutEarnings)).toNumber();\n}\n/**\n * Calculates the amount delegated to given operator by given wallet.\n */\nexport function getDelegatedAmountForWallet(address, { delegations }) {\n    const addr = address.toLowerCase();\n    return (delegations.find(({ delegator }) => delegator.toLowerCase() === addr)?.amount ||\n        0n);\n}\n/**\n * Sums amounts delegated to given operator by its owner.\n */\nexport function getSelfDelegatedAmount(operator) {\n    return getDelegatedAmountForWallet(operator.owner, operator);\n}\n/**\n * Calculates wallet's delegation's ratio out of the total optionally\n * modded with `offset`.\n */\nexport function getDelegationFractionForWallet(address, operator, { offset = 0n } = {}) {\n    const total = operator.valueWithoutEarnings + offset;\n    if (total === 0n) {\n        return toBN(0);\n    }\n    return toBN(getDelegatedAmountForWallet(address, operator)).dividedBy(toBN(total));\n}\n/**\n * Calculates the amount of DATA needed to payout undelegation queue in full.\n */\nexport function calculateUndelegationQueueSize(operator) {\n    const lookup = {};\n    // Sum up queue by addresses\n    for (let i = 0; i < operator.queueEntries.length; i++) {\n        const element = operator.queueEntries[i];\n        if (lookup[element.delegator] == null) {\n            lookup[element.delegator] = 0n;\n        }\n        lookup[element.delegator] = lookup[element.delegator] + element.amount;\n    }\n    // Go through addresses and make sure we cap to max delegation\n    for (const address of Object.keys(lookup)) {\n        lookup[address] = ((a, b) => (a < b ? a : b))(lookup[address], getDelegatedAmountForWallet(address, operator));\n    }\n    // Return total sum of all addresses\n    return Object.values(lookup).reduce((sum, b) => sum + b, 0n);\n}\n/**\n * Calculates owner's own delegation's ratio out of the total optionally\n * modded with `offset`.\n */\nexport function getSelfDelegationFraction(operator, { offset = 0n } = {}) {\n    return getDelegationFractionForWallet(operator.owner, operator, { offset });\n}\n/**\n * Turns `period` into a timestamp relative to `end` moment.\n */\nexport function getTimestampForChartPeriod(period, end) {\n    const result = (() => {\n        switch (period) {\n            case ChartPeriod.SevenDays:\n                return end.clone().subtract(7, 'days');\n            case ChartPeriod.OneMonth:\n                return end.clone().subtract(30, 'days');\n            case ChartPeriod.ThreeMonths:\n                return end.clone().subtract(90, 'days');\n            case ChartPeriod.OneYear:\n                return end.clone().subtract(365, 'days');\n            case ChartPeriod.YearToDate:\n                return end.clone().startOf('year');\n            case ChartPeriod.All:\n            default:\n                return moment(0).utc();\n        }\n    })();\n    return result;\n}\nfunction parseNetworkStats(stats) {\n    try {\n        return z\n            .object({\n            totalStake: z.string().transform((v) => toBigInt(v)),\n            sponsorshipsCount: z.number(),\n            operatorsCount: z.number(),\n        })\n            .parse(stats.networks[0]);\n    }\n    catch (_) {\n        return undefined;\n    }\n}\nexport async function getNetworkStats(chainId) {\n    const { data } = await getGraphClient(chainId).query({\n        query: GetNetworkStatsDocument,\n    });\n    return parseNetworkStats(data);\n}\n/**\n * Fetches a collection of daily Operator buckets.\n * @param operatorId Operator ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Operator buckets\n */\nexport async function getOperatorDailyBuckets(chainId, operatorId, options) {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetOperatorDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                operator_: {\n                    id: operatorId,\n                },\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.operatorDailyBuckets;\n}\n/**\n * Fetches a collection of daily Sponsorship buckets.\n * @param chainId Chain ID\n * @param sponsorshipId Sponsorship ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Sponsorship buckets\n */\nexport async function getSponsorshipDailyBuckets(chainId, sponsorshipId, options) {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetSponsorshipDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                sponsorship_: {\n                    id: sponsorshipId,\n                },\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.sponsorshipDailyBuckets;\n}\n/**\n * Fetches a collection of daily Delegator buckets.\n * @param delegatorId Delegator ID\n * @param options.dateLowerThan End unix timestamp\n * @param options.dateGreaterEqualThan Start unix timestamp\n * @param options.batchSize Number of buckets to scout for at once\n * @param options.skip Number of buckets to skip\n * @returns Delegator buckets\n */\nexport const getDelegatorDailyBuckets = async (chainId, delegatorId, options) => {\n    const { dateLowerThan: date_lt, dateGreaterEqualThan: date_gte, batchSize: first = 999, skip, force = false, } = options;\n    const { data } = await getGraphClient(chainId).query({\n        query: GetDelegatorDailyBucketsDocument,\n        variables: {\n            first,\n            skip,\n            where: {\n                delegator: delegatorId,\n                date_lt,\n                date_gte,\n            },\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return data.delegatorDailyBuckets;\n};\nlet ensApolloClient;\n/**\n * Fetches the ENS subgraph for domains associated with the given `wallet` address.\n */\nexport async function getENSDomainsForWallet(wallet, { force = false } = {}) {\n    if (!wallet) {\n        return [];\n    }\n    if (!ensApolloClient) {\n        ensApolloClient = new ApolloClient({\n            uri: process.env.ENS_GRAPH_SCHEMA_PATH ||\n                'https://api.thegraph.com/subgraphs/name/ensdomains/ens',\n            cache: new InMemoryCache(),\n        });\n    }\n    const { data = { domains: [], wrappedDomains: [] } } = await ensApolloClient.query({\n        query: GetEnsDomainsForAccountDocument,\n        variables: {\n            account: wallet.toLowerCase(),\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return [...data.domains, ...data.wrappedDomains]\n        .map(({ name }) => (!!name && /\\.eth$/.test(name) ? name : null))\n        .sort()\n        .filter(Boolean);\n}\n/**\n * Extracts description from a metadata-having Stream-alike\n */\nexport function getDescription(streamalike) {\n    try {\n        return z\n            .string()\n            .transform((v) => JSON.parse(v))\n            .pipe(z.object({\n            description: z\n                .string()\n                .optional()\n                .transform((v) => v || ''),\n        }))\n            .parse(streamalike.metadata).description;\n    }\n    catch (_) {\n        return '';\n    }\n}\n","export default class TimeoutError extends Error {\n    constructor() {\n        super('Timeout');\n        this.name = 'TimeoutError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, TimeoutError);\n        }\n        Object.setPrototypeOf(this, TimeoutError.prototype);\n    }\n}\n","import { useCallback, useEffect, useRef } from 'react';\n/**\n * @requires Basic knowledge of what you're doing. ;) Checking on being mounted often\n * leads to unexpected behaviour because it may not be the right condition to rely on.\n *\n * Better-control-giving alternatives worth looking into:\n * - in effects: use a local `mounted` flag and unset it on discard (see example),\n * - in callbacks: use `AbortController` and `AbortSignal`.\n * @example\n    // `mounted` flag example\n    useEffect(() => {\n        let mounted = true\n\n        async function fn() {\n            await new Promise((resolve) => void setTimeout(resolve))\n\n            if (mounted) {\n                // Do stuff!\n            }\n        }\n\n        fn()\n\n        return () => {\n            mounted = false\n        }\n    }, [])\n */\nexport default function useIsMounted() {\n    const ref = useRef(false);\n    useEffect(() => {\n        ref.current = true;\n        return () => {\n            ref.current = false;\n        };\n    }, []);\n    return useCallback(() => ref.current, []);\n}\n","import { Auth, LoadingIndicator, Logo, SignInMethod } from '@streamr/streamr-layout';\nimport React, { useEffect, useState } from 'react';\nimport { Link as PrestyledLink } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { defer, toaster, useDiscardableEffect } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport TimeoutError from '~/shared/errors/TimeoutError';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { getWalletAccount, useWalletAccount } from '~/shared/stores/wallet';\nimport { MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { isCodedError, RejectionReason } from '~/utils/exceptions';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1bwwbsp\" }) `\n    background: #f8f8f8;\n    color: #323232;\n    height: 100%;\n    left: 0;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 1;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-ye5bl7\" }) `\n    display: flex;\n    flex-direction: column;\n    flex-grow: 0.8;\n    justify-content: center;\n    padding: 0 1em;\n    margin: 48px auto 88px;\n    color: #323232;\n\n    @media ${TABLET} {\n        margin: 152px auto 192px;\n    }\n`;\nconst Panel = styled.div.withConfig({ displayName: \"Panel\", componentId: \"sc-uivs5k\" }) `\n    margin-top: 40px;\n\n    @media ${TABLET} {\n        margin-top: 110px;\n    }\n`;\nconst Link = styled(PrestyledLink).withConfig({ displayName: \"Link\", componentId: \"sc-ut973d\" }) `\n    display: block;\n    margin: 0 auto;\n    user-select: none;\n    width: 32px;\n    outline: 0 !important;\n\n    svg {\n        color: #ff5c00;\n        display: block;\n    }\n`;\nconst TitleBar = styled.div.withConfig({ displayName: \"TitleBar\", componentId: \"sc-1bnios2\" }) `\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    line-height: 48px;\n    text-align: center;\n\n    @media ${TABLET} {\n        font-size: 24px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-mzbc2p\" }) `\n    color: #adadad;\n    font-size: 12px;\n    margin: 60px auto 0;\n    max-width: 432px;\n    text-align: center;\n\n    @media ${TABLET} {\n        margin-top: 120px;\n\n        br {\n            display: none;\n        }\n    }\n`;\nfunction ConnectModal({ onReject, onResolve }) {\n    const [connectDeferral, setConnectDeferral] = useState();\n    const connecting = !!connectDeferral;\n    const [error, setError] = useState();\n    const isMounted = useIsMounted();\n    function label() {\n        if (error) {\n            if (isCodedError(error) && error.code === -32002) {\n                return 'Already processing. Please wait.';\n            }\n            return \"Couldn't connect to MetaMask\";\n        }\n        if (connecting) {\n            return 'Connecting…';\n        }\n        return 'MetaMask';\n    }\n    useDiscardableEffect();\n    useEffect(() => {\n        function onKeyDown({ key }) {\n            if (key === 'Escape') {\n                onReject?.(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onReject]);\n    useEffect(() => () => {\n        connectDeferral?.reject();\n    }, [connectDeferral]);\n    const account = useWalletAccount();\n    useEffect(() => {\n        if (account) {\n            onResolve?.(account);\n        }\n    }, [onResolve, account]);\n    return (React.createElement(Root, null,\n        React.createElement(Inner, null,\n            React.createElement(\"div\", null,\n                React.createElement(Link, { to: R.root() },\n                    React.createElement(Logo, null))),\n            React.createElement(TitleBar, null, \"Streamr Hub\"),\n            React.createElement(\"form\", { onSubmit: async (e) => {\n                    e.preventDefault();\n                    if (connectDeferral) {\n                        return;\n                    }\n                    try {\n                        const deferral = defer();\n                        setError(undefined);\n                        setConnectDeferral(deferral);\n                        const currentAccount = await Promise.race([\n                            getWalletAccount({\n                                connect: true,\n                            }),\n                            deferral.promise,\n                            new Promise((_resolve, reject) => void setTimeout(() => void reject(new TimeoutError()), 120000)),\n                        ]);\n                        onResolve?.(currentAccount);\n                    }\n                    catch (e) {\n                        console.warn('Wallet connecting failed', e);\n                        if (isMounted()) {\n                            setError(e);\n                        }\n                    }\n                    finally {\n                        if (isMounted()) {\n                            setConnectDeferral(undefined);\n                        }\n                    }\n                } },\n                React.createElement(Panel, null,\n                    React.createElement(Auth, null,\n                        React.createElement(Auth.Panel, null,\n                            React.createElement(LoadingIndicator, { loading: connecting }),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(Auth.Header, null, \"Connect a wallet\")),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(SignInMethod, { disabled: connecting, type: \"submit\", theme: error ? SignInMethod.themes.Error : undefined },\n                                    React.createElement(SignInMethod.Title, null, label()),\n                                    React.createElement(SignInMethod.Icon, null,\n                                        React.createElement(SignInMethod.Icon.Metamask, null)))),\n                            React.createElement(Auth.PanelRow, null,\n                                React.createElement(Auth.Footer, null,\n                                    !error && !connecting && (React.createElement(\"span\", null,\n                                        \"Need an Ethereum wallet?\",\n                                        ' ',\n                                        React.createElement(\"a\", { href: \"https://ethereum.org/en/wallets/\", target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Learn more here\"))),\n                                    !!connecting && (React.createElement(Button, { kind: \"link\", size: \"mini\", onClick: () => void connectDeferral.reject(), type: \"button\" }, \"Cancel\")),\n                                    !!error && !connecting && (React.createElement(Button, { kind: \"secondary\", size: \"mini\", disabled: connecting, waiting: connecting, type: \"submit\" }, \"Try again\")))))))),\n            React.createElement(Footer, null,\n                React.createElement(\"span\", null,\n                    \"By connecting your wallet and using Streamr \",\n                    React.createElement(\"br\", null),\n                    \"you agree to our\",\n                    ' ',\n                    React.createElement(\"a\", { href: R.tos(), target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Terms of Service\"))))));\n}\nexport const connectModal = toaster(ConnectModal, Layer.Modal);\n","/**\n * Been dealt with. Ignore it if you catch it.\n */\nexport const Break = Object.freeze({ break: true });\n/**\n * Flagged flow is already being processed.\n */\nexport const FlagBusy = Object.freeze({});\n","import detectProvider from '@metamask/detect-provider';\nimport { BrowserProvider } from 'ethers';\nimport { produce } from 'immer';\nimport { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport { create } from 'zustand';\nimport { getENSDomainsForWallet } from '~/getters';\nimport { connectModal } from '~/modals/ConnectModal';\nimport { Break } from '~/utils/errors';\nimport { isMessagedObject, isRejectionReason } from '~/utils/exceptions';\nfunction isStringArray(value) {\n    return z.array(z.string()).safeParse(value).success;\n}\nlet providerPromise;\n/**\n * Detects current MetaMask provider, and explodes if it's not available.\n * @returns a promise that resolves with a MetaMask provider instance.\n */\nexport function getWalletProvider() {\n    if (providerPromise) {\n        return providerPromise;\n    }\n    providerPromise = new Promise((resolve, reject) => {\n        setTimeout(async () => {\n            let provider = await detectProvider();\n            if (!provider) {\n                return void reject(new Error('No provider'));\n            }\n            if (provider.providers?.length) {\n                // Multiple wallets available? Detect MetaMask.\n                provider =\n                    provider.providers.find((p) => p.isMetaMask) ?? provider.providers[0];\n            }\n            resolve(provider);\n        });\n    });\n    return providerPromise;\n}\nexport async function getWalletWeb3Provider() {\n    return new BrowserProvider((await getWalletProvider()));\n}\nexport async function getSigner() {\n    let retry = true;\n    while (true) {\n        try {\n            const provider = await getWalletWeb3Provider();\n            const signer = await provider.getSigner();\n            await signer.getAddress();\n            return signer;\n        }\n        catch (e) {\n            if (!retry) {\n                throw e;\n            }\n            if (!isMessagedObject(e) || !/unknown account #\\d+/i.test(e.message)) {\n                throw e;\n            }\n            try {\n                await connectModal.pop();\n                /**\n                 * If after this it still fails to get a proper signer (with\n                 * an address and all) ignore further attempts and just\n                 * throw the error (see above).\n                 */\n                retry = false;\n            }\n            catch (f) {\n                if (isRejectionReason(f)) {\n                    /**\n                     * The user kept their wallet locked and there's nothing\n                     * we can do. Let's break.\n                     */\n                    throw Break;\n                }\n                throw f;\n            }\n        }\n    }\n}\nconst promiseMap = new Map();\n/**\n * @param options.connect a flag that instructs the function to either\n * - get the account discreetly using `eth_accounts` (if `false`) - default, or\n * - trigger the unlocking with `eth_requestAccounts`.\n *\n * @returns an account address (a string), or `undefined` if there are\n * no available accounts.\n */\nexport async function getWalletAccount({ connect = false, } = {}) {\n    const provider = await getWalletProvider();\n    if (!connect) {\n        const accounts = await provider.request({\n            method: 'eth_accounts',\n        });\n        return accounts?.[0];\n    }\n    const existingPromise = promiseMap.get(provider);\n    if (existingPromise) {\n        return existingPromise;\n    }\n    const promise = new Promise((resolve, reject) => {\n        setTimeout(async () => {\n            try {\n                const accounts = await provider.request({\n                    method: 'eth_requestAccounts',\n                });\n                resolve(accounts?.[0]);\n            }\n            catch (e) {\n                reject(e);\n            }\n        });\n    });\n    promiseMap.set(provider, promise);\n    setTimeout(async () => {\n        try {\n            await promise;\n        }\n        catch (_) {\n            // Do nothing.\n        }\n        finally {\n            promiseMap.delete(provider);\n        }\n    });\n    return promise;\n}\nconst useWalletStore = create((set, get) => {\n    let lastKnownAccount;\n    const ensLookups = {};\n    function onAccountsChange(accounts) {\n        const [account = undefined] = isStringArray(accounts) ? accounts : [];\n        const addr = isAddress(account || '') ? account : undefined;\n        if (lastKnownAccount === addr) {\n            return;\n        }\n        lastKnownAccount = addr;\n        if (addr && typeof get().ens[addr] === 'undefined' && !ensLookups[addr]) {\n            ensLookups[addr] = true;\n            setTimeout(async () => {\n                try {\n                    const [ensName = undefined] = await getENSDomainsForWallet(addr);\n                    set((current) => produce(current, (next) => {\n                        next.ens[addr.toLowerCase()] = ensName;\n                    }));\n                }\n                catch (e) {\n                    console.warn('Failed to fetch ENS domain name', e);\n                }\n                finally {\n                    delete ensLookups[addr];\n                }\n            });\n        }\n        set((current) => produce(current, (next) => {\n            next.account = addr;\n        }));\n    }\n    setTimeout(async () => {\n        try {\n            const provider = await getWalletProvider();\n            provider.on('accountsChanged', onAccountsChange);\n            const accounts = await provider.request({\n                method: 'eth_accounts',\n            });\n            onAccountsChange(accounts);\n        }\n        catch (e) {\n            console.warn('Provider setup failed', e);\n        }\n        finally {\n            set((current) => produce(current, (next) => {\n                next.isLoading = false;\n            }));\n        }\n    });\n    return {\n        account: undefined,\n        ens: {},\n        isLoading: true,\n    };\n});\n/**\n * A hook that gives you the current MetaMask account address, if available.\n * @returns account address (a string), or `undefined` if the wallet is either\n * locked or has no accounts.\n */\nexport function useWalletAccount() {\n    return useWalletStore().account;\n}\n/**\n * A hook that gives you the loading state of the wallet.\n * @returns a boolean value indicating whether the wallet is loading.\n */\nexport function useIsWalletLoading() {\n    return useWalletStore().isLoading;\n}\n/**\n * A hook that gives you an ENS domain for an account address.\n * @returns either an ENS domain name, or an empty string.\n */\nexport function useEns(account) {\n    const { ens } = useWalletStore();\n    return (account && ens[account]) || '';\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nconst DefaultActions = {};\nexport function Buttons({ actions = DefaultActions, className }) {\n    return (React.createElement(Root, { className: className }, actions &&\n        Object.keys(actions)\n            .filter((key) => actions && actions[key].visible !== false)\n            .map((key) => {\n            const { title, onClick, linkTo, href, kind, disabled, outline, spinner, className: cn, type, } = (actions && actions[key]) || {};\n            const Tag = kind === 'link' ? Button : ButtonWithMinWidth;\n            return (React.createElement(Tag, { key: key, as: linkTo != null ? Link : href != null ? 'a' : 'button', to: linkTo, href: href, onClick: onClick, disabled: disabled, kind: kind, outline: outline, waiting: spinner, type: type, className: cn }, title));\n        })));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-3j85iz\" }) `\n    display: flex;\n    justify-content: flex-end;\n    width: 100%;\n\n    /* prevents border rendering glitches in chrome */\n    transform: translate3d(0, 0, 0);\n\n    :empty {\n        display: none;\n    }\n\n    > * {\n        padding-right: 15px;\n        padding-left: 15px;\n    }\n\n    > * + * {\n        margin-left: 1rem;\n    }\n`;\nconst ButtonWithMinWidth = styled(Button).withConfig({ displayName: \"ButtonWithMinWidth\", componentId: \"sc-q9kyk6\" }) `\n    min-width: 7rem;\n`;\n","import React from 'react';\nimport BrowserNotSupportedPng from '~/shared/assets/images/browser_not_supported.png';\nimport BrowserNotSupportedPng2x from '~/shared/assets/images/browser_not_supported@2x.png';\nimport DiscardChangesPng from '~/shared/assets/images/discard_changes.png';\nimport DiscardChangesPng2x from '~/shared/assets/images/discard_changes@2x.png';\nimport ImageUploadPng from '~/shared/assets/images/imgupload.png';\nimport ImageUploadPng2x from '~/shared/assets/images/imgupload@2x.png';\nimport MetamaskPng from '~/shared/assets/images/metamask.png';\nimport MetamaskPng2x from '~/shared/assets/images/metamask@2x.png';\nimport PublishFailedPng from '~/shared/assets/images/publish_failed.png';\nimport PublishFailedPng2x from '~/shared/assets/images/publish_failed@2x.png';\nimport WalletPng from '~/shared/assets/images/wallet.png';\nimport WalletPng2x from '~/shared/assets/images/wallet@2x.png';\nimport WalletErrorPng from '~/shared/assets/images/wallet_error.png';\nimport WalletErrorPng2x from '~/shared/assets/images/wallet_error@2x.png';\nimport WalletNoDataPng from '~/shared/assets/images/wallet_no_data.png';\nimport WalletNoDataPng2x from '~/shared/assets/images/wallet_no_data@2x.png';\nimport WalletNoEthPng from '~/shared/assets/images/wallet_no_eth.png';\nimport WalletNoEthPng2x from '~/shared/assets/images/wallet_no_eth@2x.png';\nconst sources = {\n    browserNotSupported: (React.createElement(\"img\", { src: BrowserNotSupportedPng, srcSet: `${BrowserNotSupportedPng2x} 2x`, alt: \"\" })),\n    discardChanges: (React.createElement(\"img\", { src: DiscardChangesPng, srcSet: `${DiscardChangesPng2x} 2x`, alt: \"\" })),\n    imageUpload: React.createElement(\"img\", { src: ImageUploadPng, srcSet: `${ImageUploadPng2x} 2x`, alt: \"\" }),\n    metamask: React.createElement(\"img\", { src: MetamaskPng, srcSet: `${MetamaskPng2x} 2x`, alt: \"\" }),\n    publishFailed: (React.createElement(\"img\", { src: PublishFailedPng, srcSet: `${PublishFailedPng2x} 2x`, alt: \"\" })),\n    wallet: React.createElement(\"img\", { src: WalletPng, srcSet: `${WalletPng2x} 2x`, alt: \"\" }),\n    walletNoData: React.createElement(\"img\", { src: WalletNoDataPng, srcSet: `${WalletNoDataPng2x} 2x`, alt: \"\" }),\n    walletNoEth: React.createElement(\"img\", { src: WalletNoEthPng, srcSet: `${WalletNoEthPng2x} 2x`, alt: \"\" }),\n    walletError: React.createElement(\"img\", { src: WalletErrorPng, srcSet: `${WalletErrorPng2x} 2x`, alt: \"\" }),\n    txFailed: React.createElement(\"img\", { src: WalletErrorPng, srcSet: `${WalletErrorPng2x} 2x`, alt: \"\" }),\n};\nconst PngIcon = ({ name, ...props }) => React.cloneElement(sources[name], { ...props });\nPngIcon.names = Object.keys(sources).sort();\nexport default PngIcon;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { SANS } from '~/shared/utils/styled';\nimport BaseModal from './BaseModal';\n/**\n * `BaseModal` with centered title bar with a subtle bottom border.\n */\nexport default function Modal({ children, title = 'Untitled modal', ...props }) {\n    return (React.createElement(BaseModal, { ...props },\n        React.createElement(Root, null,\n            React.createElement(Head, null,\n                React.createElement(Title, null, title)),\n            children)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-sw6bqy\" }) `\n    max-width: 560px;\n    width: 90vw;\n`;\nconst Head = styled.div.withConfig({ displayName: \"Head\", componentId: \"sc-qntoge\" }) `\n    align-items: center;\n    border-bottom: 1px solid #f3f3f3;\n    display: flex;\n    font-family: ${SANS};\n    font-size: 20px;\n    font-weight: normal;\n    height: 80px;\n    line-height: 32px;\n    margin: 0;\n    position: relative;\n    text-align: center;\n    width: 100%;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-116fqdy\" }) `\n    flex-grow: 1;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { getChainDisplayName, getChainKey, isKnownChainId } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport { Footer } from './BaseModal';\nimport Modal from './Modal';\nfunction getChainName(chainId) {\n    return isKnownChainId(chainId)\n        ? getChainDisplayName(getChainKey(chainId))\n        : `#${chainId}`;\n}\nexport default function SwitchNetworkModal({ expectedChainId, actualChainId, onReject, onResolve, ...props }) {\n    return (React.createElement(Modal, { ...props, onReject: onReject, title: \"Switch network\", onBeforeAbort: (reason) => {\n            /**\n             * Clicking on the backdrop should not accidentally discard the modal\n             * in this case. Enforce intentional cancellation via the Cancel button\n             * or the Escape key.\n             */\n            return reason !== RejectionReason.Backdrop;\n        } },\n        React.createElement(Content, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"wallet\", alt: \"Switch network\" })),\n            React.createElement(P, null,\n                \"Please switch to the \",\n                React.createElement(\"em\", null, getChainName(expectedChainId)),\n                \" network in your Ethereum wallet. It's currently in\",\n                ' ',\n                React.createElement(\"em\", null, getChainName(actualChainId)),\n                \"\\u00A0network.\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Cancel',\n                        onClick: () => void onReject?.(RejectionReason.CancelButton),\n                        kind: 'link',\n                    },\n                    add: {\n                        title: 'Switch',\n                        kind: 'primary',\n                        onClick: () => void onResolve?.(),\n                    },\n                } }))));\n}\nconst P = styled.p.withConfig({ displayName: \"P\", componentId: \"sc-ia41bk\" }) `\n    margin: 0;\n    text-align: center;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1e6y1p4\" }) `\n    width: 98px;\n    height: 67px;\n    position: relative;\n    margin: 0 auto 24px;\n\n    img {\n        display: block;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%) translateY(-6%);\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1otejem\" }) `\n    padding: 64px 48px 40px;\n\n    em {\n        font-style: normal;\n        font-weight: 500;\n    }\n`;\n","import { getWalletWeb3Provider } from '~/shared/stores/wallet';\n/**\n * @returns the chainId of whatever network is selected in the user wallet\n */\nexport default async function getChainId() {\n    const chainId = (await (await getWalletWeb3Provider()).getNetwork()).chainId;\n    if (chainId < Number.MIN_SAFE_INTEGER || chainId > Number.MAX_SAFE_INTEGER) {\n        throw new Error('BigInt chainIds are not supported');\n    }\n    return Number(chainId);\n}\n","import { toaster } from 'toasterhea';\nimport SwitchNetworkModal from '~/modals/SwitchNetworkModal';\nimport { getWalletProvider } from '~/shared/stores/wallet';\nimport { Layer } from '~/utils/Layer';\nimport { getChainConfig, getChainDisplayName } from '~/utils/chains';\nimport getChainId from '~/utils/web3/getChainId';\n/**\n *\n * @param expectedChainId Expected network/chain ID, e.g. 137 for Polygon.\n * @returns `true` if the utility changed the network, and `false` if it did nothing (we're already on the correct network).\n */\nexport default async function networkPreflight(expectedChainId) {\n    const provider = await getWalletProvider();\n    try {\n        const actualChainId = await getChainId();\n        if (actualChainId === expectedChainId) {\n            return false;\n        }\n        await toaster(SwitchNetworkModal, Layer.Modal).pop({\n            expectedChainId,\n            actualChainId,\n        });\n        await provider.request({\n            method: 'wallet_switchEthereumChain',\n            params: [\n                {\n                    chainId: `0x${expectedChainId.toString(16)}`,\n                },\n            ],\n        });\n    }\n    catch (e) {\n        if (e?.code !== 4902) {\n            throw e;\n        }\n        const chainConfig = getChainConfig(expectedChainId);\n        await provider.request({\n            method: 'wallet_addEthereumChain',\n            params: [\n                {\n                    chainId: `0x${chainConfig.id.toString(16)}`,\n                    chainName: getChainDisplayName(chainConfig.id),\n                    rpcUrls: chainConfig.rpcEndpoints.map(({ url }) => url),\n                    nativeCurrency: chainConfig.nativeCurrency,\n                    blockExplorerUrls: [chainConfig.blockExplorerUrl].filter(Boolean),\n                },\n            ],\n        });\n    }\n    return true;\n}\n","import getClientConfig from '~/getters/getClientConfig';\nimport { getWalletProvider } from '~/shared/stores/wallet';\nimport networkPreflight from '~/utils/networkPreflight';\nexport async function getStreamrClientInstance(chainId, options = {}) {\n    const StreamrClient = await getStreamrClient();\n    const { transactional = false } = options;\n    if (!transactional) {\n        return new StreamrClient(getClientConfig(chainId));\n    }\n    const ethereum = (await getWalletProvider());\n    await networkPreflight(chainId);\n    return new StreamrClient(getClientConfig(chainId, {\n        auth: {\n            ethereum,\n        },\n    }));\n}\n/**\n * Returns StreamrClient class.\n */\nasync function getStreamrClient() {\n    const { StreamrClient } = await import('@streamr/sdk');\n    return StreamrClient;\n}\n// Load the client library proactively so that we don't have to wait later.\nvoid (async () => {\n    try {\n        await getStreamrClient();\n    }\n    catch (_) {\n        // Do nothing.\n    }\n});\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Link as RouterLink } from 'react-router-dom';\nconst UnstyledRaw = (props) => {\n    const Tag = props.href || !props.to ? 'a' : RouterLink;\n    return React.createElement(Tag, { ...props });\n};\nconst Raw = styled(UnstyledRaw).withConfig({ displayName: \"Raw\", componentId: \"sc-1vq24h0\" }) ``;\nconst Link = styled(Raw).withConfig({ displayName: \"Link\", componentId: \"sc-1obgf1j\" }) `\n    &,\n    :link,\n    :active,\n    :focus,\n    :hover,\n    :visited {\n        outline: 0;\n        text-decoration: ${({ decorated }) => (decorated ? 'underline' : 'none')};\n    }\n`;\nObject.assign(Link, {\n    Raw,\n});\nexport default Link;\n","import React from 'react';\nimport styled from 'styled-components';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { Button } from '~/components/Button';\nimport Link from '~/shared/components/Link';\nimport { Buttons } from '~/components/Buttons';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nexport default function GetCryptoModal({ tokenName, onReject }) {\n    return (React.createElement(Modal, { onReject: onReject, title: `No ${tokenName} balance` },\n        React.createElement(Copy, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"walletError\", alt: `No ${tokenName} balance` })),\n            React.createElement(\"p\", null,\n                tokenName,\n                \" is needed for gas, but you don't have any.\"),\n            React.createElement(\"p\", null, \"Please get some and try again\")),\n        React.createElement(Exchanges, null,\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://ramp.network/\", target: \"_blank\" }, \"Ramp\"),\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://coinbase.com\", target: \"_blank\" }, \"Coinbase\"),\n            React.createElement(Button, { kind: \"secondary\", as: Link, href: \"https://binance.com\", target: \"_blank\" }, \"Binance\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Dismiss',\n                        onClick: () => void onReject?.(),\n                        kind: 'primary',\n                    },\n                } }))));\n}\nconst Copy = styled.div.withConfig({ displayName: \"Copy\", componentId: \"sc-e2gzij\" }) `\n    padding: 48px 40px 40px;\n\n    p {\n        margin: 0;\n        text-align: center;\n    }\n\n    p + p {\n        margin-top: 0.5em;\n    }\n`;\nconst Exchanges = styled.div.withConfig({ displayName: \"Exchanges\", componentId: \"sc-v1kjgs\" }) `\n    align-items: center;\n    border-top: 1px solid #f2f1f1;\n    display: grid;\n    grid-column-gap: 1rem;\n    grid-row-gap: 1rem;\n    grid-template-columns: 1fr 1fr 1fr;\n    justify-content: center;\n    padding: 1.5rem 40px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-p7jsss\" }) `\n    width: 98px;\n    height: 67px;\n    position: relative;\n    margin: 0 auto 24px;\n    background: red;\n\n    img {\n        display: block;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%) translateY(-5%) translateX(-4%);\n    }\n`;\n","export const truncate = (input, truncateLongerThan = 40, pickFirst = 5, pickLast = 5) => {\n    const regex = new RegExp(`0x[a-f\\\\d]{${truncateLongerThan},}`, 'gi');\n    const shortenedInput = typeof input !== 'string'\n        ? input\n        : input.replace(regex, (match) => `${match.substr(0, pickFirst)}...${match.substring(match.length - pickLast)}`);\n    return shortenedInput;\n};\nexport function truncateNodeId(nodeId) {\n    const hit = nodeId.match(/^([a-f\\d]{5})[a-f\\d]{22}([a-f\\d]{5})$/i);\n    return hit ? `${hit[1]}…${hit[2]}` : nodeId;\n}\nconst MAX_STREAM_NAME_LENGTH = 26;\nexport function parseStreamId(streamId) {\n    try {\n        const [, owner, pathname] = streamId.match(/^([^/]+)(\\/[^\\s]+)$/);\n        return {\n            owner,\n            pathname,\n        };\n    }\n    catch (e) {\n        console.warn('Invalid stream id', e);\n    }\n    throw new Error('Invalid stream id');\n}\nexport const truncateStreamName = (streamName, limit = MAX_STREAM_NAME_LENGTH) => {\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (streamName.length <= limit + 4) {\n        return streamName;\n    }\n    const separatorIndex = streamName.indexOf('/');\n    const addressPart = streamName.substring(0, separatorIndex);\n    const namePart = streamName.substring(separatorIndex + 1);\n    return addressPart.length >= namePart.length\n        ? truncateStartingWithTheAddressPart(addressPart, namePart, limit)\n        : truncateStartingWithTheNamePart(addressPart, namePart, limit);\n};\nconst truncateStartingWithTheAddressPart = (addressPart, namePart, limit) => {\n    const shortenedAddressPart = truncateAddressPart(addressPart);\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (`${shortenedAddressPart}/${namePart}`.length <= limit + 4) {\n        return `${shortenedAddressPart}/${namePart}`;\n    }\n    return `${shortenedAddressPart}/${truncateNamePart(namePart)}`;\n};\nconst truncateStartingWithTheNamePart = (addressPart, namePart, limit) => {\n    const shortenedNamePart = truncateNamePart(namePart);\n    // adding 3 to the limit because we when truncating we're adding 3 characters of ellipsis when we truncate + 1 for the separator\n    if (`${addressPart}/${shortenedNamePart}`.length <= limit + 4) {\n        return `${addressPart}/${shortenedNamePart}`;\n    }\n    return `${truncateAddressPart(addressPart)}/${shortenedNamePart}`;\n};\nconst truncateAddressPart = (addressPart) => {\n    const isEnsName = addressPart.match(/0x[a-f\\d]{40,}/gi) === null;\n    return isEnsName\n        ? `${addressPart.substring(0, 5)}...${addressPart.substring(addressPart.length - 9)}`\n        : truncate(addressPart);\n};\nconst truncateNamePart = (namePart) => {\n    return `${namePart.substring(0, 5)}...${namePart.substring(namePart.length - 5)}`;\n};\n","import { StreamPermission } from '@streamr/sdk';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { parseStreamId } from '~/shared/utils/text';\nconst StreamParser = z.object({\n    id: z.string().or(z.undefined()),\n});\nexport function parseStream(value, options) {\n    return StreamParser.transform(({ id }) => {\n        const { owner = '', pathname = '' } = id ? parseStreamId(id) : {};\n        const { storageNodes = [], permissionAssignments = [], metadata, ...rest } = options;\n        const storage = {};\n        storageNodes.forEach((address) => {\n            storage[address.toLowerCase()] = true;\n        });\n        const permissions = {};\n        permissionAssignments.forEach((assignment) => {\n            const user = 'userId' in assignment ? assignment.userId.toLowerCase() : address0;\n            permissions[user] = assignment.permissions.reduce((memo, permission) => memo | Bits[permission], permissions[user] || 0);\n        });\n        return {\n            ...rest,\n            domain: owner,\n            id,\n            metadata: parseStreamMetadata(metadata || { partitions: 1 }),\n            pathname: pathname.replace(/^\\//, ''),\n            permissions,\n            storage,\n        };\n    }).parse(value);\n}\nexport const Bits = {\n    [StreamPermission.DELETE]: /*    */ 1 << 0,\n    [StreamPermission.EDIT]: /*      */ 1 << 1,\n    [StreamPermission.GRANT]: /*     */ 1 << 2,\n    [StreamPermission.PUBLISH]: /*   */ 1 << 3,\n    [StreamPermission.SUBSCRIBE]: /* */ 1 << 4,\n};\nexport function setBits(bitsA, bitsB) {\n    return (bitsA |= bitsB);\n}\nexport function unsetBits(bitsA, bitsB) {\n    return (bitsA &= ~bitsB);\n}\nexport function matchBits(bitsA, bitsB) {\n    return (bitsA & bitsB) === bitsA;\n}\nfunction parseStreamMetadata(metadata) {\n    return {\n        /**\n         * Apart from parsing the predefined fields we also rewrite\n         * any custom fields that the metadata can carry (it's arbitrary).\n         */\n        ...metadata,\n        ...z\n            .object({\n            partitions: z.coerce.string().optional().default('1'),\n            description: z.string().optional().default(''),\n            storageDays: z.coerce.string().optional().default(''),\n            inactivityThresholdHours: z.coerce.string().optional().default(''),\n        })\n            .parse(metadata),\n    };\n}\nexport const PathnameSchema = z.string().superRefine((value, ctx) => {\n    if (!value) {\n        return;\n    }\n    if (/^\\//.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname cannot start with a slash',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/\\/{2,}/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname cannot contain consecutive \"/\" characters',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/[^\\w]$/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname must end with an alpha-numeric character',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n    if (/[^\\w.\\-/_]/.test(value)) {\n        ctx.addIssue({\n            message: 'Pathname may only contain alpha-numeric characters, underscores, and dashes',\n            fatal: true,\n            code: z.ZodIssueCode.custom,\n        });\n        return z.NEVER;\n    }\n});\n","export default class InsufficientFundsError extends Error {\n    constructor(address) {\n        super(`\"${address}\" does not have enough funds to cover the cost of gas`);\n        this.name = 'InsufficientFundsError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, InsufficientFundsError);\n        }\n        Object.setPrototypeOf(this, InsufficientFundsError.prototype);\n    }\n}\n","export default class StreamNotFoundError extends Error {\n    constructor(streamId) {\n        super('Stream not found');\n        this.streamId = streamId;\n        this.name = 'StreamNotFoundError';\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, StreamNotFoundError);\n        }\n        Object.setPrototypeOf(this, StreamNotFoundError.prototype);\n    }\n}\n","const mapping = {\n    137: 'POL',\n    100: 'xDai',\n    8995: 'DEV',\n    8997: 'DEV',\n    31337: 'DEV',\n    80002: 'POL',\n};\nconst getNativeTokenName = (chainId) => {\n    return mapping[chainId] || 'Ether';\n};\nexport default getNativeTokenName;\n","import { getERC20TokenContract } from '~/getters';\nimport { getPublicProvider } from '~/utils/providers';\nexport async function getBalance({ chainId, tokenAddress, walletAddress, }) {\n    const provider = await getPublicProvider(chainId);\n    if (tokenAddress === 'native') {\n        return provider.getBalance(walletAddress);\n    }\n    const contract = getERC20TokenContract({\n        tokenAddress,\n        provider,\n    });\n    return contract.balanceOf(walletAddress);\n}\n","import InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport { getBalance } from '~/utils/balance';\nexport async function requirePositiveBalance(chainId, walletAddress) {\n    const balance = await getBalance({\n        chainId,\n        tokenAddress: 'native',\n        walletAddress,\n    });\n    if (balance <= 0n) {\n        throw new InsufficientFundsError(walletAddress);\n    }\n}\n","import { produce } from 'immer';\nimport isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport { createContext, useCallback, useContext, useEffect, useMemo, useRef } from 'react';\nimport { z } from 'zod';\nimport { create } from 'zustand';\nimport { DraftValidationError, ValidationError } from '~/errors';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nexport function getEmptyDraft(entity) {\n    return {\n        abandoned: false,\n        dirty: false,\n        entity: entity && {\n            cold: entity,\n            hot: entity,\n        },\n        errors: {},\n        fetching: false,\n        initialized: false,\n        persisting: false,\n    };\n}\nexport function createDraftStore(options) {\n    const useDraftStore = create((set, get) => {\n        function isPersisting(draftId) {\n            return get().drafts[draftId]?.persisting === true;\n        }\n        function setDraft(draftId, update, { force = false } = {}) {\n            set((store) => {\n                if (!store.drafts[draftId] && !force) {\n                    return store;\n                }\n                return produce(store, ({ drafts }) => {\n                    Object.assign(drafts, {\n                        [draftId]: produce(store.drafts[draftId] || options.getEmptyDraft(), update),\n                    });\n                });\n            });\n        }\n        const update = (draftId, updater) => {\n            setDraft(draftId, (draft) => {\n                if (!draft.entity) {\n                    return;\n                }\n                updater(draft.entity.hot, draft.entity.cold);\n                draft.dirty = !(options.isEqual || isEqual)(draft.entity.hot, draft.entity.cold);\n            });\n        };\n        return {\n            idMap: {},\n            drafts: {},\n            init(draftId) {\n                /**\n                 * Retrieve or create a draft associated with the given draft id.\n                 */\n                setDraft(draftId, (draft) => {\n                    draft.abandoned = false;\n                    draft.initialized = true;\n                    draft.fetching = true;\n                }, {\n                    force: true,\n                });\n            },\n            assign(draftId, entity) {\n                setDraft(draftId, (draft) => {\n                    if (draft.entity) {\n                        /**\n                         * The rule is: 1 draft = 1 entity, thus the logic does not\n                         * support overwriting existing hot/cold entities by assign.\n                         */\n                        return;\n                    }\n                    draft.entity = entity ? { cold: entity, hot: entity } : undefined;\n                    draft.fetching = typeof entity === 'undefined';\n                });\n            },\n            setErrors(draftId, update) {\n                setDraft(draftId, (draft) => {\n                    update(draft.errors);\n                });\n            },\n            update,\n            teardown(draftId, { onlyAbandoned = false } = {}) {\n                set((store) => produce(store, ({ idMap, drafts }) => {\n                    const draft = drafts[draftId];\n                    if (!draft) {\n                        return;\n                    }\n                    const { id } = draft.entity?.cold || {};\n                    if (!onlyAbandoned || draft.abandoned) {\n                        if (id) {\n                            delete idMap[id];\n                        }\n                        delete drafts[draftId];\n                    }\n                }));\n            },\n            abandon(draftId) {\n                setDraft(draftId, (draft) => {\n                    draft.abandoned = true;\n                });\n                if (!isPersisting(draftId)) {\n                    get().teardown(draftId);\n                }\n            },\n            async persist(draftId, fn, abortSignal) {\n                if (isPersisting(draftId)) {\n                    return;\n                }\n                try {\n                    setDraft(draftId, (draft) => {\n                        draft.persisting = true;\n                    });\n                    set((store) => produce(store, ({ drafts, idMap }) => {\n                        const { id } = drafts[draftId]?.entity?.cold || {};\n                        if (id) {\n                            idMap[id] = draftId;\n                        }\n                    }));\n                    try {\n                        const draft = get().drafts[draftId];\n                        if (!draft) {\n                            throw new Error(`Draft ${draftId} does not exist`);\n                        }\n                        await fn?.(draft, {\n                            abortSignal,\n                            bind: (id) => {\n                                set((store) => produce(store, (d) => {\n                                    d.idMap[id] = draftId;\n                                }));\n                            },\n                            update: (updater) => {\n                                update(draftId, updater);\n                            },\n                        });\n                        await options.persist?.(draft);\n                    }\n                    catch (e) {\n                        if (e instanceof z.ZodError) {\n                            const errors = {};\n                            e.issues.forEach(({ path, message }) => {\n                                errors[path.join('.')] = message;\n                            });\n                            setDraft(draftId, (copy) => {\n                                copy.errors = errors;\n                            });\n                            throw new ValidationError(e.issues.map(({ message }) => message));\n                        }\n                        if (e instanceof DraftValidationError) {\n                            throw new ValidationError([e.message]);\n                        }\n                        throw e;\n                    }\n                }\n                finally {\n                    setDraft(draftId, (draft) => {\n                        draft.persisting = false;\n                    });\n                    get().teardown(draftId, { onlyAbandoned: true });\n                }\n            },\n            validate(draftId, validator) {\n                const entity = get().drafts[draftId]?.entity?.hot;\n                const errors = {};\n                try {\n                    if (entity) {\n                        validator(entity);\n                    }\n                }\n                catch (e) {\n                    if (e instanceof z.ZodError) {\n                        e.issues.forEach(({ path, message }) => {\n                            errors[path.join('.')] = message;\n                        });\n                    }\n                    else {\n                        console.warn('Failed to validate draft', e);\n                    }\n                }\n                return errors;\n            },\n        };\n    });\n    function useBoundDraft(entityId) {\n        const { idMap, drafts } = useDraftStore();\n        const draftId = entityId ? idMap[entityId] : undefined;\n        const draft = draftId ? drafts[draftId] : undefined;\n        return !draft || draft.abandoned ? null : draft;\n    }\n    function useInitDraft(entityId) {\n        const { idMap, init, abandon } = useDraftStore();\n        const recycledDraftId = entityId ? idMap[entityId] : undefined;\n        const draftId = useId(() => recycledDraftId || DefaultIdGenerator(options.prefix), [entityId, recycledDraftId]);\n        useEffect(function initDraft() {\n            init(draftId);\n        }, [init, draftId]);\n        useEffect(function abandonDraftOnUnmount() {\n            return () => {\n                abandon(draftId);\n            };\n        }, [abandon, draftId]);\n        return draftId;\n    }\n    const useStore = useDraftStore;\n    const DraftContext = createContext(undefined);\n    function useDraftId() {\n        const draftId = useContext(DraftContext);\n        if (!draftId) {\n            throw new Error('`useDraftId` used outside of the `DraftContext`');\n        }\n        return draftId;\n    }\n    function useDraft() {\n        return useDraftStore().drafts[useDraftId()];\n    }\n    function useEntity({ hot = false } = {}) {\n        return useDraft()?.entity?.[hot ? 'hot' : 'cold'];\n    }\n    function useIsDraftClean() {\n        return !useDraft()?.dirty;\n    }\n    function useUpdateEntity() {\n        const draftId = useDraftId();\n        const { update } = useDraftStore();\n        return useCallback((updater) => {\n            return update(draftId, updater);\n        }, [draftId, update]);\n    }\n    function useValidateEntity(validator) {\n        const draftId = useDraftId();\n        const { validate } = useDraftStore();\n        const validatorRef = useRef(validator);\n        if (validatorRef.current !== validator) {\n            validatorRef.current = validator;\n        }\n        return useCallback(() => {\n            return validate(draftId, validatorRef.current);\n        }, [draftId, validate]);\n    }\n    function useIsFetchingEntity() {\n        return !!useDraft()?.fetching;\n    }\n    function useIsDraftBusy() {\n        const { fetching = false, persisting = false } = useDraft() || {};\n        return fetching || persisting;\n    }\n    function usePersist(fn) {\n        const { persist } = useDraftStore();\n        const draftId = useDraftId();\n        const abortControllerRef = useRef();\n        useEffect(() => {\n            const abortController = new AbortController();\n            abortControllerRef.current = abortController;\n            return () => {\n                abortController.abort();\n            };\n        }, []);\n        const fnRef = useRef(fn);\n        if (fnRef.current !== fn) {\n            fnRef.current = fn;\n        }\n        return useCallback(async () => {\n            if (!draftId) {\n                return;\n            }\n            return persist(draftId, fnRef.current, abortControllerRef.current?.signal);\n        }, [persist, draftId]);\n    }\n    function usePersistCallback() {\n        const { persist } = useDraftStore();\n        const draftId = useDraftId();\n        const busy = useIsDraftBusy();\n        const clean = useIsDraftClean();\n        const abortControllerRef = useRef();\n        useEffect(() => {\n            const abortController = new AbortController();\n            abortControllerRef.current = abortController;\n            return () => {\n                abortController.abort();\n            };\n        }, []);\n        return useCallback((params = {}) => {\n            if (!draftId || busy || clean) {\n                return;\n            }\n            void (async () => {\n                try {\n                    await persist(draftId);\n                    const { aborted = false } = abortControllerRef.current?.signal || {};\n                    params.onDone?.(!aborted);\n                }\n                catch (e) {\n                    if (isTransactionRejection(e)) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    params.onError?.(e);\n                }\n            })();\n        }, [persist, draftId, busy, clean]);\n    }\n    function useIsAnyDraftBeingPersisted() {\n        return Object.values(useDraftStore().drafts).some((d) => d?.persisting);\n    }\n    function useSetDraftErrors() {\n        const draftId = useDraftId();\n        const { setErrors } = useDraftStore();\n        return useCallback((update) => {\n            if (!draftId) {\n                return;\n            }\n            return setErrors(draftId, update);\n        }, [draftId, setErrors]);\n    }\n    return {\n        DraftContext,\n        useBoundDraft,\n        useDraft,\n        useDraftId,\n        useDraftStore,\n        useEntity,\n        useIsAnyDraftBeingPersisted,\n        useIsDraftBusy,\n        useIsDraftClean,\n        useIsFetchingEntity,\n        usePersist,\n        usePersistCallback,\n        useSetDraftErrors,\n        useStore,\n        useUpdateEntity,\n        useValidateEntity,\n        useInitDraft,\n    };\n}\nfunction DefaultIdGenerator(prefix = 'EntityDraft-') {\n    return uniqueId(prefix);\n}\nfunction useId(generator, deps) {\n    const generatorRef = useRef(generator);\n    if (generatorRef.current !== generator) {\n        generatorRef.current = generator;\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n    return useMemo(() => generatorRef.current(), deps);\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Spinner from '~/components/Spinner';\nimport AbstractToast from '~/shared/toasts/AbstractToast';\nexport default function TransactionListToast({ operations = [] }) {\n    return (React.createElement(AbstractToast, null,\n        React.createElement(Container, null,\n            React.createElement(Title, null, \"These transactions are needed to save your changes:\"),\n            React.createElement(\"ul\", null, operations.map(({ id, state, label, action: Action }, index) => (React.createElement(Item, { key: id, \"$complete\": state === 'complete' || state === 'error', \"$ongoing\": state === 'ongoing' },\n                React.createElement(Number, null, index + 1),\n                React.createElement(Name, null, label),\n                Action && (React.createElement(ActionWrap, null,\n                    React.createElement(Action, { state: state }))),\n                React.createElement(IconContainer, null,\n                    state === 'ongoing' && React.createElement(Spinner, { color: \"blue\" }),\n                    state === 'complete' && React.createElement(Icon, { name: \"checkmark\" }),\n                    state === 'error' && React.createElement(Icon, { name: \"errorBadge\" })))))))));\n}\nexport function notify(toast, operations) {\n    setTimeout(async () => {\n        try {\n            if (!toast) {\n                return;\n            }\n            await toast.pop({ operations: [...operations] });\n        }\n        catch (_) {\n            // Do nothing\n        }\n    });\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-qltuev\" }) `\n    width: 464px;\n    padding: 32px 24px;\n\n    ul {\n        list-style: none;\n        margin: 24px 0 0;\n        padding: 0;\n    }\n\n    li + li {\n        margin-top: 8px;\n    }\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-wh87ze\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 16px;\n    line-height: 20px;\n    width: 240px;\n`;\nconst Item = styled.li.withConfig({ displayName: \"Item\", componentId: \"sc-110z2sc\" }) `\n    padding: 20px 16px;\n    border: 1px solid ${COLORS.inputBackground};\n    border-radius: 4px;\n    align-items: center;\n    font-size: 16px;\n    line-height: 20px;\n    display: flex;\n\n    > * + * {\n        margin-left: 16px;\n    }\n\n    ${({ $complete = false }) => $complete &&\n    css `\n            background-color: ${COLORS.secondary};\n        `}\n\n    ${({ $ongoing = false }) => $ongoing &&\n    css `\n            border-color: #b3d4ff;\n        `}\n`;\nconst Number = styled.div.withConfig({ displayName: \"Number\", componentId: \"sc-3lajjx\" }) `\n    font-size: 12px;\n    line-height: normal;\n    border-radius: 50%;\n    background-color: #000000;\n    color: #ffffff;\n    width: 16px;\n    height: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex-shrink: 0;\n`;\nconst Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1mk5loi\" }) `\n    font-size: 16px;\n    line-height: 20px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    flex-grow: 1;\n`;\nconst IconContainer = styled.div.withConfig({ displayName: \"IconContainer\", componentId: \"sc-dkxk9p\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n    height: 18px;\n    width: 18px;\n    flex-shrink: 0;\n`;\nconst Icon = styled(SvgIcon).withConfig({ displayName: \"Icon\", componentId: \"sc-1luxglz\" }) `\n    display: flex;\n    width: 100%;\n    height: 100%;\n`;\nconst ActionWrap = styled.div.withConfig({ displayName: \"ActionWrap\", componentId: \"sc-89zhjj\" }) ``;\n","import { toaster } from 'toasterhea';\nimport uniqueId from 'lodash/uniqueId';\nimport TransactionListToast, { notify, } from '~/shared/toasts/TransactionListToast';\nimport { Layer } from '~/utils/Layer';\nexport async function toastedOperation(label, fn) {\n    await toastedOperations([\n        {\n            id: uniqueId('operation-'),\n            label: label,\n        },\n    ], () => fn?.());\n}\nexport async function toastedOperations(operations, fn) {\n    let toast = toaster(TransactionListToast, Layer.Toast);\n    if (!operations.length) {\n        throw new Error('We toasting or hwhat?!');\n    }\n    operations.forEach((op) => {\n        delete op.state;\n    });\n    let pos = -1;\n    function refresh() {\n        notify(toast, operations);\n    }\n    function next() {\n        if (pos >= 0) {\n            operations[pos].state = 'complete';\n        }\n        if (pos < operations.length - 1) {\n            pos += 1;\n            operations[pos].state = 'ongoing';\n        }\n        refresh();\n    }\n    try {\n        next();\n        await fn?.(next, refresh);\n        next();\n    }\n    catch (e) {\n        operations.forEach((op) => {\n            if (op.state === 'ongoing') {\n                op.state = 'error';\n            }\n        });\n        refresh();\n        throw e;\n    }\n    finally {\n        setTimeout(() => {\n            toast?.discard();\n            toast = undefined;\n        }, 3000);\n    }\n}\n","import { useQuery } from '@tanstack/react-query';\nimport isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport React, { useCallback } from 'react';\nimport { Link, useMatch, useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { DraftValidationError, ValidationError } from '~/errors';\nimport { getStreamrClientInstance } from '~/getters/getStreamrClient';\nimport GetCryptoModal from '~/modals/GetCryptoModal';\nimport { Bits, matchBits, parseStream } from '~/parsers/StreamParser';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport getNativeTokenName from '~/shared/utils/nativeToken';\nimport { requirePositiveBalance } from '~/shared/utils/requirePositiveBalance';\nimport { Layer } from '~/utils/Layer';\nimport { getCurrentChainId, useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { createDraftStore, getEmptyDraft } from '~/utils/draft';\nimport { isMessagedObject, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { validationErrorToast } from '~/utils/toast';\nimport { toastedOperations } from '~/utils/toastedOperation';\nimport getChainId from '~/utils/web3/getChainId';\nexport const StreamDraft = createDraftStore({\n    getEmptyDraft: () => getEmptyDraft(undefined),\n    prefix: 'StreamDraft-',\n});\nexport function getEmptyStreamEntity(options = {}) {\n    const { chainId } = options;\n    return {\n        chainId: chainId ?? getCurrentChainId(),\n        domain: '',\n        id: undefined,\n        pathname: '',\n        permissions: {},\n        storage: {},\n        metadata: {\n            description: '',\n            inactivityThresholdHours: '',\n            partitions: '1',\n            storageDays: '',\n        },\n    };\n}\nexport function useStreamEntityQuery() {\n    const { id: streamId } = useParams();\n    const chainId = useCurrentChainId();\n    const draft = StreamDraft.useBoundDraft(streamId);\n    return useQuery({\n        queryKey: ['useStreamEntityQuery', chainId, streamId],\n        queryFn: async () => {\n            if (draft?.entity) {\n                return draft.entity.cold;\n            }\n            if (!streamId) {\n                return getEmptyStreamEntity();\n            }\n            try {\n                const client = await getStreamrClientInstance(chainId);\n                const stream = await client.getStream(streamId);\n                if (!stream) {\n                    throw new StreamNotFoundError(streamId);\n                }\n                const metadata = await stream.getMetadata();\n                let storageNodes;\n                try {\n                    storageNodes = await client.getStorageNodes(streamId);\n                }\n                catch (e) {\n                    console.warn(`Failed to load storage nodes for stream ${streamId}`, e);\n                }\n                let permissionAssignments;\n                try {\n                    permissionAssignments = await client.getPermissions(streamId);\n                }\n                catch (e) {\n                    console.warn(`Failed to load permissions for stream ${streamId}`, e);\n                }\n                return parseStream(stream, {\n                    chainId,\n                    metadata,\n                    permissionAssignments,\n                    storageNodes,\n                });\n            }\n            catch (e) {\n                if (isMessagedObject(e) && /not.found/i.test(e.message)) {\n                    throw new StreamNotFoundError(streamId);\n                }\n                throw e;\n            }\n        },\n        staleTime: Infinity,\n        gcTime: 0,\n    });\n}\nexport function usePersistStreamDraft(options = {}) {\n    const persist = StreamDraft.usePersist(async (draft, { abortSignal, bind, update }) => {\n        const { entity } = draft;\n        if (!entity) {\n            return;\n        }\n        const { hot, cold } = entity;\n        const { id: streamId, domain, pathname, chainId } = hot;\n        let client;\n        let stream;\n        const updateOperation = {\n            id: uniqueId('operation-'),\n            label: streamId ? 'Update stream' : 'Create stream',\n        };\n        const permissionsOperation = {\n            id: uniqueId('operation-'),\n            label: 'Update access settings',\n        };\n        const storageOperation = {\n            id: uniqueId('operation-'),\n            label: '',\n        };\n        const operations = [];\n        const metadataChanged = !isEqual(hot.metadata, cold.metadata);\n        const shouldUpdateMetadata = !streamId || metadataChanged;\n        if (shouldUpdateMetadata) {\n            operations.push(updateOperation);\n        }\n        const permissionAssignments = [];\n        for (const account in hot.permissions) {\n            const hotBits = hot.permissions[account] || 0;\n            const coldBits = cold.permissions[account] || 0;\n            if (hotBits === coldBits) {\n                continue;\n            }\n            const permissions = !hotBits\n                ? []\n                : Object.keys(Bits).filter((perm) => matchBits(Bits[perm], hotBits));\n            if (account === address0) {\n                permissionAssignments.push({\n                    public: true,\n                    permissions,\n                });\n                continue;\n            }\n            permissionAssignments.push({\n                userId: account,\n                permissions,\n            });\n        }\n        const shouldUpdatePermissions = permissionAssignments.length > 0;\n        if (shouldUpdatePermissions) {\n            operations.push(permissionsOperation);\n        }\n        const storageNodeChanges = [];\n        for (const address in hot.storage) {\n            const hotEnabled = hot.storage[address] || false;\n            const coldEnabled = cold.storage[address] || false;\n            if (hotEnabled !== coldEnabled) {\n                storageNodeChanges.push([address, hotEnabled]);\n            }\n        }\n        storageOperation.label = formatStorageOperationLabel(0, storageNodeChanges.length);\n        const shouldUpdateStorage = storageNodeChanges.length > 0;\n        if (shouldUpdateStorage) {\n            operations.push(storageOperation);\n        }\n        if (!operations.length) {\n            return;\n        }\n        async function checkBalance(c) {\n            await requirePositiveBalance(chainId, await c.getAddress());\n        }\n        await toastedOperations(operations, async (next, refresh) => {\n            let transientStreamId;\n            if (!streamId) {\n                if (!domain) {\n                    throw new DraftValidationError('domain', 'Domain is required');\n                }\n                if (!pathname) {\n                    throw new DraftValidationError('pathname', 'Pathname is required');\n                }\n                transientStreamId = `${domain}/${pathname}`;\n            }\n            if (streamId) {\n                /**\n                 * Assign a draft to a stream id for later re-use. Based\n                 * on this information we can recycle drafts that haven't\n                 * been abandoned.\n                 */\n                bind(streamId);\n            }\n            if (shouldUpdateMetadata && streamId) {\n                updateOperation.action = getOpenStreamLink(streamId);\n                refresh();\n            }\n            if (transientStreamId) {\n                client = await getStreamrClientInstance(chainId);\n                try {\n                    if (await client.getStream(transientStreamId)) {\n                        throw new DraftValidationError('id', 'Your stream id already exists. Please try a different one.');\n                    }\n                }\n                catch (e) {\n                    if (e instanceof DraftValidationError) {\n                        throw e;\n                    }\n                    if (!isMessagedObject(e) ||\n                        !/stream not found/i.test(e.message)) {\n                        throw new DraftValidationError('streamId', 'Failed to verify the uniqueness of your stream id.');\n                    }\n                    /**\n                     * At this point we know that the error thrown above tells us that\n                     * the stream with the given id hasn't been found. Good, onwards!\n                     */\n                }\n            }\n            stream = await (async () => {\n                /**\n                 * Whatever happens in here we end up fetching a stream instance. Conditions\n                 * dictate if it's a new stream or an existing stream (optionally updated).\n                 */\n                const { description, inactivityThresholdHours, partitions, storageDays, ...otherMetadata } = hot.metadata;\n                const metadata = z\n                    .object({\n                    description: z\n                        .string()\n                        .transform((value) => value.trim() || undefined),\n                    partitions: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .min(1)\n                            .max(99)\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                    storageDays: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                    inactivityThresholdHours: z.union([\n                        z.literal('').transform(() => undefined),\n                        z.coerce\n                            .number()\n                            .refine((value) => Number.isInteger(value), 'is not an integer value'),\n                    ]),\n                })\n                    .parse({\n                    description,\n                    inactivityThresholdHours,\n                    partitions,\n                    storageDays,\n                });\n                const finalMetadata = {\n                    ...JSON.parse(JSON.stringify(metadata)),\n                    ...otherMetadata,\n                };\n                if (transientStreamId) {\n                    client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await checkBalance(client);\n                    try {\n                        return await client.createStream({\n                            ...finalMetadata,\n                            id: transientStreamId,\n                        });\n                    }\n                    catch (e) {\n                        if (isMessagedObject(e) &&\n                            /not in namespace of authenticated user/.test(e.message)) {\n                            throw new DraftValidationError('domain', 'Domain belongs to someone else');\n                        }\n                        throw e;\n                    }\n                }\n                if (!streamId) {\n                    throw new DraftValidationError('streamId', 'Stream id is invalid');\n                }\n                if (metadataChanged) {\n                    client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await checkBalance(client);\n                    await client.setStreamMetadata(streamId, {\n                        ...finalMetadata,\n                    });\n                    return client.getStream(streamId);\n                }\n                client = await getStreamrClientInstance(chainId);\n                return client.getStream(streamId);\n            })();\n            const currentStreamId = stream.id;\n            const currentMetadata = await stream.getMetadata();\n            const newMetadata = parseStream(stream, {\n                chainId,\n                metadata: currentMetadata,\n            }).metadata;\n            update((hot, cold) => {\n                hot.metadata = newMetadata;\n                cold.metadata = newMetadata;\n            });\n            if (transientStreamId) {\n                /**\n                 * Again, associate the current draft with the (new) stream\n                 * id for later recycling purposes.\n                 */\n                bind(currentStreamId);\n                update((hot, cold) => {\n                    hot.id = currentStreamId;\n                    cold.id = hot.id;\n                    cold.domain = hot.domain;\n                    cold.pathname = hot.pathname;\n                });\n                options.onCreate?.(chainId, currentStreamId, { abortSignal });\n            }\n            if (shouldUpdateMetadata) {\n                updateOperation.action = getOpenStreamLink(currentStreamId);\n                /**\n                 * We've either created a stream or updated one that exists. Onwards!\n                 */\n                next();\n            }\n            if (shouldUpdatePermissions) {\n                client = await getStreamrClientInstance(chainId, {\n                    transactional: true,\n                });\n                await checkBalance(client);\n                await client.setPermissions({\n                    streamId: currentStreamId,\n                    assignments: permissionAssignments,\n                });\n                options.onPermissionsChange?.(currentStreamId, permissionAssignments, {\n                    abortSignal,\n                });\n                update((hot, cold) => {\n                    cold.permissions = hot.permissions;\n                });\n                next();\n            }\n            for (let i = 0; i < storageNodeChanges.length; i++) {\n                const [address, enabled] = storageNodeChanges[i];\n                storageOperation.label = formatStorageOperationLabel(i + 1, storageNodeChanges.length);\n                if (i !== 0) {\n                    // Already notifying above.\n                    refresh();\n                }\n                client = await getStreamrClientInstance(chainId, {\n                    transactional: true,\n                });\n                await checkBalance(client);\n                if (enabled) {\n                    await client.addStreamToStorageNode(stream.id, address);\n                }\n                else {\n                    await client.removeStreamFromStorageNode(stream.id, address);\n                }\n                update((hot, cold) => {\n                    cold.storage[address] = enabled;\n                    hot.storage[address] = enabled;\n                });\n            }\n        });\n    });\n    return useCallback(() => {\n        void (async () => {\n            try {\n                await persist();\n            }\n            catch (e) {\n                if (e instanceof InsufficientFundsError) {\n                    void (async () => {\n                        try {\n                            const chainId = await getChainId();\n                            await getCryptoModal.pop({\n                                tokenName: getNativeTokenName(chainId),\n                            });\n                        }\n                        catch (_) {\n                            // Do nothing.\n                        }\n                    })();\n                    return;\n                }\n                if (e instanceof ValidationError) {\n                    validationErrorToast({ title: 'Failed to save', error: e });\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                throw e;\n            }\n        })();\n    }, [persist]);\n}\nfunction formatStorageOperationLabel(current = 0, total = 0) {\n    if (total <= 1) {\n        return 'Update storage nodes';\n    }\n    return `Update storage nodes (${current} of ${total})`;\n}\nconst NewStreamLink = styled(Link).withConfig({ displayName: \"NewStreamLink\", componentId: \"sc-1tfrg8c\" }) `\n    display: block;\n    font-size: 14px;\n\n    :hover {\n        text-decoration: underline;\n    }\n`;\nfunction getOpenStreamLink(streamId) {\n    return function OpenStreamLink() {\n        const chainKey = useCurrentChainKey();\n        const id = decodeURIComponent(useMatch(R.streamOverview(':id'))?.params['id'] || '');\n        if (!streamId || id === streamId) {\n            return React.createElement(React.Fragment, null);\n        }\n        return (React.createElement(NewStreamLink, { to: R.streamOverview(streamId, routeOptions(chainKey)) }, \"Open\"));\n    };\n}\nconst getCryptoModal = toaster(GetCryptoModal, Layer.Modal);\n","import React from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport { defaultChainKey } from '~/consts';\nimport { getEnvironmentConfig } from '~/getters/getEnvironmentConfig';\nimport UnstyledNetworkIcon from '~/shared/components/NetworkIcon';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, LAPTOP } from '~/shared/utils/styled';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { getChainDisplayName, getChainSlug, useCurrentChain } from '~/utils/chains';\nconst MenuItem = ({ chainId, isSelected, onClick }) => (React.createElement(MenuItemContainer, { onClick: onClick },\n    React.createElement(NetworkIcon, { chainId: chainId }),\n    React.createElement(\"div\", null, getChainDisplayName(chainId)),\n    isSelected ? React.createElement(SvgIcon, { name: \"tick\" }) : React.createElement(\"div\", null)));\nconst Menu = ({ chains, selectedChain, toggle }) => {\n    const [, setSearchParams] = useSearchParams();\n    return (React.createElement(MenuContainer, null,\n        React.createElement(ChainGrid, null, chains.map((c) => (React.createElement(MenuItem, { key: c.id, chainId: c.id, isSelected: c.id === selectedChain.id, onClick: () => {\n                toggle(false);\n                const slug = getChainSlug(c.id);\n                setSearchParams((prev) => {\n                    const { chain: _, ...rest } = Object.fromEntries(prev);\n                    return slug === getChainSlug(defaultChainKey)\n                        ? rest\n                        : { ...rest, chain: slug };\n                });\n            } }))))));\n};\nexport const ChainSelector = ({ menuAlignment = 'left', ...props }) => {\n    const { availableChains } = getEnvironmentConfig();\n    const selectedChain = useCurrentChain();\n    const isAnyDraftBeingPersisted = StreamDraft.useIsAnyDraftBeingPersisted();\n    return (React.createElement(SimpleDropdown, { ...props, disabled: isAnyDraftBeingPersisted, menu: (toggle) => (React.createElement(Menu, { chains: availableChains, selectedChain: selectedChain, toggle: toggle })), align: menuAlignment }, (toggle, isOpen) => (React.createElement(Toggle, { \"$isOpen\": isOpen, onClick: () => toggle((v) => !v) },\n        React.createElement(NetworkIcon, { chainId: selectedChain.id }),\n        React.createElement(\"div\", null, getChainDisplayName(selectedChain.id)),\n        React.createElement(Caret, { name: \"caretUp\", \"$isOpen\": isOpen })))));\n};\nconst MenuContainer = styled(SimpleListDropdownMenu).withConfig({ displayName: \"MenuContainer\", componentId: \"sc-uchumb\" }) `\n    color: ${COLORS.primaryLight};\n    max-width: 100%;\n`;\nconst ChainGrid = styled.div.withConfig({ displayName: \"ChainGrid\", componentId: \"sc-ampuev\" }) `\n    display: grid;\n    grid-template-columns: auto auto auto;\n    grid-auto-rows: 52px;\n    gap: 0px 8px;\n`;\nconst MenuItemContainer = styled.div.withConfig({ displayName: \"MenuItemContainer\", componentId: \"sc-1u65gxv\" }) `\n    display: grid;\n    grid-template-columns: subgrid;\n    grid-column: span 3;\n    appearance: none;\n    background: none;\n    border: 0;\n    border-bottom: 1px solid ${COLORS.secondary};\n\n    :last-child {\n        border-bottom: none;\n    }\n\n    transition: 250ms background-color;\n    align-items: center;\n    padding: 8px 24px;\n    cursor: pointer;\n\n    font-size: 16px;\n    line-height: 26px;\n    font-weight: 500;\n    text-align: left;\n    white-space: nowrap;\n    color: ${COLORS.primaryLight};\n\n    :focus,\n    :hover {\n        background: ${COLORS.secondary};\n        transition-duration: 50ms;\n    }\n\n    &[disabled] {\n        background: none;\n    }\n\n    svg {\n        color: ${COLORS.primaryLight};\n        height: 13px;\n        width: 13px;\n    }\n`;\nconst NetworkIcon = styled(UnstyledNetworkIcon).withConfig({ displayName: \"NetworkIcon\", componentId: \"sc-1djytsj\" }) `\n    display: flex;\n    width: 24px;\n    height: 24px;\n`;\nconst Toggle = styled.div.withConfig({ displayName: \"Toggle\", componentId: \"sc-op8rsk\" }) `\n    display: grid;\n    grid-template-columns: 24px auto auto;\n    line-height: 24px;\n    align-items: center;\n    border: 1px solid #f3f3f3;\n    border-radius: 8px;\n    background: ${({ $isOpen }) => ($isOpen ? COLORS.dialogBorder : '#fff')};\n    cursor: pointer;\n    gap: 0px;\n    height: 32px;\n    padding: 4px 8px;\n    align-items: center;\n    width: fit-content;\n    color: ${COLORS.primary};\n    font-size: 14px;\n    font-weight: 500;\n\n    img {\n        width: 20px;\n        height: 20px;\n    }\n\n    div:nth-child(2) {\n        display: none;\n    }\n\n    :focus,\n    :hover {\n        background: ${COLORS.dialogBorder};\n        transition-duration: 50ms;\n    }\n\n    @media ${LAPTOP} {\n        height: 40px;\n        padding: 8px 12px;\n        gap: 8px;\n\n        img {\n            width: 24px;\n            height: 24px;\n        }\n\n        div:nth-child(2) {\n            display: initial;\n        }\n    }\n`;\nconst Caret = styled(SvgIcon).withConfig({ displayName: \"Caret\", componentId: \"sc-sguc5a\" }) `\n    width: 10px !important;\n    transition: transform 200ms ease-in-out;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(0deg)' : 'rotate(180deg)')};\n`;\n","import { Contract } from 'ethers';\nimport { Minute } from '~/consts';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport { getPublicProvider } from '~/utils/providers';\nconst cache = {};\nconst TTL = 60 * Minute;\n/**\n * @todo Refactor to use `fetchQuery` for cache.\n */\nexport async function getConfigValueFromChain(chainId, key) {\n    const { updatedAt = 0, value } = cache[chainId]?.[key] || {};\n    if (value && updatedAt + TTL > Date.now()) {\n        return value;\n    }\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(getContractAddress('config', chainId), getContractAbi('config'), provider);\n    const result = (await contract[key]());\n    const obj = cache[chainId] || {};\n    obj[key] = {\n        updatedAt: Date.now(),\n        value: result,\n    };\n    cache[chainId] = obj;\n    return result;\n}\n","import React, { useCallback, useEffect, useRef, useState, useSyncExternalStore, } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { BehindIndexError } from '~/errors/BehindIndexError';\nimport { getConfigValueFromChain } from '~/getters/getConfigValueFromChain';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { Layer } from '~/utils/Layer';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst infoToast = toaster(Toast, Layer.Toast);\nexport function useInfoToastEffect() {\n    useEffect(() => {\n        let timeoutId;\n        let recentKey;\n        function onKeyUp() {\n            recentKey = undefined;\n            if (timeoutId) {\n                clearTimeout(timeoutId);\n                timeoutId = undefined;\n            }\n        }\n        function onKeyDown(e) {\n            if (e.key === recentKey) {\n                return;\n            }\n            onKeyUp();\n            recentKey = e.key;\n            if (e.key !== 'i') {\n                return;\n            }\n            timeoutId = window.setTimeout(async () => {\n                try {\n                    await infoToast.pop({\n                        type: ToastType.Info,\n                        title: 'Version info',\n                        desc: (React.createElement(\"ul\", null,\n                            React.createElement(\"li\", null,\n                                \"Hub v\",\n                                process.env.HUB_VERSION),\n                            React.createElement(\"li\", null,\n                                \"Commit hash \",\n                                process.env.COMMIT_HASH),\n                            React.createElement(\"li\", null,\n                                \"@streamr/sdk v\",\n                                process.env.STREAMR_SDK_VERSION),\n                            React.createElement(\"li\", null,\n                                \"@streamr/config v\",\n                                process.env.STREAMR_CONFIG_VERSION))),\n                        okLabel: 'Dismiss',\n                    });\n                }\n                catch (_) {\n                    // Ignore.\n                }\n            }, 1500);\n        }\n        document.addEventListener('keydown', onKeyDown);\n        document.addEventListener('keyup', onKeyUp);\n        return () => {\n            document.removeEventListener('keydown', onKeyDown);\n            document.removeEventListener('keyup', onKeyUp);\n            onKeyUp();\n        };\n    }, []);\n}\nexport function useConfigValueFromChain(key, transform) {\n    const [value, setValue] = useState();\n    const chainId = useCurrentChainId();\n    const transformRef = useRef(transform);\n    if (transformRef.current !== transform) {\n        transformRef.current = transform;\n    }\n    useEffect(() => {\n        let mounted = true;\n        void (async () => {\n            try {\n                const newValue = await getConfigValueFromChain(chainId, key);\n                if (!mounted) {\n                    return;\n                }\n                setValue((transformRef.current\n                    ? transformRef.current(newValue)\n                    : newValue));\n            }\n            catch (e) {\n                console.warn(`Could not load ${key} config from chain`, e);\n                errorToast({ title: 'Could not load config from chain' });\n            }\n        })();\n        return () => {\n            mounted = false;\n        };\n    }, [key, chainId]);\n    return value;\n}\nexport function useMaxUndelegationQueueDays() {\n    return (useConfigValueFromChain('maxQueueSeconds', (value) => Number(value) / 86400) || 0);\n}\nexport function useMediaQuery(query) {\n    const subscribe = useCallback((cb) => {\n        if (typeof window.matchMedia !== 'function') {\n            return () => { };\n        }\n        const matchMedia = window.matchMedia(query);\n        matchMedia.addEventListener('change', cb);\n        return () => {\n            matchMedia.removeEventListener('change', cb);\n        };\n    }, [query]);\n    return useSyncExternalStore(subscribe, () => typeof window.matchMedia === 'function' && window.matchMedia(query).matches);\n}\n/**\n * Extracts block number (`?b=…`) from GET params; makes sure it's\n * a number. Defaults to 0.\n */\nexport function useRequestedBlockNumber() {\n    const blockNumber = useSearchParams()[0].get('b');\n    try {\n        return z.coerce.number().min(0).parse(blockNumber);\n    }\n    catch (_) {\n        return 0;\n    }\n}\n/**\n * Tracks and returns a referenace to the latest `BehindIndexError` exception.\n */\nexport function useLatestBehindBlockError(query) {\n    const { error, isSuccess } = query;\n    const behindBlockErrorRef = useRef(null);\n    if (error instanceof BehindIndexError) {\n        behindBlockErrorRef.current = error;\n    }\n    if (isSuccess) {\n        behindBlockErrorRef.current = null;\n    }\n    return behindBlockErrorRef.current;\n}\n/**\n * Keeps a reference of the first encountered `BehindIndexError` within\n * the context of `resetDeps`.\n */\nexport function useInitialBehindIndexError(query, resetDeps) {\n    const { error } = query;\n    const errorRef = useRef(null);\n    const resetKey = JSON.stringify(resetDeps);\n    const resetKeyRef = useRef(resetKey);\n    if (!errorRef.current && error instanceof BehindIndexError) {\n        errorRef.current = error;\n    }\n    if (resetKeyRef.current !== resetKey) {\n        resetKeyRef.current = resetKey;\n        errorRef.current = null;\n    }\n    return errorRef.current;\n}\n/**\n * Refreshes given erroring query after 5s if the reason for its failure\n * is a `BehindIndexError`.\n */\nexport function useRefetchQueryBehindIndexEffect(query) {\n    const isBehindError = query.error instanceof BehindIndexError;\n    useEffect(function refetchQueryOnBehindBlockError() {\n        if (!isBehindError) {\n            return;\n        }\n        const timeoutId = setTimeout(() => {\n            query.refetch();\n        }, 15000);\n        return () => {\n            clearTimeout(timeoutId);\n        };\n    }, [query, isBehindError]);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport InfoIcon from '@atlaskit/icon/glyph/info';\nimport { toaster } from 'toasterhea';\nimport BaseModal from '~/modals/BaseModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { RejectionReason } from '~/utils/exceptions';\nconst ConfirmationModal = ({ title, description, proceedLabel, cancelLabel, isDangerous = false, onResolve, ...props }) => {\n    return (React.createElement(BaseModal, { ...props }, (close) => (React.createElement(ModalBody, null,\n        React.createElement(Icon, null,\n            React.createElement(IconWrap, { \"$color\": isDangerous ? '#ff0f2d' : '#6240AF' },\n                React.createElement(InfoIcon, { label: \"Info\" }))),\n        React.createElement(Title, { \"$isDangerous\": isDangerous }, title),\n        React.createElement(CloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton) },\n            React.createElement(SvgIcon, { name: \"crossMedium\" })),\n        React.createElement(Description, null, description),\n        React.createElement(DecisionButtons, null,\n            React.createElement(DecisionButton, { onClick: () => void onResolve?.(true), \"$isDangerous\": isDangerous }, proceedLabel),\n            React.createElement(Dot, null),\n            React.createElement(DecisionButton, { onClick: () => close(RejectionReason.CloseButton) }, cancelLabel))))));\n};\nexport const confirmationModal = toaster(ConfirmationModal, Layer.Modal);\nconst ModalBody = styled.div.withConfig({ displayName: \"ModalBody\", componentId: \"sc-voqu7n\" }) `\n    display: grid;\n    grid-template-columns: 24px auto 24px;\n    grid-template-rows: auto auto auto;\n    padding: 20px 16px;\n    grid-gap: 16px;\n    width: 400px;\n`;\nconst Icon = styled.div.withConfig({ displayName: \"Icon\", componentId: \"sc-qi231b\" }) `\n    grid-row-start: 1;\n    grid-row-end: 1;\n    grid-column-start: 1;\n    grid-column-end: 1;\n    width: 24px;\n    height: 24px;\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-sdo3t5\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 5px;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n    > svg {\n        width: 12px;\n        height: 12px;\n    }\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-12a02f3\" }) `\n    grid-row-start: 1;\n    grid-row-end: 1;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    font-weight: ${MEDIUM};\n    margin: 0;\n    font-size: 16px;\n    color: ${({ $isDangerous }) => ($isDangerous ? '#ff0f2d' : 'inherit')};\n`;\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-207eya\" }) `\n    grid-row-start: 2;\n    grid-row-end: 2;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    margin: 0;\n    font-size: 14px;\n    line-height: 20px;\n`;\nconst DecisionButtons = styled.div.withConfig({ displayName: \"DecisionButtons\", componentId: \"sc-6jyzvo\" }) `\n    grid-row-start: 3;\n    grid-row-end: 3;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    display: flex;\n    align-items: center;\n    gap: 8px;\n`;\nconst DecisionButton = styled.p.withConfig({ displayName: \"DecisionButton\", componentId: \"sc-d6isvw\" }) `\n    margin: 0;\n    color: ${({ $isDangerous }) => ($isDangerous ? '#ff0f2d' : COLORS.link)};\n    cursor: pointer;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-1tn8edh\" }) `\n    width: 3px;\n    height: 3px;\n    border-radius: 50%;\n    background-color: ${COLORS.primary};\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-14g910u\" }) `\n    height: 24px;\n    width: 24px;\n    position: relative;\n    display: flex;\n    items-center;\n    justify-content: center;\n    flex-shrink: 0;\n    margin-right: 16px;\n    color: ${({ $color = 'inherit' }) => $color};\n`;\n","import { confirmationModal } from '~/modals/ConfirmationModal';\nexport async function confirm(props) {\n    try {\n        return await confirmationModal.pop(props);\n    }\n    catch (_) { }\n    return false;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport Spinner from '~/components/Spinner';\nexport const Alert = ({ type, title, className, children }) => {\n    return (React.createElement(AlertWrap, { \"$type\": type, className: className },\n        React.createElement(AlertIcon, { type: type }),\n        React.createElement(\"div\", null,\n            React.createElement(Title, null, title),\n            children != null && React.createElement(Content, null, children))));\n};\nconst AlertIcon = ({ type }) => {\n    switch (type) {\n        case 'success':\n            return React.createElement(StyledIcon, { name: \"checkmark\" });\n        case 'error':\n            return React.createElement(StyledIcon, { name: \"warnBadge\" });\n        case 'loading':\n            return React.createElement(StyledSpinner, { color: \"blue\", size: \"medium\" });\n        case 'notice':\n            return React.createElement(StyledIcon, { name: \"infoBadge\" });\n    }\n};\nconst getAlertBackgroundColor = ({ $type }) => {\n    switch ($type) {\n        case 'success':\n            return COLORS.alertSuccessBackground;\n        case 'error':\n            return COLORS.alertErrorBackground;\n        case 'loading':\n        case 'notice':\n            return COLORS.alertInfoBackground;\n        default:\n            return 'transparent';\n    }\n};\nconst AlertWrap = styled.div.withConfig({ displayName: \"AlertWrap\", componentId: \"sc-ekjwlf\" }) `\n    display: grid;\n    grid-template-columns: 24px auto;\n    gap: 16px;\n    padding: 20px 16px;\n    border-radius: 8px;\n    background-color: ${getAlertBackgroundColor};\n`;\nconst StyledIcon = styled(SvgIcon).withConfig({ displayName: \"StyledIcon\", componentId: \"sc-p60j5u\" }) `\n    width: 22px;\n    height: 22px;\n    flex-shrink: 0;\n`;\nconst StyledSpinner = styled(Spinner).withConfig({ displayName: \"StyledSpinner\", componentId: \"sc-1jqcvlm\" }) `\n    align-self: baseline !important;\n    flex-shrink: 0;\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-dac3a\" }) `\n    font-weight: ${MEDIUM};\n    line-height: 20px;\n    margin: 0;\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-1kv50dt\" }) `\n    margin-top: 4px;\n    line-height: 20px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function Slider({ min, max, value, onChange: onChangeProp, disabled, className, }) {\n    const borderPercentage = (100 * value) / (max - min);\n    return (React.createElement(SliderRoot, { className: className },\n        React.createElement(\"input\", { type: \"range\", min: min, max: max, value: value, onChange: (e) => {\n                onChangeProp?.(Number.parseInt(e.target.value, 10));\n            }, disabled: disabled, style: {\n                background: `linear-gradient(to right, ${COLORS.link} calc(${borderPercentage}%), ${COLORS.linkInactive} 1%)`,\n            } })));\n}\nconst SliderRoot = styled.div.withConfig({ displayName: \"SliderRoot\", componentId: \"sc-1xw479y\" }) `\n    width: 100%;\n    position: relative;\n    padding-bottom: 6px;\n\n    input {\n        appearance: none;\n        width: 100%;\n        outline: none;\n        transition: opacity 0.2s;\n        height: 3px;\n        border-radius: 2px;\n    }\n\n    input::-webkit-slider-thumb {\n        appearance: none;\n        width: 12px;\n        height: 12px;\n        background: #0324ff;\n        cursor: pointer;\n        border-radius: 50%;\n    }\n\n    input::-moz-range-thumb {\n        width: 12px;\n        height: 12px;\n        background: #0324ff;\n        cursor: pointer;\n        border-radius: 50%;\n    }\n\n    input:focus {\n        outline: none;\n    }\n\n    input[disabled] {\n        opacity: 0.5;\n        cursor: not-allowed;\n    }\n`;\n","export const ACTIVE = '#0424ff';\nexport const SUCCESS = '#2ac437';\nexport const CAUTION = '#f9cf0d';\nexport const ERROR = '#ff0f2d';\nexport const PROCESSING = '#cccccc';\nexport const DEFAULT = '#323232';\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport * as Colors from '~/shared/components/Ui/StateColors';\nimport { MEDIUM } from '~/shared/utils/styled';\nfunction UnstyledLabel({ children, ...props }) {\n    return React.createElement(\"label\", { ...props }, children);\n}\nconst Label = styled(UnstyledLabel).withConfig({ displayName: \"Label\", componentId: \"sc-e2ulv2\" }) `\n    color: ${({ state }) => (state ? Colors[state] : undefined) ||\n    Colors.DEFAULT};\n    display: block;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    line-height: 1em;\n    margin: 0 0 8px;\n    transition: 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;\n    transition-property: color, transform;\n\n    ${({ $wrap = false }) => !$wrap &&\n    css `\n            white-space: nowrap;\n        `}\n`;\nexport default Label;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport { COLORS, MEDIUM, REGULAR, SANS, TABLET } from '~/shared/utils/styled';\nimport { RejectionReason } from '~/utils/exceptions';\nimport BaseModal, { Footer } from './BaseModal';\nexport default function FormModal({ title = 'Untitled modal', onSubmit, children, onReject, submitLabel = 'Submit', cancelLabel, canSubmit = true, submitting = false, ...props }) {\n    const actions = {};\n    if (cancelLabel) {\n        actions.cancel = {\n            title: cancelLabel,\n            kind: 'link',\n            type: 'button',\n            onClick() {\n                onReject?.(RejectionReason.CancelButton);\n            },\n        };\n    }\n    actions.ok = {\n        title: submitLabel,\n        kind: 'primary',\n        type: 'submit',\n        disabled: !canSubmit,\n        spinner: submitting,\n    };\n    return (React.createElement(BaseModal, { ...props, onReject: onReject }, (close) => (React.createElement(\"form\", { onSubmit: async (e) => {\n            e.preventDefault();\n            try {\n                await onSubmit?.();\n            }\n            catch (e) {\n                onReject?.(e);\n            }\n        } },\n        React.createElement(FormModalRoot, null,\n            React.createElement(FormModalHead, null,\n                React.createElement(FormModalTitle, null, title),\n                React.createElement(FormModalCloseButton, { type: \"button\", onClick: () => void close(RejectionReason.CloseButton), disabled: submitting },\n                    React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n            React.createElement(FormModalContent, null, children),\n            React.createElement(Footer, { \"$borderless\": true, \"$spacious\": true },\n                React.createElement(Buttons, { actions: actions })))))));\n}\nexport const FormModalContent = styled.div.withConfig({ displayName: \"FormModalContent\", componentId: \"sc-a9t3q8\" }) `\n    padding: 0 40px;\n`;\nexport const FormModalRoot = styled.div.withConfig({ displayName: \"FormModalRoot\", componentId: \"sc-19s3hbr\" }) `\n    max-width: 672px;\n    width: 90vw;\n`;\nexport const FormModalHead = styled.div.withConfig({ displayName: \"FormModalHead\", componentId: \"sc-1rlv5dn\" }) `\n    align-items: center;\n    display: flex;\n    font-family: ${SANS};\n    font-size: 24px;\n    font-weight: normal;\n    height: 100px;\n    line-height: normal;\n    margin: 0;\n    position: relative;\n    padding: 20px 40px 0;\n    width: 100%;\n\n    @media ${TABLET} {\n        height: 120px;\n        padding-top: 0;\n    }\n`;\nexport const FormModalTitle = styled.div.withConfig({ displayName: \"FormModalTitle\", componentId: \"sc-12jr598\" }) `\n    flex-grow: 1;\n`;\nexport const FormModalCloseButton = styled.button.withConfig({ displayName: \"FormModalCloseButton\", componentId: \"sc-eccf5t\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\nexport const SectionHeadline = styled.h4.withConfig({ displayName: \"SectionHeadline\", componentId: \"sc-1ycklcf\" }) `\n    font-size: 14px;\n    font-weight: normal;\n    line-height: 24px;\n    margin: 20px 0 8px;\n    display: flex;\n    align-items: center;\n    &:first-of-type {\n        margin: 0 0 8px;\n    }\n`;\nexport const Hint = styled.div.withConfig({ displayName: \"Hint\", componentId: \"sc-1s31m8e\" }) `\n    color: ${COLORS.primaryLight};\n    font-size: 12px;\n    margin-top: 8px;\n    line-height: 20px;\n\n    p {\n        margin: 0;\n        width: 90%;\n    }\n\n    p + p {\n        margin-top: 0.25em;\n    }\n`;\nexport const Section = styled.div.withConfig({ displayName: \"Section\", componentId: \"sc-9bdmf7\" }) `\n    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);\n    background: ${COLORS.section};\n    border-radius: 8px;\n    padding: 16px;\n\n    ${Label} {\n        line-height: 20px;\n    }\n\n    & + & {\n        margin-top: 16px;\n    }\n`;\nexport const Prop = styled.em.withConfig({ displayName: \"Prop\", componentId: \"sc-y9p5e4\" }) `\n    color: ${COLORS.primaryLight};\n    display: block;\n    flex-grow: 1;\n    font-size: 12px;\n    font-style: normal;\n    font-weight: ${MEDIUM};\n    opacity: 0.7;\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            color: ${COLORS.error};\n        `}\n`;\nexport const PropValue = styled.div.withConfig({ displayName: \"PropValue\", componentId: \"sc-2u2mtk\" }) `\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const PropList = styled.ul.withConfig({ displayName: \"PropList\", componentId: \"sc-1qqs6nq\" }) `\n    background: ${COLORS.secondaryLight};\n    font-size: 14px;\n    list-style: none;\n    margin: 16px 0 0;\n    padding: 16px;\n    border-radius: 8px;\n    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);\n\n    li {\n        align-items: center;\n        display: flex;\n        gap: 8px;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n`;\nexport const GroupHeadline = styled.h2.withConfig({ displayName: \"GroupHeadline\", componentId: \"sc-1mq7i5b\" }) `\n    font-size: 18px;\n    line-height: 24px;\n    font-weight: ${REGULAR};\n    margin: 0 0 24px;\n    border-bottom: 1px solid #efefef;\n    padding: 0 0 16px;\n`;\nexport const Group = styled.div.withConfig({ displayName: \"Group\", componentId: \"sc-1jeu5h7\" }) `\n    & + & {\n        margin-top: 40px;\n    }\n`;\nexport const WingedLabelWrap = styled.div.withConfig({ displayName: \"WingedLabelWrap\", componentId: \"sc-11u2edf\" }) `\n    display: flex;\n    align-items: center;\n\n    ${Label} {\n        flex-grow: 1;\n        min-width: 0;\n    }\n\n    ${Label} + ${Label} {\n        flex-grow: 0;\n    }\n`;\nexport const ErrorWrap = styled.div.withConfig({ displayName: \"ErrorWrap\", componentId: \"sc-kay23g\" }) `\n    text-align: right;\n`;\nexport const ErrorLabel = styled(Label).withConfig({ displayName: \"ErrorLabel\", componentId: \"sc-4qf3r8\" }) `\n    color: ${COLORS.error};\n    opacity: 0.7;\n`;\nexport const TextInput = styled.input.withConfig({ displayName: \"TextInput\", componentId: \"sc-1bpiaby\" }) `\n    background: none;\n    border: 0;\n    backface-visibility: hidden;\n    font-size: inherit;\n    height: 100%;\n    color: ${COLORS.primary};\n    padding: 0 18px;\n    flex-grow: 1;\n    outline: 0;\n    min-width: 48px;\n\n    ::-webkit-outer-spin-button,\n    ::-webkit-inner-spin-button {\n        -webkit-appearance: none;\n        margin: 0;\n    }\n\n    &[type='number'] {\n        -moz-appearance: textfield;\n    }\n\n    &::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n`;\nexport const TextareaInput = styled.textarea.withConfig({ displayName: \"TextareaInput\", componentId: \"sc-qfm17k\" }) `\n    background: none;\n    border: 0;\n    backface-visibility: hidden;\n    font-size: inherit;\n    height: 100%;\n    color: ${COLORS.primary};\n    padding: 8px 18px 36px;\n    flex-grow: 1;\n    outline: 0;\n    resize: none;\n\n    ${({ $minHeight }) => $minHeight &&\n    css `\n            min-height: ${$minHeight}px;\n        `}\n\n    ::-webkit-outer-spin-button,\n    ::-webkit-inner-spin-button {\n        -webkit-appearance: none;\n        margin: 0;\n    }\n\n    &::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n`;\nexport const TextareaCounter = styled.span.withConfig({ displayName: \"TextareaCounter\", componentId: \"sc-1n2jkqm\" }) `\n    position: absolute;\n    bottom: 8px;\n    right: 18px;\n    color: ${COLORS.primaryLight};\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            color: ${COLORS.error};\n        `}\n`;\nconst Appendix = styled.div.withConfig({ displayName: \"Appendix\", componentId: \"sc-1d79nts\" }) `\n    align-items: center;\n    display: flex;\n    flex-shrink: 0;\n    height: 100%;\n`;\nexport const TextAppendix = styled(Appendix).withConfig({ displayName: \"TextAppendix\", componentId: \"sc-1hfakpf\" }) `\n    padding: 0 18px;\n`;\nexport const FieldWrap = styled.div.withConfig({ displayName: \"FieldWrap\", componentId: \"sc-11sn36l\" }) `\n    display: flex;\n    position: relative;\n    border: 1px solid transparent;\n    align-items: center;\n    background: ${COLORS.primaryContrast};\n    font-size: 14px;\n    border-radius: 8px;\n    min-height: 40px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);\n\n    :focus-within {\n        box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);\n    }\n\n    & + ${Label} {\n        margin-top: 24px;\n    }\n\n    ${TextAppendix} {\n        border-left: 1px solid ${COLORS.Border};\n    }\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            border: 1px solid ${COLORS.error};\n\n            ${TextAppendix} {\n                border-color: ${COLORS.error};\n            }\n        `}\n\n    ${({ $grayedOut = false }) => $grayedOut &&\n    css `\n            border-color: ${COLORS.secondaryLight};\n            background: ${COLORS.secondaryLight};\n        `}\n\n    ${({ $top = false }) => $top &&\n    css `\n            border-radius: 8px 8px 0 0;\n        `}\n\n    ${({ $bottom = false }) => $bottom &&\n    css `\n            border-radius: 0 0 8px 8px;\n            border-top: 1px solid;\n            border-color: ${COLORS.secondaryLight};\n        `}\n\n    ${({ $padded = false }) => $padded &&\n    css `\n            padding: 0 16px;\n        `}\n`;\nexport const CopyButtonWrapAppendix = styled(Appendix).withConfig({ displayName: \"CopyButtonWrapAppendix\", componentId: \"sc-1ekm106\" }) `\n    padding: 0 16px 0 0;\n\n    button {\n        align-items: center;\n        appearance: none;\n        background: ${COLORS.primaryContrast};\n        border: 0;\n        color: ${COLORS.primaryLight};\n        display: flex;\n        height: 24px;\n        justify-content: center;\n        width: 24px;\n    }\n`;\nexport const IconWrapAppendix = styled(Appendix).withConfig({ displayName: \"IconWrapAppendix\", componentId: \"sc-1jvm6jt\" }) `\n    color: ${COLORS.primaryDisabled};\n    padding-right: 10px;\n`;\nfunction getMaxButtonAttrs() {\n    return {\n        type: 'button',\n        children: 'MAX',\n    };\n}\nexport const MaxButton = styled.button.attrs(getMaxButtonAttrs).withConfig({ displayName: \"MaxButton\", componentId: \"sc-4ixbdm\" }) `\n    appearance: none;\n    background: #f8f8f8;\n    border: 0;\n    border-radius: 4px;\n    color: #0324ff;\n    flex: 0;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    line-height: normal;\n    padding: 2px 4px;\n\n    & + * {\n        margin-left: 12px;\n    }\n`;\n","import React, { useState, useCallback, useRef } from 'react';\nimport styled, { css } from 'styled-components';\nimport AvatarEditor from 'react-avatar-editor';\nimport { Slider } from '~/components/Slider';\nimport BaseModal, { Footer } from '~/modals/BaseModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { FormModalCloseButton, FormModalContent, FormModalHead, FormModalRoot, FormModalTitle, } from '~/modals/FormModal';\nimport { Button } from '~/components/Button';\nimport { COLORS } from '~/shared/utils/styled';\nimport MaskSvg from '~/shared/assets/images/mask.svg';\nimport { RejectionReason } from '~/utils/exceptions';\nconst MAX_WIDTH = 1024;\n// only width is considered because images returned from the cropper will always be squared\nexport const getCroppedAndResizedBlob = async (imageUrl, cropInfo) => {\n    const imageElement = document.createElement('img');\n    await new Promise((resolve) => {\n        imageElement.onload = () => resolve(null);\n        imageElement.src = imageUrl;\n    });\n    let canvas = document.createElement('canvas');\n    const cropCanvasContext = canvas.getContext('2d');\n    const x = Math.round(imageElement.width * cropInfo.x);\n    const y = Math.round(imageElement.height * cropInfo.y);\n    const width = Math.round(imageElement.width * cropInfo.width);\n    const height = Math.round(imageElement.height * cropInfo.height);\n    canvas.width = width;\n    canvas.height = height;\n    cropCanvasContext.drawImage(imageElement, x, y, width, height, 0, 0, width, height);\n    if (canvas.width > MAX_WIDTH) {\n        const resizedCanvas = document.createElement('canvas');\n        const resizedCanvasContext = resizedCanvas.getContext('2d');\n        // Start with original image size\n        resizedCanvas.width = canvas.width;\n        resizedCanvas.height = canvas.height;\n        // Draw the original image on the (temp) resizing canvas\n        resizedCanvasContext.drawImage(canvas, 0, 0);\n        // Quickly reduce the size by 50% each time in few iterations until the size is less then\n        // 2x time the target size - the motivation for it, is to reduce the aliasing that would have been\n        // created with direct reduction of very big image to small image\n        while (resizedCanvas.width * 0.5 > MAX_WIDTH) {\n            resizedCanvas.width *= 0.5;\n            resizedCanvas.height *= 0.5;\n            resizedCanvasContext.drawImage(resizedCanvas, 0, 0, resizedCanvas.width, resizedCanvas.height);\n        }\n        // Now do final resize for the resizingCanvas to meet the dimension requirments\n        // directly to the output canvas, that will output the final image\n        resizedCanvas.width = MAX_WIDTH;\n        resizedCanvas.height = (resizedCanvas.width * canvas.height) / canvas.width;\n        resizedCanvasContext.drawImage(canvas, 0, 0, resizedCanvas.width, resizedCanvas.height);\n        canvas = resizedCanvas;\n    }\n    return await new Promise((resolve) => canvas.toBlob(resolve));\n};\nconst CropImageModal = ({ imageUrl, onResolve = (file) => file, onReject = () => { }, title = 'Scale and crop your image', mask = 'none', ...props }) => {\n    const editorRef = useRef(null);\n    const [sliderValue, setSliderValue] = useState(1);\n    const onSave = useCallback(async () => {\n        if (editorRef.current) {\n            const blob = await getCroppedAndResizedBlob(imageUrl, editorRef.current.getCroppingRect());\n            if (!blob) {\n                console.warn('Failed to get the blob');\n                return;\n            }\n            onResolve(new File([blob], 'coverImage.png'));\n        }\n    }, [onResolve, editorRef, imageUrl]);\n    return (React.createElement(BaseModal, { ...props, onReject: onReject }, (close) => (React.createElement(FormModalRoot, null,\n        React.createElement(FormModalHead, null,\n            React.createElement(FormModalTitle, null, title),\n            React.createElement(FormModalCloseButton, { type: \"button\", onClick: close },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(FormModalContent, null,\n            React.createElement(\"div\", null,\n                React.createElement(AvatarEditorWrap, null,\n                    React.createElement(StyledAvatarEditor, { ref: editorRef, image: imageUrl, width: 1024, height: 1024, border: [0, 0], borderRadius: 0, color: [255, 255, 255, 0.6], scale: (100 + sliderValue) / 100, rotate: 0, \"$mask\": mask })),\n                React.createElement(ZoomControls, null,\n                    React.createElement(ZoomIcon, { name: 'zoomOut' }),\n                    React.createElement(ZoomSlider, { min: 0, max: 200, value: sliderValue, onChange: setSliderValue }),\n                    React.createElement(ZoomIcon, { name: 'zoomIn' })))),\n        React.createElement(Footer, { \"$borderless\": true, \"$autoHeight\": true },\n            React.createElement(ButtonsContainer, null,\n                React.createElement(StyledButton, { onClick: onSave }, \"Crop\"),\n                React.createElement(StyledButton, { kind: \"secondary\", onClick: () => void close(RejectionReason.CancelButton) }, \"Cancel\")))))));\n};\nexport default CropImageModal;\nconst StyledAvatarEditor = styled(AvatarEditor).withConfig({ displayName: \"StyledAvatarEditor\", componentId: \"sc-81f53u\" }) `\n    width: 100% !important;\n    height: auto !important;\n\n    ${({ $mask }) => $mask === 'round' &&\n    css `\n            mask: url(${MaskSvg}) center;\n            mask-size: 100% 100%;\n        `}\n`;\nconst AvatarEditorWrap = styled.div.withConfig({ displayName: \"AvatarEditorWrap\", componentId: \"sc-15ufzw2\" }) `\n    display: flex;\n    background-color: black;\n`;\nconst ZoomSlider = styled(Slider).withConfig({ displayName: \"ZoomSlider\", componentId: \"sc-davo35\" }) `\n    width: 50%;\n    min-width: 200px;\n    margin: 0 12px;\n`;\nconst ZoomControls = styled.div.withConfig({ displayName: \"ZoomControls\", componentId: \"sc-pbksug\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin-top: 35px;\n`;\nconst ZoomIcon = styled(SvgIcon).withConfig({ displayName: \"ZoomIcon\", componentId: \"sc-mle32t\" }) `\n    color: ${COLORS.link};\n    width: 20px;\n`;\nconst ButtonsContainer = styled.div.withConfig({ displayName: \"ButtonsContainer\", componentId: \"sc-smxesj\" }) `\n    display: flex;\n    flex-direction: column;\n    width: 100%;\n    margin: 40px 0 30px;\n`;\nconst StyledButton = styled(Button).withConfig({ displayName: \"StyledButton\", componentId: \"sc-d3dtj2\" }) `\n    margin-bottom: 10px;\n    width: 100%;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Anchor, useBoundingClientRect } from './Anchor';\nexport function Tooltip({ children, content, anchorDisplay }) {\n    const [isOpen, toggle] = useState(false);\n    useEffect(() => {\n        /**\n         * Let's dismiss tooltips on scroll to avoid temporarily\n         * stranded-looking ones.\n         */\n        function scrollSpy() {\n            toggle(false);\n        }\n        window.addEventListener('scroll', scrollSpy, true);\n        return () => {\n            window.removeEventListener('scroll', scrollSpy, true);\n        };\n    }, []);\n    return (React.createElement(Anchor, { component: TooltipComponent, componentProps: {\n            children: content,\n            visible: isOpen,\n        }, display: anchorDisplay, onMouseEnter: () => void toggle(true), onMouseLeave: () => void toggle(false), translate: (r) => (r ? [r.x + r.width / 2, r.y + window.scrollY] : [0, 0]) }, children));\n}\nfunction TooltipComponent({ x, y, visible = false, children, ...props }) {\n    const ref = useRef(null);\n    const dx = useBoundingClientRect(ref, (rect) => {\n        if (!rect) {\n            return 0;\n        }\n        const { clientWidth } = document.documentElement;\n        if (x > clientWidth / 2) {\n            return Math.min(0, clientWidth - x - rect.width / 2);\n        }\n        return -Math.min(0, x - rect.width / 2);\n    });\n    const [mounted, setMounted] = useState(visible);\n    const [animated, setAnimated] = useState(visible);\n    useEffect(() => {\n        let mounted = true;\n        if (!visible) {\n            return;\n        }\n        setMounted(true);\n        setTimeout(() => {\n            if (mounted) {\n                setAnimated(true);\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [visible]);\n    return (mounted && (React.createElement(TooltipRoot, { ...props, onTransitionEnd: ({ propertyName, target }) => {\n            /**\n             * In this block we remove the tooltip from DOM if its element\n             * becomes invisible.\n             */\n            if (propertyName !== 'visibility') {\n                return;\n            }\n            if (!(target instanceof HTMLDivElement)) {\n                return;\n            }\n            if (window.getComputedStyle(target).visibility === 'hidden') {\n                setAnimated(false);\n                setMounted(false);\n            }\n        }, \"$visible\": animated && visible, ref: ref, style: {\n            transform: `translate(${x | 0}px, ${y | 0}px) translate(-50%, -100%) translateY(-10px) translateX(${dx | 0}px)`,\n        } },\n        React.createElement(TooltipBody, null,\n            React.createElement(Indicator, { style: {\n                    transform: `translate(-50%, -50%) translateY(-2px)  translateX(${-dx | 0}px) rotate(45deg)`,\n                } }),\n            React.createElement(TooltipContent, null, children)))));\n}\nconst TooltipBody = styled.div.withConfig({ displayName: \"TooltipBody\", componentId: \"sc-1r9zbfq\" }) `\n    border-radius: 8px;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    transform: translateY(4px);\n    transition: 350ms transform;\n    white-space: normal;\n`;\nconst TooltipRoot = styled.div.withConfig({ displayName: \"TooltipRoot\", componentId: \"sc-1vemdf9\" }) `\n    left: 0;\n    max-width: min(256px, 100%);\n    opacity: 0;\n    padding: 0 8px;\n    pointer-events: none;\n    position: absolute;\n    top: 0;\n    transition: 350ms;\n    transition-delay: 350ms, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n    z-index: 9999;\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            transition-delay: 0s;\n            visibility: visible;\n\n            ${TooltipBody} {\n                transform: translateY(0);\n            }\n        `}\n`;\nconst TooltipContent = styled.div.withConfig({ displayName: \"TooltipContent\", componentId: \"sc-1sgc98g\" }) `\n    background: white;\n    border-radius: 8px;\n    color: #525252;\n    font-size: 12px;\n    line-height: 1.5em;\n    max-width: max-content;\n    padding: 8px 12px;\n    position: relative;\n    width: 100%;\n\n    > ul,\n    > p {\n        margin: 0;\n    }\n\n    > p + ul,\n    > ul + p,\n    > p + p {\n        margin-top: 0.5em;\n    }\n\n    > ul li + li {\n        margin-top: 0.25em;\n    }\n\n    > ul {\n        list-style: none;\n        padding: 0 0 0 12px;\n        position: relative;\n    }\n\n    > ul li::before {\n        content: '•';\n        display: block;\n        position: absolute;\n        left: 0;\n    }\n`;\nconst Indicator = styled.div.withConfig({ displayName: \"Indicator\", componentId: \"sc-hnn02x\" }) `\n    background: white;\n    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05),\n        0 5px 15px rgba(0, 0, 0, 0.1);\n    position: absolute;\n    width: 12px;\n    height: 12px;\n    border-radius: 2px;\n    left: 50%;\n    top: 100%;\n\n    ::before {\n        background: transparent;\n        content: '';\n        height: 12px;\n        position: absolute;\n        transform: rotate(-45deg) translateY(12px);\n        width: 12px;\n    }\n`;\nexport const TooltipIconWrap = styled.div.withConfig({ displayName: \"TooltipIconWrap\", componentId: \"sc-1jwjb5u\" }) `\n    color: ${({ $color = 'inherit' }) => $color};\n\n    span[role='img'],\n    svg {\n        display: block;\n        ${({ $svgSize }) => {\n    if ($svgSize) {\n        return css `\n                    width: ${$svgSize.width};\n                    height: ${$svgSize.height};\n                `;\n    }\n}}\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Tooltip } from '~/components/Tooltip';\n/**\n * Question mark icon with a tooltip.\n */\nexport function Hint({ children }) {\n    return (React.createElement(Tooltip, { content: children },\n        React.createElement(IconWrap, null,\n            React.createElement(QuestionMarkIcon, null))));\n}\nexport const IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1jfme6l\" }) `\n    align-items: center;\n    color: ${({ $color = 'inherit' }) => $color};\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    position: relative;\n    width: 24px;\n`;\nfunction getQuestionMarkIconAttrs() {\n    return { name: 'outlineQuestionMark' };\n}\nconst QuestionMarkIcon = styled(SvgIcon).attrs(getQuestionMarkIconAttrs).withConfig({ displayName: \"QuestionMarkIcon\", componentId: \"sc-1yzmog0\" }) `\n    display: block;\n    height: 16px;\n    width: 16px;\n`;\n","import React, { useEffect, useRef, useState, } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Anchor, useBoundingClientRect } from '~/components/Anchor';\nimport { Tooltip } from '~/components/Tooltip';\nimport EnterIcon from '~/shared/assets/icons/enter.svg';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nexport function PropertyDropdown({ onDismiss, toggleIcon = React.createElement(React.Fragment, null), value = '', valuePlaceholder = '', ...props }) {\n    const [open, setOpen] = useState(false);\n    const displayValue = valuePlaceholder ? value || valuePlaceholder : null;\n    const content = (React.createElement(Toggle, { type: \"button\", onClick: () => {\n            setOpen(true);\n            onDismiss?.();\n        }, \"$active\": open },\n        React.createElement(IconWrap, null, toggleIcon),\n        displayValue && React.createElement(Value, { \"$unset\": !value }, displayValue)));\n    return (React.createElement(Anchor, { component: PropertyPopover, componentProps: {\n            ...props,\n            onDismiss: () => {\n                setOpen(false);\n            },\n            open,\n            value,\n        }, translate: (r) => (r ? [r.x, r.y + r.height + window.scrollY] : [0, 0]) }, value && !valuePlaceholder ? (React.createElement(Tooltip, { content: value }, content)) : (content)));\n}\nfunction PropertyPopover(props) {\n    const { disabled = false, error = '', onChange, onDismiss, onSubmit, open = false, placeholder, required = false, submitLabel = 'Submit', title = 'Property', value: valueProp = '', x, y, } = props;\n    const [value, setValue] = useState(valueProp);\n    useEffect(function syncValueWithUpstream() {\n        setValue(valueProp);\n    }, [valueProp, open]);\n    const bodyRef = useRef(null);\n    const onDismissRef = useRef(onDismiss);\n    if (onDismissRef.current !== onDismiss) {\n        onDismissRef.current = onDismiss;\n    }\n    useEffect(() => {\n        if (!open) {\n            return () => { };\n        }\n        function onMouseDown(e) {\n            if (!(e.target instanceof Element)) {\n                return;\n            }\n            if (bodyRef.current?.contains(e.target) === true) {\n                return;\n            }\n            onDismissRef.current?.();\n        }\n        window.addEventListener('mousedown', onMouseDown);\n        return () => {\n            window.removeEventListener('mousedown', onMouseDown);\n        };\n    }, [open]);\n    const dx = useBoundingClientRect(bodyRef, (r) => {\n        if (!r || !open) {\n            return 0;\n        }\n        return Math.min(0, document.documentElement.clientWidth - (x + r.width + 8));\n    });\n    return (open && (React.createElement(PropertyPopoverRoot, { style: {\n            '--propertyDropdownX': `${x | 0}px`,\n            '--propertyDropdownY': `${y | 0}px`,\n        } },\n        React.createElement(PropertyPopoverBody, { onSubmit: (e) => {\n                e.preventDefault();\n                e.stopPropagation();\n                try {\n                    onSubmit?.(value);\n                }\n                catch (e) {\n                    /**\n                     * If `onSubmit` explodes we don't dismiss the dropdown. Devs can\n                     * do whatever they want with it. It's a feature. ;)\n                     */\n                    console.warn('Failed to submit property value', e);\n                    return;\n                }\n                onDismiss?.();\n            }, ref: bodyRef, onKeyDown: (e) => {\n                if (e.key === 'Escape') {\n                    onDismiss?.();\n                    e.stopPropagation();\n                }\n            }, style: {\n                '--propertyDropdownDeltaX': `${dx}px`,\n            } },\n            React.createElement(Header, null,\n                React.createElement(Title, null, title),\n                !required && React.createElement(Optional, null, \"Optional\")),\n            React.createElement(InputWrap, null,\n                React.createElement(Input, { disabled: disabled, autoFocus: true, placeholder: placeholder, type: \"text\", value: value, onKeyDown: (e) => {\n                        if (e.key === 'Escape' && value !== valueProp) {\n                            setValue(valueProp);\n                            onChange?.();\n                            e.stopPropagation();\n                        }\n                    }, onChange: (e) => {\n                        setValue(e.target.value);\n                        onChange?.();\n                    } }),\n                React.createElement(EnterButton, { type: \"submit\", \"$visible\": !!value || !required, disabled: disabled },\n                    React.createElement(\"img\", { src: EnterIcon }))),\n            error ? (React.createElement(ValidationError, null, error)) : (React.createElement(Submit, { type: \"submit\", disabled: disabled },\n                React.createElement(PlusIcon, null),\n                submitLabel))))));\n}\nconst PropertyPopoverRoot = styled.div.withConfig({ displayName: \"PropertyPopoverRoot\", componentId: \"sc-je4jwl\" }) `\n    --propertyDropdownX: 0;\n    --propertyDropdownY: 0;\n\n    height: 0;\n    left: 0;\n    position: absolute;\n    top: 0;\n    transform: translate(var(--propertyDropdownX), var(--propertyDropdownY))\n        translateY(8px);\n    width: 0;\n    z-index: 12;\n`;\nconst PropertyPopoverBody = styled.form.withConfig({ displayName: \"PropertyPopoverBody\", componentId: \"sc-12feyaj\" }) `\n    --propertyDropdownDeltaX: 0;\n\n    background-color: #ffffff;\n    border-radius: 8px;\n    box-shadow: inset 0 0 1px rgba(0, 0, 0, 0.05), 0 0 2px rgba(0, 0, 0, 0.25),\n        0 4px 10px rgba(0, 0, 0, 0.1);\n    padding: 16px;\n    transform: translateX(var(--propertyDropdownDeltaX));\n    width: 320px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-15ijpke\" }) `\n    align-items: center;\n    display: flex;\n    line-height: 16px;\n    margin-bottom: 12px;\n`;\nconst Optional = styled.div.withConfig({ displayName: \"Optional\", componentId: \"sc-9d6338\" }) `\n    color: ${COLORS.primaryDisabled};\n    font-size: 12px;\n`;\nconst Title = styled.h4.withConfig({ displayName: \"Title\", componentId: \"sc-6rm546\" }) `\n    flex-grow: 1;\n    font-size: 14px;\n    font-weight: 400;\n    margin: 0;\n`;\nconst Input = styled.input.withConfig({ displayName: \"Input\", componentId: \"sc-1bdc7fk\" }) `\n    appearance: none;\n    border: 1px solid ${COLORS.secondaryHover};\n    border-radius: 4px;\n    color: inherit;\n    font-size: 14px;\n    line-height: 30px;\n    outline: 0;\n    padding: 8px 12px;\n    padding-right: 35px;\n    transition: 0.35s border-color;\n    width: 100%;\n\n    :placeholder-shown {\n        padding-right: 0;\n    }\n\n    ::placeholder {\n        color: ${COLORS.disabled};\n    }\n\n    :focus {\n        border-color: ${COLORS.focus};\n    }\n\n    ${({ $invalid = false }) => $invalid &&\n    css `\n            outline-color: ${COLORS.error} !important;\n        `}\n`;\nconst InputWrap = styled.div.withConfig({ displayName: \"InputWrap\", componentId: \"sc-f27hus\" }) `\n    position: relative;\n`;\nconst EnterButton = styled.button.withConfig({ displayName: \"EnterButton\", componentId: \"sc-zb1g63\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    opacity: 0;\n    padding: 0;\n    pointer-events: none;\n    position: absolute;\n    right: 0;\n    top: 50%;\n    transform: translateX(-12px) translateY(-50%);\n    transition: 0.5s ease-out;\n    transition-delay: 0.5s, 0s;\n    transition-property: visibility, opacity;\n    visibility: hidden;\n\n    img {\n        display: block;\n    }\n\n    ${({ $visible = false }) => $visible &&\n    css `\n            opacity: 1;\n            pointer-events: auto;\n            transition-delay: 0s;\n            transition-duration: 0.1s;\n            transition-timing-function: ease-in;\n            visibility: visible;\n        `}\n`;\nfunction getPlusIconAttrs() {\n    return {\n        name: 'plusSmall',\n    };\n}\nconst PlusIcon = styled(SvgIcon).attrs(getPlusIconAttrs).withConfig({ displayName: \"PlusIcon\", componentId: \"sc-yimxa8\" }) `\n    display: block;\n    height: 10px;\n    margin-right: 5px;\n    width: 10px;\n`;\nconst Submit = styled.button.withConfig({ displayName: \"Submit\", componentId: \"sc-1xal8on\" }) `\n    align-items: center;\n    appearance: none;\n    background-color: ${COLORS.secondaryLight};\n    border: 0;\n    border-radius: 4px;\n    color: inherit;\n    display: flex;\n    font-size: 12px;\n    height: 40px;\n    margin-top: 8px;\n    padding: 0 10px;\n    width: 100%;\n`;\nconst ValidationError = styled.div.withConfig({ displayName: \"ValidationError\", componentId: \"sc-1q0zs13\" }) `\n    align-items: center;\n    color: ${COLORS.error};\n    display: flex;\n    font-size: 12px;\n    line-height: 1.5em;\n    margin-top: 8px;\n    min-height: 40px;\n    padding: 11px 0;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-542778\" }) `\n    flex-shrink: 0;\n    height: 16px;\n    width: 16px;\n\n    > svg {\n        display: block;\n        height: 100%;\n        width: 100%;\n    }\n\n    &:empty {\n        background: currentColor;\n        border-radius: 50%;\n    }\n`;\nconst Toggle = styled.button.withConfig({ displayName: \"Toggle\", componentId: \"sc-zyjjvm\" }) `\n    align-items: center;\n    appearance: none;\n    background-color: #ffffff;\n    box-shadow: 0 0 1px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);\n    display: flex;\n    border: 0;\n    border-radius: 4px;\n    height: 32px;\n    max-width: 100%;\n    min-width: 32px;\n    padding: 0 8px;\n    transition: 0.5s background-color;\n\n    &:hover {\n        background-color: ${COLORS.secondaryLight};\n        transition-duration: 0.1s;\n    }\n\n    a& {\n        color: inherit !important;\n    }\n\n    ${({ $dark: dark = false }) => dark &&\n    css `\n            box-shadow: none;\n            background-color: #1c1c1c;\n\n            &:hover {\n                background-color: #1c1c1c;\n            }\n\n            ${IconWrap} {\n                color: ${COLORS.Text};\n            }\n        `}\n\n    ${({ $active = false }) => $active &&\n    css `\n            background-color: ${COLORS.secondaryLight};\n        `}\n`;\nconst Value = styled.div.withConfig({ displayName: \"Value\", componentId: \"sc-1x2cc3s\" }) `\n    color: ${({ $unset = false }) => ($unset ? '#a3a3a3' : void 0)};\n    font-size: 14px;\n    line-height: normal;\n    margin-left: 6px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const PropertyDropdownList = styled.ul.withConfig({ displayName: \"PropertyDropdownList\", componentId: \"sc-ag8ugh\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: repeat(\n        ${({ children }) => React.Children.toArray(children).filter(Boolean).length},\n        auto\n    );\n    justify-content: start;\n    list-style: none;\n    margin: 0;\n    padding: 0;\n\n    > li {\n        min-width: 0;\n    }\n`;\nexport function PropertyDisplay(props) {\n    const { icon = React.createElement(React.Fragment, null), href = '#', displayValue, dark = false } = props;\n    const toggleProps = /^mailto:/.test(href)\n        ? {}\n        : {\n            rel: 'noopener noreferrer',\n            target: '_blank',\n        };\n    return (React.createElement(Toggle, { ...toggleProps, as: \"a\", href: href, onClick: (e) => {\n            if (href === '#') {\n                e.preventDefault();\n            }\n        }, \"$dark\": dark },\n        React.createElement(IconWrap, null, icon),\n        displayValue && React.createElement(Value, null, displayValue)));\n}\nexport const PropertyIcon = styled(SvgIcon).withConfig({ displayName: \"PropertyIcon\", componentId: \"sc-15ahgot\" }) `\n    color: ${({ $color = 'currentColor' }) => $color};\n    transition: 350ms color;\n`;\n","import get from 'lodash/get';\nconst getError = (res) => ({\n    message: get(res, 'response.data.error') ||\n        get(res, 'response.data.message') ||\n        (res && res.message) ||\n        'Something went wrong',\n    code: get(res, 'response.data.code') || null,\n    statusCode: res && res.response && res.response.status,\n    response: res.response,\n});\nexport default class RequestError extends Error {\n    constructor(res, ...args) {\n        const { message, code, statusCode, response } = getError(res);\n        super(message, ...args);\n        this.code = undefined;\n        this.statusCode = undefined;\n        this.response = undefined;\n        this.code = code;\n        this.statusCode = statusCode;\n        this.response = response;\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, RequestError);\n        }\n        Object.setPrototypeOf(this, RequestError.prototype);\n    }\n}\n","import axios from 'axios';\nimport merge from 'lodash/merge';\nimport RequestError from '~/shared/errors/RequestError';\nexport default async function request({ url, options, method = 'get', data = null, }) {\n    const defaultOptions = {\n        headers: {},\n    };\n    if (data !== null) {\n        defaultOptions.headers = {\n            ...defaultOptions.headers,\n            'Content-Type': 'application/json',\n        };\n    }\n    const requestOptions = merge(defaultOptions, options);\n    try {\n        return (await axios.request({ ...requestOptions, url, method, data })).data;\n    }\n    catch (e) {\n        throw new RequestError(e);\n    }\n}\n","import { getChainConfigExtension } from '~/utils/chains';\nimport { post } from '~/shared/utils/api';\nexport async function postImage(chainId, image) {\n    const { projectId: username, apiSecretKey: password, ipfsUploadEndpoint: url, } = getChainConfigExtension(chainId).ipfs;\n    const data = new FormData();\n    data.append('file', image, image.name);\n    const uploadResult = await post({\n        url,\n        options: {\n            headers: {\n                'Content-Type': 'multipart/form-data',\n            },\n            auth: {\n                username,\n                password,\n            },\n        },\n        data,\n    });\n    return uploadResult?.Hash || '';\n}\n","import request from '~/shared/utils/request';\nexport const post = (args) => request({ ...args, method: 'post' });\n","import { isError, } from 'ethers';\nimport { getWalletWeb3Provider } from '~/shared/stores/wallet';\nexport async function call(contract, method, params) {\n    const { args, onReceipt, replaceable = true } = params;\n    const provider = await getWalletWeb3Provider();\n    const blockNumber = await provider.getBlockNumber();\n    let tx = await contract[method](...args);\n    if (replaceable) {\n        tx = tx.replaceableTransaction(blockNumber);\n    }\n    for (;;) {\n        try {\n            const receipt = await tx.wait();\n            if (receipt) {\n                await onReceipt?.(receipt);\n            }\n            break;\n        }\n        catch (e) {\n            if (!isError(e, 'TRANSACTION_REPLACED') || e.cancelled) {\n                throw e;\n            }\n            tx = e.replacement;\n        }\n    }\n}\n","import { Contract, parseEther } from 'ethers';\nimport { postImage } from '~/services/images';\nimport { getSigner } from '~/shared/stores/wallet';\nimport { toBN } from '~/utils/bn';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getPublicProvider } from '~/utils/providers';\nimport { toastedOperation, toastedOperations } from '~/utils/toastedOperation';\nimport { call } from '~/utils/tx';\nexport async function createOperator(chainId, params, { onReceipt } = {}) {\n    const { cut, name, redundancyFactor, description, imageToUpload, url, email, twitter, x, telegram, reddit, linkedIn, } = params;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const walletAddress = await signer.getAddress();\n    const imageIpfsCid = imageToUpload\n        ? await postImage(chainId, imageToUpload)\n        : undefined;\n    const factory = new Contract(getContractAddress('operatorFactory', chainId), getContractAbi('operatorFactory'), signer);\n    const metadata = {\n        name,\n        description,\n        redundancyFactor,\n        imageIpfsCid,\n        url: url || undefined,\n        email: email || undefined,\n        twitter: twitter || undefined,\n        x: x || undefined,\n        telegram: telegram || undefined,\n        reddit: reddit || undefined,\n        linkedIn: linkedIn || undefined,\n    };\n    const poolTokenName = `StreamrOperator-${walletAddress.slice(-5)}`;\n    const operatorMetadata = JSON.stringify(metadata);\n    const policies = [\n        getContractAddress('operatorDefaultDelegationPolicy', chainId),\n        getContractAddress('operatorDefaultExchangeRatePolicy', chainId),\n        getContractAddress('operatorDefaultUndelegationPolicy', chainId),\n    ];\n    const operatorsCutFraction = parseEther(cut.toString()) / 100n;\n    const policyParams = [0, 0, 0];\n    await toastedOperation('Operator deployment', async () => {\n        await call(factory, 'deployOperator', {\n            args: [\n                operatorsCutFraction,\n                poolTokenName,\n                operatorMetadata,\n                policies,\n                policyParams,\n            ],\n            onReceipt,\n        });\n    });\n}\nexport async function updateOperator(chainId, operator, mods, { onReceipt } = {}) {\n    const { name, redundancyFactor, description = '', imageToUpload, cut, url, email, twitter, x, telegram, reddit, linkedIn, } = mods;\n    const { metadata } = operator;\n    const operations = [];\n    const hasUpdateCutOperation = !operator.stakes.length && operator.operatorsCut !== cut;\n    const hasUpdateMetadataOperation = !!imageToUpload ||\n        name !== metadata.name ||\n        description !== metadata.description ||\n        redundancyFactor !== metadata.redundancyFactor ||\n        url !== metadata.url ||\n        email !== metadata.email ||\n        twitter !== metadata.twitter ||\n        x !== metadata.x ||\n        telegram !== metadata.telegram ||\n        reddit !== metadata.reddit ||\n        linkedIn !== metadata.linkedIn;\n    if (hasUpdateCutOperation) {\n        operations.push({\n            id: 'updateCutOperation',\n            label: \"Update the owner's cut value\",\n        });\n    }\n    if (hasUpdateMetadataOperation) {\n        operations.push({\n            id: 'updateMetadataOperation',\n            label: \"Update the operator's metadata\",\n        });\n    }\n    if (!operations.length) {\n        return;\n    }\n    const blockNumbers = [];\n    await toastedOperations(operations, async (next) => {\n        if (hasUpdateCutOperation) {\n            await networkPreflight(chainId);\n            const operatorContract = new Contract(operator.id, getContractAbi('operator'), await getSigner());\n            await call(operatorContract, 'updateOperatorsCutFraction', {\n                args: [parseEther(toBN(cut).toString()) / 100n],\n                onReceipt: async (receipt) => {\n                    blockNumbers.push(receipt.blockNumber);\n                    if (!hasUpdateMetadataOperation) {\n                        await onReceipt?.(receipt);\n                    }\n                },\n            });\n            next();\n        }\n        if (hasUpdateMetadataOperation) {\n            await networkPreflight(chainId);\n            const operatorContract = new Contract(operator.id, getContractAbi('operator'), await getSigner());\n            const imageIpfsCid = imageToUpload\n                ? await postImage(chainId, imageToUpload)\n                : operator.metadata.imageIpfsCid;\n            await call(operatorContract, 'updateMetadata', {\n                args: [\n                    JSON.stringify({\n                        name: name || undefined,\n                        description: description || undefined,\n                        redundancyFactor,\n                        imageIpfsCid,\n                        url: url || undefined,\n                        email: email || undefined,\n                        twitter: twitter || undefined,\n                        x: x || undefined,\n                        telegram: telegram || undefined,\n                        reddit: reddit || undefined,\n                        linkedIn: linkedIn || undefined,\n                    }),\n                ],\n                onReceipt: async (receipt) => {\n                    blockNumbers.push(receipt.blockNumber);\n                    await onReceipt?.(receipt);\n                },\n            });\n        }\n    });\n}\nexport async function delegateToOperator(chainId, operatorId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(getContractAddress('data', chainId), getContractAbi('erc677'), signer);\n    await toastedOperation('Delegate to operator', async () => {\n        await call(contract, 'transferAndCall', {\n            args: [operatorId, amount, '0x'],\n            onReceipt,\n        });\n    });\n}\nexport async function undelegateFromOperator(chainId, operatorId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Undelegate from operator', async () => {\n        await call(operatorContract, 'undelegate', {\n            args: [amount],\n            onReceipt,\n        });\n    });\n}\nexport async function getOperatorDelegationAmount(chainId, operatorId, address) {\n    const provider = await getPublicProvider(chainId);\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), provider);\n    return operatorContract.balanceInData(address);\n}\nexport async function setOperatorNodeAddresses(chainId, operatorId, addresses, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Save node addresses', async () => {\n        await call(operatorContract, 'setNodeAddresses', {\n            args: [addresses],\n            onReceipt,\n        });\n    });\n}\nexport async function addOperatorControllerAddress(chainId, operatorId, address, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Authorise staking agent', async () => {\n        await call(operatorContract, 'grantRole', {\n            args: [await operatorContract.CONTROLLER_ROLE(), address],\n            onReceipt,\n        });\n    });\n}\nexport async function removeOperatorControllerAddress(chainId, operatorId, address, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Revoke staking agent', async () => {\n        await call(operatorContract, 'revokeRole', {\n            args: [await operatorContract.CONTROLLER_ROLE(), address],\n            onReceipt,\n        });\n    });\n}\nexport async function processOperatorUndelegationQueue(chainId, operatorId, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const operatorContract = new Contract(operatorId, getContractAbi('operator'), signer);\n    await toastedOperation('Process undelegation queue', async () => {\n        await call(operatorContract, 'payOutQueue', {\n            args: [0],\n            onReceipt,\n        });\n    });\n}\n","import React from 'react';\nimport styled from 'styled-components';\nconst UnstyledLogo = ({ color = '#ff5c00', opacity = '1', ...props }) => (React.createElement(\"svg\", { ...props, xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 40 40\" },\n    React.createElement(\"path\", { fill: color, fillRule: \"evenodd\", fillOpacity: opacity, d: 'M25.0093 1.8487V.6955c0-.3953-.3296-.7135-.7246-.6947-7.7532.3682-13.96' +\n            '65 6.6158-14.279 14.3823.0166.4868.4106.6142.6423.6142h1.1714c.3707 0 .' +\n            '6745-.291.6938-.661.3327-6.3895 5.4596-11.5101 11.8521-11.8341.4876-.06' +\n            '26.644-.329.644-.6535m-10.544 13.1486h1.121c.364 0 .6607-.2836.6872-.64' +\n            '65.3168-4.341 3.798-7.8035 8.1473-8.092.1945-.013.5885-.1585.5885-.6625' +\n            'V4.455c0-.4033-.342-.72-.7446-.6937-5.6266.367-10.126 4.8659-10.4932 10' +\n            '.4917-.0262.4023.2905.7443.6939.7443m10.5439-6.7767v1.1466c0 .4691-.407' +\n            '3.6379-.606.6619-2.2755.2745-4.0807 2.0756-4.3614 4.3489-.0434.352-.336' +\n            '3.6193-.691.6193h-1.1194c-.4082 0-.7332-.3504-.6925-.7566.3545-3.5418 3' +\n            '.1713-6.3581 6.7136-6.7126.4062-.0406.7567.2844.7567.6925zM38.151 24.97' +\n            '38c-.3244 0-.5909-.1564-.6535-.6438-.3241-6.3917-5.4455-11.5178-11.8358' +\n            '-11.8505-.3702-.0192-.6612-.323-.6612-.6937v-1.1713c0-.2316.1274-.6255.' +\n            '6142-.6422 7.7678.3126 14.0161 6.525 14.3845 14.277.0188.395-.2995.7245' +\n            '-.6948.7245H38.151zM25.0005 14.4314c0-.4033.342-.72.7445-.6937 5.6266.3' +\n            '671 10.126 4.8659 10.4932 10.4917.0263.4024-.2905.7444-.6939.7444h-1.14' +\n            '15c-.504 0-.6496-.3939-.6625-.5884-.2885-4.3487-3.7516-7.8294-8.0932-8.' +\n            '1461-.363-.0265-.6466-.3232-.6466-.687v-1.1209zm6.7777 10.5424h-1.1468c' +\n            '-.4692 0-.638-.4073-.662-.6059-.2745-2.2751-2.076-4.0802-4.3495-4.3607-' +\n            '.352-.0435-.6194-.3363-.6194-.6909V18.197c0-.4081.3505-.733.7567-.6925 ' +\n            '3.5423.3545 6.359 3.1709 6.7135 6.7127.0407.4061-.2843.7566-.6925.7566z' +\n            'M1.849 14.9943c.3244 0 .5909.1564.6535.6439.3241 6.3916 5.4455 11.5178 ' +\n            '11.8358 11.8504.3702.0193.6612.3231.6612.6937v1.1713c0 .2317-.1274.6256' +\n            '-.6142.6422C6.6176 29.6833.3692 23.4709.0008 15.7188c-.0188-.395.2994-.' +\n            '7245.6949-.7245H1.849zm13.1505 10.5424c0 .4033-.342.72-.7445.6938-5.626' +\n            '6-.3673-10.126-4.866-10.4932-10.4917-.0263-.4025.2905-.7445.6939-.7445h' +\n            '1.1415c.504 0 .6496.394.6625.5884.2885 4.3487 3.7516 7.8294 8.0932 8.14' +\n            '62.363.0264.6466.3231.6466.687v1.1208zM8.2218 14.9943h1.1468c.4692 0 .6' +\n            '38.4073.662.606.2746 2.275 2.076 4.08 4.3495 4.3607.352.0434.6194.3362.' +\n            '6194.6908v1.1193c0 .4081-.3505.733-.7567.6925-3.5423-.3546-6.359-3.1709' +\n            '-6.7136-6.7127-.0406-.4061.2844-.7566.6926-.7566zm6.7805 23.157c0-.3244' +\n            '.1564-.5909.644-.6535 6.3926-.324 11.5194-5.4446 11.852-11.834.0194-.37' +\n            '02.3232-.6612.6939-.6612h1.1714c.2317 0 .6256.1275.6423.6142-.3125 7.76' +\n            '66-6.5258 14.014-14.279 14.3824-.395.0188-.7246-.2994-.7246-.6948v-1.15' +\n            '31zm10.5439-13.1487c.4033 0 .7201.342.6938.7444-.3671 5.6258-4.8666 10.' +\n            '1246-10.4932 10.4917-.4025.0263-.7445-.2904-.7445-.6937v-1.1414c0-.504.' +\n            '394-.6495.5885-.6624 4.3493-.2885 7.8305-3.751 8.1473-8.092.0265-.363.3' +\n            '232-.6466.6871-.6466h1.121zm-10.544 6.7768v-1.1466c0-.4692.4075-.6379.6' +\n            '06-.6619 2.2756-.2745 4.0809-2.0757 4.3614-4.349.0435-.3518.3364-.6193.' +\n            '691-.6193H21.78c.4082 0 .7332.3505.6926.7566-.3545 3.5419-3.1712 6.3582' +\n            '-6.7136 6.7126-.4062.0407-.7567-.2843-.7567-.6924z' })));\nconst Logo = styled(UnstyledLogo).withConfig({ displayName: \"Logo\", componentId: \"sc-1jx3dcr\" }) `\n    height: 2.5em;\n    width: 2.5em;\n`;\nexport default Logo;\n","import React from 'react';\nimport { Img as ReactImg } from 'react-image';\nimport styled from 'styled-components';\nimport Logo from '~/shared/components/Logo';\nconst DefaultImagePlaceholder = ({ alt, className }) => (React.createElement(DefaultImagePlaceholderRoot, { className: className },\n    React.createElement(Logo, { color: \"black\", opacity: \"0.15\" }),\n    React.createElement(\"img\", { src: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAA\\n                AA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=\", alt: alt })));\nexport function FallbackImage({ src, alt, className, placeholder }) {\n    return (React.createElement(ReactImg, { className: className, src: src, alt: alt, unloader: placeholder || React.createElement(DefaultImagePlaceholder, { alt: alt, className: className }) }));\n}\nconst DefaultImagePlaceholderRoot = styled.div.withConfig({ displayName: \"DefaultImagePlaceholderRoot\", componentId: \"sc-7dckr0\" }) `\n    position: relative;\n    background-image: linear-gradient(135deg, #0045ff 0%, #7200ee 100%);\n    border-radius: 2px;\n    transition: 50ms ease-in-out transform;\n\n    img {\n        width: 100%;\n        height: 100%;\n        background-color: transparent;\n    }\n\n    svg {\n        position: absolute;\n        width: 80px;\n        height: 80px;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nconst Value = styled.div.withConfig({ displayName: \"Value\", componentId: \"sc-td3lin\" }) `\n    position: absolute;\n    text-align: center;\n    transform: translateY(-50%);\n    top: 50%;\n    width: 100%;\n`;\nconst UnstyledInitials = ({ children, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(\"svg\", { viewBox: \"0 0 1 1\", xmlns: \"http://www.w3.org/2000/svg\" }),\n    React.createElement(Value, null, children)));\nconst Initials = styled(UnstyledInitials).withConfig({ displayName: \"Initials\", componentId: \"sc-1n9a3ew\" }) `\n    background-color: #97bac0;\n    color: #ffffff;\n    font-family: var(--mono);\n    position: relative;\n`;\nexport default Initials;\n","import React from 'react';\nimport ReactIdenticon from 'react-identicons';\nimport styled from 'styled-components';\nconst UnstyledIdenticon = ({ id, size, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(\"svg\", { viewBox: \"0 0 1 1\", xmlns: \"http://www.w3.org/2000/svg\" }),\n    React.createElement(ReactIdenticon, { string: id, size: size })));\nconst Identicon = styled(UnstyledIdenticon).withConfig({ displayName: \"Identicon\", componentId: \"sc-s6t0fk\" }) `\n    position: relative;\n\n    .identicon {\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 50% !important;\n        height: 50% !important;\n    }\n`;\nIdenticon.defaultProps = {\n    size: 80,\n};\nexport default Identicon;\n","import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { FallbackImage as UnstyledFallbackImage } from '~/components/FallbackImage';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Initials from './Initials';\nimport Identicon from './Identicon';\nconst FallbackImage = styled(UnstyledFallbackImage).withConfig({ displayName: \"FallbackImage\", componentId: \"sc-1vsw38k\" }) `\n    display: block;\n    height: 100%;\n    width: 100%;\n`;\nconst UnstyledAvatarImage = ({ username, name, src, upload = false, ...props }) => {\n    const placeholder = useMemo(() => {\n        if (isAddress(username)) {\n            return React.createElement(Identicon, { id: username });\n        }\n        if (name) {\n            const initials = (name || '')\n                .split(/\\s+/)\n                .filter(Boolean)\n                .map((s) => s[0])\n                .slice(0, 2)\n                .join('')\n                .toUpperCase();\n            if (initials) {\n                return React.createElement(Initials, null, initials);\n            }\n        }\n        return React.createElement(SvgIcon, { name: upload ? 'emptyAvatarUpload' : 'profileMan' });\n    }, [username, name, upload]);\n    return (React.createElement(\"div\", { ...props },\n        React.createElement(FallbackImage, { alt: name || '', src: src || '', placeholder: placeholder })));\n};\nconst AvatarImage = styled(UnstyledAvatarImage).withConfig({ displayName: \"AvatarImage\", componentId: \"sc-t4cqwz\" }) ``;\nexport default AvatarImage;\nexport const HubAvatar = styled(Identicon).withConfig({ displayName: \"HubAvatar\", componentId: \"sc-1shr3mk\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n`;\nexport const HubImageAvatar = styled(UnstyledFallbackImage).withConfig({ displayName: \"HubImageAvatar\", componentId: \"sc-wbzfnl\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n`;\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { randomHex } from 'web3-utils';\nimport { z } from 'zod';\nimport { Alert } from '~/components/Alert';\nimport { Button } from '~/components/Button';\nimport CropImageModal from '~/components/CropImageModal/CropImageModal';\nimport { Hint } from '~/components/Hint';\nimport { PropertyDropdown, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { BehindIndexError } from '~/errors/BehindIndexError';\nimport { getParsedOperatorByOwnerAddress } from '~/getters';\nimport FormModal, { ErrorLabel, FieldWrap, Section, SectionHeadline, TextAppendix, TextInput, TextareaCounter, TextareaInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { createOperator, updateOperator } from '~/services/operators';\nimport AvatarImage from '~/shared/components/AvatarImage';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { sleep, waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nconst cropModal = toaster(CropImageModal, Layer.Modal);\nconst DescriptionLengthLimit = 120;\nconst Validator = z.object({\n    cut: z.coerce\n        .number()\n        .min(0, 'Value must be between 0 and 100')\n        .max(100, 'Value must be between 0 and 100'),\n    description: z.string().max(DescriptionLengthLimit, 'Description is too long'),\n    imageToUpload: z.instanceof(File).optional(),\n    name: z.string().trim().min(1, 'Name is required'),\n    redundancyFactor: z.coerce.number().min(1, 'Value must be greater or equal to 1'),\n    url: z.union([z.literal(''), z.string().url()]),\n    email: z.union([z.literal(''), z.string().email()]),\n    twitter: z.union([z.literal(''), z.string().url()]),\n    x: z.union([z.literal(''), z.string().url()]),\n    telegram: z.union([z.literal(''), z.string().url()]),\n    reddit: z.union([z.literal(''), z.string().url()]),\n    linkedIn: z.union([z.literal(''), z.string().url()]),\n});\nfunction OperatorModal({ onResolve, onReject, operator, chainId, ...props }) {\n    const [title, submitLabel] = operator\n        ? ['Edit Operator', 'Save']\n        : ['Become an Operator', 'Become an Operator'];\n    const [busy, setBusy] = useState(false);\n    const currentData = useMemo(() => ({\n        cut: operator?.operatorsCut.toString() || '',\n        description: operator?.metadata.description || '',\n        imageToUpload: undefined,\n        name: operator?.metadata.name || '',\n        redundancyFactor: operator?.metadata.redundancyFactor?.toString() || '2',\n        url: operator?.metadata.url || '',\n        email: operator?.metadata.email || '',\n        twitter: operator?.metadata.twitter || '',\n        x: operator?.metadata.x || '',\n        telegram: operator?.metadata.telegram || '',\n        reddit: operator?.metadata.reddit || '',\n        linkedIn: operator?.metadata.linkedIn || '',\n    }), [operator]);\n    const [nextData, updateNextData] = useState(currentData);\n    useEffect(() => {\n        /**\n         * Handle an update coming from the outside. It won't happen often\n         * but it can happen.\n         */\n        updateNextData(currentData);\n    }, [currentData]);\n    const changelog = {\n        imageToUpload: !!nextData.imageToUpload,\n        name: currentData.name !== nextData.name,\n        description: currentData.description !== nextData.description,\n        redundancyFactor: Number(currentData.redundancyFactor) !== Number(nextData.redundancyFactor),\n        cut: Number(currentData.cut) !== Number(nextData.cut),\n        url: currentData.url !== nextData.url,\n        email: currentData.email !== nextData.email,\n        twitter: currentData.twitter !== nextData.twitter,\n        x: currentData.x !== nextData.x,\n        telegram: currentData.telegram !== nextData.telegram,\n        reddit: currentData.reddit !== nextData.reddit,\n        linkedIn: currentData.linkedIn !== nextData.linkedIn,\n    };\n    const dirty = Object.values(changelog).some(Boolean);\n    const randomAddress = useMemo(() => randomHex(20), []);\n    const fileInputRef = useRef(null);\n    const imageBlob = (nextData.imageToUpload && URL.createObjectURL(nextData.imageToUpload)) ||\n        operator?.metadata.imageUrl;\n    const [errors, setErrors] = useState({});\n    function resetError(key) {\n        setErrors(({ [key]: _, ...c }) => c);\n    }\n    function validate(fn) {\n        try {\n            fn();\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                const newErrors = {};\n                e.issues.forEach(({ path, message }) => {\n                    newErrors[path.join('.')] = message;\n                });\n                setErrors((existingErrors) => ({\n                    ...existingErrors,\n                    ...newErrors,\n                }));\n            }\n            throw e;\n        }\n    }\n    const finalData = useMemo(() => {\n        try {\n            return Validator.parse(nextData);\n        }\n        catch (_) {\n            return null;\n        }\n    }, [nextData]);\n    const walletAddress = useWalletAccount();\n    const canSubmit = !busy && !!finalData && dirty && !!walletAddress;\n    const readonlyCut = !!operator && operator.stakes.length > 0;\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit, submitLabel: submitLabel, submitting: busy, onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || !dirty), onReject: onReject, onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                let blockNumber = 0;\n                if (!operator) {\n                    await createOperator(chainId, finalData, {\n                        onReceipt: ({ blockNumber: blockNo }) => {\n                            blockNumber = blockNo;\n                            return waitForIndexedBlock(chainId, blockNo);\n                        },\n                    });\n                }\n                else {\n                    await updateOperator(chainId, operator, finalData, {\n                        onReceipt: ({ blockNumber: blockNo }) => {\n                            blockNumber = blockNo;\n                            return waitForIndexedBlock(chainId, blockNo);\n                        },\n                    });\n                }\n                let operatorId = operator?.id;\n                if (!operatorId) {\n                    /**\n                     * The following loop ensures that each thrown instance of `BehindIndexError`\n                     * causes a proper retry.\n                     */\n                    for (;;) {\n                        try {\n                            /**\n                             * If the following request hits the indexer too early, i.e. before block\n                             * at `blockNumber` got ingested, it'll give us nothing (it does not know\n                             * about the operator). The above loop helps maneuver through such edge case.\n                             */\n                            operatorId = (await getParsedOperatorByOwnerAddress(chainId, walletAddress, {\n                                force: true,\n                                minBlockNumber: blockNumber,\n                            }))?.id;\n                        }\n                        catch (e) {\n                            if (!(e instanceof BehindIndexError)) {\n                                throw e;\n                            }\n                            /**\n                             * If we're behind on the indexed blocks with the operator id request\n                             * we have to retry until we're good to move forward. Let's wait 5s\n                             * and retry.\n                             */\n                            await sleep(5000);\n                            continue;\n                        }\n                        /**\n                         * After all the trying the operator id can still be nullish. In such case we don't\n                         * wanna continue. It is, after all, unexpected behaviour, especially for newly\n                         * created operator.\n                         */\n                        if (!operatorId) {\n                            throw new Error('Empty operator id');\n                        }\n                        break;\n                    }\n                }\n                onResolve?.({ operatorId, blockNumber });\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please choose the percentage for the Owner's cut\",\n            ' ',\n            React.createElement(Hint, null,\n                React.createElement(\"p\", null, \"The Owner's cut percentage is the earnings split between the Operator and its Delegators. This value can be updated as long as the Operator is not staked on any\\u00A0Sponsorships.\"))),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Owner's cut percentage*\"),\n                errors?.cut && React.createElement(ErrorLabel, null, errors.cut)),\n            React.createElement(FieldWrap, { \"$invalid\": !!errors?.cut, \"$grayedOut\": readonlyCut },\n                React.createElement(TextInput, { name: \"cut\", autoFocus: !readonlyCut, onChange: ({ target: { value: cut } }) => {\n                        updateNextData((c) => ({\n                            ...c,\n                            cut,\n                        }));\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, max: 100, value: nextData.cut, disabled: readonlyCut }),\n                React.createElement(TextAppendix, null, \"%\"))),\n        readonlyCut && (React.createElement(AlertContainer, null,\n            React.createElement(Alert, { type: \"notice\", title: \"Owner's cut locked\" },\n                React.createElement(\"span\", null, \"The owner's cut can't be modified while staked. To change it, fully unstake from all sponsorships.\")))),\n        React.createElement(SectionHeadline, null,\n            \"Please input your node redundancy factor\",\n            ' ',\n            React.createElement(Hint, null,\n                React.createElement(\"p\", null, \"Sets the amount of duplicated work when running a fleet of multiple nodes. Doing redundant work protects against slashing in case some of your nodes experience failures. For example, setting this to 1 means that no duplication of work occurs (the feature is off), and setting it to 2 means that each stream assignment will be worked on by 2 nodes in your fleet.\"))),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Node redundancy factor*\"),\n                errors?.redundancyFactor && (React.createElement(ErrorLabel, null, errors.redundancyFactor))),\n            React.createElement(FieldWrap, { \"$invalid\": !!errors?.redundancyFactor },\n                React.createElement(TextInput, { name: \"redundancyFactor\", onChange: ({ target: { value: redundancyFactor } }) => {\n                        updateNextData((c) => ({\n                            ...c,\n                            redundancyFactor,\n                        }));\n                    }, placeholder: \"2\", readOnly: busy, type: \"number\", min: 1, max: 100, step: 1, value: nextData.redundancyFactor }))),\n        React.createElement(AboutOperator, null,\n            React.createElement(SectionHeadline, null, \"About Operator\"),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Display name*\"),\n                    errors?.name && React.createElement(ErrorLabel, null, errors.name)),\n                React.createElement(FieldWrap, { \"$invalid\": !!errors?.name },\n                    React.createElement(TextInput, { name: \"name\", onChange: ({ target: { value: name } }) => {\n                            updateNextData((c) => ({\n                                ...c,\n                                name,\n                            }));\n                        }, readOnly: busy, type: \"text\", value: nextData.name, placeholder: \"Name\" })),\n                React.createElement(AboutOperatorField, null,\n                    React.createElement(WingedLabelWrap, null,\n                        React.createElement(Label, { \"$wrap\": true }, \"Description\"),\n                        errors?.description && (React.createElement(ErrorLabel, null, \"Description is too long\"))),\n                    React.createElement(FieldWrap, { \"$invalid\": !!errors?.description },\n                        React.createElement(TextareaInput, { name: \"description\", onChange: ({ target: { value: description } }) => {\n                                updateNextData((c) => ({\n                                    ...c,\n                                    description,\n                                }));\n                            }, readOnly: busy, value: nextData.description, placeholder: \"Description\", \"$minHeight\": 110 }),\n                        React.createElement(TextareaCounter, { \"$invalid\": !!errors?.description },\n                            nextData.description.length,\n                            \"/\",\n                            DescriptionLengthLimit)),\n                    React.createElement(PropertyDropdownList, null,\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.url, onChange: () => {\n                                    resetError('url');\n                                }, onDismiss: () => {\n                                    resetError('url');\n                                }, onSubmit: (url) => {\n                                    resetError('url');\n                                    validate(() => {\n                                        Validator.pick({\n                                            url: true,\n                                        }).parse({ url });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        url,\n                                    }));\n                                }, placeholder: \"https://siteinfo.com\", submitLabel: \"Add site URL\", title: \"Add a site URL\", toggleIcon: React.createElement(PropertyIcon, { name: \"web\" }), value: nextData.url, valuePlaceholder: \"Site URL\" })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.email, onChange: () => {\n                                    resetError('email');\n                                }, onDismiss: () => {\n                                    resetError('email');\n                                }, onSubmit: (email) => {\n                                    resetError('email');\n                                    validate(() => {\n                                        Validator.pick({\n                                            email: true,\n                                        }).parse({ email });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        email,\n                                    }));\n                                }, placeholder: \"owner@example.com\", submitLabel: \"Add contact email\", title: \"Add a contact email\", toggleIcon: React.createElement(PropertyIcon, { name: \"email\" }), value: nextData.email, valuePlaceholder: \"Contact email\" })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.twitter, onChange: () => {\n                                    resetError('twitter');\n                                }, onDismiss: () => {\n                                    resetError('twitter');\n                                }, onSubmit: (twitter) => {\n                                    resetError('twitter');\n                                    validate(() => {\n                                        Validator.pick({\n                                            twitter: true,\n                                        }).parse({ twitter });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        twitter,\n                                    }));\n                                }, submitLabel: \"Add Twitter link\", title: \"Add Twitter link\", toggleIcon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": nextData.twitter ? '#1da1f2' : undefined }), value: nextData.twitter })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.x, onChange: () => {\n                                    resetError('x');\n                                }, onDismiss: () => {\n                                    resetError('x');\n                                }, onSubmit: (x) => {\n                                    resetError('x');\n                                    validate(() => {\n                                        Validator.pick({\n                                            x: true,\n                                        }).parse({ x });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        x,\n                                    }));\n                                }, submitLabel: \"Add X link\", title: \"Add X link\", toggleIcon: React.createElement(PropertyIcon, { name: \"xCom\" }), value: nextData.x })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.telegram, onChange: () => {\n                                    resetError('telegram');\n                                }, onDismiss: () => {\n                                    resetError('telegram');\n                                }, onSubmit: (telegram) => {\n                                    resetError('telegram');\n                                    validate(() => {\n                                        Validator.pick({\n                                            telegram: true,\n                                        }).parse({ telegram });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        telegram,\n                                    }));\n                                }, submitLabel: \"Add Telegram link\", title: \"Add Telegram link\", toggleIcon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": nextData.telegram ? '#2aabee' : undefined }), value: nextData.telegram })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.reddit, onChange: () => {\n                                    resetError('reddit');\n                                }, onDismiss: () => {\n                                    resetError('reddit');\n                                }, onSubmit: (reddit) => {\n                                    resetError('reddit');\n                                    validate(() => {\n                                        Validator.pick({\n                                            reddit: true,\n                                        }).parse({ reddit });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        reddit,\n                                    }));\n                                }, submitLabel: \"Add Reddit link\", title: \"Add Reddit link\", toggleIcon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": nextData.reddit ? '#ff5700' : undefined }), value: nextData.reddit })),\n                        React.createElement(\"li\", null,\n                            React.createElement(PropertyDropdown, { error: errors?.linkedIn, onChange: () => {\n                                    resetError('linkedIn');\n                                }, onDismiss: () => {\n                                    resetError('linkedIn');\n                                }, onSubmit: (linkedIn) => {\n                                    resetError('linkedIn');\n                                    validate(() => {\n                                        Validator.pick({\n                                            linkedIn: true,\n                                        }).parse({ linkedIn });\n                                    });\n                                    updateNextData((c) => ({\n                                        ...c,\n                                        linkedIn,\n                                    }));\n                                }, submitLabel: \"Add LinkedIn link\", title: \"Add LinkedIn link\", toggleIcon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": nextData.linkedIn ? '#0077b5' : undefined }), value: nextData.linkedIn })))),\n                React.createElement(AboutOperatorField, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Operator Avatar\"),\n                    React.createElement(FieldWrap, null,\n                        React.createElement(AvatarField, null,\n                            React.createElement(AvatarDisplayContainer, null, imageBlob ? (React.createElement(OperatorAvatar, { src: imageBlob })) : (React.createElement(AvatarPlaceholder, { username: randomAddress }))),\n                            React.createElement(\"div\", null,\n                                React.createElement(\"input\", { ref: fileInputRef, type: \"file\", accept: \".jpg,.jpeg,.png\", style: { display: 'none' }, onChange: (e) => {\n                                        void (async () => {\n                                            if (!e.target.files?.length) {\n                                                return;\n                                            }\n                                            try {\n                                                const imageToUpload = await cropModal.pop({\n                                                    imageUrl: URL.createObjectURL(e.target.files[0]),\n                                                    mask: 'round',\n                                                });\n                                                updateNextData((c) => ({\n                                                    ...c,\n                                                    imageToUpload,\n                                                }));\n                                            }\n                                            catch (e) {\n                                                if (isRejectionReason(e)) {\n                                                    return;\n                                                }\n                                                throw e;\n                                            }\n                                        })();\n                                    } }),\n                                React.createElement(Button, { kind: \"secondary\", size: \"normal\", type: \"button\", onClick: () => {\n                                        fileInputRef.current?.click();\n                                    } },\n                                    React.createElement(ButtonIcon, { name: \"plus\" }),\n                                    \"Upload Avatar\"),\n                                React.createElement(AvatarRequirements, null,\n                                    React.createElement(\"li\", null, \"JPEG or PNG format only\"))))))))));\n}\nexport const operatorModal = toaster(OperatorModal, Layer.Modal);\nconst AboutOperator = styled.div.withConfig({ displayName: \"AboutOperator\", componentId: \"sc-1ed0piv\" }) `\n    margin-top: 40px;\n`;\nconst AboutOperatorField = styled.div.withConfig({ displayName: \"AboutOperatorField\", componentId: \"sc-omguw7\" }) `\n    margin-top: 16px;\n\n    ${PropertyDropdownList} {\n        margin-top: 16px;\n    }\n`;\nconst AvatarField = styled.div.withConfig({ displayName: \"AvatarField\", componentId: \"sc-1wkflrd\" }) `\n    padding: 20px;\n    width: 100%;\n\n    button {\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        display: flex;\n\n        button {\n            width: auto;\n        }\n    }\n`;\nconst AvatarDisplayContainer = styled.div.withConfig({ displayName: \"AvatarDisplayContainer\", componentId: \"sc-1rv3bf3\" }) `\n    margin: 0 auto 16px;\n    width: max-content;\n\n    @media ${TABLET} {\n        margin: 0 32px 0 0;\n    }\n`;\nconst AvatarImageStyles = css `\n    width: 80px;\n    height: 80px;\n    border: 1px solid ${COLORS.secondaryHover};\n    border-radius: 100%;\n`;\nconst AvatarPlaceholder = styled(AvatarImage).withConfig({ displayName: \"AvatarPlaceholder\", componentId: \"sc-1qedmwc\" }) `\n    ${AvatarImageStyles}\n`;\nconst OperatorAvatar = styled.img.withConfig({ displayName: \"OperatorAvatar\", componentId: \"sc-1yguxbu\" }) `\n    ${AvatarImageStyles}\n`;\nconst AvatarRequirements = styled.ul.withConfig({ displayName: \"AvatarRequirements\", componentId: \"sc-15jucd9\" }) `\n    color: #555;\n    font-size: 12px;\n    list-style-position: inside;\n    margin: 10px 0 0;\n    padding: 0;\n    text-align: center;\n`;\nconst ButtonIcon = styled(SvgIcon).withConfig({ displayName: \"ButtonIcon\", componentId: \"sc-gp923z\" }) `\n    width: 12px;\n    height: 12px;\n    margin-right: 8px;\n`;\nconst AlertContainer = styled.div.withConfig({ displayName: \"AlertContainer\", componentId: \"sc-deckk8\" }) `\n    margin-top: 10px;\n`;\n","import EventEmitter from 'events';\nimport { GetMetadataDocument, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { sleep } from '~/utils';\nconst blockObservers = {};\nfunction getBlockObserver(chainId) {\n    let blockObserver = blockObservers[chainId];\n    if (blockObserver) {\n        return blockObserver;\n    }\n    let lastKnownBlockNumber = -1;\n    /**\n     * Collection of specific block numbers that we're interested in. See\n     * `onBlock` for more info.\n     */\n    const pending = {};\n    const emitter = new EventEmitter();\n    let started = false;\n    function start() {\n        if (started) {\n            return;\n        }\n        started = true;\n        void (async () => {\n            /**\n             * Delay between retries is calculated based on the number\n             * of consecutive failures. The larger the number the longer\n             * we wait before we try again.\n             */\n            let failureCount = 0;\n            /**\n             * `idleCount` increases if we the same block number twice in row, and decreases\n             * it's different 3 times in a row. It self-adjust to hit the remote endpoint\n             * reasonably often.\n             */\n            let idleCount = 0;\n            /**\n             * `consecutiveChangeCount` increases if we get the same value twice in a row.\n             */\n            let consecutiveChangeCount = 0;\n            const client = getGraphClient(chainId);\n            while (1) {\n                if (!Object.keys(pending).length) {\n                    /**\n                     * Pending list empty? Wait 2 seconds and retry. We only wanna query\n                     * the Graph if we're interested in something specific.\n                     */\n                    await sleep(2000);\n                    continue;\n                }\n                try {\n                    const { data: { _meta: meta }, } = await client.query({\n                        query: GetMetadataDocument,\n                        fetchPolicy: 'network-only',\n                    });\n                    const blockNumber = meta?.block.number;\n                    if (blockNumber == null) {\n                        throw new Error('Invalid block number');\n                    }\n                    failureCount = 0;\n                    if (blockNumber === lastKnownBlockNumber) {\n                        consecutiveChangeCount = 0;\n                        idleCount = Math.min(25, idleCount + 1);\n                    }\n                    else {\n                        consecutiveChangeCount += 1;\n                        lastKnownBlockNumber = blockNumber;\n                        emitter.emit('block', blockNumber);\n                        Object.keys(pending).forEach((key) => {\n                            if (Number(key) > blockNumber) {\n                                return;\n                            }\n                            delete pending[key];\n                            emitter.emit(`block:${key}`);\n                        });\n                    }\n                    if (consecutiveChangeCount === 3) {\n                        /**\n                         * After 3 different values in a row try a lower\n                         * idleCount. We may not have to wait that long.\n                         */\n                        idleCount = Math.max(0, idleCount - 1);\n                        consecutiveChangeCount = 0;\n                    }\n                    await sleep(500 + idleCount * 100);\n                    continue;\n                }\n                catch (_) {\n                    failureCount = Math.min(40, failureCount + 1);\n                    await sleep(250 * failureCount);\n                }\n            }\n        })();\n    }\n    blockObserver = (blockNumber, fn) => {\n        pending[blockNumber] = true;\n        emitter.once(`block:${blockNumber}`, fn);\n        start();\n        return () => void emitter.off(`block:${blockNumber}`, fn);\n    };\n    blockObservers[chainId] = blockObserver;\n    return blockObserver;\n}\nexport function onIndexedBlock(chainId, blockNumber, fn) {\n    getBlockObserver(chainId)(blockNumber, fn);\n}\n","import { QueryClient } from '@tanstack/react-query';\nimport React from 'react';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport { StreamGptApiUrl } from '~/consts';\nimport { ParseError } from '~/errors';\nimport { getProjectRegistryContract } from '~/getters';\nimport { invalidateActiveOperatorByIdQueries, invalidateAllOperatorsQueries, invalidateDelegationsForWalletQueries, } from '~/hooks/operators';\nimport { operatorModal } from '~/modals/OperatorModal';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { ProjectType } from '~/shared/types';\nimport getNativeTokenName from '~/shared/utils/nativeToken';\nimport { requirePositiveBalance } from '~/shared/utils/requirePositiveBalance';\nimport { Layer } from '~/utils/Layer';\nimport { onIndexedBlock } from '~/utils/blocks';\nimport { toBN } from '~/utils/bn';\nimport { getPublicProvider } from '~/utils/providers';\n/**\n * Gas money checker.\n * @param chainId Chain id.\n * @param account Account address.\n * @param options.recover If `true`, the function will pop up a \"try\n * again\" toast on failure. Default: `false`.\n * @throws `InsufficientFundsError` if the balance turns out to be 0.\n */\nexport async function ensureGasMonies(chainId, account, { recover = false } = {}) {\n    while (true) {\n        try {\n            await requirePositiveBalance(chainId, account);\n            break;\n        }\n        catch (e) {\n            if (recover && e instanceof InsufficientFundsError) {\n                const tokenName = getNativeTokenName(chainId);\n                try {\n                    await toaster(Toast, Layer.Toast).pop({\n                        title: 'Not enough tokens',\n                        type: ToastType.Warning,\n                        desc: (React.createElement(\"p\", null,\n                            \"You need \",\n                            tokenName,\n                            \" for gas. Get some\",\n                            React.createElement(\"br\", null),\n                            \"and try again.\")),\n                        okLabel: 'Try again',\n                        cancelLabel: 'Cancel',\n                    });\n                    continue;\n                }\n                catch (_) {\n                    throw e;\n                }\n            }\n            throw e;\n        }\n    }\n}\n/**\n * Scouts for the `Subscribed` event associated with the Project Registry contract\n * and explodes if it can't find one after given number of tries.\n * @param chainId The chain id related to the purchase.\n * @param projectId Project id.\n * @param account Account who made the purchase.\n * @param options.attempts Number of tries (with 3s delay between each).\n * @returns Nothing important. Watch for 'splosions tho.\n */\nexport async function waitForPurchasePropagation(chainId, projectId, account, { attempts = 30 } = {}) {\n    const provider = await getPublicProvider(chainId);\n    const contract = getProjectRegistryContract({ chainId, provider });\n    // Take a couple of blocks back to be sure.\n    const fromBlock = (await provider.getBlockNumber()) - 10;\n    for (let i = 0; i < attempts; i++) {\n        const events = await contract.queryFilter(contract.filters.Subscribed(projectId, account), fromBlock, 'latest');\n        if (events.length) {\n            return;\n        }\n        await sleep(3000);\n    }\n    throw new Error('Finding `Subscribed` event timed out');\n}\nexport function isProjectOwnedBy(permissions, address) {\n    const { canGrant = false } = permissions.find(({ userAddress }) => typeof userAddress === 'string' &&\n        userAddress.toLowerCase() === address.toLowerCase()) || {};\n    return !!canGrant;\n}\n/**\n * Returns a promise that resolves after a given number\n * of milliseconds. Uses `setTimeout` internally.\n */\nexport async function sleep(millis) {\n    await new Promise((resolve) => void setTimeout(resolve, millis));\n}\n/**\n * Takes the user back in history, but only if they've already navigated\n * somewhere within the app.\n * @param options.onBeforeNavigate Optional callback triggered right before\n * the actual step back. It does not get triggered if we can't take\n * the step.\n */\nexport function goBack(options = {}) {\n    const backable = z\n        .object({ idx: z.number().min(1) })\n        .safeParse(window.history.state).success;\n    if (!backable) {\n        return;\n    }\n    options.onBeforeNavigate?.();\n    window.history.back();\n}\nlet queryClient;\n/**\n * Returns the global QueryClient.\n */\nexport function getQueryClient() {\n    if (!queryClient) {\n        queryClient = new QueryClient({\n            defaultOptions: {\n                queries: {\n                    throwOnError: (error) => error instanceof ParseError,\n                },\n            },\n        });\n    }\n    return queryClient;\n}\nconst SiSymbol = ['', 'k', 'M', 'G', 'T', 'P'];\nfunction defaultFractionLength(integral) {\n    return integral.length < 7 ? 2 : 3;\n}\n/**\n * Abbreviates BigNumberish value.\n */\nexport function abbr(value, options = {}) {\n    const { fractionalLength = defaultFractionLength, stripFractionalZeros = true } = options;\n    const v = toBN(value).dp(typeof fractionalLength === 'number' ? Math.max(0, fractionalLength) + 1 : 10);\n    if (!v.isFinite()) {\n        console.warn('Invalid value', v.toString());\n        throw new Error('Invalid value');\n    }\n    const sign = v.isLessThan(0) ? '-' : '';\n    let [integral, fractional = ''] = v.abs().toString().split('.');\n    const fracLength = Math.max(0, typeof fractionalLength === 'function'\n        ? fractionalLength(integral)\n        : fractionalLength);\n    fractional = `${fractional}${[...Array(fracLength)].map(() => '0').join('')}`;\n    let size = 0;\n    /**\n     * Rebalance the dot and determine what suffix to use by moving digits from\n     * integral part to fractional part.\n     */\n    while (integral.length > 3 && size < SiSymbol.length - 1) {\n        fractional = `${integral.substring(integral.length - 3)}${fractional}`;\n        integral = integral.substring(0, integral.length - 3);\n        size++;\n    }\n    let frac = fractional.substring(0, fracLength);\n    if (stripFractionalZeros) {\n        frac = frac.replace(/0+$/, '');\n    }\n    return `${sign}${integral}${frac && `.${frac}`}${SiSymbol[size]}`;\n}\n/**\n * A function that takes the user through the process of creating\n * an operator or updating an existing operator.\n */\nexport function saveOperator(chainId, operator, options = {}) {\n    void (async () => {\n        try {\n            const { operatorId, blockNumber } = await operatorModal.pop({\n                chainId,\n                operator,\n            });\n            invalidateActiveOperatorByIdQueries(chainId, operatorId);\n            invalidateAllOperatorsQueries(chainId);\n            invalidateDelegationsForWalletQueries(chainId);\n            options.onDone?.(operatorId, blockNumber);\n        }\n        catch (e) {\n            if (options.onError) {\n                options.onError(e);\n            }\n            else {\n                console.warn('Failed to save an operator', e);\n            }\n        }\n    })();\n}\n/**\n * Returns a promise that resolves when the Graph indexes all blocks\n * to a given block height.\n */\nexport function waitForIndexedBlock(chainId, blockNumber) {\n    return new Promise((resolve) => {\n        onIndexedBlock(chainId, blockNumber, resolve);\n    });\n}\n/**\n * Determines if a given argument is a project type.\n */\nexport function isProjectType(arg) {\n    return (arg === ProjectType.DataUnion ||\n        arg === ProjectType.OpenData ||\n        arg === ProjectType.PaidData);\n}\n/**\n * Returns URL of the StreamGPT for the given path.\n */\nexport function getStreamGptApiUrl(path) {\n    return `${StreamGptApiUrl}${path}`;\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { isAddress } from 'web3-validator';\nimport { Minute } from '~/consts';\nimport { Operator_OrderBy, } from '~/generated/gql/network';\nimport { getAllOperators, getOperatorById, getOperatorsByDelegation, getOperatorsByDelegationAndId, getOperatorsByDelegationAndMetadata, getParsedOperators, getParsedOperatorsByOwnerOrControllerAddress, searchOperatorsByMetadata, } from '~/getters';\nimport { confirm } from '~/getters/confirm';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { useRequestedBlockNumber } from '~/hooks';\nimport { invalidateSponsorshipQueries } from '~/hooks/sponsorships';\nimport DelegateFundsModal from '~/modals/DelegateFundsModal';\nimport { forceUndelegateModal } from '~/modals/ForceUndelegateModal';\nimport { undelegateFundsModal } from '~/modals/UndelegateFundsModal';\nimport { Operator } from '~/parsers/Operator';\nimport { getOperatorDelegationAmount, processOperatorUndelegationQueue, } from '~/services/operators';\nimport { collectEarnings } from '~/services/sponsorships';\nimport { flagKey, useFlagger, useIsFlagged } from '~/shared/stores/flags';\nimport { useUncollectedEarningsStore } from '~/shared/stores/uncollectedEarnings';\nimport { getSigner } from '~/shared/stores/wallet';\nimport { truncate } from '~/shared/utils/text';\nimport { getQueryClient, waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { getBalance } from '~/utils/balance';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { Break, FlagBusy } from '~/utils/errors';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { successToast } from '~/utils/toast';\nexport function useOperatorForWalletQuery(address = '') {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useOperatorForWalletQuery', currentChainId, address.toLowerCase()],\n        queryFn: async () => {\n            const allOperators = await getParsedOperatorsByOwnerOrControllerAddress(currentChainId, address, {\n                force: true,\n            });\n            if (allOperators.length > 0) {\n                return allOperators[0];\n            }\n            return null;\n        },\n    });\n}\nexport function useAllOperatorsForWalletQuery(address = '') {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: [\n            'useAllOperatorsForWalletQuery',\n            currentChainId,\n            address.toLowerCase(),\n        ],\n        queryFn: () => getParsedOperatorsByOwnerOrControllerAddress(currentChainId, address, {\n            force: true,\n        }),\n    });\n}\nexport function useOperatorByIdQuery(operatorId = '') {\n    const currentChainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: ['operatorByIdQueryKey', currentChainId, operatorId, minBlockNumber],\n        async queryFn() {\n            if (!operatorId) {\n                return null;\n            }\n            const operator = await getOperatorById(currentChainId, operatorId, {\n                force: true,\n                minBlockNumber,\n            });\n            if (operator) {\n                return Operator.parse(operator, currentChainId);\n            }\n            return null;\n        },\n        placeholderData: keepPreviousData,\n        retry: false,\n        staleTime: Minute,\n    });\n}\nexport function invalidateActiveOperatorByIdQueries(chainId, operatorId) {\n    if (operatorId) {\n        return getQueryClient().invalidateQueries({\n            queryKey: ['operatorByIdQueryKey', chainId, operatorId],\n            exact: false,\n            refetchType: 'active',\n        });\n    }\n    return getQueryClient().invalidateQueries({\n        queryKey: ['operatorByIdQueryKey', chainId],\n        exact: false,\n        refetchType: 'active',\n    });\n}\nexport function useOperatorStatsForWallet(address = '') {\n    const { data: operator = null } = useOperatorForWalletQuery(address);\n    if (!operator) {\n        return operator;\n    }\n    const { delegatorCount: numOfDelegators, valueWithoutEarnings: value, stakes, } = operator;\n    return {\n        numOfDelegators,\n        numOfSponsorships: stakes.length,\n        value,\n    };\n}\n/**\n * @todo Refactor using `useQuery`.\n */\nexport function useDelegationsStats(address = '') {\n    const [stats, setStats] = useState();\n    const addr = address.toLowerCase();\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        if (!addr) {\n            setStats(null);\n            return () => { };\n        }\n        setStats(undefined);\n        setTimeout(async () => {\n            const operators = await getParsedOperators(() => getOperatorsByDelegation({\n                chainId,\n                first: 1000,\n                address: addr,\n            }), {\n                chainId,\n            });\n            if (!mounted) {\n                return;\n            }\n            if (!operators.length) {\n                return void setStats({\n                    value: 0n,\n                    minApy: 0,\n                    maxApy: 0,\n                    numOfOperators: 0,\n                });\n            }\n            let minApy = Number.POSITIVE_INFINITY;\n            let maxApy = Number.NEGATIVE_INFINITY;\n            operators.forEach(({ apy }) => {\n                minApy = Math.min(minApy, apy);\n                maxApy = Math.max(maxApy, apy);\n            });\n            const value = operators.reduce((sum, operator) => sum + operator.share(addr), 0n);\n            setStats({\n                value,\n                minApy,\n                maxApy,\n                numOfOperators: operators.length,\n            });\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [addr, chainId]);\n    return stats;\n}\nexport function invalidateDelegationsForWalletQueries(chainId) {\n    getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useDelegationsForWalletQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useDelegationsForWalletQuery({ address: addressProp = '', pageSize = 10, searchQuery: searchQueryProp = '', orderBy, orderDirection, }) {\n    const currentChainId = useCurrentChainId();\n    const address = addressProp.toLowerCase();\n    const searchQuery = searchQueryProp.toLowerCase();\n    return useInfiniteQuery({\n        queryKey: [\n            'useDelegationsForWalletQuery',\n            currentChainId,\n            address,\n            searchQuery,\n            pageSize,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const elements = await getParsedOperators(() => {\n                const params = {\n                    chainId: currentChainId,\n                    first: pageSize,\n                    skip,\n                    address,\n                    orderBy: mapOperatorOrder(orderBy),\n                    orderDirection: orderDirection,\n                    force: true,\n                };\n                if (!searchQuery) {\n                    /**\n                     * Empty search = look for all operators.\n                     */\n                    return getOperatorsByDelegation(params);\n                }\n                if (isAddress(searchQuery)) {\n                    /**\n                     * Look for a delegation for a given operator id.\n                     */\n                    return getOperatorsByDelegationAndId({\n                        ...params,\n                        operatorId: searchQuery,\n                    });\n                }\n                return getOperatorsByDelegationAndMetadata({\n                    ...params,\n                    searchQuery,\n                });\n            }, {\n                chainId: currentChainId,\n            });\n            return {\n                skip,\n                elements,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ skip, elements }) => {\n            return elements.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function invalidateAllOperatorsQueries(chainId) {\n    getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useAllOperatorsQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useAllOperatorsQuery({ batchSize = 10, searchQuery: searchQueryProp = '', orderBy, orderDirection, }) {\n    const searchQuery = searchQueryProp.toLowerCase();\n    const currentChainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useAllOperatorsQuery',\n            currentChainId,\n            searchQuery,\n            batchSize,\n            orderBy,\n            orderDirection,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const elements = await getParsedOperators(() => {\n                const params = {\n                    chainId: currentChainId,\n                    first: batchSize,\n                    skip,\n                    orderBy: mapOperatorOrder(orderBy),\n                    orderDirection: orderDirection,\n                    force: true,\n                };\n                if (!searchQuery) {\n                    return getAllOperators(params);\n                }\n                return searchOperatorsByMetadata({\n                    ...params,\n                    searchQuery,\n                });\n            }, {\n                chainId: currentChainId,\n            });\n            return {\n                skip,\n                elements,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ skip, elements }) => {\n            return elements.length === batchSize ? skip + batchSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function useIsDelegatingFundsToOperator(operatorId, wallet) {\n    return useIsFlagged(flagKey('isDelegatingFunds', operatorId || '', wallet || ''));\n}\nconst delegateFundsModal = toaster(DelegateFundsModal, Layer.Modal);\n/**\n * Triggers funds delegation and raises an associated flag for the\n * duration of the process.\n */\nexport function useDelegateFunds() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onDone, operator, wallet, }) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isDelegatingFunds', operator.id, wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const delegatedTotal = await getOperatorDelegationAmount(chainId, operator.id, wallet);\n                        await delegateFundsModal.pop({\n                            operator,\n                            balance,\n                            delegatedTotal,\n                            chainId,\n                        });\n                        invalidateActiveOperatorByIdQueries(chainId, operator.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n                onDone?.();\n            }\n            catch (e) {\n                console.warn('Could not delegate funds', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsUndelegatingFundsToOperator(operatorId, wallet) {\n    return useIsFlagged(flagKey('isUndelegatingFunds', operatorId || '', wallet || ''));\n}\n/**\n * Triggers funds undelegation and raises an associated flag for the\n * duration of the process.\n */\nexport function useUndelegateFunds() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onDone, operator, wallet, }) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isUndelegatingFunds', operator.id, wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const delegatedTotal = await getOperatorDelegationAmount(chainId, operator.id, wallet);\n                        await undelegateFundsModal.pop({\n                            chainId,\n                            operator,\n                            balance,\n                            delegatedTotal,\n                        });\n                        invalidateActiveOperatorByIdQueries(chainId, operator.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n                onDone?.();\n            }\n            catch (e) {\n                console.warn('Could not undelegate funds', e);\n            }\n        })();\n    }, [withFlag]);\n}\nconst mapOperatorOrder = (orderBy) => {\n    switch (orderBy) {\n        case 'totalValue':\n            return Operator_OrderBy.ValueWithoutEarnings;\n        case 'deployed':\n            return Operator_OrderBy.TotalStakeInSponsorshipsWei;\n        case 'operatorCut':\n            return Operator_OrderBy.OperatorsCutFraction;\n        default:\n            return Operator_OrderBy.Id;\n    }\n};\n/**\n * Returns a callback that takes the user through the process of collecting\n * earnings for given operator/sponsorship pair.\n */\nexport function useCollectEarnings() {\n    const { fetch: fetchUncollectedEarnings } = useUncollectedEarningsStore();\n    return useCallback((params) => {\n        const { chainId, sponsorshipIds, operatorId } = params;\n        void (async () => {\n            try {\n                if (!(await confirm({\n                    cancelLabel: 'Cancel',\n                    proceedLabel: 'Proceed',\n                    title: 'Confirm',\n                    description: (React.createElement(React.Fragment, null,\n                        \"This action transfers uncollected earnings to the Operator contract (\",\n                        truncate(operatorId),\n                        \").\")),\n                }))) {\n                    return;\n                }\n                await collectEarnings(chainId, sponsorshipIds, operatorId, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                await fetchUncollectedEarnings(chainId, operatorId);\n                /**\n                 * Let's refresh the operator page to incl. now-collected earnings\n                 * in the overview section.\n                 */\n                invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                successToast({\n                    title: 'Earnings collected!',\n                    autoCloseAfter: 5,\n                    desc: (React.createElement(\"p\", null, \"Earnings have been successfully collected and are now available in the Operator\\u00A0balance.\")),\n                });\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                console.error('Could not collect earnings', e);\n            }\n        })();\n    }, [fetchUncollectedEarnings]);\n}\n/**\n * Returns a callback that takes the user through force-undelegation process.\n */\nexport function useForceUndelegate() {\n    return useCallback((chainId, operator, amount) => {\n        void (async () => {\n            try {\n                const wallet = await (await getSigner()).getAddress();\n                await getSponsorshipTokenInfo(chainId);\n                const sponsorshipId = await forceUndelegateModal.pop({\n                    chainId,\n                    operator,\n                    amount,\n                });\n                invalidateSponsorshipQueries(chainId, wallet, sponsorshipId);\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                console.error('Could not force undelegate', e);\n            }\n        })();\n    }, []);\n}\n/**\n * Returns a callback that takes the user through undelegation queue processing.\n */\nexport function useProcessUndelegationQueue() {\n    return useCallback((chainId, operatorId) => {\n        void (async () => {\n            try {\n                await processOperatorUndelegationQueue(chainId, operatorId, {\n                    onReceipt: () => {\n                        // Refresh operator to update queue entries\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    },\n                });\n            }\n            catch (e) {\n                if (e === Break) {\n                    return;\n                }\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                console.error('Could not process undelegation queue', e);\n            }\n        })();\n    }, []);\n}\n","import { useQuery } from '@tanstack/react-query';\nimport { getERC20TokenContract } from '~/getters';\nimport { getQueryClient } from '~/utils';\nimport { getPublicProvider } from '~/utils/providers';\nexport async function getTokenInfo(tokenAddress, chainId) {\n    const tokenInfo = await getQueryClient().fetchQuery(tokenInfoQueryParams(chainId, tokenAddress));\n    if (!tokenInfo || !tokenInfo.symbol) {\n        throw new Error('Not an ERC-20 token');\n    }\n    return tokenInfo;\n}\nexport function useTokenInfo(tokenAddress, chainId) {\n    return useQuery(tokenInfoQueryParams(chainId, tokenAddress)).data;\n}\nfunction tokenInfoQueryParams(chainId, tokenAddress) {\n    return {\n        queryKey: ['tokenInfo', chainId, tokenAddress],\n        queryFn: async () => {\n            if (chainId == null || !tokenAddress) {\n                return null;\n            }\n            const provider = await getPublicProvider(chainId);\n            const contact = getERC20TokenContract({\n                tokenAddress,\n                provider,\n            });\n            try {\n                return {\n                    decimals: await contact.decimals(),\n                    name: await contact.name(),\n                    symbol: await contact.symbol(),\n                };\n            }\n            catch (e) {\n                console.warn(`Failed to fetch token info for ${tokenAddress}`, e);\n            }\n            return null;\n        },\n        staleTime: Infinity,\n        gcTime: Infinity,\n    };\n}\nexport function getCachedTokenInfo(tokenAddress, chainId) {\n    if (!tokenAddress || chainId == null) {\n        return null;\n    }\n    return getQueryClient().getQueryData(tokenInfoQueryParams(chainId, tokenAddress).queryKey);\n}\n","import { getContractAddress } from '~/utils/contracts';\nimport { getTokenInfo } from '~/utils/tokens';\nexport async function getSponsorshipTokenInfo(chainId) {\n    return getTokenInfo(getContractAddress('sponsorshipPaymentToken', chainId), chainId);\n}\n","import { useInfiniteQuery } from '@tanstack/react-query';\nimport { getSponsoringEvents } from '~/getters/getSponsoringEvents';\nimport { getQueryClient } from '~/utils';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst FUNDING_HISTORY_PAGE_SIZE = 10;\nexport function invalidateSponsorshipFundingHistoryQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipFundingHistoryQuery', chainId, sponsorshipId || ''],\n        refetchType: 'active',\n    });\n}\nexport const useSponsorshipFundingHistoryQuery = (sponsorshipId, pageSize = FUNDING_HISTORY_PAGE_SIZE) => {\n    const currentChainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipFundingHistoryQuery',\n            currentChainId,\n            sponsorshipId || '',\n            pageSize,\n        ],\n        queryFn: async (ctx) => {\n            try {\n                if (!sponsorshipId) {\n                    return {\n                        skippedElements: 0,\n                        events: [],\n                    };\n                }\n                const events = await getSponsoringEvents(currentChainId, sponsorshipId, pageSize, ctx.pageParam || 0, { force: true });\n                return {\n                    skippedElements: ctx.pageParam || 0,\n                    events,\n                };\n            }\n            catch (_) {\n                errorToast({ title: \"Could not load the sponsorship's funding history\" });\n                return {\n                    skippedElements: 0,\n                    events: [],\n                };\n            }\n        },\n        initialPageParam: 0,\n        getNextPageParam: (lastPage) => {\n            return lastPage.events.length === pageSize\n                ? lastPage.skippedElements + pageSize\n                : null;\n        },\n    });\n};\n","import { format } from 'date-fns';\nimport { GetSponsoringEventsDocument, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { toBigInt } from '~/utils/bn';\nexport const getSponsoringEvents = async (chainId, sponsorshipId, first, skip = 0, { force = false } = {}) => {\n    const { data: { sponsoringEvents }, } = await getGraphClient(chainId).query({\n        query: GetSponsoringEventsDocument,\n        variables: {\n            sponsorshipId,\n            first,\n            skip,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return sponsoringEvents.map((event) => ({\n        id: event.id,\n        amount: toBigInt(event.amount),\n        sponsor: event.sponsor,\n        date: format(new Date(Number(event.date) * 1000), 'yyyy-MM-dd HH:mm:ss'),\n    }));\n};\n","import React from 'react';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nexport function SponsorshipPaymentTokenName() {\n    return React.createElement(React.Fragment, null, useSponsorshipTokenInfo()?.symbol || 'DATA');\n}\n","import React, { useMemo } from 'react';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { Tooltip } from '~/components/Tooltip';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { abbr } from '~/utils';\nimport { toFloat } from '~/utils/bn';\n/**\n * Displays amount (in wei) in a human-readable way. Optionally it abbreviates\n * it and adds a on-hover tooltip showing a full value.\n */\nexport function Decimals({ abbr: abbrProp = false, amount, decimals, tooltip = false, unit, }) {\n    const humanAmount = toFloat(amount, decimals);\n    const value = useMemo(() => (abbrProp ? abbr(humanAmount) : humanAmount.toString()), [abbrProp, humanAmount]);\n    if (value === humanAmount.toString() || !tooltip) {\n        return (React.createElement(React.Fragment, null,\n            value,\n            unit != null ? React.createElement(React.Fragment, null,\n                \"\\u00A0\",\n                unit) : React.createElement(React.Fragment, null)));\n    }\n    return (React.createElement(Tooltip, { anchorDisplay: \"inline\", content: React.createElement(React.Fragment, null,\n            humanAmount.toString(),\n            unit != null ? React.createElement(React.Fragment, null,\n                \"\\u00A0\",\n                unit) : React.createElement(React.Fragment, null)) },\n        value,\n        unit != null ? React.createElement(React.Fragment, null,\n            \"\\u00A0\",\n            unit) : React.createElement(React.Fragment, null)));\n}\nexport function SponsorshipDecimals({ abbr = false, amount, tooltip = false, unitSuffix, }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(Decimals, { abbr: abbr, amount: amount, decimals: decimals, tooltip: tooltip, unit: React.createElement(React.Fragment, null,\n            React.createElement(SponsorshipPaymentTokenName, null),\n            unitSuffix) }));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport ImageChecked from './checkbox-checked.svg';\nimport ImageUnchecked from './checkbox.svg';\nexport const Tick = styled.div.withConfig({ displayName: \"Tick\", componentId: \"sc-1a6pboa\" }) `\n    background: url(${ImageUnchecked}) no-repeat;\n    height: 16px;\n    position: relative;\n    width: 16px;\n\n    ::after {\n        background: url(${ImageChecked}) no-repeat;\n        bottom: 0;\n        content: ' ';\n        display: block;\n        left: 0;\n        opacity: 0;\n        position: absolute;\n        right: 0;\n        top: 0;\n        transition: opacity 0.1s;\n    }\n\n    :disabled {\n        filter: grayscale(1);\n        cursor: not-allowed;\n    }\n\n    ${({ $checked = false }) => !!$checked &&\n    css `\n            ::after {\n                opacity: 1;\n            }\n        `}\n`;\nconst noop = () => { };\nconst UnstyledCheckbox = ({ value, onChange = noop, onClick = noop, ...props }) => (React.createElement(Tick, { ...props, as: \"input\", type: \"checkbox\", checked: !!value, \"$checked\": !!value, onChange: onChange, onClick: onClick }));\nconst Checkbox = styled(UnstyledCheckbox).withConfig({ displayName: \"Checkbox\", componentId: \"sc-i2siht\" }) `\n    appearance: none;\n    border: 0;\n    cursor: pointer;\n    flex-shrink: 0;\n    margin-right: 0.5em;\n    top: 0;\n\n    :focus {\n        outline: none;\n    }\n`;\nexport default Checkbox;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Alert } from '~/components/Alert';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useJoinSponsorshipAsOperator } from '~/hooks/sponsorships';\nimport Checkbox from '~/shared/components/Checkbox';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function SponsorshipDisclaimer({ sponsorship, onResolve, checkboxState, onCheckboxStateChange, }) {\n    const chainId = useCurrentChainId();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(StyledAlert, { type: \"error\", title: \"Warning\" },\n            \"To earn, Operators should\",\n            ' ',\n            sponsorship == null ? ('join Sponsorships') : (React.createElement(Link, { to: \"#\", onClick: () => {\n                    if (operator == null) {\n                        return;\n                    }\n                    // Close this modal\n                    onResolve?.();\n                    // Open join sponsorship modal\n                    joinSponsorshipAsOperator({\n                        chainId,\n                        sponsorship,\n                        operator,\n                    });\n                } }, \"join Sponsorships\")),\n            \", rather than fund/sponsor them. This action cannot be undone.\"),\n        React.createElement(Confirm, null,\n            React.createElement(Checkbox, { id: \"fund-sponsorship-checkbox\", value: checkboxState, onChange: (e) => {\n                    onCheckboxStateChange(e.target.checked);\n                } }),\n            React.createElement(\"label\", { htmlFor: \"fund-sponsorship-checkbox\" }, \"I understand this disclaimer and I know what I'm doing.\"))));\n}\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-wmuo9c\" }) `\n    margin-top: 16px;\n\n    a {\n        color: ${COLORS.link};\n    }\n`;\nconst Confirm = styled.div.withConfig({ displayName: \"Confirm\", componentId: \"sc-13wm4mw\" }) `\n    display: flex;\n    align-items: center;\n    margin-top: 8px;\n\n    & label {\n        margin-bottom: 0;\n    }\n`;\n","import isEmpty from 'lodash/isEmpty';\nimport omitBy from 'lodash/omitBy';\nimport { address0 } from '~/consts';\nimport { GetPagedStreamsDocument, GetStreamByIdDocument, OrderDirection as GraphOrderDirection, Stream_OrderBy, } from '~/generated/gql/network';\nimport { getGraphClient } from '~/getters/getGraphClient';\nconst calculatePubSubCount = (permissions) => {\n    let publisherCount = 0;\n    let subscriberCount = 0;\n    permissions.forEach((perm) => {\n        // If stream has public permissions (zero address), return null for counts which means that anyone can\n        // publish or subscribe\n        if (perm.userId === address0) {\n            if (perm.subscribeExpiration >= Math.round(Date.now() / 1000)) {\n                subscriberCount = null;\n            }\n            if (perm.publishExpiration >= Math.round(Date.now() / 1000)) {\n                publisherCount = null;\n            }\n        }\n        if (perm.subscribeExpiration >= Math.round(Date.now() / 1000) &&\n            subscriberCount != null) {\n            subscriberCount += 1;\n        }\n        if (perm.publishExpiration >= Math.round(Date.now() / 1000) &&\n            publisherCount != null) {\n            publisherCount += 1;\n        }\n    });\n    return {\n        publisherCount,\n        subscriberCount,\n    };\n};\nconst mapStream = (stream) => {\n    const result = {\n        id: stream.id,\n        publisherCount: 0,\n        subscriberCount: 0,\n        permissions: stream.permissions,\n    };\n    // Get publisher and subscriber counts\n    const counts = calculatePubSubCount(stream.permissions || []);\n    result.publisherCount = counts.publisherCount;\n    result.subscriberCount = counts.subscriberCount;\n    // Try to parse metadata JSON\n    if (stream.metadata != null) {\n        try {\n            result.metadata = JSON.parse(stream.metadata);\n        }\n        catch (e) {\n            console.error(`Could not parse metadata for stream ${stream.id}`, e);\n            result.metadata = {};\n        }\n    }\n    return result;\n};\nconst prepareStreamResult = (result, pageSize) => {\n    let hasNextPage = false;\n    const streams = result.map((p) => mapStream(p));\n    if (streams.length > pageSize) {\n        hasNextPage = true;\n        // Remove last item\n        streams.splice(pageSize, 1);\n    }\n    return {\n        streams,\n        hasNextPage,\n        lastId: streams[streams.length - 1]?.id,\n    };\n};\nexport const getPagedStreams = async (chainId, first, lastId, owner, search, orderBy = Stream_OrderBy.Id, orderDirection = 'asc', { force = false } = {}) => {\n    const orderOperator = orderDirection === 'asc' ? 'gt' : 'lt';\n    const graphOrderDirection = orderDirection === 'asc' ? GraphOrderDirection.Asc : GraphOrderDirection.Desc;\n    let where = {\n        permissions_: {\n            stream_contains_nocase: search,\n            userId: owner,\n        },\n        [`id_${orderOperator}`]: lastId,\n    };\n    where.permissions_ = omitBy(where.permissions_, isEmpty);\n    where = omitBy(where, isEmpty);\n    const { data: { streams }, } = await getGraphClient(chainId).query({\n        query: GetPagedStreamsDocument,\n        variables: {\n            first: first + 1,\n            orderBy,\n            orderDirection: graphOrderDirection,\n            where,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    if (streams && streams.length > 0) {\n        return prepareStreamResult(streams.map((s) => ({\n            ...s,\n            permissions: s.permissions?.map((p) => ({\n                ...p,\n                userAddress: p.userId, // We need to add this deprecated field for now\n            })),\n        })), first);\n    }\n    return {\n        streams: [],\n        hasNextPage: false,\n        lastId: null,\n    };\n};\nexport const getStreamsOwnedBy = async (chainId, owner, search, onlyPublic, { force = false } = {}) => {\n    const allOwnedStreams = await getPagedStreams(chainId, 999, undefined, owner, search, Stream_OrderBy.Id, 'asc', { force });\n    let result = allOwnedStreams.streams;\n    if (onlyPublic) {\n        result = result.filter((s) => s.permissions.find((p) => p.userId.toLowerCase() === address0.toLowerCase()) != null);\n    }\n    return result;\n};\nexport const checkIfStreamExists = async (chainId, potentialStreamId) => {\n    const { data: { stream }, } = await getGraphClient(chainId).query({\n        query: GetStreamByIdDocument,\n        variables: {\n            streamId: potentialStreamId,\n        },\n        fetchPolicy: 'network-only',\n    });\n    return !!stream;\n};\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function DropdownMenuItem({ highlight = false, highlightOnFocus = false, children, onKeyDown: onKeyDownProp, onKeyDownToNextButton, onKeyDownToPrevButton, ...props }) {\n    return (React.createElement(\"li\", null,\n        React.createElement(ItemRoot, { ...props, \"$highlight\": highlight, \"$highlightOnFocus\": highlightOnFocus, onKeyDown: (e) => {\n                void (() => {\n                    switch (e.key) {\n                        case 'ArrowDown':\n                            return void withNextButton(e.currentTarget, (b) => void onKeyDownToNextButton?.(e, b));\n                        case 'ArrowUp':\n                            e.preventDefault();\n                            return void withPrevButton(e.currentTarget, (b) => void onKeyDownToPrevButton?.(e, b));\n                        default:\n                    }\n                })();\n                onKeyDownProp?.(e);\n            } },\n            React.createElement(\"div\", null, children),\n            React.createElement(ReturnIconWrap, null,\n                React.createElement(\"svg\", { width: \"20\", height: \"20\", viewBox: \"0 0 20 20\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                    React.createElement(\"rect\", { width: \"20\", height: \"20\", rx: \"2\", fill: COLORS.secondaryHover }),\n                    React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", \n                        // eslint-disable-next-line max-len\n                        d: \"M5.92578 10.9012C5.92578 10.7812 5.97346 10.6661 6.05834 10.5812C6.14321 10.4964 6.25832 10.4487 6.37835 10.4487H11.8092C12.1693 10.4487 12.5146 10.3056 12.7692 10.051C13.0238 9.79639 13.1669 9.45106 13.1669 9.09097V7.28069C13.1669 7.16067 13.2146 7.04555 13.2994 6.96068C13.3843 6.87581 13.4994 6.82812 13.6195 6.82812C13.7395 6.82812 13.8546 6.87581 13.9395 6.96068C14.0243 7.04555 14.072 7.16067 14.072 7.28069V9.09097C14.072 9.69111 13.8336 10.2667 13.4092 10.691C12.9849 11.1154 12.4093 11.3538 11.8092 11.3538H6.37835C6.25832 11.3538 6.14321 11.3061 6.05834 11.2213C5.97346 11.1364 5.92578 11.0213 5.92578 10.9012Z\", fill: \"black\" }),\n                    React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", \n                        // eslint-disable-next-line max-len\n                        d: \"M6.05829 11.2218C5.97344 11.1369 5.92578 11.0218 5.92578 10.9018C5.92578 10.7818 5.97344 10.6667 6.05829 10.5818L7.86856 8.77157C7.95392 8.68913 8.06824 8.64352 8.1869 8.64455C8.30556 8.64558 8.41907 8.69318 8.50298 8.77709C8.58689 8.861 8.63449 8.97451 8.63552 9.09317C8.63655 9.21183 8.59093 9.32615 8.50849 9.4115L7.01819 10.9018L8.50849 12.3921C8.55172 12.4339 8.5862 12.4838 8.60992 12.539C8.63364 12.5942 8.64612 12.6536 8.64664 12.7137C8.64716 12.7738 8.63571 12.8334 8.61296 12.889C8.5902 12.9446 8.5566 12.9952 8.5141 13.0377C8.47161 13.0802 8.42108 13.1138 8.36546 13.1365C8.30984 13.1593 8.25025 13.1707 8.19016 13.1702C8.13007 13.1697 8.07068 13.1572 8.01546 13.1335C7.96025 13.1098 7.91031 13.0753 7.86856 13.0321L6.05829 11.2218Z\", fill: \"black\" }))))));\n}\nfunction withNextButton(el, fn) {\n    fn(el.parentElement?.nextElementSibling?.querySelector('button'));\n}\nfunction withPrevButton(el, fn) {\n    fn(el.parentElement?.previousElementSibling?.querySelector('button'));\n}\nconst ReturnIconWrap = styled.div.withConfig({ displayName: \"ReturnIconWrap\", componentId: \"sc-1x8qf1u\" }) `\n    opacity: 0;\n    transition: 100ms opacity;\n\n    > svg {\n        display: block;\n        border-radius: 4px;\n    }\n`;\nconst ItemRoot = styled.button.withConfig({ displayName: \"ItemRoot\", componentId: \"sc-cxf9yn\" }) `\n    align-items: center;\n    appearance: none;\n    background: none;\n    border: 0;\n    display: flex;\n    gap: 8px;\n    font-size: 14px;\n    line-height: 1.5;\n    padding: 8px 24px;\n    text-align: left;\n    white-space: nowrap;\n    width: 100%;\n    transition: 250ms background-color;\n\n    :focus,\n    :hover {\n        background: ${COLORS.secondary};\n        transition-duration: 50ms;\n    }\n\n    > div:first-child {\n        flex-grow: 1;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n\n    &[disabled] {\n        background: none;\n    }\n\n    ${({ $highlightOnFocus = false }) => $highlightOnFocus &&\n    css `\n            :focus > ${ReturnIconWrap} {\n                opacity: 1;\n            }\n        `}\n\n    ${({ $highlight = false }) => $highlight &&\n    css `\n            > ${ReturnIconWrap} {\n                opacity: 1;\n            }\n        `}\n`;\n","import SearchIcon from '@atlaskit/icon/glyph/search';\nimport { useQuery } from '@tanstack/react-query';\nimport React, { useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { useDebounce } from 'use-debounce';\nimport { SimpleDropdownMenu as PrestyledSimpleDropdownMenu, SimpleDropdown, SimpleListDropdownMenu, } from '~/components/SimpleDropdown';\nimport Spinner from '~/components/Spinner';\nimport { OrderDirection, Stream_OrderBy } from '~/generated/gql/network';\nimport { FieldWrap, IconWrapAppendix, TextInput } from '~/modals/FormModal';\nimport { getPagedStreams } from '~/services/streams';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { parseStreamId, truncate } from '~/shared/utils/text';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { DropdownMenuItem } from './DropdownMenuItem';\nexport function StreamIdDropdown({ disabled = false, readOnly, onBlur: onBlurProp, onChange, onFocus: onFocusProp, onKeyDown: onKeyDownProp, value = '', ...props }) {\n    const wallet = useWalletAccount();\n    const currentChainId = useCurrentChainId();\n    const inputRef = useRef(null);\n    const listRef = useRef(null);\n    const [queryValue] = useDebounce(value, 250);\n    const { data: streamIds = [], isLoading } = useQuery({\n        queryKey: ['StreamIdDropdown.streamIds', currentChainId, queryValue],\n        queryFn: async () => {\n            try {\n                return (await getPagedStreams(currentChainId, 20, undefined, undefined, queryValue, Stream_OrderBy.Id, OrderDirection.Asc, { force: true })).streams.map(({ id }) => id);\n            }\n            catch (e) {\n                console.warn('Failed to load streams', queryValue, e);\n            }\n        },\n    });\n    const [inputFocused, setInputFocused] = useState(false);\n    return (React.createElement(SimpleDropdown, { disabled: disabled, menuWrapComponent: StreamDropdownMenuWrap, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null, isLoading ? (React.createElement(SpinnerWrap, null,\n            React.createElement(Spinner, { color: \"blue\" }))) : streamIds.length ? (React.createElement(\"ul\", { ref: listRef }, streamIds.map((streamId, index) => {\n            const shortStreamId = (() => {\n                try {\n                    const { owner, pathname } = parseStreamId(streamId);\n                    return `${truncate(owner)}${pathname}`;\n                }\n                catch (_) { }\n                return streamId;\n            })();\n            return (React.createElement(DropdownMenuItem, { key: streamId, highlight: !index && inputFocused, highlightOnFocus: true, type: \"button\", onClick: () => {\n                    onChange?.(streamId);\n                    toggle(false);\n                    inputRef.current?.focus();\n                }, onKeyDown: (e) => {\n                    if (e.key === 'Escape') {\n                        e.stopPropagation();\n                        inputRef.current?.focus();\n                        toggle(false);\n                    }\n                    if (e.key === 'Backspace') {\n                        e.preventDefault();\n                        inputRef.current?.focus();\n                    }\n                }, onKeyDownToNextButton: (e, button) => {\n                    if (button) {\n                        button.focus();\n                        e.preventDefault();\n                    }\n                }, onKeyDownToPrevButton: (_, button) => {\n                    if (button) {\n                        return void button.focus();\n                    }\n                    inputRef.current?.focus();\n                } }, shortStreamId));\n        }))) : (React.createElement(Zero, null,\n            \"0 matches for \",\n            React.createElement(\"strong\", null, queryValue))))) }, (toggle, isOpen) => {\n        return (React.createElement(FieldWrap, null,\n            React.createElement(TextInput, { ...props, disabled: disabled, readOnly: readOnly, ref: inputRef, onMouseDown: () => {\n                    if (readOnly) {\n                        return;\n                    }\n                    toggle((c) => !c);\n                }, value: value, onChange: (e) => {\n                    onChange?.(e.target.value);\n                    toggle(true);\n                }, onFocus: (e) => {\n                    onFocusProp?.(e);\n                    setInputFocused(true);\n                }, onBlur: (e) => {\n                    onBlurProp?.(e);\n                    setInputFocused(false);\n                }, onKeyDown: (e) => {\n                    if (readOnly) {\n                        return;\n                    }\n                    onKeyDownProp?.(e);\n                    switch (e.key) {\n                        case 'Enter':\n                            if (isOpen && streamIds[0]) {\n                                e.preventDefault();\n                                onChange?.(streamIds[0]);\n                                toggle(false);\n                            }\n                            return;\n                        case 'Escape':\n                            if (isOpen) {\n                                toggle(false);\n                                return void e.stopPropagation();\n                            }\n                            if (value.length) {\n                                onChange?.('');\n                                return void e.stopPropagation();\n                            }\n                            return;\n                        case 'ArrowUp':\n                            e.preventDefault();\n                            return void toggle(false);\n                        case 'ArrowDown':\n                            e.preventDefault();\n                            if (!isOpen) {\n                                return void toggle(true);\n                            }\n                            listRef.current?.querySelector('button')?.focus();\n                            return;\n                        case 'ArrowRight':\n                            if (!value.length && wallet) {\n                                onChange?.(`${wallet.toLowerCase()}/`);\n                                toggle(true);\n                            }\n                            return;\n                        case 'Backspace':\n                            if (!value) {\n                                toggle(false);\n                            }\n                            return;\n                        default:\n                    }\n                } }),\n            React.createElement(IconWrapAppendix, null,\n                React.createElement(SearchIcon, { label: \"Search\" }))));\n    }));\n}\nconst StreamDropdownMenuWrap = styled(PrestyledSimpleDropdownMenu).withConfig({ displayName: \"StreamDropdownMenuWrap\", componentId: \"sc-vg3kks\" }) `\n    width: 100%;\n`;\nconst SpinnerWrap = styled.div.withConfig({ displayName: \"SpinnerWrap\", componentId: \"sc-18zeh7c\" }) `\n    align-items: center;\n    display: flex;\n    height: 40px;\n    justify-content: center;\n    width: 100%;\n`;\nconst Zero = styled.p.withConfig({ displayName: \"Zero\", componentId: \"sc-mbduk5\" }) `\n    font-size: 14px;\n    overflow: hidden;\n    padding: 8px 24px;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\n","import { Contract } from 'ethers';\nimport { toBN } from '~/utils/bn';\nimport { getContractAbi } from '~/utils/contracts';\nimport { getPublicProvider } from '~/utils/providers';\n/**\n * Scouts for Operator's funding share.\n */\nexport function getSponsorshipStakeForOperator(sponsorship, operatorId) {\n    return sponsorship.stakes.find((stake) => stake.operatorId === operatorId);\n}\n/**\n * Checks if a given Operator funds a given Sponsorship.\n */\nexport function isSponsorshipFundedByOperator(sponsorship, operator) {\n    if (operator == null) {\n        return false;\n    }\n    const operatorStake = getSponsorshipStakeForOperator(sponsorship, operator.id);\n    return operatorStake != null && operatorStake.amountWei > 0n;\n}\n/**\n * Gets the current Sponsorship leave penalty for a given Operator.\n */\nexport async function getSponsorshipLeavePenalty(chainId, sponsorshipId, operatorId) {\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(sponsorshipId, getContractAbi('sponsorship'), provider);\n    return contract.getLeavePenalty(operatorId);\n}\nexport function getSponsorshipExtensionInDays(amount, dailyPayoutRate) {\n    return dailyPayoutRate > 0n && amount >= 0n\n        ? toBN(amount).dividedBy(toBN(dailyPayoutRate)).toNumber()\n        : 0;\n}\n","import { z } from 'zod';\nimport { getSponsorshipExtensionInDays } from '~/utils/sponsorships';\nexport const MinNumberOfOperatorsParser = z\n    .number()\n    .gte(1)\n    .refine((value) => Number.isSafeInteger(value));\nconst CreateSponsorshipForm = z\n    .object({\n    streamId: z.string().trim().min(1),\n    initialAmount: z.bigint().min(0n),\n    dailyPayoutRate: z.bigint().gt(0n),\n    minStakeDuration: z\n        .number()\n        .gte(0)\n        .refine((value) => Number.isSafeInteger(value)),\n    minNumberOfOperators: MinNumberOfOperatorsParser,\n    maxNumberOfOperators: z\n        .number()\n        .gte(0)\n        .refine((value) => Number.isSafeInteger(value))\n        .optional(),\n})\n    .refine(({ minNumberOfOperators: min, maxNumberOfOperators: max }) => typeof max === 'undefined' || max >= min, {\n    message: 'invalid range of operator numbers',\n    path: ['maxNumberOfOperators'],\n})\n    .refine(({ initialAmount, dailyPayoutRate, minStakeDuration }) => getSponsorshipExtensionInDays(initialAmount, dailyPayoutRate) >=\n    minStakeDuration, {\n    message: 'Payout rate is lower than minimum stake duration',\n    path: ['minStakeDuration'],\n});\nexport function isValidCreateSponsorshipForm(input) {\n    return CreateSponsorshipForm.safeParse(input).success;\n}\n","import { produce } from 'immer';\nimport { useCallback, useEffect } from 'react';\nimport { create } from 'zustand';\nimport { Minute } from '~/consts';\nimport { getEarningsForSponsorships } from '~/services/sponsorships';\nimport { toBigInt } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nconst FULL_SYNC_INTERVAL_MS = 3 * Minute;\nexport const useUncollectedEarningsStore = create((set, get) => {\n    function updateEarnings(operatorId, fn) {\n        set((store) => produce(store, ({ earnings }) => {\n            const draft = earnings[operatorId] || {\n                values: {},\n                fetching: false,\n                lastUpdatedTimestamp: undefined,\n                lastSyncTimestamp: undefined,\n            };\n            earnings[operatorId] = produce(draft, fn);\n        }));\n    }\n    return {\n        earnings: {},\n        async fetch(chainId, operatorId) {\n            const { fetching = false } = get().earnings[operatorId] || {};\n            if (fetching) {\n                return;\n            }\n            updateEarnings(operatorId, (draft) => {\n                draft.fetching = true;\n            });\n            try {\n                const values = await getEarningsForSponsorships(chainId, operatorId);\n                updateEarnings(operatorId, (draft) => {\n                    draft.values = values;\n                    draft.lastUpdatedTimestamp = performance.now();\n                    draft.lastSyncTimestamp = performance.now();\n                });\n            }\n            finally {\n                updateEarnings(operatorId, (draft) => {\n                    draft.fetching = false;\n                });\n            }\n        },\n        async tick(chainId, operatorId) {\n            const now = performance.now();\n            const { earnings, fetch } = get();\n            const operatorEarnings = earnings[operatorId];\n            if (operatorEarnings != null) {\n                const { lastSyncTimestamp } = operatorEarnings;\n                // Every once in a while we need to sync with blockchain state to get\n                // correct earnings rate. It may have changed because of other operators\n                // staking and unstaking.\n                if (lastSyncTimestamp != null &&\n                    now - lastSyncTimestamp > FULL_SYNC_INTERVAL_MS) {\n                    await fetch(chainId, operatorId);\n                }\n            }\n            set((store) => produce(store, ({ earnings }) => {\n                const draft = earnings[operatorId];\n                if (draft != null) {\n                    const elapsedInSeconds = toBigInt((now - (draft.lastUpdatedTimestamp ?? now)) / 1000);\n                    for (const sponsorshipId of Object.keys(draft.values)) {\n                        const sponsorshipEarnings = draft.values[sponsorshipId];\n                        if (!sponsorshipEarnings) {\n                            continue;\n                        }\n                        sponsorshipEarnings.uncollectedEarnings =\n                            sponsorshipEarnings.uncollectedEarnings +\n                                sponsorshipEarnings.changePerSecond * elapsedInSeconds;\n                    }\n                    draft.lastUpdatedTimestamp = now;\n                }\n            }));\n        },\n    };\n});\nexport function useUncollectedEarnings(operatorId, sponsorshipId) {\n    const { earnings, fetch, tick } = useUncollectedEarningsStore();\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Let's use `useQuery` instead.\n         */\n        void (async () => {\n            if (!operatorId) {\n                return;\n            }\n            try {\n                await fetch(chainId, operatorId);\n            }\n            catch (e) {\n                console.error(`Could not update earnings for \"${operatorId}\"`, e);\n            }\n        })();\n    }, [operatorId, fetch, chainId]);\n    useEffect(() => {\n        const timeoutId = setInterval(tick, 1000, chainId, operatorId);\n        return () => {\n            clearInterval(timeoutId);\n        };\n    }, [chainId, operatorId, tick]);\n    if (!operatorId) {\n        return null;\n    }\n    // Show spinner when fetching AND we don't have changePerSecond ready.\n    // Otherwise just keep the earnings updating and let the full sync catch up.\n    if (earnings[operatorId]?.fetching &&\n        earnings[operatorId]?.values[sponsorshipId]?.changePerSecond == null) {\n        return undefined;\n    }\n    return earnings[operatorId]?.values[sponsorshipId] || null;\n}\nexport function useCanCollectEarningsCallback() {\n    const { earnings } = useUncollectedEarningsStore();\n    return useCallback((operatorId, sponsorshipId) => {\n        if (earnings[operatorId]?.fetching) {\n            return false;\n        }\n        return ((earnings[operatorId]?.values[sponsorshipId]?.uncollectedEarnings || 0n) >\n            0n);\n    }, [earnings]);\n}\n","import { AbiCoder, Contract, ContractTransactionReceipt } from 'ethers';\nimport { DayInSeconds } from '~/consts';\nimport { getParsedSponsorshipById } from '~/getters';\nimport { useUncollectedEarningsStore } from '~/shared/stores/uncollectedEarnings';\nimport { getSigner, getWalletWeb3Provider } from '~/shared/stores/wallet';\nimport { toBigInt, toBN } from '~/utils/bn';\nimport { getContractAbi, getContractAddress } from '~/utils/contracts';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getPublicProvider } from '~/utils/providers';\nimport { toastedOperation } from '~/utils/toastedOperation';\nimport { call } from '~/utils/tx';\nexport async function createSponsorship(chainId, formData, { onReceipt } = {}) {\n    const { dailyPayoutRate, initialAmount, maxNumberOfOperators, minNumberOfOperators, minStakeDuration, streamId, } = formData;\n    const payoutRatePerSecond = toBigInt(toBN(dailyPayoutRate).dividedBy(DayInSeconds));\n    const minStakeDurationInSeconds = minStakeDuration * DayInSeconds;\n    const policies = [\n        [\n            getContractAddress('sponsorshipStakeWeightedAllocationPolicy', chainId),\n            `${payoutRatePerSecond}`,\n        ],\n        [\n            getContractAddress('sponsorshipDefaultLeavePolicy', chainId),\n            `${minStakeDurationInSeconds}`,\n        ],\n        [getContractAddress('sponsorshipVoteKickPolicy', chainId), 0],\n    ];\n    if (maxNumberOfOperators !== undefined) {\n        policies.push([\n            getContractAddress('sponsorshipMaxOperatorsJoinPolicy', chainId),\n            `${maxNumberOfOperators}`,\n        ]);\n    }\n    await networkPreflight(chainId);\n    return new Promise((resolve, reject) => {\n        void (async () => {\n            try {\n                await toastedOperation('Sponsorship deployment', async () => {\n                    const data = AbiCoder.defaultAbiCoder().encode(['uint32', 'string', 'string', 'address[]', 'uint[]'], [\n                        minNumberOfOperators,\n                        streamId,\n                        JSON.stringify({}), // metadata\n                        policies.map(([policy]) => policy),\n                        policies.map(([, param]) => param),\n                    ]);\n                    const provider = await getWalletWeb3Provider();\n                    const signer = await getSigner();\n                    const token = new Contract(getContractAddress('sponsorshipPaymentToken', chainId), getContractAbi('erc677'), signer);\n                    await call(token, 'transferAndCall', {\n                        args: [\n                            getContractAddress('sponsorshipFactory', chainId),\n                            initialAmount,\n                            data,\n                        ],\n                        onReceipt: async (rawReceipt) => {\n                            /**\n                             * ContractTransactionReceipt converts some logs (Log) into\n                             * event logs (EventLog) – something we need later on to detect\n                             * transfer events.\n                             */\n                            const receipt = new ContractTransactionReceipt(token.interface, provider, rawReceipt);\n                            /**\n                             * 2nd transfer is the transfer from the sponsorship factory to the newly\n                             * deployed sponsorship contract.\n                             */\n                            const [, transfer = undefined] = (receipt.logs.filter((item) => 'eventName' in item && item.eventName === 'Transfer') || []);\n                            const sponsorshipId = transfer?.args.to;\n                            if (typeof sponsorshipId !== 'string') {\n                                throw new Error('Sponsorship deployment failed');\n                            }\n                            await onReceipt?.(receipt);\n                            resolve(sponsorshipId);\n                        },\n                    });\n                });\n            }\n            catch (e) {\n                reject(e);\n            }\n        })();\n    });\n}\nexport async function fundSponsorship(chainId, sponsorshipId, amount, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(getContractAddress('sponsorshipPaymentToken', chainId), getContractAbi('erc677'), signer);\n    await toastedOperation('Sponsorship funding', async () => {\n        await call(contract, 'transferAndCall', {\n            args: [sponsorshipId, amount, '0x'],\n            onReceipt,\n        });\n    });\n}\nexport async function stakeOnSponsorship(chainId, sponsorshipId, amount, operatorAddress, options = {}) {\n    await networkPreflight(chainId);\n    const { toastLabel = 'Stake on sponsorship', onReceipt } = options;\n    await toastedOperation(toastLabel, async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        await call(contract, 'stake', {\n            args: [sponsorshipId, amount],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `stakeOnSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function reduceStakeOnSponsorship(chainId, sponsorshipId, targetAmount, operatorAddress, options = {}) {\n    const { toastLabel = 'Reduce stake on sponsorship', onReceipt } = options;\n    await networkPreflight(chainId);\n    await toastedOperation(toastLabel, async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        await call(contract, 'reduceStakeTo', {\n            args: [sponsorshipId, targetAmount],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `reduceStakeOnSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function forceUnstakeFromSponsorship(chainId, sponsorshipId, operatorAddress, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    await toastedOperation('Force unstake from sponsorship', async () => {\n        const signer = await getSigner();\n        const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n        /**\n         * @todo What is `maxQueuePayoutIterations`? Ask @jtakalai for details.\n         */\n        const maxQueuePayoutIterations = 1000000;\n        await call(contract, 'forceUnstake', {\n            args: [sponsorshipId, maxQueuePayoutIterations],\n            onReceipt,\n        });\n        /**\n         * @todo The following rate updating logic does not belong here! Move\n         * it outside and call after `forceUnstakeFromSponsorship` (this util) calls.\n         */\n        /**\n         * Update uncollected earnings because the rate of change will change\n         * along with stake amount.\n         */\n        const { fetch: updateEarnings } = useUncollectedEarningsStore.getState();\n        await updateEarnings(chainId, operatorAddress);\n    });\n}\nexport async function getEarningsForSponsorships(chainId, operatorAddress) {\n    const provider = await getPublicProvider(chainId);\n    const contract = new Contract(operatorAddress, getContractAbi('operator'), provider);\n    const { addresses, earnings } = await contract.getSponsorshipsAndEarnings();\n    const result = {};\n    for (let i = 0; i < addresses.length; i++) {\n        const sponsorshipId = addresses[i].toLowerCase();\n        const sponsorship = await getParsedSponsorshipById(chainId, sponsorshipId);\n        if (!sponsorship) {\n            result[sponsorshipId] = {\n                uncollectedEarnings: earnings[i],\n                changePerSecond: 0n,\n            };\n            continue;\n        }\n        const myStake = sponsorship.stakes.find((s) => s.operatorId.toLowerCase() === operatorAddress.toLowerCase())?.amountWei || 0n;\n        const { totalStakedWei, payoutPerSecond, isRunning, remainingBalanceWei } = sponsorship;\n        const isSponsorshipPaying = isRunning && remainingBalanceWei > 0n;\n        const totalPayoutPerSecond = isSponsorshipPaying ? payoutPerSecond : 0n;\n        const myPayoutPerSecond = totalStakedWei > 0n\n            ? toBigInt(toBN(myStake)\n                .dividedBy(toBN(totalStakedWei))\n                .multipliedBy(toBN(totalPayoutPerSecond)))\n            : 0n;\n        result[sponsorshipId] = {\n            uncollectedEarnings: earnings[i],\n            changePerSecond: myPayoutPerSecond,\n        };\n    }\n    return result;\n}\nexport async function collectEarnings(chainId, sponsorshipIds, operatorAddress, { onReceipt } = {}) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = new Contract(operatorAddress, getContractAbi('operator'), signer);\n    await toastedOperation('Collect earnings', async () => {\n        await call(contract, 'withdrawEarningsFromSponsorships', {\n            args: [sponsorshipIds],\n            onReceipt,\n        });\n    });\n}\n","import React, { useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipDisclaimer } from '~/components/SponsorshipDisclaimer';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StreamIdDropdown } from '~/components/StreamIdDropdown';\nimport { DayInSeconds } from '~/consts';\nimport { MinNumberOfOperatorsParser, isValidCreateSponsorshipForm, } from '~/forms/createSponsorshipForm';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { ErrorLabel, ErrorWrap, FieldWrap, Group, GroupHeadline, Hint, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { createSponsorship } from '~/services/sponsorships';\nimport { checkIfStreamExists } from '~/services/streams';\nimport Label from '~/shared/components/Ui/Label';\nimport Toast from '~/shared/toasts/Toast';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { getSponsorshipExtensionInDays } from '~/utils/sponsorships';\nimport { errorToast } from '~/utils/toast';\nconst streamNotFoundToaster = toaster(Toast, Layer.Toast);\nfunction CreateSponsorshipModal({ balance, chainId, streamId: streamIdProp = '', onResolve, ...props }) {\n    const [busy, setBusy] = useState(false);\n    const [confirmState, setConfirmState] = useState(false);\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [streamId, setStreamId] = useState(streamIdProp);\n    const [rawInitialAmount, setRawInitialAmount] = useState('');\n    const initialAmount = toBigInt(rawInitialAmount || 0, decimals);\n    const [rawDailyPayoutRate, setRawDailyPayoutRate] = useState('');\n    const dailyPayoutRate = toBigInt(rawDailyPayoutRate || 0, decimals);\n    const [rawMinStakeDurationInDays, setRawMinStakeDurationInDays] = useState('');\n    const minStakeDuration = Math.max(0, Number(rawMinStakeDurationInDays) || 0);\n    const [rawMinNumberOfOperators, setRawMinNumberOfOperators] = useState('1');\n    const minNumberOfOperators = Math.max(0, Number(rawMinNumberOfOperators) || 0);\n    const backdropDismissable = streamId === streamIdProp &&\n        initialAmount !== 0n &&\n        dailyPayoutRate !== 0n &&\n        minStakeDuration === 0 &&\n        minNumberOfOperators === 1;\n    const extensionInDays = getSponsorshipExtensionInDays(initialAmount, dailyPayoutRate);\n    const insufficientFunds = initialAmount > balance;\n    const tooLowOperatorCount = !MinNumberOfOperatorsParser.safeParse(minNumberOfOperators).success;\n    const formData = {\n        streamId,\n        initialAmount,\n        dailyPayoutRate,\n        minStakeDuration,\n        minNumberOfOperators,\n    };\n    const canSubmit = !insufficientFunds && confirmState && isValidCreateSponsorshipForm(formData);\n    const invalidMinStakeDuration = initialAmount > 0n && dailyPayoutRate > 0n && extensionInDays < minStakeDuration;\n    const maxPenaltyPeriodInDays = useConfigValueFromChain('maxPenaltyPeriodSeconds', (value) => Number(value) * DayInSeconds);\n    const tooLongMinStakeDuration = !!maxPenaltyPeriodInDays && minStakeDuration > maxPenaltyPeriodInDays;\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Create Sponsorship\", canSubmit: canSubmit && !busy, submitLabel: \"Create\", submitting: busy, onBeforeAbort: (reason) => !busy && (backdropDismissable || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                if (!(await checkIfStreamExists(chainId, streamId))) {\n                    errorToast({ title: 'Stream does not exist' }, streamNotFoundToaster);\n                    return;\n                }\n                let blockNumber = 0;\n                const sponsorshipId = await createSponsorship(chainId, formData, {\n                    onReceipt: ({ blockNumber: blockNo }) => {\n                        blockNumber = blockNo;\n                        return waitForIndexedBlock(chainId, blockNo);\n                    },\n                });\n                onResolve?.({\n                    sponsorshipId,\n                    streamId: streamIdProp,\n                    blockNumber,\n                });\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(Group, null,\n            React.createElement(GroupHeadline, null, \"Select a Stream\"),\n            React.createElement(SectionHeadline, null, \"Your Sponsorship will incentivize nodes to relay and secure this stream\"),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Select a Stream\"),\n                React.createElement(StreamIdDropdown, { autoFocus: !streamIdProp, placeholder: \"Type to select a stream\", disabled: busy, readOnly: !!streamIdProp, onChange: (value) => {\n                        setStreamId(value);\n                    }, value: streamId }))),\n        React.createElement(Group, null,\n            React.createElement(GroupHeadline, null, \"Set Sponsorship parameters\"),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Initial amount to fund\"),\n                    insufficientFunds && React.createElement(ErrorLabel, null, \"Insufficient funds\")),\n                React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                    React.createElement(TextInput, { name: \"initialAmount\", autoFocus: !!streamIdProp, onChange: (e) => {\n                            setRawInitialAmount(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawInitialAmount }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(SponsorshipPaymentTokenName, null))),\n                React.createElement(Hint, null,\n                    React.createElement(\"p\", null,\n                        \"Wallet balance:\",\n                        ' ',\n                        React.createElement(\"strong\", null,\n                            React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))))),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Payout rate*\"),\n                React.createElement(FieldWrap, null,\n                    React.createElement(TextInput, { name: \"payoutRate\", onChange: (e) => {\n                            setRawDailyPayoutRate(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawDailyPayoutRate }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(SponsorshipPaymentTokenName, null),\n                        \"/day\")),\n                React.createElement(Hint, null,\n                    React.createElement(\"p\", null,\n                        \"The Sponsorship will be funded for\",\n                        ' ',\n                        extensionInDays.toFixed(2).replace(/\\.00$/, ''),\n                        \" days\"))),\n            React.createElement(Section, null,\n                React.createElement(WingedLabelWrap, null,\n                    React.createElement(Label, { \"$wrap\": true }, \"Minimum time operators must stay staked\"),\n                    React.createElement(ErrorWrap, null,\n                        invalidMinStakeDuration && (React.createElement(ErrorLabel, null, \"The value is higher than the duration of the sponsorship\")),\n                        tooLongMinStakeDuration && (React.createElement(ErrorLabel, null,\n                            \"Max amount: \",\n                            maxPenaltyPeriodInDays,\n                            \" days\")))),\n                React.createElement(FieldWrap, { \"$invalid\": invalidMinStakeDuration || tooLongMinStakeDuration },\n                    React.createElement(TextInput, { name: \"minStakeDuration\", onChange: (e) => {\n                            setRawMinStakeDurationInDays(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, value: rawMinStakeDurationInDays }),\n                    React.createElement(TextAppendix, null, \"Days\"))),\n            React.createElement(Section, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Minimum number of operators to start payout\"),\n                React.createElement(FieldWrap, { \"$invalid\": tooLowOperatorCount },\n                    React.createElement(TextInput, { name: \"minNumberOfOperators\", onChange: (e) => {\n                            setRawMinNumberOfOperators(e.target.value);\n                        }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, value: rawMinNumberOfOperators }),\n                    React.createElement(TextAppendix, null,\n                        React.createElement(\"span\", null, \"Operators\"))))),\n        React.createElement(SponsorshipDisclaimer, { checkboxState: confirmState, onCheckboxStateChange: (value) => setConfirmState(value) })));\n}\nexport const createSponsorshipModal = toaster(CreateSponsorshipModal, Layer.Modal);\n","import moment from 'moment';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { confirm } from '~/getters/confirm';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { ErrorLabel, FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { forceUnstakeFromSponsorship, reduceStakeOnSponsorship, stakeOnSponsorship, } from '~/services/sponsorships';\nimport Label from '~/shared/components/Ui/Label';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { getSponsorshipStakeForOperator } from '~/utils/sponsorships';\nconst EmptyStake = {\n    joinedAt: new Date(0),\n    amountWei: 0n,\n};\nfunction EditStakeModal({ chainId, leavePenalty, onResolve, onReject, operator: { dataTokenBalanceWei: availableBalance, id: operatorId, queueEntries }, sponsorship, ...props }) {\n    const { id: sponsorshipId, minimumStakingPeriodSeconds } = sponsorship;\n    const [busy, setBusy] = useState(false);\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const stake = useMemo(() => getSponsorshipStakeForOperator(sponsorship, operatorId), [sponsorship, operatorId]);\n    const lockedStake = stake?.lockedWei || 0n;\n    useEffect(() => {\n        if (!stake) {\n            onReject?.(new Error('Cannot edit. Operator has no stake in sponsorship.'));\n        }\n    }, [stake, onReject]);\n    const globalMinimumStakeWei = useConfigValueFromChain('minimumStakeWei') || 0n;\n    const minimumStakeWei = ((a, b) => (a > b ? a : b))(globalMinimumStakeWei, lockedStake);\n    const { joinedAt, amountWei: currentAmount } = stake || EmptyStake;\n    const [rawAmount, setRawAmount] = useState(toFloat(currentAmount, decimals).toString());\n    useEffect(() => {\n        setRawAmount(toFloat(currentAmount, decimals).toString());\n    }, [currentAmount, decimals]);\n    const minLeaveDate = moment(joinedAt.getTime() + minimumStakingPeriodSeconds * 1000).format('YYYY-MM-DD HH:mm');\n    const hasUndelegationQueue = queueEntries.length > 0;\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const difference = amount - currentAmount;\n    const insufficientFunds = difference > 0n && difference > availableBalance;\n    const isAmountWithinAcceptedRange = amount === 0n || amount >= minimumStakeWei;\n    const canSubmit = isAmountWithinAcceptedRange &&\n        !insufficientFunds &&\n        difference !== 0n &&\n        (difference > 0n ? !hasUndelegationQueue : true);\n    let submitLabel = 'Save';\n    if (amount === 0n) {\n        submitLabel = 'Unstake';\n    }\n    if (difference > 0n) {\n        submitLabel = 'Increase stake';\n    }\n    if (difference < 0n && amount !== 0n) {\n        submitLabel = 'Reduce stake';\n    }\n    const slashingAmount = amount > 0n ? 0n : leavePenalty + lockedStake;\n    const clean = amount === currentAmount;\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Edit stake\", canSubmit: canSubmit && !busy, submitLabel: submitLabel, submitting: busy, onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || clean), onReject: onReject, onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                if (difference >= 0n) {\n                    await stakeOnSponsorship(chainId, sponsorshipId, difference, operatorId, {\n                        toastLabel: 'Increase stake on sponsorship',\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                    });\n                    return void onResolve?.();\n                }\n                if (slashingAmount === 0n) {\n                    await reduceStakeOnSponsorship(chainId, sponsorshipId, amount, operatorId, {\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                        toastLabel: amount === 0n\n                            ? 'Unstake from sponsorship'\n                            : 'Reduce stake on sponsorship',\n                    });\n                    return void onResolve?.();\n                }\n                const slashingReason = leavePenalty > 0n && lockedStake > 0n ? (React.createElement(React.Fragment, null,\n                    \"Your minimum staking period is still ongoing and ends on\",\n                    ' ',\n                    minLeaveDate,\n                    \", and additionally some of your stake is locked in the Sponsorship due to open flags.\")) : leavePenalty > 0n ? (React.createElement(React.Fragment, null,\n                    \"Your minimum staking period is still ongoing and ends on\",\n                    ' ',\n                    minLeaveDate,\n                    \".\")) : (React.createElement(React.Fragment, null, \"Some of your stake is locked in the Sponsorship due to open flags.\"));\n                if (await confirm({\n                    title: 'Your stake will be slashed',\n                    description: (React.createElement(React.Fragment, null,\n                        slashingReason,\n                        \" If you unstake now, you will lose\",\n                        ' ',\n                        React.createElement(SponsorshipDecimals, { amount: slashingAmount }))),\n                    proceedLabel: 'Proceed anyway',\n                    cancelLabel: 'Cancel',\n                    isDangerous: true,\n                })) {\n                    await forceUnstakeFromSponsorship(chainId, sponsorshipId, operatorId, {\n                        onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                    });\n                    onResolve?.();\n                }\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to stake on the selected Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(WingedLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Amount to stake\"),\n                rawAmount !== '' && !isAmountWithinAcceptedRange && (React.createElement(ErrorLabel, null,\n                    \"Minimum value is\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { amount: minimumStakeWei })))),\n            React.createElement(FieldWrap, { \"$invalid\": rawAmount !== '' && !isAmountWithinAcceptedRange },\n                React.createElement(TextInput, { autoFocus: true, name: \"amount\", onChange: (e) => {\n                        setRawAmount(e.target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(availableBalance + currentAmount, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Current stake\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: currentAmount, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Stake change\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: difference, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in Operator\")) : (React.createElement(React.Fragment, null, \"Available balance in Operator\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: availableBalance, tooltip: limitedSpace }))))),\n        amount === 0n && leavePenalty > 0n && (React.createElement(StyledAlert, { type: \"error\", title: \"Your stake will be slashed\" },\n            \"Your minimum staking period is still ongoing and ends on\",\n            ' ',\n            minLeaveDate,\n            \". If you unstake now, you will lose\",\n            ' ',\n            React.createElement(SponsorshipDecimals, { amount: leavePenalty }),\n            \".\")),\n        difference > 0n && hasUndelegationQueue && (React.createElement(StyledAlert, { type: \"error\", title: \"Warning!\" }, \"Cannot stake on sponsorship while delegators are awaiting undelegation\"))));\n}\nexport const editStakeModal = toaster(EditStakeModal, Layer.Modal);\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-1hd6slq\" }) `\n    margin-top: 16px;\n`;\n","export const pluralizeUnit = (value, unit) => {\n    return unit + `${value === 1 ? '' : 's'}`;\n};\n","import moment from 'moment';\nimport React, { useMemo, useState } from 'react';\nimport { toaster } from 'toasterhea';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipDisclaimer } from '~/components/SponsorshipDisclaimer';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { fundSponsorship } from '~/services/sponsorships';\nimport Label from '~/shared/components/Ui/Label';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nimport { pluralizeUnit } from '~/utils/pluralizeUnit';\nfunction FundSponsorshipModal({ balance, chainId, onResolve, sponsorship, ...props }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [rawAmount, setRawAmount] = useState('');\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const [confirmState, setConfirmState] = useState(false);\n    const { payoutPerSecond: pricePerSecond } = sponsorship;\n    const extensionInSeconds = Number(pricePerSecond > 0n ? amount / pricePerSecond : 0n);\n    const extensionDuration = moment.duration(extensionInSeconds, 'seconds');\n    const extensionText = useMemo(() => {\n        if (extensionDuration.asSeconds() === 0) {\n            return '0 days';\n        }\n        const years = extensionDuration.get('years');\n        const months = extensionDuration.get('months');\n        const days = extensionDuration.get('days');\n        const hours = extensionDuration.get('hours');\n        const minutes = extensionDuration.get('minutes');\n        if (!years && !months && !days && !hours) {\n            return `${minutes} ${pluralizeUnit(minutes, 'minute')}`;\n        }\n        if (!years && !months && !days) {\n            return (`${hours} ${pluralizeUnit(hours, 'hour')}` +\n                (minutes ? ` & ${minutes} ${pluralizeUnit(minutes, 'minute')}` : ''));\n        }\n        if (!years && !months) {\n            return `${days} ${pluralizeUnit(days, 'day')} & ${hours} ${pluralizeUnit(hours, 'hour')}`;\n        }\n        if (!years) {\n            return `${months} ${pluralizeUnit(months, 'month')} & ${days} ${pluralizeUnit(days, 'day')}`;\n        }\n        return `${years} ${pluralizeUnit(years, 'year')}, ${months} ${pluralizeUnit(months, 'month')} & ${days} ${pluralizeUnit(days, 'day')}`;\n    }, [extensionDuration]);\n    const startDate = sponsorship.projectedInsolvencyAt?.getTime() ?? Date.now();\n    const endDate = new Date(startDate + extensionInSeconds * 1000);\n    const insufficientFunds = amount > balance;\n    const canSubmit = amount > 0n && !insufficientFunds && confirmState;\n    const [busy, setBusy] = useState(false);\n    const clean = rawAmount === '';\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: \"Fund Sponsorship\", canSubmit: canSubmit && !busy, submitting: busy, submitLabel: \"Fund\", onBeforeAbort: (reason) => !busy && (reason !== RejectionReason.Backdrop || clean), onSubmit: async () => {\n            setBusy(true);\n            try {\n                await fundSponsorship(chainId, sponsorship.id, amount, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to spend to extend the Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, \"Amount to sponsor\"),\n            React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => void setRawAmount(target.value), placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(balance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in your wallet\")) : (React.createElement(React.Fragment, null, \"Your wallet balance\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Sponsorship extended by\"),\n                    React.createElement(PropValue, null, extensionText)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"New end date\"),\n                    React.createElement(PropValue, null, moment(endDate).format(limitedSpace ? 'YY-MM-DD' : 'YYYY-MM-DD'))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Rate\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: sponsorship.payoutPerDay, unitSuffix: \"/day\", tooltip: limitedSpace }))))),\n        React.createElement(SponsorshipDisclaimer, { sponsorship: sponsorship, onResolve: onResolve, checkboxState: confirmState, onCheckboxStateChange: (value) => setConfirmState(value) })));\n}\nexport const fundSponsorshipModal = toaster(FundSponsorshipModal, Layer.Modal);\n","import { useEffect, useState } from 'react';\nimport { NetworkNodeType } from '@streamr/sdk';\nimport { useSubscribe } from 'streamr-client-react';\nimport { z } from 'zod';\nexport function useInterceptHeartbeats(operatorId) {\n    const streamId = `${operatorId}/operator/coordination`;\n    const [heartbeats, setHeartbeats] = useState({});\n    useEffect(() => void setHeartbeats({}), [operatorId]);\n    useSubscribe({ id: streamId }, {\n        cacheKey: operatorId,\n        disabled: !operatorId,\n        onError: (e) => {\n            console.warn('Failed to count live nodes', e);\n        },\n        onMessage(msg) {\n            const parsedContent = msg.getParsedContent();\n            const message = {\n                parsedContent,\n                messageId: msg.messageId,\n            };\n            if (!isHeartbeatMessage(message)) {\n                return;\n            }\n            const { parsedContent: { peerDescriptor, applicationVersion }, messageId: { timestamp }, } = message;\n            setHeartbeats((prev) => ({\n                ...prev,\n                [peerDescriptor.nodeId]: {\n                    ...peerDescriptor,\n                    timestamp,\n                    applicationVersion,\n                },\n            }));\n        },\n    });\n    return heartbeats;\n}\nconst HeartbeatMessage = z.object({\n    messageId: z.object({\n        timestamp: z.number(),\n    }),\n    parsedContent: z.object({\n        msgType: z.literal('heartbeat'),\n        applicationVersion: z.string().optional(),\n        peerDescriptor: z.object({\n            nodeId: z.string(),\n            type: z.optional(z.nativeEnum(NetworkNodeType)),\n            websocket: z\n                .object({\n                host: z.string(),\n                port: z.number(),\n                tls: z.boolean(),\n            })\n                .optional(),\n            openInternet: z.boolean().optional(),\n            region: z.number().optional(),\n        }),\n    }),\n});\nfunction isHeartbeatMessage(arg) {\n    return HeartbeatMessage.safeParse(arg).success;\n}\n","import { useEffect, useState } from 'react';\nexport default function useOperatorLiveNodes(heartbeats) {\n    const count = Object.keys(heartbeats).length;\n    const [isLoading, setIsLoading] = useState(false);\n    const detectedAny = count > 0;\n    useEffect(() => {\n        if (detectedAny) {\n            return void setIsLoading(false);\n        }\n        let mounted = true;\n        setIsLoading(true);\n        setTimeout(() => {\n            if (mounted) {\n                setIsLoading(false);\n            }\n        }, 30000);\n        return () => {\n            mounted = false;\n        };\n    }, [detectedAny]);\n    return {\n        count,\n        isLoading,\n    };\n}\n","import { components } from 'react-select';\nimport styled, { css } from 'styled-components';\nimport BlackCheckmarkIcon from '~/shared/assets/icons/checkmark-black.svg';\nimport CheckmarkIcon from '~/shared/assets/icons/checkmark.svg';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nconst transitionTime = 150;\nexport const StyledCaretIcon = styled(SvgIcon).withConfig({ displayName: \"StyledCaretIcon\", componentId: \"sc-1k04u30\" }) `\n    height: 8px;\n    width: 10px;\n    transition: all ${transitionTime}ms ease-in-out;\n    color: ${COLORS.primaryLight};\n    &.rotated {\n        transform: rotate(180deg);\n        color: ${COLORS.primaryContrast};\n    }\n    &.disabled {\n        color: ${COLORS.disabled};\n    }\n    &.whiteVariant {\n        color: ${COLORS.primaryLight};\n    }\n`;\nexport const StyledDropdownIndicator = styled(components.DropdownIndicator).withConfig({ displayName: \"StyledDropdownIndicator\", componentId: \"sc-j84yrq\" }) `\n    margin-right: 10px;\n`;\nexport const StyledCloseIcon = styled(SvgIcon).withConfig({ displayName: \"StyledCloseIcon\", componentId: \"sc-1dsftzz\" }) `\n    color: ${COLORS.primaryLight};\n    &.menu-is-open {\n        color: ${COLORS.primaryContrast};\n    }\n`;\nconst StyledOptionAfter = css `\n    :after {\n        content: ' ';\n        background: url('${CheckmarkIcon}') center center no-repeat;\n        width: 10px;\n        height: 10px;\n        position: absolute;\n        right: 12px;\n        top: 12px;\n    }\n`;\nexport const StyledOption = styled(components.Option).withConfig({ displayName: \"StyledOption\", componentId: \"sc-zbdtph\" }) `\n    cursor: pointer;\n    color: ${COLORS.primaryLight};\n    font-size: 14px;\n    font-weight: 400;\n    transition: all ${transitionTime}ms ease-in-out;\n    position: relative;\n    &:active {\n        background-color: ${COLORS.primary} !important;\n    }\n    &:focus {\n        background-color: ${COLORS.focus};\n    }\n\n    ${(props) => {\n    if (props.isSelected) {\n        return StyledOptionAfter;\n    }\n}}\n`;\nexport const getControlStyles = (styles, isFocused, isOpen, isDisabled, noShrink, fullWidth) => {\n    const styleObject = {\n        ...styles,\n        backgroundColor: COLORS.secondary,\n        borderRadius: '4px',\n        border: 'none',\n        fontWeight: 500,\n        width: 'auto',\n        display: 'inline-flex',\n        transition: `background-color ${transitionTime}ms ease-in-out`,\n        cursor: 'pointer',\n    };\n    if (isFocused) {\n        styleObject.boxShadow = `none`;\n    }\n    if (isOpen) {\n        styleObject.backgroundColor = COLORS.primary;\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.cursor = 'not-allowed';\n    }\n    if (noShrink) {\n        styleObject.flexWrap = 'nowrap';\n    }\n    if (fullWidth) {\n        styleObject.width = '100%';\n    }\n    return styleObject;\n};\nexport const getPlaceholderStyles = (styles, isOpen, isDisabled) => {\n    const styleObject = {\n        ...styles,\n        color: COLORS.primaryLight,\n        display: 'block',\n        position: 'relative',\n        top: '0',\n        transform: 'translateY(0)',\n        fontSize: '14px',\n        lineHeight: '36px',\n        fontWeight: 500,\n        transition: `color ${transitionTime}ms ease-in-out`,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.color = COLORS.disabled;\n    }\n    return styleObject;\n};\nexport const getSingleValueStyles = (styles, isOpen, isDisabled, noShrink) => {\n    const styleObject = {\n        ...styles,\n        position: 'relative',\n        maxWidth: '100%',\n        top: 0,\n        transform: 'translateY(0)',\n        fontSize: '14px',\n        fontWeight: 500,\n        lineHeight: '36px',\n        color: COLORS.primaryLight,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    if (isDisabled) {\n        styleObject.color = COLORS.disabled;\n    }\n    if (noShrink) {\n        styleObject.overflow = 'unset';\n    }\n    return styleObject;\n};\nexport const getMenuStyles = (styles) => {\n    return {\n        ...styles,\n        background: '#FFF',\n        boxShadow: '0px 3px 5px rgba(9, 30, 66, 0.2), 0px 0px 1px rgba(9, 30, 66, 0.31)',\n        border: 'none',\n        borderRadius: '8px',\n        color: COLORS.primary,\n        width: '280px',\n        marginTop: '8px',\n        padding: 0,\n    };\n};\nexport const getMenuListStyles = (styles) => {\n    return {\n        ...styles,\n        padding: 0,\n        borderRadius: '8px',\n    };\n};\nexport const getOptionStyles = (styles, isSelected) => {\n    const styleObject = {\n        ...styles,\n        cursor: 'pointer',\n        color: COLORS.primaryLight,\n        fontSize: '14px',\n        fontWeight: 400,\n        lineHeight: '18px',\n    };\n    if (isSelected) {\n        styleObject.backgroundColor = COLORS.primaryLight;\n        styleObject.color = COLORS.primaryContrast;\n    }\n    return styleObject;\n};\nexport const getClearIndicatorStyles = (styles, isOpen) => {\n    const styleObject = {\n        ...styles,\n        color: COLORS.primaryLight,\n        transition: `color ${transitionTime}ms ease-in-out`,\n    };\n    if (isOpen) {\n        styleObject.color = COLORS.primaryContrast;\n    }\n    return styleObject;\n};\nconst SelectedWhiteOption = css `\n    :after {\n        content: ' ';\n        background: url('${BlackCheckmarkIcon}') center center no-repeat;\n        width: 10px;\n        height: 10px;\n        position: absolute;\n        right: 12px;\n        top: 18px;\n    }\n`;\nexport const StyledWhiteDropdownOption = styled(components.Option).withConfig({ displayName: \"StyledWhiteDropdownOption\", componentId: \"sc-10wpnoo\" }) `\n    position: relative;\n    &:active {\n        //background-color: ${COLORS.primary} !important;\n    }\n    &:focus {\n        background-color: ${COLORS.focus};\n    }\n\n    ${(props) => {\n    if (props.isSelected) {\n        return SelectedWhiteOption;\n    }\n}}\n`;\nexport const getWhitePlaceholderStyles = (styles) => {\n    return {\n        ...styles,\n        color: COLORS.disabled,\n    };\n};\nexport const getWhiteControlStyles = (styles, isFocused, isDisabled, noShrink, fullWidth) => {\n    const styleObject = {\n        ...styles,\n        fontSize: '14px',\n        borderColor: COLORS.secondaryHover,\n        width: 'auto',\n        display: 'inline-flex',\n    };\n    if (isFocused) {\n        styleObject.borderColor = COLORS.focus;\n        styleObject.boxShadow = `0 0 0 1px ${COLORS.focus}`;\n    }\n    if (isDisabled) {\n        styleObject.cursor = 'not-allowed';\n        styleObject.border = `1px solid ${COLORS.Border}`;\n        styleObject.backgroundColor = 'white';\n    }\n    if (noShrink) {\n        styleObject.flexWrap = 'nowrap';\n    }\n    if (fullWidth) {\n        styleObject.width = '100%';\n    }\n    return styleObject;\n};\nexport const getWhiteMenuStyles = (styles) => {\n    return {\n        ...styles,\n        background: '#FFF',\n        border: 'none',\n        borderRadius: '8px',\n        color: COLORS.primary,\n        padding: 0,\n        boxShadow: '0px 0px 4px rgba(0, 0, 0, 0.1)',\n        marginTop: '4px',\n        width: '280px',\n    };\n};\nexport const getWhiteMenuListStyles = (styles) => {\n    return {\n        ...styles,\n        padding: 0,\n        borderRadius: '8px',\n    };\n};\nexport const getWhiteOptionStyles = (styles, isSelected) => {\n    const styleObject = {\n        ...styles,\n        cursor: 'pointer',\n        color: COLORS.primaryLight,\n        fontSize: '14px',\n        fontWeight: 400,\n        lineHeight: '18px',\n    };\n    if (isSelected) {\n        styleObject.color = COLORS.primaryLight;\n        styleObject.backgroundColor = 'white';\n    }\n    return styleObject;\n};\n","import React, { useEffect, useMemo, useState } from 'react';\nimport ReactSelect, { components, } from 'react-select';\nimport { z } from 'zod';\nimport { StyledCaretIcon, StyledCloseIcon, StyledDropdownIndicator, StyledOption, StyledWhiteDropdownOption, getClearIndicatorStyles, getControlStyles, getMenuListStyles, getMenuStyles, getOptionStyles, getPlaceholderStyles, getSingleValueStyles, getWhiteControlStyles, getWhiteMenuListStyles, getWhiteMenuStyles, getWhiteOptionStyles, getWhitePlaceholderStyles, } from './selectField2.styles';\nconst DropdownIndicator = (props) => {\n    return (React.createElement(StyledDropdownIndicator, { ...props },\n        React.createElement(StyledCaretIcon, { name: \"caretDown\", className: (props.selectProps.menuIsOpen ? 'rotated ' : '') +\n                (props.selectProps.isDisabled ? 'disabled ' : '') +\n                (props.whiteVariant ? 'whiteVariant' : '') })));\n};\nconst ClearIndicator = (props) => {\n    return (components.ClearIndicator && (React.createElement(components.ClearIndicator, { ...props },\n        React.createElement(StyledCloseIcon, { name: 'close', className: props.selectProps.menuIsOpen ? 'menu-is-open' : '' }))));\n};\nexport function SelectField2({ placeholder, options, value, onChange, disabled = false, isClearable = true, whiteVariant = false, noShrink = false, fullWidth = false, }) {\n    const [isOpen, setIsOpen] = useState(false);\n    const [selected, setSelected] = useState();\n    const defaultStyles = useMemo(() => ({\n        control: (styles, props) => getControlStyles(styles, props.isFocused, isOpen, disabled, noShrink, fullWidth),\n        placeholder: (styles) => getPlaceholderStyles(styles, isOpen, disabled),\n        singleValue: (styles) => getSingleValueStyles(styles, isOpen, disabled, noShrink),\n        menu: (styles) => getMenuStyles(styles),\n        menuList: (styles) => getMenuListStyles(styles),\n        menuPortal: (styles) => ({\n            ...styles,\n            zIndex: 1000,\n        }),\n        option: (styles, props) => getOptionStyles(styles, props.isSelected),\n        clearIndicator: (styles) => getClearIndicatorStyles(styles, isOpen),\n    }), [disabled, fullWidth, isOpen, noShrink]);\n    const whiteVariantStyles = useMemo(() => ({\n        placeholder: (styles) => getWhitePlaceholderStyles(styles),\n        control: (styles, props) => getWhiteControlStyles(styles, props.isFocused, disabled, noShrink, fullWidth),\n        menu: (styles) => getWhiteMenuStyles(styles),\n        menuList: (styles) => getWhiteMenuListStyles(styles),\n        menuPortal: (styles) => ({\n            ...styles,\n            zIndex: 1000,\n        }),\n        option: (styles, props) => getWhiteOptionStyles(styles, props.isSelected),\n    }), [disabled, fullWidth, noShrink]);\n    useEffect(() => {\n        setSelected(value);\n    }, [value]);\n    const handleChange = (option) => {\n        if (disabled) {\n            return;\n        }\n        if (isClearable && option === null) {\n            setSelected(undefined);\n            onChange(null);\n            return;\n        }\n        if (!isOption(option)) {\n            return;\n        }\n        setSelected(option.value);\n        onChange(option.value);\n    };\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ReactSelect, { placeholder: placeholder, options: options, isSearchable: false, isClearable: isClearable, isDisabled: disabled, menuIsOpen: isOpen, onMenuOpen: () => {\n                setIsOpen(true);\n            }, onMenuClose: () => {\n                setIsOpen(false);\n            }, components: {\n                DropdownIndicator: (props) => (React.createElement(DropdownIndicator, { whiteVariant: whiteVariant, ...props })),\n                ClearIndicator,\n                IndicatorSeparator: () => React.createElement(React.Fragment, null),\n                Option: whiteVariant ? StyledWhiteDropdownOption : StyledOption,\n            }, value: selected ? options.find((option) => option.value === selected) : null, onChange: handleChange, styles: whiteVariant ? whiteVariantStyles : defaultStyles, menuPortalTarget: document.body })));\n}\nfunction isOption(arg) {\n    return z.object({ label: z.string(), value: z.string() }).safeParse(arg).success;\n}\n","import { useState, useCallback, useEffect, useReducer } from 'react';\nimport copyToClipboard from 'copy-to-clipboard';\nimport { toaster } from 'toasterhea';\nimport { successToast } from '~/utils/toast';\nimport Toast from '~/shared/toasts/Toast';\nimport { Layer } from '~/utils/Layer';\nconst SUSTAIN_FOR = 3000; // ms\nconst copyToast = toaster(Toast, Layer.Toast);\nexport default function useCopy() {\n    const [isCopied, setIsCopied] = useState(false);\n    const [copiedAt, touch] = useReducer((current, now) => (current + SUSTAIN_FOR > now ? current : now), Number.NEGATIVE_INFINITY);\n    const copy = useCallback((value, { onAfterCopied, toastMessage = 'Copied!', } = {}) => {\n        copyToClipboard(value);\n        onAfterCopied?.(value);\n        if (typeof toastMessage === 'string') {\n            successToast({\n                title: toastMessage,\n            }, copyToast);\n        }\n        touch(Date.now());\n    }, []);\n    useEffect(() => {\n        if (copiedAt < 0) {\n            return () => { };\n        }\n        setIsCopied(true);\n        const timeout = setTimeout(() => {\n            setIsCopied(false);\n        }, SUSTAIN_FOR);\n        return () => {\n            clearTimeout(timeout);\n        };\n    }, [copiedAt]);\n    return {\n        copy,\n        isCopied,\n    };\n}\n","const normalizeVersion = (ver) => {\n    if (!ver)\n        return [NaN, NaN, NaN];\n    const parts = ver.split('.').map((part) => {\n        const num = parseInt(part, 10);\n        return isNaN(num) ? NaN : num;\n    });\n    // Check if any part is invalid first\n    if (parts.some(isNaN))\n        return [NaN, NaN, NaN];\n    // Then pad missing parts with 0\n    return [parts[0] ?? 0, parts[1] ?? 0, parts[2] ?? 0];\n};\nexport const isNodeVersionGreaterThanOrEqualTo = (version, requiredVersion) => {\n    const [major, minor, patch] = normalizeVersion(version);\n    const [requiredMajor, requiredMinor, requiredPatch] = normalizeVersion(requiredVersion);\n    // Handle invalid inputs\n    if (isNaN(major) ||\n        isNaN(minor) ||\n        isNaN(patch) ||\n        isNaN(requiredMajor) ||\n        isNaN(requiredMinor) ||\n        isNaN(requiredPatch)) {\n        return false;\n    }\n    // Compare each part sequentially\n    if (major !== requiredMajor) {\n        return major > requiredMajor;\n    }\n    if (minor !== requiredMinor) {\n        return minor > requiredMinor;\n    }\n    return patch >= requiredPatch;\n};\n","import { Minute } from '~/consts';\nconst units = [\n    {\n        max: 60000,\n        value: 1000,\n        name: 'second',\n        prev: 'a second ago',\n    },\n    {\n        max: 2760000,\n        value: 60000,\n        name: 'minute',\n        prev: 'a minute ago',\n    },\n    {\n        max: 72000000,\n        value: 3600000,\n        name: 'hour',\n        prev: 'an hour ago',\n    },\n    {\n        max: 518400000,\n        value: 86400000,\n        name: 'day',\n        prev: 'yesterday',\n    },\n    {\n        max: 2419200000,\n        value: 604800000,\n        name: 'week',\n        prev: 'last week',\n    },\n    {\n        max: 28512000000,\n        value: 2592000000,\n        name: 'month',\n        prev: 'last month',\n    }, // max: 11 months\n];\nfunction format(diff, divisor, unit, prev) {\n    const val = Math.round(diff / divisor);\n    return val <= 1 ? prev : `${val} ${unit}s ago`;\n}\nexport function ago(date) {\n    const diff = Math.abs(Date.now() - date.getTime());\n    // less than a minute\n    if (diff < Minute) {\n        return 'just now';\n    }\n    for (let i = 0; i < units.length; i += 1) {\n        if (diff < units[i].max) {\n            return format(diff, units[i].value, units[i].name, units[i].prev);\n        }\n    }\n    // `year` is the final unit.\n    // same as:\n    //  {\n    //    max: Infinity,\n    //    value: 31536000000,\n    //    name: 'year',\n    //    prev: 'last year'\n    //  }\n    return format(diff, 31536000000, 'year', 'last year');\n}\nfunction humanFormat(diff, divisor, unit) {\n    const val = Math.round(diff / divisor);\n    return `${val} ${unit}${val === 1 ? '' : 's'}`;\n}\nexport function humanize(durationSeconds) {\n    const durationMs = durationSeconds * 1000;\n    for (let i = 0; i < units.length; i += 1) {\n        if (durationMs < units[i].max) {\n            return humanFormat(durationMs, units[i].value, units[i].name);\n        }\n    }\n    return humanFormat(durationMs, 31536000000, 'year');\n}\n","import CopyIcon from '@atlaskit/icon/glyph/copy';\nimport React, { useMemo, useState, useEffect } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { getSelfDelegationFraction } from '~/getters';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useAllOperatorsForWalletQuery } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport FormModal, { CopyButtonWrapAppendix, ErrorLabel, FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, WingedLabelWrap, } from '~/modals/FormModal';\nimport { stakeOnSponsorship } from '~/services/sponsorships';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Label from '~/shared/components/Ui/Label';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport Toast from '~/shared/toasts/Toast';\nimport { isNodeVersionGreaterThanOrEqualTo } from '~/shared/utils/nodeVersion';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { humanize } from '~/shared/utils/time';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isMessagedObject } from '~/utils/exceptions';\nimport { Route as R } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nconst limitErrorToaster = toaster(Toast, Layer.Toast);\nconst requiredNodeVersion = '102.0.0';\nfunction JoinSponsorshipModal({ chainId, onResolve, preselectedOperator, sponsorship, ...props }) {\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const wallet = useWalletAccount();\n    const { data: operatorChoices = null } = useAllOperatorsForWalletQuery(wallet);\n    const [operator, setSelectedOperator] = useState(preselectedOperator);\n    const { id: operatorId, dataTokenBalanceWei: operatorBalance, metadata } = operator;\n    const hasUndelegationQueue = operator.queueEntries.length > 0;\n    const { streamId } = sponsorship;\n    const [busy, setBusy] = useState(false);\n    const [rawAmount, setRawAmount] = useState('');\n    const amount = ((a) => (a > 0n ? a : 0n))(toBigInt(rawAmount || 0, decimals));\n    const heartbeats = useInterceptHeartbeats(operatorId);\n    const { count: liveNodesCount, isLoading: liveNodesCountLoading } = useOperatorLiveNodes(heartbeats);\n    const liveNodesOk = (!liveNodesCountLoading && liveNodesCount > 0) ||\n        /**\n         * Relax live node checking for broken operators (v1) as they cannot join the recovery\n         * sponsorship otherwise.\n         */\n        operator.contractVersion === 1;\n    const insufficientFunds = amount > operatorBalance;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, decimals)) || toBN(0);\n    const minimumSelfDelegationAmount = toBigInt(toBN(operator.valueWithoutEarnings).multipliedBy(minimumSelfDelegationFraction));\n    const earlyLeaverPenaltyWei = useConfigValueFromChain('earlyLeaverPenaltyWei') || 0n;\n    const ownerDelegationPercentage = useMemo(() => getSelfDelegationFraction(operator), [operator]);\n    const currentSelfDelegationAmount = toBigInt(toBN(operator.valueWithoutEarnings).multipliedBy(ownerDelegationPercentage));\n    const isBelowSelfFundingLimit = ownerDelegationPercentage.isLessThan(minimumSelfDelegationFraction);\n    const minimumStakeWei = useConfigValueFromChain('minimumStakeWei');\n    const isAboveMinimumStake = minimumStakeWei != null && amount >= minimumStakeWei;\n    const canSubmit = amount > 0n &&\n        !insufficientFunds &&\n        liveNodesOk &&\n        isAboveMinimumStake &&\n        !hasUndelegationQueue &&\n        !isBelowSelfFundingLimit;\n    const { copy } = useCopy();\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    const clean = amount === 0n;\n    return (React.createElement(FormModal, { ...props, title: \"Join Sponsorship as Operator\", canSubmit: canSubmit && !busy, submitLabel: \"Join\", submitting: busy, onBeforeAbort: (reason) => !busy && (clean || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await stakeOnSponsorship(chainId, sponsorship.id, amount, operator.id, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isMessagedObject(e) && /error_tooManyOperators/.test(e.message)) {\n                    return void errorToast({\n                        title: 'Limit reached',\n                        desc: 'All operator slots are taken.',\n                    }, limitErrorToaster);\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please set the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" to stake on the selected Sponsorship\"),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, \"Sponsorship Stream ID\"),\n            React.createElement(FieldWrap, { \"$grayedOut\": true },\n                React.createElement(TextInput, { defaultValue: streamId, readOnly: true }),\n                !!streamId && (React.createElement(CopyButtonWrapAppendix, null,\n                    React.createElement(\"button\", { type: \"button\", onClick: () => void copy(streamId) },\n                        React.createElement(CopyIcon, { label: \"Copy\", size: \"small\" }))))),\n            React.createElement(StyledLabelWrap, null,\n                React.createElement(Label, { \"$wrap\": true }, \"Amount to stake\"),\n                rawAmount !== '' && !isAboveMinimumStake && (React.createElement(ErrorLabel, null,\n                    \"Minimum value is\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { amount: minimumStakeWei || 0n })))),\n            React.createElement(FieldWrap, { \"$invalid\": rawAmount !== '' && !isAboveMinimumStake },\n                React.createElement(TextInput, { autoFocus: true, name: \"amount\", onChange: ({ target }) => void setRawAmount(target.value), placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(operatorBalance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Minimum stake duration\"),\n                    React.createElement(PropValue, null, humanize(sponsorship.minimumStakingPeriodSeconds))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in Operator\")) : (React.createElement(React.Fragment, null, \"Available balance in Operator\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: operatorBalance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operatorChoices?.length === 1 ? (React.createElement(React.Fragment, null, metadata.name != null\n                        ? `${metadata.name} (${truncate(operatorId)})`\n                        : operatorId)) : (React.createElement(React.Fragment, null,\n                        React.createElement(SelectField2, { placeholder: \"Operator\", options: operatorChoices?.map((o) => ({\n                                value: o.id,\n                                label: `${o.metadata.name} (${truncate(o.id)})`,\n                            })) ?? [], value: operator.id, onChange: (id) => {\n                                const selectedOp = operatorChoices?.find((o) => o.id === id);\n                                if (selectedOp) {\n                                    setSelectedOperator(selectedOp);\n                                }\n                            }, whiteVariant: true, isClearable: false }))))))),\n        isBelowSelfFundingLimit && (React.createElement(StyledAlert, { type: \"error\", title: \"Low self-funding\" },\n            \"You cannot stake on Sponsorships because your Operator is below the self-funding requirement of\",\n            ' ',\n            minimumSelfDelegationFraction.multipliedBy(100).toFixed(0),\n            \"%. Increase your Operator stake by at least\",\n            ' ',\n            React.createElement(SponsorshipDecimals, { amount: minimumSelfDelegationAmount - currentSelfDelegationAmount }),\n            ' ',\n            \"to continue.\")),\n        hasUndelegationQueue && (React.createElement(StyledAlert, { type: \"error\", title: \"Warning!\" }, \"Cannot stake on sponsorship while delegators are awaiting undelegation\")),\n        !isBelowSelfFundingLimit && !hasUndelegationQueue && (React.createElement(LiveNodesAndVersionCheck, { liveNodesCountLoading: liveNodesCountLoading, liveNodesCount: liveNodesCount, heartbeats: heartbeats })),\n        sponsorship.minimumStakingPeriodSeconds > 0 && (React.createElement(StyledAlert, { type: \"error\", title: React.createElement(React.Fragment, null,\n                \"This Sponsorship has a minimum staking period of\",\n                ' ',\n                humanize(sponsorship.minimumStakingPeriodSeconds),\n                \". If you unstake or get voted out during this period, you will lose\",\n                ' ',\n                React.createElement(SponsorshipDecimals, { amount: earlyLeaverPenaltyWei }),\n                \" in addition to the normal slashing penalty.\") }))));\n}\nfunction LiveNodesAndVersionCheck({ liveNodesCountLoading, liveNodesCount, heartbeats, }) {\n    const [hasWaitedForHeartbeats, setHasWaitedForHeartbeats] = useState(false);\n    useEffect(() => {\n        const timer = setTimeout(() => {\n            setHasWaitedForHeartbeats(true);\n        }, 6000); // Wait for 6 seconds to ensure heartbeats are available from ~all nodes\n        return () => clearTimeout(timer);\n    }, []);\n    if (!hasWaitedForHeartbeats || liveNodesCountLoading) {\n        return (React.createElement(StyledAlert, { type: \"loading\", title: \"Checking Streamr nodes\" },\n            React.createElement(\"span\", null,\n                \"In order to continue, you need to have, 1 or more Streamr nodes running, and have them all be correctly configured. All of your nodes must be running version \",\n                requiredNodeVersion,\n                \" or higher. You are vulnerable to slashing if you stake with misconfigured nodes.\")));\n    }\n    const nodeVersions = Object.values(heartbeats).map((heartbeat) => heartbeat?.applicationVersion);\n    const areAllNodesRunningRequiredVersion = nodeVersions.every((version) => {\n        // If version is undefined (old node) or null, treat it as not meeting the requirement\n        if (!version) {\n            return false;\n        }\n        return isNodeVersionGreaterThanOrEqualTo(version, requiredNodeVersion);\n    });\n    if (!areAllNodesRunningRequiredVersion) {\n        return (React.createElement(StyledAlert, { type: \"error\", title: \"Streamr nodes are outdated\" },\n            React.createElement(\"p\", null,\n                \"The minimum required version for all of your Streamr nodes is\",\n                ' ',\n                requiredNodeVersion,\n                \" or higher. Please update your nodes.\"),\n            React.createElement(\"a\", { href: R.docs('/guides/how-to-update-your-streamr-node/'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                \"How to upgrade a Streamr node \",\n                React.createElement(LinkIcon, { name: \"externalLink\" }))));\n    }\n    if (liveNodesCount > 0) {\n        return (React.createElement(StyledAlert, { type: \"success\", title: \"Streamr nodes detected\" },\n            React.createElement(\"span\", null, \"Once you stake, your nodes will start working on the stream. Please ensure your nodes have enough resources available to handle the traffic in the stream.\")));\n    }\n    return (React.createElement(StyledAlert, { type: \"error\", title: \"Streamr nodes not detected\" },\n        React.createElement(\"p\", null, \"In order to continue, you need to have one or more Streamr nodes running and correctly configured. You will be slashed if you stake without your nodes contributing resources to the stream.\"),\n        React.createElement(\"a\", { href: R.docs('/node-runners/run-a-node'), target: \"_blank\", rel: \"noreferrer noopener\" },\n            \"How to run a Streamr node \",\n            React.createElement(LinkIcon, { name: \"externalLink\" }))));\n}\nconst StyledAlert = styled(Alert).withConfig({ displayName: \"StyledAlert\", componentId: \"sc-xe7nng\" }) `\n    margin-top: 16px;\n\n    a {\n        color: ${COLORS.link};\n        display: flex;\n        align-items: center;\n    }\n`;\nconst LinkIcon = styled(SvgIcon).withConfig({ displayName: \"LinkIcon\", componentId: \"sc-1tdviir\" }) `\n    width: 24px;\n`;\nconst StyledLabelWrap = styled(WingedLabelWrap).withConfig({ displayName: \"StyledLabelWrap\", componentId: \"sc-8yz978\" }) `\n    margin-top: 10px;\n`;\nexport const joinSponsorshipModal = toaster(JoinSponsorshipModal, Layer.Modal);\n","import { produce } from 'immer';\nimport { create } from 'zustand';\nimport { FlagBusy } from '~/utils/errors';\nconst Flag = {\n    isDelegatingFunds: (operatorId, wallet = '') => [\n        operatorId,\n        wallet.toLowerCase(),\n    ],\n    isUndelegatingFunds: (operatorId, wallet = '') => [\n        operatorId,\n        wallet.toLowerCase(),\n    ],\n    isCreatingSponsorship: (wallet) => [wallet.toLowerCase()],\n    isFundingSponsorship: (sponsorshipId, wallet) => [\n        sponsorshipId,\n        wallet.toLowerCase(),\n    ],\n    isJoiningSponsorshipAsOperator: (sponsorshipId, operatorId) => [\n        sponsorshipId,\n        operatorId,\n    ],\n    isEditingSponsorshipFunding: (sponsorshipId, operatorId) => [\n        sponsorshipId,\n        operatorId,\n    ],\n};\nexport function flagKey(key, ...params) {\n    const fn = Flag[key];\n    return JSON.stringify([key, ...fn(...params)]);\n}\nconst useFlagStore = create((set, get) => {\n    return {\n        flags: {},\n        async wrap(key, fn) {\n            if (get().flags[key]) {\n                throw FlagBusy;\n            }\n            set((store) => produce(store, ({ flags }) => {\n                flags[key] = true;\n            }));\n            try {\n                return await fn();\n            }\n            finally {\n                set((store) => produce(store, ({ flags }) => {\n                    delete flags[key];\n                }));\n            }\n        },\n    };\n});\nexport function useIsFlagged(key) {\n    const { flags } = useFlagStore();\n    return typeof key === 'string' && !!flags[key];\n}\nexport function useFlagger() {\n    return useFlagStore().wrap;\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport { useCallback } from 'react';\nimport { Minute } from '~/consts';\nimport { Sponsorship_OrderBy, } from '~/generated/gql/network';\nimport { getAllSponsorships, getParsedSponsorshipById, getSponsorshipsByCreator, getSponsorshipsByStreamId, } from '~/getters';\nimport { getSponsorshipStats } from '~/getters/getSponsorshipStats';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { invalidateActiveOperatorByIdQueries, useOperatorForWalletQuery, } from '~/hooks/operators';\nimport { invalidateSponsorshipFundingHistoryQueries } from '~/hooks/useSponsorshipFundingHistoryQuery';\nimport { createSponsorshipModal } from '~/modals/CreateSponsorshipModal';\nimport { editStakeModal } from '~/modals/EditStakeModal';\nimport { fundSponsorshipModal } from '~/modals/FundSponsorshipModal';\nimport { joinSponsorshipModal } from '~/modals/JoinSponsorshipModal';\nimport { Sponsorship } from '~/parsers/Sponsorship';\nimport { flagKey, useFlagger, useIsFlagged } from '~/shared/stores/flags';\nimport { getSigner, useWalletAccount } from '~/shared/stores/wallet';\nimport { getQueryClient } from '~/utils';\nimport { getBalance } from '~/utils/balance';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { FlagBusy } from '~/utils/errors';\nimport { isRejectionReason } from '~/utils/exceptions';\nimport { getSponsorshipLeavePenalty } from '~/utils/sponsorships';\nimport { errorToast } from '~/utils/toast';\nimport { useTokenInfo } from '~/utils/tokens';\nimport { useRequestedBlockNumber } from '.';\nasync function getSponsorshipsAndParse(chainId, getter) {\n    const sponsorships = [];\n    const rawSponsorships = await getter();\n    for (const raw of rawSponsorships) {\n        sponsorships.push(Sponsorship.parse(raw, chainId));\n    }\n    return sponsorships;\n}\nfunction invalidateSponsorshipsForCreatorQueries(chainId, address) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: [\n            'useSponsorshipsForCreatorQuery',\n            chainId,\n            address?.toLowerCase() || '',\n        ],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipsForCreatorQuery(address, { pageSize = 10, searchQuery, orderBy, orderDirection, filters, } = {}) {\n    const currentChainId = useCurrentChainId();\n    const creator = address?.toLowerCase() || '';\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipsForCreatorQuery',\n            currentChainId,\n            creator,\n            pageSize,\n            searchQuery,\n            orderBy,\n            orderDirection,\n            filters?.expired,\n            filters?.inactive,\n            filters?.my,\n            filters?.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            if (!creator) {\n                return {\n                    skip,\n                    sponsorships: [],\n                };\n            }\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getSponsorshipsByCreator(currentChainId, creator, {\n                first: pageSize,\n                skip,\n                searchQuery,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters?.my ? operator?.id : undefined,\n                includeExpiredFunding: !filters || filters.expired,\n                includeInactive: !filters || filters.inactive,\n                includeWithoutFunding: !filters || filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateAllSponsorshipsQueries(chainId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useAllSponsorshipsQuery', chainId],\n        refetchType: 'active',\n    });\n}\nexport function useAllSponsorshipsQuery({ pageSize = 10, searchQuery, orderBy, orderDirection, filters, }) {\n    const currentChainId = useCurrentChainId();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useAllSponsorshipsQuery',\n            currentChainId,\n            pageSize,\n            searchQuery,\n            orderBy,\n            orderDirection,\n            filters.expired,\n            filters.inactive,\n            filters.my,\n            filters.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getAllSponsorships({\n                chainId: currentChainId,\n                first: pageSize,\n                skip,\n                searchQuery,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters.my && operator != null ? operator.id : undefined,\n                includeExpiredFunding: filters.expired,\n                includeInactive: filters.inactive,\n                includeWithoutFunding: filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateSponsorshipByIdQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipByIdQuery', chainId, sponsorshipId.toLowerCase()],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipByIdQuery(sponsorshipId) {\n    const currentChainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: [\n            'useSponsorshipByIdQuery',\n            currentChainId,\n            sponsorshipId.toLowerCase(),\n            minBlockNumber,\n        ],\n        queryFn: () => getParsedSponsorshipById(currentChainId, sponsorshipId, {\n            force: true,\n            minBlockNumber,\n        }),\n        retry: false,\n    });\n}\nexport function useSponsorshipsByStreamIdQuery({ pageSize = 10, streamId, orderBy, orderDirection, filters, }) {\n    const currentChainId = useCurrentChainId();\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    return useInfiniteQuery({\n        queryKey: [\n            'useSponsorshipsByStreamIdQuery',\n            currentChainId,\n            streamId,\n            pageSize,\n            orderBy,\n            orderDirection,\n            filters?.expired,\n            filters?.inactive,\n            filters?.my,\n            filters?.noFunding,\n            operator?.id,\n        ],\n        async queryFn({ pageParam: skip }) {\n            const sponsorships = await getSponsorshipsAndParse(currentChainId, () => getSponsorshipsByStreamId({\n                chainId: currentChainId,\n                first: pageSize,\n                skip,\n                streamId,\n                orderBy: mapSponsorshipOrder(orderBy),\n                orderDirection: orderDirection,\n                force: true,\n                hasOperatorId: filters?.my ? operator?.id : undefined,\n                includeExpiredFunding: !filters || filters.expired,\n                includeInactive: !filters || filters.inactive,\n                includeWithoutFunding: !filters || filters.noFunding,\n            }));\n            return {\n                skip,\n                sponsorships,\n            };\n        },\n        initialPageParam: 0,\n        getNextPageParam: ({ sponsorships, skip }) => {\n            return sponsorships.length === pageSize ? skip + pageSize : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nfunction invalidateSponsorshipsByStreamIdQueries(chainId, streamId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipsByStreamIdQuery', chainId, streamId || ''],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipTokenInfo() {\n    const chainId = useCurrentChainId();\n    return useTokenInfo(getContractAddress('sponsorshipPaymentToken', chainId), chainId);\n}\nexport function useIsCreatingSponsorshipForWallet(wallet) {\n    return useIsFlagged(flagKey('isCreatingSponsorship', wallet || ''));\n}\nexport function useCreateSponsorship() {\n    const withFlag = useFlagger();\n    return useCallback((chainId, wallet, options = {}) => {\n        if (!wallet) {\n            return;\n        }\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isCreatingSponsorship', wallet), async () => {\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        const { sponsorshipId, streamId, blockNumber } = await createSponsorshipModal.pop({\n                            chainId,\n                            balance,\n                            streamId: options.streamId,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorshipId, streamId);\n                        options.onDone?.(sponsorshipId, blockNumber);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not create a Sponsorship', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsFundingSponsorship(sponsorshipId, wallet) {\n    return useIsFlagged(flagKey('isFundingSponsorship', sponsorshipId || '', wallet || ''));\n}\nfunction invalidateSponsorshipDailyBucketsQueries(chainId, sponsorshipId) {\n    return getQueryClient().invalidateQueries({\n        exact: false,\n        queryKey: ['useSponsorshipDailyBucketsQuery', chainId, sponsorshipId],\n        refetchType: 'active',\n    });\n}\nexport function useSponsorshipDailyBucketsQuery({ sponsorshipId, period, dataSource, }) {\n    const currentChainId = useCurrentChainId();\n    return useQuery({\n        queryKey: [\n            'useSponsorshipDailyBucketsQuery',\n            currentChainId,\n            sponsorshipId,\n            period,\n            dataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!sponsorshipId) {\n                    return [];\n                }\n                return await getSponsorshipStats(currentChainId, sponsorshipId, period, dataSource, {\n                    force: true,\n                    ignoreToday: false,\n                });\n            }\n            catch (e) {\n                console.warn('Could not load sponsorship chart data', e);\n                errorToast({ title: 'Could not load sponsorship chart data' });\n            }\n            return [];\n        },\n    });\n}\n/**\n * Returns a function that takes the user through the process of funding\n * a Sponsorship (with the modal and input validation).\n */\nexport function useFundSponsorshipCallback() {\n    const withFlag = useFlagger();\n    return useCallback((chainId, sponsorship, options = {}) => {\n        void (async () => {\n            try {\n                const wallet = await (await getSigner()).getAddress();\n                try {\n                    await withFlag(flagKey('isFundingSponsorship', sponsorship.id, wallet), async () => {\n                        await getSponsorshipTokenInfo(chainId);\n                        const balance = await getBalance({\n                            chainId,\n                            tokenAddress: getContractAddress('sponsorshipPaymentToken', chainId),\n                            walletAddress: wallet,\n                        });\n                        await fundSponsorshipModal.pop({\n                            chainId,\n                            sponsorship,\n                            balance,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                    });\n                    options.onDone?.(wallet);\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Failed to fund a sponsorship', sponsorship.id, e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsJoiningSponsorshipAsOperator(sponsorshipId, operatorId) {\n    return useIsFlagged(flagKey('isJoiningSponsorshipAsOperator', sponsorshipId || '', operatorId || ''));\n}\nexport function useJoinSponsorshipAsOperator() {\n    const withFlag = useFlagger();\n    return useCallback(({ chainId, onJoin, operator, sponsorship, }) => {\n        void (async () => {\n            try {\n                try {\n                    await withFlag(flagKey('isJoiningSponsorshipAsOperator', sponsorship.id, operator.id), async () => {\n                        const wallet = await (await getSigner()).getAddress();\n                        await joinSponsorshipModal.pop({\n                            chainId,\n                            sponsorship,\n                            preselectedOperator: operator,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                        onJoin?.();\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not join a Sponsorship as an Operator', e);\n            }\n        })();\n    }, [withFlag]);\n}\nexport function useIsEditingSponsorshipFunding(sponsorshipId, operatorId) {\n    return useIsFlagged(flagKey('isEditingSponsorshipFunding', sponsorshipId || '', operatorId || ''));\n}\n/**\n * Returns a callback that takes the user through the process\n * of editing their stake.\n */\nexport function useEditSponsorshipFunding() {\n    const withFlag = useFlagger();\n    return useCallback((params) => {\n        const { chainId, sponsorshipOrSponsorshipId, operator } = params;\n        void (async () => {\n            try {\n                try {\n                    const sponsorship = await (async () => {\n                        if (typeof sponsorshipOrSponsorshipId !== 'string') {\n                            return sponsorshipOrSponsorshipId;\n                        }\n                        const result = await getParsedSponsorshipById(chainId, sponsorshipOrSponsorshipId, { force: true });\n                        if (!result) {\n                            throw new Error('Sponsorship not found');\n                        }\n                        return result;\n                    })();\n                    await withFlag(flagKey('isEditingSponsorshipFunding', sponsorship.id, operator.id), async () => {\n                        const wallet = await (await getSigner()).getAddress();\n                        /**\n                         * If the sponsorship token info has already been fetched\n                         * the following call will do nothing. Otherwise, it'll fetch\n                         * and cache it. Speed things up later on.\n                         */\n                        await getSponsorshipTokenInfo(chainId);\n                        const leavePenalty = await getSponsorshipLeavePenalty(chainId, sponsorship.id, operator.id);\n                        await editStakeModal.pop({\n                            chainId,\n                            operator,\n                            sponsorship,\n                            leavePenalty,\n                        });\n                        invalidateSponsorshipQueries(chainId, wallet, sponsorship.id);\n                    });\n                }\n                catch (e) {\n                    if (e === FlagBusy) {\n                        return;\n                    }\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            }\n            catch (e) {\n                console.warn('Could not edit stake', e);\n            }\n        })();\n    }, [withFlag]);\n}\nconst mapSponsorshipOrder = (columnKey) => {\n    switch (columnKey) {\n        case 'operators':\n            return Sponsorship_OrderBy.OperatorCount;\n        case 'staked':\n            return Sponsorship_OrderBy.TotalStakedWei;\n        case 'apy':\n            return Sponsorship_OrderBy.SpotApy;\n        case 'fundedUntil':\n            return Sponsorship_OrderBy.ProjectedInsolvency;\n        case 'payoutPerDay':\n            return Sponsorship_OrderBy.TotalPayoutWeiPerSec;\n        case 'remainingWei':\n            return Sponsorship_OrderBy.RemainingWei;\n        case 'streamInfo':\n        default:\n            return Sponsorship_OrderBy.Id;\n    }\n};\n/**\n * Invalidates a collection of sponsorship-related queries.\n */\nexport function invalidateSponsorshipQueries(chainId, invalidator, sponsorshipId, streamId = undefined) {\n    if (!invalidator || !sponsorshipId) {\n        return;\n    }\n    invalidateSponsorshipsForCreatorQueries(chainId, invalidator);\n    invalidateAllSponsorshipsQueries(chainId);\n    invalidateSponsorshipByIdQueries(chainId, sponsorshipId);\n    invalidateSponsorshipDailyBucketsQueries(chainId, sponsorshipId);\n    invalidateSponsorshipFundingHistoryQueries(chainId, sponsorshipId);\n    invalidateSponsorshipsByStreamIdQueries(chainId, streamId);\n    /**\n     * Invalidate OperatorById queries used mainly by Operator pages,\n     * too. There's the Sponsorships section there and it's driven\n     * by operator's collection of stakes.\n     */\n    invalidateActiveOperatorByIdQueries(chainId, undefined);\n}\n","import moment from 'moment';\nimport { ChartPeriod } from '~/types';\nimport { toBN } from '~/utils/bn';\nimport { getSponsorshipDailyBuckets } from '~/getters';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nexport const getSponsorshipStats = async (chainId, sponsorshipId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const tokenInfo = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getSponsorshipDailyBuckets(chainId, sponsorshipId, {\n                    dateLowerThan: start.unix(),\n                    dateGreaterEqualThan: endDate.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        let yValue;\n        switch (dataSource) {\n            case 'amountStaked':\n                yValue = toBN(bucket.totalStakedWei)\n                    .dividedBy(Math.pow(10, Number(tokenInfo?.decimals.toString())))\n                    .toNumber();\n                break;\n            case 'numberOfOperators':\n                yValue = Number(bucket.operatorCount);\n                break;\n            case 'apy':\n                yValue = Number(bucket.spotAPY) * 100;\n                break;\n            default:\n                yValue = 0;\n                break;\n        }\n        return {\n            x: toBN(bucket.date).multipliedBy(1000).toNumber(),\n            y: yValue,\n        };\n    });\n};\n","import React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { Alert as PrestyledAlert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { getSelfDelegatedAmount, getSelfDelegationFraction } from '~/getters';\nimport { useConfigValueFromChain, useMediaQuery } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { delegateToOperator } from '~/services/operators';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { humanize } from '~/shared/utils/time';\nimport { waitForIndexedBlock } from '~/utils';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nexport default function DelegateFundsModal({ balance, chainId, delegatedTotal, onResolve, operator, ...props }) {\n    const walletAddress = useWalletAccount();\n    const isOwner = walletAddress?.toLowerCase() === operator.owner.toLowerCase();\n    const [submitLabel, title, amountLabel, totalLabel, subtitlePartial] = isOwner\n        ? [\n            'Fund',\n            'Fund Operator',\n            'Amount to stake',\n            'Your stake',\n            'you wish to stake on your Operator',\n        ]\n        : [\n            'Delegate',\n            'Delegate to Operator',\n            'Amount to delegate',\n            'Your delegation',\n            'to delegate to the selected Operator',\n        ];\n    const minimumDelegationWei = useConfigValueFromChain('minimumDelegationWei') || 0n;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, 18n)) || toBN(0);\n    const minimumDelegationSeconds = useConfigValueFromChain('minimumDelegationSeconds', (value) => !isOwner ? Number(value) : 0) || 0;\n    const [rawAmount, setRawAmount] = useState('');\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const value = toBigInt(rawAmount || 0, decimals);\n    const insufficientFunds = value > balance;\n    const selfDelegationFraction = useMemo(() => getSelfDelegationFraction(operator), [operator]);\n    const nextSelfDelegationFraction = useMemo(() => getSelfDelegationFraction(operator, { offset: value }), [operator, value]);\n    const tooLowCurrentSelfDelegation = !isOwner &&\n        selfDelegationFraction.isLessThanOrEqualTo(minimumSelfDelegationFraction);\n    const tooLowNextSelfDelegation = !isOwner &&\n        nextSelfDelegationFraction.isLessThanOrEqualTo(minimumSelfDelegationFraction);\n    const tooLowOwnerSelfDelegation = tooLowCurrentSelfDelegation || tooLowNextSelfDelegation;\n    const maxNextAmount = useMemo(() => {\n        if (minimumSelfDelegationFraction.isEqualTo(0)) {\n            return 0n;\n        }\n        const operatorSelfStake = getSelfDelegatedAmount(operator);\n        return (toBigInt(toBN(operatorSelfStake).dividedBy(minimumSelfDelegationFraction)) -\n            delegatedTotal -\n            operatorSelfStake);\n    }, [minimumSelfDelegationFraction, operator, delegatedTotal]);\n    const canSubmit = value > 0n &&\n        value >= minimumDelegationWei &&\n        !insufficientFunds &&\n        !tooLowOwnerSelfDelegation;\n    const [busy, setBusy] = useState(false);\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit && !busy, submitting: busy, submitLabel: submitLabel, onBeforeAbort: (reason) => !busy && (rawAmount === '' || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await delegateToOperator(chainId, operator.id, value, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please enter the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" tokens\",\n            ' ',\n            subtitlePartial),\n        React.createElement(Section, null,\n            React.createElement(Label, null, amountLabel),\n            React.createElement(FieldWrap, { \"$invalid\": insufficientFunds },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => {\n                        setRawAmount(target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(balance, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, { \"$invalid\": insufficientFunds }, insufficientFunds ? (React.createElement(React.Fragment, null, \"Not enough balance in your wallet\")) : (React.createElement(React.Fragment, null, \"Your wallet balance\"))),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operator.id)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, totalLabel),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: delegatedTotal, tooltip: limitedSpace }))))),\n        React.createElement(React.Fragment, null, tooLowCurrentSelfDelegation ? (React.createElement(Alert, { type: \"error\", title: \"Unable to delegate\" }, \"This operator can not accept any further delegations at the moment, because the operator's own share of funds is below the required limit.\")) : (React.createElement(React.Fragment, null, tooLowNextSelfDelegation && (React.createElement(Alert, { type: \"error\", title: \"Amount too high\" },\n            \"This operator can currently only accept less than\",\n            ' ',\n            React.createElement(\"strong\", null,\n                React.createElement(SponsorshipDecimals, { amount: maxNextAmount })),\n            ' ',\n            \"in further delegations, because operators must stay above a certain proportion of their own funds vs. delegations.\"))))),\n        React.createElement(React.Fragment, null, value > 0n && value < minimumDelegationWei && (React.createElement(Alert, { type: \"notice\", title: React.createElement(React.Fragment, null,\n                \"Minimum delegation is\",\n                ' ',\n                React.createElement(SponsorshipDecimals, { amount: minimumDelegationWei })) }))),\n        React.createElement(React.Fragment, null, operator.contractVersion > 0 && minimumDelegationSeconds > 0 && (React.createElement(Alert, { type: \"notice\", title: `You will need to stay delegated for at least ${humanize(minimumDelegationSeconds)}.` }))),\n        React.createElement(React.Fragment, null, operator.contractVersion < 3 && !isOwner && (React.createElement(Alert, { type: \"error\", title: \"Slashing risk\" }, \"This Operator is running an older version of the Operator smart contract where Delegators are subject to slashing risk if the Operator is voted out of a Sponsorship. In newer Operator versions, Delegators are more protected from slashing.\")))));\n}\nconst Alert = styled(PrestyledAlert).withConfig({ displayName: \"Alert\", componentId: \"sc-11w8du0\" }) `\n    margin-top: 10px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport { getStreamDescription } from '~/getters';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function StreamDescription({ streamId }) {\n    const [desc, setDesc] = useState();\n    const chainId = useCurrentChainId();\n    /**\n     * @todo Refactor using `useQuery`.\n     */\n    useEffect(() => {\n        let mounted = true;\n        setDesc(undefined);\n        setTimeout(async () => {\n            try {\n                const description = await getStreamDescription(chainId, streamId);\n                if (mounted) {\n                    setDesc(description);\n                }\n            }\n            catch (_) {\n                /**\n                 * We're only interested in the happy path here. Ok to ignore\n                 * paths that are not so happy.\n                 */\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    return React.createElement(React.Fragment, null, desc);\n}\n","import React from 'react';\nimport { HubAvatar, HubImageAvatar } from '~/shared/components/AvatarImage';\nexport function OperatorAvatar({ operatorId, imageUrl, }) {\n    if (imageUrl) {\n        return (React.createElement(HubImageAvatar, { src: imageUrl, alt: \"\", placeholder: React.createElement(HubAvatar, { id: operatorId }) }));\n    }\n    return React.createElement(HubAvatar, { id: operatorId });\n}\n","import CheckIcon from '@atlaskit/icon/glyph/check';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React from 'react';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { StreamDescription } from '~/components/StreamDescription';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { HubAvatar, HubImageAvatar } from '~/shared/components/AvatarImage';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncate, truncateStreamName } from '~/shared/utils/text';\nimport { getStreamGptApiUrl } from '~/utils';\nimport { getChainConfigExtension } from '~/utils/chains';\nimport { getSponsorshipStakeForOperator } from '~/utils/sponsorships';\nimport Spinner from './Spinner';\nimport { OperatorAvatar } from './avatars';\n/**\n * Operator name and avatar formatter.\n */\nexport function OperatorIdCell({ operatorId, imageUrl, operatorName, truncate: truncateProp = false, }) {\n    return (React.createElement(OperatorIdCellRoot, null,\n        React.createElement(OperatorAvatarWrap, null,\n            React.createElement(OperatorAvatar, { operatorId: operatorId, imageUrl: imageUrl })),\n        React.createElement(OperatorName, { \"$truncate\": truncateProp }, operatorName || truncate(operatorId))));\n}\nconst OperatorAvatarWrap = styled.div.withConfig({ displayName: \"OperatorAvatarWrap\", componentId: \"sc-112yhxn\" }) `\n    height: 32px;\n    width: 32px;\n`;\nconst OperatorName = styled.div.withConfig({ displayName: \"OperatorName\", componentId: \"sc-1p7xhp1\" }) `\n    ${({ $truncate = false }) => $truncate &&\n    css `\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n            max-width: 12rem;\n        `}\n`;\nconst OperatorIdCellRoot = styled.div.withConfig({ displayName: \"OperatorIdCellRoot\", componentId: \"sc-u8x3bl\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: flex-start;\n    gap: 12px;\n`;\n/**\n * Deleted stream id formatter.\n */\nfunction DeletedStreamIdCell() {\n    return (React.createElement(StreamInfoCell, null,\n        React.createElement(StreamAvatarWrap, null),\n        React.createElement(StreamInfoCellOuter, null,\n            React.createElement(StreamIdWrap, { as: \"em\" }, \"(deleted stream)\"))));\n}\n/**\n * Stream id and description formatter.\n */\nexport function StreamIdCell({ streamId = '', description, }) {\n    const imageUrlQuery = useStreamImageUrlQuery(streamId);\n    if (!streamId) {\n        return React.createElement(DeletedStreamIdCell, null);\n    }\n    return (React.createElement(StreamInfoCell, null,\n        React.createElement(StreamAvatarWrap, null,\n            React.createElement(HubImageAvatar, { src: imageUrlQuery.data || '', alt: \"\", placeholder: imageUrlQuery.isFetching ? (React.createElement(SpinnerWrap, null,\n                    React.createElement(Spinner, { color: \"blue\", size: 10 }))) : (React.createElement(HubAvatar, { id: streamId })) })),\n        React.createElement(StreamInfoCellOuter, null,\n            React.createElement(StreamIdWrap, null, truncateStreamName(streamId)),\n            React.createElement(StreamDescriptionWrap, null, description == null ? (React.createElement(StreamDescription, { streamId: streamId })) : (description)))));\n}\nfunction useStreamImageUrlQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamImageUrlQuery', streamId || ''],\n        queryFn: async () => {\n            if (!streamId) {\n                return null;\n            }\n            const resp = await fetch(getStreamGptApiUrl(`streams/${encodeURIComponent(streamId)}`));\n            if (resp.status !== 200) {\n                return null;\n            }\n            /**\n             * The GPT only processes streams on the Polygon network (137).\n             */\n            const { ipfsGatewayUrl } = getChainConfigExtension(137).ipfs;\n            return z\n                .object({\n                imageHash: z.string(),\n            })\n                .transform(({ imageHash }) => imageHash ? `${ipfsGatewayUrl}${imageHash}` : null)\n                .parse(await resp.json());\n        },\n        staleTime: Infinity,\n    });\n}\nconst SpinnerWrap = styled.div.withConfig({ displayName: \"SpinnerWrap\", componentId: \"sc-1icfy2\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n`;\nconst StreamAvatarWrap = styled.div.withConfig({ displayName: \"StreamAvatarWrap\", componentId: \"sc-mo25xt\" }) `\n    background: #f0f0f0;\n    border-radius: 50%;\n\n    &,\n    ${SpinnerWrap}, ${HubImageAvatar}, ${HubAvatar} {\n        width: 40px;\n        height: 40px;\n    }\n`;\nconst StreamInfoCellOuter = styled.div.withConfig({ displayName: \"StreamInfoCellOuter\", componentId: \"sc-17z8mkz\" }) ``;\nconst StreamInfoCell = styled.div.withConfig({ displayName: \"StreamInfoCell\", componentId: \"sc-1n4zaz4\" }) `\n    align-items: center;\n    display: flex;\n    gap: 12px;\n    line-height: 26px;\n`;\nconst StreamIdWrap = styled.div.withConfig({ displayName: \"StreamIdWrap\", componentId: \"sc-1sk57wg\" }) `\n    display: block;\n    font-weight: ${MEDIUM};\n    color: ${COLORS.primary};\n`;\nconst StreamDescriptionWrap = styled.div.withConfig({ displayName: \"StreamDescriptionWrap\", componentId: \"sc-zw1kt8\" }) `\n    font-size: 14px;\n    max-width: 208px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    :empty {\n        display: none;\n    }\n`;\n/**\n * Sponsorship's projected insolvency timestamp formatter.\n */\nexport function FundedUntilCell({ projectedInsolvencyAt, remainingBalance, }) {\n    const value = projectedInsolvencyAt == null ? null : moment(projectedInsolvencyAt);\n    return (React.createElement(Iconized, null,\n        value == null || !value.isValid() ? (React.createElement(React.Fragment, null, \"N/A\")) : (React.createElement(Tooltip, { content: value.format('YYYY-MM-DD, HH:mm') }, value.format('YYYY-MM-DD'))),\n        remainingBalance <= 0n && (React.createElement(Tooltip, { content: \"Sponsorship expired\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\", \"$svgSize\": {\n                    width: '18px',\n                    height: '18px',\n                } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n}\nconst Iconized = styled.div.withConfig({ displayName: \"Iconized\", componentId: \"sc-foe5i9\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n    line-height: normal;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\nexport function SponsorshipApyCell({ spotAPY, isRunning, }) {\n    return (React.createElement(Iconized, null,\n        `${(spotAPY * 100).toFixed(0)}%`,\n        !isRunning && (React.createElement(Tooltip, { content: \"Sponsorship not runnning\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\", \"$svgSize\": {\n                    width: '18px',\n                    height: '18px',\n                } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n}\nexport function NumberOfOperatorsCell({ sponsorship, currentOperatorId, }) {\n    const joinedByCurrentOperator = !!currentOperatorId &&\n        !!getSponsorshipStakeForOperator(sponsorship, currentOperatorId);\n    return (React.createElement(Iconized, null,\n        sponsorship.operatorCount,\n        joinedByCurrentOperator && (React.createElement(Tooltip, { content: \"Already joined as Operator.\" },\n            React.createElement(TooltipIconWrap, { \"$color\": \"currentColor\" },\n                React.createElement(CheckIcon, { label: \"Already joined as Operator.\" }))))));\n}\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Radio = ({ id, name, label, value, checked, disabled, disabledReason, onChange, className, size = 'normal', }) => {\n    const handleChange = useCallback((event) => onChange(event.target.value), [onChange]);\n    return (React.createElement(RadioLabel, { htmlFor: id, title: disabled && disabledReason ? disabledReason : '', className: className + (disabled ? ' disabled' : '') },\n        React.createElement(\"input\", { id: id, name: name, value: value, checked: checked, type: 'radio', disabled: disabled, onChange: handleChange, className: (!label ? 'no-label ' : '') + (size === 'large' ? 'large ' : '') }),\n        !!label && React.createElement(\"div\", null, label)));\n};\nconst RadioLabel = styled.label.withConfig({ displayName: \"RadioLabel\", componentId: \"sc-p5ok2x\" }) `\n    display: flex;\n    align-items: center;\n    cursor: pointer;\n    margin: 0;\n\n    &.disabled {\n        cursor: not-allowed;\n    }\n\n    input[type='radio'] {\n        appearance: none;\n        background-color: transparent;\n        margin: 0;\n        flex-shrink: 0;\n        font: inherit;\n        color: purple;\n        width: 15px;\n        height: 15px;\n        border: 2px solid ${COLORS.radioBorder};\n        border-radius: 50%;\n        transform: translateY(-2px);\n        display: grid;\n        place-content: center;\n\n        &.no-label {\n            transform: none;\n        }\n\n        &:checked {\n            border-color: ${COLORS.link};\n        }\n\n        &:disabled {\n            border-color: ${COLORS.secondaryHover};\n            &:not(:checked) {\n                background-color: ${COLORS.secondaryHover};\n            }\n        }\n\n        &.large {\n            width: 20px;\n            height: 20px;\n            ::before {\n                width: 10px;\n                height: 10px;\n                box-shadow: inset 1.5em 1.5em ${COLORS.link};\n            }\n        }\n    }\n\n    input[type='radio']::before {\n        content: '';\n        width: 7px;\n        height: 7px;\n        border-radius: 50%;\n        transform: scale(0);\n        transition: 120ms transform ease-in-out;\n        box-shadow: inset 1em 1em ${COLORS.link};\n        background-color: transparent;\n    }\n\n    input[type='radio']:checked::before {\n        transform: scale(1);\n    }\n\n    input[type='radio']:disabled:checked::before {\n        box-shadow: inset 1em 1em ${COLORS.disabled};\n    }\n\n    input[type='radio']:focus {\n        //outline: max(2px, 0.15em) solid cadetblue;\n        //outline-offset: max(2px, 0.15em);\n    }\n\n    > * {\n        margin-left: 9px;\n        font-size: 14px;\n        width: 100%;\n    }\n`;\n","import styled from 'styled-components';\nimport { Button } from '~/components/Button';\nexport const LoadMoreButton = styled(Button).withConfig({ displayName: \"LoadMoreButton\", componentId: \"sc-7xhb94\" }) `\n    display: block;\n    margin: 80px auto;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nexport function Meatball({ alt, color, disabled, layout }) {\n    const vertical = layout === 'vertical';\n    return (React.createElement(Root, { \"$color\": color, \"$disabled\": disabled, \"data-test-hook\": \"meatball\" },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: vertical ? '0 0 4 20' : '0 0 20 4', width: vertical ? '4' : '20', height: vertical ? '20' : '4', \"data-alt\": alt },\n            React.createElement(\"circle\", { cx: \"2\", cy: \"2\", r: \"2\" }),\n            React.createElement(\"circle\", { cx: vertical ? '2' : '10', cy: vertical ? '10' : '2', r: \"2\" }),\n            React.createElement(\"circle\", { cx: vertical ? '2' : '18', cy: vertical ? '18' : '2', r: \"2\" }))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-sl6dmj\" }) `\n    border: 1px solid transparent;\n    border-radius: 2px;\n    opacity: 0.5;\n    padding: 5px;\n    transition: 200ms ease-in-out;\n    transition-property: border-color, opacity, box-shadow;\n\n    svg {\n        display: block;\n    }\n\n    circle {\n        fill: var(--greyDark);\n    }\n\n    ${({ $disabled = false }) => $disabled\n    ? css `\n                  cursor: not-allowed;\n              `\n    : css `\n                  a:hover &,\n                  a:focus &,\n                  :hover,\n                  :focus {\n                      opacity: 1;\n                      transition-duration: 50ms;\n                  }\n              `}\n\n    ${({ $color, $disabled = false }) => propsToCss($disabled, $color)}\n`;\nfunction propsToCss(disabled, color) {\n    if (color === 'white') {\n        return css `\n            border-color: rgba(255, 255, 255, 0.5);\n            box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.5);\n            opacity: 1;\n\n            circle {\n                fill: var(--white);\n            }\n\n            ${!disabled &&\n            css `\n                :hover,\n                :focus,\n                .dropdown.show & {\n                    border-color: var(--white);\n                    box-shadow: inset 0 0 0 0.5px #ffffff;\n                }\n            `}\n        `;\n    }\n    if (color === 'gray') {\n        return css `\n            border: none;\n            background-color: #efefef;\n            opacity: 1;\n            height: 1.5rem;\n            width: 2rem;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n\n            circle {\n                fill: var(--grey2);\n            }\n\n            ${!disabled &&\n            css `\n                :hover,\n                :focus,\n                .dropdown.show & {\n                    background-color: #f8f8f8;\n                }\n            `}\n        `;\n    }\n}\n","export const compose = (...fns) => (x) => fns.reduceRight((acc, cur) => cur(acc), x);\n","import React, { useCallback, useState, forwardRef } from 'react';\nconst FlushHistoryDecorator = (WrappedComponent) => {\n    const FlushHistoryDecoratorWrapper = ({ onBlur: onBlurProp, ...props }, ref) => {\n        const [blurCount, setBlurCount] = useState(0);\n        const onBlur = useCallback((e) => {\n            // `blurCount` is used as `key` of the actual control. Changing it replaces the control\n            // with a new instance thus the old instance along with its change history gets forgotten.\n            setBlurCount((count) => count + 1);\n            if (onBlurProp) {\n                onBlurProp(e);\n            }\n        }, [onBlurProp]);\n        return React.createElement(WrappedComponent, { ...props, ref: ref, key: blurCount, onBlur: onBlur });\n    };\n    const FlushHistoryDecoratorWrapperFR = forwardRef(FlushHistoryDecoratorWrapper);\n    const OptInFlushHistoryDecorator = ({ flushHistoryOnBlur = false, ...props }, ref) => flushHistoryOnBlur ? (React.createElement(FlushHistoryDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInFlushHistoryDecorator);\n};\nexport default FlushHistoryDecorator;\n","import React, { useCallback, useRef, forwardRef } from 'react';\nconst sanitise = (value) => (value == null ? '' : value);\nconst normalize = (value) => typeof value === 'string' ? value.trim() : String(sanitise(value));\nconst OnCommitDecorator = (WrappedComponent) => {\n    const OnCommitDecoratorWrapper = ({ noEmptyCommit, onBlur: onBlurProp, onChange: onChangeProp, onCommit: onCommitProp, onFocus: onFocusProp, onKeyDown: onKeyDownProp, smartCommit, ...props }, ref) => {\n        const valueRef = useRef(null);\n        const onCommit = useCallback((value, requireChanged = false) => {\n            if (onCommitProp) {\n                const newValue = noEmptyCommit ? normalize(value) : value;\n                if ((!requireChanged || valueRef.current !== value) &&\n                    (newValue || !noEmptyCommit)) {\n                    onCommitProp(value);\n                }\n            }\n        }, [onCommitProp, noEmptyCommit]);\n        const onChange = useCallback((e) => {\n            if (!smartCommit) {\n                onCommit(e.target.value);\n            }\n            if (onChangeProp) {\n                onChangeProp(e);\n            }\n        }, [onChangeProp, onCommit, smartCommit]);\n        const onKeyDown = useCallback((e) => {\n            if (e.key === 'Enter' &&\n                smartCommit &&\n                e.target instanceof HTMLInputElement) {\n                onCommit(e.target.value);\n            }\n            if (onKeyDownProp) {\n                onKeyDownProp(e);\n            }\n        }, [onKeyDownProp, onCommit, smartCommit]);\n        const onFocus = useCallback((e) => {\n            if (e.target instanceof HTMLInputElement ||\n                e.target instanceof HTMLTextAreaElement) {\n                valueRef.current = e.target.value;\n            }\n            if (onFocusProp) {\n                onFocusProp(e);\n            }\n        }, [onFocusProp]);\n        const onBlur = useCallback((e) => {\n            if (e.target instanceof HTMLInputElement ||\n                e.target instanceof HTMLTextAreaElement) {\n                const { value } = e.target;\n                if (smartCommit) {\n                    onCommit(value, true);\n                }\n            }\n            if (onBlurProp) {\n                onBlurProp(e);\n            }\n        }, [onBlurProp, onCommit, smartCommit]);\n        return (React.createElement(WrappedComponent, { ...props, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, ref: ref }));\n    };\n    const OnCommitDecoratorWrapperFR = forwardRef(OnCommitDecoratorWrapper);\n    const OptInOnCommitDecorator = ({ onCommit, smartCommit, noEmptyCommit, ...props }, ref) => onCommit ? (React.createElement(OnCommitDecoratorWrapperFR, { ...props, noEmptyCommit: noEmptyCommit, onCommit: onCommit, ref: ref, smartCommit: smartCommit })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInOnCommitDecorator);\n};\nexport default OnCommitDecorator;\n","import React, { useState, forwardRef, useEffect, useCallback } from 'react';\nconst sanitizeValue = (value) => (value != null ? value : '');\nconst RevertOnEscapeDecorator = (WrappedComponent) => {\n    const RevertOnEscapeDecoratorWrapper = ({ value: valueProp, onKeyDown: onKeyDownProp, onChange: onChangeProp, ...props }, ref) => {\n        const [value, setValue] = useState(sanitizeValue(valueProp));\n        useEffect(() => {\n            setValue(sanitizeValue(valueProp));\n        }, [valueProp]);\n        const onKeyDown = useCallback((e) => {\n            if (e.key === 'Escape') {\n                setValue(sanitizeValue(valueProp));\n            }\n            if (onKeyDownProp) {\n                onKeyDownProp(e);\n            }\n        }, [valueProp, onKeyDownProp]);\n        const onChange = useCallback((e) => {\n            setValue(e.target.value);\n            if (onChangeProp) {\n                onChangeProp(e);\n            }\n        }, [onChangeProp]);\n        return (React.createElement(WrappedComponent, { ...props, onChange: onChange, onKeyDown: onKeyDown, ref: ref, value: value }));\n    };\n    const RevertOnEscapeDecoratorWrapperFR = forwardRef(RevertOnEscapeDecoratorWrapper);\n    const OptInRevertOnEscapeDecoratorWrapper = ({ revertOnEscape, ...props }, ref) => revertOnEscape ? (React.createElement(RevertOnEscapeDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInRevertOnEscapeDecoratorWrapper);\n};\nexport default RevertOnEscapeDecorator;\n","import React, { useCallback, forwardRef } from 'react';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nconst SelectAllOnFocusDecorator = (WrappedComponent) => {\n    const SelectAllOnFocusDecoratorWrapper = ({ onFocus: onFocusProp, ...props }, ref) => {\n        const isMounted = useIsMounted();\n        const onFocus = useCallback((e) => {\n            e.persist();\n            setTimeout(() => {\n                if (isMounted() &&\n                    (e.target instanceof HTMLInputElement ||\n                        e.target instanceof HTMLTextAreaElement)) {\n                    e.target.select();\n                }\n            }, 0);\n            if (onFocusProp) {\n                onFocusProp(e);\n            }\n        }, [onFocusProp, isMounted]);\n        return React.createElement(WrappedComponent, { ...props, onFocus: onFocus, ref: ref });\n    };\n    const SelectAllOnFocusDecoratorWrapperFR = forwardRef(SelectAllOnFocusDecoratorWrapper);\n    const OptInSelectAllOnFocusDecoratorWrapper = ({ selectAllOnFocus = false, ...props }, ref) => selectAllOnFocus ? (React.createElement(SelectAllOnFocusDecoratorWrapperFR, { ...props, ref: ref })) : (React.createElement(WrappedComponent, { ...props, ref: ref }));\n    return forwardRef(OptInSelectAllOnFocusDecoratorWrapper);\n};\nexport default SelectAllOnFocusDecorator;\n","import styled, { css } from 'styled-components';\nconst StyledInput = styled.input.withConfig({ displayName: \"StyledInput\", componentId: \"sc-1sl8gbr\" }) `\n    background-color: ${({ dark }) => (dark ? '#fdfdfd' : '#ffffff')};\n    border: 1px solid #efefef;\n    border-radius: 4px;\n    box-shadow: none;\n    box-sizing: border-box;\n    color: #323232;\n    display: block;\n    font-size: 1rem;\n    height: 40px;\n    line-height: 1;\n    outline: none;\n    padding: 0 1rem;\n    width: 100%;\n\n    ${({ theme }) => !!(theme && theme.height) &&\n    css `\n            height: ${theme.height};\n        `}\n\n    ${({ theme }) => !!(theme && theme.lineHeight) &&\n    css `\n            line-height: ${theme.lineHeight};\n        `}\n\n    /* Avoids weird browser bug where translucent elements with\n     * same background colour and same opacity render with\n     * different colours\n     */\n    backface-visibility: hidden;\n\n    :disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n        background-color: #efefef;\n        border-color: #efefef;\n        color: #32323280;\n    }\n\n    :not(:disabled):focus {\n        border: 1px solid #0324ff;\n        box-shadow: none;\n        outline: none;\n    }\n\n    ::placeholder {\n        color: #cdcdcd;\n    }\n\n    &[type='number'] {\n        appearance: textfield; /* Hide spin buttons for Mozilla based browsers */\n        display: inline-block;\n        margin: 0;\n        width: 100%;\n    }\n\n    /* Hide spin buttons for Webkit based browsers */\n    &[type='number']::-webkit-inner-spin-button,\n    &[type='number']::-webkit-outer-spin-button {\n        appearance: none;\n        margin: 0;\n    }\n\n    ${({ invalid }) => !!invalid &&\n    css `\n            :not(:disabled),\n            :not(:disabled):focus {\n                border-color: #ff5c00;\n            }\n        `}\n`;\nexport default StyledInput;\n","import React, { forwardRef, } from 'react';\nimport { compose } from '~/shared/utils/compose';\nimport FlushHistoryDecorator from './FlushHistoryDecorator';\nimport OnCommitDecorator from './OnCommitDecorator';\nimport RevertOnEscapeDecorator from './RevertOnEscapeDecorator';\nimport SelectAllOnFocusDecorator from './SelectAllOnFocusDecorator';\nimport StyledInput from './StyledInput';\nconst Text = ({ tag: Tag = 'input', unstyled, ...props }, ref) => unstyled ? (React.createElement(Tag, { ...props, ref: ref })) : (React.createElement(StyledInput, { ...props, as: Tag, ref: ref }));\nconst EnhancedText = compose(FlushHistoryDecorator, OnCommitDecorator, SelectAllOnFocusDecorator, RevertOnEscapeDecorator)(forwardRef(Text));\nEnhancedText.displayName = 'Text';\nexport default EnhancedText;\n","import { gql } from '@apollo/client';\nexport var Aggregation_Interval;\n(function (Aggregation_Interval) {\n    Aggregation_Interval[\"Day\"] = \"day\";\n    Aggregation_Interval[\"Hour\"] = \"hour\";\n})(Aggregation_Interval || (Aggregation_Interval = {}));\nexport var BucketType;\n(function (BucketType) {\n    BucketType[\"Day\"] = \"DAY\";\n    BucketType[\"Hour\"] = \"HOUR\";\n})(BucketType || (BucketType = {}));\nexport var DataUnionStatsBucket_OrderBy;\n(function (DataUnionStatsBucket_OrderBy) {\n    DataUnionStatsBucket_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    DataUnionStatsBucket_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    DataUnionStatsBucket_OrderBy[\"EndDate\"] = \"endDate\";\n    DataUnionStatsBucket_OrderBy[\"Id\"] = \"id\";\n    DataUnionStatsBucket_OrderBy[\"MemberCountAtStart\"] = \"memberCountAtStart\";\n    DataUnionStatsBucket_OrderBy[\"MemberCountChange\"] = \"memberCountChange\";\n    DataUnionStatsBucket_OrderBy[\"RevenueAtStartWei\"] = \"revenueAtStartWei\";\n    DataUnionStatsBucket_OrderBy[\"RevenueChangeWei\"] = \"revenueChangeWei\";\n    DataUnionStatsBucket_OrderBy[\"StartDate\"] = \"startDate\";\n    DataUnionStatsBucket_OrderBy[\"TotalWeightAtStart\"] = \"totalWeightAtStart\";\n    DataUnionStatsBucket_OrderBy[\"TotalWeightChange\"] = \"totalWeightChange\";\n    DataUnionStatsBucket_OrderBy[\"Type\"] = \"type\";\n})(DataUnionStatsBucket_OrderBy || (DataUnionStatsBucket_OrderBy = {}));\nexport var DataUnion_OrderBy;\n(function (DataUnion_OrderBy) {\n    DataUnion_OrderBy[\"CreationDate\"] = \"creationDate\";\n    DataUnion_OrderBy[\"Id\"] = \"id\";\n    DataUnion_OrderBy[\"MemberCount\"] = \"memberCount\";\n    DataUnion_OrderBy[\"Members\"] = \"members\";\n    DataUnion_OrderBy[\"Owner\"] = \"owner\";\n    DataUnion_OrderBy[\"RevenueWei\"] = \"revenueWei\";\n    DataUnion_OrderBy[\"TotalWeight\"] = \"totalWeight\";\n})(DataUnion_OrderBy || (DataUnion_OrderBy = {}));\nexport var MemberStatus;\n(function (MemberStatus) {\n    MemberStatus[\"Active\"] = \"ACTIVE\";\n    MemberStatus[\"Inactive\"] = \"INACTIVE\";\n    MemberStatus[\"None\"] = \"NONE\";\n})(MemberStatus || (MemberStatus = {}));\nexport var Member_OrderBy;\n(function (Member_OrderBy) {\n    Member_OrderBy[\"Address\"] = \"address\";\n    Member_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    Member_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    Member_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    Member_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    Member_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    Member_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    Member_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    Member_OrderBy[\"Id\"] = \"id\";\n    Member_OrderBy[\"JoinDate\"] = \"joinDate\";\n    Member_OrderBy[\"Status\"] = \"status\";\n    Member_OrderBy[\"Weight\"] = \"weight\";\n})(Member_OrderBy || (Member_OrderBy = {}));\n/** Defines the order direction, either ascending or descending */\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"asc\";\n    OrderDirection[\"Desc\"] = \"desc\";\n})(OrderDirection || (OrderDirection = {}));\nexport var RevenueEvent_OrderBy;\n(function (RevenueEvent_OrderBy) {\n    RevenueEvent_OrderBy[\"AmountWei\"] = \"amountWei\";\n    RevenueEvent_OrderBy[\"DataUnion\"] = \"dataUnion\";\n    RevenueEvent_OrderBy[\"DataUnionCreationDate\"] = \"dataUnion__creationDate\";\n    RevenueEvent_OrderBy[\"DataUnionId\"] = \"dataUnion__id\";\n    RevenueEvent_OrderBy[\"DataUnionMemberCount\"] = \"dataUnion__memberCount\";\n    RevenueEvent_OrderBy[\"DataUnionOwner\"] = \"dataUnion__owner\";\n    RevenueEvent_OrderBy[\"DataUnionRevenueWei\"] = \"dataUnion__revenueWei\";\n    RevenueEvent_OrderBy[\"DataUnionTotalWeight\"] = \"dataUnion__totalWeight\";\n    RevenueEvent_OrderBy[\"Date\"] = \"date\";\n    RevenueEvent_OrderBy[\"Id\"] = \"id\";\n})(RevenueEvent_OrderBy || (RevenueEvent_OrderBy = {}));\nexport var _SubgraphErrorPolicy_;\n(function (_SubgraphErrorPolicy_) {\n    /** Data will be returned even if the subgraph has indexing errors */\n    _SubgraphErrorPolicy_[\"Allow\"] = \"allow\";\n    /** If the subgraph has indexing errors, data will be omitted. The default. */\n    _SubgraphErrorPolicy_[\"Deny\"] = \"deny\";\n})(_SubgraphErrorPolicy_ || (_SubgraphErrorPolicy_ = {}));\nexport const DataUnionFieldsFragmentDoc = gql `\n    fragment DataUnionFields on DataUnion {\n  id\n  owner\n  memberCount\n  revenueWei\n  creationDate\n}\n    `;\nexport const GetDataUnionsByIdDocument = gql `\n    query getDataUnionsById($id: ID!) {\n  dataUnions(where: {id: $id}) {\n    ...DataUnionFields\n  }\n}\n    ${DataUnionFieldsFragmentDoc}`;\nexport const GetDataUnionsOwnedByDocument = gql `\n    query getDataUnionsOwnedBy($owner: String!) {\n  dataUnions(where: {owner: $owner}) {\n    ...DataUnionFields\n  }\n}\n    ${DataUnionFieldsFragmentDoc}`;\n","import { hexToNumber } from 'web3-utils';\nimport { GetDataUnionsOwnedByDocument, } from '~/generated/gql/du';\nimport getClientConfig from '~/getters/getClientConfig';\nimport { getDataUnionGraphClient } from '~/getters/getGraphClient';\nimport { getWalletAccount, getWalletProvider } from '~/shared/stores/wallet';\nimport { getChainConfig, getChainConfigExtension } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nexport async function getDataUnionsOwnedByInChain(account, chainId) {\n    const client = getDataUnionGraphClient(chainId);\n    const { data = { dataUnions: [] } } = await client.query({\n        query: GetDataUnionsOwnedByDocument,\n        variables: {\n            owner: account.toLowerCase(),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return data.dataUnions.map((du) => ({\n        ...du,\n        chainId,\n    }));\n}\nexport async function getDataUnionClient(chainId) {\n    const provider = await getWalletProvider();\n    const config = getChainConfig(chainId);\n    const { dataUnionJoinServerUrl: joinServerUrl } = getChainConfigExtension(chainId);\n    const providerUrl = config.rpcEndpoints.find((rpc) => rpc.url.startsWith('http'))?.url;\n    const providerChainId = hexToNumber(provider.chainId);\n    const isProviderInCorrectChain = providerChainId === chainId;\n    const account = await getWalletAccount();\n    if (!account) {\n        throw new Error('No wallet connected');\n    }\n    const isInCorrectChainAndUnlocked = isProviderInCorrectChain;\n    /**\n     * Data unions client has to be brought to ethers v6.\n     */\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const clientConfig = getClientConfig(chainId, {\n        auth: {\n            // If MetaMask is in right chain, use it to enable signing\n            ethereum: isInCorrectChainAndUnlocked ? provider : undefined,\n            // Otherwise use a throwaway private key to authenticate and allow read-only mode\n            privateKey: !isInCorrectChainAndUnlocked\n                ? '531479d5645596f264e7e3cbe80c4a52a505d60fad45193d1f6b8e4724bf0304'\n                : undefined,\n        },\n        network: {\n            chainId,\n            rpcs: [\n                {\n                    url: providerUrl,\n                    timeout: 120 * 1000,\n                },\n            ],\n        },\n        dataUnion: {\n            factoryAddress: getContractAddress('dataUnionFactory', chainId),\n        },\n        ...(joinServerUrl\n            ? {\n                joinServerUrl,\n            }\n            : {}),\n    });\n    throw new Error('Not implemented');\n}\nexport async function getDataUnion(dataUnionId, chainId) {\n    const dataUnion = await (await getDataUnionClient(chainId)).getDataUnion(dataUnionId);\n    if (!dataUnion) {\n        throw new Error('Data Union not found');\n    }\n    return dataUnion;\n}\nasync function getDataUnionAdminFee(dataUnionId, chainId) {\n    return (await getDataUnion(dataUnionId, chainId)).getAdminFee();\n}\nexport function getDataUnionAdminFeeForSalePoint(salePoint) {\n    const { beneficiary: dataUnionId, domainId: chainId } = salePoint;\n    return getDataUnionAdminFee(dataUnionId, chainId);\n}\n","export default class Transaction {\n    constructor(emitter) {\n        this.emitter = emitter;\n    }\n    onTransactionHash(cb) {\n        this.emitter.on('transactionHash', cb);\n        return this;\n    }\n    onTransactionComplete(cb) {\n        this.emitter.on('receipt', cb);\n        return this;\n    }\n    onError(cb) {\n        this.emitter.on('error', cb);\n        return this;\n    }\n}\n","import EventEmitter from 'events';\nimport { getDataUnionClient } from '~/getters/du';\nimport Transaction from '~/shared/utils/Transaction';\nimport networkPreflight from '~/utils/networkPreflight';\nexport function deployDataUnion({ productId, adminFee, chainId, }) {\n    const emitter = new EventEmitter();\n    const errorHandler = (error) => {\n        emitter.emit('error', error);\n    };\n    const tx = new Transaction(emitter);\n    void (async () => {\n        try {\n            await networkPreflight(chainId);\n            const client = await getDataUnionClient(chainId);\n            const dataUnion = await client.deployDataUnion({\n                dataUnionName: productId,\n                adminFee,\n            });\n            const duAddress = dataUnion.getAddress();\n            emitter.emit('transactionHash', duAddress);\n            emitter.emit('receipt', {\n                contractAddress: duAddress,\n            });\n        }\n        catch (e) {\n            errorHandler(e);\n        }\n    })();\n    return tx;\n}\n","export const timeUnits = {\n    second: 'second',\n    minute: 'minute',\n    hour: 'hour',\n    day: 'day',\n    week: 'week',\n    month: 'month',\n};\nexport const timeUnitSecondsMultiplierMap = new Map([\n    ['second', 1],\n    ['minute', 60],\n    ['hour', 3600],\n    ['day', 86400],\n    ['week', 604800],\n    ['month', 2.628e6],\n]);\n","import { isAddress } from 'web3-validator';\nimport { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { ProjectType } from '~/shared/types';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { getChainDisplayName, getChainKey, getCurrentChain, isChainKey, } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nfunction getFormattedChainNameFromContext({ path: [, chainKey] }) {\n    const chainName = typeof chainKey === 'number'\n        ? `#${chainKey}`\n        : isChainKey(chainKey)\n            ? getChainDisplayName(chainKey)\n            : `\"${chainKey}\"`;\n    return `for ${chainName} network`;\n}\nexport const SalePointsPayload = z.record(z.string(), z\n    .object({\n    beneficiaryAddress: z.string().trim(),\n    chainId: z.number(),\n    enabled: z.boolean(),\n    price: z.bigint().gte(0n).or(z.undefined()),\n    pricePerSecond: z.bigint().gte(0n).or(z.undefined()),\n    pricingTokenAddress: z.string().trim(),\n    readOnly: z.boolean(),\n    timeUnit: z.union([\n        z.literal('second'),\n        z.literal('minute'),\n        z.literal('hour'),\n        z.literal('day'),\n        z.literal('week'),\n        z.literal('month'),\n    ]),\n})\n    .superRefine(({ enabled, price, beneficiaryAddress }, ctx) => {\n    if (!enabled) {\n        return;\n    }\n    if (price == null) {\n        return void ctx.addIssue({\n            code: z.ZodIssueCode.custom,\n            message: `Price ${getFormattedChainNameFromContext(ctx)} is missing`,\n            path: ['price'],\n        });\n    }\n    if (price > 0n || beneficiaryAddress === address0) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Price ${getFormattedChainNameFromContext(ctx)} has to be a positive number`,\n        path: ['price'],\n    });\n})\n    .superRefine(({ enabled, beneficiaryAddress }, ctx) => {\n    if (!enabled || !beneficiaryAddress || isAddress(beneficiaryAddress)) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Beneficiary address ${getFormattedChainNameFromContext(ctx)} is not a valid ERC-20 address`,\n        path: ['beneficiaryAddress'],\n    });\n})\n    .superRefine(({ enabled, pricingTokenAddress }, ctx) => {\n    if (!enabled) {\n        return;\n    }\n    if (!pricingTokenAddress) {\n        return void ctx.addIssue({\n            code: z.ZodIssueCode.custom,\n            message: `Token contract address ${getFormattedChainNameFromContext(ctx)} is missing`,\n            path: ['pricingTokenAddress'],\n        });\n    }\n    if (isAddress(pricingTokenAddress)) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: `Token contract address ${getFormattedChainNameFromContext(ctx)} is not a valid ERC-20 address`,\n        path: ['pricingTokenAddress'],\n    });\n}));\nexport const OpenDataPayload = z.object({\n    name: z.string().trim().min(1, { message: 'Product name cannot be empty' }),\n    type: z.literal(ProjectType.OpenData),\n    description: z.string().trim().min(1, {\n        message: 'Product description cannot be empty',\n    }),\n    creator: z.string().trim().min(1, { message: \"Missing or invalid creator's name\" }),\n    streams: z.array(z.string()).min(1, {\n        message: 'No streams selected',\n    }),\n    imageIpfsCid: z\n        .union([z.string(), z.null(), z.undefined()])\n        .transform((v) => v || ''),\n    imageUrl: z.string().optional(),\n    newImageToUpload: z.instanceof(File).optional(),\n    termsOfUse: z.object({\n        commercialUse: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        redistribution: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        reselling: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        storage: z\n            .boolean()\n            .optional()\n            .transform((v) => v || undefined),\n        termsName: z\n            .string()\n            .trim()\n            .optional()\n            .transform((v) => v || undefined),\n        termsUrl: z\n            .string()\n            .trim()\n            .url('Invalid URL for detailed terms')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n    }),\n    contact: z.object({\n        url: z\n            .string()\n            .trim()\n            .url('Invalid site URL')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        email: z\n            .string()\n            .trim()\n            .email('Invalid contact email')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        twitter: z\n            .string()\n            .trim()\n            .url('Invalid Twitter link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        telegram: z\n            .string()\n            .trim()\n            .url('Invalid Telegram link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        reddit: z\n            .string()\n            .trim()\n            .url('Invalid Reddit link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n        linkedIn: z\n            .string()\n            .trim()\n            .url('Invalid LinkedIn link')\n            .optional()\n            .or(z.literal(''))\n            .transform((v) => v || undefined),\n    }),\n    salePoints: SalePointsPayload.transform(() => {\n        const { id: chainId } = getCurrentChain();\n        return {\n            [getChainKey(chainId)]: {\n                beneficiaryAddress: address0,\n                chainId,\n                enabled: true,\n                price: 0n,\n                pricePerSecond: 0n,\n                pricingTokenAddress: getContractAddress('data', chainId),\n                readOnly: true,\n                timeUnit: timeUnits.second,\n            },\n        };\n    }),\n});\nconst DataUnionPayload = OpenDataPayload.merge(z.object({\n    type: z.literal(ProjectType.DataUnion),\n    salePoints: SalePointsPayload.refine((salePoints) => Object.values(salePoints).some(({ enabled }) => enabled), {\n        message: 'No chains selected',\n    }).transform((salePoints) => {\n        const [key, value] = Object.entries(salePoints).find(([, { enabled }]) => enabled) || [];\n        return key && value ? { [key]: value } : salePoints;\n    }),\n    adminFee: z\n        .string()\n        .optional()\n        .transform((value, ctx) => {\n        const result = Number.parseFloat(value || '0');\n        if (Number.isNaN(result)) {\n            ctx.addIssue({\n                code: z.ZodIssueCode.custom,\n                message: 'Admin fee is not a number',\n            });\n            return z.NEVER;\n        }\n        return result;\n    })\n        .pipe(z\n        .number()\n        .min(0, 'Admin fee cannot be lower than 0%')\n        .max(100, 'Admin fee cannot be greater than 100%')),\n}));\nconst PaidDataPayload = OpenDataPayload.merge(z.object({\n    type: z.literal(ProjectType.PaidData),\n    salePoints: SalePointsPayload.refine((salePoints) => Object.values(salePoints).some(({ enabled }) => enabled), {\n        message: 'No chains selected',\n    }).transform((salePoints) => {\n        const enabledSalePoints = {};\n        Object.entries(salePoints).forEach(([key, salePoint]) => {\n            if (!salePoint.enabled) {\n                return;\n            }\n            enabledSalePoints[key] = salePoint;\n        });\n        return enabledSalePoints;\n    }),\n}));\nexport const PublishableProjectPayload = z\n    .union([OpenDataPayload, PaidDataPayload, DataUnionPayload])\n    .superRefine(({ imageUrl, newImageToUpload }, ctx) => {\n    if (imageUrl || newImageToUpload) {\n        return;\n    }\n    ctx.addIssue({\n        code: z.ZodIssueCode.custom,\n        message: 'Cover image is required',\n        path: ['imageUrl'],\n    });\n});\n","import moment from 'moment-timezone';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nconst momentDurationFormatsByTimeUnit = {\n    [timeUnits.second]: 's',\n    [timeUnits.minute]: 'm',\n    [timeUnits.hour]: 'h',\n    [timeUnits.day]: 'd',\n    [timeUnits.week]: 'w',\n    [timeUnits.month]: 'M',\n};\nconst abbrMapping = {\n    [timeUnits.second]: 's',\n    [timeUnits.minute]: 'min',\n    [timeUnits.hour]: 'hr',\n    [timeUnits.day]: 'd',\n    [timeUnits.week]: 'wk',\n    [timeUnits.month]: 'm',\n};\n/**\n * Convert duration to seconds.\n * @param quantity Number of units to convert.\n * @param timeUnit Unit, e.g. day, hour, minute, etc.\n */\nexport function toSeconds(quantity, timeUnit) {\n    const format = momentDurationFormatsByTimeUnit[timeUnit];\n    if (!format) {\n        throw new Error(`Invalid time unit: ${timeUnit}`);\n    }\n    return Math.floor(moment.duration(quantity, format).asSeconds());\n}\nexport const formatDateTime = (timestamp, timezone) => timestamp && timezone\n    ? moment.tz(timestamp, timezone).format('YYYY-MM-DD HH:mm:ss')\n    : undefined;\n/**\n * Returns short form for given time unit.\n * @param timeUnit Time unit to abbreviate.\n */\nexport function getAbbreviation(timeUnit) {\n    return abbrMapping[timeUnit] || '';\n}\n","import { toSeconds } from '~/marketplace/utils/time';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { BN, toBN, toBigInt } from '~/utils/bn';\n/**\n * Converts price per unit into price per given quantity of another unit.\n * @param value An amount/unit pair. If just the amount is given the unit defaults to seconds.\n * @param target A quantity/unit pair. If just the unit is given the quantity default to 1.\n */\nexport function convertPrice(value, target, { roundingMode = BN.ROUND_HALF_UP } = {}) {\n    const [valueAmount, valueUnit] = typeof value === 'bigint' ? [value, timeUnits.second] : value;\n    const [targetQuantity, targetUnit] = typeof target === 'string'\n        ? [1, target]\n        : typeof target === 'number'\n            ? [target, timeUnits.second]\n            : target;\n    return toBigInt(toBN(valueAmount)\n        .dividedBy(toSeconds(1, valueUnit))\n        .multipliedBy(toSeconds(targetQuantity, targetUnit))\n        .dp(0, roundingMode));\n}\n","import { GetProjectsByTextDocument, GetProjectsDocument, } from '~/generated/gql/network';\nimport { getProjectRegistryContract } from '~/getters';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { deployDataUnion } from '~/marketplace/modules/dataUnion/services';\nimport { getSigner, getWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType, TheGraph } from '~/shared/types';\nimport { truncate } from '~/shared/utils/text';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { PublishableProjectPayload } from '~/types/projects';\nimport { toBN } from '~/utils/bn';\nimport { isMessagedObject } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { convertPrice } from '~/utils/price';\nimport { errorToast } from '~/utils/toast';\nimport { call } from '~/utils/tx';\nimport { postImage } from './images';\nconst mapProject = (project) => {\n    let metadata = {};\n    try {\n        metadata = JSON.parse(project.metadata);\n    }\n    catch (e) {\n        console.warn('Could not parse metadata for project', project.id, e);\n    }\n    return {\n        ...project,\n        metadata,\n    };\n};\nconst prepareProjectResult = (results, pageSize) => {\n    let hasNextPage = false;\n    const projects = results.map((p) => mapProject(p));\n    if (projects.length > pageSize) {\n        hasNextPage = true;\n        // Remove last item\n        projects.splice(pageSize, 1);\n    }\n    return {\n        projects,\n        hasNextPage,\n        lastId: projects.length === 0 ? null : projects[projects.length - 1].id,\n    };\n};\nfunction getProjectFilter(params) {\n    const { owner, projectType, streamId } = params;\n    const filter = {};\n    if (projectType === TheGraph.ProjectType.Open) {\n        filter.paymentDetails_ = {\n            pricePerSecond: 0,\n        };\n    }\n    if (projectType === TheGraph.ProjectType.Paid) {\n        filter.paymentDetails_ = {\n            pricePerSecond_gt: 0,\n        };\n    }\n    if (projectType === TheGraph.ProjectType.DataUnion) {\n        filter.isDataUnion = true;\n    }\n    if (owner) {\n        filter.permissions_ = {\n            userAddress: owner,\n            canGrant: true,\n        };\n    }\n    if (streamId) {\n        filter.streams_contains = [streamId];\n    }\n    return filter;\n}\n/**\n * @todo Refactor to use `ProjectParser` and `useInfiniteQuery`.\n */\nexport async function getProjects(params) {\n    const { chainId, first = 20, owner, projectType, skip = 0, streamId } = params;\n    const { data: { projects = [] }, } = await getGraphClient(chainId).query({\n        query: GetProjectsDocument,\n        variables: {\n            skip,\n            first: first + 1,\n            where: getProjectFilter({\n                owner,\n                projectType,\n                streamId,\n            }),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return prepareProjectResult(projects, first);\n}\n/**\n * @todo Refactor to use `ProjectParser`.\n */\nexport async function getProjectsByText(text, params) {\n    const { chainId, first = 20, owner, projectType, skip = 0, streamId } = params;\n    const { data: { projectSearch: projects = [] }, } = await getGraphClient(chainId).query({\n        query: GetProjectsByTextDocument,\n        variables: {\n            first,\n            skip,\n            text,\n            where: getProjectFilter({\n                owner,\n                projectType,\n                streamId,\n            }),\n        },\n        fetchPolicy: 'network-only',\n    });\n    return prepareProjectResult(projects, first);\n}\nasync function formatMetadata(chainId, { contact: contactDetails, creator, description, imageIpfsCid: existingImageIpfsCid, newImageToUpload, name, termsOfUse, type, }) {\n    const imageIpfsCid = newImageToUpload\n        ? await postImage(chainId, newImageToUpload)\n        : existingImageIpfsCid;\n    return JSON.stringify({\n        name,\n        description,\n        imageIpfsCid,\n        creator,\n        contactDetails,\n        termsOfUse,\n        isDataUnion: type === ProjectType.DataUnion,\n    });\n}\nexport async function getPublishableProjectProperties(project) {\n    const { chainId } = project;\n    const payload = PublishableProjectPayload.parse(project);\n    const salePoints = Object.values(payload.salePoints);\n    const domainIds = [];\n    const paymentDetails = [];\n    const wallet = (await getWalletAccount()) || '';\n    for (let i = 0; i < salePoints.length; i++) {\n        const { beneficiaryAddress, chainId: domainId, enabled, price, pricePerSecond: currentPricePerSecond, pricingTokenAddress, timeUnit, } = salePoints[i];\n        if (!enabled) {\n            continue;\n        }\n        /**\n         * Use current wallet's address as the default beneficiary for *paid* projects\n         * that carry no beneficiary address information. The placeholder for the\n         * beneficiary address input field reflects it, too.\n         */\n        const beneficiary = beneficiaryAddress || (payload.type === ProjectType.PaidData ? wallet : '');\n        const pricePerSecond = await (async () => {\n            if (currentPricePerSecond != null) {\n                /**\n                 * In the current implementation we disallow price changes, so\n                 * if initial `pricePerSecond` is defined we reuse it.\n                 */\n                return currentPricePerSecond;\n            }\n            if (!price) {\n                /**\n                 * 0 (or undefined amount of) tokens per time unit constitues 0 per\n                 * second. No need to fetch decimals.\n                 */\n                return 0n;\n            }\n            return convertPrice([price, timeUnit], timeUnits.second);\n        })();\n        domainIds.push(domainId);\n        paymentDetails.push({\n            beneficiary,\n            pricePerSecond,\n            pricingTokenAddress,\n        });\n    }\n    const metadata = await formatMetadata(chainId, payload);\n    return {\n        adminFee: 'adminFee' in payload\n            ? toBN(payload.adminFee).dividedBy(100).toNumber()\n            : void 0,\n        domainIds,\n        metadata,\n        paymentDetails,\n        streams: payload.streams,\n    };\n}\nexport async function createProject(chainId, projectId, options) {\n    const { domainIds, isPublicPurchasable, metadata, minimumSubscriptionSeconds = 0, paymentDetails, streams, } = options;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({\n        chainId,\n        provider: signer,\n    });\n    await call(contract, 'createProject', {\n        args: [\n            projectId,\n            domainIds,\n            paymentDetails,\n            streams,\n            minimumSubscriptionSeconds,\n            isPublicPurchasable,\n            metadata,\n        ],\n    });\n}\nexport async function updateProject(chainId, projectId, options) {\n    const { domainIds, metadata, minimumSubscriptionSeconds = 0, paymentDetails, streams, } = options;\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({ chainId, provider: signer });\n    await call(contract, 'updateProject', {\n        args: [\n            projectId,\n            domainIds,\n            paymentDetails,\n            streams,\n            minimumSubscriptionSeconds,\n            metadata,\n        ],\n    });\n}\nexport async function deleteProject(chainId, projectId) {\n    await networkPreflight(chainId);\n    const signer = await getSigner();\n    const contract = getProjectRegistryContract({\n        chainId,\n        provider: signer,\n    });\n    try {\n        await call(contract, 'deleteProject', {\n            args: [projectId],\n        });\n    }\n    catch (e) {\n        if (isMessagedObject(e) && /error_projectDoesNotExist/.test(e.message)) {\n            errorToast({\n                title: 'No such project',\n                desc: `Project ${truncate(projectId)} does not exist.`,\n            });\n        }\n        throw e;\n    }\n}\nexport async function deployDataUnionContract(chainId, projectId, adminFee) {\n    await networkPreflight(chainId);\n    return new Promise((resolve, reject) => deployDataUnion({\n        productId: projectId,\n        chainId,\n        adminFee,\n    })\n        .onTransactionComplete(({ contractAddress }) => {\n        if (contractAddress == null) {\n            reject(new Error('DU contract deploy did not return an address!'));\n        }\n        else {\n            resolve(contractAddress);\n        }\n    })\n        .onError((e) => {\n        console.error(e);\n        reject(e);\n    }));\n}\n","/*\n    These are all type\n    {\n        id: label\n    }\n */\n// The order of these must be the same than in the smart contract\nexport const contractCurrencies = {\n    DATA: 'DATA',\n    USD: 'USD',\n    PRODUCT_DEFINED: 'PRODUCT_DEFINED',\n};\nexport const paymentCurrencies = {\n    DATA: 'DATA',\n    ETH: 'ETH',\n    DAI: 'DAI',\n    PRODUCT_DEFINED: 'PRODUCT_DEFINED',\n    NATIVE: 'NATIVE',\n};\nexport const maxFileSizeForImageUpload = 5242880;\n","import { contractCurrencies, paymentCurrencies } from '~/shared/utils/constants';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { toFloat } from '~/utils/bn';\nimport { convertPrice } from '~/utils/price';\nimport { getAbbreviation } from './time';\n/**\n * \"Intelligently\" reduce and display decimals in relation to number size and currency.\n * Human currencies: always 2 decimals for 0-99, always 1 decimal 100-999. 1000+ no decimals\n * DATA currency: Hide decimals for round numbers. 1000+ no decimals.\n * @param value\n * @param currency\n * @param decimals PricingToken decimal count\n * @returns {*}\n */\nexport function formatDecimals(value, currency, decimals) {\n    const bn = toFloat(value, decimals);\n    if (currency === paymentCurrencies.ETH) {\n        return bn.toFixed(4);\n    }\n    if (currency === paymentCurrencies.DAI) {\n        return bn.toFixed(2);\n    }\n    if (currency === paymentCurrencies.PRODUCT_DEFINED) {\n        if (!decimals) {\n            throw new Error('Decimals are required');\n        }\n        return toFloat(value, decimals).toFixed(2);\n    }\n    if (bn.abs().lt(10)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(3).toString()\n            : bn.toFixed(2);\n    }\n    if (bn.abs().lt(100)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(2).toString()\n            : bn.toFixed(2);\n    }\n    if (bn.abs().lt(1000)) {\n        return currency === contractCurrencies.DATA\n            ? bn.decimalPlaces(1).toString()\n            : bn.toFixed(1);\n    }\n    return bn.decimalPlaces(0).toString();\n}\n/**\n * Gets most relevant time unit for given price per second.\n * @param pricePerSecond Price per second.\n */\nexport function getMostRelevantTimeUnit(pricePerSecond, decimals) {\n    /**\n     * Go from smallest time unit to the largest and see when we get a value\n     * bigger than 1. This should be the most relevant unit for the user.\n     */\n    const guess = Object.keys(timeUnits).find((unit) => toFloat(convertPrice(pricePerSecond, [1, unit]), decimals).gte(1));\n    return guess || timeUnits.second;\n}\n/**\n * Formats given price to a human readable string\n * @param pricePerSecond Price per second in wei.\n * @param currency Currency.\n * @param decimals Decimals.\n * @param timeUnit TimeUnit to use. If omitted, the most relevant time unit is calculated.\n * @param symbol Symbol to use if currency === PRODUCT_DEFINED.\n */\nexport function formatPrice(pricePerSecond, currency, decimals, timeUnit, symbol) {\n    const actualTimeUnit = timeUnit || getMostRelevantTimeUnit(pricePerSecond, decimals);\n    const price = convertPrice(pricePerSecond, actualTimeUnit);\n    const timeUnitAbbreviation = getAbbreviation(actualTimeUnit);\n    const roundedPrice = formatDecimals(price, currency, decimals);\n    let actualSymbol = currency;\n    if (currency === contractCurrencies.PRODUCT_DEFINED && symbol != null) {\n        actualSymbol = symbol;\n    }\n    return `${roundedPrice} ${actualSymbol} / ${timeUnitAbbreviation}`;\n}\n","import { z } from 'zod';\nimport { address0 } from '~/consts';\nimport { getProjectImageUrl } from '~/getters';\nimport { getDataUnionAdminFeeForSalePoint } from '~/getters/du';\nimport { getMostRelevantTimeUnit } from '~/marketplace/utils/price';\nimport { ProjectType } from '~/shared/types';\nimport { timeUnits, timeUnitSecondsMultiplierMap, } from '~/shared/utils/timeUnit';\nimport { toBigInt } from '~/utils/bn';\nimport { getChainConfig, getChainKey, getCurrentChainId, getMarketplaceChainConfigs, } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { getTokenInfo } from '~/utils/tokens';\nconst ParsedPaymentDetail = z.object({\n    beneficiary: z.string(),\n    domainId: z.coerce.number(),\n    pricePerSecond: z\n        .string()\n        .optional()\n        .default('0')\n        .transform((v) => toBigInt(v)),\n    pricingTokenAddress: z.string(),\n});\nconst ProjectParser = z.object({\n    id: z.union([z.string(), z.undefined()]),\n    isDataUnion: z.boolean().optional().default(false),\n    streams: z.array(z.string()).transform((streams) => streams.sort()),\n    metadata: z\n        .string()\n        .transform((metadata) => JSON.parse(metadata))\n        .pipe(z.object({\n        name: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        description: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        creator: z\n            .string()\n            .optional()\n            .transform((v) => v || ''),\n        imageIpfsCid: z\n            .string()\n            .optional()\n            .transform((v) => v || undefined),\n        imageUrl: z\n            .string()\n            .optional()\n            .transform((v) => v || undefined),\n        termsOfUse: z\n            .object({\n            commercialUse: z.boolean().optional().default(false),\n            redistribution: z.boolean().optional().default(false),\n            reselling: z.boolean().optional().default(false),\n            storage: z.boolean().optional().default(false),\n            termsName: z.string().optional().default(''),\n            termsUrl: z.string().optional().default(''),\n        })\n            .optional()\n            .default({\n            commercialUse: false,\n            redistribution: false,\n            reselling: false,\n            storage: false,\n            termsName: '',\n            termsUrl: '',\n        }),\n        contactDetails: z\n            .object({\n            url: z.string().optional().default(''),\n            email: z.string().optional().default(''),\n            twitter: z.string().optional().default(''),\n            telegram: z.string().optional().default(''),\n            reddit: z.string().optional().default(''),\n            linkedIn: z.string().optional().default(''),\n        })\n            .optional()\n            .default({\n            url: '',\n            email: '',\n            twitter: '',\n            telegram: '',\n            reddit: '',\n            linkedIn: '',\n        }),\n    })),\n    paymentDetails: z.array(ParsedPaymentDetail),\n    permissions: z.array(z.object({\n        canBuy: z.boolean().optional().default(false),\n        canDelete: z.boolean().optional().default(false),\n        canEdit: z.boolean().optional().default(false),\n        canGrant: z.boolean().optional().default(false),\n        userAddress: z.string(),\n    })),\n});\nexport function parseProject(value, options) {\n    const { chainId } = options;\n    return ProjectParser.transform(async ({ id, isDataUnion, streams, metadata: { contactDetails: contact, creator, description, imageIpfsCid, imageUrl, name, termsOfUse, }, paymentDetails, permissions, }) => {\n        const [payment, secondPayment] = paymentDetails;\n        const isOpenData = payment?.pricePerSecond === 0n && !secondPayment;\n        let adminFee;\n        if (isDataUnion) {\n            try {\n                adminFee = await getDataUnionAdminFeeForSalePoint(payment);\n            }\n            catch (e) {\n                console.warn('Failed to load Data Union admin fee', e);\n            }\n        }\n        const chains = getMarketplaceChainConfigs(chainId);\n        const salePoints = {};\n        chains.map(({ id }) => {\n            salePoints[getChainKey(id)] = {\n                beneficiaryAddress: '',\n                chainId: id,\n                enabled: false,\n                price: undefined,\n                pricePerSecond: undefined,\n                pricingTokenAddress: getContractAddress('data', id).toLowerCase(),\n                readOnly: false,\n                timeUnit: timeUnits.day,\n            };\n        });\n        for (let i = 0; i < paymentDetails.length; i++) {\n            try {\n                const { domainId, pricingTokenAddress, pricePerSecond, beneficiary } = paymentDetails[i];\n                /**\n                 * @todo Make sure we can trust domainId's type. It says it's a number thus\n                 * the explicit type coercion *should be* redundant.\n                 */\n                const { id: chainId } = getChainConfig(Number(domainId));\n                const { decimals } = await getTokenInfo(pricingTokenAddress, chainId);\n                const timeUnit = getMostRelevantTimeUnit(pricePerSecond, decimals);\n                const multiplier = timeUnitSecondsMultiplierMap.get(timeUnit);\n                if (!multiplier) {\n                    throw new Error('Invalid multiplier');\n                }\n                salePoints[getChainKey(chainId)] = {\n                    beneficiaryAddress: isOpenData\n                        ? address0\n                        : beneficiary.toLowerCase(),\n                    chainId,\n                    enabled: true,\n                    price: pricePerSecond * toBigInt(multiplier),\n                    pricePerSecond,\n                    pricingTokenAddress: pricingTokenAddress.toLowerCase(),\n                    readOnly: true,\n                    timeUnit,\n                };\n            }\n            catch (e) {\n                console.warn('Could not convert a payment details into a sale point', e);\n            }\n        }\n        return {\n            adminFee: typeof adminFee === 'undefined' ? '' : `${adminFee * 100}`,\n            chainId,\n            contact,\n            creator,\n            description,\n            id,\n            imageIpfsCid,\n            imageUrl: getProjectImageUrl(chainId, { imageUrl, imageIpfsCid }),\n            isDataUnion,\n            name,\n            newImageToUpload: undefined,\n            paymentDetails,\n            permissions,\n            salePoints,\n            streams,\n            termsOfUse,\n            type: isDataUnion\n                ? ProjectType.DataUnion\n                : isOpenData\n                    ? ProjectType.OpenData\n                    : ProjectType.PaidData,\n        };\n    }).parseAsync(value);\n}\nfunction getEmptySalePoints(chainId) {\n    const marketplaceChainConfigs = getMarketplaceChainConfigs(chainId);\n    const salePoints = {};\n    marketplaceChainConfigs.map(({ id }) => {\n        salePoints[getChainKey(id)] = {\n            beneficiaryAddress: '',\n            chainId: id,\n            enabled: false,\n            price: undefined,\n            pricePerSecond: undefined,\n            pricingTokenAddress: getContractAddress('data', id).toLowerCase(),\n            readOnly: false,\n            timeUnit: timeUnits.day,\n        };\n    });\n    return salePoints;\n}\nexport function getEmptyParsedProject({ chainId: chainIdProp, ...options }) {\n    const chainId = chainIdProp ?? getCurrentChainId();\n    return {\n        chainId,\n        adminFee: '',\n        contact: {\n            url: '',\n            email: '',\n            twitter: '',\n            telegram: '',\n            reddit: '',\n            linkedIn: '',\n        },\n        creator: '',\n        description: '',\n        id: undefined,\n        imageIpfsCid: undefined,\n        imageUrl: undefined,\n        isDataUnion: false,\n        name: '',\n        newImageToUpload: undefined,\n        paymentDetails: [],\n        permissions: [],\n        salePoints: getEmptySalePoints(chainId),\n        streams: [],\n        termsOfUse: {\n            commercialUse: false,\n            redistribution: false,\n            reselling: false,\n            storage: false,\n            termsName: '',\n            termsUrl: '',\n        },\n        ...options,\n    };\n}\n","import { GetProjectDocument, GetProjectSubscriptionsDocument, } from '~/generated/gql/network';\nimport { parseProject } from '~/parsers/ProjectParser';\nimport { getGraphClient } from '~/getters/getGraphClient';\nimport { prehandleBehindBlockError } from '~/errors/BehindIndexError';\nexport async function getParsedProjectById(chainId, projectId, { force = false, minBlockNumber = 0 } = {}) {\n    try {\n        const { data: { project }, } = await getGraphClient(chainId).query({\n            query: GetProjectDocument,\n            variables: {\n                id: projectId.toLowerCase(),\n                minBlockNumber,\n            },\n            fetchPolicy: force ? 'network-only' : void 0,\n        });\n        return (project || null) && (await parseProject(project, { chainId }));\n    }\n    catch (e) {\n        prehandleBehindBlockError(e, minBlockNumber);\n        throw e;\n    }\n}\nexport async function getProjectSubscriptions(chainId, projectId, { force = false } = {}) {\n    const { data: { project }, } = await getGraphClient(chainId).query({\n        query: GetProjectSubscriptionsDocument,\n        variables: {\n            id: projectId,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    return project?.subscriptions || [];\n}\n","import { getCoingeckoNetworkId } from '~/utils/chains';\nconst BASE_URL = 'https://streamr-public.s3.amazonaws.com/truswallet-assets/blockchains';\nexport const getTokenLogoUrl = (tokenContractAddress, chainId) => {\n    const networkId = getCoingeckoNetworkId(chainId);\n    /**\n     * For more details see:\n     * https://api.coingecko.com/api/v3/asset_platforms\n     */\n    return `${BASE_URL}/${networkId}/assets/${tokenContractAddress}/logo.png`;\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport Color from 'color';\nconst Circle = styled.div.withConfig({ displayName: \"Circle\", componentId: \"sc-1wgwdd9\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 24px;\n    height: 24px;\n    line-height: 16px;\n    font-size: 16px;\n    border-radius: 50%;\n    color: ${({ tokenColor }) => (Color(tokenColor).isDark() ? '#ffffff' : '#000000')};\n    background-color: ${({ tokenColor }) => tokenColor};\n`;\nconst hashCode = (str) => {\n    let hash = 0;\n    for (let i = 0; i < str.length; i += 1) {\n        // eslint-disable-next-line no-bitwise\n        hash = str.charCodeAt(i) + ((hash << 5) - hash);\n    }\n    return hash;\n};\nconst intToRGB = (i) => {\n    // eslint-disable-next-line no-bitwise\n    const c = (i & 0x00ffffff).toString(16).toUpperCase();\n    return '00000'.substring(0, 6 - c.length) + c;\n};\nconst UnstyledGenericTokenLogo = ({ contractAddress, symbol, ...props }) => {\n    const cssColor = `#${intToRGB(hashCode(contractAddress || ''))}`;\n    return (React.createElement(Circle, { ...props, tokenColor: cssColor }, (symbol || '?').charAt(0).toUpperCase()));\n};\nconst GenericTokenLogo = styled(UnstyledGenericTokenLogo).withConfig({ displayName: \"GenericTokenLogo\", componentId: \"sc-1t6tcv5\" }) ``;\nexport default GenericTokenLogo;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useImage } from 'react-image';\nimport { getTokenLogoUrl } from '~/shared/utils/tokenAssets';\nimport GenericTokenLogo from './GenericTokenLogo';\nconst Image = styled.img.withConfig({ displayName: \"Image\", componentId: \"sc-q6829e\" }) `\n    width: 24px;\n    height: 24px;\n`;\nconst UnstyledTokenLogo = ({ contractAddress, symbol, chainId, ...props }) => {\n    const logoUrl = contractAddress ? getTokenLogoUrl(contractAddress, chainId) : '';\n    const { src: imgSrc } = useImage({\n        useSuspense: false,\n        srcList: [logoUrl],\n    });\n    return imgSrc ? (React.createElement(Image, { ...props, src: imgSrc, alt: \"Token logo\" })) : (React.createElement(GenericTokenLogo, { contractAddress: contractAddress, symbol: symbol }));\n};\nconst TokenLogo = styled(UnstyledTokenLogo).withConfig({ displayName: \"TokenLogo\", componentId: \"sc-li35s9\" }) ``;\nexport default TokenLogo;\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { Reason, useDiscardableEffect } from 'toasterhea';\nimport { COLORS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { RejectionReason } from '~/utils/exceptions';\nexport function isAbandonment(e) {\n    return (e === RejectionReason.BackButton ||\n        e === RejectionReason.Backdrop ||\n        e === RejectionReason.CancelButton ||\n        e === RejectionReason.CloseButton ||\n        e === RejectionReason.EscapeKey ||\n        e === Reason.Host ||\n        e === Reason.Unmount ||\n        e === Reason.Update);\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-s6fn4l\" }) `\n    background: #f5f5f5;\n    color: #323232;\n    height: 100%;\n    left: 0;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 1;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n`;\nconst Column = styled.div.withConfig({ displayName: \"Column\", componentId: \"sc-fzagel\" }) `\n    margin: 0 auto;\n    max-width: 528px;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n`;\nconst ScrollableContent = styled.div.withConfig({ displayName: \"ScrollableContent\", componentId: \"sc-3sac7r\" }) `\n    flex: 1;\n    overflow-y: auto;\n    padding: 0 16px;\n    \n    @media (min-width: 768px) {\n        padding: 0;\n    }\n`;\nconst Nav = styled.div.withConfig({ displayName: \"Nav\", componentId: \"sc-fyo131\" }) `\n    box-sizing: content-box;\n    height: 64px;\n    padding: 48px 16px;\n    \n    @media (min-width: 768px) {\n        padding: 48px 0;\n    }\n\n    button {\n        appearance: none;\n        background: none;\n        border: 0;\n        padding: 0;\n        width: 64px;\n        height: 100%;\n        display: flex;\n        align-items: center;\n        transform: translateX(-31%);\n    }\n\n    button svg {\n        display: block;\n        margin: 0 auto;\n    }\n\n    & + h2 {\n        font-size: 24px;\n        font-weight: 400;\n        line-height: normal;\n        margin: 0 0 20px;\n        padding: 0 16px;\n        \n        @media (min-width: 768px) {\n            padding: 0;\n        }\n    }\n`;\nconst BackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"BackButtonIcon\", componentId: \"sc-1gl78h5\" }) `\n    color: ${COLORS.primaryLight};\n`;\nexport const Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-6y7s01\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 32px;\n    gap: 16px;\n    padding: 0 16px 16px;\n    background: #f5f5f5;\n    \n    @media (min-width: 768px) {\n        padding: 0 0 16px;\n    }\n\n    @media (max-width: 767px) {\n        flex-direction: column-reverse;\n        align-items: stretch;\n        \n        button {\n            width: 100%;\n        }\n    }\n\n    button {\n        min-width: 120px;\n    }\n`;\nexport default function ProjectModal({ backable = false, children, closeOnEscape = false, onReject, title, }) {\n    useDiscardableEffect((discard) => void setTimeout(discard));\n    useEffect(() => {\n        function onKeyDown(e) {\n            if (e.key === 'Escape' && closeOnEscape) {\n                onReject?.(RejectionReason.EscapeKey);\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onReject, closeOnEscape]);\n    return (React.createElement(Root, null,\n        React.createElement(Column, null,\n            React.createElement(Nav, null, backable && (React.createElement(\"button\", { type: \"button\", onClick: () => void onReject?.(RejectionReason.BackButton) },\n                React.createElement(BackButtonIcon, { name: \"backArrow\" })))),\n            !!title && React.createElement(\"h2\", null,\n                \"\\u200C\",\n                title),\n            React.createElement(ScrollableContent, null, children),\n            React.createElement(Actions, null))));\n}\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport { getAllowance } from '~/getters';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport TokenLogo from '~/shared/components/TokenLogo';\nimport Text from '~/shared/components/Ui/Text';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { COLORS, LIGHT, MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { toFloat } from '~/utils/bn';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport { convertPrice } from '~/utils/price';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst options = [timeUnits.hour, timeUnits.day, timeUnits.week, timeUnits.month].map((unit) => ({\n    label: `${unit.charAt(0).toUpperCase()}${unit.slice(1)}s`, // Uppercase first letter and pluralize\n    value: unit,\n}));\nconst PeriodContainer = styled.div.withConfig({ displayName: \"PeriodContainer\", componentId: \"sc-19jqspw\" }) `\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    background: #ffffff;\n    border-radius: 8px;\n    gap: 16px;\n    padding: 32px 24px;\n    position: relative;\n\n    @media (max-width: 768px) {\n        grid-template-columns: 1fr;\n    }\n`;\nconst DetailsContainer = styled.div.withConfig({ displayName: \"DetailsContainer\", componentId: \"sc-1pwdhu3\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 24px;\n    margin-top: 12px;\n`;\nconst Chain = styled.div.withConfig({ displayName: \"Chain\", componentId: \"sc-nek5xb\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr;\n    background: ${COLORS.secondary};\n    border-radius: 8px;\n    padding: 18px 16px;\n    gap: 8px;\n    align-items: center;\n`;\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-aylxsz\" }) `\n    width: 32px;\n    height: 32px;\n`;\nconst ChainName = styled.div.withConfig({ displayName: \"ChainName\", componentId: \"sc-qg32fm\" }) `\n    font-weight: 400;\n    font-size: 14px;\n    line-height: 16px;\n`;\nconst Amount = styled.span.withConfig({ displayName: \"Amount\", componentId: \"sc-1bsh4vj\" }) `\n    font-size: 44px;\n    font-weight: ${LIGHT};\n`;\nconst AmountBoxInner = styled.div.withConfig({ displayName: \"AmountBoxInner\", componentId: \"sc-8iawiw\" }) `\n    padding: 0 16px;\n    width: max-content;\n`;\nconst AmountBox = styled.div.withConfig({ displayName: \"AmountBox\", componentId: \"sc-1caxpmp\" }) `\n    background: #f5f5f5;\n    border-radius: 8px;\n    position: relative;\n    margin-top: 12px;\n    line-height: normal;\n`;\nconst AmountScrollable = styled.div.withConfig({ displayName: \"AmountScrollable\", componentId: \"sc-1ki28es\" }) `\n    max-width: 100%;\n    overflow: auto;\n    padding: 44px 0;\n`;\nconst AmountBarInner = styled.div.withConfig({ displayName: \"AmountBarInner\", componentId: \"sc-z4fxmg\" }) `\n    padding: 0 16px;\n\n    > div {\n        height: 19px;\n        display: flex;\n        align-items: center;\n    }\n\n    > div > div {\n        overflow: hidden;\n        text-overflow: ellipsis;\n        max-width: 100%;\n    }\n\n    > div > * + div {\n        margin-left: 12px;\n    }\n\n    > div > span {\n        flex-grow: 1;\n    }\n`;\nconst AmountBar = styled.div.withConfig({ displayName: \"AmountBar\", componentId: \"sc-3uap05\" }) `\n    letter-spacing: 0.05em;\n    font-size: 12px;\n    white-space: nowrap;\n    width: 100%;\n    color: #525252;\n    text-transform: uppercase;\n    position: absolute;\n    padding: 18px 0;\n    pointer-events: none;\n\n    * + & {\n        color: #a3a3a3;\n        top: 90px;\n    }\n\n    em {\n        background: white;\n        padding: 2px 4px;\n        border-radius: 2px;\n        font-style: normal;\n        margin-right: 0.25em;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n`;\nconst Currency = styled.span.withConfig({ displayName: \"Currency\", componentId: \"sc-dpb4da\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 12px;\n    line-height: 24px;\n    margin-left: 8px;\n`;\nexport default function AccessPeriodModal({ account = address0, backable = false, balance = 0n, chainId = 137, onReject, onResolve, pricePerSecond = 0n, quantity = 1, tokenAddress = address0, tokenDecimals = 18n, tokenSymbol = 'DATA', unit = timeUnits.hour, usdRate = 1, }) {\n    const [rawLength, setRawLength] = useState(`${quantity}`);\n    useEffect(function updateRawLength() {\n        setRawLength(`${quantity}`);\n    }, [quantity]);\n    const length = Math.max(0, Number(rawLength) || 0);\n    const [selectedUnit, setSelectedUnit] = useState(unit);\n    useEffect(() => {\n        setSelectedUnit(unit);\n    }, [unit]);\n    const total = ((a) => (a > 0n ? a : 0n))(convertPrice(pricePerSecond, [length, selectedUnit]));\n    const disabled = total === 0n;\n    const totalInUSD = toFloat(total, tokenDecimals).multipliedBy(usdRate);\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    /**\n     * It's safe to use `useIsMounted` here because even if we rerender the component\n     * for a different purchase it'll be disabled if there's one already being processed.\n     */\n    const isMounted = useIsMounted();\n    return (React.createElement(ProjectModal, { backable: backable, closeOnEscape: true, onReject: onReject, title: \"Choose access period\" },\n        React.createElement(\"form\", { onSubmit: async (e) => {\n                e.preventDefault();\n                if (disabled || isSubmitting) {\n                    return;\n                }\n                try {\n                    setIsSubmitting(true);\n                    if (!length) {\n                        throw new Error('Invalid quantity');\n                    }\n                    const allowance = await getAllowance(chainId, tokenAddress, account, {\n                        recover: true,\n                    });\n                    onResolve?.({\n                        quantity: length,\n                        unit: selectedUnit,\n                        exceedsAllowance: allowance < total,\n                    });\n                }\n                catch (e) {\n                    onReject?.(e);\n                }\n                finally {\n                    if (isMounted()) {\n                        setIsSubmitting(false);\n                    }\n                }\n            } },\n            React.createElement(PeriodContainer, null,\n                React.createElement(Text, { value: rawLength, onChange: (e) => {\n                        setRawLength(e.target.value);\n                    }, onCommit: setRawLength, autoFocus: true, name: \"quantity\", disabled: isSubmitting }),\n                React.createElement(SelectField2, { placeholder: \"Select a time unit\", options: options, value: selectedUnit, onChange: setSelectedUnit, isClearable: false, fullWidth: true, disabled: isSubmitting })),\n            React.createElement(DetailsContainer, null,\n                React.createElement(Chain, null,\n                    React.createElement(ChainIcon, { chainId: chainId }),\n                    React.createElement(ChainName, null, getChainDisplayName(chainId))),\n                React.createElement(AmountBox, null,\n                    React.createElement(AmountBar, null,\n                        React.createElement(AmountBarInner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"em\", null, toFloat(balance, tokenDecimals).toFixed(3)),\n                                ' ',\n                                React.createElement(\"span\", null, \"Balance\"),\n                                React.createElement(\"div\", null,\n                                    React.createElement(TokenLogo, { chainId: chainId, contractAddress: tokenAddress, symbol: tokenSymbol }))))),\n                    React.createElement(AmountScrollable, null,\n                        React.createElement(AmountBoxInner, null,\n                            React.createElement(Amount, null, toFloat(total, tokenDecimals).toFixed(3)),\n                            React.createElement(Currency, null, tokenSymbol))),\n                    React.createElement(AmountBar, null,\n                        React.createElement(AmountBarInner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"div\", null,\n                                    \"Approx \",\n                                    totalInUSD.toFixed(2),\n                                    \" USD\")))))),\n            React.createElement(Actions, null,\n                !backable && (React.createElement(Button, { kind: \"link\", type: \"button\", onClick: () => {\n                        onReject?.(RejectionReason.CancelButton);\n                    } }, \"Cancel\")),\n                React.createElement(Button, { type: \"submit\", disabled: disabled || isSubmitting, waiting: isSubmitting }, \"Pay now\")))));\n}\n","import React from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nexport default function LoadingIndicator({ loading = false, ...props }) {\n    return (React.createElement(Root, { ...props, \"$loading\": loading },\n        React.createElement(\"div\", null)));\n}\nconst animation = keyframes `\n    0% {\n        transform: translateX(-100%) translateZ(0);\n    }\n\n    45% {\n        transform: translateX(0%) translateZ(0);\n    }\n\n    55% {\n        transform: translateX(0%) translateZ(0);\n    }\n\n    100% {\n        transform: translateX(100%) translateZ(0);\n    }\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-tk7lal\" }) `\n    height: 0;\n    opacity: 0;\n    transition: opacity 0.3s ease-out;\n    will-change: opacity;\n\n    ${({ $loading = false }) => $loading &&\n    css `\n            opacity: 1;\n        `}\n\n    div {\n        height: 2px;\n        position: relative;\n        overflow: hidden;\n    }\n\n    div:after {\n        animation: 2s infinite ${animation};\n        background: #0424ff;\n    }\n\n    div:after,\n    div:before {\n        content: '';\n        display: block;\n        height: 100%;\n        position: absolute;\n        width: 100%;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport PrestyledLoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { COLORS } from '~/shared/utils/styled';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-cy5mjb\" }) `\n    margin: 0 auto;\n    padding: 48px 24px 56px;\n    max-width: 448px;\n    width: 100%;\n\n    p {\n        margin: 0 0 16px;\n    }\n`;\nconst LoadingIndicator = styled(PrestyledLoadingIndicator).withConfig({ displayName: \"LoadingIndicator\", componentId: \"sc-wvtkv7\" }) `\n    div {\n        border-radius: 8px;\n        height: 8px;\n    }\n\n    div:before,\n    div:after {\n        border-radius: 8px;\n    }\n\n    div:before {\n        background-color: ${COLORS.secondaryHover};\n    }\n`;\nexport default function AccessingProjectModal() {\n    return (React.createElement(Modal, { title: \"Accessing project\", onBeforeAbort: () => false, darkBackdrop: true },\n        React.createElement(Content, null,\n            React.createElement(\"p\", null, \"Accessing\\u2026\"),\n            React.createElement(LoadingIndicator, { loading: true })),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    ok: {\n                        title: 'Waiting',\n                        kind: 'primary',\n                        spinner: true,\n                    },\n                } }))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Button } from '~/components/Button';\nimport { Route as R } from '~/utils/routes';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst Box = styled.div.withConfig({ displayName: \"Box\", componentId: \"sc-gqztf5\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 32px 24px 24px;\n    font-size: 16px;\n    line-height: 24px;\n\n    p {\n        margin: 0;\n    }\n`;\nconst Explainer = styled.div.withConfig({ displayName: \"Explainer\", componentId: \"sc-1vuvt8n\" }) `\n    display: grid;\n    grid-template-columns: 18px 1fr;\n    background: ${COLORS.secondary};\n    border-radius: 8px;\n    padding: 20px 24px;\n    line-height: 24px;\n    gap: 12px;\n    margin-top: 32px;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-i2auw8\" }) `\n    align-items: center;\n    display: flex;\n    height: 24px;\n\n    svg {\n        display: block;\n    }\n`;\nexport default function AllowanceModal({ tokenSymbol = 'DATA', onReject }) {\n    return (React.createElement(ProjectModal, { onReject: onReject, title: \"Set Streamr Hub Allowance\" },\n        React.createElement(Box, null,\n            React.createElement(\"p\", null,\n                \"This step allows the Hub to transfer the required amount of\",\n                ' ',\n                tokenSymbol,\n                \".\"),\n            React.createElement(Explainer, null,\n                React.createElement(IconWrap, null,\n                    React.createElement(SvgIcon, { name: \"outlineQuestionMark2\" })),\n                React.createElement(\"p\", null,\n                    \"Allowance is a requirement of ERC-20 token transfers, designed to increase security and efficiency. For more about allowances, see this\",\n                    ' ',\n                    React.createElement(\"a\", { href: R.allowanceInfo(), target: \"_blank\", rel: \"noopener noreferrer\" }, \"page\"),\n                    \".\"))),\n        React.createElement(Actions, null,\n            React.createElement(Button, { waiting: true, type: \"button\" }, \"Waiting\"))));\n}\n","import request from '~/shared/utils/request';\nconst BASE_URL = 'https://api.coingecko.com/api/v3';\n// Got from: https://api.coingecko.com/api/v3/asset_platforms\nconst chainIdToNetworkMapping = {\n    '100': 'xdai',\n    '137': 'polygon-pos',\n};\nexport const getUsdRate = async (tokenContractAddress, chainId) => {\n    const vsCurrency = 'usd'; // https://api.coingecko.com/api/v3/simple/supported_vs_currencies\n    let contractAddress = tokenContractAddress;\n    let network = chainIdToNetworkMapping[chainId.toString()];\n    // Fallback to mainnet\n    if (network == null) {\n        network = 'ethereum';\n        contractAddress = '0x8f693ca8D21b157107184d29D398A8D082b38b76';\n        console.warn('CoinGecko: Fallback to mainnet DATA contract because network is unsupported');\n    }\n    const url = `${BASE_URL}/simple/token_price/${network}?contract_addresses=${contractAddress}&vs_currencies=${vsCurrency}`;\n    const result = await request({\n        method: 'get',\n        url,\n    });\n    const rate = result[contractAddress.toLowerCase()][vsCurrency.toLowerCase()] || 0;\n    return rate;\n};\n","import React, { useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { Button } from '~/components/Button';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { getUsdRate } from '~/shared/utils/coingecko';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { getBalance } from '~/utils/balance';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { RejectionReason } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { getTokenInfo } from '~/utils/tokens';\nimport { connectModal } from './ConnectModal';\nimport ProjectModal, { Actions } from './ProjectModal';\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-13lo3ft\" }) `\n    width: 40px;\n    height: 40px;\n`;\nconst ChainName = styled.span.withConfig({ displayName: \"ChainName\", componentId: \"sc-1ajq8th\" }) `\n    font-size: 18px;\n    line-height: normal;\n    font-weight: ${MEDIUM};\n`;\nconst Form = styled.form.withConfig({ displayName: \"Form\", componentId: \"sc-gcof0a\" }) `\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n`;\nconst Item = styled.label.withConfig({ displayName: \"Item\", componentId: \"sc-xpk97z\" }) `\n    align-items: center;\n    background: #ffffff;\n    border: 2px solid #ffffff;\n    border-radius: 8px;\n    display: grid;\n    gap: 12px;\n    grid-template-columns: auto 1fr auto;\n    padding: 20px;\n    width: 100%;\n    cursor: pointer;\n    transition: 200ms border-color;\n    user-select: none;\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            border-color: #b3d4ff;\n        `}\n`;\nconst Radio = styled.div.withConfig({ displayName: \"Radio\", componentId: \"sc-1buatmx\" }) `\n    width: 20px;\n    height: 20px;\n    border: 2px solid #cdcdcd;\n    border-radius: 100%;\n    transition: 200ms ease-in-out border-color;\n\n    ::before {\n        background: #0324ff;\n        border-radius: 100%;\n        content: '';\n        display: block;\n        height: 12px;\n        opacity: 0;\n        margin: 2px 0 0 2px;\n        transform: translateZ(0) scale(0.5);\n        transition: 200ms ease-in-out;\n        transition-property: transform, opacity;\n        width: 12px;\n    }\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            border-color: #0324ff;\n\n            ::before {\n                opacity: 1;\n                transform: translateZ(0) scale(1);\n            }\n        `}\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-ad29g4\" }) `\n    align-items: center;\n    border-radius: 8px;\n    display: flex;\n    height: 88px;\n    justify-content: center;\n    width: 100%;\n`;\nexport async function getPurchasePreconditions({ chainId, paymentDetails, }) {\n    await networkPreflight(chainId);\n    const paymentDetail = paymentDetails.find(({ domainId }) => domainId === chainId);\n    if (!paymentDetail) {\n        throw new Error('No matching payment detail');\n    }\n    const { pricingTokenAddress: tokenAddress, pricePerSecond } = paymentDetail;\n    const tokenInfo = await getTokenInfo(tokenAddress, chainId);\n    const account = await connectModal.pop();\n    if (!account) {\n        throw new Error('No account');\n    }\n    const balance = await getBalance({\n        chainId,\n        tokenAddress,\n        walletAddress: account,\n    });\n    const usdRate = await getUsdRate(tokenAddress, chainId);\n    return {\n        account,\n        balance,\n        chainId,\n        pricePerSecond,\n        tokenAddress,\n        tokenDecimals: tokenInfo.decimals,\n        tokenSymbol: tokenInfo.symbol,\n        usdRate,\n    };\n}\nexport default function ChainSelectorModal({ projectId, chainIds = [], selectedChainId: selectedChainIdProp, paymentDetails = [], onReject, onResolve, }) {\n    const [selectedChainId, selectChainId] = useState(selectedChainIdProp);\n    useEffect(() => {\n        selectChainId(selectedChainIdProp);\n    }, [selectedChainIdProp]);\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const disabled = !Number.isSafeInteger(selectedChainId) || isSubmitting;\n    /**\n     * It's safe to use `useIsMounted` here because even if we rerender the component\n     * for a different purchase it'll be disabled if there's one already being processed.\n     */\n    const isMounted = useIsMounted();\n    return (React.createElement(ProjectModal, { closeOnEscape: true, onReject: onReject, title: \"Select chain for payment token\" },\n        React.createElement(Form, { onSubmit: async (e) => {\n                e.preventDefault();\n                if (disabled) {\n                    return;\n                }\n                try {\n                    setIsSubmitting(true);\n                    if (typeof selectedChainId !== 'number') {\n                        throw new Error('No selected chain id');\n                    }\n                    if (!projectId) {\n                        throw new Error('No project id');\n                    }\n                    const preconditions = await getPurchasePreconditions({\n                        chainId: selectedChainId,\n                        paymentDetails,\n                    });\n                    onResolve?.(preconditions);\n                }\n                catch (e) {\n                    onReject?.(e);\n                }\n                finally {\n                    if (isMounted()) {\n                        setIsSubmitting(false);\n                    }\n                }\n            } },\n            chainIds.length ? (React.createElement(\"ul\", null, chainIds.map((chainId) => (React.createElement(\"li\", { key: chainId },\n                React.createElement(Item, { \"$selected\": selectedChainId === chainId, onClick: () => void selectChainId((current) => current === chainId ? undefined : chainId) },\n                    React.createElement(ChainIcon, { chainId: chainId }),\n                    React.createElement(ChainName, null, getChainDisplayName(chainId)),\n                    React.createElement(Radio, { \"$selected\": selectedChainId === chainId }))))))) : (React.createElement(Placeholder, null, \"No available chains.\")),\n            React.createElement(Actions, null,\n                React.createElement(Button, { kind: \"link\", type: \"button\", onClick: () => void onReject?.(RejectionReason.CancelButton) }, \"Cancel\"),\n                React.createElement(Button, { type: \"submit\", disabled: disabled, waiting: isSubmitting }, \"Next\")))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Buttons } from '~/components/Buttons';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.p.withConfig({ displayName: \"Content\", componentId: \"sc-1wl1qwq\" }) `\n    margin: 56px 0;\n    padding: 0 108px;\n    text-align: center;\n`;\nexport default function ConfirmPurchaseModal() {\n    return (React.createElement(Modal, { title: \"Payment confirmation\", onBeforeAbort: () => false, darkBackdrop: true },\n        React.createElement(Content, null, \"You need to confirm the transaction in your wallet to access this project\"),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    ok: {\n                        title: 'Waiting',\n                        kind: 'primary',\n                        spinner: true,\n                    },\n                } }))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport PngIcon from '~/shared/components/PngIcon';\nimport { Buttons } from '~/components/Buttons';\nimport { RejectionReason } from '~/utils/exceptions';\nimport Modal from './Modal';\nimport { Footer } from './BaseModal';\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-48o4i9\" }) `\n    padding: 64px 0;\n    text-align: center;\n\n    p {\n        margin: 32px auto 0;\n        padding: 0 96px;\n        position: relative;\n    }\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-zo1o6g\" }) `\n    height: 66px;\n    margin: 0 auto;\n    width: 94px;\n\n    img {\n        display: block;\n        transform: translate(-11%, -23%);\n    }\n`;\nexport default function FailedPurchaseModal({ onReject, onResolve }) {\n    return (React.createElement(Modal, { title: \"Access failed\", onReject: onReject, darkBackdrop: true },\n        React.createElement(Content, null,\n            React.createElement(IconWrap, null,\n                React.createElement(PngIcon, { name: \"walletError\", width: \"110\", height: \"110\" })),\n            React.createElement(\"p\", null, \"Failed to access the project. Please check your wallet or other settings and try again.\")),\n        React.createElement(Footer, null,\n            React.createElement(Buttons, { actions: {\n                    cancel: {\n                        title: 'Go back',\n                        kind: 'link',\n                        onClick() {\n                            onReject?.(RejectionReason.CancelButton);\n                        },\n                    },\n                    ok: {\n                        title: 'Try again',\n                        kind: 'primary',\n                        onClick() {\n                            onResolve?.();\n                        },\n                    },\n                } }))));\n}\n","import React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { LIGHT } from '~/shared/utils/styled';\nimport ProjectModal from './ProjectModal';\nconst Box = styled.div.withConfig({ displayName: \"Box\", componentId: \"sc-1sv82ou\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    padding: 32px 24px;\n    margin: 0 auto;\n    width: 100%;\n    max-width: 408px;\n\n    h2 {\n        font-size: 24px;\n        font-weight: ${LIGHT};\n        line-height: normal;\n        text-align: center;\n        margin: 0 0 12px;\n    }\n\n    p {\n        font-size: 14px;\n        line-height: normal;\n        text-align: center;\n        margin: 0;\n    }\n\n    button {\n        width: 100%;\n    }\n`;\nconst Icon = styled(SvgIcon).withConfig({ displayName: \"Icon\", componentId: \"sc-165u5ys\" }) `\n    width: 112px;\n    height: 112px;\n    justify-self: center;\n    align-self: center;\n`;\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1hjs4xm\" }) `\n    align-items: center;\n    display: flex;\n    height: 224px;\n    justify-content: center;\n    width: 100%;\n\n    svg {\n        display: block;\n    }\n`;\nexport default function PurchaseCompleteModal({ onResolve, onReject }) {\n    useEffect(() => {\n        function onKeyDown(e) {\n            if (e.key === 'Escape') {\n                onResolve?.();\n            }\n        }\n        window.addEventListener('keydown', onKeyDown);\n        return () => {\n            window.removeEventListener('keydown', onKeyDown);\n        };\n    }, [onResolve]);\n    return (React.createElement(ProjectModal, { onReject: onReject },\n        React.createElement(Box, null,\n            React.createElement(\"h2\", null, \"Success!\"),\n            React.createElement(\"p\", null, \"Access to the project was granted.\"),\n            React.createElement(IconWrap, null,\n                React.createElement(Icon, { name: \"checkmarkOutline\" })),\n            React.createElement(Button, { type: \"button\", onClick: () => void onResolve?.() }, \"Done\"))));\n}\n","import { produce } from 'immer';\nimport { useEffect } from 'react';\nimport { toaster } from 'toasterhea';\nimport { create } from 'zustand';\nimport { getAllowance, getERC20TokenContract, getMarketplaceContract } from '~/getters';\nimport { getParsedProjectById, getProjectSubscriptions } from '~/getters/hub';\nimport { toSeconds } from '~/marketplace/utils/time';\nimport AccessPeriodModal from '~/modals/AccessPeriodModal';\nimport AccessingProjectModal from '~/modals/AccessingProjectModal';\nimport AllowanceModal from '~/modals/AllowanceModal';\nimport ChainSelectorModal, { getPurchasePreconditions, } from '~/modals/ChainSelectorModal';\nimport ConfirmPurchaseModal from '~/modals/ConfirmPurchaseModal';\nimport FailedPurchaseModal from '~/modals/FailedPurchaseModal';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport PurchaseCompleteModal from '~/modals/PurchaseCompleteModal';\nimport InsufficientFundsError from '~/shared/errors/InsufficientFundsError';\nimport Toast, { ToastType } from '~/shared/toasts/Toast';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { ensureGasMonies, waitForPurchasePropagation } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getContractAddress } from '~/utils/contracts';\nimport { RejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { convertPrice } from '~/utils/price';\nimport { call } from '~/utils/tx';\nimport { getSigner } from './wallet';\nconst usePurchaseStore = create((set, get) => {\n    function isInProgress(projectId) {\n        return !!get().inProgress[projectId];\n    }\n    return {\n        inProgress: {},\n        subscriptions: {},\n        fetchingSubscriptions: {},\n        async fetchSubscriptions(chainId, projectId) {\n            if (!!get().fetchingSubscriptions[projectId]) {\n                return;\n            }\n            set((current) => produce(current, (next) => {\n                next.fetchingSubscriptions[projectId] = true;\n            }));\n            try {\n                const entries = await getProjectSubscriptions(chainId, projectId, {\n                    force: true,\n                });\n                set((current) => produce(current, (next) => {\n                    const { cache } = next.subscriptions[projectId] || {};\n                    next.subscriptions[projectId] = {\n                        cache,\n                        entries,\n                    };\n                }));\n            }\n            finally {\n                set((current) => produce(current, (next) => {\n                    delete next.fetchingSubscriptions[projectId];\n                }));\n            }\n        },\n        invalidateSubscription(projectId) {\n            set((current) => produce(current, (next) => {\n                const { cache = 0, entries = [] } = next.subscriptions[projectId] || {};\n                next.subscriptions[projectId] = {\n                    cache: cache + 1,\n                    entries,\n                };\n            }));\n        },\n        async purchase(projectChainId, projectId) {\n            if (isInProgress(projectId)) {\n                return;\n            }\n            try {\n                set((current) => produce(current, (next) => {\n                    next.inProgress[projectId] = true;\n                }));\n                const { paymentDetails = [], streams = [] } = (await getParsedProjectById(projectChainId, projectId, {\n                    force: true,\n                })) || {};\n                const chainIds = paymentDetails.map(({ domainId }) => domainId);\n                let preselectedChainId = chainIds[0];\n                const skipChainSelector = typeof preselectedChainId !== 'undefined' && chainIds.length === 1;\n                let chainSelectorResult;\n                while (true) {\n                    /**\n                     * The following ifelse dance makes sure we\n                     * - don't open the Chain Selector for single-chain projects,\n                     * - recycle existing `chainSelectorResult` in a single-chain\n                     *   project scenario.\n                     *\n                     * For multi-chain projects we display the modal and let users\n                     * choose their preference.\n                     *\n                     * The Chain Selector modal uses `getPurchasePreconditions` internally.\n                     */\n                    if (skipChainSelector) {\n                        if (!chainSelectorResult) {\n                            chainSelectorResult = await getPurchasePreconditions({\n                                chainId: preselectedChainId,\n                                paymentDetails,\n                            });\n                        }\n                    }\n                    else {\n                        chainSelectorResult = undefined;\n                        chainSelectorResult = await toaster(ChainSelectorModal, Layer.Modal).pop({\n                            chainIds,\n                            paymentDetails,\n                            projectId,\n                            selectedChainId: preselectedChainId,\n                        });\n                    }\n                    if (!chainSelectorResult) {\n                        throw new Error('World flipped upside down');\n                    }\n                    /**\n                     * Store the selected chain id so that we can show it next time\n                     * we show the Chain Selector modal (if we loop back to it within\n                     * this purchase).\n                     */\n                    preselectedChainId = chainSelectorResult.chainId;\n                    const selectedChainId = preselectedChainId;\n                    const { account, balance, pricePerSecond, tokenAddress, tokenDecimals, tokenSymbol, usdRate, } = chainSelectorResult;\n                    let accessPeriod;\n                    const initialAccessRange = {\n                        quantity: 1,\n                        unit: timeUnits.hour,\n                        exceedsAllowance: false,\n                    };\n                    let allowanceModal;\n                    let startOver = false;\n                    while (true) {\n                        let bail = false;\n                        try {\n                            try {\n                                accessPeriod = await toaster(AccessPeriodModal, Layer.Modal).pop({\n                                    account,\n                                    backable: !skipChainSelector,\n                                    balance,\n                                    chainId: selectedChainId,\n                                    pricePerSecond,\n                                    quantity: initialAccessRange.quantity,\n                                    tokenAddress,\n                                    tokenDecimals,\n                                    tokenSymbol,\n                                    unit: initialAccessRange.unit,\n                                    usdRate,\n                                });\n                            }\n                            catch (e) {\n                                if (isAbandonment(e) && !skipChainSelector) {\n                                    /**\n                                     * The user abandoned the Access Period modal. We break the current\n                                     * phase and tell the workflow to take us back to the Chain Selector.\n                                     */\n                                    startOver = true;\n                                    break;\n                                }\n                                /**\n                                 * Something 'sploded in the Access Period and we end up here. Tell\n                                 * the workflow to terminate the purchase with the exception that\n                                 * brought us here.\n                                 */\n                                bail = true;\n                                throw e;\n                            }\n                            if (!accessPeriod) {\n                                throw new Error('World flipped upside down');\n                            }\n                            const { quantity, unit, exceedsAllowance } = accessPeriod;\n                            /**\n                             * Store the latest access range so that next time we loop back\n                             * to the Access Period modal we can prepopulate it with the recent\n                             * set of properties.\n                             */\n                            Object.assign(initialAccessRange, accessPeriod);\n                            if (exceedsAllowance) {\n                                /**\n                                 * Only show the Allowance modal if there's need for it. Access\n                                 * Period modal calculates it for us.\n                                 */\n                                allowanceModal = toaster(AllowanceModal, Layer.Modal);\n                                setTimeout(async () => {\n                                    try {\n                                        /**\n                                         * Open the Allowance modal asynchronously so that\n                                         * it does not block. We do it in a `setTimeout` so\n                                         * that we can react to exceptions in a clean and\n                                         * predictable way.\n                                         */\n                                        await allowanceModal?.pop({\n                                            tokenSymbol,\n                                        });\n                                    }\n                                    catch (e) {\n                                        if (!isAbandonment(e)) {\n                                            /**\n                                             * Let's just log. The AllowanceModal doesn't have\n                                             * all that many moving parts.\n                                             */\n                                            console.warn(e);\n                                        }\n                                    }\n                                });\n                                const total = convertPrice(pricePerSecond, [\n                                    quantity,\n                                    unit,\n                                ]);\n                                async function setAllowance() {\n                                    while (true) {\n                                        try {\n                                            /**\n                                             * Make sure the user can affort gas. Empty wallets\n                                             * take a walk.\n                                             */\n                                            await ensureGasMonies(selectedChainId, account, {\n                                                recover: true,\n                                            });\n                                            await networkPreflight(selectedChainId);\n                                            const provider = await getSigner();\n                                            /**\n                                             * Send the `approve` method on the selected\n                                             * ERC-20 token contract.\n                                             *\n                                             * This step is required so that the contract\n                                             * itself can spend user's funds.\n                                             */\n                                            const contract = getERC20TokenContract({\n                                                tokenAddress,\n                                                provider,\n                                            });\n                                            await call(contract, 'approve', {\n                                                args: [\n                                                    getContractAddress('marketplace', selectedChainId),\n                                                    total,\n                                                ],\n                                            });\n                                            /**\n                                             * Wallets do not force users to set the requested\n                                             * allowance amounts. Users can set more – that's ok,\n                                             * but also less (too little).\n                                             *\n                                             * In the next steps we verify if the allowance\n                                             * is set properly.\n                                             */\n                                            const allowance = await getAllowance(selectedChainId, tokenAddress, account, {\n                                                recover: true,\n                                            });\n                                            if (allowance < total) {\n                                                /**\n                                                 * If `total` exceeds `allowance` we loop back to top\n                                                 * and make the wallet pop up the allowance box again.\n                                                 */\n                                                continue;\n                                            }\n                                            /**\n                                             * If the allowance is set properly we can move on. Let's\n                                             * break the loop and let the function return.\n                                             */\n                                            break;\n                                        }\n                                        catch (e) {\n                                            console.warn('Setting allowance failed', e);\n                                            if (e instanceof InsufficientFundsError) {\n                                                /**\n                                                 * The user had a chance to react to the gas money\n                                                 * check and dismissed the Insufficient Funds\n                                                 * toast. Pass the exception on!\n                                                 *\n                                                 * This will take us back to the Access Period\n                                                 * modal (bail = false).\n                                                 */\n                                                throw e;\n                                            }\n                                            if (isTransactionRejection(e)) {\n                                                /**\n                                                 * The user rejected the transaction signature, thus\n                                                 * does not wanna continue. Go back to the Access\n                                                 * Period modal.\n                                                 */\n                                                throw e;\n                                            }\n                                            /**\n                                             * Something unexpected happened. Ask the user if they want\n                                             * to try setting the allowance again.\n                                             */\n                                            try {\n                                                await toaster(Toast, Layer.Toast).pop({\n                                                    title: 'Setting allowance failed',\n                                                    type: ToastType.Warning,\n                                                    desc: 'Would you like to try again?',\n                                                    okLabel: 'Yes',\n                                                    cancelLabel: 'No',\n                                                });\n                                                /**\n                                                 * She said yaaas! Take the user back to the top and make\n                                                 * the wallet pop up the allowance setting box again.\n                                                 */\n                                                continue;\n                                            }\n                                            catch (_) {\n                                                /**\n                                                 * The user does not want to retry thus we pass the exception\n                                                 * on and finish terminate the allowance track.\n                                                 *\n                                                 * This takes us back to the Access Period modal.\n                                                 */\n                                                throw e;\n                                            }\n                                        }\n                                    }\n                                }\n                                await setAllowance();\n                            }\n                            const seconds = toSeconds(quantity, unit);\n                            async function buy() {\n                                while (true) {\n                                    let confirmPurchaseModal = toaster(ConfirmPurchaseModal, Layer.Modal);\n                                    try {\n                                        setTimeout(async () => {\n                                            try {\n                                                /**\n                                                 * Open the Confirm Purchase modal in the background (i.e. via\n                                                 * `setTimeout`). This allows the main thread to continue with\n                                                 * the important stuff.\n                                                 */\n                                                await confirmPurchaseModal?.pop();\n                                            }\n                                            catch (e) {\n                                                if (!isAbandonment(e)) {\n                                                    console.warn(e);\n                                                }\n                                            }\n                                        });\n                                        /**\n                                         * Make sure the user can afford gas. Empty wallets\n                                         * take a walk.\n                                         */\n                                        await ensureGasMonies(selectedChainId, account, {\n                                            recover: true,\n                                        });\n                                        await networkPreflight(selectedChainId);\n                                        const provider = await getSigner();\n                                        let accessingProjectModal = toaster(AccessingProjectModal, Layer.Modal);\n                                        try {\n                                            const contract = getMarketplaceContract({\n                                                chainId: selectedChainId,\n                                                provider,\n                                            });\n                                            /**\n                                             * The following is the actual buying call emitted into the\n                                             * network. Note that the gas limit is dynamic and depends\n                                             * on the number of streams associated with the project.\n                                             */\n                                            const buyPromise = call(contract, 'buy', {\n                                                args: [\n                                                    projectId,\n                                                    seconds,\n                                                    {\n                                                        gasLimit: 2e5 + streams.length * 1e5,\n                                                    },\n                                                ],\n                                            });\n                                            /**\n                                             * Once we receive the transaction hash we can safely close the Confirm\n                                             * Purchase modal and carry on.\n                                             */\n                                            confirmPurchaseModal?.discard();\n                                            setTimeout(async () => {\n                                                /**\n                                                 * We pop up the Accessing Project modal and let it live for as long\n                                                 * as it takes. We close it later (see `finally`). It does not block.\n                                                 */\n                                                try {\n                                                    await accessingProjectModal?.pop();\n                                                }\n                                                catch (e) {\n                                                    if (!isAbandonment(e)) {\n                                                        console.warn(e);\n                                                    }\n                                                }\n                                            });\n                                            await buyPromise;\n                                            /**\n                                             * `Buy` transaction is done and now we wait for the `Subscribe` event\n                                             * to propagate through.\n                                             *\n                                             * We may want to either separate it from `buy` function, or wrap it with\n                                             * another `try…catch`, and pop up a \"retry\" toast on a timeout.\n                                             */\n                                            await waitForPurchasePropagation(selectedChainId, projectId, account);\n                                        }\n                                        finally {\n                                            accessingProjectModal?.discard();\n                                            accessingProjectModal = undefined;\n                                        }\n                                        break;\n                                    }\n                                    catch (e) {\n                                        if (e === RejectionReason.CancelButton ||\n                                            e === RejectionReason.EscapeKey) {\n                                            throw new Error('User decided to stay on the invalid network');\n                                        }\n                                        if (e instanceof InsufficientFundsError) {\n                                            /**\n                                             * The user had a chance to react to the gas money\n                                             * check and dismissed the Insufficient Funds\n                                             * toast. Pass the exception on!\n                                             *\n                                             * This will take us back to the Access Period\n                                             * modal (bail = false).\n                                             */\n                                            throw e;\n                                        }\n                                        if (isTransactionRejection(e)) {\n                                            /**\n                                             * The user rejected the transaction signature, thus\n                                             * does not wanna continue. Go back to the Access\n                                             * Period modal.\n                                             */\n                                            throw e;\n                                        }\n                                        confirmPurchaseModal?.discard();\n                                        try {\n                                            await toaster(FailedPurchaseModal, Layer.Modal).pop();\n                                            /**\n                                             * The user clicked \"Try again\" in the Failed Purchase\n                                             * modal. Loop back to the top and try to buy the\n                                             * product again.\n                                             */\n                                            continue;\n                                        }\n                                        catch (_) {\n                                            /**\n                                             * The user click \"Go back\" in the Failed Purchase\n                                             * modal which loops the workflow back to the Access\n                                             * Period modal.\n                                             */\n                                            throw e;\n                                        }\n                                    }\n                                    finally {\n                                        confirmPurchaseModal?.discard();\n                                        confirmPurchaseModal = undefined;\n                                    }\n                                }\n                            }\n                            await buy();\n                        }\n                        catch (e) {\n                            if (bail) {\n                                /**\n                                 * Exceptions that happen along the raised `bail` flag terminate\n                                 * the purchase.\n                                 */\n                                throw e;\n                            }\n                            console.warn('Unsuccessful purchase attempt. Trying again.', e);\n                            /**\n                             * Exceptions that happen with lowered `bail` flag take users back\n                             * to the Access Period modal.\n                             */\n                            continue;\n                        }\n                        finally {\n                            allowanceModal?.discard();\n                            allowanceModal = undefined;\n                        }\n                        /**\n                         * The user bought! Now we have to show the Purchase Complete modal,\n                         * which blocks the flow. Last stop!\n                         */\n                        break;\n                    }\n                    if (startOver) {\n                        continue;\n                    }\n                    try {\n                        await toaster(PurchaseCompleteModal, Layer.Modal).pop();\n                    }\n                    catch (e) {\n                        if (!isAbandonment(e)) {\n                            throw e;\n                        }\n                    }\n                    /**\n                     * Settle and finalize.\n                     */\n                    break;\n                }\n            }\n            finally {\n                set((current) => produce(current, (next) => {\n                    delete next.inProgress[projectId];\n                }));\n            }\n            /**\n             * After the following invalidation all mounted `useHasActiveProjectSubscription`\n             * hooks are gonna update. This will cause both the Connect and the Live data\n             * pages change from the \"Get access\" placeholder view to their\n             * actual views. All in place!\n             */\n            get().invalidateSubscription(projectId);\n        },\n    };\n});\nexport function usePurchaseCallback() {\n    return usePurchaseStore().purchase;\n}\nexport function useIsProjectBeingPurchased(projectId) {\n    const { inProgress } = usePurchaseStore();\n    return (Object.prototype.hasOwnProperty.call(inProgress, projectId) &&\n        !!inProgress[projectId]);\n}\nexport function useHasActiveProjectSubscription(projectId, account) {\n    const chainId = useCurrentChainId();\n    const { subscriptions, fetchSubscriptions } = usePurchaseStore();\n    const { cache } = (projectId && subscriptions[projectId]) || {};\n    useEffect(() => {\n        if (projectId) {\n            fetchSubscriptions(chainId, projectId);\n        }\n    }, [cache, fetchSubscriptions, chainId, projectId]);\n    if (!projectId || !account) {\n        return false;\n    }\n    const { entries } = subscriptions[projectId] || {};\n    if (!entries) {\n        return;\n    }\n    const { endTimestamp = '0' } = entries.find((s) => s.userAddress.toLowerCase() === account.toLowerCase()) || {};\n    return Number.parseInt(endTimestamp, 10) * 1000 >= Date.now();\n}\nexport function useIsAnyPurchaseInProgress() {\n    return !!Object.keys(usePurchaseStore().inProgress).length;\n}\n","import isEqual from 'lodash/isEqual';\nimport uniqueId from 'lodash/uniqueId';\nimport { useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { randomHex } from 'web3-utils';\nimport { ValidationError } from '~/errors';\nimport { getDataUnion } from '~/getters/du';\nimport { createProject, deployDataUnionContract, getPublishableProjectProperties, updateProject, } from '~/services/projects';\nimport { useHasActiveProjectSubscription } from '~/shared/stores/purchases';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { isProjectOwnedBy } from '~/utils';\nimport { toBN } from '~/utils/bn';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { createDraftStore, getEmptyDraft } from '~/utils/draft';\nimport networkPreflight from '~/utils/networkPreflight';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { validationErrorToast } from '~/utils/toast';\nimport { toastedOperations } from '~/utils/toastedOperation';\nexport const ProjectDraft = createDraftStore({\n    async persist({ entity }) {\n        const operations = [];\n        if (!entity) {\n            return;\n        }\n        const { cold, hot: project } = entity;\n        const { chainId } = cold;\n        if (project.id) {\n            const projectId = project.id;\n            const shouldUpdateAdminFee = requiresAdminFeeUpdate(project, cold);\n            const shouldUpdateMatadata = !eq(cold, project);\n            if (shouldUpdateAdminFee) {\n                operations.push({\n                    id: uniqueId('operation-'),\n                    label: 'Update admin fee',\n                });\n            }\n            if (shouldUpdateMatadata) {\n                operations.push({\n                    id: uniqueId('operation-'),\n                    label: 'Update project',\n                });\n            }\n            return void (await toastedOperations(operations, async (next) => {\n                const { domainIds, paymentDetails, adminFee, streams, metadata } = await getPublishableProjectProperties(project);\n                if (shouldUpdateAdminFee) {\n                    const [domainId] = domainIds;\n                    const [paymentDetail] = paymentDetails;\n                    if (!domainId) {\n                        throw new Error('No chain id');\n                    }\n                    if (typeof adminFee === 'undefined') {\n                        throw new Error('No admin fee');\n                    }\n                    if (!paymentDetail) {\n                        throw new Error('No payment details');\n                    }\n                    const { beneficiary: dataUnionId } = paymentDetail;\n                    if (!dataUnionId) {\n                        /**\n                         * Something broke above. We can update a Data Union only when\n                         * we know its deployment address.\n                         */\n                        throw new Error('No Data Union id');\n                    }\n                    const dataUnion = await getDataUnion(dataUnionId, domainId);\n                    await dataUnion.setAdminFee(adminFee);\n                    next();\n                }\n                if (shouldUpdateMatadata) {\n                    await updateProject(chainId, projectId, {\n                        domainIds,\n                        metadata,\n                        paymentDetails,\n                        streams,\n                    });\n                }\n            }));\n        }\n        const shouldDeployDataUnion = requiresDataUnionDeployment(project);\n        if (shouldDeployDataUnion) {\n            operations.push({\n                id: uniqueId('operation-'),\n                label: 'Deploy Data Union contract',\n            });\n        }\n        operations.push({\n            id: uniqueId('operation-'),\n            label: 'Create project',\n        });\n        await toastedOperations(operations, async (next) => {\n            const projectId = randomHex(32);\n            const { domainIds, paymentDetails, adminFee, streams, metadata } = await getPublishableProjectProperties(project);\n            if (shouldDeployDataUnion) {\n                const [domainId] = domainIds;\n                const [paymentDetail] = paymentDetails;\n                if (!domainId) {\n                    throw new Error('No chain id');\n                }\n                if (typeof adminFee === 'undefined') {\n                    throw new Error('No admin fee');\n                }\n                if (!paymentDetail) {\n                    throw new Error('No payment details');\n                }\n                if (paymentDetail.beneficiary) {\n                    /**\n                     * Something broke above. See `requiresDataUnionDeployment` for details.\n                     * We only deploy a new Data Union if the `beneficiary` is empty.\n                     */\n                    throw new Error('Unexpected beneficiary');\n                }\n                await networkPreflight(chainId);\n                const dataUnionId = await deployDataUnionContract(domainId, projectId, adminFee);\n                /**\n                 * We assing the newly deployed Data Union to the project\n                 * we're currently persisting.\n                 */\n                paymentDetail.beneficiary = dataUnionId;\n                next();\n            }\n            await createProject(chainId, projectId, {\n                domainIds,\n                isPublicPurchasable: project.type !== ProjectType.OpenData,\n                metadata,\n                paymentDetails,\n                streams,\n            });\n        });\n    },\n    getEmptyDraft() {\n        return getEmptyDraft(undefined);\n    },\n    isEqual: eq,\n    prefix: 'ProjectDraft-',\n});\nfunction eq(cold, hot) {\n    /**\n     * Admin fee is not metadata. We have to skip it in the\n     * below payload comparison.\n     */\n    return isEqual({ ...hot, adminFee: '' }, { ...cold, adminFee: '' });\n}\nexport function preselectSalePoint(project) {\n    if (project.type === ProjectType.OpenData) {\n        return;\n    }\n    const values = Object.values(project.salePoints);\n    if (values.some((salePoint) => salePoint?.enabled)) {\n        /**\n         * Project has at least one sale point selected already. We have to skip.\n         */\n        return;\n    }\n    const [salePoint] = values;\n    if (!salePoint) {\n        /**\n         * Nothing to enable, eh?\n         */\n        return;\n    }\n    salePoint.enabled = true;\n}\nfunction requiresDataUnionDeployment(project) {\n    return (project.type === ProjectType.DataUnion &&\n        !Object.values(project.salePoints).find((salePoint) => salePoint?.enabled)\n            ?.beneficiaryAddress);\n}\nfunction requiresAdminFeeUpdate(hot, cold) {\n    return (hot.type === ProjectType.DataUnion &&\n        !toBN(hot.adminFee || '0').isEqualTo(toBN(cold.adminFee || '0')));\n}\n/**\n * Checks if the current wallet can access project's streams right away.\n * @returns `undefined` if it's undetermined (= fetching). A `boolean` otherwise.\n */\nexport function useIsAccessibleByCurrentWallet() {\n    const wallet = useWalletAccount();\n    const draft = ProjectDraft.useDraft();\n    const fetching = !!draft?.fetching;\n    const project = draft?.entity?.cold;\n    const hasActiveProjectSubscription = useHasActiveProjectSubscription(project?.id, wallet);\n    if (fetching) {\n        return;\n    }\n    if (project?.type === ProjectType.OpenData) {\n        return true;\n    }\n    if (!wallet) {\n        return false;\n    }\n    return (isProjectOwnedBy(project?.permissions || [], wallet) ||\n        hasActiveProjectSubscription);\n}\nexport function usePersistProjectCallback() {\n    const persist = ProjectDraft.usePersistCallback();\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    return useCallback(() => {\n        persist({\n            onDone(mounted) {\n                if (!mounted) {\n                    return;\n                }\n                navigate(R.projects(routeOptions(chainKey)));\n            },\n            onError(e) {\n                if (e instanceof ValidationError) {\n                    validationErrorToast({ title: 'Failed to publish', error: e });\n                }\n                console.warn('Failed to publish', e);\n            },\n        });\n    }, [persist, navigate, chainKey]);\n}\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { COLORS, MAX_CONTENT_WIDTH } from '~/shared/utils/styled';\nimport Text from '~/shared/components/Ui/Text';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { truncate } from '~/shared/utils/text';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { usePersistProjectCallback } from '~/stores/projectDraft';\nimport { Meatball } from '../Meatball';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '../SimpleDropdown';\nimport { DropdownMenuItem } from '../DropdownMenuItem';\nexport default function BeneficiaryAddressEditor({ disabled = false, invalid = false, onChange: onChangeProp, value: valueProp = '', }) {\n    const [value, setValue] = useState(valueProp);\n    useEffect(() => {\n        setValue(valueProp);\n    }, [valueProp]);\n    const valueRef = useRef(value);\n    if (valueRef.current !== value) {\n        valueRef.current = value;\n    }\n    const accountAddress = useWalletAccount();\n    const { copy } = useCopy();\n    function onChange(newValue) {\n        setValue(newValue);\n        onChangeProp?.(newValue);\n    }\n    const persist = usePersistProjectCallback();\n    return (React.createElement(Container, null,\n        React.createElement(Text, { value: value, onCommit: onChange, placeholder: accountAddress\n                ? accountAddress\n                : 'i.e. 0xa3d1F77ACfF0060F7213D7BF3c7fEC78df847De1', disabled: disabled, invalid: invalid, selectAllOnFocus: true, onKeyDown: ({ key }) => {\n                if (key === 'Enter') {\n                    persist();\n                }\n            } }),\n        React.createElement(Actions, null,\n            React.createElement(SimpleDropdown, { detached: true, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null,\n                    React.createElement(\"ul\", null,\n                        React.createElement(DropdownMenuItem, { tabIndex: -1, type: \"button\", disabled: !accountAddress, onClick: () => {\n                                toggle(false);\n                                if (!accountAddress) {\n                                    return;\n                                }\n                                onChange(accountAddress);\n                            } },\n                            React.createElement(AddressItem, null,\n                                React.createElement(\"div\", null, \"Fill wallet address\"),\n                                React.createElement(\"div\", null, accountAddress\n                                    ? truncate(accountAddress)\n                                    : 'Wallet locked'))),\n                        React.createElement(DropdownMenuItem, { tabIndex: -1, type: \"button\", disabled: !value, onClick: () => {\n                                copy(value);\n                                toggle(false);\n                            } }, \"Copy\")))) }, (toggle) => (React.createElement(ActionsToggle, { type: \"button\", onClick: () => void toggle((x) => !x), disabled: disabled },\n                React.createElement(Meatball, { alt: \"\", color: \"gray\", disabled: disabled })))))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1ioxbai\" }) `\n    background-color: ${COLORS.inputBackground};\n    max-width: ${MAX_CONTENT_WIDTH};\n    padding: 12px 24px;\n    position: relative;\n    line-height: normal;\n`;\nconst AddressItem = styled.div.withConfig({ displayName: \"AddressItem\", componentId: \"sc-1wt9kj9\" }) `\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n\n    div + div {\n        color: #adadad;\n        font-size: 10px;\n    }\n`;\nconst Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-3uqe2h\" }) `\n    position: absolute;\n    padding: 0 32px;\n    right: 0;\n    top: 50%;\n    transform: translateY(-50%);\n`;\nexport const ActionsToggle = styled.button.withConfig({ displayName: \"ActionsToggle\", componentId: \"sc-1ofe3uk\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    outline: 0;\n    padding: 0;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport { EmptyState } from '~/components/EmptyState';\nexport const NoData = ({ firstLine, secondLine, width, compact, }) => {\n    return (React.createElement(EmptyStateWrap, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"Not found\", style: width\n                ? { width: `${width}px`, height: 'auto', maxWidth: '100%' }\n                : {} }), compact: compact },\n        React.createElement(EmptyStateParagraph, null, firstLine),\n        secondLine && React.createElement(EmptyStateParagraph, null, secondLine)));\n};\nconst EmptyStateWrap = styled(EmptyState).withConfig({ displayName: \"EmptyStateWrap\", componentId: \"sc-2k2jc4\" }) `\n    padding: ${({ compact }) => (compact ? '48px' : '150px')} 0;\n`;\nconst EmptyStateParagraph = styled.p.withConfig({ displayName: \"EmptyStateParagraph\", componentId: \"sc-u3l7ho\" }) `\n    font-size: 16px;\n    margin-bottom: 0;\n`;\n","import styled, { css } from 'styled-components';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM, TABLET } from '~/shared/utils/styled';\nconst horizontalPaddingMobile = '24px';\nconst horizontalPaddingDesktop = '40px';\nconst actionPadding = '16px';\nexport const ScrollTableCellsWrap = styled.div.withConfig({ displayName: \"ScrollTableCellsWrap\", componentId: \"sc-1cepcml\" }) `\n    display: grid;\n    grid-template-columns: ${({ stickyColumnCount, nonStickyColumnCount }) => stickyColumnCount + nonStickyColumnCount === 1 ? '1fr' : 'min-content 1fr'};\n    position: relative;\n    overflow: auto;\n    max-height: inherit;\n`;\nexport const ScrollTableColumn = styled.div.withConfig({ displayName: \"ScrollTableColumn\", componentId: \"sc-1hg2ouu\" }) `\n    display: flex;\n    flex-direction: column;\n    flex: 1;\n    ${({ $actionColumn }) => {\n    if ($actionColumn) {\n        return css `\n                flex: 0.1;\n            `;\n    }\n}}\n`;\nexport const ScrollTableNonStickyColumnsWrap = styled.div.withConfig({ displayName: \"ScrollTableNonStickyColumnsWrap\", componentId: \"sc-1jp810v\" }) `\n    display: flex;\n    flex: 1;\n    overflow-x: auto;\n    overflow-y: hidden;\n`;\nexport const ScrollTableHeaderCell = styled.div.withConfig({ displayName: \"ScrollTableHeaderCell\", componentId: \"sc-1csjspu\" }) `\n    border-bottom: 1.5px solid ${COLORS.Border};\n    padding: 5px ${horizontalPaddingMobile};\n    height: 80px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    white-space: nowrap;\n\n    ${({ $align }) => {\n    switch ($align) {\n        case 'start':\n            return css `\n                    justify-content: flex-start;\n                `;\n        case 'end':\n            return css `\n                    justify-content: flex-end;\n                `;\n    }\n}}\n\n    ${({ $pointer }) => {\n    if ($pointer) {\n        return css `\n                cursor: pointer;\n            `;\n    }\n}}\n\n    ${({ $actionCell }) => {\n    if ($actionCell) {\n        return css `\n                padding: ${actionPadding};\n            `;\n    }\n    return css `\n            @media (${TABLET}) {\n                padding: 5px ${horizontalPaddingDesktop};\n            }\n        `;\n}}\n`;\nexport const ScrollTableCell = styled.div.withConfig({ displayName: \"ScrollTableCell\", componentId: \"sc-84u3bq\" }) `\n    padding: 5px ${horizontalPaddingMobile};\n    font-size: 16px;\n    color: ${COLORS.primaryLight} !important; //to override the link styled when we use this StyledComponent as Link\n    height: 90px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    border-bottom: 1px solid ${COLORS.secondary};\n    white-space: nowrap;\n\n    ${({ $align }) => {\n    switch ($align) {\n        case 'start':\n            return css `\n                    justify-content: flex-start;\n                `;\n        case 'end':\n            return css `\n                    justify-content: flex-end;\n                `;\n    }\n}}\n    ${({ $actionCell }) => {\n    if ($actionCell) {\n        return css `\n                border-left: 1px solid ${COLORS.secondary};\n                padding: ${actionPadding};\n                justify-content: center;\n            `;\n    }\n    return css `\n            @media (${TABLET}) {\n                padding: 5px ${horizontalPaddingDesktop};\n            }\n        `;\n}}\n    ${({ $hover }) => {\n    if ($hover) {\n        return css `\n                background-color: ${COLORS.secondaryLight};\n            `;\n    }\n}}\n`;\nexport const OrderCaretIcon = styled(SvgIcon).withConfig({ displayName: \"OrderCaretIcon\", componentId: \"sc-3efezy\" }) `\n    width: 10px;\n    margin-left: 10px;\n    transition: transform 200ms ease-in-out;\n\n    ${({ $direction }) => {\n    switch ($direction) {\n        case 'asc':\n            return css `\n                    transform: rotate(0deg);\n                `;\n        case 'desc':\n            return css `\n                    transform: rotate(180deg);\n                `;\n    }\n}}\n`;\nexport const FloatingLoadingIndicator = styled(LoadingIndicator).withConfig({ displayName: \"FloatingLoadingIndicator\", componentId: \"sc-yygz9b\" }) `\n    position: absolute;\n    top: 78px;\n    left: 0;\n    width: 100%;\n`;\nexport const NoDataWrap = styled.div.withConfig({ displayName: \"NoDataWrap\", componentId: \"sc-1vgu60s\" }) `\n    grid-column-start: 1;\n    grid-column-end: 3;\n`;\n","import React, { useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { DropdownMenuItem } from '~/components/DropdownMenuItem';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { Meatball } from '~/components/Meatball';\nimport { ActionsToggle } from '~/components/SalePointSelector/BeneficiaryAddressEditor';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport { useMediaQuery } from '~/hooks';\nimport { NoData } from '~/shared/components/NoData';\nimport { FloatingLoadingIndicator, NoDataWrap, OrderCaretIcon, ScrollTableCell, ScrollTableCellsWrap, ScrollTableColumn, ScrollTableHeaderCell, ScrollTableNonStickyColumnsWrap, } from '~/shared/components/ScrollTable/ScrollTable.styles';\nimport { TABLET } from '~/shared/utils/styled';\nexport const ScrollTable = ({ isLoading, footerComponent, hasMoreResults, onLoadMore, ...tableProps }) => {\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ScrollTableCore, { isLoading: isLoading, ...tableProps }),\n        hasMoreResults && (React.createElement(LoadMoreButton, { disabled: isLoading, onClick: () => onLoadMore?.(), kind: \"primary2\" }, \"Load more\")),\n        footerComponent != null && footerComponent));\n};\nexport const ScrollTableCore = ({ elements, columns, actions, isLoading, noDataFirstLine, noDataSecondLine, orderDirection, orderBy, onOrderChange, linkMapper, }) => {\n    const isMobile = !useMediaQuery(`only screen and ${TABLET}`);\n    let actualColumns = columns;\n    // Disable sticky columns on mobile since it makes scrolling difficult\n    if (isMobile) {\n        actualColumns = columns.map((c) => ({\n            ...c,\n            isSticky: false,\n        }));\n    }\n    const stickyColumns = actualColumns.filter((column) => column.isSticky);\n    const nonStickyColumns = actualColumns.filter((column) => !column.isSticky);\n    const [hoveredRowIndex, setHoveredRowIndex] = useState(null);\n    const hasOrderingEnabled = orderBy && orderDirection && onOrderChange;\n    return (React.createElement(ScrollTableCellsWrap, { stickyColumnCount: stickyColumns.length, nonStickyColumnCount: nonStickyColumns.length },\n        stickyColumns.map((stickyColumn) => {\n            return (React.createElement(ScrollTableColumn, { key: stickyColumn.key },\n                React.createElement(ScrollTableHeaderCell, { \"$align\": stickyColumn.align, \"$pointer\": onOrderChange && stickyColumn.sortable, onClick: () => {\n                        if (onOrderChange && stickyColumn.sortable) {\n                            onOrderChange(stickyColumn.key);\n                        }\n                    } },\n                    React.createElement(\"span\", null, stickyColumn.displayName),\n                    ' ',\n                    hasOrderingEnabled && stickyColumn.key === orderBy && (React.createElement(OrderCaret, { orderDirection: orderDirection }))),\n                elements && elements.length > 0 && (React.createElement(React.Fragment, null, elements.map((element, id) => {\n                    return (React.createElement(ScrollTableCell, { key: id, \"$align\": stickyColumn.align, \"$hover\": hoveredRowIndex === id, as: linkMapper ? Link : 'div', to: linkMapper ? linkMapper(element) : '', onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) }, stickyColumn.valueMapper(element)));\n                })))));\n        }),\n        React.createElement(ScrollTableNonStickyColumnsWrap, null,\n            nonStickyColumns.map((nonStickyColumn) => {\n                return (React.createElement(ScrollTableColumn, { key: nonStickyColumn.key },\n                    React.createElement(ScrollTableHeaderCell, { \"$align\": nonStickyColumn.align, \"$pointer\": onOrderChange && nonStickyColumn.sortable, onClick: () => {\n                            if (onOrderChange && nonStickyColumn.sortable) {\n                                onOrderChange(nonStickyColumn.key);\n                            }\n                        } },\n                        React.createElement(\"span\", null, nonStickyColumn.displayName),\n                        hasOrderingEnabled &&\n                            nonStickyColumn.key === orderBy && (React.createElement(OrderCaret, { orderDirection: orderDirection }))),\n                    elements && elements.length > 0 && (React.createElement(React.Fragment, null, elements.map((element, id) => {\n                        return (React.createElement(ScrollTableCell, { as: linkMapper ? Link : 'div', to: linkMapper ? linkMapper(element) : '', key: id, \"$align\": nonStickyColumn.align, \"$hover\": hoveredRowIndex === id, onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) }, nonStickyColumn.valueMapper(element)));\n                    })))));\n            }),\n            actions && actions.length && (React.createElement(ScrollTableColumn, { \"$actionColumn\": true },\n                React.createElement(ScrollTableHeaderCell, { \"$actionCell\": true }),\n                elements.map((element, id) => (React.createElement(ScrollTableCell, { key: id, \"$actionCell\": true, \"$hover\": hoveredRowIndex === id, onMouseEnter: () => setHoveredRowIndex(id), onMouseLeave: () => setHoveredRowIndex(null) },\n                    React.createElement(SimpleDropdown, { detached: true, menu: (toggle) => (React.createElement(SimpleListDropdownMenu, null,\n                            React.createElement(\"ul\", null, actions.map((action, actionIndex) => {\n                                const { displayName, callback, disabled, } = typeof action === 'function'\n                                    ? action(element)\n                                    : {\n                                        displayName: typeof action.displayName ===\n                                            'function'\n                                            ? action.displayName(element)\n                                            : action.displayName,\n                                        callback() {\n                                            action.callback(element);\n                                        },\n                                        disabled: typeof action.disabled ===\n                                            'function'\n                                            ? action.disabled(element)\n                                            : action.disabled,\n                                    };\n                                return (React.createElement(DropdownMenuItem, { key: actionIndex, type: \"button\", disabled: disabled, onClick: () => {\n                                        callback();\n                                        toggle(false);\n                                    } }, displayName));\n                            })))) }, (toggle) => (React.createElement(ActionsToggle, { type: \"button\", onClick: () => void toggle((x) => !x) },\n                        React.createElement(Meatball, { alt: \"\", layout: \"vertical\" })))))))))),\n        (!elements || elements.length === 0) && (React.createElement(NoDataWrap, null,\n            React.createElement(NoData, { firstLine: noDataFirstLine || 'No data', secondLine: noDataSecondLine, compact: true }))),\n        React.createElement(FloatingLoadingIndicator, { loading: isLoading })));\n};\nconst OrderCaret = ({ orderDirection }) => {\n    return React.createElement(OrderCaretIcon, { name: \"caretUp\", \"$direction\": orderDirection });\n};\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport moment from 'moment';\nimport React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { Decimals } from '~/components/Decimals';\nimport { StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FormModalRoot, SectionHeadline, } from '~/modals/FormModal';\nimport { forceUnstakeFromSponsorship } from '~/services/sponsorships';\nimport { Radio } from '~/shared/components/Radio';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nfunction getOptimalStake(stakes, requestedAmount) {\n    return (stakes.find((s) => isStakedLongEnough(s.joinedAt, s.minimumStakingPeriodSeconds) &&\n        s.amountWei >= requestedAmount) || stakes[0]);\n}\nfunction isStakedLongEnough(joinedAt, minimumStakingPeriodSeconds) {\n    return joinedAt.getTime() + minimumStakingPeriodSeconds * 1000 < Date.now();\n}\nfunction ForceUndelegateModal({ amount, onResolve, operator, chainId, ...props }) {\n    const [busy, setBusy] = useState(false);\n    const stakes = useMemo(() => [...operator.stakes].sort((a, b) => (b.amountWei > a.amountWei ? -1 : 1)), [operator]);\n    const [selectedSponsorshipId, setSelectedSponsorshipId] = useState(getOptimalStake(stakes, amount)?.sponsorshipId);\n    const selectedSponsorship = useMemo(() => stakes.find((s) => s.sponsorshipId === selectedSponsorshipId), [stakes, selectedSponsorshipId]);\n    const willSlash = !!selectedSponsorship &&\n        !isStakedLongEnough(selectedSponsorship.joinedAt, selectedSponsorship.minimumStakingPeriodSeconds);\n    const isPartialPayout = !!selectedSponsorship && selectedSponsorship.amountWei < amount;\n    const canSubmit = !!selectedSponsorshipId;\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(ForceUndelegateFormModal, { ...props, title: \"Force unstake\", canSubmit: canSubmit && !busy, submitting: busy, submitLabel: \"Force unstake\", onSubmit: async () => {\n            if (!canSubmit) {\n                return;\n            }\n            setBusy(true);\n            try {\n                await forceUnstakeFromSponsorship(chainId, selectedSponsorshipId, operator.id, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.(selectedSponsorshipId);\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(Root, null,\n            React.createElement(SectionHeadline, null, \"Because there are expired items in the undelegation queue, you can force the Operator to unstake from any Sponsorship, in order to pay out the queued undelegations.\"),\n            React.createElement(TableWrap, null,\n                React.createElement(ScrollTable, { elements: stakes, columns: [\n                        {\n                            displayName: 'Stream ID',\n                            valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                            align: 'start',\n                            isSticky: true,\n                            key: 'streamid',\n                        },\n                        {\n                            displayName: 'Amount',\n                            valueMapper: (element) => (React.createElement(WarningCell, null,\n                                React.createElement(Decimals, { abbr: true, amount: element.amountWei, decimals: decimals, tooltip: true }),\n                                element.amountWei < amount && (React.createElement(Tooltip, { content: React.createElement(\"p\", null, \"Partial payout\") },\n                                    React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'amount',\n                        },\n                        {\n                            displayName: 'Joined',\n                            valueMapper: (element) => (React.createElement(WarningCell, null,\n                                moment(element.joinedAt).format('YYYY-MM-DD'),\n                                !isStakedLongEnough(element.joinedAt, element.minimumStakingPeriodSeconds) && (React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                                        \"Minimum stake period of\",\n                                        ' ',\n                                        element.minimumStakingPeriodSeconds /\n                                            60 /\n                                            60 /\n                                            24,\n                                        ' ',\n                                        \"days not reached. Operator will be slashed.\") },\n                                    React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'joined',\n                        },\n                        {\n                            displayName: '',\n                            valueMapper: ({ sponsorshipId: id }) => (React.createElement(React.Fragment, null,\n                                React.createElement(Radio, { name: \"undelegate-sponsorship\", id: `undelegate-sponsorship-${id}`, label: \"\", value: id, checked: selectedSponsorshipId === id, onChange: (value) => {\n                                        setSelectedSponsorshipId(value);\n                                    } }))),\n                            align: 'end',\n                            isSticky: false,\n                            key: 'actions',\n                        },\n                    ] })),\n            willSlash && (React.createElement(Alert, { type: \"error\", title: \"Operator will be slashed\" }, \"Selecting this Sponsorship will result in slashing. Please consider selecting a different Sponsorship if available.\")),\n            isPartialPayout && (React.createElement(Alert, { type: \"error\", title: \"Partial payout\" }, \"Unstaking from this Sponsorship will not completely cover the queued undelegation. After unstaking, you can select additional Sponsorships to continue payouts.\")))));\n}\nexport const forceUndelegateModal = toaster(ForceUndelegateModal, Layer.Modal);\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1kc6igb\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 16px;\n`;\nconst TableWrap = styled.div.withConfig({ displayName: \"TableWrap\", componentId: \"sc-15kkrn3\" }) `\n    max-height: ${90 * 6}px;\n    overflow: auto;\n`;\nconst ForceUndelegateFormModal = styled(FormModal).withConfig({ displayName: \"ForceUndelegateFormModal\", componentId: \"sc-1bpwuaz\" }) `\n    & ${FormModalRoot} {\n        max-width: 848px;\n    }\n`;\nconst WarningCell = styled.div.withConfig({ displayName: \"WarningCell\", componentId: \"sc-1yh5jhr\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\n","import moment from 'moment';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Alert } from '~/components/Alert';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useConfigValueFromChain, useMaxUndelegationQueueDays, useMediaQuery, } from '~/hooks';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport FormModal, { FieldWrap, MaxButton, Prop, PropList, PropValue, Section, SectionHeadline, TextAppendix, TextInput, } from '~/modals/FormModal';\nimport { undelegateFromOperator } from '~/services/operators';\nimport Label from '~/shared/components/Ui/Label';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { waitForIndexedBlock } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { RejectionReason, isRejectionReason, isTransactionRejection, } from '~/utils/exceptions';\nfunction UndelegateFundsModal({ balance, chainId, delegatedTotal, onResolve, operator, ...props }) {\n    const wallet = useWalletAccount();\n    const isOwner = wallet?.toLowerCase() === operator.owner.toLowerCase();\n    const [title, submitLabel, amountLabel, totalLabel, subtitlePartial, pastAction] = isOwner\n        ? [\n            'Withdraw from Operator',\n            'Withdraw',\n            'Amount to unstake',\n            'Amount currently staked on Operator',\n            'you wish to unstake from your Operator',\n            'withdrawn',\n        ]\n        : [\n            'Undelegate from Operator',\n            'Undelegate',\n            'Amount to undelegate',\n            'Amount currently delegated to Operator',\n            'to undelegate from the selected Operator',\n            'undelegated',\n        ];\n    const [rawAmount, setRawAmount] = useState('');\n    const maxUndelegationQueueDays = useMaxUndelegationQueueDays();\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const amount = toBigInt(rawAmount || 0, decimals);\n    const freeFunds = operator.dataTokenBalanceWei;\n    const hasZeroDeployed = operator.totalStakeInSponsorshipsWei === 0n;\n    const minimumSelfDelegationFraction = useConfigValueFromChain('minimumSelfDelegationFraction', (value) => toFloat(value, decimals)) || toBN(0);\n    const minimumSelfDelegationPercentage = minimumSelfDelegationFraction\n        .multipliedBy(100)\n        .toNumber();\n    const isSelfDelegationTooLow = isOwner &&\n        minimumSelfDelegationFraction.isGreaterThan(0) &&\n        delegatedTotal - amount <\n            toBigInt(toBN(delegatedTotal).multipliedBy(minimumSelfDelegationFraction));\n    const earliestUndelegationTimestamp = operator.delegations.find((d) => d.delegator.toLowerCase() === wallet?.toLowerCase())?.earliestUndelegationTimestamp;\n    const isTooEarlyToUndelegate = operator.contractVersion > 0 &&\n        !isOwner &&\n        earliestUndelegationTimestamp != null &&\n        earliestUndelegationTimestamp * 1000 > Date.now();\n    const canSubmit = amount > 0n &&\n        !(isSelfDelegationTooLow && !hasZeroDeployed) &&\n        !isTooEarlyToUndelegate;\n    const [busy, setBusy] = useState(false);\n    const limitedSpace = useMediaQuery('screen and (max-width: 460px)');\n    return (React.createElement(FormModal, { ...props, title: title, canSubmit: canSubmit && !busy, submitting: busy, submitLabel: submitLabel, onBeforeAbort: (reason) => !busy && (rawAmount === '' || reason !== RejectionReason.Backdrop), onSubmit: async () => {\n            setBusy(true);\n            try {\n                await undelegateFromOperator(chainId, operator.id, amount >= delegatedTotal\n                    ? /**\n                       * If we are requesting all funds to be undelegated, send\n                       * a truely big number instead of infinity.\n                       */\n                        110763745230805656649802800132303954225n\n                    : amount, {\n                    onReceipt: ({ blockNumber }) => waitForIndexedBlock(chainId, blockNumber),\n                });\n                onResolve?.();\n            }\n            catch (e) {\n                if (isRejectionReason(e)) {\n                    return;\n                }\n                if (isTransactionRejection(e)) {\n                    return;\n                }\n                throw e;\n            }\n            finally {\n                setBusy(false);\n            }\n        } },\n        React.createElement(SectionHeadline, null,\n            \"Please enter the amount of \",\n            React.createElement(SponsorshipPaymentTokenName, null),\n            \" tokens\",\n            ' ',\n            subtitlePartial),\n        React.createElement(Section, null,\n            React.createElement(Label, { \"$wrap\": true }, amountLabel),\n            React.createElement(FieldWrap, { \"$top\": true },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => {\n                        setRawAmount(target.value);\n                    }, placeholder: \"0\", readOnly: busy, type: \"number\", min: 0, step: \"any\", value: rawAmount }),\n                React.createElement(MaxButton, { onClick: () => {\n                        setRawAmount(toFloat(delegatedTotal, decimals).toString());\n                    } }),\n                React.createElement(TextAppendix, null,\n                    React.createElement(SponsorshipPaymentTokenName, null))),\n            React.createElement(FieldWrap, { \"$bottom\": true, \"$padded\": true },\n                React.createElement(Prop, null,\n                    totalLabel,\n                    \":\",\n                    ' ',\n                    React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: delegatedTotal, tooltip: limitedSpace }))),\n            React.createElement(PropList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Your wallet balance\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: balance, tooltip: limitedSpace }))),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Operator\"),\n                    React.createElement(PropValue, null, operator.id)),\n                React.createElement(\"li\", null,\n                    React.createElement(Prop, null, \"Available balance in Operator\"),\n                    React.createElement(PropValue, null,\n                        React.createElement(SponsorshipDecimals, { abbr: limitedSpace, amount: freeFunds, tooltip: limitedSpace }))))),\n        React.createElement(Footer, null,\n            amount > 0 && amount <= freeFunds && (React.createElement(Alert, { type: \"notice\", title: React.createElement(React.Fragment, null,\n                    React.createElement(SponsorshipDecimals, { amount: amount }),\n                    \" will be\",\n                    ' ',\n                    pastAction,\n                    \" immediately\") })),\n            amount > freeFunds && (React.createElement(Alert, { type: \"notice\", title: \"Undelegation will be queued\" },\n                \"Your undelegation will be queued for a maximum of\",\n                ' ',\n                maxUndelegationQueueDays.toString(),\n                \" days, after which you will be able to force undelegation.\")),\n            isSelfDelegationTooLow && hasZeroDeployed && (React.createElement(Alert, { type: \"error\", title: \"Low self-funding\" },\n                \"At least \",\n                minimumSelfDelegationPercentage.toFixed(0),\n                \"% of the Operator's total stake must come from you as the owner. After your withdrawal, your remaining amount will be below this limit. This will prevent your Operator from staking on Sponsorships. It will also signal to Delegators that you're shutting down, and will most likely cause them to undelegate.\")),\n            isSelfDelegationTooLow && !hasZeroDeployed && (React.createElement(Alert, { type: \"error\", title: \"Low self-funding\" },\n                \"At least \",\n                minimumSelfDelegationPercentage.toFixed(0),\n                \"% of the Operator's total stake must come from you as the owner. If you wish to stop being an Operator, you can withdraw any amount once your Operator is not staked on any Sponsorships. Note that this prevents your Operator from staking on Sponsorships until the limit is reached again. It is also a strong signal to Delegators that you're shutting down, and will most likely cause them to undelegate.\")),\n            isTooEarlyToUndelegate && (React.createElement(Alert, { type: \"error\", title: React.createElement(React.Fragment, null,\n                    \"You can not undelegate because your minimum delegation period is still active. It will expire on\",\n                    ' ',\n                    moment(earliestUndelegationTimestamp * 1000).format('YYYY-MM-DD HH:mm'),\n                    \".\") })))));\n}\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-18w54iv\" }) `\n    display: grid;\n    gap: 8px;\n    margin-top: 8px;\n`;\nexport const undelegateFundsModal = toaster(UndelegateFundsModal, Layer.Modal);\n","import React from 'react';\nimport styled from 'styled-components';\nimport { truncate } from '~/shared/utils/text';\nimport { MEDIUM } from '~/shared/utils/styled';\nexport const Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1l9f9v6\" }) `\n    font-weight: ${MEDIUM};\n    line-height: 1em;\n`;\nexport const Username = styled.div.withConfig({ displayName: \"Username\", componentId: \"sc-g88mn5\" }) `\n    color: #a3a3a3;\n    line-height: 1em;\n`;\nconst UnstyledAvatarless = ({ source, ...props }) => (React.createElement(\"div\", { ...props },\n    React.createElement(Username, { title: source },\n        truncate(source),\n        \"\\u200C\")));\nexport const Avatarless = styled(UnstyledAvatarless).withConfig({ displayName: \"Avatarless\", componentId: \"sc-amyqc0\" }) ``;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Menu as UnstyledMenu, NavDropdown } from '@streamr/streamr-layout';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport AvatarImage from '~/shared/components/AvatarImage';\nimport { COLORS, DESKTOP, MEDIUM, REGULAR } from '~/shared/utils/styled';\nimport { Avatarless, Name, Username } from './User';\nexport const MOBILE_LG = 576;\nconst CaretDownIcon = styled(SvgIcon).withConfig({ displayName: \"CaretDownIcon\", componentId: \"sc-mb9kg3\" }) `\n    opacity: 1;\n`;\nconst CaretUpIcon = styled(SvgIcon).withConfig({ displayName: \"CaretUpIcon\", componentId: \"sc-10lt16n\" }) `\n    opacity: 0;\n`;\nconst DropdownToggle = styled.div.withConfig({ displayName: \"DropdownToggle\", componentId: \"sc-m2um4m\" }) `\n    background: #f8f8f8;\n    width: 32px;\n    height: 32px;\n    border-radius: 4px;\n    position: relative;\n    margin-top: 1px;\n\n    svg {\n        position: absolute;\n        left: 50%;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 10px;\n        height: 10px;\n        transition: 200ms opacity;\n    }\n`;\nexport const Menu = styled(UnstyledMenu).withConfig({ displayName: \"Menu\", componentId: \"sc-77wf0i\" }) ``;\nexport const TextMenuItem = styled(Menu.Item).withConfig({ displayName: \"TextMenuItem\", componentId: \"sc-i8ek88\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    padding: 12px 16px !important;\n\n    > span:first-child {\n        display: block;\n        flex-grow: 1;\n    }\n\n    :disabled,\n    &[disabled] {\n        cursor: default;\n        opacity: 0.5;\n    }\n`;\nexport const UserInfoMenuItem = styled(Menu.Item).withConfig({ displayName: \"UserInfoMenuItem\", componentId: \"sc-bkw7wj\" }) `\n    padding: 0 16px !important;\n`;\nexport const MenuDivider = styled(Menu.Divider).withConfig({ displayName: \"MenuDivider\", componentId: \"sc-13iga5\" }) `\n    margin: 0;\n`;\nexport const WalletAddress = styled.div.withConfig({ displayName: \"WalletAddress\", componentId: \"sc-1tu7xrr\" }) `\n    margin-left: 13px;\n    display: flex;\n    flex-direction: column;\n\n    span {\n        font-size: 14px;\n        line-height: 18px;\n        user-select: none;\n        color: ${COLORS.primary};\n        font-weight: 400;\n\n        &.ens-name {\n            font-weight: 500;\n        }\n    }\n`;\nexport const SignedInUserMenu = styled(NavDropdown).withConfig({ displayName: \"SignedInUserMenu\", componentId: \"sc-1bobody\" }) `\n    ${Menu} {\n        width: 260px;\n        padding: 0;\n\n        ${Menu.Item}:first-child {\n            padding: 0 4px;\n            margin-bottom: 10px;\n        }\n\n        ${Avatarless} {\n        }\n\n        ${Name},\n        ${Username} {\n            overflow: hidden;\n            white-space: nowrap;\n            text-overflow: ellipsis;\n        }\n    }\n\n    :hover ${DropdownToggle} {\n        ${CaretDownIcon} {\n            opacity: 0;\n        }\n\n        ${CaretUpIcon} {\n            opacity: 1;\n        }\n    }\n`;\nexport const Navbar = styled.div.withConfig({ displayName: \"Navbar\", componentId: \"sc-9anunl\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr auto auto;\n    align-items: center;\n    gap: 16px;\n`;\nexport const MenuGrid = styled.div.withConfig({ displayName: \"MenuGrid\", componentId: \"sc-fdzpv0\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto auto 1fr;\n    justify-content: center;\n    align-items: center;\n`;\nexport const NavLink = styled.a.withConfig({ displayName: \"NavLink\", componentId: \"sc-1hxwmd8\" }) ``;\nexport const NavbarItem = styled.div.withConfig({ displayName: \"NavbarItem\", componentId: \"sc-p4yndu\" }) `\n    ${MenuGrid} & + & {\n        margin-left: 16px;\n    }\n`;\nconst LinkWrapper = styled.div.withConfig({ displayName: \"LinkWrapper\", componentId: \"sc-vrnt2t\" }) `\n    ${NavLink} {\n        display: block;\n        color: ${COLORS.primaryLight};\n        text-transform: uppercase;\n        font-weight: ${MEDIUM};\n        letter-spacing: 2px;\n        white-space: nowrap;\n        text-decoration: none !important;\n    }\n\n    &:hover {\n        ${NavLink} {\n            color: ${COLORS.primary};\n        }\n    }\n`;\nconst UnstyledNavbarLink = ({ children, ...props }) => {\n    return React.createElement(LinkWrapper, { ...props }, children);\n};\nexport const NavbarLinkDesktop = styled(UnstyledNavbarLink).withConfig({ displayName: \"NavbarLinkDesktop\", componentId: \"sc-m4bq7u\" }) `\n    position: relative;\n\n    ${NavLink} {\n        font-size: 12px;\n        padding: 0 10px;\n        height: 40px;\n        line-height: 40px;\n    }\n\n    &:after {\n        display: block;\n        content: '';\n        position: absolute;\n        bottom: 2px;\n        left: 50%;\n        transition: width 0.2s ease-out;\n        width: 0;\n        height: 2px;\n        background-color: ${COLORS.primary};\n        transform: translateX(-50%);\n    }\n\n    &:hover:after {\n        transition: width 0.2s ease-in;\n        width: 20px;\n    }\n\n    ${({ highlight = false }) => highlight &&\n    css `\n            &:after {\n                width: 20px;\n            }\n\n            ${NavLink} {\n                color: ${COLORS.primary};\n            }\n        `}\n`;\nexport const NavbarLinkMobile = styled(UnstyledNavbarLink).withConfig({ displayName: \"NavbarLinkMobile\", componentId: \"sc-13loojt\" }) `\n    position: relative;\n\n    ${({ $bottomBorder = true }) => $bottomBorder &&\n    css `\n            border-bottom: 1px solid #efefef;\n        `}\n\n    ${NavLink} {\n        font-size: 18px;\n        line-height: 100px;\n        color: ${COLORS.primary};\n    }\n\n    ${({ highlight = false }) => highlight &&\n    css `\n            &:after {\n                display: block;\n                content: '';\n                position: absolute;\n                top: 50%;\n                transform: translateY(-50%);\n                left: -24px;\n                width: 3px;\n                height: 32px;\n                background-color: ${COLORS.primary};\n            }\n\n            ${NavLink} {\n                color: ${COLORS.primary};\n            }\n\n            @media (min-width: ${MOBILE_LG}px) {\n                &:after {\n                    left: -64px;\n                }\n            }\n        `}\n`;\nexport const NavbarItemAccount = styled.div.withConfig({ displayName: \"NavbarItemAccount\", componentId: \"sc-d2nt1f\" }) `\n    margin: 0;\n`;\nconst UnstyledLogoLink = ({ children, ...props }) => {\n    return React.createElement(\"a\", { ...props }, children);\n};\nexport const LogoLink = styled(UnstyledLogoLink).withConfig({ displayName: \"LogoLink\", componentId: \"sc-12xyxpc\" }) `\n    color: #f65f0a !important;\n    display: block;\n    max-width: 64px;\n    width: 32px;\n\n    @media (${DESKTOP}) {\n        width: 40px;\n    }\n`;\nexport const Avatar = styled(AvatarImage).withConfig({ displayName: \"Avatar\", componentId: \"sc-f5qw9o\" }) `\n    width: 32px;\n    height: 32px;\n    border: 1px solid #f3f3f3;\n    border-radius: 50%;\n    background-color: white;\n\n    @media (${DESKTOP}) {\n        width: 40px;\n        height: 40px;\n    }\n`;\nexport const MenuItemAvatarContainer = styled.div.withConfig({ displayName: \"MenuItemAvatarContainer\", componentId: \"sc-1nn3rp\" }) `\n    background-color: ${COLORS.secondaryLight};\n    padding: 16px;\n    display: flex;\n    align-items: center;\n    border-radius: 4px;\n    margin: 16px 0;\n`;\nexport const UserInfoMobile = styled.div.withConfig({ displayName: \"UserInfoMobile\", componentId: \"sc-68eb6z\" }) `\n    background-color: #f8f8f8;\n    padding: 8px;\n    display: flex;\n    justify-content: flex-start;\n    border-radius: 4px;\n\n    ${Avatar} {\n        width: 45px;\n        height: 45px;\n        background-color: #fff;\n        margin-right: 8px;\n    }\n\n    ${Avatarless} {\n        display: flex;\n        flex-direction: column;\n        align-items: flex-start;\n        justify-content: center;\n\n        ${Name} {\n            font-size: 14px;\n            font-weight: ${REGULAR};\n            line-height: 1.25em;\n        }\n\n        ${Username} {\n            padding: 3px;\n            font-size: 12px;\n            font-weight: ${MEDIUM};\n            background-color: #fff;\n            color: #848484;\n            margin: 3px 0;\n        }\n    }\n`;\n","import React, { useRef, useState } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NavLink, NavbarLinkDesktop } from '~/components/Nav/Nav.styles';\nimport { DefaultSimpleDropdownMenu, SimpleDropdown } from '~/components/SimpleDropdown';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function Dropdown() {\n    const [isOpen, setIsOpen] = useState(false);\n    const { pathname } = useLocation();\n    const timeoutRef = useRef();\n    function clear() {\n        if (timeoutRef.current != null) {\n            clearTimeout(timeoutRef.current);\n        }\n    }\n    function show(toggle) {\n        clear();\n        toggle(true);\n    }\n    function hide(toggle, { immediately = false } = {}) {\n        clear();\n        if (immediately) {\n            return void toggle(false);\n        }\n        timeoutRef.current = window.setTimeout(() => {\n            toggle(false);\n        }, 250);\n    }\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavbarLinkDesktop, { highlight: isOpen || isNetworkTabActive(pathname) },\n        React.createElement(SimpleDropdown, { onToggle: setIsOpen, menu: (toggle) => (React.createElement(Menu, { onMouseEnter: () => void show(toggle), onMouseLeave: () => void hide(toggle) }, NetworkNavItems.map((i) => (React.createElement(DropdownItem, { \"$active\": pathname.startsWith(i.linkFn()), key: i.title, to: i.linkFn(routeOptions(chainKey)), onFocus: () => void show(toggle), onClick: () => void hide(toggle, { immediately: true }) },\n                React.createElement(\"strong\", null, i.title),\n                React.createElement(Subtitle, null, i.subtitle)))))) }, (toggle) => (React.createElement(NavLink, { as: Link, to: R.networkOverview(routeOptions(chainKey)), onFocus: () => void show(toggle), onBlur: () => void hide(toggle), onMouseEnter: () => void show(toggle), onMouseLeave: () => void hide(toggle), onClick: (e) => void e.preventDefault() }, \"Network\")))));\n}\nconst networkLinks = [R.networkOverview(), R.sponsorships(), R.operators()];\nexport const isNetworkTabActive = (path) => networkLinks.some((addr) => path.startsWith(addr));\nconst Menu = styled(DefaultSimpleDropdownMenu).withConfig({ displayName: \"Menu\", componentId: \"sc-rg0ihx\" }) `\n    padding-left: 0;\n    padding-right: 0;\n`;\nexport const NetworkNavItems = [\n    {\n        title: 'Overview',\n        subtitle: 'Your activity on one glance',\n        linkFn: R.networkOverview,\n    },\n    {\n        title: 'Sponsorships',\n        subtitle: 'Explore, create and join Sponsorships',\n        linkFn: R.sponsorships,\n    },\n    {\n        title: 'Operators',\n        subtitle: 'Explore Operators and delegate',\n        linkFn: R.operators,\n    },\n];\nconst Subtitle = styled.div.withConfig({ displayName: \"Subtitle\", componentId: \"sc-htqygn\" }) `\n    color: ${COLORS.primaryLight};\n`;\nfunction getTickIconAttrs() {\n    return {\n        name: 'tick',\n    };\n}\nconst TickIcon = styled(SvgIcon).attrs(getTickIconAttrs).withConfig({ displayName: \"TickIcon\", componentId: \"sc-hmzfc7\" }) `\n    width: 10px;\n    position: absolute;\n    transform: translateY(-50%);\n    top: 50%;\n    right: 24px;\n`;\nfunction getDropdownItemAttrs(props) {\n    return {\n        ...props,\n        children: (React.createElement(React.Fragment, null,\n            React.createElement(\"div\", null, props.children),\n            props.$active && React.createElement(TickIcon, null))),\n    };\n}\nconst DropdownItem = styled(Link).attrs(getDropdownItemAttrs).withConfig({ displayName: \"DropdownItem\", componentId: \"sc-va2n4e\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    font-size: 16px;\n    line-height: 28px;\n    padding: 12px 32px;\n    position: relative;\n\n    &,\n    :hover,\n    :visited,\n    :link {\n        color: #000000;\n    }\n\n    :focus,\n    :hover {\n        background-color: #e9ecef;\n    }\n\n    &[disabled] {\n        color: #adadad;\n    }\n\n    :focus {\n        outline: none;\n        box-shadow: inset 0 0 0 1.5px var(--focus-border-color);\n    }\n\n    :active {\n        background-color: ${COLORS.primary};\n        color: #ffffff;\n    }\n\n    :active ${Subtitle} {\n        color: ${COLORS.radioBorder};\n    }\n`;\n","import React, { useReducer } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM, REGULAR } from '~/shared/utils/styled';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { NavLink, NavbarLinkMobile } from './Nav.styles';\nimport { NetworkNavItems, isNetworkTabActive } from './NetworkDropdown';\nexport function NetworkAccordion() {\n    const { pathname } = useLocation();\n    const [isOpen, toggle] = useReducer((x) => !x, false);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(NavbarLinkMobile, { highlight: isNetworkTabActive(pathname), \"$bottomBorder\": !isOpen },\n            React.createElement(NavLink, { as: Link, to: R.networkOverview(routeOptions(chainKey)), onClick: (e) => {\n                    e.preventDefault();\n                    e.stopPropagation();\n                    toggle();\n                } },\n                React.createElement(Wings, null,\n                    React.createElement(\"div\", null, \"Network\"),\n                    React.createElement(\"div\", null,\n                        React.createElement(CaretDownIcon, { \"$flipped\": isOpen }))))),\n        isOpen && (React.createElement(Menu, null, NetworkNavItems.map((networkNavElement) => {\n            const { title, subtitle, linkFn, ...rest } = networkNavElement;\n            return (React.createElement(NetworkMobileLink, { ...rest, to: linkFn(routeOptions(chainKey)), key: title },\n                React.createElement(NetworkNavElement, null,\n                    React.createElement(Title, null, title),\n                    React.createElement(Subtitle, null, subtitle))));\n        })))));\n}\nconst NetworkNavElement = styled.div.withConfig({ displayName: \"NetworkNavElement\", componentId: \"sc-19ewe4g\" }) `\n    display: flex;\n    flex-direction: column;\n    text-transform: none;\n    line-height: 24px;\n`;\nconst Title = styled.p.withConfig({ displayName: \"Title\", componentId: \"sc-15my2kk\" }) `\n    font-size: 16px;\n    font-weight: ${MEDIUM};\n    color: ${COLORS.black};\n    margin: 0;\n    letter-spacing: initial;\n`;\nconst Subtitle = styled.p.withConfig({ displayName: \"Subtitle\", componentId: \"sc-iyyr3w\" }) `\n    font-size: 16px;\n    font-weight: ${REGULAR};\n    color: ${COLORS.primaryLight};\n    margin: 0;\n    max-width: 350px;\n    white-space: pre-line;\n    letter-spacing: initial;\n`;\nconst NetworkMobileLink = styled(Link).withConfig({ displayName: \"NetworkMobileLink\", componentId: \"sc-16r7z00\" }) `\n    padding: 20px 0;\n    display: block;\n`;\nconst Menu = styled.div.withConfig({ displayName: \"Menu\", componentId: \"sc-1gizb9b\" }) `\n    margin-top: -20px;\n`;\nfunction getCaretDownIconAttrs() {\n    return {\n        name: 'caretDown',\n    };\n}\nconst CaretDownIcon = styled(SvgIcon).attrs(getCaretDownIconAttrs).withConfig({ displayName: \"CaretDownIcon\", componentId: \"sc-1h45794\" }) `\n    transform: rotate(0deg) translateY(-2%);\n    transition: 300ms transform;\n    width: 18px;\n\n    ${({ $flipped = false }) => $flipped &&\n    css `\n            transform: rotate(-180deg) translateY(-2%);\n        `}\n`;\nconst Wings = styled.div.withConfig({ displayName: \"Wings\", componentId: \"sc-h24jtu\" }) `\n    display: flex;\n    align-items: center;\n\n    > div:first-child {\n        flex-grow: 1;\n    }\n`;\n","import { Button, HamburgerButton, Logo, NavOverlay } from '@streamr/streamr-layout';\nimport React from 'react';\nimport { Link, useLocation, useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { ChainSelector as UnstyledChainSelector } from '~/components/ChainSelector';\nimport { useMediaQuery } from '~/hooks';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { connectModal } from '~/modals/ConnectModal';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useEns, useWalletAccount } from '~/shared/stores/wallet';\nimport { DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport toast from '~/utils/toast';\nimport { Avatar, LogoLink, Menu, MenuDivider, MenuGrid, MenuItemAvatarContainer, MOBILE_LG, Navbar, NavbarItem, NavbarItemAccount, NavbarLinkDesktop, NavbarLinkMobile, NavLink, SignedInUserMenu, TextMenuItem, UserInfoMenuItem, UserInfoMobile, WalletAddress, } from './Nav.styles';\nimport { NetworkAccordion } from './NetworkAccordion';\nimport { Dropdown } from './NetworkDropdown';\nimport { Avatarless, Name, Username } from './User';\nconst UnstyledDesktopNav = (props) => {\n    const { pathname } = useLocation();\n    const account = useWalletAccount();\n    const ensName = useEns(account);\n    const navigate = useNavigate();\n    const operatorQuery = useOperatorForWalletQuery(account);\n    const { data: operator = null, isFetching: isOperatorFetching } = operatorQuery;\n    const isMobile = !useMediaQuery(`only screen and ${TABLET}`);\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(\"div\", { ...props, \"data-testid\": 'desktop-nav' },\n        React.createElement(Navbar, null,\n            React.createElement(NavbarItem, null,\n                React.createElement(LogoLink, { href: R.root() },\n                    React.createElement(Logo, { \"data-testid\": 'logo' }))),\n            React.createElement(ChainSelector, { \"data-mobile-only\": true, menuAlignment: \"left\" }),\n            React.createElement(MenuGrid, { \"data-desktop-only\": true },\n                React.createElement(\"div\", null),\n                React.createElement(NavbarItem, null,\n                    React.createElement(Dropdown, null)),\n                React.createElement(NavbarItem, null,\n                    React.createElement(NavbarLinkDesktop, { highlight: pathname.startsWith(R.streams()) },\n                        React.createElement(NavLink, { as: Link, to: R.streams(routeOptions(chainKey)) }, \"Streams\"))),\n                React.createElement(ChainSelector, { menuAlignment: \"right\" })),\n            !account && (React.createElement(NavbarItemAccount, null,\n                React.createElement(Button, { kind: \"primary\", size: \"mini\", outline: true, type: \"button\", onClick: async () => {\n                        try {\n                            await connectModal.pop();\n                        }\n                        catch (e) {\n                            console.warn('Wallet connecting failed', e);\n                        }\n                    } }, \"Connect\"))),\n            !!account && (React.createElement(NavbarItemAccount, null,\n                React.createElement(SignedInUserMenu, { edge: true, alignMenu: \"right\", nodeco: true, toggle: React.createElement(Avatar, { username: account }), menu: React.createElement(Menu, null,\n                        React.createElement(UserInfoMenuItem, null,\n                            React.createElement(MenuItemAvatarContainer, null,\n                                React.createElement(Avatar, { username: account }),\n                                React.createElement(WalletAddress, null,\n                                    !!ensName && (React.createElement(\"span\", { className: 'ens-name' }, truncate(ensName))),\n                                    React.createElement(\"span\", null, truncate(account))))),\n                        isMobile && (React.createElement(React.Fragment, null,\n                            React.createElement(MenuDivider, null),\n                            operator ? (React.createElement(TextMenuItem, { onClick: () => {\n                                    navigate(R.operator(operator.id, routeOptions(chainKey)));\n                                } },\n                                React.createElement(\"span\", null, \"My Operator\"))) : (React.createElement(TextMenuItem, { disabled: isOperatorFetching, onClick: () => {\n                                    if (isOperatorFetching) {\n                                        return;\n                                    }\n                                    saveOperator(chainId, undefined, {\n                                        onDone(id, blockNumber) {\n                                            navigate(R.operator(id, routeOptions(chainId, {\n                                                b: blockNumber,\n                                            })));\n                                        },\n                                    });\n                                } },\n                                React.createElement(\"span\", null, \"Become an Operator\"))))),\n                        React.createElement(MenuDivider, null),\n                        React.createElement(TextMenuItem, { onClick: () => {\n                                toast({\n                                    title: 'Use the \"Lock\" button in your wallet.',\n                                });\n                            } },\n                            React.createElement(\"span\", null, \"Disconnect\"),\n                            React.createElement(SvgIcon, { name: \"disconnect\" }))) }))),\n            React.createElement(HamburgerButton, { idle: true }))));\n};\nconst UnstyledMobileNav = ({ className }) => {\n    const account = useWalletAccount();\n    const { pathname } = useLocation();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavOverlay, { className: className },\n        React.createElement(NavOverlay.Head, null,\n            React.createElement(Navbar, null,\n                React.createElement(NavbarItem, null,\n                    React.createElement(LogoLink, { href: R.root() },\n                        React.createElement(Logo, null))),\n                React.createElement(NavbarItem, null,\n                    React.createElement(HamburgerButton, null)))),\n        React.createElement(NavOverlay.Body, null,\n            !!account && (React.createElement(UserInfoMobile, null,\n                React.createElement(Avatar, { username: account }),\n                React.createElement(Avatarless, { \"data-testid\": 'avatarless', source: account }))),\n            React.createElement(NetworkAccordion, null),\n            React.createElement(NavbarLinkMobile, { highlight: pathname.startsWith(R.streams()) },\n                React.createElement(NavLink, { as: Link, to: R.streams(routeOptions(chainKey)) }, \"Streams\"))),\n        React.createElement(NavOverlay.Footer, null, !!account ? (React.createElement(Button, { kind: \"secondary\", size: \"normal\", type: \"button\", onClick: () => {\n                toast({\n                    title: 'Use the \"Lock\" button in your wallet.',\n                });\n            } }, \"Disconnect\")) : (React.createElement(Button, { type: \"button\", onClick: async () => {\n                try {\n                    await connectModal.pop();\n                }\n                catch (e) {\n                    console.warn('Wallet connecting failed', e);\n                }\n            }, kind: \"primary\", size: \"normal\" }, \"Connect Wallet\")))));\n};\nconst DesktopNav = styled(UnstyledDesktopNav).withConfig({ displayName: \"DesktopNav\", componentId: \"sc-e26ir0\" }) `\n    position: relative;\n\n    ${Navbar} {\n        > ${NavbarItem}:first-child {\n            flex-grow: initial;\n        }\n\n        > ${NavbarItem}:nth-child(2) {\n            flex-grow: 1;\n        }\n    }\n\n    @media (${DESKTOP}) {\n        ${Navbar} > ${NavbarItem}:first-child {\n            flex-grow: 1;\n        }\n    }\n\n    &[data-shadow='true'] {\n        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.02);\n    }\n\n    ${Avatarless} {\n        line-height: 20px;\n        padding: 4px 0 8px;\n    }\n\n    ${Name} {\n        font-size: 14px;\n        margin-bottom: 4px;\n    }\n\n    ${Username} {\n        font-size: 12px;\n    }\n`;\nconst MobileNav = styled(UnstyledMobileNav).withConfig({ displayName: \"MobileNav\", componentId: \"sc-tkrg3i\" }) `\n    ${HamburgerButton} {\n        margin-left: auto;\n    }\n\n    ${NavOverlay.Body} {\n        padding: 36px 24px 0 24px;\n\n        ${UserInfoMobile} {\n            margin-bottom: 24px;\n        }\n\n        ${NavbarLinkMobile} {\n            border-top: 1px solid #efefef;\n\n            + ${NavbarLinkMobile} {\n                border-top: none;\n            }\n        }\n\n        > :first-child {\n            border-top: none;\n        }\n    }\n\n    ${NavOverlay.Footer} {\n        background-color: #ffffff;\n        padding: 24px;\n\n        ${Button} {\n            width: 100%;\n        }\n    }\n\n    @media (min-width: ${MOBILE_LG}px) {\n        ${NavOverlay.Body} {\n            padding: 36px 64px 0 64px;\n\n            ${UserInfoMobile} {\n                margin-bottom: 64px;\n            }\n        }\n\n        ${NavOverlay.Footer} {\n            padding: 64px;\n\n            ${Button} {\n                width: auto;\n            }\n        }\n    }\n`;\nexport const NavContainer = styled.div.withConfig({ displayName: \"NavContainer\", componentId: \"sc-id2ix2\" }) `\n    background-color: #ffffff;\n    color: #323232;\n\n    ${HamburgerButton} {\n        background-color: #f8f8f8;\n    }\n\n    ${Navbar} {\n        padding: 20px 24px;\n\n        @media (${TABLET}) {\n            padding: 20px 24px;\n        }\n\n        @media (${DESKTOP}) {\n            padding: 20px 40px;\n        }\n\n        > ${HamburgerButton} {\n            display: flex;\n        }\n\n        ${NavbarItem}:empty {\n            display: none;\n        }\n\n        > [data-desktop-only='true'] {\n            display: none;\n        }\n    }\n\n    ${Button} {\n        padding: 0 16px;\n    }\n\n    > [data-mobile-only='true'] {\n        display: block;\n    }\n\n    @media (${TABLET}) {\n        ${Navbar} > [data-desktop-only='true'] {\n            display: grid;\n        }\n\n        ${Navbar} > ${HamburgerButton} {\n            display: none;\n        }\n\n        > [data-mobile-only='true'] {\n            display: none;\n        }\n    }\n`;\nconst ChainSelector = styled(UnstyledChainSelector).withConfig({ displayName: \"ChainSelector\", componentId: \"sc-wg4p6u\" }) `\n    justify-self: right;\n\n    &[data-mobile-only='true'] {\n        display: block;\n        justify-self: left;\n    }\n\n    @media (${TABLET}) {\n        &[data-mobile-only='true'] {\n            display: none;\n        }\n    }\n`;\nfunction N({ shadow = false, ...props }) {\n    return (React.createElement(NavContainer, { ...props },\n        React.createElement(DesktopNav, { \"data-shadow\": !!shadow }),\n        React.createElement(MobileNav, null)));\n}\nObject.assign(N, {\n    Container: NavContainer,\n});\nexport default N;\n","import React from 'react';\nimport styled, { createGlobalStyle } from 'styled-components';\nimport { DisclaimerBar } from '~/components/DisclaimerBar';\nimport Footer from '~/components/Footer';\nimport Helmet from '~/components/Helmet';\nimport Nav from '~/components/Nav';\nimport useScrollToTop from '~/shared/hooks/useScrollToTop';\nimport { MAX_BODY_WIDTH } from '~/shared/utils/styled';\nexport default function Layout({ children, footer = React.createElement(Footer, null), nav = React.createElement(Nav, null), columnize = false, pageTitle, innerBackgroundColor, outerBackgroundColor, rootBackgroundColor = '#f5f5f5', rootComponent: Root = LayoutRoot, outerComponent: Outer = LayoutOuter, innerComponent: Inner = LayoutInner, }) {\n    useScrollToTop();\n    return (React.createElement(React.Fragment, null,\n        pageTitle && React.createElement(Helmet, { title: pageTitle }),\n        React.createElement(GlobalStyles, null),\n        React.createElement(Root, { \"$bg\": rootBackgroundColor },\n            React.createElement(Outer, { \"$bg\": outerBackgroundColor },\n                React.createElement(DisclaimerBar, null),\n                nav,\n                React.createElement(Inner, { \"$bg\": innerBackgroundColor }, columnize ? React.createElement(LayoutColumn, null, children) : children)),\n            footer)));\n}\nconst LayoutRoot = styled.main.withConfig({ displayName: \"LayoutRoot\", componentId: \"sc-o8fh6i\" }) `\n    background-color: ${({ $bg }) => $bg};\n    color: #323232;\n`;\nconst LayoutOuter = styled.div.withConfig({ displayName: \"LayoutOuter\", componentId: \"sc-15sxygf\" }) `\n    background-color: ${({ $bg }) => $bg};\n    display: flex;\n    flex-direction: column;\n    font-size: 16px;\n    min-height: 100vh;\n    position: relative;\n    z-index: 1;\n`;\nexport const LayoutInner = styled.div.withConfig({ displayName: \"LayoutInner\", componentId: \"sc-11qdxpq\" }) `\n    background-color: ${({ $bg }) => $bg};\n`;\nconst GlobalStyles = createGlobalStyle `\n    body {\n        font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;\n        font-size: 16px;\n        line-height: 2em;\n        -webkit-overflow-scrolling: touch;\n    }\n\n    input {\n        font-family: inherit;\n    }\n\n    body a {\n        text-decoration: none;\n    }\n\n    p a {\n        text-decoration: underline;\n    }\n\n    strong {\n        font-weight: 500;\n    }\n\n    a {\n        color: #0324FF;\n        font-weight: inherit;\n    }\n\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        text-decoration: none;\n    }\n\n    a:focus,\n    a:hover {\n        color: #0D009A;\n    }\n\n    a:active {\n        color: #13013D;\n    }\n`;\nexport const LayoutColumn = styled.div.withConfig({ displayName: \"LayoutColumn\", componentId: \"sc-1il3kaf\" }) `\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\n","import { useRef } from 'react';\nimport { useLocation } from 'react-router-dom';\nexport default function useScrollToTop() {\n    const { pathname } = useLocation();\n    const pathnameRef = useRef(pathname);\n    if (pathname !== pathnameRef.current) {\n        pathnameRef.current = pathname;\n        if (typeof window !== 'undefined') {\n            window.scroll(0, 0);\n        }\n    }\n}\n","import React from 'react';\nimport { Link, useRouteError } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { EmptyState } from '~/components/EmptyState';\nimport Layout from '~/components/Layout';\nimport { ParseError } from '~/errors';\nimport appCrashedImage from '~/shared/assets/images/app_crashed.png';\nimport appCrashedImage2x from '~/shared/assets/images/app_crashed@2x.png';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function GenericErrorPage() {\n    const error = useRouteError();\n    if (error instanceof ParseError) {\n        return React.createElement(ParseErrorPage, null);\n    }\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(GenericErrorPageContent, null)));\n}\nfunction ParseErrorPage() {\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(Root, null,\n            React.createElement(EmptyState, { image: React.createElement(\"img\", { src: appCrashedImage, srcSet: `${appCrashedImage2x} 2x`, alt: \"App crashed\" }), link: React.createElement(Button, { kind: \"special\", as: Link, to: \"https://streamr.network/\", className: \"d-none d-md-flex\" }, \"Go to public site\"), linkOnMobile: true },\n                React.createElement(\"p\", null, \"The Hub is temporarily unavailable.\"),\n                React.createElement(SecondaryP, null,\n                    \"Our connection to the Subgraph indexing the Streamr Smart Contracts\",\n                    React.createElement(\"br\", null),\n                    \"is currently unavailable. Please try again in a few minutes.\")))));\n}\nexport function GenericErrorPageContent() {\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Root, null,\n        React.createElement(EmptyState, { image: React.createElement(\"img\", { src: appCrashedImage, srcSet: `${appCrashedImage2x} 2x`, alt: \"App crashed\" }), link: React.createElement(Button, { kind: \"special\", as: Link, to: R.projects(routeOptions(chainKey)), className: \"d-none d-md-flex\" }, \"Projects\"), linkOnMobile: true },\n            React.createElement(\"p\", null,\n                \"Oops. Something has broken down here.\",\n                React.createElement(\"br\", null),\n                \"Please try one of the links below\",\n                React.createElement(\"br\", null),\n                \"to get things back on track.\"))));\n}\nconst SecondaryP = styled.p.withConfig({ displayName: \"SecondaryP\", componentId: \"sc-da52xt\" }) `\n    font-size: 0.8em;\n    margin-top: 1em;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-28tayp\" }) `\n    text-align: center;\n    width: 100%;\n\n    img {\n        margin-bottom: -0.75em;\n        max-width: 180px;\n    }\n\n    @media (min-width: 376px) {\n        img {\n            max-width: 200px;\n        }\n    }\n\n    @media (min-width: 745px) {\n        img {\n            max-width: 40%;\n        }\n    }\n\n    @media (min-width: 1441px) {\n        img {\n            max-width: 50%;\n        }\n    }\n`;\n","/**\n * @param e probably `Event` himself!\n * @returns `true` if the given entity has the `preventDefault` function and the `defaultPrevented` flag.\n */\nexport default function isPreventable(e) {\n    return (typeof e === 'object' &&\n        !!e &&\n        'preventDefault' in e &&\n        typeof e.preventDefault === 'function' &&\n        'defaultPrevented' in e &&\n        typeof e.defaultPrevented === 'boolean');\n}\n","import throttle from 'lodash/throttle';\nimport React, { useEffect, useMemo, useReducer, useRef, useState, } from 'react';\nimport styled, { css } from 'styled-components';\nimport { TABLET } from '~/shared/utils/styled';\nimport isPreventable from '~/utils/isPreventable';\nexport const Tab = () => null;\n/**\n * Mainy used for type gating. This function checks if the given `child` is a `Tab`.\n * @param child Any instance of a ReactNode.\n * @returns `true` if the child is a `Tab`. `false` otherwise.\n */\nfunction isTab(child) {\n    return !!child && typeof child === 'object' && 'type' in child && child.type === Tab;\n}\nexport const Item = styled.button.withConfig({ displayName: \"Item\", componentId: \"sc-1o3sn5b\" }) `\n    border: 0;\n    background: none;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    font-family: inherit;\n    font-weight: inherit;\n    padding: 0 20px;\n    border-radius: 6px;\n    flex-shrink: 0;\n    font-size: inherit;\n    justify-content: center;\n    line-height: 1.25em;\n    text-align: center;\n    min-width: 0;\n\n    button& {\n        appearance: none;\n        cursor: pointer;\n    }\n\n    &,\n    :hover,\n    :focus,\n    :active,\n    :visited {\n        color: #323232 !important;\n        text-decoration: none;\n    }\n\n    :disabled {\n        opacity: 0.5;\n        cursor: not-allowed;\n    }\n\n    ${({ $flexBasis }) => typeof $flexBasis === 'string' &&\n    css `\n            flex-basis: ${$flexBasis};\n        `}\n\n    &.full-width {\n        padding: 0;\n        flex: 1;\n        line-height: 16px;\n        @media (${TABLET}) {\n            padding: 0 20px;\n            flex: none;\n            &.small-padding {\n                padding: 0 12px;\n            }\n        }\n    }\n\n    &.small-padding {\n        padding: 0 12px;\n    }\n`;\nconst ItemContent = styled.div.withConfig({ displayName: \"ItemContent\", componentId: \"sc-1yo8eea\" }) `\n    ${({ $truncate = false }) => $truncate &&\n    css `\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n        `}\n`;\nconst Outer = styled.div.withConfig({ displayName: \"Outer\", componentId: \"sc-1mzh9f8\" }) `\n    height: 34px;\n    position: relative;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-5oj1ob\" }) `\n    align-items: center;\n    display: flex;\n    height: 100%;\n`;\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-19kqk6v\" }) `\n    background: #f5f5f5;\n    box-sizing: border-box;\n    border-radius: 8px;\n    padding: 4px;\n    width: max-content;\n    font-size: 14px;\n    font-weight: 500;\n    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.025);\n    user-select: none;\n    overflow: hidden;\n    max-width: 100%;\n    &.full-width {\n        width: 100%;\n        @media (${TABLET}) {\n            width: max-content;\n        }\n    }\n`;\nconst Trolley = styled.div.withConfig({ displayName: \"Trolley\", componentId: \"sc-27wxt8\" }) `\n    height: 100%;\n    display: flex;\n    align-items: center;\n    position: absolute;\n    visibility: hidden;\n    opacity: 0;\n    top: 0;\n    left: 0;\n    padding: 0 20px;\n    white-space: nowrap;\n    left: 50%;\n    transform: translateX(-50%);\n    min-width: 0;\n    width: 100%;\n    justify-content: center;\n    text-align: center;\n\n    ${({ $animated = false }) => $animated &&\n    css `\n            transition: 200ms ease-out;\n            transition-property: visibility, opacity;\n        `}\n\n    ${({ $selected = false }) => $selected &&\n    css `\n            visibility: visible;\n            opacity: 1;\n        `}\n`;\nconst Rails = styled.div.withConfig({ displayName: \"Rails\", componentId: \"sc-1pcmq99\" }) `\n    background: #323232;\n    color: #ffffff;\n    border-radius: 6px;\n    height: 100%;\n    position: absolute;\n    transition: 200ms ease-out;\n    transition-property: visiblilty, opecity;\n    visibility: visible;\n    opacity: 1;\n    pointer-events: none;\n    z-index: 1;\n\n    ${({ $animated = false }) => $animated &&\n    css `\n            transition: 200ms ease-out;\n            transition-property: visiblilty, opecity, transform, width;\n        `}\n`;\nexport default function Tabs({ children, onSelectionChange, selection: selectionProp, spreadEvenly = false, fullWidthOnMobile = false, smallPadding = false, ...props }) {\n    /**\n     * Since `Tab` returns `null` its props is all we care about. It's a carrier. Remember\n     * Rick's butter passing robot? Yeah, this here passes props – that's its purpose.\n     */\n    const tabs = useMemo(() => React.Children.toArray(children)\n        .filter(isTab)\n        .map(({ props }) => props), [children]);\n    const selectedId = useMemo(() => tabs.find(({ selected = 'id', tag: _tag, ...rest }) => {\n        /**\n         * First we check it `selected` is a string. If it is then we use it as\n         * a peroperty key. We take its property value and check if it matches\n         * `selection` passed to `Tabs`.\n         */\n        if (typeof selected === 'string') {\n            return (typeof selectionProp !== 'undefined' &&\n                Object.prototype.hasOwnProperty.call(rest, selected) &&\n                rest[selected] === selectionProp);\n        }\n        /**\n         * If `selected` is a boolean then the situation is simple. If it's\n         * a function though, we call it with current Tab's props.\n         */\n        return typeof selected === 'function' ? selected(rest) : selected;\n    })?.id, [tabs, selectionProp]);\n    /**\n     * `windowWidth` is listed as a dependency for the left and width calculation for\n     * the `Rails` component later or. It changes on window resize.\n     *\n     * We only use the width here because the height doesn't affect the component.\n     */\n    const [windowWidth, setWindowWidth] = useState(0);\n    useEffect(() => {\n        let mounted = true;\n        const onResize = throttle(() => {\n            if (mounted) {\n                setWindowWidth(window.outerWidth);\n            }\n        }, 200);\n        window.addEventListener('resize', onResize);\n        return () => {\n            mounted = false;\n            window.removeEventListener('resize', onResize);\n        };\n    }, []);\n    /**\n     * We collect HTML elements associated with each tab using callback stored in a ref.\n     * The following is an index-to-callback map that holds the setters for each mounted\n     * element. There's a reason to this maddness.\n     *\n     * For one element, to avoid extensive updates on `ref`, we'd use `useCallback`. In our\n     * case we avoid it (as much as possible) using the following contraption.\n     *\n     * In other words, unless `children` change, 0th element will always set its ref\n     * using the callback at 0th index in the map, and so on. Simple as that.\n     */\n    const elementSettersRef = useRef({});\n    useEffect(() => {\n        /**\n         * We reset the setters when the number of tabs change. Ideally we'd do it only when\n         * reducing the number of tabs, but that'd add complexity.\n         */\n        elementSettersRef.current = {};\n    }, [tabs.length]);\n    /**\n     * `elements` is a list of mounted `Item` elements. We use it for left/width\n     * calculations later.\n     */\n    const [elements, setElement] = useState([]);\n    function setElementAt(id, index) {\n        let setter = elementSettersRef.current[index];\n        if (typeof setter !== 'function') {\n            setter = (el) => {\n                setElement((current) => {\n                    const newElements = [...current];\n                    newElements[index] = [id, el];\n                    return newElements;\n                });\n            };\n            elementSettersRef.current[index] = setter;\n        }\n        return setter;\n    }\n    const [left, width] = useMemo(() => {\n        let left = 0;\n        ((_) => { })(windowWidth);\n        let width = 0;\n        for (let i = 0; i < elements.length; i++) {\n            const [id, el] = elements[i];\n            const w = el?.getBoundingClientRect().width || 0;\n            if (id === selectedId) {\n                width = w;\n                break;\n            }\n            left += w;\n        }\n        return [left, width];\n    }, [elements, selectedId, windowWidth]);\n    /**\n     * Animation is tricky. We have to delay any of it before all the `Item` elements\n     * are mounted and we know at list the width of the current one.\n     */\n    const canAnimate = width !== 0;\n    /**\n     * We cannot enable animations immediately after having the width. We have to\n     * let components mount without transition first to avoid making them transition\n     * from an unknown location and 0 width.\n     */\n    const [animated, enableAnimation] = useReducer(() => true, false);\n    useEffect(() => {\n        if (canAnimate) {\n            /**\n             * At this point we know the proper width is there and the components\n             * mounted. Let's give animations green light!\n             */\n            enableAnimation();\n        }\n    }, [canAnimate]);\n    return (React.createElement(Root, { ...props, className: fullWidthOnMobile ? 'full-width' : '' },\n        React.createElement(Outer, null,\n            React.createElement(Rails, { \"$animated\": animated, style: {\n                    transform: `translateX(${left}px)`,\n                    width: `${width}px`,\n                } }, tabs.map(({ id, children }) => (React.createElement(Trolley, { key: id, \"$selected\": id === selectedId, \"$animated\": animated },\n                React.createElement(ItemContent, { \"$truncate\": spreadEvenly }, children))))),\n            React.createElement(Inner, null, tabs.map(({ id, tag = 'button', onClick, disabled = false, selected: _selected, children, ...rest }, index) => (React.createElement(Item, { ...rest, \"$flexBasis\": spreadEvenly ? `${100 / tabs.length}%` : undefined, as: tag, key: id, className: (fullWidthOnMobile ? 'full-width ' : ' ') +\n                    (smallPadding ? 'small-padding ' : ' '), ref: setElementAt(id, index), disabled: disabled, onClick: (e, ...otherArgs) => {\n                    const preventable = isPreventable(e);\n                    if (disabled) {\n                        if (preventable) {\n                            e.preventDefault();\n                        }\n                        /**\n                         * If a Tab is disabled we don't go any further.\n                         * Additionally, if `e` is a default-preventable,\n                         * then at this point it's also taken care of.\n                         */\n                        return;\n                    }\n                    /**\n                     * Anything that the *og* onClick has given us we pass\n                     * onto the `onClick` coming from the outside.\n                     */\n                    onClick?.(e, ...otherArgs);\n                    /**\n                     * It is possible to prevent selection outside of the\n                     * component. Just prevent event's default behaviour.\n                     */\n                    if (preventable && e.defaultPrevented) {\n                        return;\n                    }\n                    onSelectionChange?.(id);\n                }, \"$selected\": id === selectedId },\n                React.createElement(ItemContent, { \"$truncate\": spreadEvenly }, children))))))));\n}\n","import React from 'react';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { ChartPeriod, isChartPeriod } from '~/types';\nexport function ChartPeriodTabs({ value = ChartPeriod.SevenDays, onChange, ...rest }) {\n    return (React.createElement(Tabs, { ...rest, selection: value, onSelectionChange: (value) => {\n            if (!isChartPeriod(value)) {\n                throw new Error('Invalid chart period');\n            }\n            onChange?.(value);\n        } },\n        React.createElement(Tab, { id: ChartPeriod.SevenDays }, \"7D\"),\n        React.createElement(Tab, { id: ChartPeriod.OneMonth }, \"1M\"),\n        React.createElement(Tab, { id: ChartPeriod.ThreeMonths }, \"3M\"),\n        React.createElement(Tab, { id: ChartPeriod.OneYear }, \"1Y\"),\n        React.createElement(Tab, { id: ChartPeriod.YearToDate }, \"YTD\"),\n        React.createElement(Tab, { id: ChartPeriod.All }, \"ALL\")));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Root as TabsRoot, Item as TabsItem } from '~/shared/components/Tabs';\nimport { TABLET } from '~/shared/utils/styled';\nexport default function NetworkChartDisplay({ children, periodTabs, sourceTabs, }) {\n    return (React.createElement(Root, null,\n        React.createElement(Header, null,\n            React.createElement(SetSelector, null, sourceTabs),\n            React.createElement(ChartPeriodWrap, null, periodTabs)),\n        React.createElement(Body, null, children),\n        React.createElement(ChartPeriodWrap, null, periodTabs)));\n}\nconst ChartPeriodWrap = styled.div.withConfig({ displayName: \"ChartPeriodWrap\", componentId: \"sc-1j4lpaf\" }) ``;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-x3j4w6\" }) `\n    ${TabsRoot} {\n        width: 100%;\n    }\n\n    ${TabsItem} {\n        flex: 1;\n        padding: 0;\n    }\n\n    > ${ChartPeriodWrap} {\n        display: block;\n        margin-top: 24px;\n    }\n\n    @media ${TABLET} {\n        ${TabsRoot} {\n            width: max-content;\n        }\n\n        ${TabsItem} {\n            flex: none;\n            padding: 0 20px;\n        }\n\n        ${ChartPeriodWrap} ${TabsItem} {\n            padding: 0 12px;\n        }\n\n        > ${ChartPeriodWrap} {\n            display: none;\n        }\n    }\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-fe1zeo\" }) `\n    ${ChartPeriodWrap} {\n        display: none;\n    }\n\n    @media ${TABLET} {\n        align-items: center;\n        display: flex;\n\n        ${ChartPeriodWrap} {\n            display: block;\n        }\n    }\n`;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-1qilzqp\" }) ``;\nconst SetSelector = styled.div.withConfig({ displayName: \"SetSelector\", componentId: \"sc-2mp5d\" }) `\n    flex: 1;\n    min-width: 0;\n`;\n","import styled, { css } from 'styled-components';\nimport { TABLET, DESKTOP } from '~/shared/utils/styled';\nconst ColoredBox = styled.div.withConfig({ displayName: \"ColoredBox\", componentId: \"sc-hkbf0g\" }) `\n    background-color: ${({ $backgroundColor = '#ffffff' }) => $backgroundColor};\n    border-radius: 16px;\n    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);\n\n    ${({ $borderColor }) => typeof $borderColor === 'string' &&\n    css `\n            border: 1px solid ${$borderColor};\n        `}\n\n    ${({ $pad = false }) => $pad &&\n    css `\n            padding: 24px;\n\n            @media ${TABLET} {\n                padding: 40px;\n            }\n\n            @media ${DESKTOP} {\n                padding: 52px;\n            }\n        `}\n`;\nexport default ColoredBox;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ColoredBox from '~/components/ColoredBox';\nimport { COLORS, MEDIUM, TABLET } from '~/shared/utils/styled';\nexport default function NetworkPageSegment({ bodyComponent: BodyComponent = Body, children, foot = false, headerComponent: HeaderComponent = Header, rootComponent: RootComponent = Root, title = 'Title', }) {\n    return (React.createElement(RootComponent, null,\n        React.createElement(ColoredBox, null,\n            React.createElement(HeaderComponent, null,\n                React.createElement(Pad, null, typeof title === 'string' ? React.createElement(\"h2\", null, title) : title)),\n            React.createElement(BodyComponent, null, children),\n            foot ? React.createElement(Foot, null) : React.createElement(React.Fragment, null))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1uhcjnl\" }) ``;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-1qfhmyf\" }) `\n    border-top: 1px solid #efefef;\n`;\nconst Foot = styled.div.withConfig({ displayName: \"Foot\", componentId: \"sc-hj9h9h\" }) `\n    border-top: 1px solid #efefef;\n    height: 32px;\n    margin-top: -1px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-1p88m79\" }) `\n    h2 {\n        color: ${COLORS.primary};\n        font-size: 20px;\n        font-weight: ${MEDIUM};\n        line-height: 30px;\n        margin: 0;\n        white-space: nowrap;\n    }\n`;\nexport const Pad = styled.div.withConfig({ displayName: \"Pad\", componentId: \"sc-13c5qyf\" }) `\n    padding: 20px 24px;\n\n    @media ${TABLET} {\n        padding: 32px 40px;\n    }\n`;\nexport const SegmentGrid = styled.div.withConfig({ displayName: \"SegmentGrid\", componentId: \"sc-okv1gv\" }) `\n    display: grid;\n    grid-template-columns: minmax(0, 1fr);\n    gap: 24px;\n    margin-top: 64px;\n\n    * + &,\n    & & {\n        margin-top: 0;\n    }\n`;\nexport function TitleBar({ children, label, aux = React.createElement(React.Fragment, null) }) {\n    return (React.createElement(TitleBarRoot, null,\n        React.createElement(Lhs, null,\n            React.createElement(\"h2\", null, children),\n            label != null && React.createElement(TitleBarLabel, null, label)),\n        React.createElement(Rhs, null, aux)));\n}\nconst TitleBarRoot = styled.div.withConfig({ displayName: \"TitleBarRoot\", componentId: \"sc-e8le53\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n    height: 30px;\n`;\nconst Lhs = styled.div.withConfig({ displayName: \"Lhs\", componentId: \"sc-s4io2g\" }) `\n    align-items: center;\n    display: flex;\n    flex-grow: 1;\n    gap: 8px;\n`;\nconst TitleBarLabel = styled.div.withConfig({ displayName: \"TitleBarLabel\", componentId: \"sc-1pb5y56\" }) `\n    color: #a3a3a3;\n    display: flex;\n    font-size: 20px;\n    font-style: normal;\n    font-weight: 500;\n    letter-spacing: 0.2px;\n    line-height: 30px;\n`;\nconst Rhs = styled.div.withConfig({ displayName: \"Rhs\", componentId: \"sc-1xjt1af\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n    min-width: 0;\n\n    &:empty {\n        display: none;\n    }\n`;\n","import React from 'react';\nimport { Decimals, SponsorshipDecimals } from '~/components/Decimals';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { FundedUntilCell, NumberOfOperatorsCell, SponsorshipApyCell, StreamIdCell, } from '~/components/Table';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useEditSponsorshipFunding, useFundSponsorshipCallback, useJoinSponsorshipAsOperator, useSponsorshipTokenInfo, } from '~/hooks/sponsorships';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { isSponsorshipFundedByOperator } from '~/utils/sponsorships';\nexport function QueriedSponsorshipsTable({ noDataFirstLine = 'No data', noDataSecondLine, orderBy, orderDirection, onOrderChange, query, hideStreamId = false, }) {\n    const sponsorships = query.data?.pages.map((page) => page.sponsorships).flat() || [];\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const fundSponsorship = useFundSponsorshipCallback();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const { decimals = 18n } = useSponsorshipTokenInfo() || {};\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ScrollTableCore, { elements: sponsorships, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: onOrderChange, columns: [\n                ...(hideStreamId == false\n                    ? [\n                        {\n                            displayName: 'Stream ID',\n                            valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                            align: 'start',\n                            isSticky: true,\n                            key: 'streamInfo',\n                            sortable: true,\n                        },\n                    ]\n                    : []),\n                {\n                    displayName: (React.createElement(React.Fragment, null,\n                        React.createElement(SponsorshipPaymentTokenName, null),\n                        \"/day\")),\n                    valueMapper: (element) => (React.createElement(Decimals, { abbr: true, amount: element.payoutPerDay, decimals: decimals })),\n                    align: 'start',\n                    isSticky: hideStreamId,\n                    key: 'payoutPerDay',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Funds',\n                    valueMapper: (element) => (React.createElement(Decimals, { abbr: true, amount: element.timeCorrectedRemainingBalanceWeiAt(Date.now()), decimals: decimals })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'remainingWei',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Operators',\n                    valueMapper: (element) => (React.createElement(NumberOfOperatorsCell, { sponsorship: element, currentOperatorId: operator?.id })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'operators',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Staked',\n                    valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.totalStakedWei })),\n                    align: 'end',\n                    isSticky: false,\n                    key: 'staked',\n                    sortable: true,\n                },\n                {\n                    displayName: 'APY',\n                    valueMapper: (element) => (React.createElement(SponsorshipApyCell, { spotAPY: element.spotApy, isRunning: element.isRunning })),\n                    align: 'end',\n                    isSticky: false,\n                    key: 'apy',\n                    sortable: true,\n                },\n                {\n                    displayName: 'Funded until',\n                    valueMapper: (element) => (React.createElement(FundedUntilCell, { projectedInsolvencyAt: element.projectedInsolvencyAt, remainingBalance: element.remainingBalanceWei })),\n                    align: 'start',\n                    isSticky: false,\n                    key: 'fundedUntil',\n                    sortable: true,\n                },\n            ], actions: [\n                {\n                    displayName: 'Sponsor',\n                    disabled: ({ streamId }) => !streamId,\n                    callback(element) {\n                        fundSponsorship(chainId, element);\n                    },\n                },\n                (element) => {\n                    if (isSponsorshipFundedByOperator(element, operator)) {\n                        return {\n                            displayName: 'Edit stake',\n                            callback() {\n                                if (!operator) {\n                                    return;\n                                }\n                                editSponsorshipFunding({\n                                    chainId,\n                                    sponsorshipOrSponsorshipId: element,\n                                    operator,\n                                });\n                            },\n                        };\n                    }\n                    const maxOperatorsReached = element.operatorCount >= element.maxOperators;\n                    return {\n                        displayName: 'Join as Operator',\n                        disabled: !element.streamId || !operator || maxOperatorsReached,\n                        callback() {\n                            if (!operator) {\n                                return;\n                            }\n                            joinSponsorshipAsOperator({\n                                chainId,\n                                sponsorship: element,\n                                operator,\n                            });\n                        },\n                    };\n                },\n            ], noDataFirstLine: noDataFirstLine, noDataSecondLine: noDataSecondLine, linkMapper: (element) => R.sponsorship(element.id, routeOptions(chainKey)) }),\n        query.hasNextPage && (React.createElement(LoadMoreButton, { disabled: query.isLoading || query.isFetching, onClick: () => void query.fetchNextPage(), kind: \"primary2\" }, \"Load more\"))));\n}\n","import styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-126ww4n\" }) `\n    background: ${COLORS.Border};\n    height: 1px;\n    width: 100%;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS, DESKTOP, MEDIUM, TABLET } from '~/shared/utils/styled';\nexport const StatGrid = styled.div.withConfig({ displayName: \"StatGrid\", componentId: \"sc-1kvkarj\" }) `\n    align-items: center;\n    display: grid;\n    gap: 20px;\n\n    @media ${TABLET} {\n        gap: 16px;\n        grid-template-columns: repeat(\n            ${({ children }) => Math.min(3, Math.max(1, React.Children.count(children)))},\n            1fr\n        );\n    }\n\n    @media ${DESKTOP} {\n        gap: 24px;\n        grid-template-columns: repeat(\n            ${({ children, $desktopColumnCount: maxColumns = 4 }) => Math.min(maxColumns, Math.max(1, React.Children.count(children)))},\n            1fr\n        );\n    }\n`;\nexport function StatCell({ children, label = 'Label', tip, }) {\n    return (React.createElement(StatCellRoot, null,\n        React.createElement(StatCellLabel, null, label),\n        React.createElement(StatCellBody, null,\n            React.createElement(StatCellContent, null, children),\n            tip && React.createElement(TipWrap, null, tip))));\n}\nexport const StatCellLabel = styled.div.withConfig({ displayName: \"StatCellLabel\", componentId: \"sc-17rz9v9\" }) `\n    color: #868686;\n    font-size: 14px;\n    line-height: 24px;\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport const StatCellContent = styled.div.withConfig({ displayName: \"StatCellContent\", componentId: \"sc-1ilbytn\" }) `\n    color: ${COLORS.primary};\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    letter-spacing: -0.05em;\n    line-height: 24px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    @media ${TABLET} {\n        font-size: 20px;\n    }\n`;\nconst StatCellBody = styled.div.withConfig({ displayName: \"StatCellBody\", componentId: \"sc-5zztj5\" }) `\n    ${({ children }) => React.Children.count(children) > 1 &&\n    css `\n            align-items: center;\n            display: flex;\n        `}\n`;\nconst TipWrap = styled.div.withConfig({ displayName: \"TipWrap\", componentId: \"sc-dpz7pu\" }) `\n    flex-shrink: 0;\n    margin-left: 8px;\n`;\nconst StatCellRoot = styled.div.withConfig({ displayName: \"StatCellRoot\", componentId: \"sc-1uj0qkp\" }) `\n    align-items: center;\n    border: 1px solid ${COLORS.Border};\n    border-radius: 12px;\n    display: flex;\n    gap: 8px;\n    min-width: 0;\n    padding: 16px 20px;\n\n    ${StatCellLabel} {\n        flex-grow: 1;\n    }\n\n    @media ${TABLET} {\n        border-radius: 16px;\n        display: block;\n        padding: 32px 40px;\n\n        ${StatCellLabel} {\n            margin-bottom: 10px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { connectModal } from '~/modals/ConnectModal';\nimport { Button } from '~/components/Button';\nimport { COLORS } from '~/shared/utils/styled';\nexport default function NoWalletOverlay({ resourceName }) {\n    return (React.createElement(Root, null,\n        React.createElement(Content, null,\n            React.createElement(\"p\", null,\n                \"Please connect wallet to view your \",\n                resourceName),\n            React.createElement(Button, { kind: \"primary\", size: \"mini\", outline: true, type: \"button\", onClick: async () => {\n                    try {\n                        await connectModal.pop();\n                    }\n                    catch (e) {\n                        console.warn('Wallet connecting failed', e);\n                    }\n                } }, \"Connect\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1pkuxei\" }) `\n    align-items: center;\n    background-color: rgba(255, 255, 255, 0.3);\n    display: flex;\n    height: 100%;\n    justify-content: center;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n\n    p {\n        font-size: 16px;\n        color: ${COLORS.primaryLight};\n        margin: 0 0 24px;\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-qln0c7\" }) `\n    align-items: center;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    padding: 20px;\n    text-align: center;\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport NoWalletOverlay from './NoWalletOverlay';\nexport default function WalletPass({ children, resourceName, roundBorders = false, }) {\n    const locked = !useWalletAccount();\n    return (React.createElement(Root, { \"$roundBorders\": roundBorders },\n        React.createElement(Content, { \"$blur\": locked }, children),\n        locked ? React.createElement(NoWalletOverlay, { resourceName: resourceName }) : React.createElement(React.Fragment, null)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1wag082\" }) `\n    position: relative;\n\n    ${({ $roundBorders = false }) => $roundBorders &&\n    css `\n            border-radius: 16px;\n            overflow: hidden;\n        `}\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-etw4bn\" }) `\n    transition: 350ms filter;\n\n    ${({ $blur = false }) => $blur &&\n    css `\n            filter: blur(5px);\n        `}\n`;\n","import { gql } from '@apollo/client';\nexport var OrderDirection;\n(function (OrderDirection) {\n    OrderDirection[\"Asc\"] = \"ASC\";\n    OrderDirection[\"Desc\"] = \"DESC\";\n})(OrderDirection || (OrderDirection = {}));\nexport var StreamOrderBy;\n(function (StreamOrderBy) {\n    StreamOrderBy[\"BytesPerSecond\"] = \"BYTES_PER_SECOND\";\n    StreamOrderBy[\"Description\"] = \"DESCRIPTION\";\n    StreamOrderBy[\"Id\"] = \"ID\";\n    StreamOrderBy[\"MessagesPerSecond\"] = \"MESSAGES_PER_SECOND\";\n    StreamOrderBy[\"PeerCount\"] = \"PEER_COUNT\";\n    StreamOrderBy[\"PublisherCount\"] = \"PUBLISHER_COUNT\";\n    StreamOrderBy[\"SubscriberCount\"] = \"SUBSCRIBER_COUNT\";\n})(StreamOrderBy || (StreamOrderBy = {}));\nexport const GetStreamsDocument = gql `\n    query getStreams($streamIds: [String!], $first: Int, $orderBy: StreamOrderBy, $orderDirection: OrderDirection, $search: String, $owner: String, $cursor: String) {\n  streams(\n    pageSize: $first\n    ids: $streamIds\n    orderBy: $orderBy\n    orderDirection: $orderDirection\n    owner: $owner\n    searchTerm: $search\n    cursor: $cursor\n  ) {\n    items {\n      bytesPerSecond\n      description\n      id\n      messagesPerSecond\n      peerCount\n      publisherCount\n      subscriberCount\n    }\n    cursor\n  }\n}\n    `;\nexport const GetGlobalStreamsStatsDocument = gql `\n    query getGlobalStreamsStats {\n  summary {\n    bytesPerSecond\n    messagesPerSecond\n    streamCount\n  }\n}\n    `;\nexport const GetNeighborsDocument = gql `\n    query getNeighbors($cursor: String, $pageSize: Int, $streamPart: String, $node: String, $streamId: String) {\n  neighbors(\n    cursor: $cursor\n    pageSize: $pageSize\n    streamPart: $streamPart\n    node: $node\n    stream: $streamId\n  ) {\n    items {\n      streamPartId\n      nodeId1\n      nodeId2\n      rtt\n    }\n    cursor\n  }\n}\n    `;\n","import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { LineChart, Line, CartesianGrid, XAxis, YAxis, ResponsiveContainer, Tooltip, ReferenceLine, } from 'recharts';\nimport Spinner from '~/components/Spinner';\nimport { COLORS, MEDIUM, REGULAR, TABLET } from '~/shared/utils/styled';\nimport { NoData } from '~/shared/components/NoData';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1ugjy2q\" }) `\n    position: relative;\n`;\nconst NoDataContainer = styled.div.withConfig({ displayName: \"NoDataContainer\", componentId: \"sc-gj2gxu\" }) `\n    height: 400px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n`;\nconst SpinnerContainer = styled.div.withConfig({ displayName: \"SpinnerContainer\", componentId: \"sc-um9vla\" }) `\n    height: 400px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n`;\nconst TimeSeriesGraph = ({ graphData, isLoading, xAxisDisplayFormatter, yAxisAxisDisplayFormatter, tooltipLabelFormatter, tooltipValueFormatter, tooltipValuePrefix, noDataText, ...props }) => {\n    const chartData = useMemo(() => graphData.sort((a, b) => a.x - b.x), [graphData]);\n    const [crossHairY, setCrossHairY] = useState(null);\n    const [crossHairX, setCrossHairX] = useState(null);\n    const updateCrossHairCoordinates = useCallback((xValue, yValue) => {\n        setTimeout(() => {\n            setCrossHairX(xValue);\n            setCrossHairY(yValue);\n        });\n        // do not put anything in the dependencies array or it will cause endless rerendering cycle\n    }, []);\n    return (React.createElement(Container, { ...props },\n        !!isLoading && (React.createElement(SpinnerContainer, null,\n            React.createElement(Spinner, { size: \"large\", color: \"blue\" }))),\n        !isLoading && (!chartData || !chartData.length) && (React.createElement(NoDataContainer, null,\n            React.createElement(NoData, { width: 250, firstLine: noDataText || 'Not enough data' }))),\n        !isLoading && chartData && chartData.length > 0 && (React.createElement(ResponsiveContainer, { width: \"100%\", height: 400 },\n            React.createElement(LineChart, { data: chartData },\n                React.createElement(Line, { type: \"linear\", dataKey: \"y\", stroke: COLORS.link, dot: { r: 4, stroke: COLORS.link }, activeDot: { stroke: 'white', fill: COLORS.link, r: 5 }, isAnimationActive: false }),\n                React.createElement(CartesianGrid, { stroke: COLORS.dialogBorder, vertical: false }),\n                React.createElement(XAxis\n                // domain={xAxisDataDomain}\n                , { \n                    // domain={xAxisDataDomain}\n                    dataKey: \"x\", scale: \"point\", tickFormatter: xAxisDisplayFormatter || undefined, tickMargin: 10, tickLine: false, stroke: COLORS.dialogBorder, minTickGap: 10, tick: { stroke: COLORS.primaryLight, fontWeight: 200 }, interval: \"preserveStartEnd\" }),\n                React.createElement(YAxis, { domain: ['dataMin', 'dataMax'], dataKey: \"y\", orientation: \"right\", tickMargin: 10, tickFormatter: yAxisAxisDisplayFormatter || undefined, stroke: COLORS.dialogBorder, tickLine: false, tick: { stroke: COLORS.primaryLight, fontWeight: 200 }, interval: \"preserveStartEnd\" }),\n                React.createElement(Tooltip, { cursor: React.createElement(CustomCursor, { setSelectedPointValues: updateCrossHairCoordinates }), content: React.createElement(CustomTooltip, { valuePrefix: tooltipValuePrefix, labelFormatter: tooltipLabelFormatter, valueFormatter: tooltipValueFormatter }) }),\n                crossHairY !== null && crossHairX !== null && (React.createElement(React.Fragment, null,\n                    React.createElement(ReferenceLine, { y: crossHairY, stroke: COLORS.primaryLight, strokeDasharray: \"4 1\" }),\n                    React.createElement(ReferenceLine, { x: crossHairX, stroke: COLORS.primaryLight, strokeDasharray: \"4 1\" }))))))));\n};\nconst CustomCursor = (props) => {\n    const { setSelectedPointValues } = props;\n    if (props.payload) {\n        setSelectedPointValues(props.payload[0].payload.x, props.payload[0].payload.y);\n    }\n    const setSelectedPointValuesRef = useRef(setSelectedPointValues);\n    if (setSelectedPointValuesRef.current !== setSelectedPointValues) {\n        setSelectedPointValuesRef.current = setSelectedPointValues;\n    }\n    useEffect(() => {\n        const { current } = setSelectedPointValuesRef;\n        return () => {\n            current?.(null, null);\n        };\n    }, []);\n    return React.createElement(React.Fragment, null);\n};\nconst CustomTooltipContainer = styled.div.withConfig({ displayName: \"CustomTooltipContainer\", componentId: \"sc-1lcij3p\" }) `\n    border-radius: 8px;\n    padding: 12px;\n    background-color: white;\n    box-shadow: 0 8px 12px 0 #52525226;\n    font-size: 14px;\n\n    .label {\n        color: ${COLORS.primary};\n        margin-bottom: 5px;\n        font-weight: ${REGULAR};\n    }\n\n    .value {\n        font-weight: ${MEDIUM};\n        color: ${COLORS.primary};\n        margin-bottom: 0;\n    }\n\n    .value-prefix {\n        color: ${COLORS.primaryDisabled};\n        font-weight: ${REGULAR};\n    }\n`;\nconst CustomTooltip = (props) => {\n    const { active, payload, label, valuePrefix, labelFormatter, valueFormatter } = props;\n    return (active &&\n        payload &&\n        payload[0] && (React.createElement(CustomTooltipContainer, null,\n        React.createElement(\"p\", { className: \"label\" }, labelFormatter ? labelFormatter(label) : label),\n        React.createElement(\"p\", { className: \"value\" },\n            React.createElement(\"span\", { className: \"value-prefix\" },\n                valuePrefix,\n                \":\"),\n            ' ',\n            valueFormatter ? valueFormatter(payload[0].value) : payload[0].value))));\n};\nexport const NetworkChart = styled(TimeSeriesGraph).withConfig({ displayName: \"NetworkChart\", componentId: \"sc-l9v4yv\" }) `\n    margin: 40px 0;\n\n    @media ${TABLET} {\n        margin: 64px 0 0;\n    }\n`;\n","import { format } from 'date-fns';\nexport const formatShortDate = (value) => {\n    return format(new Date(value), 'dd MMM');\n};\nexport const formatLongDate = (value) => {\n    return format(new Date(value), 'dd/MM/yyyy');\n};\n","import { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React, { useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport { Button } from '~/components/Button';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout from '~/components/Layout';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { Separator } from '~/components/Separator';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { OperatorIdCell } from '~/components/Table';\nimport WalletPass from '~/components/WalletPass';\nimport { GetStreamsDocument as GetIndexerStreamsDocument, StreamOrderBy as IndexerOrderBy, OrderDirection as IndexerOrderDirection, } from '~/generated/gql/indexer';\nimport { getNetworkStats, getOperatorDailyBuckets, getTimestampForChartPeriod, } from '~/getters';\nimport { getDelegationStats } from '~/getters/getDelegationStats';\nimport { getIndexerClient } from '~/getters/getGraphClient';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { useDelegationsForWalletQuery, useDelegationsStats, useOperatorForWalletQuery, useOperatorStatsForWallet, } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo, useSponsorshipsForCreatorQuery, } from '~/hooks/sponsorships';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nexport function NetworkOverviewPage() {\n    return (React.createElement(Layout, { columnize: true },\n        React.createElement(NetworkHelmet, { title: \"Network Overview\" }),\n        React.createElement(SegmentGrid, null,\n            React.createElement(NetworkStats, null),\n            React.createElement(MyOperatorSummary, null),\n            React.createElement(MyDelegationsSummary, null),\n            React.createElement(MyDelegations, null),\n            React.createElement(MySponsorships, null))));\n}\nfunction NetworkStats() {\n    const currentChainId = useCurrentChainId();\n    const statsQuery = useQuery({\n        queryKey: ['networkStats', currentChainId],\n        async queryFn() {\n            return getNetworkStats(currentChainId);\n        },\n    });\n    const operatorCountQuery = useActiveOperatorCountQuery();\n    return (React.createElement(NetworkPageSegment, { title: \"Network stats\" },\n        React.createElement(Pad, null,\n            React.createElement(StatGrid, null,\n                React.createElement(StatCell, { label: \"Total stake\" }, statsQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (React.createElement(React.Fragment, null, statsQuery.data ? (React.createElement(SponsorshipDecimals, { abbr: true, amount: statsQuery.data.totalStake, tooltip: true })) : (React.createElement(React.Fragment, null, \"N/A\"))))),\n                React.createElement(StatCell, { label: \"Sponsorships\" }, statsQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (statsQuery.data?.sponsorshipsCount ?? React.createElement(React.Fragment, null, \"N/A\"))),\n                React.createElement(StatCell, { label: \"Active Operators\" }, operatorCountQuery.isLoading ? (React.createElement(React.Fragment, null, \"\\u200C\")) : (operatorCountQuery.data ?? React.createElement(React.Fragment, null, \"N/A\")))))));\n}\nfunction useActiveOperatorCountQuery() {\n    const chainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useActiveOperatorCountQuery', chainId],\n        queryFn: async () => {\n            let cursor = '0';\n            const uniquenessGate = {};\n            let count = 0;\n            const client = getIndexerClient(chainId);\n            if (!client) {\n                return 0;\n            }\n            for (;;) {\n                const { data: { streams }, } = await client.query({\n                    fetchPolicy: 'network-only',\n                    query: GetIndexerStreamsDocument,\n                    variables: {\n                        first: 500,\n                        orderBy: IndexerOrderBy.MessagesPerSecond,\n                        orderDirection: IndexerOrderDirection.Desc,\n                        cursor,\n                    },\n                });\n                const breakEarly = (() => {\n                    for (const item of streams.items) {\n                        if (!item.messagesPerSecond) {\n                            /**\n                             * Make the whole stream fetching skip streams that have no\n                             * data flowing through them.\n                             */\n                            return true;\n                        }\n                        if (!uniquenessGate[item.id]) {\n                            if (/^[^/]+\\/operator\\/coordination$/.test(item.id)) {\n                                count += 1;\n                            }\n                        }\n                        uniquenessGate[item.id] = true;\n                    }\n                    return false;\n                })();\n                if (!streams.cursor || breakEarly) {\n                    break;\n                }\n                cursor = streams.cursor;\n            }\n            return count;\n        },\n    });\n}\nfunction MyOperatorSummary() {\n    const wallet = useWalletAccount();\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const stats = useOperatorStatsForWallet(wallet);\n    const { value = 0n, numOfDelegators = 0, numOfSponsorships = 0 } = stats || {};\n    const [chartPeriod, setChartPeriod] = useState(ChartPeriod.ThreeMonths);\n    const [chartId, setChartId] = useState('earnings');\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const currentChainId = useCurrentChainId();\n    const { data: chartData = [] } = useQuery({\n        queryKey: [\n            'operatorSummaryChartQuery',\n            currentChainId,\n            chartId,\n            chartPeriod,\n            operator?.id,\n        ],\n        async queryFn() {\n            if (!operator) {\n                return [];\n            }\n            try {\n                const end = moment().utc().subtract(1, 'day').endOf('day');\n                const buckets = await getOperatorDailyBuckets(currentChainId, operator.id, {\n                    dateGreaterEqualThan: getTimestampForChartPeriod(chartPeriod, end).unix(),\n                    dateLowerThan: end.unix(),\n                    force: true,\n                });\n                const { decimals } = await getSponsorshipTokenInfo(currentChainId);\n                const toValue = chartId === 'stake'\n                    ? ({ valueWithoutEarnings }) => toBigInt(valueWithoutEarnings)\n                    : ({ cumulativeEarningsWei }) => toBigInt(cumulativeEarningsWei);\n                return buckets.map((bucket) => ({\n                    x: Number(bucket.date) * 1000,\n                    y: toFloat(toValue(bucket), decimals).toNumber(),\n                }));\n            }\n            catch (e) {\n                errorToast({ title: 'Could not load operator chart data' });\n                console.warn('Could not load operator chart data', e);\n            }\n            return [];\n        },\n    });\n    const chartLabel = chartId === 'stake' ? 'Total stake' : 'Cumulative earnings';\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { aux: operator && (React.createElement(Button, { kind: \"secondary\", as: Link, to: R.operator(operator.id, routeOptions(chainKey)) }, \"View Operator\")) }, \"My operator summary\") },\n        React.createElement(WalletPass, { resourceName: \"operator summary\", roundBorders: true }, !wallet || stats !== null ? (React.createElement(React.Fragment, null,\n            React.createElement(Pad, null,\n                React.createElement(StatGrid, null,\n                    React.createElement(StatCell, { label: \"Total stake\" },\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: value })),\n                    React.createElement(StatCell, { label: \"Delegators\" }, numOfDelegators),\n                    React.createElement(StatCell, { label: \"Sponsorships\" }, numOfSponsorships))),\n            React.createElement(Separator, null),\n            React.createElement(Pad, null,\n                React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: chartPeriod, onChange: setChartPeriod }), sourceTabs: React.createElement(Tabs, { selection: chartId, onSelectionChange: (newChartId) => {\n                            if (newChartId !== 'stake' &&\n                                newChartId !== 'earnings') {\n                                return;\n                            }\n                            setChartId(newChartId);\n                        } },\n                        React.createElement(Tab, { id: \"earnings\" }, \"Cumulative earnings\"),\n                        React.createElement(Tab, { id: \"stake\" }, \"Total stake\")) },\n                    React.createElement(NetworkChart, { tooltipValuePrefix: chartLabel, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: (value) => abbr(value), tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => `${abbr(value)} ${tokenSymbol}` }))))) : (React.createElement(React.Fragment, null,\n            React.createElement(Pad, null,\n                React.createElement(NoData, { firstLine: \"You haven't initialized your operator.\", secondLine: React.createElement(React.Fragment, null,\n                        \"You can become an operator on the\",\n                        ' ',\n                        React.createElement(Link, { to: R.operators(routeOptions(chainKey)) }, \"Operators\"),\n                        ' ',\n                        \"page.\"), compact: true })))))));\n}\nfunction MyDelegationsSummary() {\n    const wallet = useWalletAccount();\n    const currentChainId = useCurrentChainId();\n    const stats = useDelegationsStats(wallet);\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const { value = 0n, numOfOperators = 0, minApy = 0, maxApy = 0 } = stats || {};\n    const apy = minApy === maxApy ? [minApy] : [minApy, maxApy];\n    const [chartPeriod, setChartPeriod] = useState(ChartPeriod.ThreeMonths);\n    const [chartDataSource, setChartDataSource] = useState('cumulativeEarnings');\n    const dailyDelegationChartQuery = useQuery({\n        queryKey: [\n            'dailyDelegationChartQuery',\n            currentChainId,\n            wallet,\n            chartPeriod,\n            chartDataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!wallet) {\n                    return [];\n                }\n                return await getDelegationStats(currentChainId, wallet, chartPeriod, chartDataSource, {\n                    force: true,\n                    ignoreToday: false,\n                });\n            }\n            catch (_) {\n                errorToast({ title: 'Could not load my delegations chart data' });\n                return [];\n            }\n        },\n    });\n    const chartLabel = chartDataSource === 'currentValue' ? 'Current value' : 'Cumulative earnings';\n    return (React.createElement(NetworkPageSegment, { title: \"My delegations summary\" },\n        React.createElement(WalletPass, { resourceName: \"delegations summary\", roundBorders: true },\n            React.createElement(Pad, null,\n                React.createElement(StatGrid, null,\n                    React.createElement(StatCell, { label: \"Current value\" },\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: value })),\n                    React.createElement(StatCell, { label: \"Operators\" }, numOfOperators),\n                    React.createElement(StatCell, { label: \"APY\" },\n                        apy.map((v) => (v * 100).toFixed(0)).join('-'),\n                        \"%\"))),\n            React.createElement(Separator, null),\n            React.createElement(Pad, null,\n                React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: chartPeriod, onChange: setChartPeriod }), sourceTabs: React.createElement(Tabs, { selection: chartDataSource, onSelectionChange: (newChartId) => {\n                            if (newChartId !== 'currentValue' &&\n                                newChartId !== 'cumulativeEarnings') {\n                                return;\n                            }\n                            setChartDataSource(newChartId);\n                        } },\n                        React.createElement(Tab, { id: \"cumulativeEarnings\" }, \"Cumulative earnings\"),\n                        React.createElement(Tab, { id: \"currentValue\" }, \"Current value\")) },\n                    React.createElement(NetworkChart, { tooltipValuePrefix: chartLabel, graphData: dailyDelegationChartQuery.data || [], xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: (value) => abbr(value), isLoading: dailyDelegationChartQuery.isLoading, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => `${abbr(value)} ${tokenSymbol}` }))))));\n}\nfunction MyDelegations() {\n    const wallet = useWalletAccount();\n    const query = useDelegationsForWalletQuery({ address: wallet });\n    const isLoading = query.isLoading || query.isFetching;\n    // We want to hide delegations to broken operator contract version 1\n    // as we cannot get rid of them otherwise\n    const delegations = query.data?.pages\n        .flatMap((page) => page.elements)\n        .filter((d) => d.contractVersion !== 1) || [];\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: \"My delegations\", foot: true },\n        React.createElement(WalletPass, { resourceName: \"delegations\" }, !wallet || delegations.length || isLoading ? (React.createElement(React.Fragment, null,\n            React.createElement(ScrollTableCore, { isLoading: isLoading, elements: delegations, columns: [\n                    {\n                        displayName: 'Operator',\n                        valueMapper: ({ id, metadata: { imageUrl, name }, }) => (React.createElement(OperatorIdCell, { operatorId: id, imageUrl: imageUrl, operatorName: name })),\n                        align: 'start',\n                        isSticky: true,\n                        key: 'operatorId',\n                    },\n                    {\n                        displayName: 'My delegation',\n                        valueMapper: (sponsorship) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: wallet ? sponsorship.share(wallet) : 0n })),\n                        align: 'start',\n                        isSticky: false,\n                        key: 'myShare',\n                    },\n                    {\n                        displayName: 'Total stake',\n                        valueMapper: ({ valueWithoutEarnings }) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: valueWithoutEarnings })),\n                        align: 'end',\n                        isSticky: false,\n                        key: 'totalStake',\n                    },\n                    {\n                        displayName: \"Owner's cut\",\n                        valueMapper: ({ operatorsCut }) => `${operatorsCut}%`,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'operatorsCut',\n                    },\n                    {\n                        displayName: 'APY',\n                        valueMapper: ({ apy }) => `${(apy * 100).toFixed(0)}%`,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'apy',\n                    },\n                    {\n                        displayName: 'Sponsorships',\n                        valueMapper: (element) => element.stakes.length,\n                        align: 'end',\n                        isSticky: false,\n                        key: 'sponsorships',\n                    },\n                ], linkMapper: ({ id }) => R.operator(id, routeOptions(chainKey)) }),\n            query.hasNextPage ? (React.createElement(LoadMoreButton, { disabled: isLoading, onClick: () => void query.fetchNextPage(), kind: \"primary2\" }, \"Load more\")) : (React.createElement(React.Fragment, null)))) : (React.createElement(NoData, { firstLine: \"You haven't delegated to anyone yet.\", secondLine: React.createElement(React.Fragment, null,\n                \"You can browse\",\n                ' ',\n                React.createElement(Link, { to: R.operators(routeOptions(chainKey)) }, \"operators\"),\n                ' ',\n                \"to start delegating.\"), compact: true })))));\n}\nfunction MySponsorships() {\n    const query = useSponsorshipsForCreatorQuery(useWalletAccount());\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NetworkPageSegment, { title: \"My sponsorships\", foot: true },\n        React.createElement(WalletPass, { resourceName: \"sponsorships\" },\n            React.createElement(QueriedSponsorshipsTable, { query: query, noDataFirstLine: \"You don't have any sponsorships yet.\", noDataSecondLine: React.createElement(React.Fragment, null,\n                    \"You can\",\n                    ' ',\n                    React.createElement(Link, { to: R.sponsorships(routeOptions(chainKey)) }, \"start a sponsorship\"),\n                    ' ',\n                    \"here\") }))));\n}\n","import moment from 'moment/moment';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { getDelegatorDailyBuckets } from '~/getters/index';\nimport { ChartPeriod } from '~/types';\nimport { toBN, toFloat } from '~/utils/bn';\nexport const getDelegationStats = async (chainId, delegatorId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const { decimals = 18n } = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getDelegatorDailyBuckets(chainId, delegatorId, {\n                    dateGreaterEqualThan: endDate.unix(),\n                    dateLowerThan: start.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        const yValue = dataSource === 'currentValue'\n            ? toFloat(bucket.totalValueDataWei, decimals).toNumber()\n            : dataSource === 'cumulativeEarnings'\n                ? toFloat(bucket.cumulativeEarningsWei, decimals).toNumber()\n                : 0;\n        return {\n            x: toBN(bucket.date).multipliedBy(1000).toNumber(),\n            y: yValue,\n        };\n    });\n};\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { EmptyState } from '~/components/EmptyState';\nimport Layout from '~/components/Layout';\nimport pageNotFoundPic from '~/shared/assets/images/404_blocks.png';\nimport pageNotFoundPic2x from '~/shared/assets/images/404_blocks@2x.png';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function NotFoundPage() {\n    return (React.createElement(Layout, { rootBackgroundColor: \"#EFEFEF\" },\n        React.createElement(NotFoundPageContent, null)));\n}\nexport function NotFoundPageContent() {\n    const chainKey = useCurrentChainKey();\n    const fullChainName = useCurrentChainFullName();\n    return (React.createElement(Root, null,\n        React.createElement(EmptyState, { image: React.createElement(\"img\", { src: pageNotFoundPic, srcSet: `${pageNotFoundPic2x} 2x`, alt: \"Not found\" }), link: React.createElement(React.Fragment, null,\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.streams(routeOptions(chainKey)) }, \"Go to streams\"),\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.projects(routeOptions(chainKey)) }, \"Go to projects\"),\n                React.createElement(Button, { kind: \"special\", as: Link, to: R.root() }, \"Go to public site\")), linkOnMobile: true },\n            React.createElement(\"p\", null,\n                \"Whoops! We don't seem to be able to find your data.\",\n                React.createElement(\"br\", null),\n                React.createElement(\"small\", null,\n                    \"You are on the \",\n                    fullChainName,\n                    \" chain. Are you on the right chain?\")))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-xrbw83\" }) `\n    text-align: center;\n    width: 100%;\n`;\n","import React, { useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { Alert as PrestyledAlert } from '~/components/Alert';\nimport FormModal, { FieldWrap, Section, TextInput, } from '~/modals/FormModal';\nimport Label from '~/shared/components/Ui/Label';\nexport default function AddNodeAddressModal({ title = 'Add node address', onResolve, onSubmit, submitLabel = 'Add node address', warning, ...props }) {\n    const [address, setAddress] = useState('');\n    const isValidAddress = useMemo(() => (address.length > 0 ? isAddress(address) : true), [address]);\n    return (React.createElement(FormModal, { ...props, title: title, submitLabel: submitLabel, canSubmit: isValidAddress && address.length > 0, onSubmit: () => {\n            onSubmit(address);\n            onResolve?.(address);\n        } },\n        React.createElement(Section, null,\n            React.createElement(Label, null, \"Address\"),\n            React.createElement(FieldWrap, { \"$invalid\": !isValidAddress },\n                React.createElement(TextInput, { name: \"amount\", autoFocus: true, onChange: ({ target }) => void setAddress(target.value), placeholder: \"0x795...f109A\", value: address }))),\n        warning != null && (React.createElement(Alert, { type: \"error\", title: \"\" }, warning))));\n}\nconst Alert = styled(PrestyledAlert).withConfig({ displayName: \"Alert\", componentId: \"sc-zoxhdl\" }) `\n    margin-top: 10px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useCallback, useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport { Separator } from '~/components/Separator';\nimport Spinner from '~/components/Spinner';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport AddAddressModal from '~/modals/AddAddressModal';\nimport { addOperatorControllerAddress, removeOperatorControllerAddress, setOperatorNodeAddresses, } from '~/services/operators';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { COLORS } from '~/shared/utils/styled';\nimport { Layer } from '~/utils/Layer';\nimport { getBalance } from '~/utils/balance';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { errorToast } from '~/utils/toast';\nexport var AddressType;\n(function (AddressType) {\n    AddressType[AddressType[\"Node\"] = 0] = \"Node\";\n    AddressType[AddressType[\"Automation\"] = 1] = \"Automation\";\n})(AddressType || (AddressType = {}));\nconst dialogTitleMap = {\n    [AddressType.Node]: 'Add node address',\n    [AddressType.Automation]: 'Authorise staking agent',\n};\nconst dialogSubmitLabelMap = {\n    [AddressType.Node]: 'Add node address',\n    [AddressType.Automation]: 'Authorise staking agent',\n};\nexport function AddressTable({ type, busy = false, disableEditing = false, onChange, onAddAddress, onRemoveAddress, value = [], }) {\n    function toggle(element) {\n        if (element.persisted) {\n            return void onChange?.(value.map((node) => node !== element ? node : { ...node, enabled: !node.enabled }));\n        }\n        onChange?.(value.filter((node) => node !== element));\n    }\n    return (React.createElement(ScrollTable, { elements: value, columns: [\n            {\n                displayName: 'Address',\n                valueMapper: (element) => (React.createElement(Address, { \"$new\": element.enabled && !element.persisted }, element.address)),\n                align: 'start',\n                isSticky: true,\n                key: 'id',\n            },\n            {\n                displayName: 'POL balance',\n                valueMapper: (element) => React.createElement(PolBalance, { address: element.address }),\n                align: 'start',\n                isSticky: false,\n                key: 'balance',\n            },\n            {\n                displayName: '',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, element.persisted !== element.enabled ? (React.createElement(PendingIndicator, { disabled: busy },\n                    \"Pending \",\n                    element.enabled ? 'addition' : 'deletion')) : (React.createElement(Button, { disabled: busy || disableEditing, kind: \"secondary\", onClick: () => {\n                        toggle(element);\n                        return void onRemoveAddress?.(element.address);\n                    } }, \"Delete\")))),\n                align: 'end',\n                isSticky: false,\n                key: 'actions',\n            },\n        ], footerComponent: React.createElement(Footer, null,\n            React.createElement(Button, { kind: \"secondary\", disabled: busy || disableEditing, onClick: async () => {\n                    try {\n                        await addAddressModal.pop({\n                            title: dialogTitleMap[type],\n                            submitLabel: dialogSubmitLabelMap[type],\n                            warning: type === AddressType.Automation ? (React.createElement(React.Fragment, null, \"While this address cannot withdraw your tokens, it may trigger penalties for your Operator by engaging in unsuitable Sponsorships or prematurely exiting Sponsorships before the minimum stake period expires. It's important to exercise caution.\")) : undefined,\n                            async onSubmit(newAddress) {\n                                const address = `0x${newAddress.replace(/^0x/i, '')}`.toLowerCase();\n                                const exists = value.some((node) => node.address.toLowerCase() === address);\n                                if (!exists) {\n                                    onChange?.([\n                                        ...value,\n                                        {\n                                            address,\n                                            persisted: false,\n                                            enabled: true,\n                                        },\n                                    ]);\n                                    return void onAddAddress?.(address);\n                                }\n                                errorToast({\n                                    title: 'Address already declared',\n                                });\n                            },\n                        });\n                    }\n                    catch (e) {\n                        if (isRejectionReason(e)) {\n                            return;\n                        }\n                        console.warn('Failed to add address', e);\n                    }\n                } }, dialogTitleMap[type])) }));\n}\nconst Address = styled.div.withConfig({ displayName: \"Address\", componentId: \"sc-r6ikb5\" }) `\n    color: ${({ $new = false }) => ($new ? '#a3a3a3' : '#525252')};\n`;\nconst addAddressModal = toaster(AddAddressModal, Layer.Modal);\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-1w3iyj4\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\nconst LowBalanceThreshold = toBigInt(0.1, 18n);\nfunction PolBalance({ address }) {\n    const [balance, setBalance] = useState();\n    const currentChainId = useCurrentChainId();\n    useEffect(() => {\n        let mounted = true;\n        void (async () => {\n            try {\n                const newBalance = await getBalance({\n                    chainId: currentChainId,\n                    tokenAddress: 'native',\n                    walletAddress: address,\n                });\n                if (mounted) {\n                    setBalance(newBalance);\n                }\n            }\n            catch (e) {\n                console.warn(`Failed to get balance for \"${address}\"`, e);\n            }\n        })();\n        return () => {\n            mounted = false;\n        };\n    }, [address, currentChainId]);\n    const lowBalance = balance != null && balance < LowBalanceThreshold;\n    return balance != null ? (React.createElement(PolBalanceRoot, null,\n        React.createElement(\"div\", null, toFloat(balance, 18n).toFixed(2)),\n        lowBalance && (React.createElement(Tooltip, { content: \"Low POL\" },\n            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ff5c00\", \"$svgSize\": { width: '18px', height: '18px' } },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))))) : (React.createElement(Spinner, { color: \"blue\" }));\n}\nconst PolBalanceRoot = styled.div.withConfig({ displayName: \"PolBalanceRoot\", componentId: \"sc-1lt1g56\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n\n    > * {\n        flex-shrink: 0;\n    }\n`;\nfunction PendingIndicator({ children, ...props }) {\n    return (React.createElement(PendingIndicatorRoot, { ...props, type: \"button\" },\n        React.createElement(\"div\", null, children),\n        React.createElement(Separator, null),\n        React.createElement(\"div\", null,\n            React.createElement(Spinner, { color: \"blue\" }))));\n}\nconst PendingIndicatorRoot = styled.button.withConfig({ displayName: \"PendingIndicatorRoot\", componentId: \"sc-xy28i0\" }) `\n    align-items: center;\n    appearance: none;\n    background: #deebff;\n    border-radius: 4px;\n    border: 0;\n    color: ${COLORS.primary};\n    display: grid;\n    font-size: 12px;\n    font-weight: 500;\n    grid-template-columns: auto 1px 24px;\n    height: 32px;\n    line-height: 20px;\n    padding: 0;\n\n    :disabled {\n        opacity: 0.5;\n    }\n\n    ${Separator} {\n        background: #d1dfff;\n        height: 100%;\n    }\n\n    > div:first-child {\n        padding: 0 8px;\n    }\n\n    svg {\n        color: ${COLORS.close};\n        display: block;\n        height: 8px;\n        margin: 0 auto;\n        width: 8px;\n    }\n\n    ${Spinner} {\n        height: 8px;\n        width: 8px;\n        margin: 0 auto;\n        display: flex;\n        align-items: center;\n        justify-items: center;\n    }\n`;\nexport function useSubmitNodeAddressesCallback() {\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const cb = useCallback(async (chainId, operatorId, addresses, { onSuccess, onError, onReject } = {}) => {\n        setIsSubmitting(true);\n        try {\n            await setOperatorNodeAddresses(chainId, operatorId, addresses, {\n                onReceipt: ({ blockNumber }) => {\n                    onSuccess?.(blockNumber);\n                },\n            });\n        }\n        catch (e) {\n            if (isTransactionRejection(e) || isRejectionReason(e)) {\n                /**\n                 * User rejected the transaction. Let's move on like\n                 * nothing happened.\n                 */\n                onReject?.();\n                return;\n            }\n            console.warn('Failed to save the node addresses', e);\n            onError?.(e);\n        }\n        finally {\n            setIsSubmitting(false);\n        }\n    }, []);\n    return [cb, isSubmitting];\n}\nexport function useSubmitControllerAddressesCallback() {\n    const [isSubmitting, setIsSubmitting] = useState(false);\n    const cb = useCallback(async (chainId, operatorId, address, addNew, { onSuccess, onError, onReject } = {}) => {\n        setIsSubmitting(true);\n        try {\n            if (addNew) {\n                await addOperatorControllerAddress(chainId, operatorId, address, {\n                    onReceipt: ({ blockNumber }) => {\n                        onSuccess?.(blockNumber);\n                    },\n                });\n            }\n            else {\n                await removeOperatorControllerAddress(chainId, operatorId, address, {\n                    onReceipt: ({ blockNumber }) => {\n                        onSuccess?.(blockNumber);\n                    },\n                });\n            }\n        }\n        catch (e) {\n            if (isTransactionRejection(e) || isRejectionReason(e)) {\n                /**\n                 * User rejected the transaction. Let's move on like\n                 * nothing happened.\n                 */\n                onReject?.();\n                return;\n            }\n            console.warn('Failed to save the controller addresses', e);\n            onError?.(e);\n        }\n        finally {\n            setIsSubmitting(false);\n        }\n    }, []);\n    return [cb, isSubmitting];\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nimport Spinner from './Spinner';\nimport { Tooltip } from './Tooltip';\nexport function BehindBlockErrorDisplay({ latest, initial = latest, }) {\n    const { actualBlockNumber: initialBlockNumber } = initial;\n    const { actualBlockNumber, expectedBlockNumber } = latest;\n    const total = Math.max(1, expectedBlockNumber - initialBlockNumber);\n    const completed = Math.max(0, actualBlockNumber - initialBlockNumber);\n    const togo = Math.max(0, expectedBlockNumber - actualBlockNumber);\n    return (React.createElement(Root, null,\n        React.createElement(Spinner, { fixed: true, coverage: Math.min(1, completed / total), size: 24, strokeWidth: 3 }),\n        React.createElement(\"h2\", null, \"Indexing\"),\n        React.createElement(\"p\", null,\n            \"Your resource is being indexed.\",\n            React.createElement(\"br\", null),\n            \"It will be available shortly.\"),\n        React.createElement(Tooltip, { anchorDisplay: \"inline-block\", content: `${actualBlockNumber} / ${expectedBlockNumber}` },\n            React.createElement(Blocks, null,\n                togo,\n                \" block\",\n                togo !== 1 ? 's' : '',\n                \" to go\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1q9ovah\" }) `\n    padding: 240px 0;\n    text-align: center;\n\n    ${Spinner} {\n        margin: 0 auto;\n    }\n\n    p {\n        margin: 12px 0 16px;\n        line-height: 1.5em;\n    }\n\n    h2 {\n        font-weight: normal;\n        font-size: 24px;\n        margin: 20px 0 0;\n    }\n`;\nconst Blocks = styled.div.withConfig({ displayName: \"Blocks\", componentId: \"sc-1ejmyl2\" }) `\n    align-items: center;\n    background: #fafafa;\n    border-radius: 16px;\n    color: ${COLORS.primaryLight};\n    display: flex;\n    font-size: 14px;\n    gap: 4px;\n    height: 32px;\n    margin: 0 auto;\n    padding: 0 12px;\n    width: max-content;\n`;\n","import { produce } from 'immer';\nimport { useEffect } from 'react';\nimport { create } from 'zustand';\nimport { Minute } from '~/consts';\nconst TTL = Minute;\nconst useOperatorReachabilityStore = create((set, get) => {\n    function updateProbe(url, fn) {\n        set((store) => produce(store, ({ probes }) => {\n            const updatedAt = Date.now();\n            probes[url] = produce(Object.assign(probes[url] || { reachable: false, pending: false }, {\n                updatedAt,\n            }), fn);\n        }));\n    }\n    return {\n        nodes: {},\n        probes: {},\n        async probe(nodeId, heartbeat) {\n            const { host, port, tls = false } = heartbeat.websocket || {};\n            const url = host && port ? `${tls ? 'wss:' : 'ws:'}//${host}:${port}` : '';\n            set((store) => produce(store, (draft) => {\n                /**\n                 * Heartbeats for a single node can carry different WebSocket URLs\n                 * over time, cause c'est la vie.\n                 */\n                draft.nodes[nodeId] = url;\n            }));\n            const { updatedAt = 0, pending = false } = get().probes[url] || {};\n            if (pending || updatedAt + TTL >= Date.now()) {\n                /**\n                 * Ignore cache hits and pending probes. Note that we probe based\n                 * on WebSocket URLs not on node addresses. We support the unlikely\n                 * but technically possible scenario where nodes share a URL.\n                 */\n                return;\n            }\n            updateProbe(url, (draft) => {\n                draft.pending = true;\n            });\n            /**\n             * StreamrClient opens many WebSocket connections, often hitting\n             * browser limits.\n             *\n             * Normally, we'd attempt a real WSS connection, but since browsers\n             * handle limits differently, it's hard to tell whether a failure\n             * is due to node issues or browser constraints.\n             *\n             * @todo Let’s revisit this once we have a more reliable method for\n             * confirming node reachability.\n             */\n            updateProbe(url, (draft) => {\n                Object.assign(draft, {\n                    pending: false,\n                    reachable: tls && !!port && !!host && !isIPAddress(host),\n                });\n            });\n        },\n    };\n});\nexport function useOperatorReachability(heartbeats) {\n    const { probe, nodes, probes } = useOperatorReachabilityStore();\n    useEffect(() => {\n        Object.entries(heartbeats).forEach(([nodeId, heartbeat]) => {\n            if (!heartbeat) {\n                return;\n            }\n            void (async () => {\n                try {\n                    await probe(nodeId, heartbeat);\n                }\n                catch (e) {\n                    console.warn(`Failed to probe WebSocket URL for node \"${nodeId}\"`, heartbeat, e);\n                }\n            })();\n        });\n    }, [heartbeats, probe]);\n    const nodeIds = Object.keys(heartbeats);\n    let numOfReachableNodes = 0;\n    for (const nodeId of nodeIds) {\n        const { reachable = false, pending = false } = probes[nodes[nodeId] || ''] || {};\n        if (pending) {\n            /**\n             * At least one node is being probbed and that's all we can tell\n             * about the collective.\n             */\n            return 'probing';\n        }\n        if (reachable) {\n            numOfReachableNodes += 1;\n        }\n    }\n    return [numOfReachableNodes, nodeIds.length];\n}\nexport function useIsNodeIdReachable(nodeId) {\n    const { nodes, probes } = useOperatorReachabilityStore();\n    const { reachable = false, pending = false } = probes[nodes[nodeId] || ''] || {};\n    return pending ? 'pending' : reachable;\n}\nconst IPv4RegExp = /^(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]?\\d)){3}$/;\nconst IPv6RegExp = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4}:){1,7}:|:([0-9a-fA-F]{1,4}:){1,7}|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4})$/;\nfunction isIPAddress(value) {\n    return IPv4RegExp.test(value) || IPv6RegExp.test(value);\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport moment from 'moment';\nimport CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { truncateNodeId } from '~/shared/utils/text';\nimport { useIsNodeIdReachable } from '~/shared/stores/operatorReachability';\nimport Spinner from '~/components/Spinner';\nexport function LiveNodesTable({ heartbeats, }) {\n    const values = Object.values(heartbeats);\n    return (React.createElement(ScrollTable, { elements: values, columns: [\n            {\n                align: 'start',\n                displayName: 'Node ID',\n                isSticky: true,\n                key: 'id',\n                valueMapper: ({ nodeId }) => truncateNodeId(nodeId),\n            },\n            {\n                align: 'start',\n                displayName: 'Connectivity',\n                isSticky: false,\n                key: 'connectivity',\n                valueMapper: ({ nodeId }) => React.createElement(Connectivity, { nodeId: nodeId }),\n            },\n            {\n                align: 'start',\n                displayName: 'Last seen',\n                isSticky: false,\n                key: 'lastSeen',\n                valueMapper: ({ timestamp }) => moment(timestamp).format('YYYY-MM-DD HH:mm'),\n            },\n            {\n                align: 'start',\n                displayName: 'Version',\n                isSticky: false,\n                key: 'version',\n                valueMapper: ({ applicationVersion }) => applicationVersion || 'N/A',\n            },\n            {\n                align: 'start',\n                displayName: 'Host',\n                isSticky: false,\n                key: 'host',\n                valueMapper: ({ websocket }) => websocket?.host || 'N/A',\n            },\n            {\n                align: 'start',\n                displayName: 'Port',\n                isSticky: false,\n                key: 'port',\n                valueMapper: ({ websocket }) => typeof websocket?.port === 'undefined' ? 'N/A' : websocket.port,\n            },\n            {\n                align: 'start',\n                displayName: 'TLS',\n                isSticky: false,\n                key: 'tls',\n                valueMapper: ({ websocket }) => typeof websocket?.tls === 'undefined'\n                    ? 'N/A'\n                    : websocket.tls\n                        ? 'Yes'\n                        : 'No',\n            },\n        ] }));\n}\nfunction Connectivity({ nodeId }) {\n    const reachable = useIsNodeIdReachable(nodeId);\n    return reachable === 'pending' ? (React.createElement(Spinner, { color: \"blue\" })) : reachable ? (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n        React.createElement(CheckCircleIcon, { label: \"Ok\", size: \"medium\" }))) : (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n        React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" })));\n}\nconst IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-10z0ufy\" }) `\n    align-items: center;\n    color: ${({ $color = 'inherit' }) => $color};\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    position: relative;\n    width: 24px;\n`;\n","import styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nexport const NetworkActionBarBackLink = styled(Link).withConfig({ displayName: \"NetworkActionBarBackLink\", componentId: \"sc-1cjzv6o\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n    margin: 0 7px 0 -9px;\n    width: 42px;\n`;\nexport const NetworkActionBarBackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"NetworkActionBarBackButtonIcon\", componentId: \"sc-1sqye6z\" }) `\n    color: ${COLORS.primaryLight};\n    display: block;\n`;\nexport const NetworkActionBarTitle = styled.div.withConfig({ displayName: \"NetworkActionBarTitle\", componentId: \"sc-1m8fdcp\" }) `\n    line-height: 30px;\n    font-size: 24px;\n    font-weight: ${MEDIUM};\n    margin: 0;\n    display: flex;\n    gap: 10px;\n    justify-content: center;\n    align-items: center;\n    word-break: break-word;\n`;\nexport const NetworkActionBarStatsTitle = styled.p.withConfig({ displayName: \"NetworkActionBarStatsTitle\", componentId: \"sc-94n0rj\" }) `\n    font-weight: ${MEDIUM};\n    letter-spacing: 0.6px;\n    line-height: 30px;\n    font-size: 12px;\n    color: ${COLORS.primaryLight};\n    text-transform: uppercase;\n    margin-top: 44px;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { NetworkActionBarBackButtonIcon, NetworkActionBarBackLink, NetworkActionBarTitle, } from '~/components/ActionBars/NetworkActionBar.styles';\nimport { OperatorAvatar } from '~/components/avatars';\nimport { Button } from '~/components/Button';\nimport { LayoutColumn } from '~/components/Layout';\nimport { useDelegateFunds, useIsDelegatingFundsToOperator, useIsUndelegatingFundsToOperator, useUndelegateFunds, } from '~/hooks/operators';\nimport { getOperatorDelegationAmount } from '~/services/operators';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { goBack } from '~/utils';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function OperatorActionBar({ operator }) {\n    const walletAddress = useWalletAccount();\n    const isDelegatingFunds = useIsDelegatingFundsToOperator(operator.id, walletAddress);\n    const delegateFunds = useDelegateFunds();\n    const isUndelegatingFunds = useIsUndelegatingFundsToOperator(operator.id, walletAddress);\n    const undelegateFunds = useUndelegateFunds();\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const canUndelegateQuery = useQuery({\n        queryKey: [\n            'operatorActionBar',\n            currentChainId,\n            operator.id,\n            walletAddress?.toLowerCase(),\n        ],\n        async queryFn() {\n            try {\n                if (!operator.id || !walletAddress) {\n                    return false;\n                }\n                return ((await getOperatorDelegationAmount(currentChainId, operator.id, walletAddress)) > 0n);\n            }\n            catch (e) {\n                console.warn('Failed to load delegation amount', operator.id, walletAddress, e);\n            }\n            return null;\n        },\n    });\n    const canUndelegate = !!canUndelegateQuery.data;\n    const { metadata } = operator;\n    const [delegateLabel, undelegateLabel] = walletAddress?.toLowerCase() === operator.owner\n        ? ['Fund', 'Withdraw']\n        : ['Delegate', 'Undelegate'];\n    return (React.createElement(OperatorActionBarRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(OuterWrap, null,\n                React.createElement(Wrap0, null,\n                    React.createElement(NetworkActionBarBackLink, { to: R.operators(routeOptions(chainKey)), onClick: (e) => {\n                            goBack({\n                                onBeforeNavigate() {\n                                    e.preventDefault();\n                                },\n                            });\n                        } },\n                        React.createElement(NetworkActionBarBackButtonIcon, { name: \"backArrow\" })),\n                    React.createElement(NetworkActionBarTitle, null,\n                        React.createElement(OperatorAvatar, { imageUrl: metadata.imageUrl, operatorId: operator.id }),\n                        React.createElement(\"span\", null, metadata.name || operator.id))),\n                React.createElement(Wrap1, null,\n                    React.createElement(Button, { onClick: () => {\n                            delegateFunds({\n                                chainId: currentChainId,\n                                operator,\n                                wallet: walletAddress,\n                                onDone: () => {\n                                    canUndelegateQuery.refetch();\n                                },\n                            });\n                        }, \n                        // Operator contract v1 has a bug so we need to disable delegation\n                        disabled: !walletAddress || operator.contractVersion === 1, waiting: isDelegatingFunds }, delegateLabel),\n                    React.createElement(Button, { onClick: () => {\n                            undelegateFunds({\n                                chainId: currentChainId,\n                                operator,\n                                wallet: walletAddress,\n                            });\n                        }, disabled: !canUndelegate, waiting: isUndelegatingFunds }, undelegateLabel))))));\n}\nconst OperatorActionBarRoot = styled.div.withConfig({ displayName: \"OperatorActionBarRoot\", componentId: \"sc-fbifvz\" }) `\n    background: ${COLORS.Background};\n    padding-top: 32px;\n\n    @media ${TABLET} {\n        padding-top: 40px;\n    }\n\n    @media ${DESKTOP} {\n        padding-top: 72px;\n    }\n`;\nconst Wrap0 = styled.div.withConfig({ displayName: \"Wrap0\", componentId: \"sc-6n4tu8\" }) `\n    align-items: center;\n    display: flex;\n    flex-grow: 1;\n`;\nconst Wrap1 = styled.div.withConfig({ displayName: \"Wrap1\", componentId: \"sc-k7a54r\" }) `\n    gap: 8px;\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-61bkfi\" }) `\n    ${Wrap1} {\n        align-items: center;\n        display: grid;\n        grid-template-columns: 1fr 1fr;\n        margin-top: 20px;\n    }\n\n    @media ${TABLET} {\n        align-items: center;\n        display: flex;\n\n        ${Wrap1} {\n            display: flex;\n            margin-top: 0;\n        }\n    }\n`;\n","import { produce } from 'immer';\nimport { create } from 'zustand';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { onIndexedBlock } from '~/utils/blocks';\nfunction getFinalKey(chainId, key) {\n    return JSON.stringify([chainId, ...key]);\n}\nconst useBlockNumberDependenciesStore = create((set) => {\n    return {\n        dependencies: {},\n        setDependency(chainId, blockNumber, key) {\n            const finalKey = getFinalKey(chainId, key);\n            set((store) => produce(store, (draft) => {\n                draft.dependencies[finalKey] = blockNumber;\n            }));\n            onIndexedBlock(chainId, blockNumber, () => {\n                set((store) => produce(store, (draft) => {\n                    if (draft.dependencies[finalKey] !== blockNumber) {\n                        /**\n                         * Apparently the awaited block number for the given key has changed.\n                         * Usually it's a result of… scheduling a wait for a newer block.\n                         */\n                        return;\n                    }\n                    delete draft.dependencies[finalKey];\n                }));\n            });\n        },\n    };\n});\nexport function useIsWaitingForBlockNumber(key) {\n    const chainId = useCurrentChainId();\n    const { dependencies: { [getFinalKey(chainId, key)]: awaitedBlockNumber }, } = useBlockNumberDependenciesStore();\n    return awaitedBlockNumber != null;\n}\nexport function useSetBlockDependency() {\n    return useBlockNumberDependenciesStore().setDependency;\n}\n","import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';\nimport JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Hint, IconWrap } from '~/components/Hint';\nimport { Separator } from '~/components/Separator';\nimport Spinner from '~/components/Spinner';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { useOperatorByIdQuery } from '~/hooks/operators';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { useOperatorReachability } from '~/shared/stores/operatorReachability';\nimport { TABLET } from '~/shared/utils/styled';\nimport { useIsWaitingForBlockNumber } from '~/stores/blockNumberDependencies';\nimport { getBalance } from '~/utils/balance';\nimport { toBigInt } from '~/utils/bn';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function OperatorChecklist({ operatorId }) {\n    const { funded, nodesDeclared, nodesFunded, nodesReachability, nodesRunning } = useOperatorChecklist(operatorId);\n    const [reachable = 0, total = 0] = nodesReachability || [];\n    const nodesReachable = !nodesReachability\n        ? undefined\n        : reachable <= total / 2\n            ? false\n            : reachable === total\n                ? true\n                : 'caution';\n    return (React.createElement(React.Fragment, null,\n        React.createElement(ChecklistItem, { state: funded, tip: React.createElement(\"p\", null,\n                \"The owner must fund the Operator with\",\n                ' ',\n                React.createElement(SponsorshipPaymentTokenName, null),\n                \"\\u00A0 tokens before it can be used for staking on sponsorships or receiving delegations.\") }, \"Operator funded\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesDeclared, tip: React.createElement(\"p\", null, \"The owner must pair at least 1 node address with their Operator.\") }, \"Node addresses declared\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesFunded, tip: React.createElement(React.Fragment, null,\n                React.createElement(\"p\", null, \"The Operator's node address(es) must each have at least 0.1 POL tokens.\"),\n                React.createElement(\"p\", null, \"This alert triggers if a balance is less than 0.1 POL.\")) }, \"Node addresses funded\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesRunning, tip: React.createElement(\"p\", null, \"The Operator's nodes must run the operator plugin, the node's config file must contain a private key of one of the paired node addresses, and it must contain the Operator contract address.\") }, \"Nodes running\"),\n        React.createElement(Separator, null),\n        React.createElement(ChecklistItem, { state: nodesReachable, tip: React.createElement(React.Fragment, null,\n                React.createElement(\"p\", null, \"The Operator must ensure that their nodes can be reached on their node's configured WebSocket port.\"),\n                React.createElement(\"p\", null, \"The default port is 32200.\")) },\n            \"Nodes reachable\",\n            nodesReachable != null && (React.createElement(React.Fragment, null,\n                ' ',\n                \"(\",\n                reachable,\n                \" out of \",\n                total,\n                \")\")))));\n}\nfunction useOperatorChecklist(operatorId) {\n    const stale = useIsWaitingForBlockNumber(['operatorNodes', operatorId]);\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const { data: operator, isLoading, isFetching } = operatorQuery;\n    const [nodesFunded, setNodesFunded] = useState();\n    const heartbeats = useInterceptHeartbeats(operatorId);\n    const { count, isLoading: isLoadingLiveNodes } = useOperatorLiveNodes(heartbeats);\n    const nodesRunning = isLoadingLiveNodes ? undefined : count > 0;\n    const reachability = useOperatorReachability(heartbeats);\n    const nodesReachability = isLoadingLiveNodes || reachability === 'probing' ? undefined : reachability;\n    const currentChainId = useCurrentChainId();\n    useEffect(() => {\n        setNodesFunded(undefined);\n        if (!operator) {\n            return;\n        }\n        if (!operator.nodes.length) {\n            /**\n             * No nodes = no funded nodes, eh? Let's report that\n             * and cut it short!\n             */\n            return void setNodesFunded(false);\n        }\n        let mounted = true;\n        setTimeout(async () => {\n            class InsufficientFundsError {\n            }\n            let result = false;\n            try {\n                for (const { address: nodeAddress } of operator.nodes) {\n                    const balance = await getBalance({\n                        chainId: currentChainId,\n                        tokenAddress: 'native',\n                        walletAddress: nodeAddress,\n                    });\n                    if (!mounted) {\n                        return;\n                    }\n                    if (balance < toBigInt(0.1, 18n)) {\n                        throw new InsufficientFundsError();\n                    }\n                }\n                result = true;\n            }\n            catch (e) {\n                if (e instanceof InsufficientFundsError) {\n                    return;\n                }\n                console.warn('Failed to check if nodes are funded', e);\n            }\n            finally {\n                if (mounted) {\n                    setNodesFunded(result);\n                }\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [operator, currentChainId]);\n    if (isLoading || isFetching) {\n        /**\n         * We're loading the operator. Make all checklist items undefined (all TBD).\n         */\n        return {};\n    }\n    if (!operator) {\n        /**\n         * We're done loading, and found no Operator. There are no checklist\n         * items to dash out.\n         */\n        return {\n            funded: false,\n            nodesDeclared: false,\n            nodesFunded: false,\n            nodesReachability: [0, 0],\n            nodesRunning: false,\n        };\n    }\n    const funded = operator.valueWithoutEarnings > 0n;\n    if (stale) {\n        return {\n            funded,\n        };\n    }\n    const nodesDeclared = operator.nodes.length > 0;\n    return {\n        funded,\n        nodesDeclared,\n        nodesFunded,\n        nodesReachability,\n        nodesRunning,\n    };\n}\nfunction ChecklistItem({ children, state: stateProp, tip = '', }) {\n    const state = typeof stateProp === 'string'\n        ? stateProp\n        : typeof stateProp === 'undefined'\n            ? 'tbd'\n            : stateProp\n                ? 'success'\n                : 'failure';\n    return (React.createElement(ChecklistItemRoot, null,\n        React.createElement(\"div\", null,\n            state === 'failure' && (React.createElement(IconWrap, { \"$color\": \"#FF5C00\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" }))),\n            state === 'caution' && (React.createElement(IconWrap, { \"$color\": \"#FFB800\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\", size: \"medium\" }))),\n            state === 'tbd' && (React.createElement(IconWrap, null,\n                React.createElement(Spinner, { color: \"blue\" }))),\n            state === 'success' && (React.createElement(IconWrap, { \"$color\": \"#0EAC1B\" },\n                React.createElement(CheckCircleIcon, { label: \"Ok\", size: \"medium\" })))),\n        React.createElement(\"div\", null, children),\n        tip ? (React.createElement(\"div\", null,\n            React.createElement(Hint, null, tip))) : (React.createElement(React.Fragment, null))));\n}\nconst ChecklistItemRoot = styled.div.withConfig({ displayName: \"ChecklistItemRoot\", componentId: \"sc-s0s5pk\" }) `\n    align-items: center;\n    display: grid;\n    gap: 20px;\n    grid-template-columns: 24px 1fr 24px;\n    padding: 12px 24px;\n\n    @media ${TABLET} {\n        padding: 16px 40px;\n    }\n`;\n","import styled from 'styled-components';\nexport const IconButton = styled.button.withConfig({ displayName: \"IconButton\", componentId: \"sc-2h9jyl\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    padding: 0;\n\n    :active {\n        transform: translateY(1px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nexport function CopyIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"Copy\", \"$width\": 16, \"$height\": 16 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"16\", height: \"16\", viewBox: \"0 0 16 16\", fill: \"none\" },\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M5.33398 2.66665V10.6666C5.33398 11.0203 5.47446 11.3594 5.72451 11.6095C5.97456 11.8595 6.3137 12 6.66732 12H12.0007C12.3543 12 12.6934 11.8595 12.9435 11.6095C13.1935 11.3594 13.334 11.0203 13.334 10.6666V4.82798C13.334 4.65035 13.2984 4.47452 13.2295 4.31081C13.1606 4.1471 13.0597 3.99881 12.9327 3.87465L10.7227 1.71331C10.4736 1.46975 10.139 1.33336 9.79065 1.33331H6.66732C6.3137 1.33331 5.97456 1.47379 5.72451 1.72384C5.47446 1.97389 5.33398 2.31302 5.33398 2.66665Z\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M10.667 12V13.3333C10.667 13.6869 10.5265 14.0261 10.2765 14.2761C10.0264 14.5262 9.68728 14.6666 9.33366 14.6666H4.00033C3.6467 14.6666 3.30756 14.5262 3.05752 14.2761C2.80747 14.0261 2.66699 13.6869 2.66699 13.3333V5.99996C2.66699 5.64634 2.80747 5.3072 3.05752 5.05715C3.30756 4.8071 3.6467 4.66663 4.00033 4.66663H5.33366\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nexport function ExternalLinkIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"External link\", \"$width\": 14, \"$height\": 14 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\" },\n            React.createElement(\"path\", { d: \"M12.9999 4.42857V1H9.57129\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M13.0004 1L5.28613 8.71429\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M6.5 3.57141H1.78571C1.35178 3.57141 1 3.92319 1 4.35713V12.2143C1 12.6482 1.35178 13 1.78571 13H9.64286C10.0768 13 10.4286 12.6482 10.4286 12.2143V7.49998\", stroke: \"#A3A3A3\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nexport function PencilIcon() {\n    return (React.createElement(IconWrap, { \"aria-label\": \"Edit\", \"$width\": 14, \"$height\": 14 },\n        React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"14\", height: \"14\", viewBox: \"0 0 14 14\", fill: \"none\" },\n            React.createElement(\"path\", { \n                // eslint-disable-next-line max-len\n                d: \"M12.1169 1.71649C11.9402 1.54061 11.7305 1.40148 11.4998 1.30712C11.2691 1.21276 11.022 1.16504 10.7727 1.16673C10.5235 1.16842 10.277 1.21947 10.0476 1.31695C9.81822 1.41442 9.6104 1.55639 9.43617 1.73464L1.91776 9.25304L1 12.8334L4.58031 11.9151L12.0987 4.39667C12.277 4.22252 12.419 4.01475 12.5165 3.78539C12.614 3.55602 12.6651 3.30959 12.6668 3.06036C12.6685 2.81114 12.6208 2.56404 12.5264 2.33338C12.432 2.10271 12.2928 1.89304 12.1169 1.71649V1.71649Z\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M9.2207 1.94983L11.8827 4.61186\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n            React.createElement(\"path\", { d: \"M1.91797 9.2525L4.58259 11.9125\", stroke: \"#ADADAD\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))));\n}\nconst IconWrap = styled.span.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1qgkvp9\" }) `\n    align-items: center;\n    display: flex;\n    justify-content: center;\n\n    &,\n    svg {\n        display: block;\n\n        ${({ $width = 24, $height = 24 }) => css `\n            width: ${$width}px;\n            height: ${$height}px;\n        `}\n    }\n`;\nIconWrap.defaultProps = { rel: 'img ' };\n","import React from 'react';\nimport { IconButton } from '~/components/IconButton';\nimport { CopyIcon } from '~/icons';\nimport useCopy from '~/shared/hooks/useCopy';\nexport function CopyButton({ value = '' }) {\n    const { copy } = useCopy();\n    return (React.createElement(IconButton, { type: \"button\", onClick: () => void copy(value) },\n        React.createElement(CopyIcon, null)));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Buttonesque } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport { CopyButton } from '~/components/CopyButton';\nimport { FallbackImage } from '~/components/FallbackImage';\nimport { LayoutColumn } from '~/components/Layout';\nimport { PropertyDisplay, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { Separator } from '~/components/Separator';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { Tooltip } from '~/components/Tooltip';\nimport Identicon from '~/shared/components/AvatarImage/Identicon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, DESKTOP, MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function OperatorDetails({ operator }) {\n    const { metadata } = operator;\n    const chainId = useCurrentChainId();\n    const walletAddress = useWalletAccount();\n    const canEdit = !!walletAddress && walletAddress == operator.owner;\n    return (React.createElement(OperatorDetailsRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(ColoredBox, { \"$backgroundColor\": COLORS.Text },\n                React.createElement(OuterWrap, null,\n                    React.createElement(OperatorAvatarWrap, null,\n                        React.createElement(\"div\", null,\n                            React.createElement(FallbackImage, { alt: operator.id, src: metadata.imageUrl || '', placeholder: React.createElement(Identicon, { id: operator.id, size: 400 }) }))),\n                    React.createElement(OperatorMetadataWrap, null,\n                        React.createElement(InnerWrap, { \"$noDesc\": !metadata.description },\n                            React.createElement(\"h2\", null, metadata.name || operator.id),\n                            React.createElement(\"div\", null,\n                                React.createElement(\"p\", null, metadata.description)),\n                            React.createElement(PropertyDropdownList, null,\n                                metadata.url && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"web\" }), displayValue: metadata.url\n                                        .replace(/^https?:\\/\\//, '')\n                                        .replace(/\\/+$/, ''), href: metadata.url })),\n                                metadata.email && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"email\" }), displayValue: metadata.email, href: `mailto:${metadata.email}` })),\n                                metadata.twitter && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": \"#1da1f2\" }), href: metadata.twitter })),\n                                metadata.x && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"xCom\", \"$color\": \"#ffffff\" }), href: metadata.x })),\n                                metadata.telegram && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": \"#2aabee\" }), href: metadata.telegram })),\n                                metadata.reddit && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": \"#ff5700\" }), href: metadata.reddit })),\n                                metadata.linkedIn && (React.createElement(PropertyDisplay, { dark: true, icon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": \"#0077b5\" }), href: metadata.linkedIn })))),\n                        React.createElement(Addresses, null,\n                            React.createElement(AddressDisplay, { label: \"Owner wallet\", value: operator.owner }),\n                            React.createElement(Separator, null),\n                            React.createElement(AddressDisplay, { label: React.createElement(React.Fragment, null,\n                                    React.createElement(\"div\", null, \"Operator contract\"),\n                                    React.createElement(OperatorVersionBadge, null,\n                                        \"v\",\n                                        operator.contractVersion)), value: operator.id })))),\n                React.createElement(Actions, null,\n                    React.createElement(CtaWrap, null, canEdit && (React.createElement(Buttonesque, { onClick: () => {\n                            saveOperator(chainId, operator);\n                        }, \"$css\": css `\n                                        --border: 1px solid currentColor;\n                                        --borderRadius: 4px;\n                                        --hoverBorder: 1px solid #ffffff;\n                                        --color: #a3a3a3;\n                                        --hoverColor: #ffffff;\n\n                                        display: flex;\n                                        padding: 0 10px;\n                                    ` }, \"Edit operator\"))),\n                    React.createElement(\"div\", null,\n                        React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                                \"Operators run Streamr nodes that contribute bandwidth to\\u00A0the Streamr Network. Operators earn \",\n                                React.createElement(SponsorshipPaymentTokenName, null),\n                                \" tokens by\\u00A0staking on Sponsorships.\") },\n                            React.createElement(InfoWrap, null,\n                                React.createElement(\"svg\", { width: \"20\", height: \"21\", viewBox: \"0 0 20 21\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                                    React.createElement(\"path\", { \n                                        // eslint-disable-next-line max-len\n                                        d: \"M10 0.958009C4.47715 0.958009 -1.35705e-06 5.43516 -8.74228e-07 10.958C-3.91405e-07 16.4809 4.47715 20.958 10 20.958C15.5228 20.958 20 16.4809 20 10.958C20 5.43516 15.5228 0.958008 10 0.958009Z\", fill: \"#525252\" }),\n                                    React.createElement(\"path\", { d: \"M10 9.39648L10 15.958\", stroke: \"white\", strokeWidth: \"1.5\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }),\n                                    React.createElement(\"path\", { d: \"M10 6.39648L10 6.44763\", stroke: \"white\", strokeWidth: \"2\", strokeLinecap: \"round\", strokeLinejoin: \"round\" }))))))))));\n}\nconst InfoWrap = styled.div.withConfig({ displayName: \"InfoWrap\", componentId: \"sc-15c53x4\" }) `\n    padding: 4px;\n    pointer-events: auto;\n`;\nconst Actions = styled.div.withConfig({ displayName: \"Actions\", componentId: \"sc-el76ha\" }) `\n    align-items: center;\n    border-top: 1px solid #525252;\n    box-sizing: content-box;\n    display: flex;\n    height: 32px;\n    padding: 16px;\n    pointer-events: none;\n\n    @media ${DESKTOP} {\n        border: 0;\n        padding: 24px;\n        position: absolute;\n        right: 0;\n        flex-direction: column;\n        top: 0;\n        align-items: end;\n        height: 100%;\n        box-sizing: border-box;\n    }\n`;\nconst CtaWrap = styled.div.withConfig({ displayName: \"CtaWrap\", componentId: \"sc-mj8f4b\" }) `\n    flex-grow: 1;\n\n    ${Buttonesque} {\n        pointer-events: auto;\n    }\n`;\nconst OperatorDetailsRoot = styled.div.withConfig({ displayName: \"OperatorDetailsRoot\", componentId: \"sc-1hqn9ht\" }) `\n    background: ${COLORS.Background};\n    padding-top: 32px;\n\n    ${ColoredBox} {\n        color: ${COLORS.Background};\n        position: relative;\n    }\n`;\nconst SideImageMq = '(min-width: 660px)';\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-tdbgo\" }) `\n    padding: 20px;\n    margin: 0 auto;\n\n    @media ${SideImageMq} {\n        display: flex;\n        gap: 20px;\n        max-width: none;\n    }\n\n    @media ${TABLET} {\n        padding: 24px;\n        gap: 24px;\n    }\n\n    @media ${DESKTOP} {\n        padding: 40px;\n        gap: 40px;\n    }\n`;\nconst OperatorAvatarWrap = styled.div.withConfig({ displayName: \"OperatorAvatarWrap\", componentId: \"sc-14vxxmi\" }) `\n    flex-shrink: 0;\n    margin: 0 auto;\n\n    @media ${SideImageMq} {\n        margin: 0;\n        max-width: 348px;\n        width: 30%;\n    }\n\n    > div {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n        aspect-ratio: 1 / 1;\n        background: #000000;\n        border-radius: 10px;\n        overflow: hidden;\n    }\n\n    img {\n        max-width: 100%;\n        display: block;\n    }\n`;\nconst OperatorMetadataWrap = styled.div.withConfig({ displayName: \"OperatorMetadataWrap\", componentId: \"sc-ukvcpq\" }) `\n    display: flex;\n    flex-direction: column;\n    gap: 32px;\n    margin-top: 24px;\n    min-width: 0;\n\n    @media ${SideImageMq} {\n        margin: 0;\n    }\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1omiqyu\" }) `\n    flex-grow: 1;\n\n    h2 {\n        font-size: 24px;\n        font-weight: ${MEDIUM};\n        letter-spacing: 0.01em;\n        line-height: 30px;\n        margin-bottom: 16px;\n    }\n\n    ${PropertyDropdownList} {\n        margin-top: 16px;\n    }\n\n    @media ${SideImageMq} {\n        h2 + div {\n            padding-right: 112px;\n        }\n    }\n\n    h2 {\n        display: none;\n    }\n\n    p {\n        margin: 0;\n        line-height: 1.5em;\n        word-wrap: break-word;\n    }\n\n    ${({ $noDesc = false }) => $noDesc &&\n    css `\n            display: none;\n        `}\n\n    @media ${TABLET} {\n        display: block;\n\n        h2 {\n            display: block;\n        }\n    }\n`;\nconst InlineAddressesMq = '(min-width: 832px)';\nconst Addresses = styled.div.withConfig({ displayName: \"Addresses\", componentId: \"sc-bl6nym\" }) `\n    display: flex;\n    flex-direction: column;\n    gap: 24px;\n\n    ${Separator} {\n        background: #525252;\n        display: none;\n        height: 48px;\n        width: 1px;\n    }\n\n    @media ${InlineAddressesMq} {\n        align-items: center;\n        flex-direction: row;\n        gap: 48px;\n\n        ${Separator} {\n            display: block;\n        }\n    }\n`;\nconst AddressDisplayRoot = styled.div.withConfig({ displayName: \"AddressDisplayRoot\", componentId: \"sc-19o3537\" }) ``;\nconst AddressDisplayLabel = styled.div.withConfig({ displayName: \"AddressDisplayLabel\", componentId: \"sc-1xnzbaz\" }) `\n    align-items: center;\n    color: #a3a3a3;\n    display: flex;\n    font-size: 14px;\n    gap: 6px;\n    letter-spacing: 0.01em;\n    line-height: normal;\n`;\nconst AddressDisplayValue = styled.div.withConfig({ displayName: \"AddressDisplayValue\", componentId: \"sc-dkw7lt\" }) `\n    align-items: center;\n    display: flex;\n    font-size: 20px;\n    gap: 12px;\n    letter-spacing: 0.01em;\n    line-height: normal;\n    margin-top: 6px;\n`;\nfunction AddressDisplay({ label, value }) {\n    return (React.createElement(AddressDisplayRoot, null,\n        React.createElement(AddressDisplayLabel, null, label),\n        React.createElement(AddressDisplayValue, null,\n            React.createElement(\"div\", null, truncate(value)),\n            React.createElement(CopyButton, { value: value }))));\n}\nconst OperatorVersionBadge = styled.div.withConfig({ displayName: \"OperatorVersionBadge\", componentId: \"sc-xc683f\" }) `\n    background: #525252;\n    color: ${COLORS.Background};\n    font-size: 11px;\n    font-weight: ${MEDIUM};\n    padding: 1px 5px;\n    border-radius: 6px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Hint } from '~/components/Hint';\nimport { LayoutColumn } from '~/components/Layout';\nimport Spinner from '~/components/Spinner';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { getSelfDelegationFraction, getSpotApy } from '~/getters';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport useOperatorLiveNodes from '~/hooks/useOperatorLiveNodes';\nimport { COLORS } from '~/shared/utils/styled';\nexport function OperatorSummary({ operator }) {\n    const ownerDelegationPercentage = useMemo(() => getSelfDelegationFraction(operator).multipliedBy(100), [operator]);\n    const heartbeats = useInterceptHeartbeats(operator.id);\n    const { count: liveNodeCount, isLoading: liveNodeCountIsLoading } = useOperatorLiveNodes(heartbeats);\n    return (React.createElement(OperatorSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(StatGrid, null,\n                React.createElement(StatCell, { label: \"Total stake\", tip: React.createElement(React.Fragment, null, operator.valueWithoutEarnings === 0n ? (React.createElement(Tooltip, { content: React.createElement(\"p\", null,\n                            \"The owner must fund the Operator with\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens before it can be used for staking on sponsorships or receiving delegations.\") },\n                        React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                            React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })))) : (React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The total amount of\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that are staked on the Operator, including deployed and undeployed tokens.\")))) },\n                    React.createElement(\"div\", null,\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.valueWithoutEarnings }))),\n                React.createElement(StatCell, { label: \"Deployed stake\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The amount of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that the Operator has staked on Sponsorships.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.totalStakeInSponsorshipsWei })),\n                React.createElement(StatCell, { label: \"Owner's stake\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The percentage of stake supplied from the owner of the Operator.\")) },\n                    ownerDelegationPercentage.toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Node redundancy\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The amount of duplicated work when running a fleet of multiple nodes.\"),\n                        React.createElement(\"p\", null, \"Doing redundant work protects against slashing in case some of your nodes experience failures. For example,\"),\n                        React.createElement(\"ul\", null,\n                            React.createElement(\"li\", null,\n                                React.createElement(\"strong\", null, \"A Redundancy Factor of 1\"),\n                                \" means that no duplication of work occurs (the feature is off),\"),\n                            React.createElement(\"li\", null,\n                                React.createElement(\"strong\", null, \"A Redundancy Factor of 2\"),\n                                \" means that each stream assignment will be worked on by 2 nodes in the fleet.\"))) }, operator.metadata.redundancyFactor || 1),\n                React.createElement(StatCell, { label: \"Owner's cut\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The fee that the owner of the Operator takes from all earnings.\"),\n                        React.createElement(\"p\", null, \"The remaining earnings are distributed among all stakeholders in the Operator, which includes delegators and the owner, in proportion to the size of their respective stakes.\")) },\n                    operator.operatorsCut,\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Spot APY\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The annualized yield that this Operator is earning right now, calculated from the\\u00A0present payout rates of the Sponsorships the Operator is currently\\u00A0staked in.\")) },\n                    (getSpotApy(operator) * 100).toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Cumulative earnings\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The total earnings that this Operator has accumulated over its whole\\u00A0lifetime.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: operator.cumulativeProfitsWei +\n                            operator.cumulativeOperatorsCutWei })),\n                React.createElement(StatCell, { label: \"Live nodes\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The number of online nodes detected that are doing work for this Operator.\")) }, liveNodeCountIsLoading ? (React.createElement(Spinner, { color: \"blue\" })) : (liveNodeCount.toString()))))));\n}\nconst OperatorSummaryRoot = styled.div.withConfig({ displayName: \"OperatorSummaryRoot\", componentId: \"sc-8804st\" }) `\n    background: ${COLORS.Background};\n    padding: 24px 0;\n`;\n","import moment from 'moment';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport Spinner from '~/components/Spinner';\nimport { FundedUntilCell, StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { useCollectEarnings } from '~/hooks/operators';\nimport { useEditSponsorshipFunding } from '~/hooks/sponsorships';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useCanCollectEarningsCallback, useUncollectedEarnings, } from '~/shared/stores/uncollectedEarnings';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function SponsorshipTable({ operator, isController, }) {\n    const canCollect = useCanCollectEarningsCallback();\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const collectEarnings = useCollectEarnings();\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const allSponsorshipIds = operator.stakes.map(({ sponsorshipId }) => sponsorshipId);\n    const canCollectAllEarnings = allSponsorshipIds.every((sponsorshipId) => canCollect(operator.id, sponsorshipId));\n    return (React.createElement(ScrollTable, { elements: operator.stakes, columns: [\n            {\n                displayName: 'Stream ID',\n                valueMapper: ({ streamId }) => React.createElement(StreamIdCell, { streamId: streamId }),\n                align: 'start',\n                isSticky: true,\n                key: 'streamId',\n            },\n            {\n                displayName: 'Staked',\n                valueMapper: (element) => {\n                    const minimumStakeReachTime = moment(element.joinedAt.getTime() +\n                        element.minimumStakingPeriodSeconds * 1000);\n                    return (React.createElement(React.Fragment, null,\n                        React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amountWei }),\n                        minimumStakeReachTime.isAfter(Date.now()) && (React.createElement(Tooltip, { content: React.createElement(React.Fragment, null,\n                                \"Minimum stake period:\",\n                                ' ',\n                                minimumStakeReachTime.fromNow(true),\n                                \" left\") },\n                            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ADADAD\", \"$svgSize\": {\n                                    width: '18px',\n                                    height: '18px',\n                                } },\n                                React.createElement(SvgIcon, { name: \"lockClosed\" }))))));\n                },\n                align: 'start',\n                isSticky: false,\n                key: 'staked',\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${element.spotAPY.multipliedBy(100).toFixed(0)}%`,\n                align: 'start',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Funded until',\n                valueMapper: (element) => (React.createElement(FundedUntilCell, { projectedInsolvencyAt: element.projectedInsolvencyAt, remainingBalance: element.remainingWei })),\n                align: 'start',\n                isSticky: false,\n                key: 'fundedUntil',\n            },\n            {\n                displayName: 'Uncollected earnings',\n                valueMapper: (element) => (React.createElement(UncollectedEarnings, { operatorId: operator.id, sponsorshipId: element.sponsorshipId })),\n                align: 'end',\n                isSticky: false,\n                key: 'earnings',\n            },\n        ], linkMapper: ({ sponsorshipId: id }) => R.sponsorship(id, routeOptions(chainKey)), actions: [\n            (element) => ({\n                displayName: 'Edit',\n                disabled: !isController,\n                async callback() {\n                    if (!operator) {\n                        return;\n                    }\n                    editSponsorshipFunding({\n                        chainId: currentChainId,\n                        sponsorshipOrSponsorshipId: element.sponsorshipId,\n                        operator,\n                    });\n                },\n            }),\n            (element) => ({\n                displayName: 'Collect earnings',\n                callback() {\n                    if (!operator.id) {\n                        return;\n                    }\n                    collectEarnings({\n                        chainId: currentChainId,\n                        operatorId: operator.id,\n                        sponsorshipIds: [element.sponsorshipId],\n                    });\n                },\n                disabled: !canCollect(operator.id, element.sponsorshipId),\n            }),\n        ], footerComponent: allSponsorshipIds.length > 0 &&\n            canCollectAllEarnings && (React.createElement(Footer, null,\n            React.createElement(Button, { kind: \"secondary\", onClick: async () => {\n                    collectEarnings({\n                        chainId: currentChainId,\n                        operatorId: operator.id,\n                        sponsorshipIds: allSponsorshipIds,\n                    });\n                } }, \"Collect all\"))) }));\n}\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-nke2vt\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\nfunction UncollectedEarnings({ operatorId, sponsorshipId, }) {\n    const value = useUncollectedEarnings(operatorId, sponsorshipId);\n    return typeof value !== 'undefined' ? (React.createElement(SponsorshipDecimals, { abbr: true, amount: value?.uncollectedEarnings || 0n })) : (React.createElement(Spinner, { color: \"blue\" }));\n}\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport moment from 'moment';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { calculateUndelegationQueueSize, getDelegatedAmountForWallet } from '~/getters';\nimport { useConfigValueFromChain } from '~/hooks';\nimport { useForceUndelegate, useOperatorByIdQuery, useProcessUndelegationQueue, } from '~/hooks/operators';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { useCurrentChainId } from '~/utils/chains';\nfunction getUndelegationExpirationDate(queuedAt, maxUndelegationQueueSeconds = 0) {\n    return moment(queuedAt.getTime() + maxUndelegationQueueSeconds * 1000);\n}\nexport function UndelegationQueue({ operatorId }) {\n    const currentChainId = useCurrentChainId();\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const operator = operatorQuery.data || null;\n    const walletAddress = useWalletAccount();\n    const maxUndelegationQueueSeconds = useConfigValueFromChain('maxQueueSeconds', Number);\n    const forceUndelegate = useForceUndelegate();\n    const processUndelegationQueue = useProcessUndelegationQueue();\n    const freeFunds = operator?.dataTokenBalanceWei;\n    const undelegationQueueSize = operator != null ? calculateUndelegationQueueSize(operator) : undefined;\n    const isProcessButtonDisabled = freeFunds != null &&\n        undelegationQueueSize != null &&\n        freeFunds < undelegationQueueSize;\n    const ProcessQueueButton = () => (React.createElement(Button, { kind: \"secondary\", disabled: isProcessButtonDisabled, onClick: () => {\n            if (operatorId == null) {\n                return;\n            }\n            processUndelegationQueue(currentChainId, operatorId);\n        } }, \"Process queue\"));\n    if (operator == null) {\n        return null;\n    }\n    return (React.createElement(ScrollTable, { elements: operator.queueEntries, columns: [\n            {\n                displayName: 'Delegator address',\n                valueMapper: (element) => (React.createElement(React.Fragment, null,\n                    truncate(element.delegator),\n                    element.delegator === walletAddress?.toLowerCase() && (React.createElement(Badge, null, \"You\")))),\n                align: 'start',\n                isSticky: true,\n                key: 'id',\n            },\n            {\n                displayName: 'Amount',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: ((a, b) => (a < b ? a : b))(getDelegatedAmountForWallet(element.delegator, operator), element.amount) })),\n                align: 'end',\n                isSticky: false,\n                key: 'amount',\n            },\n            {\n                displayName: 'Expiration date',\n                valueMapper: (element) => {\n                    const expirationDate = getUndelegationExpirationDate(element.queuedAt, maxUndelegationQueueSeconds);\n                    return (React.createElement(WarningCell, null,\n                        expirationDate.format('YYYY-MM-DD'),\n                        expirationDate.isBefore(Date.now()) && (React.createElement(Tooltip, { content: React.createElement(\"p\", null, \"Payout time exceeded. You can force unstake now.\") },\n                            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" }))))));\n                },\n                align: 'start',\n                isSticky: false,\n                key: 'date',\n            },\n            {\n                displayName: 'Request date',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, moment(element.queuedAt).format('YYYY-MM-DD'))),\n                align: 'end',\n                isSticky: false,\n                key: 'requestDate',\n            },\n            {\n                displayName: 'Request time',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, moment(element.queuedAt).format('HH:mm'))),\n                align: 'end',\n                isSticky: false,\n                key: 'requestTime',\n            },\n            {\n                displayName: '',\n                valueMapper: (element) => (React.createElement(React.Fragment, null, getUndelegationExpirationDate(element.queuedAt, maxUndelegationQueueSeconds).isBefore(Date.now()) && (React.createElement(Button, { type: \"button\", kind: \"secondary\", onClick: () => {\n                        forceUndelegate(currentChainId, operator, element.amount);\n                    } }, \"Force unstake\")))),\n                align: 'end',\n                isSticky: false,\n                key: 'actions',\n            },\n        ], footerComponent: operator.queueEntries.length > 0 ? (React.createElement(Footer, null, isProcessButtonDisabled ? (React.createElement(Tooltip, { content: \"The Operator needs to unstake to free up funds to pay out the queue\" },\n            React.createElement(ProcessQueueButton, null))) : (React.createElement(ProcessQueueButton, null)))) : null }));\n}\nconst Badge = styled.div.withConfig({ displayName: \"Badge\", componentId: \"sc-1hze28r\" }) `\n    border-radius: 8px;\n    background: ${COLORS.secondary};\n    color: ${COLORS.primaryLight};\n    font-size: 14px;\n    font-weight: ${MEDIUM};\n    line-height: 30px;\n    letter-spacing: 0.14px;\n    padding: 0px 10px;\n    margin-left: 12px;\n`;\nconst WarningCell = styled.div.withConfig({ displayName: \"WarningCell\", componentId: \"sc-d942ha\" }) `\n    align-items: center;\n    display: grid;\n    gap: 8px;\n    grid-template-columns: auto auto;\n\n    ${TooltipIconWrap} svg {\n        width: 18px;\n        height: 18px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-e7rhuc\" }) `\n    display: flex;\n    justify-content: right;\n    padding: 32px;\n    gap: 10px;\n`;\n","import JiraFailedBuildStatusIcon from '@atlaskit/icon/glyph/jira/failed-build-status';\nimport { useQuery } from '@tanstack/react-query';\nimport moment from 'moment';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { AddressTable, AddressType, useSubmitControllerAddressesCallback, useSubmitNodeAddressesCallback, } from '~/components/AddressTable';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport { Hint } from '~/components/Hint';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { Separator } from '~/components/Separator';\nimport { StatCellContent, StatCellLabel } from '~/components/StatGrid';\nimport { StreamIdCell } from '~/components/Table';\nimport { Tooltip, TooltipIconWrap } from '~/components/Tooltip';\nimport { getDelegatedAmountForWallet, getDelegationFractionForWallet } from '~/getters';\nimport { getOperatorStats } from '~/getters/getOperatorStats';\nimport { useConfigValueFromChain, useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { invalidateActiveOperatorByIdQueries, useOperatorByIdQuery, } from '~/hooks/operators';\nimport { useSponsorshipTokenInfo } from '~/hooks/sponsorships';\nimport { useInterceptHeartbeats } from '~/hooks/useInterceptHeartbeats';\nimport { LiveNodesTable } from '~/pages/OperatorPage/LiveNodesTable';\nimport { OperatorActionBar } from '~/pages/OperatorPage/OperatorActionBar';\nimport { OperatorChecklist } from '~/pages/OperatorPage/OperatorChecklist';\nimport { OperatorDetails } from '~/pages/OperatorPage/OperatorDetails';\nimport { OperatorSummary } from '~/pages/OperatorPage/OperatorSummary';\nimport { SponsorshipTable } from '~/pages/OperatorPage/SponsorshipTable';\nimport { UndelegationQueue } from '~/pages/OperatorPage/UndelegationQueue';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport { useSetBlockDependency } from '~/stores/blockNumberDependencies';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { onIndexedBlock } from '~/utils/blocks';\nimport { toBN, toBigInt, toFloat } from '~/utils/bn';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nconst defaultChartData = [];\nconst defaultPersistedNodes = [];\nconst defaultPersistedControllers = [];\nexport const OperatorPage = () => {\n    const operatorId = useParams().id;\n    const operatorQuery = useOperatorByIdQuery(operatorId);\n    const operator = operatorQuery.data || null;\n    const initialBehindBlockError = useInitialBehindIndexError(operatorQuery, [\n        operatorId,\n    ]);\n    useRefetchQueryBehindIndexEffect(operatorQuery);\n    const behindBlockError = useLatestBehindBlockError(operatorQuery);\n    const isFetching = operatorQuery.isLoading || operatorQuery.isFetching || !!behindBlockError;\n    const walletAddress = useWalletAccount();\n    const slashingFraction = useConfigValueFromChain('slashingFraction', (value) => toFloat(value, 18n)) ??\n        null;\n    const minimumStakeWei = useConfigValueFromChain('minimumStakeWei');\n    const isOwner = walletAddress != null &&\n        operator != null &&\n        walletAddress.toLowerCase() === operator.owner.toLowerCase();\n    const isController = walletAddress != null &&\n        operator != null &&\n        operator.controllers.some((c) => c.address.toLowerCase() === walletAddress.toLowerCase());\n    const { symbol: tokenSymbol = 'DATA' } = useSponsorshipTokenInfo() || {};\n    const [selectedDataSource, setSelectedDataSource] = useState('cumulativeEarnings');\n    const currentChainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const earliestUndelegationTimestamp = operator?.delegations.find((d) => d.delegator.toLowerCase() === walletAddress?.toLowerCase())?.earliestUndelegationTimestamp;\n    const [selectedPeriod, setSelectedPeriod] = useState(ChartPeriod.ThreeMonths);\n    const chartQuery = useQuery({\n        queryKey: [\n            'operatorChartQuery',\n            currentChainId,\n            operatorId,\n            selectedPeriod,\n            selectedDataSource,\n        ],\n        queryFn: async () => {\n            try {\n                if (!operatorId) {\n                    return [];\n                }\n                return await getOperatorStats(currentChainId, operatorId, selectedPeriod, selectedDataSource, { force: true, ignoreToday: false });\n            }\n            catch (_) {\n                errorToast({ title: 'Could not load operator chart data' });\n                return [];\n            }\n        },\n    });\n    const { data: chartData = defaultChartData } = chartQuery;\n    const myDelegationAmount = useMemo(() => {\n        if (!walletAddress || !operator) {\n            return 0n;\n        }\n        return getDelegatedAmountForWallet(walletAddress, operator);\n    }, [operator, walletAddress]);\n    const myDelegationPercentage = useMemo(() => {\n        if (!walletAddress || !operator) {\n            return toBN(0);\n        }\n        return getDelegationFractionForWallet(walletAddress, operator).multipliedBy(100);\n    }, [walletAddress, operator]);\n    const chartLabel = selectedDataSource === 'cumulativeEarnings'\n        ? 'Cumulative earnings'\n        : 'Total stake';\n    const { nodes: persistedNodes = defaultPersistedNodes } = operator || {};\n    const [nodes, setNodes] = useState(persistedNodes);\n    useEffect(() => void setNodes(persistedNodes), [persistedNodes]);\n    const [saveNodeAddresses, isSavingNodeAddresses] = useSubmitNodeAddressesCallback();\n    const { controllers: persistedControllers = defaultPersistedControllers } = operator || {};\n    const [controllers, setControllers] = useState(persistedControllers);\n    useEffect(() => void setControllers(persistedControllers), [persistedControllers]);\n    const [saveControllers, isSavingControllerAddresses] = useSubmitControllerAddressesCallback();\n    const setBlockDependency = useSetBlockDependency();\n    const heartbeats = useInterceptHeartbeats(operator?.id);\n    const saveNodeAddressesCb = useCallback(async (addresses) => {\n        if (!operatorId) {\n            return;\n        }\n        const chainId = currentChainId;\n        try {\n            await saveNodeAddresses(chainId, operatorId, addresses, {\n                onSuccess(blockNumber) {\n                    setNodes((current) => {\n                        const newAddresses = [];\n                        current.forEach((node) => {\n                            if (node.enabled) {\n                                newAddresses.push({\n                                    ...node,\n                                    persisted: true,\n                                });\n                            }\n                        });\n                        return newAddresses;\n                    });\n                    setBlockDependency(chainId, blockNumber, [\n                        'operatorNodes',\n                        operatorId,\n                    ]);\n                    onIndexedBlock(chainId, blockNumber, () => {\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    });\n                },\n                onReject() {\n                    // Undo changes\n                    setNodes((current) => current\n                        .filter((val) => val.persisted === true)\n                        .map((n) => ({\n                        ...n,\n                        enabled: true,\n                    })));\n                },\n                onError() {\n                    errorToast({\n                        title: 'Failed to save the new node addresses',\n                    });\n                },\n            });\n        }\n        catch (_) { }\n    }, [currentChainId, operatorId, saveNodeAddresses, setBlockDependency]);\n    const saveControllerAddressesCb = useCallback(async (address, isNew) => {\n        if (!operatorId) {\n            return;\n        }\n        const chainId = currentChainId;\n        try {\n            await saveControllers(chainId, operatorId, address, isNew, {\n                onSuccess(blockNumber) {\n                    setControllers((current) => {\n                        const newAddresses = [];\n                        current.forEach((node) => {\n                            if (node.enabled) {\n                                newAddresses.push({\n                                    ...node,\n                                    persisted: true,\n                                });\n                            }\n                        });\n                        return newAddresses;\n                    });\n                    setBlockDependency(chainId, blockNumber, [\n                        'operatorNodes',\n                        operatorId,\n                    ]);\n                    onIndexedBlock(chainId, blockNumber, () => {\n                        invalidateActiveOperatorByIdQueries(chainId, operatorId);\n                    });\n                },\n                onReject() {\n                    // Undo changes\n                    setControllers((current) => current\n                        .filter((val) => val.persisted === true)\n                        .map((n) => ({\n                        ...n,\n                        enabled: true,\n                    })));\n                },\n                onError() {\n                    errorToast({\n                        title: 'Failed to save the new controllers',\n                    });\n                },\n            });\n        }\n        catch (_) { }\n    }, [currentChainId, operatorId, saveControllers, setBlockDependency]);\n    const fullChainName = useCurrentChainFullName();\n    const placeholder = behindBlockError ? (React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })) : !isFetching ? (React.createElement(NoData, { firstLine: `Operator not found on the ${fullChainName} chain.` })) : null;\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Operator\" }),\n        React.createElement(LoadingIndicator, { loading: isFetching }),\n        !!operator && (React.createElement(React.Fragment, null,\n            React.createElement(OperatorActionBar, { operator: operator }),\n            React.createElement(OperatorDetails, { operator: operator }),\n            React.createElement(OperatorSummary, { operator: operator }),\n            React.createElement(OperatorVersionNotice, { version: operator.contractVersion }))),\n        React.createElement(LayoutColumn, null, operator == null ? (placeholder) : (React.createElement(SegmentGrid, null,\n            React.createElement(ChartGrid, null,\n                React.createElement(NetworkPageSegment, { title: \"Overview charts\" },\n                    React.createElement(Pad, null,\n                        React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: selectedPeriod, onChange: setSelectedPeriod }), sourceTabs: React.createElement(Tabs, { selection: selectedDataSource, onSelectionChange: (dataSource) => {\n                                    if (dataSource !== 'totalValue' &&\n                                        dataSource !==\n                                            'cumulativeEarnings') {\n                                        return;\n                                    }\n                                    setSelectedDataSource(dataSource);\n                                } },\n                                React.createElement(Tab, { id: \"cumulativeEarnings\" }, \"Cumulative earnings\"),\n                                React.createElement(Tab, { id: \"totalValue\" }, \"Total stake\")) },\n                            React.createElement(NetworkChart, { isLoading: chartQuery.isLoading ||\n                                    chartQuery.isFetching, tooltipValuePrefix: chartLabel, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: abbr, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: (value) => tooltipValueFormatter(value, tokenSymbol) })))),\n                React.createElement(\"div\", null,\n                    React.createElement(SegmentGrid, null,\n                        React.createElement(NetworkPageSegment, { title: isOwner ? 'My stake' : 'My delegation' }, walletAddress ? (React.createElement(React.Fragment, null,\n                            React.createElement(DelegationCell, null,\n                                React.createElement(Pad, null,\n                                    React.createElement(StatCellLabel, null,\n                                        \"Current stake\",\n                                        operator.contractVersion >\n                                            0 &&\n                                            earliestUndelegationTimestamp !=\n                                                null &&\n                                            earliestUndelegationTimestamp *\n                                                1000 >\n                                                Date.now() && (React.createElement(Tooltip, { content: React.createElement(React.Fragment, null,\n                                                \"You can not undelegate because your minimum delegation period is still active. It will expire on\",\n                                                ' ',\n                                                moment(earliestUndelegationTimestamp *\n                                                    1000).format('YYYY-MM-DD HH:mm'),\n                                                \".\") },\n                                            React.createElement(TooltipIconWrap, { className: \"ml-1\", \"$color\": \"#ADADAD\", \"$svgSize\": {\n                                                    width: '18px',\n                                                    height: '18px',\n                                                } },\n                                                React.createElement(SvgIcon, { name: \"lockClosed\" }))))),\n                                    React.createElement(StatCellContent, null,\n                                        React.createElement(SponsorshipDecimals, { abbr: true, amount: myDelegationAmount })))),\n                            React.createElement(Separator, null),\n                            React.createElement(DelegationCell, null,\n                                React.createElement(Pad, null,\n                                    React.createElement(StatCellLabel, null, \"Share of Operator's total stake\"),\n                                    React.createElement(StatCellContent, null,\n                                        myDelegationPercentage.toFixed(0),\n                                        \"%\"))))) : (React.createElement(Pad, null, \"Connect your wallet to show your delegation.\"))),\n                        React.createElement(NetworkPageSegment, { title: \"Operator status\" },\n                            React.createElement(OperatorChecklist, { operatorId: operatorId }))))),\n            React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(TitleBar, { label: operator.stakes.length }, \"Sponsorships\") },\n                React.createElement(SponsorshipTable, { operator: operator, isController: isController })),\n            React.createElement(NetworkPageSegment, { title: \"Undelegation queue\" },\n                React.createElement(UndelegationQueue, { operatorId: operatorId })),\n            React.createElement(NetworkPageSegment, { foot: true, title: \"Slashing history\" },\n                React.createElement(SlashingHistoryTableContainer, null,\n                    React.createElement(ScrollTable, { elements: operator.slashingEvents.sort((a, b) => b.date - a.date), columns: [\n                            {\n                                displayName: 'Stream ID',\n                                valueMapper: ({ streamId }) => (React.createElement(StreamIdCell, { streamId: streamId })),\n                                align: 'start',\n                                isSticky: true,\n                                key: 'id',\n                            },\n                            {\n                                displayName: 'Date',\n                                valueMapper: (element) => moment(element.date * 1000).format('YYYY-MM-DD HH:mm'),\n                                align: 'start',\n                                isSticky: false,\n                                key: 'date',\n                            },\n                            {\n                                displayName: 'Slashed',\n                                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amount })),\n                                align: 'start',\n                                isSticky: false,\n                                key: 'slashed',\n                            },\n                            {\n                                displayName: 'Reason',\n                                valueMapper: (element) => {\n                                    if (slashingFraction == null ||\n                                        minimumStakeWei == null) {\n                                        return '';\n                                    }\n                                    if (element.amount <\n                                        toBigInt(slashingFraction.multipliedBy(toBN(minimumStakeWei)))) {\n                                        return 'False flag';\n                                    }\n                                    return 'Normal slashing';\n                                },\n                                align: 'start',\n                                isSticky: false,\n                                key: 'reason',\n                            },\n                        ], linkMapper: ({ sponsorshipId: id }) => R.sponsorship(id, routeOptions(chainKey)) }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(NodeAddressHeader, null,\n                    React.createElement(\"span\", null, \"Operator's node addresses\"),\n                    ' ',\n                    React.createElement(\"div\", null,\n                        React.createElement(Hint, null,\n                            React.createElement(\"p\", null, \"Your nodes need wallets for smart contract interactions. Generate Ethereum wallets using your tool of choice, add the private key to your node's config file, and add the corresponding address here. You can run multiple nodes with the same address/private\\u00A0key.\"),\n                            React.createElement(\"p\", null, \"Each node address should be supplied with some POL on Polygon chain for\\u00A0gas.\")))) },\n                React.createElement(AddressTable, { type: AddressType.Node, busy: isSavingNodeAddresses, value: nodes, onChange: setNodes, onAddAddress: async (address) => {\n                        const addresses = [\n                            ...nodes.map((n) => n.address),\n                            address,\n                        ];\n                        await saveNodeAddressesCb(addresses);\n                    }, onRemoveAddress: async (address) => {\n                        const addresses = nodes\n                            .filter((n) => n.address !== address)\n                            .map((n) => n.address);\n                        await saveNodeAddressesCb(addresses);\n                    } }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(NodeAddressHeader, null,\n                    React.createElement(\"span\", null, \"Staking agents\"),\n                    ' ',\n                    React.createElement(\"div\", null,\n                        React.createElement(Hint, null,\n                            React.createElement(\"p\", null, \"You can authorize certain addresses to stake and unstake your Operator. These addresses are not allowed to withdraw funds out of the Operator. Such addresses are useful for automation or for using a 'hotter' wallet for convenience when managing your day-to-day staking operations.\")))) },\n                React.createElement(AddressTable, { type: AddressType.Automation, busy: isSavingControllerAddresses, disableEditing: !isOwner, value: controllers.filter((c) => c.address.toLowerCase() !==\n                        operator.owner.toLowerCase()), onChange: setControllers, onAddAddress: (address) => {\n                        saveControllerAddressesCb(address, true);\n                    }, onRemoveAddress: (address) => {\n                        saveControllerAddressesCb(address, false);\n                    } }))),\n            isController && (React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { label: Object.keys(heartbeats).length }, \"Live nodes\") },\n                React.createElement(LiveNodesTable, { heartbeats: heartbeats }))))))));\n};\nfunction tooltipValueFormatter(value, tokenSymbol) {\n    return `${abbr(value)} ${tokenSymbol}`;\n}\nconst ChartGrid = styled(SegmentGrid).withConfig({ displayName: \"ChartGrid\", componentId: \"sc-z36y26\" }) `\n    grid-template-columns: minmax(0, 1fr);\n\n    @media ${LAPTOP} {\n        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);\n    }\n`;\nconst DelegationCell = styled.div.withConfig({ displayName: \"DelegationCell\", componentId: \"sc-qvn3mt\" }) `\n    ${Pad} {\n        padding-bottom: 12px;\n        padding-top: 12px;\n    }\n\n    @media ${TABLET} {\n        ${StatCellContent} {\n            font-size: 24px;\n            line-height: 40px;\n        }\n    }\n`;\nconst NodeAddressHeader = styled.h2.withConfig({ displayName: \"NodeAddressHeader\", componentId: \"sc-1d81gc9\" }) `\n    display: flex;\n    align-items: center;\n`;\nconst NoticeBar = styled.div.withConfig({ displayName: \"NoticeBar\", componentId: \"sc-1npqfx7\" }) `\n    display: flex;\n    align-items: center;\n    width: 100%;\n    background: #fff4ee;\n    font-size: 14px;\n    line-height: 20px;\n    color: #323232;\n    padding: 8px 0;\n    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.025);\n`;\nconst NoticeWrap = styled.div.withConfig({ displayName: \"NoticeWrap\", componentId: \"sc-1dgrgm8\" }) `\n    display: grid;\n    grid-template-columns: 18px 1fr;\n    gap: 8px;\n    align-items: center;\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px;\n    width: 100%;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\nconst SlashingHistoryTableContainer = styled.div.withConfig({ displayName: \"SlashingHistoryTableContainer\", componentId: \"sc-1t1lti\" }) `\n    max-height: none;\n\n    @media ${LAPTOP} {\n        max-height: 575px;\n    }\n`;\nfunction OperatorVersionNotice(params) {\n    const { version } = params;\n    if (version >= 4) {\n        return null;\n    }\n    const notice = (React.createElement(React.Fragment, null, \"This Operator smart contract version is vulnerable and tokens may get stolen. Please withdraw all tokens.\"));\n    return (React.createElement(NoticeBar, null,\n        React.createElement(NoticeWrap, null,\n            React.createElement(TooltipIconWrap, { \"$color\": \"#ff5c00\" },\n                React.createElement(JiraFailedBuildStatusIcon, { label: \"Error\" })),\n            React.createElement(\"div\", null, notice))));\n}\n","import moment from 'moment';\nimport { getSponsorshipTokenInfo } from '~/getters/getSponsorshipTokenInfo';\nimport { ChartPeriod } from '~/types';\nimport { toFloat } from '~/utils/bn';\nimport { getOperatorDailyBuckets } from '.';\nexport const getOperatorStats = async (chainId, operatorId, selectedPeriod, dataSource, { force = false, ignoreToday = false } = {}) => {\n    const { decimals = 18n } = await getSponsorshipTokenInfo(chainId);\n    const start = ignoreToday ? moment().utc().startOf('day') : moment().utc();\n    let result;\n    switch (selectedPeriod) {\n        case ChartPeriod.SevenDays:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(7, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneMonth:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(30, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.ThreeMonths:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(90, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.OneYear:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().subtract(365, 'days').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.YearToDate:\n            result = await getOperatorDailyBuckets(chainId, operatorId, {\n                dateGreaterEqualThan: start.clone().startOf('year').unix(),\n                dateLowerThan: start.unix(),\n                force,\n            });\n            break;\n        case ChartPeriod.All:\n            const maxAmount = 999;\n            const maxIterations = 5;\n            const endDate = start.clone().subtract(maxIterations * maxAmount, 'days');\n            const elements = [];\n            // yeah - I'm guessing we will not have a history longer than 5 thousand days :)\n            for (let i = 0; i < maxIterations; i++) {\n                const partialResult = await getOperatorDailyBuckets(chainId, operatorId, {\n                    dateGreaterEqualThan: endDate.unix(),\n                    dateLowerThan: start.unix(),\n                    batchSize: maxAmount,\n                    skip: maxAmount * i,\n                    force,\n                });\n                elements.push(...partialResult);\n                if (partialResult.length < maxAmount) {\n                    break; // we're breaking the FOR loop here\n                }\n            }\n            result = elements;\n            break;\n        default:\n            result = [];\n    }\n    return result.map((bucket) => {\n        const yValue = dataSource === 'totalValue'\n            ? toFloat(bucket.valueWithoutEarnings, decimals).toNumber()\n            : dataSource === 'cumulativeEarnings'\n                ? toFloat(bucket.cumulativeEarningsWei, decimals).toNumber()\n                : 0;\n        return {\n            x: Number(bucket.date) * 1000,\n            y: yValue,\n        };\n    });\n};\n","import React, { useEffect, useState, } from 'react';\nimport styled from 'styled-components';\nimport { useDebouncedCallback } from 'use-debounce';\nimport { COLORS, DESKTOP, MD, PHONE, TABLET } from '~/shared/utils/styled';\nimport searchIcon from './SearchIcon.svg';\nimport closeIcon from './CloseIcon.svg';\nconst SearchBar = ({ onChange, value, debounceTime = 250, placeholder = 'Search', autoFocus = false, disabled = false, }) => {\n    const [focused, setFocused] = useState();\n    const [inputValue, setInputValue] = useState('');\n    useEffect(() => {\n        if (value != null) {\n            setInputValue(value);\n        }\n    }, [value]);\n    const debouncedChangeHandler = useDebouncedCallback((searchValue) => {\n        if (typeof onChange === 'function') {\n            return onChange(searchValue);\n        }\n    }, debounceTime);\n    const handleChange = (event) => {\n        setInputValue(event.target.value);\n        debouncedChangeHandler(event.target.value);\n    };\n    const clearSearch = (event) => {\n        event.preventDefault();\n        setInputValue('');\n        if (typeof onChange === 'function') {\n            onChange('');\n        }\n    };\n    return (React.createElement(FormWrapper, { onSubmit: (event) => event.preventDefault() },\n        React.createElement(SearchIcon, { src: searchIcon, className: focused ? 'hidden' : '' }),\n        React.createElement(SearchInput, { disabled: disabled, placeholder: placeholder, onFocus: () => setFocused(true), onBlur: () => setFocused(false), onChange: handleChange, value: inputValue, autoFocus: autoFocus }),\n        React.createElement(ClearButton, { disabled: disabled, onClick: clearSearch, className: !inputValue ? 'hidden' : '', type: \"button\" },\n            React.createElement(\"img\", { src: closeIcon, alt: \"Clear search\" }))));\n};\nconst transitionTime = 150;\nconst FormWrapper = styled.form.withConfig({ displayName: \"FormWrapper\", componentId: \"sc-1eoqkq\" }) `\n    display: flex;\n    width: 100%;\n    background-color: ${COLORS.secondary};\n    border-radius: 200px;\n    position: relative;\n`;\nconst SearchInput = styled.input.withConfig({ displayName: \"SearchInput\", componentId: \"sc-1lxxfit\" }) `\n    background-color: transparent;\n    border: none;\n    border-radius: 200px;\n    width: 100%;\n    line-height: 40px;\n    height: 40px;\n    font-size: 14px;\n    padding: 0 20px 0 45px;\n    color: ${COLORS.primary};\n    outline: 2px solid transparent;\n    transition: all ${transitionTime}ms ease-in;\n\n    :focus {\n        outline-color: ${COLORS.focus};\n        padding-left: 20px;\n    }\n\n    ::placeholder {\n        color: ${COLORS.primaryLight};\n        opacity: 1;\n    }\n\n    ::selection {\n        background-color: ${COLORS.selection};\n        opacity: 1;\n        color: ${COLORS.primary};\n    }\n\n    @media ${PHONE} {\n        line-height: 50px;\n        height: 50px;\n    }\n\n    @media (min-width: ${MD}px) {\n        line-height: 60px;\n        height: 60px;\n    }\n`;\nconst SearchIcon = styled.img.withConfig({ displayName: \"SearchIcon\", componentId: \"sc-1t5an7t\" }) `\n    position: absolute;\n    width: 16px;\n    top: 12px;\n    left: 20px;\n    transition: opacity ${transitionTime}ms ease-in, left 1ms linear;\n    opacity: 1;\n\n    &.hidden {\n        transition: opacity ${transitionTime}ms ease-in,\n            left 1ms linear ${transitionTime}ms;\n        opacity: 0;\n        left: 0;\n    }\n\n    @media ${PHONE} {\n        top: 17px;\n    }\n\n    @media (min-width: ${MD}px) {\n        top: 22px;\n    }\n`;\nconst ClearButton = styled.button.withConfig({ displayName: \"ClearButton\", componentId: \"sc-uairft\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    border: none;\n    width: 40px;\n    height: 40px;\n    position: absolute;\n    right: 0;\n    top: 50%;\n    transform: translateY(-50%);\n    background-color: transparent;\n    border-radius: 100%;\n    transition: opacity ${transitionTime}ms ease-in,\n        background-color ${transitionTime}ms ease-in;\n    opacity: 1;\n\n    &.hidden {\n        opacity: 0;\n    }\n\n    :hover {\n        background-color: ${COLORS.secondaryHover};\n    }\n\n    @media ${PHONE} {\n        width: 50px;\n        height: 50px;\n    }\n\n    @media (min-width: ${MD}px) {\n        width: 60px;\n        height: 60px;\n    }\n`;\nexport default SearchBar;\nexport const SearchBarWrap = styled.div.withConfig({ displayName: \"SearchBarWrap\", componentId: \"sc-cwrhc5\" }) `\n    display: flex;\n    justify-content: center;\n    padding: 30px 0 50px;\n\n    ${FormWrapper} {\n        margin: 0 24px;\n        max-width: 770px;\n    }\n\n    @media ${TABLET} {\n        padding: 40px 0 80px;\n\n        ${FormWrapper} {\n            margin: 0 72px;\n        }\n    }\n\n    @media ${DESKTOP} {\n        ${FormWrapper} {\n            margin: 0;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SearchBar from '~/shared/components/SearchBar';\nimport { COLORS, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nconst NetworkActionBarWrap = styled.div.withConfig({ displayName: \"NetworkActionBarWrap\", componentId: \"sc-dzbejj\" }) `\n    background-color: ${COLORS.primaryContrast};\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: center;\n\n    .search-bar-wrap {\n        padding: 30px 24px;\n        max-width: 770px;\n        margin: 0 auto;\n        width: 100%;\n        @media (${TABLET}) {\n            padding: 40px 72px 80px;\n        }\n        &.search-disabled {\n            > * {\n                visibility: hidden;\n            }\n        }\n    }\n\n    .action-content-wrap {\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        padding: 0 24px 28px;\n        width: 100%;\n        max-width: ${MAX_BODY_WIDTH}px;\n        @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n            padding: 0 0 28px;\n        }\n    }\n\n    .left-side-content {\n        width: 100%;\n        @media (${TABLET}) {\n            width: auto;\n        }\n    }\n\n    .right-side-content {\n        display: none;\n        @media (${TABLET}) {\n            display: block;\n        }\n    }\n`;\nexport const NetworkActionBar = ({ searchEnabled, onSearch, searchValue, placeholder, leftSideContent, rightSideContent, }) => {\n    return (React.createElement(NetworkActionBarWrap, null,\n        React.createElement(\"div\", { className: 'search-bar-wrap ' + (!searchEnabled ? 'search-disabled' : '') },\n            React.createElement(SearchBar, { onChange: onSearch, placeholder: placeholder, value: searchValue })),\n        (leftSideContent || rightSideContent) && (React.createElement(\"div\", { className: \"action-content-wrap\" },\n            React.createElement(\"div\", { className: \"left-side-content\" }, leftSideContent),\n            React.createElement(\"div\", { className: \"right-side-content\" }, rightSideContent)))));\n};\n","import { useCallback, useState } from 'react';\nexport function useTableOrder({ orderBy, orderDirection, } = {}) {\n    const [order, setOrder] = useState(orderBy && orderDirection\n        ? {\n            orderBy,\n            orderDirection,\n        }\n        : { orderBy: undefined, orderDirection: undefined });\n    const handleOrderChange = useCallback((column, direction) => {\n        if (!direction) {\n            setOrder((currentOrder) => {\n                return getNextSortingParameters(currentOrder.orderBy, column, currentOrder.orderDirection);\n            });\n            return;\n        }\n        setOrder({\n            orderBy: column,\n            orderDirection: direction,\n        });\n    }, []);\n    return {\n        ...order,\n        setOrder: handleOrderChange,\n    };\n}\nfunction getNextSortingParameters(currentOrderBy, newOrderBy, currentOrderDirection) {\n    if (currentOrderBy !== newOrderBy) {\n        return {\n            orderBy: newOrderBy,\n            orderDirection: 'asc',\n        };\n    }\n    const newDirection = !currentOrderDirection\n        ? 'asc'\n        : currentOrderDirection === 'asc'\n            ? 'desc'\n            : undefined;\n    if (newDirection == null) {\n        return {\n            orderBy: undefined,\n            orderDirection: undefined,\n        };\n    }\n    return {\n        orderBy: newOrderBy,\n        orderDirection: newDirection,\n    };\n}\n","import { useSearchParams } from 'react-router-dom';\nimport { useEffect } from 'react';\nexport function useUrlParams(params) {\n    const [searchParams, setSearchParams] = useSearchParams();\n    useEffect(() => {\n        // Check if current params are different from desired params\n        let needsUpdate = false;\n        const currentParams = new URLSearchParams(searchParams);\n        params.forEach(({ param, value, defaultValue }) => {\n            const currentValue = currentParams.get(param);\n            const targetValue = value !== defaultValue ? value || defaultValue : null;\n            if (targetValue === null && currentValue !== null) {\n                needsUpdate = true;\n            }\n            else if (targetValue !== null && targetValue !== currentValue) {\n                needsUpdate = true;\n            }\n        });\n        // Only update if necessary\n        if (needsUpdate) {\n            setSearchParams((prevParams) => {\n                const newParams = new URLSearchParams(prevParams);\n                params.forEach(({ param, value, defaultValue }) => {\n                    if (value === '' || value === undefined) {\n                        newParams.delete(param);\n                    }\n                    else if (value !== defaultValue) {\n                        newParams.set(param, value);\n                    }\n                    else {\n                        newParams.delete(param);\n                    }\n                });\n                return newParams;\n            });\n        }\n    }, [params, searchParams, setSearchParams]);\n}\n","import React, { useEffect, useState } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport { NetworkActionBar } from '~/components/ActionBars/NetworkActionBar';\nimport { Button } from '~/components/Button';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport NetworkPageSegment, { SegmentGrid } from '~/components/NetworkPageSegment';\nimport { OperatorIdCell } from '~/components/Table';\nimport { getSpotApy } from '~/getters';\nimport { useAllOperatorsQuery, useDelegationsForWalletQuery, useOperatorForWalletQuery, } from '~/hooks/operators';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useIsWalletLoading, useWalletAccount } from '~/shared/stores/wallet';\nimport { saveOperator } from '~/utils';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nvar TabOption;\n(function (TabOption) {\n    TabOption[\"AllOperators\"] = \"all\";\n    TabOption[\"MyDelegations\"] = \"my\";\n})(TabOption || (TabOption = {}));\nconst PAGE_SIZE = 20;\nconst DEFAULT_ORDER_BY = 'totalValue';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = TabOption.AllOperators;\nfunction isTabOption(value) {\n    return value === TabOption.AllOperators || value === TabOption.MyDelegations;\n}\nexport const OperatorsPage = () => {\n    const wallet = useWalletAccount();\n    const isWalletLoading = useIsWalletLoading();\n    const [params] = useSearchParams();\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const [searchQuery, setSearchQuery] = useState(params.get('search') || '');\n    const { orderBy, orderDirection, setOrder } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n        {\n            param: 'search',\n            value: searchQuery,\n            defaultValue: '',\n        },\n    ]);\n    const allOperatorsQuery = useAllOperatorsQuery({\n        batchSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n    });\n    const myDelegationsQuery = useDelegationsForWalletQuery({\n        address: wallet,\n        pageSize: PAGE_SIZE,\n        searchQuery,\n    });\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const operatorQuery = useOperatorForWalletQuery(wallet);\n    const { data: operator = null } = operatorQuery;\n    const currentQuery = selectedTab === TabOption.AllOperators ? allOperatorsQuery : myDelegationsQuery;\n    const navigate = useNavigate();\n    useEffect(() => {\n        if (!wallet && !isWalletLoading) {\n            navigate(R.operators(routeOptions(chainKey, {\n                tab: TabOption.AllOperators,\n            })));\n        }\n    }, [wallet, isWalletLoading, navigate, chainKey]);\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Operators\" }),\n        React.createElement(NetworkActionBar, { searchEnabled: true, searchValue: searchQuery, onSearch: setSearchQuery, leftSideContent: React.createElement(Tabs, { onSelectionChange: (value) => {\n                    navigate(R.operators(routeOptions(chainKey, { tab: value })));\n                }, selection: selectedTab, fullWidthOnMobile: true },\n                React.createElement(Tab, { id: TabOption.AllOperators }, \"All Operators\"),\n                React.createElement(Tab, { id: TabOption.MyDelegations, disabled: !wallet }, \"My Delegations\")), rightSideContent: operator ? (React.createElement(Button, { as: Link, to: R.operator(operator.id, routeOptions(chainKey)) }, \"View my Operator\")) : (React.createElement(Button, { onClick: () => {\n                    saveOperator(chainId, undefined, {\n                        onDone(id, blockNumber) {\n                            navigate(R.operator(id, routeOptions(chainId, {\n                                b: blockNumber,\n                            })));\n                        },\n                    });\n                }, disabled: !wallet || !!operator || operatorQuery.isFetching }, \"Become an Operator\")) }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(\"h2\", null, selectedTab === TabOption.AllOperators ? (React.createElement(React.Fragment, null, \"All Operators\")) : (React.createElement(React.Fragment, null, \"My Delegations\"))) },\n                    selectedTab === TabOption.AllOperators ? (React.createElement(OperatorsTable, { query: allOperatorsQuery, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder })) : (React.createElement(DelegationsTable, { query: myDelegationsQuery })),\n                    currentQuery.hasNextPage && (React.createElement(LoadMoreButton, { disabled: currentQuery.isLoading || currentQuery.isFetching, onClick: () => void currentQuery.fetchNextPage(), kind: \"primary2\" }, \"Load more\")))))));\n};\nfunction DelegationsTable({ query, }) {\n    // We want to hide delegations to broken operator contract version 1\n    // as we cannot get rid of them otherwise\n    const elements = query.data?.pages\n        .flatMap((page) => page.elements)\n        .filter((d) => d.contractVersion !== 1) || [];\n    const chainKey = useCurrentChainKey();\n    const chainFullName = useCurrentChainFullName();\n    const wallet = useWalletAccount();\n    return (React.createElement(ScrollTableCore, { elements: elements, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, columns: [\n            {\n                displayName: 'Operator',\n                valueMapper: ({ id, metadata: { name, imageUrl } }) => (React.createElement(OperatorIdCell, { operatorId: id, operatorName: name, imageUrl: imageUrl, truncate: !!name })),\n                align: 'start',\n                isSticky: true,\n                key: 'operatorId',\n            },\n            {\n                displayName: 'My delegation',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: wallet ? element.share(wallet) : 0n })),\n                align: 'start',\n                isSticky: false,\n                key: 'myShare',\n            },\n            {\n                displayName: 'Total stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.valueWithoutEarnings })),\n                align: 'end',\n                isSticky: false,\n                key: 'totalStake',\n            },\n            {\n                displayName: \"Owner's cut\",\n                valueMapper: (element) => `${element.operatorsCut}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'operatorsCut',\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${(element.apy * 100).toFixed(0)}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Sponsorships',\n                valueMapper: (element) => element.stakes.length,\n                align: 'end',\n                isSticky: false,\n                key: 'sponsorships',\n            },\n        ], noDataFirstLine: `You have not delegated to any operator on the ${chainFullName} chain.`, linkMapper: (element) => R.operator(element.id, routeOptions(chainKey)) }));\n}\nfunction OperatorsTable({ query, orderBy, orderDirection, onOrderChange, }) {\n    const elements = query.data?.pages.flatMap((page) => page.elements) || [];\n    const chainKey = useCurrentChainKey();\n    const chainFullName = useCurrentChainFullName();\n    return (React.createElement(ScrollTableCore, { elements: elements, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, orderDirection: orderDirection, orderBy: orderBy, onOrderChange: onOrderChange, columns: [\n            {\n                displayName: 'Operator',\n                valueMapper: ({ id, metadata: { name, imageUrl } }) => (React.createElement(OperatorIdCell, { operatorId: id, operatorName: name, imageUrl: imageUrl, truncate: !!name })),\n                align: 'start',\n                isSticky: true,\n                key: 'operatorId',\n            },\n            {\n                displayName: 'Total stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.valueWithoutEarnings })),\n                align: 'start',\n                isSticky: false,\n                key: 'totalValue',\n                sortable: true,\n            },\n            {\n                displayName: 'Deployed stake',\n                valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.totalStakeInSponsorshipsWei })),\n                align: 'end',\n                isSticky: false,\n                key: 'deployed',\n                sortable: true,\n            },\n            {\n                displayName: \"Owner's cut\",\n                valueMapper: (element) => `${element.operatorsCut}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'operatorCut',\n                sortable: true,\n            },\n            {\n                displayName: 'APY',\n                valueMapper: (element) => `${(getSpotApy(element) * 100).toFixed(0)}%`,\n                align: 'end',\n                isSticky: false,\n                key: 'apy',\n            },\n            {\n                displayName: 'Sponsorships',\n                valueMapper: (element) => element.stakes.length,\n                align: 'end',\n                isSticky: false,\n                key: 'sponsorshipCount',\n            },\n        ], noDataFirstLine: `No operators found on the ${chainFullName} chain.`, linkMapper: (element) => R.operator(element.id, routeOptions(chainKey)) }));\n}\n","import styled from 'styled-components';\nimport { COLORS, DESKTOP, MEDIUM, TABLET, MAX_BODY_WIDTH } from '~/shared/utils/styled';\nimport { Button } from '~/components/Button';\nexport const FiltersBar = styled.div.withConfig({ displayName: \"FiltersBar\", componentId: \"sc-12qmyua\" }) `\n    display: flex;\n    justify-content: space-between;\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 30px 30px;\n\n    @media ${DESKTOP} {\n        padding: 0 0 30px;\n    }\n`;\nexport const FiltersWrap = styled.div.withConfig({ displayName: \"FiltersWrap\", componentId: \"sc-tbepbb\" }) `\n    align-items: center;\n    display: flex;\n    width: 100%;\n\n    @media ${TABLET} {\n        align-items: unset;\n        width: auto;\n    }\n`;\nexport const DropdownFilters = styled.div.withConfig({ displayName: \"DropdownFilters\", componentId: \"sc-17tltbs\" }) `\n    display: none;\n    align-items: center;\n    margin-left: 40px;\n    span {\n        color: ${COLORS.primary};\n        font-weight: ${MEDIUM};\n        margin-right: 15px;\n        font-size: 14px;\n    }\n\n    @media (${DESKTOP}) {\n        display: flex;\n    }\n`;\nexport const SelectFieldWrap = styled.div.withConfig({ displayName: \"SelectFieldWrap\", componentId: \"sc-14wczrv\" }) `\n    margin-right: 10px;\n`;\nexport const MobileFilterWrap = styled.div.withConfig({ displayName: \"MobileFilterWrap\", componentId: \"sc-11b0azj\" }) `\n    display: block;\n    color: ${COLORS.primary};\n    margin-left: 20px;\n\n    @media (${DESKTOP}) {\n        display: none;\n    }\n`;\nexport const MobileFilterText = styled.span.withConfig({ displayName: \"MobileFilterText\", componentId: \"sc-1csnotb\" }) `\n    margin-right: 15px;\n    display: none;\n    @media (${TABLET}) {\n        display: inline;\n    }\n`;\nexport const CreateProjectButton = styled(Button).withConfig({ displayName: \"CreateProjectButton\", componentId: \"sc-16puz4w\" }) `\n    display: none !important;\n\n    @media ${TABLET} {\n        display: inherit !important;\n    }\n`;\nexport const ActionBarContainer = styled.div.withConfig({ displayName: \"ActionBarContainer\", componentId: \"sc-6z7scv\" }) `\n    background-color: ${COLORS.primaryContrast};\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { isAddress } from 'web3-validator';\nimport { Button } from '~/components/Button';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { usePersistProjectCallback } from '~/stores/projectDraft';\nimport { toBigInt, toFloat } from '~/utils/bn';\nimport { getContractAddress } from '~/utils/contracts';\nimport { errorToast } from '~/utils/toast';\nimport { getCachedTokenInfo, getTokenInfo, useTokenInfo } from '~/utils/tokens';\nconst TimeUnitOptions = Object.values(timeUnits).map((unit) => ({\n    label: `Per ${unit}`,\n    value: unit,\n}));\nfunction isTokenInfoCached(tokenAddress, chainId) {\n    return typeof getCachedTokenInfo(tokenAddress, chainId) !== 'undefined';\n}\nexport default function SalePointTokenSelector({ disabled = false, salePoint, onSalePointChange, }) {\n    const { pricingTokenAddress: tokenAddress, chainId, price } = salePoint;\n    const dataTokenAddress = getContractAddress('data', chainId).toLowerCase();\n    const [useDataToken, setUseDataToken] = useState(tokenAddress === dataTokenAddress);\n    const tokenInfo = useTokenInfo(tokenAddress, chainId);\n    const isLoadingTokenInfo = typeof tokenInfo === 'undefined';\n    const { symbol: tokenSymbol, decimals = 18n } = tokenInfo || {};\n    const [rawPrice, setRawPrice] = useState(price == null ? '' : toFloat(price, decimals).toString());\n    useEffect(function setRawPriceFromUpstream() {\n        setRawPrice(price == null ? '' : toFloat(price, decimals).toString());\n    }, [price, decimals]);\n    const [customTokenAddress, setCustomTokenAddress] = useState(useDataToken ? '' : tokenAddress);\n    useEffect(() => {\n        const data = tokenAddress === dataTokenAddress;\n        setUseDataToken(data);\n        if (!data && tokenAddress) {\n            setCustomTokenAddress(tokenAddress);\n        }\n    }, [tokenAddress, dataTokenAddress]);\n    const isCustomTokenInfoCached = isTokenInfoCached(customTokenAddress, chainId);\n    const canFetchTokenInfo = !disabled &&\n        isAddress(customTokenAddress) &&\n        !isCustomTokenInfoCached &&\n        !isLoadingTokenInfo;\n    const persist = usePersistProjectCallback();\n    function commitNewPrice(value) {\n        if (!value) {\n            onSalePointChange?.({\n                ...salePoint,\n                price: undefined,\n            });\n            return;\n        }\n        onSalePointChange?.({\n            ...salePoint,\n            price: toBigInt(value || 0, decimals),\n        });\n    }\n    return (React.createElement(Root, null,\n        React.createElement(\"ul\", null,\n            React.createElement(\"li\", null,\n                React.createElement(RadioButton, { type: \"button\", onClick: () => {\n                        onSalePointChange?.({\n                            ...salePoint,\n                            pricingTokenAddress: dataTokenAddress,\n                        });\n                    } },\n                    React.createElement(Radio, { \"$checked\": useDataToken }),\n                    React.createElement(\"span\", null, \"DATA Token\"),\n                    React.createElement(DataTokenIcon, null))),\n            React.createElement(\"li\", null,\n                React.createElement(RadioButton, { type: \"button\", onClick: () => {\n                        onSalePointChange?.({\n                            ...salePoint,\n                            pricingTokenAddress: isCustomTokenInfoCached\n                                ? customTokenAddress\n                                : '',\n                        });\n                    } },\n                    React.createElement(Radio, { \"$checked\": !useDataToken }),\n                    React.createElement(\"span\", null, \"Custom token\")),\n                React.createElement(CustomTokenAddressInputContainer, { className: \"custom-\" },\n                    React.createElement(\"label\", null, \"Token contract address\"),\n                    React.createElement(TextInput, { autoComplete: \"off\", disabled: disabled || isLoadingTokenInfo, placeholder: \"e.g 0xdac17f958d2ee523a2206206994597c13d831ec7\", value: customTokenAddress, onChange: (e) => {\n                            const { value } = e.target;\n                            setCustomTokenAddress(value);\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: isTokenInfoCached(value, chainId)\n                                    ? value\n                                    : '',\n                            });\n                        }, invalid: !!tokenAddress &&\n                            getCachedTokenInfo(tokenAddress, chainId) === null, onFocus: () => {\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: isTokenInfoCached(customTokenAddress, chainId)\n                                    ? customTokenAddress\n                                    : '',\n                            });\n                        }, onBlur: () => {\n                            if (customTokenAddress) {\n                                return;\n                            }\n                            onSalePointChange?.({\n                                ...salePoint,\n                                pricingTokenAddress: dataTokenAddress,\n                            });\n                        } }),\n                    React.createElement(SetTokenContainer, null,\n                        React.createElement(Button, { onClick: async () => {\n                                if (!canFetchTokenInfo) {\n                                    return;\n                                }\n                                onSalePointChange?.({\n                                    ...salePoint,\n                                    pricingTokenAddress: customTokenAddress,\n                                });\n                                try {\n                                    /**\n                                     * The only thing we check here: does `customTokenAddress` make\n                                     * `getTokenInfo` explode. `useTokenInfo` won't tell.\n                                     */\n                                    await getTokenInfo(customTokenAddress, chainId);\n                                }\n                                catch (_) {\n                                    errorToast({\n                                        title: 'Invalid token contract address',\n                                        desc: 'This is not an ERC-20 token contract',\n                                    });\n                                }\n                            }, disabled: !canFetchTokenInfo, waiting: isLoadingTokenInfo }, \"Set custom token\"))))),\n        React.createElement(PriceContainer, null,\n            React.createElement(PriceInputWrap, null,\n                React.createElement(TextInput, { className: \"price-input\", placeholder: \"Set your price\", onChange: (e) => {\n                        setRawPrice(e.target.value);\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            commitNewPrice(rawPrice);\n                            persist();\n                        }\n                    }, onBlur: () => {\n                        commitNewPrice(rawPrice);\n                    }, value: rawPrice, disabled: disabled || !tokenInfo }),\n                tokenSymbol && React.createElement(TokenSymbol, null, tokenSymbol)),\n            React.createElement(SelectContainer, null,\n                React.createElement(SelectField2, { whiteVariant: true, placeholder: \"Unit\", options: TimeUnitOptions, isClearable: false, value: salePoint.timeUnit, onChange: (timeUnit) => {\n                        if (disabled || !tokenInfo) {\n                            return;\n                        }\n                        onSalePointChange?.({\n                            ...salePoint,\n                            timeUnit: timeUnit,\n                        });\n                    }, disabled: disabled || !tokenInfo })))));\n}\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-5gt9m6\" }) `\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    padding: 24px;\n\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n\n    li {\n        background-color: #ffffff;\n        border-radius: 4px;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n`;\nconst RadioButton = styled.button.withConfig({ displayName: \"RadioButton\", componentId: \"sc-63yqxv\" }) `\n    align-items: center;\n    appearance: none;\n    background: transparent;\n    border: 0;\n    display: flex;\n    font-size: 14px;\n    padding: 24px 20px;\n    text-align: left;\n    width: 100%;\n\n    span {\n        flex-grow: 1;\n        margin: 0 16px;\n    }\n`;\nfunction getDataTokenIconAttrs() {\n    return {\n        name: 'DATAColor',\n    };\n}\nconst DataTokenIcon = styled(SvgIcon).attrs(getDataTokenIconAttrs).withConfig({ displayName: \"DataTokenIcon\", componentId: \"sc-qlzzfv\" }) `\n    display: block;\n    height: 24px;\n    width: 24px;\n`;\nconst CustomTokenAddressInputContainer = styled.div.withConfig({ displayName: \"CustomTokenAddressInputContainer\", componentId: \"sc-rhhyh1\" }) `\n    padding: 0 20px 24px;\n\n    label {\n        font-weight: ${MEDIUM};\n        font-size: 12px;\n        line-height: 16px;\n        margin-bottom: 9px;\n    }\n`;\nconst SetTokenContainer = styled.div.withConfig({ displayName: \"SetTokenContainer\", componentId: \"sc-1tocx0l\" }) `\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 16px;\n`;\nconst PriceContainer = styled.div.withConfig({ displayName: \"PriceContainer\", componentId: \"sc-177dvg7\" }) `\n    display: flex;\n    margin-top: 16px;\n`;\nconst PriceInputWrap = styled.div.withConfig({ displayName: \"PriceInputWrap\", componentId: \"sc-o5o22k\" }) `\n    position: relative;\n    flex: 1;\n    margin-right: 16px;\n\n    .price-input {\n        padding-right: 60px;\n        &:disabled {\n            background-color: white;\n            opacity: 1;\n        }\n    }\n`;\nconst TokenSymbol = styled.span.withConfig({ displayName: \"TokenSymbol\", componentId: \"sc-1026cdv\" }) `\n    position: absolute;\n    right: 12px;\n    top: 0;\n    height: 100%;\n    font-size: 14px;\n    border-left: 1px solid ${COLORS.Border};\n    padding-left: 12px;\n    color: ${COLORS.primaryLight};\n    display: flex;\n    align-items: center;\n`;\nconst SelectContainer = styled.div.withConfig({ displayName: \"SelectContainer\", componentId: \"sc-bo2zaq\" }) `\n    [class*='-control'] {\n        min-height: 40px;\n        border: none;\n        &:hover {\n            border: none;\n        }\n    }\n`;\nconst Radio = styled.div.withConfig({ displayName: \"Radio\", componentId: \"sc-v74xe7\" }) `\n    border-radius: 50%;\n    border: 2px solid ${COLORS.radioBorder};\n    height: 15px;\n    position: relative;\n    width: 15px;\n\n    ::before {\n        background-color: ${COLORS.link};\n        border-radius: 50%;\n        content: '';\n        display: block;\n        height: 7px;\n        left: 2px;\n        opacity: 0;\n        position: absolute;\n        top: 2px;\n        transform: scale(0.5);\n        transition: 120ms ease-in-out;\n        transition-property: transform, opacity;\n        width: 7px;\n    }\n\n    ${({ $checked = false }) => $checked &&\n    css `\n            border-color: ${COLORS.link};\n\n            ::before {\n                opacity: 1;\n                transform: scale(1);\n            }\n        `}\n`;\n","import { produce } from 'immer';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { getDataUnion, getDataUnionsOwnedByInChain } from '~/getters/du';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { Tick as PrestyledTick } from '~/shared/components/Checkbox';\nimport NetworkIcon from '~/shared/components/NetworkIcon';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { getChainDisplayName } from '~/utils/chains';\nimport { Root as SalePointTokenSelectorRoot } from './SalePointTokenSelector';\nexport default function SalePointOption({ onSalePointChange, salePoint, children, multiSelect = false, }) {\n    const { chainId, enabled, readOnly } = salePoint;\n    return (React.createElement(DropdownWrap, { \"$open\": enabled },\n        React.createElement(DropdownToggle, { onClick: () => {\n                onSalePointChange?.({\n                    ...salePoint,\n                    /**\n                     * In multi select mode we don't allow to toggle. It's a click-2-enable,\n                     * always. We let the parent component decide what to do with the value.\n                     */\n                    enabled: multiSelect ? !salePoint.enabled : true,\n                });\n            } },\n            multiSelect ? (React.createElement(Tick, { \"$checked\": enabled, \"$disabled\": readOnly })) : (React.createElement(RadioCircle, { \"$checked\": enabled, \"$disabled\": readOnly })),\n            React.createElement(ChainIcon, { chainId: chainId }),\n            React.createElement(ToggleText, null, getChainDisplayName(chainId)),\n            multiSelect && React.createElement(PlusSymbol, null)),\n        React.createElement(DropdownOuter, null,\n            React.createElement(DropdownInner, null, children))));\n}\nexport const RadioCircle = styled.div.withConfig({ displayName: \"RadioCircle\", componentId: \"sc-1x2ldql\" }) `\n    border-radius: 50%;\n    border: 2px solid ${COLORS.radioBorder};\n    height: 15px;\n    transition: 0.5s border-color;\n    width: 15px;\n\n    ::before {\n        background: ${COLORS.link};\n        border-radius: 50%;\n        content: '';\n        display: block;\n        height: 7px;\n        opacity: 0;\n        transform: translate(2px, 2px) scale(0.5);\n        transition: 0.5s;\n        transition-property: transform, opacity;\n        width: 7px;\n    }\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.5;\n        `}\n\n    ${({ $checked }) => $checked &&\n    css `\n            border-color: ${COLORS.link};\n            transition-duration: 0.1s;\n\n            ::before {\n                opacity: 1;\n                transform: translate(2px, 2px) scale(1);\n                transition-duration: 0.1s;\n            }\n        `}\n`;\nconst DropdownToggle = styled.div.withConfig({ displayName: \"DropdownToggle\", componentId: \"sc-1uc9r46\" }) `\n    align-items: center;\n    cursor: pointer;\n    display: flex;\n    padding: 24px;\n\n    :hover {\n        background-color: ${COLORS.secondary};\n    }\n\n    > ${RadioCircle} {\n        margin-right: 20px;\n    }\n`;\nconst DropdownInner = styled.div.withConfig({ displayName: \"DropdownInner\", componentId: \"sc-11fyshv\" }) `\n    padding: 8px 24px 64px;\n    transition: margin-bottom 0.5s ease-in-out;\n    margin-bottom: -350%;\n\n    h4 {\n        font-weight: 400;\n        font-size: 20px;\n        margin: 0;\n    }\n\n    h4 + p {\n        font-size: 16px;\n        margin: 16px 0 28px;\n        line-height: 1.5em;\n    }\n\n    ${SalePointTokenSelectorRoot} {\n        margin-bottom: 48px;\n    }\n`;\nconst ToggleText = styled.div.withConfig({ displayName: \"ToggleText\", componentId: \"sc-112qiyv\" }) `\n    flex-grow: 1;\n`;\nfunction getPlusSymbolAttrs() {\n    return {\n        name: 'plus',\n    };\n}\nconst PlusSymbol = styled(SvgIcon).attrs(getPlusSymbolAttrs).withConfig({ displayName: \"PlusSymbol\", componentId: \"sc-1hkuv5d\" }) `\n    margin-left: auto;\n    transition: transform 0.3s ease-in-out;\n    width: 14px;\n`;\nconst DropdownWrap = styled.div.withConfig({ displayName: \"DropdownWrap\", componentId: \"sc-1uricu7\" }) `\n    overflow: hidden;\n    box-shadow: 0 1px 2px 0 #00000026, 0 0 1px 0 #00000040;\n    border-radius: 4px;\n    color: ${COLORS.primary};\n\n    & + & {\n        margin-top: 24px;\n    }\n\n    ${({ $open = false }) => $open &&\n    css `\n            ${DropdownInner} {\n                margin-bottom: 0;\n            }\n\n            ${DropdownToggle}:hover {\n                background-color: inherit;\n            }\n\n            ${PlusSymbol} {\n                transform: rotate(45deg);\n            }\n        `}\n`;\nconst DropdownOuter = styled.div.withConfig({ displayName: \"DropdownOuter\", componentId: \"sc-o12d7f\" }) `\n    overflow: hidden;\n`;\nconst Tick = styled(PrestyledTick).withConfig({ displayName: \"Tick\", componentId: \"sc-1pe3o71\" }) `\n    margin: 0 20px 0 0;\n\n    ${({ $disabled = false }) => $disabled &&\n    css `\n            opacity: 0.3;\n        `}\n`;\nconst ChainIcon = styled(NetworkIcon).withConfig({ displayName: \"ChainIcon\", componentId: \"sc-1daap6y\" }) `\n    width: 32px;\n    height: 32px;\n    margin-right: 12px;\n`;\nconst NamedMetadata = z.object({\n    name: z.string(),\n});\nfunction isNamedMetadata(metadata) {\n    return NamedMetadata.safeParse(metadata).success;\n}\nexport function DataUnionOption({ salePoint, onSalePointChange }) {\n    const [dataUnionId, setDataUnionId] = useState('');\n    const { chainId } = salePoint;\n    const [deployNew, setDeployNew] = useState(true);\n    const [dataUnions, setDataUnions] = useState();\n    const isLoadingDataUnions = typeof dataUnions === 'undefined';\n    const canUseExisting = !!dataUnions?.length;\n    const account = useWalletAccount();\n    function updateSalePoint(updater) {\n        onSalePointChange?.(produce(salePoint, updater));\n    }\n    const updateSalePointRef = useRef(updateSalePoint);\n    updateSalePointRef.current = updateSalePoint;\n    useEffect(() => {\n        let mounted = true;\n        if (!account) {\n            return () => { };\n        }\n        /**\n         * Tell the app we're loading the Unions. See `isLoadingDataUnions`.\n         */\n        setDataUnions(undefined);\n        /**\n         * Reset the new/existing selection because it's impossible to select\n         * exisitng id from `undefined` set above.\n         */\n        setDeployNew(true);\n        updateSalePointRef.current((draft) => {\n            draft.beneficiaryAddress = '';\n        });\n        setTimeout(async () => {\n            const result = [];\n            try {\n                const foundDataUnions = await getDataUnionsOwnedByInChain(account, chainId);\n                if (!mounted) {\n                    return;\n                }\n                for (const { id } of foundDataUnions) {\n                    try {\n                        const dataUnion = await getDataUnion(id, chainId);\n                        if (!mounted) {\n                            // There's no need to carry on. The result is gonna get discarded.\n                            break;\n                        }\n                        const metadata = await dataUnion.getMetadata();\n                        if (!mounted) {\n                            // Again, there's no need to carry on. See above.\n                            break;\n                        }\n                        result.push({\n                            value: id,\n                            label: isNamedMetadata(metadata) ? metadata.name : id,\n                        });\n                    }\n                    catch (e) {\n                        console.warn(`Failed to load a Data Union: ${id}`, e);\n                    }\n                }\n            }\n            catch (e) {\n                console.warn('Failed to load Data Unions', e);\n            }\n            finally {\n                if (mounted) {\n                    setDataUnions(result);\n                }\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [chainId, account]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(\"h4\", null, \"Deployment\"),\n        React.createElement(\"p\", null, \"You can deploy a new Data Union smart contract, or connect an existing one.\"),\n        React.createElement(DeployList, null,\n            React.createElement(\"li\", null,\n                React.createElement(\"button\", { type: \"button\", onClick: () => {\n                        setDeployNew(true);\n                        updateSalePoint((draft) => {\n                            draft.beneficiaryAddress = '';\n                        });\n                    } },\n                    React.createElement(RadioCircle, { \"$checked\": deployNew }),\n                    React.createElement(\"p\", null, \"Deploy a new Data Union\"))),\n            React.createElement(\"li\", null,\n                React.createElement(\"button\", { type: \"button\", disabled: !canUseExisting, onClick: () => {\n                        if (!canUseExisting) {\n                            return;\n                        }\n                        setDeployNew(false);\n                        updateSalePoint((draft) => {\n                            draft.beneficiaryAddress = dataUnionId;\n                        });\n                    } },\n                    React.createElement(RadioCircle, { \"$checked\": !deployNew, \"$disabled\": !canUseExisting }),\n                    React.createElement(\"p\", null, \"Connect an existing Data Union\")),\n                React.createElement(SelectWrap, null,\n                    React.createElement(SelectField2, { placeholder: isLoadingDataUnions\n                            ? 'Loading…'\n                            : canUseExisting\n                                ? 'Select a Data Union'\n                                : \"You don't have any deployed Data Unions\", options: dataUnions || [], disabled: deployNew, fullWidth: true, value: dataUnionId || undefined, isClearable: false, onChange: (newDataUnionId) => {\n                            setDataUnionId(newDataUnionId);\n                            updateSalePoint((draft) => {\n                                draft.beneficiaryAddress = newDataUnionId;\n                            });\n                        } }))))));\n}\nconst DeployList = styled.ul.withConfig({ displayName: \"DeployList\", componentId: \"sc-10wgl0g\" }) `\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    list-style: none;\n    margin: 0;\n    padding: 24px;\n\n    li {\n        background: #ffffff;\n        border-radius: 4px;\n    }\n\n    li > button {\n        align-items: center;\n        appearance: none;\n        background: none;\n        border: 0;\n        display: flex;\n        padding: 24px;\n        text-align: left;\n        width: 100%;\n    }\n\n    li + li {\n        margin-top: 16px;\n    }\n\n    p {\n        flex-grow: 1;\n        font-size: 14px;\n        margin: 0;\n    }\n\n    ${RadioCircle} {\n        margin-right: 12px;\n    }\n`;\nconst SelectWrap = styled.div.withConfig({ displayName: \"SelectWrap\", componentId: \"sc-tvsugl\" }) `\n    padding: 0 24px 24px;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { RadioCircle } from '~/components/SalePointSelector/SalePointOption';\nimport FormModal from '~/modals/FormModal';\nimport { TheGraph } from '~/shared/types';\nimport { Layer } from '~/utils/Layer';\nfunction ProjectTypeFilterModal({ onResolve, value, ...props }) {\n    const [localValue, setLocalValue] = useState(value);\n    return (React.createElement(FormModal, { title: \"Filter\", submitLabel: \"Save\", ...props, onSubmit: () => {\n            onResolve?.(localValue);\n        } },\n        React.createElement(Body, null,\n            React.createElement(\"h4\", null, \"By project type\"),\n            React.createElement(\"ul\", null,\n                React.createElement(\"li\", null,\n                    React.createElement(\"button\", { type: \"button\", onClick: () => {\n                            setLocalValue(undefined);\n                        } },\n                        React.createElement(RadioCircle, { \"$checked\": !localValue }),\n                        \"Any\")),\n                productTypeOptions.map(({ value, label }) => (React.createElement(\"li\", { key: value },\n                    React.createElement(\"button\", { type: \"button\", onClick: () => {\n                            setLocalValue(value);\n                        } },\n                        React.createElement(RadioCircle, { \"$checked\": localValue === value }),\n                        label))))))));\n}\nexport const projectTypeFilterModal = toaster(ProjectTypeFilterModal, Layer.Modal);\nconst productTypeOptions = [\n    {\n        value: TheGraph.ProjectType.Open,\n        label: 'Open data',\n    },\n    {\n        value: TheGraph.ProjectType.Paid,\n        label: 'Paid data',\n    },\n    {\n        value: TheGraph.ProjectType.DataUnion,\n        label: 'Data union',\n    },\n];\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-zuqmj1\" }) `\n    font-size: 16px;\n\n    button {\n        appearance: none;\n        align-items: center;\n        display: flex;\n        border: 0;\n        background: none;\n        padding: 0;\n        gap: 8px;\n    }\n\n    ul {\n        list-style: none;\n        padding: 0;\n        margin: 0;\n    }\n\n    li + li {\n        margin-top: 8px;\n    }\n\n    h4 {\n        font-size: 22px;\n        font-weight: 400;\n        margin: 0 0 20px;\n    }\n`;\n","import React from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport Faders from '~/assets/Faders.svg';\nimport { ActionBarContainer, CreateProjectButton, DropdownFilters, FiltersBar, FiltersWrap, MobileFilterText, MobileFilterWrap, SelectFieldWrap, } from '~/components/ActionBar.styles';\nimport { Button } from '~/components/Button';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { projectTypeFilterModal } from '~/modals/ProjectTypeFilter';\nimport SearchBar, { SearchBarWrap } from '~/shared/components/SearchBar';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { TheGraph } from '~/shared/types';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport var TabOption;\n(function (TabOption) {\n    TabOption[\"Any\"] = \"all\";\n    TabOption[\"Owned\"] = \"my\";\n})(TabOption || (TabOption = {}));\nexport function isOwnedTabOption(value) {\n    return value === TabOption.Owned;\n}\nexport function isTabOption(value) {\n    return value === TabOption.Any || value === TabOption.Owned;\n}\nconst productTypeOptions = [\n    {\n        value: TheGraph.ProjectType.Open,\n        label: 'Open data',\n    },\n    {\n        value: TheGraph.ProjectType.Paid,\n        label: 'Paid data',\n    },\n    {\n        value: TheGraph.ProjectType.DataUnion,\n        label: 'Data union',\n    },\n];\nconst UnstyledActionBar = ({ filter, onCreateProject, onFilterChange, ...props }) => {\n    const [params] = useSearchParams();\n    const tab = params.get('tab');\n    const scope = isTabOption(tab) ? tab : TabOption.Any;\n    const walletAccount = useWalletAccount();\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(ActionBarContainer, { ...props },\n        React.createElement(SearchBarWrap, null,\n            React.createElement(SearchBar, { value: filter.search, onChange: (search) => {\n                    onFilterChange?.({\n                        ...filter,\n                        search,\n                    });\n                } })),\n        React.createElement(FiltersBar, null,\n            React.createElement(FiltersWrap, null,\n                React.createElement(Tabs, { selection: scope, onSelectionChange: (id) => {\n                        navigate(R.projects(routeOptions(chainKey, { tab: id })));\n                    } },\n                    React.createElement(Tab, { id: TabOption.Any }, \"All projects\"),\n                    React.createElement(Tab, { id: TabOption.Owned, disabled: !walletAccount, title: walletAccount\n                            ? undefined\n                            : 'You need to be connected in to view your projects' }, \"Your projects\")),\n                React.createElement(DropdownFilters, null,\n                    React.createElement(\"span\", null, \"Filter by\"),\n                    React.createElement(SelectFieldWrap, null,\n                        React.createElement(SelectField2, { placeholder: \"Project type\", options: productTypeOptions, value: filter.type, onChange: (type) => {\n                                onFilterChange?.({\n                                    ...filter,\n                                    type: type === null\n                                        ? undefined\n                                        : type,\n                                });\n                            } }))),\n                React.createElement(MobileFilterWrap, null,\n                    React.createElement(MobileFilterTrigger, { onClick: async () => {\n                            try {\n                                const type = await projectTypeFilterModal.pop({\n                                    value: filter.type,\n                                });\n                                onFilterChange?.({\n                                    ...filter,\n                                    type,\n                                });\n                            }\n                            catch (_) { }\n                        }, kind: \"secondary\" },\n                        React.createElement(MobileFilterText, null,\n                            \"Filter\",\n                            filter.type != null && '*'),\n                        React.createElement(\"img\", { src: Faders })))),\n            React.createElement(CreateProjectButton, { kind: \"primary\", type: \"button\", onClick: onCreateProject }, \"Create project\"))));\n};\nconst ActionBar = styled(UnstyledActionBar).withConfig({ displayName: \"ActionBar\", componentId: \"sc-41ii1q\" }) ``;\nexport default ActionBar;\nconst MobileFilterTrigger = styled(Button).withConfig({ displayName: \"MobileFilterTrigger\", componentId: \"sc-1rnrcxg\" }) `\n    padding: 0 10px !important;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nconst UnstyledRect = ({ ratio = '1:1', height, ...props }) => (React.createElement(\"svg\", { ...props, height: height, viewBox: ratio == null ? undefined : `0 0 ${ratio.split(/[:x]/).join(' ')}`, width: height == null ? undefined : '100%', xmlns: \"http://www.w3.org/2000/svg\" }));\nconst Rect = styled(UnstyledRect).withConfig({ displayName: \"Rect\", componentId: \"sc-jr8ct1\" }) `\n    display: block;\n`;\nexport default Rect;\n","import React from 'react';\nimport styled, { keyframes, css } from 'styled-components';\nconst UnstyledSkeleton = ({ disabled, children, width: _width, block: _block, ...props }) => (disabled ? children || null : (React.createElement(\"span\", { ...props }, \"\\u200C\")));\nconst animation = keyframes `\n    0% {\n        background-position: -200px 0;\n    }\n\n    100% {\n        background-position: calc(200px + 100%) 0;\n    }\n`;\nconst Skeleton = styled(UnstyledSkeleton).withConfig({ displayName: \"Skeleton\", componentId: \"sc-19ir9xb\" }) `\n    animation: ${animation} 1.2s ease-in-out infinite;\n    background-color: #eeeeee;\n    background-image: linear-gradient(90deg, #eeeeee, #f5f5f5, #eeeeee);\n    background-repeat: no-repeat;\n    background-size: 200px 100%;\n    border-radius: 2px;\n    display: inline-block;\n    line-height: 1;\n    width: 100%;\n\n    ${({ width }) => width != null &&\n    css `\n            width: ${width};\n        `}\n\n    ${({ block }) => !!block &&\n    css `\n            border-radius: 0;\n            display: block;\n        `}\n`;\nexport default Skeleton;\n","import { getIndexerClient } from '~/getters/getGraphClient';\nimport { GetStreamsDocument, } from '../generated/gql/indexer';\nimport { getNeighbors } from './getNeighbors';\nexport const defaultStreamStats = {\n    latency: undefined,\n    messagesPerSecond: undefined,\n    peerCount: undefined,\n};\nexport const getStreamStats = async (streamId) => {\n    const client = getIndexerClient(137);\n    if (!client) {\n        return defaultStreamStats;\n    }\n    const { data: { streams }, } = await client.query({\n        query: GetStreamsDocument,\n        variables: {\n            streamIds: [streamId],\n            first: 1,\n        },\n    });\n    const [stream = undefined] = streams.items;\n    if (!stream) {\n        return null;\n    }\n    const { messagesPerSecond, peerCount } = stream;\n    const latency = await calculateLatencyForStream(streamId, 137);\n    return {\n        latency,\n        messagesPerSecond,\n        peerCount,\n    };\n};\nexport async function calculateLatencyForStream(streamId, chainId) {\n    const neighbors = await getNeighbors({\n        streamId,\n        chainId,\n    });\n    const validRTTs = neighbors\n        .map((n) => n.rtt)\n        .filter((rtt) => typeof rtt === 'number' && rtt > 0);\n    // Calculate average one-way latency from neighbors with valid RTT.\n    // Latency is the average RTT of neighbors in the stream, divided by 2.\n    const latency = validRTTs.length > 0\n        ? validRTTs.reduce((sum, rtt) => sum + rtt, 0) / validRTTs.length / 2\n        : undefined;\n    return latency;\n}\n","import { getIndexerClient } from '~/getters/getGraphClient';\nimport { GetNeighborsDocument, } from '../generated/gql/indexer';\nexport async function getNeighbors(params) {\n    const pageSize = 1000;\n    const { node, streamId, streamPartitionId, chainId } = params;\n    const items = [];\n    const uniquenessGate = {};\n    let cursor = '0';\n    for (;;) {\n        const client = getIndexerClient(chainId);\n        if (!client) {\n            console.error('Could not get indexer client for chainId', chainId);\n            break;\n        }\n        const { data: { neighbors }, } = await client.query({\n            fetchPolicy: 'network-only',\n            query: GetNeighborsDocument,\n            variables: {\n                cursor,\n                node,\n                pageSize,\n                streamId,\n                streamPart: streamPartitionId,\n            },\n        });\n        for (const { nodeId1: a, nodeId2: b, streamPartId: finalStreamPartitionId, rtt, } of neighbors.items) {\n            const pair = [a, b].sort();\n            const key = pair.join('-');\n            if (uniquenessGate[key]) {\n                continue;\n            }\n            uniquenessGate[key] = true;\n            const [nodeId0, nodeId1] = pair;\n            items.push({\n                nodeId0,\n                nodeId1,\n                streamPartitionId: finalStreamPartitionId,\n                rtt: rtt ?? undefined,\n            });\n        }\n        if (!neighbors.cursor || neighbors.cursor === cursor) {\n            break;\n        }\n        cursor = neighbors.cursor;\n    }\n    return items;\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport Link from '~/shared/components/Link';\nimport { useMultipleStreamStatsQuery } from '~/hooks/useStreamStats';\nconst SingleBadge = styled.div.withConfig({ displayName: \"SingleBadge\", componentId: \"sc-1uo2220\" }) `\n    display: flex;\n    align-items: center;\n    font-size: 10px;\n    height: 15px;\n    line-height: 12px;\n    padding: 0 4px;\n    background-color: #0324ff;\n    background-color: ${({ theme }) => theme.backgroundColor};\n    color: white !important;\n\n    a,\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        color: white !important;\n    }\n\n    > * + * {\n        margin-left: 8px;\n    }\n`;\nconst BadgeContainer = styled.div.withConfig({ displayName: \"BadgeContainer\", componentId: \"sc-1cauijy\" }) `\n    align-items: center;\n    color: white !important;\n    display: flex;\n    cursor: default;\n    pointer-events: none;\n    user-select: none;\n    margin: 0.5em;\n\n    a& {\n        cursor: pointer;\n        pointer-events: auto;\n        text-decoration: none !important;\n    }\n\n    ${({ top, left, right, bottom }) => !!(top || left || right || bottom) &&\n    css `\n            position: absolute;\n        `}\n\n    ${({ bottom, top }) => !!bottom &&\n    !top &&\n    css `\n            bottom: 0;\n        `}\n\n    ${({ left }) => !!left &&\n    css `\n            left: 0;\n        `}\n\n    ${({ right, left }) => !!right &&\n    !left &&\n    css `\n            right: 0;\n        `}\n\n    ${({ top }) => !!top &&\n    css `\n            top: 0;\n        `}\n\n    > ${SingleBadge} {\n        margin-left: 1px;\n    }\n\n    ${SingleBadge}:first-child {\n        border-top-right-radius: 0;\n        border-bottom-right-radius: 0;\n        border-top-left-radius: 4px;\n        border-bottom-left-radius: 4px;\n    }\n\n    ${SingleBadge}:last-child {\n        border-top-right-radius: 4px;\n        border-bottom-right-radius: 4px;\n        border-top-left-radius: 0;\n        border-bottom-left-radius: 0;\n    }\n\n    ${SingleBadge}:only-child {\n        border-top-right-radius: 4px;\n        border-bottom-right-radius: 4px;\n        border-top-left-radius: 4px;\n        border-bottom-left-radius: 4px;\n    }\n`;\nconst DataUnionBadge = ({ memberCount, linkTo, linkHref, ...props }) => (React.createElement(BadgeContainer, { ...props },\n    React.createElement(SingleBadge, null, \"Data Union\"),\n    memberCount != null && (React.createElement(SingleBadge, null,\n        React.createElement(BadgeLink, { to: linkTo, href: linkHref }, memberCount),\n        \"\\u00A0 members\"))));\nconst BadgeLink = ({ ...props }) => React.createElement(Link, { ...props });\nconst StatsBadge = styled.div.withConfig({ displayName: \"StatsBadge\", componentId: \"sc-413ty4\" }) `\n    display: flex;\n    align-items: center;\n    padding: 4px 8px;\n    gap: 10px;\n    background: rgba(245, 245, 247, 0.6);\n    backdrop-filter: blur(13.3871px);\n    border-radius: 8px;\n\n    font-weight: 500;\n    font-size: 16px;\n    line-height: 24px;\n    color: #323232;\n\n    a,\n    a:link,\n    a:active,\n    a:focus,\n    a:hover,\n    a:visited {\n        color: white !important;\n    }\n\n    > * + * {\n        margin-left: 8px;\n    }\n`;\nconst StreamStatsBadge = ({ streamIds, ...props }) => {\n    const { data: stats, isLoading, error } = useMultipleStreamStatsQuery(streamIds);\n    if (error || isLoading) {\n        return null;\n    }\n    const messagesPerSecond = stats?.messagesPerSecond;\n    const formattedMsgRate = typeof messagesPerSecond === 'number' ? messagesPerSecond.toFixed(1) : 'N/A';\n    return (React.createElement(BadgeContainer, { ...props },\n        React.createElement(StatsBadge, null,\n            React.createElement(\"span\", null,\n                streamIds.length,\n                \" \",\n                streamIds.length === 1 ? 'Stream' : 'Streams'),\n            React.createElement(\"span\", null,\n                formattedMsgRate,\n                \" Msg/s\"))));\n};\nexport { DataUnionBadge, StreamStatsBadge };\n","import { useQuery } from '@tanstack/react-query';\nimport { getStreamStats } from '~/getters/getStreamStats';\nexport function useStreamStatsQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamStatsQuery', streamId],\n        queryFn: async () => {\n            return getStreamStats(streamId);\n        },\n    });\n}\nexport function useMultipleStreamStatsQuery(streamIds) {\n    return useQuery({\n        queryKey: ['useMultipleStreamStatsQuery', streamIds],\n        queryFn: async () => {\n            const stats = (await Promise.all(streamIds.map(getStreamStats)));\n            return stats.reduce((acc, curr) => ({\n                // Take the maximum latency among all streams\n                latency: Math.max(acc.latency ?? -Infinity, curr.latency ?? -Infinity) === -Infinity ? undefined : Math.max(acc.latency ?? -Infinity, curr.latency ?? -Infinity),\n                messagesPerSecond: acc.messagesPerSecond + curr.messagesPerSecond,\n                peerCount: acc.peerCount + curr.peerCount,\n            }), {\n                latency: undefined,\n                messagesPerSecond: 0,\n                peerCount: 0,\n            });\n        },\n    });\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport Skeleton from '~/shared/components/Skeleton';\nimport { MEDIUM, REGULAR, MD } from '~/shared/utils/styled';\nconst Name = styled.div.withConfig({ displayName: \"Name\", componentId: \"sc-1dfjvw\" }) ``;\nconst Secondary = styled.div.withConfig({ displayName: \"Secondary\", componentId: \"sc-yjzfhu\" }) `\n    font-size: 16px;\n    font-weight: ${REGULAR};\n`;\nconst Description = styled(Secondary).withConfig({ displayName: \"Description\", componentId: \"sc-josvxj\" }) `\n    color: #323232;\n    overflow-x: hidden;\n    text-overflow: ellipsis;\n    font-weight: ${REGULAR};\n    padding-top: 8px;\n`;\nconst Label = styled(Secondary).withConfig({ displayName: \"Label\", componentId: \"sc-3e4eol\" }) `\n    text-align: right;\n`;\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-2xtpek\" }) `\n    color: #323232;\n    font-size: 18px;\n    font-weight: ${MEDIUM};\n    line-height: 24px;\n    padding-top: 16px;\n\n    ${({ label }) => label &&\n    css `\n            display: grid;\n            grid-template-columns: auto auto;\n            grid-gap: 0.5em;\n        `};\n\n    @media (min-width: ${MD}px) {\n        padding-top: 24px;\n    }\n`;\nconst Summary = ({ name, description, label, skeletonize, ...props }) => (React.createElement(Root, { ...props, label: label },\n    React.createElement(\"div\", null,\n        React.createElement(Name, null,\n            React.createElement(Skeleton, { disabled: !skeletonize }, name)),\n        !!description && (React.createElement(Description, null,\n            React.createElement(Skeleton, { disabled: !skeletonize, width: \"45%\" }, description)))),\n    !!label && (React.createElement(Label, null,\n        React.createElement(Skeleton, { disabled: !skeletonize, width: \"30%\" }, label)))));\nexport default Summary;\n","import React from 'react';\nimport { Img } from 'react-image';\nimport styled, { css } from 'styled-components';\nimport { getProjectImageUrl } from '~/getters';\nimport Link from '~/shared/components/Link';\nimport Logo from '~/shared/components/Logo';\nimport Rect from '~/shared/components/Rect';\nimport Skeleton from '~/shared/components/Skeleton';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { DataUnionBadge, StreamStatsBadge } from './Badge';\nimport Summary from './Summary';\nconst Image = styled(Img).withConfig({ displayName: \"Image\", componentId: \"sc-1ne1cyd\" }) `\n    img& {\n        display: block;\n        object-fit: cover;\n    }\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-87kf1o\" }) `\n    background-image: linear-gradient(135deg, #0045ff 0%, #7200ee 100%);\n\n    ${Logo} {\n        height: auto;\n        left: 50%;\n        max-width: 32%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 80px;\n    }\n`;\nconst UnstyledThumbnail = ({ src, skeletonize, alt, ...props }) => !!src &&\n    (skeletonize ? (React.createElement(Image, { ...props, as: Skeleton, block: true })) : (React.createElement(Image, { ...props, alt: alt || undefined, src: src, loader: React.createElement(Image, { ...props, as: Skeleton, block: true }), unloader: React.createElement(Image, { ...props, as: Placeholder },\n            React.createElement(Logo, { color: \"black\", opacity: \"0.15\" })) })));\nconst TileThumbnail = styled(UnstyledThumbnail).withConfig({ displayName: \"TileThumbnail\", componentId: \"sc-1mq1rii\" }) `\n    height: 100%;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n`;\nconst Tile = styled.div.withConfig({ displayName: \"Tile\", componentId: \"sc-1gj0bx5\" }) `\n    position: relative;\n\n    ${({ suppressHover }) => !suppressHover &&\n    css `\n            ${TileThumbnail} {\n                filter: brightness(100%);\n                transition: 240ms ease-out filter;\n            }\n\n            :hover ${TileThumbnail} {\n                filter: brightness(70%);\n                transition-duration: 40ms;\n            }\n        `}\n`;\nconst EditButton = styled(Link).withConfig({ displayName: \"EditButton\", componentId: \"sc-1qdvtvh\" }) `\n    border: none;\n    border-radius: 100%;\n    background-color: white;\n    position: absolute;\n    bottom: 15px;\n    right: 15px;\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    opacity: 0;\n    svg {\n        color: ${COLORS.primary};\n    }\n`;\nconst UnstyledTileImageContainer = ({ children, height, autoSize: autoSizeProp, ...props }) => {\n    const autoSize = autoSizeProp === true || height != null;\n    return (React.createElement(\"div\", { ...props },\n        children,\n        !!autoSize && React.createElement(Rect, { height: height })));\n};\nconst TileImageContainer = styled(UnstyledTileImageContainer).withConfig({ displayName: \"TileImageContainer\", componentId: \"sc-1a3zut4\" }) `\n    border-radius: 16px;\n    overflow: hidden;\n    position: relative;\n\n    & & {\n        border-radius: 0;\n        overflow: visible;\n    }\n\n    &.no-border-radius {\n        border-radius: 0;\n    }\n\n    &:hover {\n        ${EditButton} {\n            opacity: 1;\n        }\n    }\n`;\nconst ImageTile = ({ alt, height, showDataUnionBadge, src, noBorderRadius, ...props }) => (React.createElement(Tile, { ...props, suppressHover: true },\n    React.createElement(TileImageContainer, { autoSize: true, height: height, className: noBorderRadius ? 'no-border-radius' : '' },\n        React.createElement(TileThumbnail, { alt: alt || '', src: src || '' }),\n        !!showDataUnionBadge && React.createElement(DataUnionBadge, { top: true, left: true }))));\nfunction MarketplaceProductTile({ product, showDataUnionBadge, showEditButton, ...props }) {\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Tile, { ...props },\n        React.createElement(TileImageContainer, null,\n            React.createElement(Link, { to: R.projectOverview(product.id, routeOptions(chainKey)) },\n                React.createElement(TileImageContainer, { autoSize: true },\n                    React.createElement(TileThumbnail, { src: getProjectImageUrl(chainId, {\n                            ...product.metadata,\n                            imageIpfsCid: product.metadata.imageIpfsCid || undefined,\n                        }) || '' }))),\n            React.createElement(StreamStatsBadge, { top: true, left: true, streamIds: product.streams }),\n            !!showDataUnionBadge && (React.createElement(DataUnionBadge, { top: true, right: true, linkTo: R.projectOverview(product.id, routeOptions(chainKey, undefined, 'stats')) })),\n            showEditButton && (React.createElement(EditButton, { to: R.projectEdit(product.id, routeOptions(chainKey)) },\n                React.createElement(SvgIcon, { name: 'pencilFull' })))),\n        React.createElement(Link, { to: R.projectOverview(product.id, routeOptions(chainKey)) },\n            React.createElement(Summary, { name: (product.metadata && product.metadata.name) || 'Untitled project', description: (product.metadata && product.metadata.creator) || '' }))));\n}\nexport { ImageTile, MarketplaceProductTile };\n","import React from 'react';\nimport styled, { keyframes } from 'styled-components';\nexport function DottedLoadingIndicator() {\n    return (React.createElement(DottedLoadingIndicatorRoot, null,\n        React.createElement(Left, null),\n        React.createElement(Dot, null),\n        React.createElement(Right, null)));\n}\nconst animation = keyframes `\n    0% {\n        transform: scale(1);\n    }\n\n    100% {\n        transform: scale(0);\n    }\n`;\nexport const DottedLoadingIndicatorRoot = styled.div.withConfig({ displayName: \"DottedLoadingIndicatorRoot\", componentId: \"sc-4z9k0y\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: 16px 16px 16px;\n    margin: 0 auto;\n    width: max-content;\n`;\nconst Dot = styled.div.withConfig({ displayName: \"Dot\", componentId: \"sc-67n4hr\" }) `\n    animation: ${animation} 1s ease alternate infinite;\n    animation-delay: 0.2s;\n    background: #0052ec;\n    border-radius: 50%;\n    height: 16px;\n    width: 16px;\n`;\nconst Left = styled(Dot).withConfig({ displayName: \"Left\", componentId: \"sc-1e5uytz\" }) `\n    animation-delay: 0s;\n`;\nconst Right = styled(Dot).withConfig({ displayName: \"Right\", componentId: \"sc-1o30h4i\" }) `\n    animation-delay: 0.4s;\n`;\n","import React from 'react';\nimport { EmptyState } from '~/components/EmptyState';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport { useCurrentChainFullName } from '~/utils/chains';\nexport default function NoProductsView({ noOwnProjects = false }) {\n    const fullChainName = useCurrentChainFullName();\n    return (React.createElement(EmptyState, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"Not found\" }) }, noOwnProjects ? (React.createElement(\"p\", null,\n        React.createElement(\"span\", null,\n            \"You haven't created any projects on the \",\n            fullChainName,\n            \" chain yet\"))) : (React.createElement(\"p\", null,\n        React.createElement(\"span\", null, \"We couldn't find anything to match your search\"),\n        React.createElement(\"small\", null,\n            \"You are on the \",\n            fullChainName,\n            \" chain. Please try some different keywords or switch chains.\")))));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { MarketplaceProductTile } from '~/shared/components/Tile';\nimport { DESKTOP, COLORS, TABLET, MAX_BODY_WIDTH, LAPTOP } from '~/shared/utils/styled';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { DottedLoadingIndicator, DottedLoadingIndicatorRoot, } from '~/components/DottedLoadingIndicator';\nimport NoProductsView from './NoProductsView';\nconst MarketplaceProjectRow = styled.div.withConfig({ displayName: \"MarketplaceProjectRow\", componentId: \"sc-264ptu\" }) `\n    display: grid;\n    grid-gap: 36px;\n    grid-template-columns: 1fr;\n    margin: 0;\n    min-height: 100px;\n\n    @media ${TABLET} {\n        grid-template-columns: 1fr 1fr;\n    }\n\n    @media ${LAPTOP} {\n        grid-template-columns: 1fr 1fr 1fr 1fr;\n    }\n\n    ${({ $fetching = false }) => $fetching &&\n    css `\n            opacity: 0.5;\n        `}\n`;\nconst listProjects = (projects, currentUserAddress, isFetching) => {\n    const isEditable = (projectId) => {\n        if (!currentUserAddress) {\n            return false;\n        }\n        const project = projects.find((p) => p.id === projectId);\n        if (project != null) {\n            const perm = project.permissions.find((permission) => permission.userAddress.toLowerCase() ===\n                currentUserAddress.toLowerCase());\n            if (perm != null) {\n                return perm.canEdit;\n            }\n            return false;\n        }\n        return false;\n    };\n    return (React.createElement(MarketplaceProjectRow, { \"$fetching\": isFetching }, projects.map((project) => (React.createElement(MarketplaceProductTile, { key: project.id, product: project, showDataUnionBadge: !!project.isDataUnion, showEditButton: isEditable(project.id) })))));\n};\nexport const ProjectsContainer = styled.div.withConfig({ displayName: \"ProjectsContainer\", componentId: \"sc-i8qn2b\" }) `\n    padding: 40px 30px 3.5em 30px;\n    background-color: ${COLORS.secondary};\n    max-width: ${MAX_BODY_WIDTH}px;\n    margin: 0 auto;\n\n    @media ${DESKTOP} {\n        padding: 72px 0 7em 0;\n    }\n`;\nexport function Projects({ projects, error, isFetching, loadProducts, hasMoreSearchResults, currentUserAddress, noOwnProjects = false, ...props }) {\n    return (React.createElement(Root, { ...props },\n        error ? React.createElement(Error, null, error.message) : null,\n        isFetching || projects.length > 0 ? (listProjects(projects, currentUserAddress, isFetching)) : (React.createElement(NoProductsView, { noOwnProjects: noOwnProjects })),\n        loadProducts && !isFetching && hasMoreSearchResults && (React.createElement(LoadMoreButton, { onClick: loadProducts, kind: \"primary2\" }, \"Load more\")),\n        isFetching && React.createElement(DottedLoadingIndicator, null)));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1qmlimh\" }) `\n    ${DottedLoadingIndicatorRoot} {\n        margin-top: 1.5rem;\n    }\n`;\nconst Error = styled.div.withConfig({ displayName: \"Error\", componentId: \"sc-rjgtxr\" }) `\n    background: rgba(255, 25, 0, 0.4);\n    border-radius: 2px;\n    font-size: 0.9em;\n    padding: 1em 2em;\n`;\n","import React, { useState, useCallback, useMemo, useEffect } from 'react';\nimport { useLocation } from 'react-router-dom';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nconst ModalContext = React.createContext({\n    closeModal: () => { },\n    modals: {},\n    openModal: async () => { },\n});\nfunction useModalContext(path) {\n    const [modals, setModals] = useState({});\n    const isMounted = useIsMounted();\n    const openModal = useCallback((modalId, value = true) => {\n        if (!isMounted()) {\n            return Promise.resolve();\n        }\n        if (modals[modalId] && typeof modals[modalId].reject === 'function') {\n            modals[modalId].reject();\n        }\n        return new Promise((resolve, reject) => {\n            setModals(({ modals: prevModals }) => ({\n                ...prevModals,\n                [modalId]: {\n                    resolve,\n                    reject,\n                    value,\n                },\n            }));\n        });\n    }, [modals, isMounted]);\n    const closeModal = useCallback((modalId, value = undefined) => {\n        if (!isMounted()) {\n            return;\n        }\n        if (modals[modalId] && typeof modals[modalId].resolve === 'function') {\n            modals[modalId].resolve(value);\n        }\n        setModals(({ modals: prevModals }) => {\n            const nextModals = { ...prevModals };\n            delete nextModals[modalId];\n            return nextModals;\n        });\n    }, [modals, isMounted]);\n    // close all modals on route change\n    useEffect(() => () => {\n        if (!isMounted()) {\n            return;\n        }\n        setModals((prevModals) => {\n            Object.keys(prevModals).forEach((modalId) => {\n                if (prevModals[modalId].reject &&\n                    typeof prevModals[modalId].reject === 'function') {\n                    prevModals[modalId].reject();\n                }\n            });\n            return {};\n        });\n    }, [isMounted, path]);\n    return useMemo(() => ({\n        modals,\n        openModal,\n        closeModal,\n    }), [modals, openModal, closeModal]);\n}\nconst ModalContextProvider = ({ children }) => {\n    const { pathname } = useLocation();\n    return (React.createElement(ModalContext.Provider, { value: useModalContext(pathname) }, children || null));\n};\nexport { ModalContextProvider as Provider, ModalContext as Context };\n","import { useContext, useMemo } from 'react';\nimport { Context as ModalContext } from '~/shared/contexts/ModalApi';\nexport default function useModal(modalId) {\n    const { modals, openModal, closeModal } = useContext(ModalContext);\n    const isOpen = !!modals[modalId];\n    const value = isOpen && modals[modalId].value;\n    const api = useMemo(() => ({\n        open: (values) => openModal(modalId, values),\n        close: (values) => closeModal(modalId, values),\n    }), [openModal, closeModal, modalId]);\n    return useMemo(() => ({\n        modalId,\n        isOpen,\n        api,\n        value,\n    }), [value, modalId, isOpen, api]);\n}\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useMemo, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport openDataImage from '~/marketplace/assets/open-data.png';\nimport openDataImage2x from '~/marketplace/assets/open-data@2x.png';\nimport paidDataImage from '~/marketplace/assets/paid-data.png';\nimport paidDataImage2x from '~/marketplace/assets/paid-data@2x.png';\nimport dataUnionImage from '~/marketplace/assets/product_dataunion.png';\nimport dataUnionImage2x from '~/marketplace/assets/product_dataunion@2x.png';\nimport { getPagedStreams } from '~/services/streams';\nimport { Radio } from '~/shared/components/Radio';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS, DESKTOP, REGULAR } from '~/shared/utils/styled';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1k01pp0\" }) `\n    color: #323232;\n    background-color: white;\n    padding: 60px;\n`;\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1a4ta78\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n`;\nconst PageTitle = styled.div.withConfig({ displayName: \"PageTitle\", componentId: \"sc-1fkakxa\" }) `\n    font-size: 24px;\n    letter-spacing: 0;\n    line-height: 24px;\n`;\nconst ProductChoices = styled.div.withConfig({ displayName: \"ProductChoices\", componentId: \"sc-5wjmgj\" }) `\n    margin-top: 6.25em;\n    display: grid;\n    grid-template-columns: auto;\n    grid-template-rows: auto;\n    grid-row-gap: 24px;\n    min-width: 600px;\n    @media (${DESKTOP}) {\n        grid-template-columns: 308px 308px 308px;\n        grid-template-rows: auto;\n        grid-column-gap: 24px;\n    }\n`;\nconst Product = styled.button.withConfig({ displayName: \"Product\", componentId: \"sc-qolz2u\" }) `\n    display: grid;\n    grid-row-gap: 1px;\n    box-shadow: 0 0 10px 0 #00000026;\n    cursor: pointer;\n    border: none;\n    background-color: transparent;\n    border-radius: 8px;\n    grid-template-columns: 20px auto 50px;\n    grid-template-rows: auto;\n    padding: 10px 20px;\n    align-items: center;\n    @media (${DESKTOP}) {\n        padding: 0;\n        grid-template-columns: auto;\n        grid-template-rows: auto auto auto;\n    }\n\n    &:disabled {\n        opacity: 0.6;\n        cursor: default;\n    }\n`;\nconst ProductTitle = styled.div.withConfig({ displayName: \"ProductTitle\", componentId: \"sc-36ndzh\" }) `\n    line-height: 16px;\n    font-size: 18px;\n    letter-spacing: 0;\n    font-weight: ${REGULAR};\n    color: ${COLORS.primary};\n    margin: 24px 0 20px 20px;\n    grid-column-start: 2;\n    grid-column-end: 2;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    text-align: left;\n    @media (${DESKTOP}) {\n        margin: 30px 0 40px;\n        text-align: center;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        height: 40px;\n        align-items: center;\n        display: flex;\n        justify-content: center;\n    }\n`;\nconst ProductImage = styled.div.withConfig({ displayName: \"ProductImage\", componentId: \"sc-5tnxw6\" }) `\n    height: 50px;\n    grid-column-start: 3;\n    grid-column-end: 3;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    @media (${DESKTOP}) {\n        height: 160px;\n        margin: 27px 0;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        grid-row-start: 2;\n        grid-row-end: 2;\n    }\n\n    > img {\n        margin: 0 auto;\n        height: 50px;\n        width: auto;\n        @media (${DESKTOP}) {\n            height: 140px;\n        }\n    }\n`;\nconst RadioWrap = styled.div.withConfig({ displayName: \"RadioWrap\", componentId: \"sc-1o987iy\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: 20px auto;\n    grid-column-start: 1;\n    grid-column-end: 1;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    @media (${DESKTOP}) {\n        grid-row-start: 3;\n        grid-row-end: 3;\n        margin: 40px auto;\n    }\n`;\nconst CloseButton = styled.button.withConfig({ displayName: \"CloseButton\", componentId: \"sc-fkm3ae\" }) `\n    color: ${COLORS.close};\n    line-height: 14px;\n    cursor: pointer;\n    padding: 0.5rem;\n    margin: 0;\n    background: none;\n    outline: none;\n    border: none;\n\n    &:disabled {\n        opacity: 0.2;\n        cursor: not-allowed;\n    }\n\n    & > svg {\n        width: 14px;\n        height: 14px;\n    }\n`;\nconst NoStreamsWarningBox = styled.div.withConfig({ displayName: \"NoStreamsWarningBox\", componentId: \"sc-age1ag\" }) `\n    background-color: ${COLORS.warning};\n    padding: 12px;\n    color: ${COLORS.primaryLight};\n    margin-top: 24px;\n`;\nconst ButtonContainer = styled.div.withConfig({ displayName: \"ButtonContainer\", componentId: \"sc-t2ye67\" }) `\n    display: flex;\n    justify-content: flex-end;\n    margin-top: 40px;\n`;\nexport const ProjectTypeChooser = ({ className, onClose }) => {\n    const [selectedProductType, setSelectedProductType] = useState();\n    const chainKey = useCurrentChainKey();\n    const link = useMemo(() => {\n        if (!selectedProductType) {\n            return null;\n        }\n        return R.project('new', routeOptions(chainKey, { type: selectedProductType }));\n    }, [selectedProductType, chainKey]);\n    const gotAnyStreams = useGotAnyStreams();\n    return (React.createElement(Root, { className: className },\n        React.createElement(PageTitleContainer, null,\n            React.createElement(PageTitle, null, \"Choose your project type\"),\n            React.createElement(CloseButton, { type: \"button\", onClick: onClose },\n                React.createElement(SvgIcon, { name: \"crossMedium\" }))),\n        React.createElement(ProductChoices, null,\n            React.createElement(Product, { onClick: () => setSelectedProductType(ProjectType.OpenData) },\n                React.createElement(ProductTitle, null, \"Open data\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: openDataImage, srcSet: `${openDataImage2x} 2x`, alt: \"Open Data\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'openData', name: 'productType', size: 'large', label: '', value: ProjectType.OpenData, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.OpenData }))),\n            React.createElement(Product, { onClick: () => setSelectedProductType(ProjectType.PaidData) },\n                React.createElement(ProductTitle, null, \"Paid data\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: paidDataImage, srcSet: `${paidDataImage2x} 2x`, alt: \"Paid Data\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'paidData', name: 'productType', size: 'large', label: '', value: ProjectType.PaidData, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.PaidData }))),\n            React.createElement(Product, { disabled: true, onClick: () => setSelectedProductType(ProjectType.DataUnion), title: 'Data Union' },\n                React.createElement(ProductTitle, null, \"Data Union\"),\n                React.createElement(ProductImage, null,\n                    React.createElement(\"img\", { src: dataUnionImage, srcSet: `${dataUnionImage2x} 2x`, alt: \"Data Union\" })),\n                React.createElement(RadioWrap, null,\n                    React.createElement(Radio, { id: 'dataUnion', name: 'productType', size: 'large', label: '', value: ProjectType.DataUnion, onChange: setSelectedProductType, checked: selectedProductType === ProjectType.DataUnion })))),\n        gotAnyStreams === false && (React.createElement(NoStreamsWarningBox, null,\n            \"You have not created any streams yet. Please\",\n            ' ',\n            React.createElement(Link, { onClick: onClose, to: R.stream('new', routeOptions(chainKey)) }, \"create a stream\"),\n            ' ',\n            \"to get started. For help creating streams, see the\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs() }, \"docs\"),\n            \".\")),\n        React.createElement(ButtonContainer, null, gotAnyStreams === false || !link ? (React.createElement(Button, { disabled: true }, \"Start building\")) : (React.createElement(Button, { as: Link, to: link, onClick: onClose }, \"Start building\")))));\n};\nfunction useGotAnyStreams() {\n    const wallet = useWalletAccount() || '';\n    const currentChainId = useCurrentChainId();\n    const { data: result = false, isLoading } = useQuery({\n        queryKey: ['useGotAnyStreams', currentChainId, wallet],\n        async queryFn() {\n            if (!wallet) {\n                return false;\n            }\n            try {\n                return ((await getPagedStreams(currentChainId, 1, undefined, wallet, undefined, undefined, undefined, { force: true })).streams.length > 0);\n            }\n            catch (_) { }\n            return false;\n        },\n    });\n    return isLoading ? void 0 : result;\n}\n","import React from 'react';\nconst defaultContext = {\n    isModalOpen: false,\n    registerModal: undefined,\n    unregisterModal: undefined,\n};\nconst ModalPortalContext = React.createContext(defaultContext);\nclass ModalPortalProvider extends React.Component {\n    constructor() {\n        super(...arguments);\n        this.state = {\n            isModalOpen: false,\n            registerModal: this.registerModal.bind(this),\n            unregisterModal: this.unregisterModal.bind(this),\n        };\n        this.count = 0;\n    }\n    registerModal() {\n        this.count = this.count + 1;\n        this.setState({\n            isModalOpen: true,\n        });\n    }\n    unregisterModal() {\n        this.count = this.count - 1;\n        if (this.count < 0) {\n            throw new Error('Negative number of open modals. Something went surprisingly wrong.');\n        }\n        this.setState({\n            isModalOpen: this.count !== 0,\n        });\n    }\n    render() {\n        const { children } = this.props;\n        const { isModalOpen, registerModal, unregisterModal } = this.state;\n        return (React.createElement(\"div\", { id: \"app\" },\n            React.createElement(ModalPortalContext.Provider, { value: {\n                    isModalOpen,\n                    registerModal,\n                    unregisterModal,\n                } }, children)));\n    }\n}\nexport { ModalPortalContext as Context, ModalPortalProvider as Provider };\n","export default class NoModalRootError extends Error {\n    constructor() {\n        super('Root element for modals is missing.');\n        this.__proto__ = NoModalRootError.prototype; // eslint-disable-line no-proto\n    }\n}\n","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport { Context } from '~/shared/contexts/ModalPortal';\nimport NoModalRootError from '~/shared/errors/NoModalRootError';\nclass ModalPortal extends React.Component {\n    constructor() {\n        super(...arguments);\n        this.root = document.createElement('div');\n    }\n    componentDidMount() {\n        this.modalRoot = document.getElementById('modal-root');\n        const { registerModal } = this.context || {};\n        if (!this.modalRoot) {\n            throw new NoModalRootError();\n        }\n        this.modalRoot.appendChild(this.root);\n        registerModal?.();\n    }\n    componentWillUnmount() {\n        const { unregisterModal } = this.context || {};\n        const { modalRoot, root } = this;\n        modalRoot?.removeChild(root);\n        unregisterModal?.();\n    }\n    render() {\n        return createPortal(this.props.children, this.root);\n    }\n}\nModalPortal.contextType = Context;\nexport default ModalPortal;\n","import ReactModal2 from 'react-modal2';\n// See: https://github.com/cloudflare/react-modal2#accessibility\nReactModal2.getApplicationElement = () => document.getElementById('app');\n","import React from 'react';\nimport styled, { createGlobalStyle, css } from 'styled-components';\nimport ReactModal2 from 'react-modal2';\nimport './accessibility';\nconst Fullpage = styled.div.withConfig({ displayName: \"Fullpage\", componentId: \"sc-cv5ic5\" }) `\n    position: fixed;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    background-color: rgba(239, 239, 239, 0.98);\n    z-index: 10;\n\n    ${({ noScroll }) => !noScroll &&\n    css `\n            overflow-y: scroll;\n        `}\n`;\nconst NoScrollStyles = createGlobalStyle `\n    body {\n        overflow: hidden !important;\n        overflow-y: hidden !important;\n        overflow-x: hidden !important;\n    }\n`;\nconst ModalDialog = ({ onClose, children, className, backdropClassName, fullpage, noScroll = false, ...otherProps }) => (React.createElement(ReactModal2, { onClose: onClose, backdropClassName: backdropClassName, modalClassName: className, ...otherProps },\n    React.createElement(NoScrollStyles, null),\n    fullpage ? React.createElement(Fullpage, { noScroll: noScroll }, children) : children));\nexport default ModalDialog;\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport useModal from '~/shared/hooks/useModal';\nimport { ProjectTypeChooser } from '~/marketplace/components/ProjectTypeChooser';\nimport ModalPortal from '~/shared/components/ModalPortal';\nimport ModalDialog from '~/shared/components/ModalDialog';\nconst StyledProjectTypeChooser = styled(ProjectTypeChooser).withConfig({ displayName: \"StyledProjectTypeChooser\", componentId: \"sc-wgfmea\" }) `\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n`;\nconst CreateProjectModal = ({ api }) => {\n    const onClose = useCallback(() => {\n        api.close();\n    }, [api]);\n    return (React.createElement(ModalPortal, null,\n        React.createElement(ModalDialog, { onClose: onClose, fullpage: true },\n            React.createElement(StyledProjectTypeChooser, { onClose: onClose }))));\n};\nconst CreateProjectModalWrap = () => {\n    const { api, isOpen } = useModal('marketplace.createProduct');\n    if (!isOpen) {\n        return null;\n    }\n    return React.createElement(CreateProjectModal, { api: api });\n};\nexport default CreateProjectModalWrap;\n","import { keepPreviousData, useInfiniteQuery } from '@tanstack/react-query';\nimport isEqual from 'lodash/isEqual';\nimport React, { useReducer } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport ActionBar, { isOwnedTabOption, isTabOption, TabOption, } from '~/components/ActionBar';\nimport Layout from '~/components/Layout';\nimport { MaxSearchPhraseLength, Minute } from '~/consts';\nimport { Projects, ProjectsContainer } from '~/marketplace/components/Projects';\nimport CreateProjectModal from '~/marketplace/containers/CreateProjectModal';\nimport { getProjects, getProjectsByText } from '~/services/projects';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport useModal from '~/shared/hooks/useModal';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nconst PAGE_SIZE = 20;\nconst DEFAULT_TAB = TabOption.Any;\nconst DEFAULT_SEARCH = '';\nconst DEFAULT_TYPE = '';\nfunction filterReducer(state, partial) {\n    const proposalState = { ...state, ...partial };\n    proposalState.search = proposalState.search.slice(0, MaxSearchPhraseLength);\n    return isEqual(state, proposalState) ? state : proposalState;\n}\nexport default function ProjectListingPage() {\n    const [params] = useSearchParams();\n    const DefaultFilter = {\n        search: params.get('search') || DEFAULT_SEARCH,\n        type: params.get('type') || DEFAULT_TYPE,\n    };\n    const [filter, setFilter] = useReducer(filterReducer, DefaultFilter);\n    const account = useWalletAccount();\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const owner = isOwnedTabOption(selectedTab) ? account : undefined;\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'search',\n            value: filter.search,\n            defaultValue: DEFAULT_SEARCH,\n        },\n        {\n            param: 'type',\n            value: filter.type,\n            defaultValue: DEFAULT_TYPE,\n        },\n    ]);\n    const { api: createProductModal } = useModal('marketplace.createProduct');\n    const currentChainId = useCurrentChainId();\n    const query = useInfiniteQuery({\n        queryKey: ['projects', currentChainId, owner, filter.search, filter.type],\n        queryFn({ pageParam: skip }) {\n            const { search, type: projectType } = filter;\n            const params = {\n                chainId: currentChainId,\n                first: PAGE_SIZE,\n                owner,\n                projectType,\n                skip,\n            };\n            if (search) {\n                return getProjectsByText(search, params);\n            }\n            return getProjects(params);\n        },\n        initialPageParam: 0,\n        getNextPageParam(lastPage, pages) {\n            return lastPage.hasNextPage ? pages.flatMap((p) => p.projects).length : null;\n        },\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n    const noOwnProjects = !!owner && !filter.search && !filter.type;\n    return (React.createElement(Layout, { pageTitle: \"Projects\" },\n        React.createElement(ActionBar, { filter: filter, onFilterChange: setFilter, onCreateProject: () => void createProductModal.open() }),\n        React.createElement(LoadingIndicator, { loading: query.isLoading || query.isFetching || query.isFetchingNextPage }),\n        React.createElement(CreateProjectModal, null),\n        React.createElement(ProjectsContainer, null,\n            React.createElement(Projects, { projects: query.data?.pages.flatMap((d) => d.projects) ?? [], currentUserAddress: account, error: query.error, isFetching: query.status === 'pending', loadProducts: () => void query.fetchNextPage(), hasMoreSearchResults: query.hasNextPage, noOwnProjects: noOwnProjects }))));\n}\n","import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-query';\nimport uniqueId from 'lodash/uniqueId';\nimport { Minute, address0 } from '~/consts';\nimport { GetGlobalStreamsStatsDocument, GetStreamsDocument as GetIndexerStreamsDocument, StreamOrderBy as IndexerOrderBy, OrderDirection as IndexerOrderDirection, } from '~/generated/gql/indexer';\nimport { GetPagedStreamsDocument, OrderDirection as GraphOrderDirection, Stream_OrderBy, } from '~/generated/gql/network';\nimport { getDescription } from '~/getters';\nimport { getGraphClient, getIndexerClient } from '~/getters/getGraphClient';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { getChainConfigExtension, useCurrentChainId } from '~/utils/chains';\nexport var StreamsTabOption;\n(function (StreamsTabOption) {\n    StreamsTabOption[\"All\"] = \"all\";\n    StreamsTabOption[\"Your\"] = \"your\";\n})(StreamsTabOption || (StreamsTabOption = {}));\nexport function isStreamsTabOption(value) {\n    return value === StreamsTabOption.All || value === StreamsTabOption.Your;\n}\nexport async function getStreamsFromIndexer(chainId, options = {}) {\n    const { force = false, orderBy, orderDirection, owner, pageParam: cursor, pageSize, search, streamIds: streamIdsOption, } = options;\n    const client = getIndexerClient(chainId);\n    if (!client) {\n        return {\n            hasNextPage: false,\n            nextPageParam: null,\n            pageId: uniqueId('StreamsPage-'),\n            source: 'indexer',\n            streams: [],\n        };\n    }\n    const streamIds = !owner || owner === address0\n        ? streamIdsOption\n        : await (async () => {\n            /**\n             * Indexer keeps track of stream owners but have no information on secondary\n             * permissions. Here we ask the regular graph for stream ids for the current\n             * address and use them to query the indexer. Hacky.\n             */\n            try {\n                const where = {\n                    permissions_: {\n                        stream_contains_nocase: search,\n                        userId: owner,\n                    },\n                };\n                if (!where.permissions_?.stream_contains_nocase) {\n                    delete where.permissions_?.stream_contains_nocase;\n                }\n                const { data: { streams: result }, } = await getGraphClient(chainId).query({\n                    query: GetPagedStreamsDocument,\n                    variables: {\n                        first: 1000,\n                        where,\n                    },\n                    fetchPolicy: 'network-only',\n                });\n                return result.map(({ id }) => id);\n            }\n            catch (_) {\n                return [];\n            }\n        })();\n    const { data: { streams: result }, } = await client.query({\n        fetchPolicy: force ? 'network-only' : undefined,\n        query: GetIndexerStreamsDocument,\n        variables: {\n            streamIds,\n            first: pageSize,\n            orderBy: orderBy === 'mps'\n                ? IndexerOrderBy.MessagesPerSecond\n                : orderBy === 'peerCount'\n                    ? IndexerOrderBy.PeerCount\n                    : orderBy === 'bps'\n                        ? IndexerOrderBy.BytesPerSecond\n                        : undefined,\n            orderDirection: orderDirection === 'asc'\n                ? IndexerOrderDirection.Asc\n                : orderDirection === 'desc'\n                    ? IndexerOrderDirection.Desc\n                    : undefined,\n            search,\n            owner: undefined,\n            cursor,\n        },\n    });\n    const streams = result.items.map(({ id, bytesPerSecond, messagesPerSecond, peerCount, ...s }) => ({\n        bytesPerSecond,\n        description: s.description || '',\n        id,\n        messagesPerSecond,\n        peerCount,\n        publisherCount: s.publisherCount || undefined,\n        subscriberCount: s.subscriberCount || undefined,\n    }));\n    return {\n        hasNextPage: result.cursor != null,\n        nextPageParam: result.cursor || null,\n        pageId: uniqueId('StreamsPage-'),\n        source: 'indexer',\n        streams,\n    };\n}\nasync function getStreamsFromGraph(chainId, options = {}) {\n    const { force = false, orderBy, orderDirection: orderDirectionParam, owner, pageParam: lastId, pageSize = 10, search, streamIds, } = options;\n    const orderOperator = orderDirectionParam === 'asc' ? 'gt' : 'lt';\n    const orderDirection = orderDirectionParam === 'asc'\n        ? GraphOrderDirection.Asc\n        : orderDirectionParam === 'desc'\n            ? GraphOrderDirection.Desc\n            : undefined;\n    const where = {\n        permissions_: {\n            stream_contains_nocase: search,\n            userId: owner,\n        },\n        [`id_${orderOperator}`]: lastId,\n        id_in: streamIds,\n    };\n    if (!where.permissions_?.stream_contains_nocase) {\n        delete where.permissions_?.stream_contains_nocase;\n    }\n    if (!where.permissions_?.userId) {\n        delete where.permissions_?.userId;\n    }\n    if (Object.keys(where.permissions_ || {}).length === 0) {\n        delete where.permissions_;\n    }\n    if (where[`id_${orderOperator}`] == null) {\n        delete where[`id_${orderOperator}`];\n    }\n    if (where.id_lt === '0') {\n        delete where.id_lt;\n    }\n    if (!where.id_in) {\n        delete where.id_in;\n    }\n    const { data: { streams: result }, } = await getGraphClient(chainId).query({\n        query: GetPagedStreamsDocument,\n        variables: {\n            first: pageSize + 1,\n            orderBy: orderBy === 'id' ? Stream_OrderBy.Id : undefined,\n            orderDirection,\n            where,\n        },\n        fetchPolicy: force ? 'network-only' : void 0,\n    });\n    const streams = result.map((s) => {\n        const { publisherCount, subscriberCount } = getStatsFromPermissions(s.permissions?.map((p) => ({\n            ...p,\n            userAddress: p.userId, // We need to add this deprecated field for now\n        })) || []);\n        return {\n            bytesPerSecond: undefined,\n            description: getDescription(s),\n            id: s.id,\n            messagesPerSecond: undefined,\n            peerCount: undefined,\n            publisherCount,\n            subscriberCount,\n        };\n    });\n    return {\n        hasNextPage: streams.length > pageSize,\n        nextPageParam: streams.length ? streams[streams.length - 1].id : null,\n        pageId: uniqueId('StreamsPage-'),\n        source: 'graph',\n        streams,\n    };\n}\nexport function useStreamsQuery(options) {\n    const { orderBy, orderDirection, pageSize = 10, search, tab, streamIds } = options;\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    return useInfiniteQuery({\n        queryKey: [\n            'useStreamsQuery',\n            chainId,\n            account,\n            orderBy,\n            orderDirection,\n            pageSize,\n            search,\n            tab,\n            ...(streamIds || []),\n        ],\n        queryFn: async ({ pageParam }) => {\n            const owner = tab === StreamsTabOption.Your ? account || address0 : undefined;\n            const getter = isIndexerColumn(chainId, orderBy)\n                ? getStreamsFromIndexer\n                : getStreamsFromGraph;\n            const { streams, nextPageParam, hasNextPage, source, pageId } = await getter(chainId, {\n                force: true,\n                orderBy,\n                orderDirection,\n                owner: owner?.toLowerCase(),\n                pageParam,\n                pageSize,\n                search: search?.toLowerCase() || undefined,\n                streamIds,\n            });\n            return {\n                hasNextPage,\n                nextPageParam,\n                pageId,\n                source,\n                streams,\n            };\n        },\n        initialPageParam: '0',\n        getNextPageParam: ({ hasNextPage, nextPageParam }) => hasNextPage ? nextPageParam : null,\n        staleTime: Minute,\n        placeholderData: keepPreviousData,\n    });\n}\nexport function isIndexerColumn(chainId, orderBy) {\n    if (!getChainConfigExtension(chainId).streamIndexerUrl) {\n        return false;\n    }\n    return orderBy === 'mps' || orderBy === 'peerCount' || orderBy === 'bps';\n}\nfunction getStatsFromPermissions(permissions) {\n    let subscriberCount = 0;\n    let publisherCount = 0;\n    permissions.forEach((perm) => {\n        if (perm.userId === address0) {\n            /**\n             * If stream has public permissions (zero address), return `undefined`\n             * for counts. It means anyone can publish and subscribe.\n             */\n            if (perm.subscribeExpiration >= Math.round(Date.now() / 1000)) {\n                subscriberCount = undefined;\n            }\n            if (perm.publishExpiration >= Math.round(Date.now() / 1000)) {\n                publisherCount = undefined;\n            }\n        }\n        if (perm.subscribeExpiration >= Math.round(Date.now() / 1000) &&\n            subscriberCount != null) {\n            subscriberCount += 1;\n        }\n        if (perm.publishExpiration >= Math.round(Date.now() / 1000) &&\n            publisherCount != null) {\n            publisherCount += 1;\n        }\n    });\n    return {\n        subscriberCount,\n        publisherCount,\n    };\n}\nexport function useGlobalStreamStatsQuery() {\n    const chainId = useCurrentChainId();\n    return useQuery({\n        queryKey: ['useGlobalStreamStatsQuery', chainId],\n        queryFn: async () => {\n            const client = getIndexerClient(chainId);\n            if (!client) {\n                return null;\n            }\n            try {\n                const result = await client.query({\n                    query: GetGlobalStreamsStatsDocument,\n                });\n                const { bytesPerSecond, messagesPerSecond, streamCount } = result.data.summary;\n                return {\n                    bytesPerSecond,\n                    messagesPerSecond,\n                    streamCount,\n                };\n            }\n            catch (e) {\n                console.warn('Fetching global streams stats failed', e);\n            }\n            return null;\n        },\n    });\n}\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { LoadMoreButton } from '~/components/LoadMore';\nimport { StreamIdCell } from '~/components/Table';\nimport { Minute } from '~/consts';\nimport { getStreamsFromIndexer, isIndexerColumn, } from '~/hooks/streams';\nimport { ScrollTableCore } from '~/shared/components/ScrollTable/ScrollTable';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function QueriedStreamsTable({ noDataFirstLine, noDataSecondLine, onOrderChange, orderBy = 'mps', orderDirection, query, }) {\n    const pages = query.data?.pages || [];\n    const streams = pages.flatMap((d) => d.streams) || [];\n    const [streamStats, setStreamStats] = useState({});\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    const indexerQueryErrored = query.isError && isIndexerColumn(chainId, orderBy);\n    const onOrderChangeRef = useRef(onOrderChange);\n    if (onOrderChangeRef.current !== onOrderChange) {\n        onOrderChangeRef.current = onOrderChange;\n    }\n    useEffect(function fallbackToGraphOnIndexerError() {\n        if (!indexerQueryErrored) {\n            return;\n        }\n        onOrderChangeRef.current?.('id', 'asc');\n    }, [indexerQueryErrored]);\n    return (React.createElement(React.Fragment, null,\n        pages.map((page) => (React.createElement(StreamStatsLoader, { key: page.pageId, page: page, onStats: (stats) => {\n                setStreamStats((current) => ({\n                    ...current,\n                    ...stats,\n                }));\n            } }))),\n        React.createElement(ScrollTableCore, { noDataFirstLine: noDataFirstLine, noDataSecondLine: noDataSecondLine, elements: streams, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: (orderBy) => {\n                onOrderChange?.(orderBy);\n            }, isLoading: query.isLoading || query.isFetching || query.isFetchingNextPage, columns: [\n                {\n                    key: 'id',\n                    displayName: 'Stream ID',\n                    isSticky: true,\n                    sortable: true,\n                    valueMapper: ({ id, description }) => (React.createElement(StreamIdCell, { streamId: id, description: description || '' })),\n                },\n                {\n                    key: 'peerCount',\n                    displayName: 'Nodes',\n                    sortable: true,\n                    valueMapper: ({ id, peerCount = streamStats[id]?.peerCount }) => peerCount ?? '-',\n                },\n                {\n                    key: 'mps',\n                    displayName: 'Msg/s',\n                    sortable: true,\n                    valueMapper: ({ id, messagesPerSecond: mps = streamStats[id]?.messagesPerSecond, }) => mps ?? '-',\n                },\n                {\n                    key: 'bps',\n                    displayName: 'KB/s',\n                    sortable: true,\n                    valueMapper: ({ id, bytesPerSecond: bps = streamStats[id]?.bytesPerSecond, }) => (bps == null ? '-' : (bps / 1024).toFixed(2)),\n                },\n                {\n                    key: 'access',\n                    displayName: 'Access',\n                    valueMapper: ({ subscriberCount }) => subscriberCount == null ? 'Public' : 'Private',\n                },\n                {\n                    key: 'publishers',\n                    displayName: 'Publishers',\n                    valueMapper: ({ publisherCount = '∞' }) => publisherCount,\n                },\n                {\n                    key: 'subscribers',\n                    displayName: 'Subscribers',\n                    valueMapper: ({ subscriberCount = '∞' }) => subscriberCount,\n                },\n            ], linkMapper: (element) => R.stream(element.id, routeOptions(chainKey)) }),\n        query.hasNextPage && (React.createElement(LoadMoreButton, { disabled: query.isLoading || query.isFetching, onClick: () => {\n                query.fetchNextPage();\n            }, kind: \"primary2\" }, \"Load more\"))));\n}\nfunction StreamStatsLoader({ onStats, page }) {\n    const chainId = useCurrentChainId();\n    const streamIdsRef = useRef(page.streams.map(({ id }) => id));\n    const { data: result } = useQuery({\n        queryKey: ['StreamStatsLoader.statsQuery', chainId, page.pageId, page.source],\n        queryFn: async () => {\n            if (page.source === 'indexer') {\n                return {};\n            }\n            try {\n                const { streams } = await getStreamsFromIndexer(chainId, {\n                    force: true,\n                    pageSize: Math.min(1000, streamIdsRef.current.length),\n                    streamIds: streamIdsRef.current,\n                });\n                const stats = {};\n                for (const { bytesPerSecond, id, messagesPerSecond, peerCount, } of streams) {\n                    stats[id] = {\n                        bytesPerSecond,\n                        messagesPerSecond,\n                        peerCount,\n                    };\n                }\n                return stats;\n            }\n            catch (_) {\n                // ¯\\_(ツ)_/¯\n            }\n            return {};\n        },\n        staleTime: 5 * Minute,\n    });\n    const onStatsRef = useRef(onStats);\n    if (onStatsRef.current !== onStats) {\n        onStatsRef.current = onStats;\n    }\n    useEffect(function triggerOnStatsOnNonFalsyResult() {\n        if (result) {\n            onStatsRef.current?.(result);\n        }\n    }, [result]);\n    return React.createElement(React.Fragment, null);\n}\n","import React, { useMemo } from 'react';\nexport function TermsOfUse({ termsUrl, termsName, ...flags }) {\n    const entries = Object.entries(flags);\n    const permitted = entries.filter(([, flag]) => flag).map(([name]) => name);\n    const notPermitted = entries.filter(([, flag]) => !flag).map(([name]) => name);\n    const permittedStr = useMemo(() => getTermStrings(permitted), [permitted]);\n    const notPermittedStr = useMemo(() => getTermStrings(notPermitted), [notPermitted]);\n    return (React.createElement(React.Fragment, null,\n        (permitted.length > 0 || notPermitted.length > 0) && (React.createElement(\"p\", null,\n            React.createElement(\"strong\", null, \"Basic terms\"),\n            ' ',\n            permitted.length > 0 && (React.createElement(React.Fragment, null,\n                permittedStr,\n                permitted.length === 1\n                    ? ' is permitted.'\n                    : ' are permitted.',\n                ' ')),\n            notPermitted.length > 0 && (React.createElement(React.Fragment, null,\n                notPermittedStr,\n                notPermitted.length === 1 ? ' is not' : ' are not')),\n            permitted.length === 0 && ' permitted',\n            notPermitted.length > 0 && '.')),\n        !!termsUrl && (React.createElement(\"p\", null,\n            React.createElement(\"strong\", null, \"Detailed terms\"),\n            ' ',\n            React.createElement(\"strong\", null,\n                React.createElement(\"a\", { href: termsUrl, target: \"_blank\", rel: \"noopener noreferrer\" }, termsName != null && termsName.length > 0\n                    ? termsName\n                    : termsUrl))))));\n}\nconst termNames = {\n    redistribution: 'Redistribution',\n    commercialUse: 'Commercial use',\n    reselling: 'Reselling',\n    storage: 'Storage',\n};\nfunction getTermStrings(ids) {\n    const names = ids.map((id) => termNames[id]);\n    return [...names.slice(0, -2), names.slice(-2).join(' & ')].join(', ');\n}\n","import styled, { css } from 'styled-components';\nimport { ImageTile } from '~/shared/components/Tile';\nimport { COLORS, LAPTOP, TABLET } from '~/shared/utils/styled';\nconst mobileSpacing = '24px';\nconst tabletSpacing = '40px';\nconst desktopSpacing = '50px';\nexport const ProjectHeroContainer = styled.div.withConfig({ displayName: \"ProjectHeroContainer\", componentId: \"sc-896duw\" }) `\n    display: grid;\n    grid-template-columns: 100%;\n    grid-template-rows: auto auto auto auto;\n    background-color: white;\n    padding: ${mobileSpacing};\n    border-radius: 16px;\n    overflow: hidden;\n\n    ${(props) => (props.overflowVisible ? 'overflow: visible;' : '')}\n\n    @media ${TABLET} {\n        padding: ${tabletSpacing};\n    }\n\n    @media ${LAPTOP} {\n        grid-template-columns: auto 1fr;\n        grid-template-rows: auto 1fr auto;\n        padding: 0;\n    }\n`;\nconst ProjectHeroImageStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 2;\n    grid-row-end: 2;\n    border-radius: 16px;\n    overflow: hidden;\n    margin-bottom: ${mobileSpacing};\n    @media (${TABLET}) {\n        margin-bottom: ${tabletSpacing};\n    }\n    @media (${LAPTOP}) {\n        border-radius: 0;\n        margin-bottom: 0;\n        grid-column-start: 1;\n        grid-column-end: 1;\n        grid-row-start: 1;\n        grid-row-end: 4;\n        width: 500px;\n        padding: ${tabletSpacing};\n    }\n`;\nexport const ProjectHeroImage = styled(ImageTile).withConfig({ displayName: \"ProjectHeroImage\", componentId: \"sc-1j6sr46\" }) `\n    ${ProjectHeroImageStyles}\n    img {\n        border-radius: 16px;\n        border: 1px solid #f5f5f5;\n    }\n`;\nconst ProjectHeroTitleStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 1;\n    grid-row-end: 1;\n    font-size: 28px;\n    font-weight: 400;\n    color: ${COLORS.primary};\n    line-height: 44px;\n    margin-bottom: ${mobileSpacing};\n\n    @media (${TABLET}) {\n        margin-bottom: ${tabletSpacing};\n        font-size: 34px;\n    }\n    @media (${LAPTOP}) {\n        grid-column-start: 2;\n        grid-column-end: 2;\n        grid-row-start: 1;\n        grid-row-end: 1;\n        margin: ${desktopSpacing} ${desktopSpacing} ${mobileSpacing} 0;\n        height: fit-content;\n    }\n`;\nexport const ProjectHeroTitle = styled.h1.withConfig({ displayName: \"ProjectHeroTitle\", componentId: \"sc-howjgf\" }) `\n    ${ProjectHeroTitleStyles}\n`;\nexport const ProjectHeroDescriptionStyles = css `\n    grid-column-start: 1;\n    grid-column-end: 2;\n    grid-row-start: 3;\n    grid-row-end: 3;\n    /*margin-bottom: ${mobileSpacing}; TODO uncomment when enabling Signalling feature */\n    @media (${TABLET}) {\n        /*margin-bottom: ${tabletSpacing}; TODO uncomment when enabling Signalling feature */\n    }\n    @media (${LAPTOP}) {\n        grid-column-start: 2;\n        grid-column-end: 2;\n        grid-row-start: 2;\n        grid-row-end: 2;\n        margin: 0 ${desktopSpacing} 24px 0;\n    }\n`;\nexport const ProjectHeroMetadataContainer = styled.div.withConfig({ displayName: \"ProjectHeroMetadataContainer\", componentId: \"sc-1xv9i4k\" }) `\n    margin-top: ${mobileSpacing};\n    min-width: 0;\n\n    @media (${LAPTOP}) {\n        margin: ${desktopSpacing} ${desktopSpacing} ${desktopSpacing} 0;\n    }\n`;\n","import React from 'react';\nimport Markdown from 'react-markdown';\nimport styled from 'styled-components';\nimport { PropertyDisplay, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport { ProjectHeroContainer, ProjectHeroImage, ProjectHeroMetadataContainer, ProjectHeroTitle, } from '~/marketplace/containers/ProjectPage/Hero/ProjectHero2.styles';\nexport default function ProjectHero2({ name, description: descriptionProp, imageUrl, contact, }) {\n    const description = descriptionProp\n        // Remove empty paragraphs\n        .replace(/\\\\n/, '')\n        // Remove spacers (extra empty lines)\n        .replace(/^\\s*\\\\\\s*$/gm, '');\n    return (React.createElement(ProjectHeroContainer, null,\n        React.createElement(ProjectHeroImage, { src: imageUrl, alt: name, noBorderRadius: true, key: imageUrl || '' }),\n        React.createElement(ProjectHeroTitle, null, name),\n        React.createElement(MarkdownWrap, null,\n            React.createElement(Markdown, { components: {\n                    li({ children }) {\n                        return (React.createElement(\"li\", null,\n                            React.createElement(\"p\", null, children)));\n                    },\n                } }, description)),\n        React.createElement(ProjectHeroMetadataContainer, null,\n            React.createElement(PropertyDropdownList, null,\n                contact.url && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"web\" }), displayValue: contact.url\n                        .replace(/^https?:\\/\\//, '')\n                        .replace(/\\/+$/, ''), href: contact.url })),\n                contact.email && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"email\" }), displayValue: contact.email, href: `mailto:${contact.email}` })),\n                contact.twitter && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": \"#1da1f2\" }), href: contact.twitter })),\n                contact.telegram && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": \"#2aabee\" }), href: contact.telegram })),\n                contact.reddit && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": \"#ff5700\" }), href: contact.reddit })),\n                contact.linkedIn && (React.createElement(PropertyDisplay, { icon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": \"#0077b5\" }), href: contact.linkedIn }))))));\n}\nconst MarkdownWrap = styled.div.withConfig({ displayName: \"MarkdownWrap\", componentId: \"sc-12otffe\" }) `\n    line-height: 1.75;\n    padding-right: 50px;\n\n    > * + * {\n        margin-top: 1em;\n    }\n\n    ol,\n    ul {\n        padding-left: 1.1em;\n    }\n\n    code {\n        border-radius: 4px;\n        border: 1px solid rgb(232, 235, 237);\n        background: rgb(244, 247, 250);\n        padding: 3px 4px;\n        font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier,\n            monospace;\n        font-size: 80%;\n    }\n\n    blockquote {\n        border-left: 3px solid rgb(232, 235, 237);\n        padding: 0.5em;\n        padding-left: 1em;\n        font-style: italic;\n    }\n\n    blockquote > * + * {\n        margin-top: 1em;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Link } from 'react-router-dom';\nimport { COLORS, DESKTOP, LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { goBack } from '~/utils';\nexport const DetailsPageHeader = ({ backButtonLink, pageTitle, rightComponent, }) => {\n    return (React.createElement(DetailsPageHeaderBackground, null,\n        React.createElement(DetailsPageHeaderContainer, null,\n            React.createElement(DetailsPageHeaderBar, null,\n                React.createElement(LeftSideContainer, null,\n                    !!backButtonLink && (React.createElement(BackLink, { to: backButtonLink, onClick: (e) => {\n                            goBack({\n                                onBeforeNavigate() {\n                                    e.preventDefault();\n                                },\n                            });\n                        } },\n                        React.createElement(BackButtonIcon, { name: \"backArrow\" }))),\n                    !!pageTitle && (React.createElement(PageTitleContainer, null, pageTitle))),\n                React.createElement(RightSideContainer, null, rightComponent)))));\n};\nconst DetailsPageHeaderBackground = styled.div.withConfig({ displayName: \"DetailsPageHeaderBackground\", componentId: \"sc-2y14kk\" }) `\n    background-color: white;\n    padding: 45px 0 22px;\n\n    @media (${DESKTOP}) {\n        padding: 130px 0 30px;\n    }\n`;\nconst DetailsPageHeaderContainer = styled.div.withConfig({ displayName: \"DetailsPageHeaderContainer\", componentId: \"sc-qodqcv\" }) `\n    max-width: ${MAX_BODY_WIDTH}px;\n    margin: 0 auto;\n    padding: 0 24px;\n\n    & & {\n        padding: 0 24px;\n    }\n\n    @media (${TABLET}) {\n        padding: 0 40px;\n\n        & & {\n            padding: 0;\n        }\n    }\n\n    @media (${DESKTOP}) {\n        padding: 0;\n    }\n`;\nconst DetailsPageHeaderBar = styled.div.withConfig({ displayName: \"DetailsPageHeaderBar\", componentId: \"sc-1y7opjf\" }) `\n    display: block;\n    @media (${LAPTOP}) {\n        display: flex;\n        justify-content: space-between;\n        align-items: center;\n    }\n`;\nconst LeftSideContainer = styled.div.withConfig({ displayName: \"LeftSideContainer\", componentId: \"sc-1ignhbj\" }) `\n    display: flex;\n    align-items: center;\n    flex-grow: 1;\n    overflow: hidden;\n`;\nconst RightSideContainer = styled.div.withConfig({ displayName: \"RightSideContainer\", componentId: \"sc-1xnp8ca\" }) `\n    display: flex;\n    align-items: center;\n    margin-top: 50px;\n    @media (${LAPTOP}) {\n        margin-top: 0;\n    }\n`;\nconst BackLink = styled(Link).withConfig({ displayName: \"BackLink\", componentId: \"sc-1mgqjh2\" }) `\n    padding: 10px;\n    line-height: 30px;\n    margin-right: 14px;\n`;\nconst BackButtonIcon = styled(SvgIcon).withConfig({ displayName: \"BackButtonIcon\", componentId: \"sc-1guex4e\" }) `\n    color: ${COLORS.primaryLight};\n`;\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1v2cnf3\" }) `\n    margin-top: 3px;\n    color: ${COLORS.primary};\n    font-size: 16px;\n    line-height: 30px;\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n    padding-right: 20px;\n`;\n","import styled, { css } from 'styled-components';\nimport { MEDIUM, MD } from '~/shared/utils/styled';\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-11gywz\" }) `\n    align-items: center;\n    background-color: #efefef;\n    color: #323232;\n    display: flex;\n    font-size: 12px;\n    font-weight: ${MEDIUM};\n    height: 64px;\n    letter-spacing: 1.17px;\n    line-height: 16px;\n    padding: 0 24px;\n    text-transform: uppercase;\n\n    @media (min-width: ${MD}px) {\n        border-radius: 2px 2px 0 0;\n        font-size: 14px;\n        height: 72px;\n        padding: 0 32px;\n    }\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-hu0u94\" }) ``;\nconst Body = styled.div.withConfig({ displayName: \"Body\", componentId: \"sc-a0bmp3\" }) `\n    background-color: #f8f8f8;\n\n    & + & {\n        border-top: 1px solid #e7e7e7;\n    }\n\n    @media (min-width: ${MD}px) {\n        :last-child {\n            border-radius: 0 0 2px 2px;\n        }\n    }\n\n    ${({ pad = false }) => !!pad &&\n    css `\n            padding: 24px;\n\n            @media (min-width: ${MD}px) {\n                padding: 32px;\n            }\n        `}\n`;\nconst Segment = styled.div.withConfig({ displayName: \"Segment\", componentId: \"sc-93o8z4\" }) ``;\nObject.assign(Segment, {\n    Header,\n    Body,\n    Footer,\n});\nexport default Segment;\n","import { StreamPermission } from '@streamr/sdk';\nimport { useClient } from 'streamr-client-react';\nimport { useEffect } from 'react';\nimport { produce } from 'immer';\nimport { create } from 'zustand';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport { isMessagedObject } from '~/utils/exceptions';\nimport { address0 } from '~/consts';\nimport { useWalletAccount } from './wallet';\nfunction accountKey(streamId, account) {\n    return JSON.stringify([streamId, account.toLowerCase()]);\n}\nfunction permissionKey(streamId, account, permission) {\n    return JSON.stringify([streamId, account.toLowerCase(), permission]);\n}\nconst useStreamAbilitiesStore = create((set, get) => {\n    function toggleFetching(streamId, account, permission, newValue) {\n        set((store) => produce(store, (draft) => {\n            if (!newValue) {\n                return void delete draft.fetching[permissionKey(streamId, account, permission)];\n            }\n            draft.fetching[permissionKey(streamId, account, permission)] = true;\n        }));\n    }\n    return {\n        permissions: {},\n        fetching: {},\n        async fetchPermission(streamId, account, permission, streamrClient) {\n            const pkey = permissionKey(streamId, account, permission);\n            if (get().fetching[pkey]) {\n                // Already fetching, skip.\n                return;\n            }\n            let result = false;\n            try {\n                toggleFetching(streamId, account, permission, true);\n                let stream;\n                try {\n                    stream = await streamrClient.getStream(streamId);\n                }\n                catch (e) {\n                    if (isMessagedObject(e) && /not_found/i.test(e.message)) {\n                        throw new StreamNotFoundError(streamId);\n                    }\n                    throw e;\n                }\n                result = await stream.hasPermission(account === address0\n                    ? {\n                        permission,\n                        public: true,\n                    }\n                    : {\n                        userId: account,\n                        permission,\n                        allowPublic: true,\n                    });\n            }\n            finally {\n                set((state) => produce(state, (draft) => {\n                    const key = accountKey(streamId, account);\n                    const group = draft.permissions[key] || {};\n                    const { cache } = group[permission] || {};\n                    group[permission] = {\n                        cache,\n                        value: result,\n                    };\n                    draft.permissions[key] = group;\n                }));\n                toggleFetching(streamId, account, permission, false);\n            }\n        },\n        invalidate(streamId, account) {\n            set((store) => produce(store, (draft) => {\n                const permissions = draft.permissions[accountKey(streamId, account)] || {};\n                const permissionKeys = Object.keys(permissions);\n                permissionKeys.forEach((permission) => {\n                    const { value, cache = 0 } = permissions[permission] || {};\n                    permissions[permission] = {\n                        value,\n                        cache: cache + 1,\n                    };\n                });\n            }));\n        },\n    };\n});\nexport function useStreamAbility(streamId, account, permission) {\n    const client = useClient();\n    const { fetchPermission } = useStreamAbilitiesStore();\n    const { value, cache = 0 } = useStreamAbilitiesStore(({ permissions }) => streamId\n        ? permissions[accountKey(streamId, account || address0)]?.[permission]\n        : undefined) || {};\n    useEffect(() => {\n        async function fetch() {\n            if (!client || !streamId) {\n                return;\n            }\n            try {\n                await fetchPermission(streamId, account || address0, permission, client);\n            }\n            catch (e) {\n                console.warn(e);\n            }\n        }\n        fetch();\n    }, [cache, fetchPermission, streamId, account, permission, client]);\n    return value;\n}\nexport function useCurrentStreamAbility(streamId, permission) {\n    const account = useWalletAccount();\n    const hasPermission = useStreamAbility(streamId, account, permission);\n    if (!streamId) {\n        return (permission === StreamPermission.EDIT || permission === StreamPermission.GRANT);\n    }\n    return hasPermission;\n}\nexport function useInvalidateStreamAbilities() {\n    return useStreamAbilitiesStore(({ invalidate }) => invalidate);\n}\n","import { StreamPermission } from '@streamr/sdk';\nimport { CodeSnippet, Tabs } from '@streamr/streamr-layout';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useStreamAbility } from '~/shared/stores/streamAbilities';\nimport { COLORS, DESKTOP, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { Route as R } from '~/utils/routes';\nfunction stripIndent(code) {\n    let minIndent = Number.POSITIVE_INFINITY;\n    (code.match(/^[ \\t]*(?=\\S)/gm) || ['']).forEach(({ length }) => {\n        if (length < minIndent) {\n            minIndent = length;\n        }\n    });\n    return code\n        .replace(new RegExp(`^[ \\\\t]{${minIndent}}`, 'gm'), '')\n        .trim()\n        .replace(/^\\s+$/gm, '');\n}\nconst Snippet = {\n    createClient(hasPermission) {\n        if (hasPermission) {\n            return `const streamr = new StreamrClient()`;\n        }\n        return `const streamr = new StreamrClient({\n                auth: {\n                    privateKey: 'ethereum-private-key' \n                }\n            })`;\n    },\n    lightNodeHeader(hasPermission) {\n        return `\n            // Run a Streamr node right inside your JS app\n            const StreamrClient = require('@streamr/sdk')\n            ${this.createClient(hasPermission)}\n        `;\n    },\n    lightNodeSubscribe(streamId, hasPermission) {\n        return `\n            ${this.lightNodeHeader(hasPermission)}\n            // Subscribe to a stream of messages\n            streamr.subscribe('${streamId}', (msg) => {\n                // Handle incoming messages\n            })\n        `;\n    },\n    lightNodePublish(streamId, hasPermission) {\n        return `\n            ${this.lightNodeHeader(hasPermission)}\n            // Publish messages to a stream\n            streamr.publish('${streamId}', {\n                hello: 'world',\n            })\n        `;\n    },\n    websocketHeader(streamId) {\n        return `\n            // You'll want to URI-encode the stream id\n            const streamId = encodeURIComponent('${streamId}')\n        `;\n    },\n    websocketPublish(streamId) {\n        return `\n            ${this.websocketHeader(streamId)}\n            // Connect to the Websocket plugin on your Streamr \n            // node and send JSON messages to publish them\n            const pub = ws.connect(\\`ws://my-streamr-node:7170/streams/\\${streamId}/publish\\`)\n            pub.send({\n                hello: 'world',\n            })\n        `;\n    },\n    websocketSubscribe(streamId) {\n        return `\n            ${this.websocketHeader(streamId)}\n            // Connect to the Websocket plugin on your Streamr \n            // node and subscribe to a stream of messages\n            const sub = ws.connect(\\`ws://my-streamr-node:7170/streams/\\${streamId}/subscribe\\`)\n            sub.onmessage = (msg) => {\n                // Handle incoming messages\n            }\n        `;\n    },\n    httpSubscribe() {\n        return `\n            // The Subscribe over HTTP is not available, as in it's not a valid selection.\n        `;\n    },\n    httpPublish(streamId) {\n        return `\n            // Use your favourite language and HTTP library!\n\n            // You'll want to URI-encode the stream id\n            const streamId = encodeURIComponent('${streamId}')\n\n            // Publish messages to a stream by POSTing JSON \n            // to the HTTP plugin on your Streamr node\n            http.post(\\`http://my-streamr-node:7171/streams/\\${streamId}\\`, {\n                hello: 'world'\n            })\n        `;\n    },\n    mqttHeader() {\n        return `\n            // Use your favourite language and MQTT library!\n\n            // Connect to MQTT plugin on your Streamr node\n            mqtt.connect('mqtt://my-streamr-node')\n        `;\n    },\n    mqttSubscribe(streamId) {\n        return `\n            ${this.mqttHeader()}\n            // Subscribe to a stream of messages\n            mqtt.subscribe('${streamId}', (msg) => {\n                // Handle incoming messages\n            })\n        `;\n    },\n    mqttPublish(streamId) {\n        return `\n            ${this.mqttHeader()}\n            // Publish a message to a stream\n            mqtt.publish('${streamId}', {\n                hello: 'world',\n            })\n        `;\n    },\n};\nexport const StreamConnect = ({ streams }) => {\n    const [streamId, setSelectedStream] = useState(streams[0]);\n    const [action, setAction] = useState('subscribe');\n    const [nodeType, setNodeType] = useState('lightNode');\n    const [currentProtocol, setCurrentProtocol] = useState('websocket');\n    const hasPublicPubPermission = useStreamAbility(streamId, address0, StreamPermission.PUBLISH);\n    const hasPublicSubPermission = useStreamAbility(streamId, address0, StreamPermission.SUBSCRIBE);\n    const lightNodeSnippet = stripIndent(action === 'publish'\n        ? Snippet.lightNodePublish(streamId, !!hasPublicPubPermission)\n        : Snippet.lightNodeSubscribe(streamId, !!hasPublicSubPermission));\n    const websocketSnippet = stripIndent(action === 'publish'\n        ? Snippet.websocketPublish(streamId)\n        : Snippet.websocketSubscribe(streamId));\n    const httpSnippet = stripIndent(action === 'subscribe' ? Snippet.httpSubscribe() : Snippet.httpPublish(streamId));\n    const mqttSnippet = stripIndent(action === 'publish'\n        ? Snippet.mqttPublish(streamId)\n        : Snippet.mqttSubscribe(streamId));\n    const { copy } = useCopy();\n    const currentBrokerSnippet = (() => {\n        switch (currentProtocol) {\n            case 'websocket':\n                return websocketSnippet;\n            case 'http':\n                return httpSnippet;\n            case 'mqtt':\n                return mqttSnippet;\n        }\n    })();\n    return (React.createElement(Grid, null,\n        React.createElement(\"div\", null,\n            React.createElement(StreamConnectHeader, null, \"Connect\"),\n            React.createElement(StreamConnectText, null, \"Here are the code snippets to connect to this stream with the Streamr SDK or through a separately running Streamr node:\"),\n            React.createElement(SnippetSelectorContainer, null,\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: [\n                            { label: 'Subscribe', value: 'subscribe' },\n                            { label: 'Publish', value: 'publish' },\n                        ], value: action, isClearable: false, onChange: (action) => {\n                            if (action === 'subscribe' || action === 'publish') {\n                                setAction(action);\n                            }\n                        }, noShrink: true, fullWidth: true })),\n                React.createElement(\"span\", null, \"to\"),\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: streams.map((streamId) => ({\n                            value: streamId,\n                            label: truncateStreamName(streamId),\n                        })), value: streamId, isClearable: false, onChange: (streamId) => {\n                            setSelectedStream(streamId);\n                        }, fullWidth: true })),\n                React.createElement(\"span\", null, \"using\"),\n                React.createElement(SelectContainer, null,\n                    React.createElement(SelectField2, { placeholder: '', options: [\n                            { label: 'Streamr SDK', value: 'lightNode' },\n                            { label: 'Streamr node', value: 'brokerNode' },\n                        ], value: nodeType, isClearable: false, onChange: (nodeType) => {\n                            if (nodeType === 'lightNode' ||\n                                nodeType === 'brokerNode') {\n                                setNodeType(nodeType);\n                            }\n                        }, noShrink: true, fullWidth: true }))),\n            nodeType === 'lightNode' && (React.createElement(React.Fragment, null,\n                React.createElement(StreamConnectLightNodeSnippetContainer, null,\n                    React.createElement(CodeSnippet, { language: 'javascript' }, lightNodeSnippet)),\n                React.createElement(StreamConnectSnippetCopyContainer, null,\n                    React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(lightNodeSnippet) }, \"Copy\")))),\n            nodeType === 'brokerNode' && (React.createElement(BrokerNodeSnippetContainer, null,\n                React.createElement(Tabs, { selected: currentProtocol, onSelect: (tab) => setCurrentProtocol(tab) },\n                    React.createElement(Tabs.Item, { label: 'Websocket', value: 'websocket', key: 0 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, websocketSnippet)),\n                    React.createElement(Tabs.Item, { label: 'HTTP', value: 'http', key: 1 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, httpSnippet)),\n                    React.createElement(Tabs.Item, { label: 'MQTT', value: 'mqtt', key: 2 },\n                        React.createElement(CodeSnippet, { language: 'javascript' }, mqttSnippet))),\n                React.createElement(StreamConnectSnippetCopyContainer, null,\n                    React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(currentBrokerSnippet) }, \"Copy\"))))),\n        React.createElement(RightColumn, null,\n            React.createElement(StreamConnectLink, { href: R.docs('/guides/nodejs'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Pub/Sub in NodeJS\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/guides/web-app-frameworks'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Use Streamr in your web app\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/usage/cli-tool'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"The Streamr CLI tool\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })),\n            React.createElement(StreamConnectLink, { href: R.docs('/usage/connect-apps-and-iot/streamr-node-interface'), target: \"_blank\", rel: \"noreferrer noopener\" },\n                React.createElement(\"span\", null, \"Interfacing with a Streamr node\"),\n                React.createElement(SvgIcon, { name: \"linkOut\" })))));\n};\nconst Grid = styled.div.withConfig({ displayName: \"Grid\", componentId: \"sc-1oaf2o7\" }) `\n    display: grid;\n    grid-template-columns: initial;\n    grid-auto-flow: row;\n    gap: 32px;\n\n    @media ${DESKTOP} {\n        grid-template-columns: 65% auto;\n        grid-auto-flow: column;\n        gap: 88px;\n    }\n`;\nconst RightColumn = styled.div.withConfig({ displayName: \"RightColumn\", componentId: \"sc-izi0z2\" }) `\n    padding-top: 0px;\n\n    @media ${DESKTOP} {\n        padding-top: 88px;\n    }\n`;\nconst StreamConnectHeader = styled.p.withConfig({ displayName: \"StreamConnectHeader\", componentId: \"sc-ps0tf8\" }) `\n    font-size: 24px;\n    color: ${COLORS.primary};\n    line-height: 64px;\n    margin-bottom: 24px;\n`;\nconst StreamConnectText = styled.p.withConfig({ displayName: \"StreamConnectText\", componentId: \"sc-y6nrjd\" }) `\n    font-size: 16px;\n    color: ${COLORS.primary};\n`;\nconst StreamConnectLightNodeSnippetContainer = styled.div.withConfig({ displayName: \"StreamConnectLightNodeSnippetContainer\", componentId: \"sc-1759ut4\" }) `\n    border: 1px solid ${COLORS.Border};\n    background-color: white;\n    margin-top: 30px;\n    max-width: calc(100vw - 100px);\n    @media ${TABLET} {\n        max-width: calc(100vw - 160px);\n    }\n`;\nconst StreamConnectSnippetCopyContainer = styled.div.withConfig({ displayName: \"StreamConnectSnippetCopyContainer\", componentId: \"sc-1ozil41\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-top: none;\n    background-color: white;\n    padding: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: flex-end;\n`;\nconst StreamConnectLink = styled.a.withConfig({ displayName: \"StreamConnectLink\", componentId: \"sc-9e5sid\" }) `\n    font-size: 16px;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    background-color: ${COLORS.secondaryLight};\n    padding: 10px 16px;\n    margin-bottom: 8px;\n    border-radius: 4px;\n    span {\n        color: ${COLORS.primary};\n    }\n    svg {\n        color: ${COLORS.primary};\n    }\n`;\nconst SnippetSelectorContainer = styled.div.withConfig({ displayName: \"SnippetSelectorContainer\", componentId: \"sc-1ac352p\" }) `\n    display: flex;\n    flex-wrap: nowrap;\n    margin-top: 20px;\n    align-items: left;\n    flex-direction: column;\n\n    @media ${TABLET} {\n        flex-direction: row;\n        align-items: center;\n\n        > * {\n            margin-right: 10px;\n            &:last-child {\n                margin-right: 0;\n            }\n        }\n    }\n`;\nconst BrokerNodeSnippetContainer = styled.div.withConfig({ displayName: \"BrokerNodeSnippetContainer\", componentId: \"sc-1u2nq6z\" }) `\n    margin-top: 30px;\n    max-width: calc(100vw - 100px);\n    @media ${TABLET} {\n        max-width: calc(100vw - 160px);\n    }\n`;\nconst SelectContainer = styled.div.withConfig({ displayName: \"SelectContainer\", componentId: \"sc-1pckr2p\" }) `\n    height: 100%;\n    min-width: 140px;\n`;\n","import React, { Fragment } from 'react';\nimport styled, { css } from 'styled-components';\nimport { ERROR } from '~/shared/components/Ui/StateColors';\nexport const MarketplaceTheme = {\n    color: '#ff5c00',\n};\nconst DefaultTheme = {\n    color: ERROR,\n};\nconst UnstyledErrors = ({ children, theme: _theme, overlap: _overlap, ...props }) => React.createElement(\"div\", { ...props }, children || React.createElement(Fragment, null, \"\\u200C\"));\nconst Errors = styled(UnstyledErrors).withConfig({ displayName: \"Errors\", componentId: \"sc-1hrs8wo\" }) `\n    color: ${({ theme }) => theme.color};\n    font-size: 12px;\n    line-height: 1.5em;\n    margin-top: 6px;\n    word-break: break-word;\n\n    ${({ overlap }) => !!overlap &&\n    css `\n            position: absolute;\n        `}\n`;\nErrors.defaultProps = {\n    theme: DefaultTheme,\n};\nexport default Errors;\n","import styled from 'styled-components';\nconst Cell = styled.span.withConfig({ displayName: \"Cell\", componentId: \"sc-kvo0f3\" }) `\n    display: block;\n    max-width: 100%;\n    min-width: 0;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n`;\nexport default Cell;\n","import styled, { css, createGlobalStyle } from 'styled-components';\nimport { MD, XL, PHONE } from '~/shared/utils/styled';\nconst Layout = createGlobalStyle `\n    :root {\n        --LiveDataInspectorMinWidth: 375px;\n        --LiveDataMinLhsWidth: 248px;\n        --LiveDataMinMargin: 8px;\n        --LiveDataTimestampColumnMaxWidth: 224px;\n    }\n\n    @media ${PHONE} {\n        :root {\n            --LiveDataInspectorMinWidth: 375px;\n            --LiveDataMinLhsWidth: 248px;\n            --LiveDataMinMargin: 8px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    @media (min-width: ${MD}px) {\n        :root {\n            --LiveDataInspectorMinWidth: 488px;\n            --LiveDataMinLhsWidth: 264px;\n            --LiveDataMinMargin: 24px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    @media (min-width: ${XL}px) {\n        :root {\n            --LiveDataInspectorMinWidth: 488px;\n            --LiveDataMinLhsWidth: 332px;\n            --LiveDataMinMargin: 92px;\n            --LiveDataTimestampColumnMaxWidth: 224px;\n        }\n    }\n\n    ${({ inspectorWidth }) => css `\n        :root {\n            --LiveDataInspectorWidth: 100vw;\n        }\n\n        @media ${PHONE} {\n            :root {\n                --LiveDataInspectorWidth: ${inspectorWidth || 375}px;\n            }\n        }\n\n        @media (min-width: ${XL}px) {\n            :root {\n                --LiveDataInspectorWidth: ${inspectorWidth || 488}px;\n            }\n        }\n    `}\n`;\nconst Pusher = styled.div.withConfig({ displayName: \"Pusher\", componentId: \"sc-sae8h3\" }) `\n    //min-width: var(--LiveDataMinMargin);\n    //max-width: calc((100vw - 1108px - var(--LiveDataInspectorMinWidth) - 32px) * 0.5);\n    //width: calc((100vw - 1108px - var(--LiveDataInspectorWidth) - 32px) * 0.5);\n`;\nconst FinalExport = Object.assign(Layout, {\n    Pusher,\n});\nexport default FinalExport;\n","import React, { useCallback } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport ModalDialog from '~/shared/components/ModalDialog';\nimport ModalPortal from '~/shared/components/ModalPortal';\nimport useModal from '~/shared/hooks/useModal';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport SvgIcon from '../SvgIcon';\nconst ModalContainer = styled.div.withConfig({ displayName: \"ModalContainer\", componentId: \"sc-lz82e0\" }) `\n    background: white;\n    color: ${COLORS.primary};\n    height: 100%;\n    width: 100%;\n    display: flex;\n    flex-direction: column;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-10bafn3\" }) `\n    padding: 44px 24px;\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n`;\nconst HeaderTitle = styled.p.withConfig({ displayName: \"HeaderTitle\", componentId: \"sc-sgi4re\" }) `\n    font-size: 24px;\n    margin: 0;\n`;\nconst StreamsList = styled.ul.withConfig({ displayName: \"StreamsList\", componentId: \"sc-1n7ig57\" }) `\n    width: 100%;\n    list-style-type: none;\n    padding: 0;\n\n    li {\n        font-size: 16px;\n        padding: 8px 26px;\n        display: flex;\n        align-items: center;\n        justify-content: space-between;\n        border-top: 1px solid ${COLORS.Border};\n        &:last-of-type {\n            border-bottom: 1px solid ${COLORS.Border};\n        }\n\n        &.active {\n            background-color: ${COLORS.primaryLight};\n            color: white;\n        }\n    }\n`;\nconst StreamName = styled.div.withConfig({ displayName: \"StreamName\", componentId: \"sc-1m8vjt1\" }) `\n    background-color: white;\n    font-size: 16px;\n    font-weight: ${MEDIUM};\n    line-height: 40px;\n    padding: 0 12px;\n`;\nconst SelectorWrapper = styled.div.withConfig({ displayName: \"SelectorWrapper\", componentId: \"sc-ghebql\" }) `\n    display: flex;\n    align-items: center;\n`;\nexport const ModalStreamSelector = (props) => {\n    const { api, isOpen } = useModal('streamSelectorModal');\n    const openModal = useCallback(() => {\n        api.open();\n    }, [api]);\n    return (React.createElement(\"div\", null,\n        React.createElement(SelectorWrapper, null,\n            React.createElement(StreamName, { onClick: openModal }, props.selectedStream && truncateStreamName(props.selectedStream))),\n        isOpen && React.createElement(StreamSelectorModal, { api: api, ...props })));\n};\nconst StreamSelectorModal = ({ api, streamIds, selectedStream, onChange, }) => {\n    const onClose = useCallback(() => {\n        api.close();\n    }, [api]);\n    return (React.createElement(ModalPortal, null,\n        React.createElement(ModalDialog, { onClose: onClose, fullpage: true, noScroll: false, closeOnEsc: true },\n            React.createElement(ModalContainer, null,\n                React.createElement(Header, null,\n                    React.createElement(HeaderTitle, null, \"Select a stream\"),\n                    React.createElement(Button, { onClick: onClose, kind: 'secondary' }, \"Done\")),\n                React.createElement(StreamsList, null, streamIds.map((streamId, index) => {\n                    return (React.createElement(\"li\", { key: index, className: streamId === selectedStream ? 'active' : '', onClick: () => {\n                            onChange(streamId);\n                            onClose();\n                        } },\n                        React.createElement(\"span\", null, truncateStreamName(streamId)),\n                        streamId === selectedStream && (React.createElement(SvgIcon, { name: 'checkMarkMono' }))));\n                }))))));\n};\n","import styled from 'styled-components';\nconst IconButton = styled.button.withConfig({ displayName: \"IconButton\", componentId: \"sc-t8r6jx\" }) `\n    appearance: none;\n    background: none;\n    border-radius: 2px;\n    border: 0;\n    height: 32px;\n    outline: 0 !important;\n    position: relative;\n    text-align: center;\n    width: 32px;\n\n    :hover,\n    :focus {\n        background-color: #efefef;\n    }\n\n    :active {\n        background: #d8d8d8;\n        color: #525252;\n    }\n\n    :disabled {\n        background: none;\n        color: inherit;\n    }\n\n    svg {\n        display: block;\n        height: 20px;\n        left: 50%;\n        position: absolute;\n        top: 50%;\n        transform: translate(-50%, -50%);\n        width: 20px;\n    }\n`;\nexport default IconButton;\n","import React from 'react';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS, MEDIUM } from '~/shared/utils/styled';\nimport IconButton from './IconButton';\nconst Button = styled(IconButton).withConfig({ displayName: \"Button\", componentId: \"sc-1bfec7h\" }) `\n    :not(:last-child) {\n        margin-left: 16px;\n    }\n\n    + div {\n        margin: 0 12px;\n        white-space: nowrap;\n    }\n\n    svg {\n        width: 8px;\n        height: 14px;\n    }\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-b73oup\" }) `\n    font-weight: ${MEDIUM};\n`;\nfunction UnstyledSelector({ active, onChange, options = [], title, ...props }) {\n    const current = options.indexOf(active);\n    const prevOption = options[Math.max(0, current - 1)];\n    const nextOption = options[Math.min(current + 1, options.length)];\n    if (options.length <= 1) {\n        return null;\n    }\n    return (React.createElement(\"div\", { ...props },\n        React.createElement(Title, null, title),\n        React.createElement(Button, { disabled: current <= 0, onClick: () => {\n                if (prevOption) {\n                    onChange?.(prevOption);\n                }\n            }, type: \"button\" },\n            React.createElement(SvgIcon, { name: \"back\" })),\n        React.createElement(\"div\", null,\n            React.createElement(\"strong\", null, current + 1),\n            \" of \",\n            React.createElement(\"strong\", null, options.length)),\n        React.createElement(Button, { disabled: current >= options.length - 1, onClick: () => {\n                if (nextOption) {\n                    onChange?.(nextOption);\n                }\n            }, type: \"button\" },\n            React.createElement(SvgIcon, { name: \"forward\" }))));\n}\nconst Selector = styled(UnstyledSelector).withConfig({ displayName: \"Selector\", componentId: \"sc-uw3yor\" }) `\n    align-items: center;\n    color: ${COLORS.primary};\n    display: flex;\n    button {\n        color: ${COLORS.primary};\n    }\n`;\nexport default Selector;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Button as PrestyledButton } from '~/components/Button';\nimport { LG, PHONE } from '~/shared/utils/styled';\nimport Selector from './Selector';\nimport Layout from './Layout';\nconst Button = styled(PrestyledButton).withConfig({ displayName: \"Button\", componentId: \"sc-cofyda\" }) `\n    && {\n        font-size: 12px;\n        height: 32px;\n        min-width: 80px;\n    }\n\n    @media ${PHONE} {\n        && {\n            min-width: 125px;\n        }\n    }\n`;\nconst SettingsButton = styled(Button).withConfig({ displayName: \"SettingsButton\", componentId: \"sc-pzpbv0\" }) `\n    @media (max-width: ${LG - 1}px) {\n        && {\n            display: none;\n        }\n    }\n`;\nconst Lhs = styled.div.withConfig({ displayName: \"Lhs\", componentId: \"sc-148ap5i\" }) `\n    flex-grow: 1;\n    display: grid;\n    grid-template-columns: auto 1fr;\n`;\nconst Rhs = styled.div.withConfig({ displayName: \"Rhs\", componentId: \"sc-p3ihd5\" }) `\n    display: flex;\n\n    button + button {\n        margin-left: 16px;\n    }\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-1e57e6x\" }) `\n    display: flex;\n    min-width: 0;\n    padding: 0 16px;\n\n    > div:first-child {\n        min-width: calc(var(--LiveDataMinLhsWidth) - var(--LiveDataMinMargin) - 16px);\n        max-width: calc(var(--LiveDataTimestampColumnMaxWidth));\n        width: calc(\n            100vw - var(--LiveDataInspectorWidth) - var(--LiveDataMinMargin) - 16px\n        );\n    }\n`;\nconst UnstyledToolbar = ({ className, onPartitionChange, onSettingsButtonClick, partition, partitions = [], streamId, }) => {\n    return (React.createElement(\"div\", { className: className },\n        React.createElement(Lhs, null,\n            React.createElement(Layout.Pusher, null),\n            React.createElement(Inner, null,\n                React.createElement(Selector, { title: \"Stream partitions\", options: partitions, active: partition, onChange: onPartitionChange }))),\n        React.createElement(Rhs, null,\n            React.createElement(\"div\", null, typeof onSettingsButtonClick === 'function' && (React.createElement(SettingsButton, { kind: \"secondary\", type: \"button\", onClick: () => onSettingsButtonClick(streamId) }, \"Stream Settings\"))))));\n};\nconst Toolbar = styled(UnstyledToolbar).withConfig({ displayName: \"Toolbar\", componentId: \"sc-1qf8mm1\" }) `\n    align-items: center;\n    display: flex;\n    padding-top: ${(props) => {\n    return props.partitions.length > 1 ? '30px ' : '0';\n}};\n    padding-bottom: ${(props) => {\n    return props.partitions.length > 1 ? '16px ' : '0';\n}};\n`;\nObject.assign(Toolbar, {\n    Lhs,\n    Rhs,\n});\nexport default Toolbar;\n","import { Tooltip } from '@streamr/streamr-layout';\nimport moment from 'moment-timezone';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport stringifyObject from 'stringify-object';\nimport styled, { css } from 'styled-components';\nimport { CopyButton } from '~/components/CopyButton';\nimport { SelectField2 } from '~/marketplace/components/SelectField2';\nimport { formatDateTime } from '~/marketplace/utils/time';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { COLORS, MAX_BODY_WIDTH, MEDIUM, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport Cell from './Cell';\nimport Layout from './Layout';\nimport { ModalStreamSelector } from './ModalStreamSelector';\nimport Toolbar from './Toolbar';\nconst formatValue = (data) => typeof data === 'object'\n    ? stringifyObject(data, {\n        inlineCharacterLimit: Number.POSITIVE_INFINITY,\n    })\n    : data.toString();\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1090h5n\" }) `\n    display: grid;\n    transition: 0.2s grid-template-columns;\n    grid-template-columns: auto 248px 1fr auto;\n\n    ${({ inspectorFocused }) => !!inspectorFocused &&\n    css `\n            grid-template-columns: auto 0px 1fr auto;\n        `}\n\n    @media ${TABLET} {\n        grid-template-columns: auto 1fr 1fr auto;\n    }\n\n    @media (min-width: ${MAX_BODY_WIDTH}px) {\n        grid-template-columns: auto ${MAX_BODY_WIDTH - 560}px 560px auto;\n    }\n`;\nconst LeftFiller = styled.div.withConfig({ displayName: \"LeftFiller\", componentId: \"sc-v7o9iu\" }) `\n    background: #ffffff;\n`;\nconst RightFiller = styled.div.withConfig({ displayName: \"RightFiller\", componentId: \"sc-13pv0xv\" }) `\n    background: #fafafa;\n`;\nconst Inner = styled.div.withConfig({ displayName: \"Inner\", componentId: \"sc-vvc8jb\" }) `\n    display: grid;\n    line-height: 28px;\n    padding: 14px 16px;\n\n    > div {\n        min-width: 0;\n    }\n`;\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-ghpn4d\" }) ``;\nconst Viewport = styled.div.withConfig({ displayName: \"Viewport\", componentId: \"sc-2nzh0p\" }) `\n    height: 100%;\n    overflow: auto;\n\n    ${Inner} {\n        transition: 250ms background-color;\n    }\n\n    ${Inner}:hover {\n        transition-duration: 25ms;\n    }\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-vgmvys\" }) `\n    height: 54px;\n    width: 100%;\n`;\nconst Side = styled.div.withConfig({ displayName: \"Side\", componentId: \"sc-1rw0mcb\" }) `\n    height: 100%;\n    overflow: hidden;\n    &.no-overflow-desktop {\n        @media (${TABLET}) {\n            overflow: initial;\n        }\n    }\n`;\nconst Lhs = styled(Side).withConfig({ displayName: \"Lhs\", componentId: \"sc-1n0stjt\" }) `\n    ${Row} {\n        display: grid;\n        grid-template-columns: auto 1fr;\n        border-bottom: 1px solid ${COLORS.Border};\n    }\n\n    ${Inner} {\n        grid-template-columns: 224px 1fr;\n    }\n\n    ${Viewport} ${Inner}:hover {\n        background: #fafafa;\n    }\n\n    ${Inner} > div {\n        min-width: 0;\n    }\n`;\nconst Rhs = styled(Side).withConfig({ displayName: \"Rhs\", componentId: \"sc-1wo4mr7\" }) `\n    background: #fafafa;\n    border-left: 1px solid #efefef;\n\n    ${Inner} {\n        grid-template-columns: 128px 1fr;\n        column-gap: 8px;\n        margin: 0 24px;\n    }\n\n    ${Viewport} ${Inner}:hover {\n        background: #f3f3f3;\n    }\n\n    ${Viewport} ${Inner} > div:first-child {\n        color: #a3a3a3;\n        text-transform: uppercase;\n    }\n\n    ${Viewport} ${Inner} {\n        border-bottom: 1px solid #efefef;\n    }\n\n    @media (${TABLET}) {\n        transition: none;\n\n        ${Inner} {\n            grid-template-columns: 164px 1fr;\n        }\n    }\n`;\nconst ToolbarContainer = styled.div.withConfig({ displayName: \"ToolbarContainer\", componentId: \"sc-1c2086x\" }) `\n    border-bottom: 1px solid ${COLORS.Border};\n`;\nconst tz = moment.tz.guess();\nconst TooltipTheme = Object.assign({}, Tooltip.BottomTheme, {\n    left: 0,\n    top: 'auto',\n    transform: 'none',\n});\nconst StreamSelectorContainer = styled.div.withConfig({ displayName: \"StreamSelectorContainer\", componentId: \"sc-14hinhh\" }) `\n    padding: 14px 16px;\n    .select-stream-label {\n        margin-bottom: 8px;\n        font-weight: ${MEDIUM};\n    }\n`;\nconst StreamSelector = styled.div.withConfig({ displayName: \"StreamSelector\", componentId: \"sc-vellg2\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n`;\nconst DesktopStreamSelector = styled.div.withConfig({ displayName: \"DesktopStreamSelector\", componentId: \"sc-13j4mo1\" }) `\n    display: none;\n    @media (${TABLET}) {\n        display: block;\n    }\n`;\nconst MobileStreamSelector = styled.div.withConfig({ displayName: \"MobileStreamSelector\", componentId: \"sc-1q4kx4s\" }) `\n    background-color: ${COLORS.secondary};\n    padding: 24px;\n    @media (${TABLET}) {\n        display: none;\n    }\n    .label {\n        font-weight: ${MEDIUM};\n        margin-bottom: 8px;\n    }\n    .selector {\n        align-items: center;\n        display: flex;\n        gap: 8px;\n        margin-bottom: 5px;\n    }\n`;\nconst DesktopToolbar = styled(Toolbar).withConfig({ displayName: \"DesktopToolbar\", componentId: \"sc-1f8le16\" }) `\n    display: none;\n    @media (${TABLET}) {\n        display: block;\n    }\n`;\nconst UnstyledFeed = ({ className, errorComponent = null, inspectorFocused = false, streamData, streamLoaded, onPartitionChange, onSettingsButtonClick, onStreamChange, partition, partitions = [], streamId, streamIds = [streamId], }) => {\n    const [datapoint, setDatapoint] = useState();\n    useEffect(() => {\n        setDatapoint(undefined);\n    }, [streamId]);\n    const { metadata, data } = datapoint || { metadata: null, data: null };\n    const selectedMsgId = metadata && JSON.stringify(metadata.messageId);\n    const selectedTimestamp = metadata && metadata.timestamp;\n    const selection = Object.entries(data || {});\n    const { copy } = useCopy();\n    const rowRef = useRef(null);\n    const copyText = 'ontouchstart' in window ? 'Tap to copy' : 'Copy';\n    const streamOptions = useMemo(() => streamIds.map((id) => ({ value: id, label: truncateStreamName(id) })), [streamIds]);\n    const onCopyClick = (value) => (e) => {\n        const prevRow = rowRef.current;\n        rowRef.current = e.currentTarget;\n        // Using touch screen and \"focused\" row does not much current row? Do nothing.\n        if ('ontouchstart' in window && prevRow !== e.currentTarget) {\n            return;\n        }\n        // Value is not a string? Do nothing.\n        if (typeof value !== 'string') {\n            return;\n        }\n        copy(value, {\n            toastMessage: 'Field data copied to clipboard',\n        });\n    };\n    return (React.createElement(\"div\", { className: className },\n        streamOptions.length > 1 && (React.createElement(MobileStreamSelector, null,\n            React.createElement(\"p\", { className: 'label' }, \"Select a Stream\"),\n            React.createElement(\"div\", { className: 'selector' },\n                React.createElement(ModalStreamSelector, { streamIds: streamIds, selectedStream: streamId, onChange: onStreamChange }),\n                React.createElement(CopyButton, { value: streamId })))),\n        React.createElement(Container, { inspectorFocused: inspectorFocused },\n            React.createElement(LeftFiller, null),\n            React.createElement(Lhs, { className: 'no-overflow-desktop' }, (streamOptions.length > 1 ||\n                (partitions != null && partitions.length > 1)) && (React.createElement(ToolbarContainer, null,\n                streamOptions.length > 1 && (React.createElement(DesktopStreamSelector, null,\n                    React.createElement(StreamSelectorContainer, null,\n                        React.createElement(\"p\", { className: 'select-stream-label' }, \"Select a stream\"),\n                        React.createElement(StreamSelector, null,\n                            React.createElement(SelectField2, { placeholder: 'Select Stream', options: streamOptions, onChange: onStreamChange, isClearable: false, value: streamId }),\n                            React.createElement(CopyButton, { value: streamId }))))),\n                React.createElement(DesktopToolbar, { onPartitionChange: onPartitionChange, onSettingsButtonClick: onSettingsButtonClick, partition: partition, partitions: partitions || [], streamId: streamId })))),\n            React.createElement(Rhs, null),\n            React.createElement(RightFiller, null)),\n        React.createElement(Container, { inspectorFocused: inspectorFocused },\n            React.createElement(LeftFiller, null),\n            React.createElement(Lhs, null,\n                React.createElement(Header, null,\n                    React.createElement(Row, null,\n                        React.createElement(Layout.Pusher, null),\n                        React.createElement(Inner, null,\n                            React.createElement(Cell, { as: \"strong\" }, \"Timestamp\"),\n                            React.createElement(Cell, { as: \"strong\" }, \"Data\")))),\n                React.createElement(Viewport, null, !!streamLoaded &&\n                    (streamData || []).map((d) => {\n                        if (!d) {\n                            return null;\n                        }\n                        const msgId = JSON.stringify(d.metadata.messageId);\n                        const Tag = selectedMsgId === msgId ? 'strong' : 'span';\n                        return (React.createElement(Row, { key: msgId, onClick: () => setDatapoint((current) => (d === current ? undefined : d)) },\n                            React.createElement(Layout.Pusher, null),\n                            React.createElement(Inner, null,\n                                React.createElement(Cell, { as: Tag }, formatDateTime(d.metadata && d.metadata.timestamp, tz)),\n                                React.createElement(Cell, { as: Tag }, JSON.stringify(d.data)))));\n                    }))),\n            React.createElement(Rhs, null,\n                React.createElement(Header, null,\n                    React.createElement(Row, null,\n                        React.createElement(Inner, null,\n                            React.createElement(\"div\", null,\n                                React.createElement(\"strong\", null,\n                                    React.createElement(Cell, null, \"Inspector\")))))),\n                React.createElement(Viewport, null,\n                    !!selectedTimestamp && (React.createElement(Row, null,\n                        React.createElement(Inner, { as: Tooltip.Parent, onClick: onCopyClick(formatDateTime(selectedTimestamp, tz)) },\n                            React.createElement(\"div\", null, \"Timestamp\"),\n                            React.createElement(\"div\", null,\n                                React.createElement(Tooltip, { value: copyText, placement: TooltipTheme },\n                                    React.createElement(Cell, null, formatDateTime(selectedTimestamp, tz))))))),\n                    selection.map(([k, v]) => {\n                        const value = formatValue(v);\n                        return (React.createElement(Row, { key: `${k}${value}` },\n                            React.createElement(Inner, { as: Tooltip.Parent, onClick: onCopyClick(value) },\n                                React.createElement(\"div\", null,\n                                    React.createElement(Cell, null, k)),\n                                React.createElement(\"div\", null,\n                                    React.createElement(Tooltip, { value: copyText, placement: TooltipTheme },\n                                        React.createElement(Cell, null, value))))));\n                    }),\n                    errorComponent)),\n            React.createElement(RightFiller, null))));\n};\nconst Feed = styled(UnstyledFeed).withConfig({ displayName: \"Feed\", componentId: \"sc-yri3o2\" }) `\n    flex-grow: 1;\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    padding-bottom: 80px;\n    @media (${TABLET}) {\n        padding-bottom: 0;\n    }\n\n    ${Tooltip.Root} {\n        display: inline;\n        line-height: inherit;\n    }\n`;\nObject.assign(Feed, {\n    Cell,\n    Lhs,\n    Rhs,\n    Row,\n});\nexport default Feed;\n","import styled from 'styled-components';\nimport { TABLET } from '~/shared/utils/styled';\nconst Foot = styled.div.withConfig({ displayName: \"Foot\", componentId: \"sc-ky51qf\" }) `\n    align-items: center;\n    background: #ffffff;\n    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n    display: flex;\n    height: 80px;\n    padding: 0 24px;\n    position: fixed;\n    bottom: 0px;\n    width: 100%;\n\n    > div + div {\n        margin-left: 32px;\n    }\n\n    @media (${TABLET}) {\n        display: none;\n    }\n`;\nexport default Foot;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useClient } from 'streamr-client-react';\nimport styled, { css } from 'styled-components';\nimport { EmptyState } from '~/components/EmptyState';\nimport emptyStateIcon from '~/shared/assets/images/empty_state_icon.png';\nimport emptyStateIcon2x from '~/shared/assets/images/empty_state_icon@2x.png';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Errors from '~/shared/components/Ui/Errors';\nimport useStreamData from '~/shared/hooks/useStreamData';\nimport { COLORS } from '~/shared/utils/styled';\nimport Feed from './Feed';\nimport Foot from './Foot';\nimport IconButton from './IconButton';\nimport Selector from './Selector';\nconst InspectorButton = styled(IconButton).withConfig({ displayName: \"InspectorButton\", componentId: \"sc-1ukkj7x\" }) `\n    width: 32px;\n    height: 32px;\n    text-align: center;\n    position: relative;\n    border: none;\n    background: none;\n    appearance: none;\n    border-radius: 2px;\n    color: #cdcdcd;\n\n    &:hover,\n    &:active,\n    &:focus {\n        background-color: #efefef;\n        color: #525252;\n    }\n\n    ${({ active }) => !!active &&\n    css `\n            background-color: #efefef;\n            color: #525252;\n        `}\n`;\nconst UnstyledStreamPreview = ({ streamsList, activePartition = 0, className, preselectedStreamId, previewDisabled = false, }) => {\n    const client = useClient();\n    const [inspectorFocused, setInspectorFocused] = useState(false);\n    const [selectedStreamId, setSelectedStreamId] = useState(!!preselectedStreamId && streamsList.includes(preselectedStreamId)\n        ? preselectedStreamId\n        : streamsList[0]);\n    const [partition, setPartition] = useState(activePartition);\n    const [loading, setIsLoading] = useState();\n    const [_, setStream] = useState();\n    const [partitions, setPartitions] = useState();\n    const streamData = useStreamData(selectedStreamId, {\n        tail: 20,\n        partition,\n    });\n    useEffect(() => {\n        const loadStreamData = async () => {\n            if (client) {\n                setIsLoading(true);\n                try {\n                    const result = await client.getStream(selectedStreamId);\n                    setStream(result);\n                    const metadata = await result.getMetadata();\n                    const partitionCount = metadata.partitions;\n                    setPartitions(partitionCount);\n                }\n                finally {\n                    setIsLoading(false);\n                }\n            }\n        };\n        loadStreamData();\n    }, [selectedStreamId, client]);\n    const partitionOptions = useMemo(() => partitions ? [...new Array(partitions)].map((_, index) => index) : undefined, [partitions]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: loading }),\n        previewDisabled && (React.createElement(EmptyState, { image: React.createElement(\"img\", { src: emptyStateIcon, srcSet: `${emptyStateIcon2x} 2x`, alt: \"No permission to subscribe\" }) },\n            React.createElement(\"p\", null,\n                React.createElement(\"span\", null,\n                    \"You do not have permission to\",\n                    React.createElement(\"br\", null),\n                    \"subscribe to the stream.\")))),\n        !loading && (React.createElement(React.Fragment, null,\n            !previewDisabled && (React.createElement(Feed, { className: className, inspectorFocused: inspectorFocused, streamData: streamData, streamLoaded: !loading, \n                // errorComponent={\n                //     <Fragment>\n                //         {!!dataError && <Errors>{dataError}</Errors>}\n                //     </Fragment>\n                // }\n                onPartitionChange: setPartition, onSettingsButtonClick: undefined, onStreamChange: setSelectedStreamId, partition: partition, partitions: partitionOptions || [], streamId: selectedStreamId, streamIds: streamsList })),\n            React.createElement(Foot, null,\n                React.createElement(\"div\", null,\n                    React.createElement(InspectorButton, { active: !inspectorFocused, onClick: () => setInspectorFocused(false), type: \"button\" },\n                        React.createElement(SvgIcon, { name: \"list\" }))),\n                React.createElement(\"div\", null,\n                    React.createElement(InspectorButton, { active: !!inspectorFocused, onClick: () => setInspectorFocused(true), type: \"button\" },\n                        React.createElement(SvgIcon, { name: \"listInspect\" }))),\n                !inspectorFocused && !loading && (React.createElement(\"div\", null,\n                    React.createElement(Selector, { title: \"Partitions\", options: partitionOptions || [], active: partition, onChange: setPartition }))))))));\n};\nexport const StreamPreview = styled(UnstyledStreamPreview).withConfig({ displayName: \"StreamPreview\", componentId: \"sc-mmbziw\" }) `\n    background: #ffffff;\n    color: #323232;\n    font-size: 14px;\n    border-top: 1px solid ${COLORS.Border};\n    height: 100%;\n\n    ${Errors} {\n        margin: 20px 40px 0;\n    }\n\n    ${Errors} + ${Errors} {\n        margin-top: 1em;\n    }\n\n    ${Errors}:last-child {\n        padding-bottom: 20px;\n    }\n`;\n","import { useState, useRef, useEffect } from 'react';\nimport { useSubscribe } from 'streamr-client-react';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nfunction getEmptyData() {\n    return [];\n}\nfunction areMessagesSame(a, b) {\n    return a.toMessageRef().compareTo(b.toMessageRef()) === 0;\n}\nexport default function useStreamData(streamId, { partition = 0, activeFn: activeFnProp, onError: onErrorProp, tail = Number.POSITIVE_INFINITY, } = {}) {\n    const isMounted = useIsMounted();\n    const cacheRef = useRef(getEmptyData());\n    const [data, setData] = useState(getEmptyData());\n    const activeFn = typeof activeFnProp === 'function' ? activeFnProp : () => streamId;\n    const onErrorRef = useRef(onErrorProp);\n    useEffect(() => {\n        onErrorRef.current = onErrorProp;\n    }, [onErrorProp]);\n    useSubscribe({ id: streamId, partition: partition }, {\n        disabled: !activeFn(),\n        onError: (e) => {\n            console.warn(e);\n            if (typeof onErrorRef.current === 'function') {\n                onErrorRef.current();\n            }\n        },\n        onMessage(msg) {\n            if (!isMounted()) {\n                return;\n            }\n            const dataPoint = {\n                data: msg.getParsedContent(),\n                metadata: {\n                    messageId: msg.messageId,\n                    timestamp: msg.getTimestamp(),\n                },\n            };\n            const { current: cache } = cacheRef;\n            const existingMessage = cache.find((d) => areMessagesSame(d.metadata.messageId, dataPoint.metadata.messageId));\n            if (existingMessage) {\n                // Duplicate message -> skip it\n                return;\n            }\n            cache.unshift(dataPoint);\n            cache.length = Math.min(cache.length, tail);\n            setData([...cache]);\n        },\n    });\n    const firstRunRef = useRef(true);\n    useEffect(() => {\n        if (firstRunRef.current) {\n            firstRunRef.current = false;\n            return;\n        }\n        setData(getEmptyData());\n        cacheRef.current = getEmptyData();\n    }, [streamId, partition]);\n    return data;\n}\n","import { useEffect } from 'react';\nimport { produce } from 'immer';\nimport { create } from 'zustand';\nimport { getProjectPermissions } from '~/getters';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { address0 } from '~/consts';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useWalletAccount } from './wallet';\nexport var ProjectPermission;\n(function (ProjectPermission) {\n    ProjectPermission[ProjectPermission[\"Buy\"] = 0] = \"Buy\";\n    ProjectPermission[ProjectPermission[\"Delete\"] = 1] = \"Delete\";\n    ProjectPermission[ProjectPermission[\"Edit\"] = 2] = \"Edit\";\n    ProjectPermission[ProjectPermission[\"Grant\"] = 3] = \"Grant\";\n})(ProjectPermission || (ProjectPermission = {}));\nfunction key(chainId, projectId, account) {\n    return JSON.stringify([chainId, projectId, account.toLowerCase()]);\n}\nconst useProjectAbilitiesStore = create((set) => {\n    const fetching = {};\n    return {\n        permissions: {},\n        async fetchPermissions(chainId, projectId, account) {\n            const pkey = key(chainId, projectId, account);\n            const { [pkey]: isFetching = false } = fetching;\n            if (isFetching) {\n                return;\n            }\n            try {\n                fetching[pkey] = true;\n                const permissions = await getProjectPermissions(chainId, projectId, account);\n                set((current) => produce(current, (next) => {\n                    const { cache } = next.permissions[pkey] || {};\n                    next.permissions[pkey] = {\n                        cache,\n                        value: permissions,\n                    };\n                }));\n            }\n            finally {\n                delete fetching[pkey];\n            }\n        },\n        invalidate(chainId, projectId, account) {\n            set((current) => produce(current, (next) => {\n                const pkay = key(chainId, projectId, account);\n                const { cache = 0 } = next.permissions[pkay] || {};\n                next.permissions[pkay] = {\n                    cache: cache + 1,\n                };\n            }));\n        },\n    };\n});\nfunction useProjectAbility(chainId, projectId, account, permission) {\n    const { fetchPermissions, permissions } = useProjectAbilitiesStore();\n    const address = account || address0;\n    const { value, cache = 0 } = (projectId ? permissions[key(chainId, projectId, address)] : undefined) || {};\n    useEffect(() => {\n        async function fn() {\n            if (!projectId) {\n                return;\n            }\n            try {\n                await fetchPermissions(chainId, projectId, address);\n            }\n            catch (e) {\n                console.warn('Could not fetch permissions', chainId, projectId, address, e);\n            }\n        }\n        fn();\n    }, [fetchPermissions, chainId, projectId, address, cache]);\n    switch (permission) {\n        case ProjectPermission.Buy:\n            return value?.canBuy;\n        case ProjectPermission.Delete:\n            return value?.canDelete;\n        case ProjectPermission.Edit:\n            return value?.canEdit;\n        case ProjectPermission.Grant:\n            return value?.canGrant;\n        default:\n            throw new Error('Invalid permission');\n    }\n}\nexport function useCurrentProjectAbility(permission) {\n    const chainId = useCurrentChainId();\n    return useProjectAbility(chainId, ProjectDraft.useEntity()?.id, useWalletAccount(), permission);\n}\n","import React from 'react';\nimport { formatPrice } from '~/marketplace/utils/price';\nimport { contractCurrencies as currencies } from '~/shared/utils/constants';\nimport { useTokenInfo } from '~/utils/tokens';\nexport default function FormattedPaymentRate({ amount = 0n, pricingTokenAddress, chainId, timeUnit, }) {\n    const { symbol = currencies.DATA, decimals = 18n } = useTokenInfo(pricingTokenAddress, chainId) || {};\n    return (React.createElement(React.Fragment, null, formatPrice(amount, currencies.PRODUCT_DEFINED, decimals, timeUnit, symbol)));\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport FormattedPaymentRate from '~/components/FormattedPaymentRate';\nimport { getProjectTypeName } from '~/getters';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport { useIsProjectBeingPurchased, usePurchaseCallback, } from '~/shared/stores/purchases';\nimport { ProjectType } from '~/shared/types';\nimport { REGULAR, TABLET } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { useIsAccessibleByCurrentWallet } from '~/stores/projectDraft';\nimport { getChainDisplayName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { errorToast } from '~/utils/toast';\nexport function AccessManifest({ projectId, projectType, firstSalePoint, otherSalePoints, }) {\n    const prefix = `The streams in this ${getProjectTypeName(projectType)}`;\n    const count = otherSalePoints.length;\n    const purchase = usePurchaseCallback();\n    const projectChainId = useCurrentChainId();\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const isBeingPurchased = useIsProjectBeingPurchased(projectId);\n    const { pricePerSecond, chainId, pricingTokenAddress } = firstSalePoint;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Root, null,\n        projectType === ProjectType.OpenData ? (React.createElement(\"p\", null,\n            prefix,\n            \" are public and can be accessed for \",\n            React.createElement(\"strong\", null, \"free\"),\n            \".\")) : (React.createElement(\"p\", null,\n            prefix,\n            \" can be accessed for\",\n            ' ',\n            React.createElement(\"strong\", null,\n                ' ',\n                React.createElement(FormattedPaymentRate, { amount: pricePerSecond, chainId: chainId, pricingTokenAddress: pricingTokenAddress, timeUnit: timeUnits.hour })),\n            ' ',\n            \"on \",\n            React.createElement(\"strong\", null, getChainDisplayName(chainId)),\n            count > 0 && (React.createElement(React.Fragment, null,\n                ' ',\n                \"and on \",\n                count,\n                \" other chain\",\n                count > 1 && 's')),\n            \".\")),\n        hasAccess === true && (React.createElement(Button, { as: Link, to: R.projectConnect(projectId, routeOptions(chainKey)) }, \"Connect\")),\n        hasAccess === false && (React.createElement(Button, { type: \"button\", waiting: isBeingPurchased, onClick: async () => {\n                try {\n                    await purchase(projectChainId, projectId);\n                }\n                catch (e) {\n                    if (isAbandonment(e)) {\n                        return;\n                    }\n                    console.warn('Purchase failed', e);\n                    errorToast({\n                        title: 'Purchase failed',\n                    });\n                }\n            } }, \"Get access\")),\n        typeof hasAccess === 'undefined' && (React.createElement(Button, { type: \"button\", waiting: true }, \"Loading\\u2026\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y2ll9e\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    font-size: 18px;\n    font-weight: ${REGULAR};\n    flex-direction: column;\n\n    p {\n        margin: 0;\n    }\n\n    a {\n        width: 100%;\n        margin-top: 20px;\n    }\n\n    @media ${TABLET} {\n        flex-direction: row;\n\n        a {\n            width: auto;\n            margin-top: 0;\n            margin-left: 20px;\n        }\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport FormattedPaymentRate from '~/components/FormattedPaymentRate';\nimport { getProjectTypeName } from '~/getters';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport ProjectPng from '~/shared/assets/images/project.png';\nimport { useIsProjectBeingPurchased, usePurchaseCallback, } from '~/shared/stores/purchases';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { timeUnits } from '~/shared/utils/timeUnit';\nimport { getChainDisplayName, useCurrentChainId } from '~/utils/chains';\nimport { errorToast } from '~/utils/toast';\nconst GetAccessContainer = styled.div.withConfig({ displayName: \"GetAccessContainer\", componentId: \"sc-1v6qavr\" }) `\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    max-width: 488px;\n    margin: 0 auto;\n    padding: 15px 0 100px;\n\n    img {\n        display: block;\n    }\n\n    h1 {\n        font-weight: ${MEDIUM};\n        font-size: 34px;\n        line-height: 44px;\n        margin-bottom: 19px;\n        text-align: center;\n    }\n\n    p {\n        font-size: 18px;\n        line-height: 30px;\n        margin-bottom: 50px;\n        text-align: center;\n    }\n`;\nexport default function GetAccess({ projectId, projectName, projectType, salePoints, }) {\n    const [firstSalePoint, ...otherSalePoints] = salePoints;\n    const count = otherSalePoints.length;\n    const purchase = usePurchaseCallback();\n    const projectChainId = useCurrentChainId();\n    const isBeingPurchased = useIsProjectBeingPurchased(projectId);\n    if (!firstSalePoint) {\n        return null;\n    }\n    const { pricePerSecond, chainId, pricingTokenAddress } = firstSalePoint;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(GetAccessContainer, null,\n            React.createElement(\"img\", { src: ProjectPng, alt: \"Get access\", width: \"290\", height: \"265\" }),\n            React.createElement(\"h1\", null,\n                \"Get access to \",\n                projectName),\n            React.createElement(\"p\", null,\n                \"The streams in this \",\n                getProjectTypeName(projectType),\n                \" can be accessed for\",\n                React.createElement(\"br\", null),\n                React.createElement(\"strong\", null,\n                    React.createElement(FormattedPaymentRate, { amount: pricePerSecond, chainId: chainId, pricingTokenAddress: pricingTokenAddress, timeUnit: timeUnits.hour })),\n                ' ',\n                \"on \",\n                React.createElement(\"strong\", null, getChainDisplayName(chainId)),\n                count > 0 && (React.createElement(React.Fragment, null,\n                    \"and on \",\n                    count,\n                    \" other chain\",\n                    count > 1 && 's'))),\n            React.createElement(Button, { type: \"button\", waiting: isBeingPurchased, onClick: async () => {\n                    try {\n                        await purchase(projectChainId, projectId);\n                    }\n                    catch (e) {\n                        if (isAbandonment(e)) {\n                            return;\n                        }\n                        console.warn('Purchase failed', e);\n                        errorToast({\n                            title: 'Purchase failed',\n                        });\n                    }\n                } }, \"Get access\"))));\n}\n","import React from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport isPreventable from '~/utils/isPreventable';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport default function ProjectLinkTabs({ projectId, disabled = false, }) {\n    const { pathname } = useLocation();\n    const chainKey = useCurrentChainKey();\n    if (!projectId || disabled) {\n        return (React.createElement(Tabs, null,\n            React.createElement(Tab, { id: \"overview\", tag: Link, selected: true, to: pathname, onClick: (e) => {\n                    if (isPreventable(e)) {\n                        e.preventDefault();\n                    }\n                } }, \"Project overview\"),\n            React.createElement(Tab, { id: \"connect\", disabled: true }, \"Connect\"),\n            React.createElement(Tab, { id: \"liveData\", disabled: true }, \"Live data\")));\n    }\n    return (React.createElement(Tabs, null,\n        React.createElement(Tab, { id: \"overview\", tag: Link, to: R.projectOverview(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectOverview(projectId)) }, \"Project overview\"),\n        React.createElement(Tab, { id: \"connect\", tag: Link, to: R.projectConnect(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectConnect(projectId)) }, \"Connect\"),\n        React.createElement(Tab, { id: \"liveData\", tag: Link, to: R.projectLiveData(projectId, routeOptions(chainKey)), selected: pathname.startsWith(R.projectLiveData(projectId)) }, \"Live data\")));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { Tick } from '~/shared/components/Checkbox';\nimport Label from '~/shared/components/Ui/Label';\nimport Input from '~/shared/components/Ui/Text/StyledInput';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { OpenDataPayload } from '~/types/projects';\nexport default function TermsOfUse() {\n    const update = ProjectDraft.useUpdateEntity();\n    const { termsOfUse: { redistribution = false, commercialUse = false, reselling = false, storage = false, termsUrl, termsName, }, } = ProjectDraft.useEntity({ hot: true }) ||\n        getEmptyParsedProject({ type: ProjectType.OpenData });\n    const { 'termsOfUse.termsUrl': termsUrlError } = ProjectDraft.useDraft()?.errors || {};\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const persist = usePersistProjectCallback();\n    const busy = ProjectDraft.useIsDraftBusy();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(Checkboxes, null,\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.redistribution = !termsOfUse.redistribution;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": redistribution }),\n                React.createElement(\"span\", null, \"Redistribution\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.commercialUse = !termsOfUse.commercialUse;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": commercialUse }),\n                React.createElement(\"span\", null, \"Commercial use\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.reselling = !termsOfUse.reselling;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": reselling }),\n                React.createElement(\"span\", null, \"Reselling\")),\n            React.createElement(TickButton, { disabled: busy, type: \"button\", onClick: () => {\n                    update(({ termsOfUse }) => {\n                        termsOfUse.storage = !termsOfUse.storage;\n                    });\n                } },\n                React.createElement(Tick, { \"$checked\": storage }),\n                React.createElement(\"span\", null, \"Storage\"))),\n        React.createElement(Links, null,\n            React.createElement(\"div\", null,\n                React.createElement(Label, null, \"Link to detailed terms\"),\n                React.createElement(Input, { disabled: busy, invalid: !!termsUrlError, type: \"text\", placeholder: \"Add a URL\", value: termsUrl, onChange: (e) => {\n                        update(({ termsOfUse }) => {\n                            termsOfUse.termsUrl = e.target.value;\n                        });\n                        if (!termsUrlError) {\n                            /**\n                             * Only revalidate the URL if we're already in the red. This will prevent\n                             * on-the-fly validation before hitting submit assuming the user\n                             * knows what a URL is.\n                             */\n                            return;\n                        }\n                        try {\n                            OpenDataPayload.pick({\n                                termsOfUse: true,\n                            }).parse({\n                                termsOfUse: {\n                                    termsUrl: e.target.value,\n                                },\n                            });\n                            setErrors((errors) => {\n                                delete errors['termsOfUse.termsUrl'];\n                            });\n                        }\n                        catch (e) {\n                            if (e instanceof z.ZodError) {\n                                return;\n                            }\n                            console.warn('Failed to validate terms of use', e);\n                        }\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            persist();\n                        }\n                    } })),\n            React.createElement(\"div\", null,\n                React.createElement(Label, null, \"Display name for link\"),\n                React.createElement(Input, { disabled: busy, type: \"text\", placeholder: \"Add a display name\", value: termsName, onChange: (e) => {\n                        update(({ termsOfUse }) => {\n                            termsOfUse.termsName = e.target.value;\n                        });\n                    }, onKeyDown: ({ key }) => {\n                        if (key === 'Enter') {\n                            persist();\n                        }\n                    } })))));\n}\nconst Checkboxes = styled.div.withConfig({ displayName: \"Checkboxes\", componentId: \"sc-178w5da\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    gap: 32px;\n    grid-template-columns: repeat(auto-fit, 146px);\n    padding: 24px;\n`;\nconst TickButton = styled.button.withConfig({ displayName: \"TickButton\", componentId: \"sc-gijhji\" }) `\n    align-items: center;\n    appearance: none;\n    background: transparent;\n    border: 0;\n    display: flex;\n    line-height: normal;\n    padding: 0;\n    white-space: nowrap;\n\n    ${Tick} {\n        flex-shrink: 0;\n        height: 24px;\n        margin-right: 12px;\n        width: 24px;\n    }\n`;\nconst Links = styled.div.withConfig({ displayName: \"Links\", componentId: \"sc-1mp7o93\" }) `\n    display: grid;\n    gap: 32px;\n    grid-template-columns: 1fr 1fr;\n    margin-top: 40px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport TextField from '~/shared/components/Ui/Text/StyledInput';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS } from '~/shared/utils/styled';\nexport default function DataUnionFee({ disabled = false }) {\n    const update = ProjectDraft.useUpdateEntity();\n    const emptyProject = getEmptyParsedProject({ type: ProjectType.OpenData });\n    const project = ProjectDraft.useEntity({ hot: true }) || emptyProject;\n    const coldProject = ProjectDraft.useEntity() || emptyProject;\n    const isDataUnion = project.type === ProjectType.DataUnion;\n    return (React.createElement(Root, null,\n        React.createElement(\"p\", null, \"Set the fee you receive from this Data Union (% of total\\u00A0sales)\"),\n        React.createElement(InputWrap, null,\n            React.createElement(TextField, { placeholder: \"0\", value: (isDataUnion && project.adminFee) || '', readOnly: !isDataUnion, disabled: disabled, onChange: (e) => {\n                    update((draft) => {\n                        if (draft.type !== ProjectType.DataUnion) {\n                            return;\n                        }\n                        if (coldProject.type !== draft.type) {\n                            throw new Error('Cold and hot projects have different type, lol. Code much?');\n                        }\n                        draft.adminFee = e.target.value;\n                    });\n                } }),\n            React.createElement(Appendix, null, \"%\"))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-rzk10a\" }) `\n    align-items: center;\n    background-color: ${COLORS.inputBackground};\n    border-radius: 4px;\n    display: flex;\n    padding: 24px;\n\n    p {\n        flex-grow: 1;\n        margin: 0 56px 0 0;\n    }\n`;\nconst InputWrap = styled.div.withConfig({ displayName: \"InputWrap\", componentId: \"sc-sig4ws\" }) `\n    flex: 1;\n    min-width: 120px;\n    position: relative;\n\n    ${TextField} {\n        padding-right: 48px;\n    }\n`;\nconst Appendix = styled.div.withConfig({ displayName: \"Appendix\", componentId: \"sc-z0n4bi\" }) `\n    align-items: center;\n    border-left: 1px solid #efefef;\n    color: #525252;\n    display: flex;\n    height: 38px;\n    justify-content: center;\n    line-height: normal;\n    pointer-events: none;\n    position: absolute;\n    right: 1px;\n    top: 1px;\n    width: 36px;\n`;\n","import { ProjectDraft } from '~/stores/projectDraft';\nexport default function DataUnionPayment({ children, }) {\n    const { salePoints = {} } = ProjectDraft.useEntity({ hot: true }) || {};\n    const salePoint = Object.values(salePoints).find((salePoint) => salePoint?.enabled);\n    return children?.(salePoint) || null;\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport UnstyledRichMarkdownEditor from 'rich-markdown-editor';\nimport light from 'rich-markdown-editor/dist/styles/theme';\nimport { COLORS } from '~/shared/utils/styled';\nconst RichMarkdownEditor = styled(UnstyledRichMarkdownEditor).withConfig({ displayName: \"RichMarkdownEditor\", componentId: \"sc-1u4fry0\" }) `\n    justify-content: flex-start;\n\n    .block-menu-trigger {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n    }\n`;\nconst defaultTheme = {\n    ...light,\n    toolbarBackground: COLORS.primaryContrast,\n    toolbarHoverBackground: COLORS.primaryDisabled,\n    toolbarItem: COLORS.primaryLight,\n    placeholder: COLORS.primaryDisabled,\n    link: COLORS.link,\n};\nconst defaultDisabledExtensions = [\n    'table',\n    'td',\n    'th',\n    'tr',\n    'emoji',\n    'container_notice',\n    'image',\n    'hr',\n    'embed',\n    'checkbox_item',\n    'checkbox_list',\n    'heading',\n    'placeholder',\n    'highlight',\n];\nexport default function RichTextEditor({ theme = defaultTheme, disableExtensions = defaultDisabledExtensions, onChange, ...props }) {\n    return (React.createElement(RichMarkdownEditor, { ...props, disableExtensions: disableExtensions, onChange: (getValue) => {\n            onChange?.(getValue().replace(/\\\\$/gm, '').trim());\n        }, theme: theme }));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useDropzone } from 'react-dropzone';\nimport { maxFileSizeForImageUpload, maxFileSizeForImageUpload as maxSize, } from '~/shared/utils/constants';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { errorToast } from '~/utils/toast';\nexport default function ImageFilePicker({ children, disabled = false, onDrop, onReject, ...props }) {\n    const isMounted = useIsMounted();\n    const { getRootProps, getInputProps, isDragActive } = useDropzone({\n        accept: {\n            'image/jpeg': ['.jpg', '.jpeg'],\n            'image/png': ['.png'],\n        },\n        maxSize,\n        maxFiles: 1,\n        async onDropAccepted([file]) {\n            onDrop?.(file);\n        },\n        onDropRejected([{ file }]) {\n            if (onReject) {\n                return void onReject(file);\n            }\n            if (!isMounted()) {\n                return;\n            }\n            if (file.size > maxFileSizeForImageUpload) {\n                errorToast({\n                    title: `Image file size must be less than ${0 | (maxFileSizeForImageUpload / 1e6)}MB`,\n                });\n            }\n        },\n        disabled,\n    });\n    return (React.createElement(ImageFilePickerRoot, { ...getRootProps(props), \"area-disabled\": disabled, \"$isDragActive\": isDragActive },\n        React.createElement(\"input\", { ...getInputProps() }),\n        children));\n}\nconst ImageFilePickerRoot = styled.div.withConfig({ displayName: \"ImageFilePickerRoot\", componentId: \"sc-15rcf6j\" }) `\n    cursor: pointer;\n    overflow: hidden;\n    position: relative;\n\n    &[area-disabled] {\n        opacity: 0.5;\n    }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ImageFilePicker from '~/components/ImageFilePicker';\nimport { COLORS, DESKTOP } from '~/shared/utils/styled';\nimport PngIcon from '~/shared/components/PngIcon';\nconst Radius = 16;\nexport const Wide = 1100;\nexport default function CoverImage({ disabled = false, onChange, src, }) {\n    return (React.createElement(Root, null,\n        React.createElement(ImageFilePicker, { disabled: disabled, onDrop: onChange },\n            React.createElement(Dropzone, null,\n                React.createElement(Placeholder, null,\n                    React.createElement(PngIcon, { name: \"imageUpload\", alt: \"\" }),\n                    React.createElement(Mobile, null, \"Tap to take a photo or browse for one\"),\n                    React.createElement(Desktop, null, src ? (React.createElement(React.Fragment, null, \"Drag & drop to replace your cover image or\\u00A0click to browse for one\")) : (React.createElement(React.Fragment, null, \"Drag & drop to upload a cover image or\\u00A0click to browse for one\")))),\n                src && (React.createElement(React.Fragment, null,\n                    React.createElement(Preview, { as: \"div\" }),\n                    React.createElement(Preview, { src: src, alt: \"New image\" })))))));\n}\nconst Mobile = styled.p.withConfig({ displayName: \"Mobile\", componentId: \"sc-893nzg\" }) `\n    @media ${DESKTOP} {\n        display: none;\n    }\n`;\nconst Desktop = styled.p.withConfig({ displayName: \"Desktop\", componentId: \"sc-1kdnjsy\" }) `\n    display: none;\n\n    @media ${DESKTOP} {\n        display: block;\n    }\n`;\nexport const Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1y009fx\" }) `\n    max-width: 100%;\n    position: relative;\n\n    @media (min-width: ${Wide}px) {\n        width: 400px;\n    }\n`;\nconst Preview = styled.img.withConfig({ displayName: \"Preview\", componentId: \"sc-h0ffq8\" }) `\n    display: block;\n    background: white;\n    height: 100%;\n    left: 0;\n    position: absolute;\n    top: 0;\n    width: 100%;\n    visibility: visible;\n    opacity: 1;\n    transition: 0.5s;\n    transition-property: visibility, opacity;\n\n    & + & {\n        border-radius: ${Radius}px;\n    }\n`;\nconst Dropzone = styled.div.withConfig({ displayName: \"Dropzone\", componentId: \"sc-1gioxoy\" }) `\n    align-items: center;\n    aspect-ratio: 1 / 1;\n    background-color: ${COLORS.primaryLight};\n    border-radius: ${Radius}px;\n    color: #a3a3a3;\n    display: flex;\n    flex-direction: row;\n    font-weight: 500;\n    justify-content: center;\n    padding: 0 3em;\n    text-align: center;\n    width: 100%;\n\n    :hover ${Preview} {\n        opacity: 0;\n        transition-delay: 0.05s, 0s;\n        transition-duration: 0.05s;\n        visibility: hidden;\n    }\n`;\nconst Placeholder = styled.div.withConfig({ displayName: \"Placeholder\", componentId: \"sc-1f80nxl\" }) `\n    transform: translateY(3%);\n\n    > img {\n        margin: 0 auto;\n    }\n\n    p {\n        line-height: 1.75em;\n        margin: 2em 0 0;\n        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n    }\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { z } from 'zod';\nimport CropImageModal from '~/components/CropImageModal/CropImageModal';\nimport { PropertyDropdown, PropertyDropdownList, PropertyIcon, } from '~/components/PropertyDropdown';\nimport RichTextEditor from '~/components/RichTextEditor';\nimport { getBase64ForFile } from '~/getters';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { ProjectType } from '~/shared/types';\nimport { COLORS } from '~/shared/utils/styled';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { OpenDataPayload } from '~/types/projects';\nimport { Layer } from '~/utils/Layer';\nimport CoverImage, { Root as CoverImageRoot, Wide } from './CoverImage';\nconst cropModal = toaster(CropImageModal, Layer.Modal);\nexport default function EditorHero() {\n    const { creator, contact, name, description, imageUrl } = ProjectDraft.useEntity({ hot: true }) ||\n        getEmptyParsedProject({\n            type: ProjectType.OpenData,\n        });\n    const [newImageUrl, setNewImageUrl] = useState();\n    const update = ProjectDraft.useUpdateEntity();\n    const errors = ProjectDraft.useDraft()?.errors || {};\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const busy = ProjectDraft.useIsDraftBusy();\n    const imageAbortControllerRef = useRef();\n    useEffect(() => {\n        const { current: abortController } = imageAbortControllerRef;\n        return () => {\n            abortController?.abort();\n        };\n    }, []);\n    const persist = usePersistProjectCallback();\n    function validate(fn) {\n        try {\n            fn();\n        }\n        catch (e) {\n            if (e instanceof z.ZodError) {\n                const errors = {};\n                e.issues.forEach(({ path, message }) => {\n                    errors[path.join('.')] = message;\n                });\n                setErrors((existingErrors) => {\n                    Object.assign(existingErrors, errors);\n                });\n            }\n            throw e;\n        }\n    }\n    function resetError(key) {\n        setErrors((errors) => {\n            delete errors[key];\n        });\n    }\n    return (React.createElement(HeroContainer, null,\n        React.createElement(ImageWrap, null,\n            React.createElement(NameInput, { disabled: busy, type: \"text\", placeholder: \"Project name\", value: name, onChange: (e) => {\n                    update((project) => {\n                        project.name = e.target.value;\n                    });\n                }, onKeyDown: ({ key }) => {\n                    if (key === 'Enter') {\n                        persist();\n                    }\n                } }),\n            React.createElement(CoverImage, { disabled: busy, src: newImageUrl || imageUrl, onChange: async (file) => {\n                    imageAbortControllerRef.current?.abort();\n                    const abortController = new AbortController();\n                    imageAbortControllerRef.current = abortController;\n                    const { signal } = abortController;\n                    const croppedFile = await cropModal.pop({\n                        imageUrl: URL.createObjectURL(file),\n                    });\n                    if (signal.aborted) {\n                        return;\n                    }\n                    update((draft) => {\n                        draft.newImageToUpload = croppedFile;\n                    });\n                    const url = await getBase64ForFile(croppedFile);\n                    if (signal.aborted) {\n                        return;\n                    }\n                    setNewImageUrl(url);\n                } })),\n        React.createElement(DetailsWrap, null,\n            React.createElement(NameInput, { disabled: busy, type: \"text\", placeholder: \"Project name\", value: name, onChange: (e) => {\n                    update((project) => {\n                        project.name = e.target.value;\n                    });\n                }, onKeyDown: ({ key }) => {\n                    if (key === 'Enter') {\n                        persist();\n                    }\n                } }),\n            React.createElement(Desc, null,\n                React.createElement(RichTextEditor, { readOnly: busy, placeholder: \"Type something great about your project\\u2026\", defaultValue: description, onChange: (newDescription) => {\n                        update((project) => {\n                            project.description = newDescription;\n                        });\n                    } })),\n            React.createElement(PropertyDropdownList, null,\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors.creator, onChange: () => {\n                            resetError('creator');\n                        }, onDismiss: () => {\n                            resetError('creator');\n                        }, onSubmit: (value) => {\n                            resetError('creator');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    creator: true,\n                                }).parse({\n                                    creator: value,\n                                });\n                            });\n                            update((project) => {\n                                project.creator = value;\n                            });\n                        }, required: true, submitLabel: \"Add creator's name\", title: \"Please provide your name\", toggleIcon: React.createElement(PropertyIcon, { name: \"userFull\" }), value: creator, valuePlaceholder: \"Creator's name\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.url'], onChange: () => {\n                            resetError('contact.url');\n                        }, onDismiss: () => {\n                            resetError('contact.url');\n                        }, onSubmit: (value) => {\n                            resetError('contact.url');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { url: value },\n                                });\n                            });\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: {\n                                        url: value,\n                                    },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.url = value;\n                            });\n                        }, submitLabel: \"Add site URL\", title: \"Please add a site URL\", toggleIcon: React.createElement(PropertyIcon, { name: \"web\" }), value: contact.url, valuePlaceholder: \"Site URL\", placeholder: \"https://siteinfo.com\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.email'], onChange: () => {\n                            resetError('contact.email');\n                        }, onDismiss: () => {\n                            resetError('contact.email');\n                        }, onSubmit: (value) => {\n                            resetError('contact.email');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { email: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.email = value;\n                            });\n                        }, submitLabel: \"Add contact email\", title: \"Please add a contact email\", toggleIcon: React.createElement(PropertyIcon, { name: \"email\" }), value: contact.email, valuePlaceholder: \"Contact email\", placeholder: \"owner@example.com\" })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.twitter'], onChange: () => {\n                            resetError('contact.twitter');\n                        }, onDismiss: () => {\n                            resetError('contact.twitter');\n                        }, onSubmit: (value) => {\n                            resetError('contact.twitter');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { twitter: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.twitter = value;\n                            });\n                        }, submitLabel: \"Add Twitter link\", title: \"Please add Twitter link\", toggleIcon: React.createElement(PropertyIcon, { name: \"twitter\", \"$color\": contact.twitter ? '#1da1f2' : undefined }), value: contact.twitter })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.telegram'], onChange: () => {\n                            resetError('contact.telegram');\n                        }, onDismiss: () => {\n                            resetError('contact.telegram');\n                        }, onSubmit: (value) => {\n                            resetError('contact.telegram');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { telegram: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.telegram = value;\n                            });\n                        }, submitLabel: \"Add Telegram link\", title: \"Please add Telegram link\", toggleIcon: React.createElement(PropertyIcon, { name: \"telegram\", \"$color\": contact.telegram ? '#2aabee' : void 0 }), value: contact.telegram })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.reddit'], onChange: () => {\n                            resetError('contact.reddit');\n                        }, onDismiss: () => {\n                            resetError('contact.reddit');\n                        }, onSubmit: (value) => {\n                            resetError('contact.reddit');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { reddit: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.reddit = value;\n                            });\n                        }, submitLabel: \"Add Reddit link\", title: \"Please add Reddit link\", toggleIcon: React.createElement(PropertyIcon, { name: \"reddit\", \"$color\": contact.reddit ? '#ff5700' : void 0 }), value: contact.reddit })),\n                React.createElement(\"li\", null,\n                    React.createElement(PropertyDropdown, { disabled: busy, error: errors['contact.linkedIn'], onChange: () => {\n                            resetError('contact.linkedIn');\n                        }, onDismiss: () => {\n                            resetError('contact.linkedIn');\n                        }, onSubmit: (value) => {\n                            resetError('contact.linkedIn');\n                            validate(() => {\n                                OpenDataPayload.pick({\n                                    contact: true,\n                                }).parse({\n                                    contact: { linkedIn: value },\n                                });\n                            });\n                            update((project) => {\n                                project.contact.linkedIn = value;\n                            });\n                        }, submitLabel: \"Add LinkedIn link\", title: \"Please add LinkedIn link\", toggleIcon: React.createElement(PropertyIcon, { name: \"linkedin\", \"$color\": contact.linkedIn ? '#0077b5' : void 0 }), value: contact.linkedIn }))))));\n}\nconst NameInput = styled.input.withConfig({ displayName: \"NameInput\", componentId: \"sc-8a0jd8\" }) `\n    border: 0 !important;\n    display: block;\n    font-size: 34px;\n    line-height: 44px;\n    margin: 0 0 24px;\n    outline: 0 !important;\n    padding: 0;\n    width: 100%;\n\n    ::placeholder {\n        color: ${COLORS.primaryDisabled};\n    }\n\n    :disabled {\n        background: none;\n    }\n\n    @media (min-width: ${Wide}px) {\n        margin-top: 10px;\n    }\n`;\nconst ImageWrap = styled.div.withConfig({ displayName: \"ImageWrap\", componentId: \"sc-1aj19eq\" }) `\n    @media (min-width: ${Wide}px) {\n        ${NameInput} {\n            display: none;\n        }\n    }\n`;\nconst DetailsWrap = styled.div.withConfig({ displayName: \"DetailsWrap\", componentId: \"sc-o5xp98\" }) `\n    display: flex;\n    flex-direction: column;\n    flex-grow: 1;\n    min-width: 0;\n\n    ${NameInput} {\n        display: none;\n    }\n\n    @media (min-width: ${Wide}px) {\n        ${NameInput} {\n            display: block;\n        }\n    }\n`;\nconst Desc = styled.div.withConfig({ displayName: \"Desc\", componentId: \"sc-9950k8\" }) `\n    flex-grow: 1;\n    margin: 32px 0;\n\n    @media (min-width: ${Wide}px) {\n        margin: 0 0 48px;\n    }\n`;\nconst HeroContainer = styled.div.withConfig({ displayName: \"HeroContainer\", componentId: \"sc-19cpqte\" }) `\n    background-color: white;\n    border-radius: 16px;\n    padding: 24px;\n\n    @media (min-width: ${Wide}px) {\n        display: flex;\n        padding: 40px;\n\n        ${CoverImageRoot} {\n            flex-shrink: 0;\n            margin-right: 40px;\n        }\n    }\n`;\n","import styled, { css } from 'styled-components';\nimport { DESKTOP } from '~/shared/utils/styled';\nexport const FloatingToolbar = styled.div.withConfig({ displayName: \"FloatingToolbar\", componentId: \"sc-5u1pq0\" }) `\n    align-items: center;\n    backdrop-filter: blur(8px);\n    background: rgba(255, 255, 255, 0.9);\n    box-shadow: 0 0 30px rgba(0, 0, 0, 0.02), 0 0 2px rgba(0, 0, 0, 0.03);\n    display: flex;\n    height: 60px;\n    justify-content: flex-end;\n    left: 0;\n    opacity: 0;\n    padding: 0 24px;\n    position: fixed;\n    top: 0;\n    width: 100%;\n    z-index: 9;\n    visiblity: hidden;\n    transform: translateY(-100%);\n    transition: 100ms;\n    transition-delay: 100ms, 0s, 0s;\n    transition-property: visibility, opacity, transform;\n\n    @media ${DESKTOP} {\n        padding: 0 40px;\n    }\n\n    ${({ $active = false }) => $active &&\n    css `\n            opacity: 1;\n            visibility: visible;\n            transform: translateY(0);\n            transition-delay: 0s;\n        `}\n`;\n","import { useEffect, useRef, useState } from 'react';\nconst isSSR = typeof IntersectionObserver === 'undefined';\nexport function useInViewport() {\n    const [target, setTarget] = useState(null);\n    const targetRef = useRef(null);\n    const [inViewport, setInViewport] = useState(false);\n    const observerRef = useRef(isSSR\n        ? undefined\n        : new IntersectionObserver((entries) => {\n            entries.forEach((entry) => {\n                if (entry.target === targetRef.current) {\n                    setInViewport(entry.isIntersecting);\n                }\n            });\n        }));\n    useEffect(() => {\n        const { current: observer } = observerRef;\n        targetRef.current = target;\n        if (target) {\n            observer?.observe(target);\n        }\n        else {\n            setInViewport(false);\n        }\n        return () => {\n            if (target) {\n                observer?.unobserve(target);\n            }\n        };\n    }, [target]);\n    useEffect(() => {\n        const { current: observer } = observerRef;\n        return () => {\n            observer?.disconnect();\n        };\n    }, []);\n    useEffect(() => {\n        if (isSSR) {\n            // Fallback for when `IntersectionObserver` isn't there. We do it in `useEffect` to\n            // cover non-SSR environments that don't give us `IntersectionObserver`.\n            setInViewport(true);\n        }\n    }, []);\n    return [setTarget, inViewport];\n}\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { FloatingToolbar } from '~/components/FloatingToolbar';\nimport { NavContainer } from '~/components/Nav';\nimport { LogoLink, Navbar, NavbarItem } from '~/components/Nav/Nav.styles';\nimport { useInViewport } from '~/hooks/useInViewport';\nimport Logo from '~/shared/components/Logo';\nimport { REGULAR } from '~/shared/utils/styled';\nimport { ProjectDraft, usePersistProjectCallback } from '~/stores/projectDraft';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst FlexNavbar = styled(Navbar).withConfig({ displayName: \"FlexNavbar\", componentId: \"sc-9eby5k\" }) `\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n`;\nconst FlexNavbarItem = styled(NavbarItem).withConfig({ displayName: \"FlexNavbarItem\", componentId: \"sc-qze8rp\" }) `\n    display: flex;\n    align-items: center;\n\n    button {\n        margin-left: 10px;\n    }\n\n    h1 {\n        font-size: 18px;\n        font-weight: ${REGULAR};\n        margin: 0;\n        padding-left: 16px;\n    }\n`;\nexport default function EditorNav() {\n    const busy = ProjectDraft.useIsDraftBusy();\n    const clean = ProjectDraft.useIsDraftClean();\n    const { id: projectId } = ProjectDraft.useEntity() || {};\n    const persist = usePersistProjectCallback();\n    const [attach, isSaveButtonVisible] = useInViewport();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(NavContainer, null,\n        React.createElement(FloatingToolbar, { \"$active\": !isSaveButtonVisible },\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(Button, { as: Link, to: R.projects(routeOptions(chainKey)), kind: \"transparent\" }, \"Exit\"),\n                React.createElement(Button, { type: \"button\", disabled: busy || clean, onClick: () => void persist() }, \"Publish\"))),\n        React.createElement(FlexNavbar, null,\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(LogoLink, { href: R.root() },\n                    React.createElement(Logo, null)),\n                React.createElement(\"h1\", null, projectId ? React.createElement(React.Fragment, null, \"Edit a project\") : React.createElement(React.Fragment, null, \"Create a project\"))),\n            React.createElement(FlexNavbarItem, null,\n                React.createElement(Button, { as: Link, to: R.projects(routeOptions(chainKey)), kind: \"transparent\" }, \"Exit\"),\n                React.createElement(Button, { disabled: busy || clean, onClick: () => void persist(), ref: attach, type: \"button\" }, \"Publish\")))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { LoadMoreButton } from '~/components/LoadMore';\nconst StyledContainer = styled.div.withConfig({ displayName: \"StyledContainer\", componentId: \"sc-wg5uct\" }) `\n    display: flex;\n    justify-content: center;\n`;\nconst LoadMore = ({ onClick, hasMoreSearchResults, preserveSpace, className }) => {\n    if (!hasMoreSearchResults) {\n        return preserveSpace ? React.createElement(StyledContainer, { className: className }) : null;\n    }\n    return (React.createElement(StyledContainer, { className: className },\n        React.createElement(LoadMoreButton, { onClick: onClick, kind: \"primary2\" }, \"Load more\")));\n};\nexport default LoadMore;\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { Link } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport LoadMore from '~/marketplace/components/LoadMore';\nimport Checkbox from '~/shared/components/Checkbox';\nimport { COLORS, DESKTOP, MEDIUM, REGULAR, TABLET } from '~/shared/utils/styled';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst ROW_HEIGHT = 88;\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-3gj1eq\" }) `\n    align-items: center;\n    padding-left: 24px;\n`;\nconst TableGrid = styled(Row).withConfig({ displayName: \"TableGrid\", componentId: \"sc-mr4qn2\" }) `\n    display: grid;\n    gap: 8px;\n    grid-template-columns: minmax(0, 1fr) 18px;\n\n    @media ${TABLET} {\n        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 18px;\n    }\n\n    @media ${DESKTOP} {\n        grid-template-columns: minmax(0, 3fr) repeat(5, minmax(0, 1fr)) 18px;\n    }\n`;\nconst Table = styled.div.withConfig({ displayName: \"Table\", componentId: \"sc-1ag8w8i\" }) `\n    overflow: auto;\n`;\nconst TableHeader = styled(TableGrid).withConfig({ displayName: \"TableHeader\", componentId: \"sc-1azielj\" }) `\n    font-weight: ${MEDIUM};\n    height: ${ROW_HEIGHT}px;\n    font-size: 15px;\n    line-height: 26px;\n    color: ${COLORS.primaryLight};\n    border-bottom: 1px solid #f8f8f8;\n    position: sticky;\n    top: 0;\n    z-index: 1;\n`;\nconst TableRows = styled.div.withConfig({ displayName: \"TableRows\", componentId: \"sc-1ubwdc7\" }) `\n    height: ${({ rowCount }) => Math.max(rowCount, 1) * (ROW_HEIGHT + 1)}px;\n`;\nconst TableRow = styled(TableGrid).withConfig({ displayName: \"TableRow\", componentId: \"sc-bdllnd\" }) `\n    font-size: 16px;\n    line-height: 26px;\n    height: ${ROW_HEIGHT}px;\n    max-height: ${ROW_HEIGHT}px;\n    box-sizing: content-box;\n    color: ${COLORS.primaryLight};\n\n    &:not(:last-child) {\n        border-bottom: 1px solid #f8f8f8;\n    }\n`;\nconst GridCell = styled.span.withConfig({ displayName: \"GridCell\", componentId: \"sc-qlr3kn\" }) `\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n\n    ${({ onlyDesktop }) => onlyDesktop &&\n    css `\n            display: none;\n\n            @media ${DESKTOP} {\n                display: block;\n            }\n        `}\n\n    ${({ onlyTablet }) => onlyTablet &&\n    css `\n            display: none;\n\n            @media ${TABLET} {\n                display: block;\n            }\n\n            @media ${DESKTOP} {\n                display: none;\n            }\n        `}\n\n  ${({ notOnTablet }) => notOnTablet &&\n    css `\n            display: block;\n\n            @media ${TABLET} {\n                display: none;\n            }\n\n            @media ${DESKTOP} {\n                display: block;\n            }\n        `}\n\n  ${({ flex }) => flex\n    ? css `\n                  display: flex;\n              `\n    : ''}\n`;\nconst NoStreams = styled.div.withConfig({ displayName: \"NoStreams\", componentId: \"sc-ieoway\" }) `\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    height: 100%;\n    font-size: 14px;\n    line-height: 18px;\n    color: ${COLORS.primaryLight};\n`;\nconst StreamDetails = styled(Link).withConfig({ displayName: \"StreamDetails\", componentId: \"sc-tgyfu6\" }) `\n    font-size: 16px;\n    line-height: 26px;\n    overflow: hidden;\n    text-overflow: ellipsis;\n\n    &:active,\n    &:link,\n    &:visited,\n    &:hover {\n        color: ${COLORS.primaryLight};\n    }\n`;\nconst StreamId = styled(GridCell).withConfig({ displayName: \"StreamId\", componentId: \"sc-n9fbro\" }) `\n    font-weight: ${MEDIUM};\n`;\nconst StreamDescription = styled(GridCell).withConfig({ displayName: \"StreamDescription\", componentId: \"sc-7m5ho1\" }) `\n    font-weight: ${REGULAR};\n`;\nexport const StreamSelectTable = ({ streams, streamStats, loadMore, hasMoreResults, onSelectionChange, selected, disabled = false, }) => {\n    const [selectedStreams, setSelectedStreams] = useState({});\n    const [allSelected, setAllSelected] = useState(false);\n    const emitSelectedStreamsChange = useCallback((streams) => {\n        if (onSelectionChange) {\n            const selectedStreamsArray = Object.entries(streams)\n                .filter(([, isSelected]) => isSelected)\n                .map(([streamId]) => streamId);\n            onSelectionChange(selectedStreamsArray);\n        }\n    }, [onSelectionChange]);\n    const handleSelectChange = useCallback((streamId) => {\n        const newSelectedStreams = {\n            ...selectedStreams,\n            [streamId]: !selectedStreams[streamId],\n        };\n        setSelectedStreams(newSelectedStreams);\n        emitSelectedStreamsChange(newSelectedStreams);\n    }, [selectedStreams, emitSelectedStreamsChange]);\n    const handleSelectAllChange = useCallback(() => {\n        const shouldAllBeChecked = !allSelected;\n        const newSelectedStreams = {};\n        streams.forEach((stream) => {\n            newSelectedStreams[stream.id] = shouldAllBeChecked;\n        });\n        setSelectedStreams(newSelectedStreams);\n        setAllSelected(shouldAllBeChecked);\n        emitSelectedStreamsChange(newSelectedStreams);\n    }, [allSelected, streams, emitSelectedStreamsChange]);\n    useEffect(() => {\n        const selectedStreamsArray = Object.entries(selectedStreams)\n            .filter(([, isSelected]) => isSelected)\n            .map(([streamId]) => streamId);\n        if (streams.length > 0 &&\n            selectedStreamsArray.length === streams.length &&\n            !allSelected) {\n            setAllSelected(true);\n        }\n        if (selectedStreamsArray.length !== streams.length && allSelected) {\n            setAllSelected(false);\n        }\n    }, [selectedStreams, streams, allSelected]);\n    useEffect(() => {\n        if (selected && selected.length) {\n            const newSelectedStreams = {};\n            selected.forEach((streamId) => {\n                newSelectedStreams[streamId] = true;\n            });\n            setSelectedStreams(newSelectedStreams);\n        }\n    }, [selected]);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(\"div\", null,\n        React.createElement(Table, null,\n            React.createElement(TableHeader, null,\n                React.createElement(GridCell, null, \"Stream ID\"),\n                React.createElement(GridCell, { onlyTablet: true }, \"Description\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Live peers\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Msg/s\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Access\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Publishers\"),\n                React.createElement(GridCell, { onlyDesktop: true }, \"Subscribers\"),\n                React.createElement(GridCell, { flex: true },\n                    React.createElement(Checkbox, { value: allSelected, onChange: handleSelectAllChange, disabled: disabled }))),\n            React.createElement(TableRows, { rowCount: streams.length },\n                streams.map((s) => {\n                    const stats = streamStats ? streamStats[s.id] : null;\n                    return (React.createElement(TableRow, { key: s.id },\n                        React.createElement(StreamDetails, { to: R.stream(s.id, routeOptions(chainKey)) },\n                            React.createElement(StreamId, { title: s.id }, truncateStreamName(s.id, 40)),\n                            '\\n',\n                            React.createElement(StreamDescription, { notOnTablet: true }, s.metadata?.description ?? '')),\n                        React.createElement(GridCell, { onlyTablet: true }, s.metadata?.description ?? ''),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats?.peerCount ?? '-'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats?.messagesPerSecond ?? '-'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.subscriberCount == null\n                                ? 'Public'\n                                : 'Private'),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.publisherCount == null\n                                ? '∞'\n                                : stats.publisherCount),\n                        React.createElement(GridCell, { onlyDesktop: true }, stats == null\n                            ? '-'\n                            : stats.subscriberCount == null\n                                ? '∞'\n                                : stats.subscriberCount),\n                        React.createElement(GridCell, { flex: true },\n                            React.createElement(Checkbox, { value: selectedStreams[s.id], onChange: () => {\n                                    handleSelectChange(s.id);\n                                }, disabled: disabled }))));\n                }),\n                streams.length === 0 && (React.createElement(NoStreams, null, \"No streams that match your query\")))),\n        loadMore != null && (React.createElement(LoadMore, { hasMoreSearchResults: !!hasMoreResults, onClick: loadMore, preserveSpace: false }))));\n};\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { address0 } from '~/consts';\nimport { getStreamsFromIndexer } from '~/hooks/streams';\nimport { getStreamsOwnedBy } from '~/services/streams';\nimport SearchBar from '~/shared/components/SearchBar';\nimport { StreamSelectTable } from '~/shared/components/StreamSelectTable';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft } from '~/stores/projectDraft';\nconst PageSize = 10;\nconst EmptyStreams = [];\nexport default function EditorStreams() {\n    const { type: projectType = ProjectType.OpenData, streams: projectStreams = EmptyStreams, } = ProjectDraft.useEntity({ hot: true }) || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const [searchValue, setSearchValue] = useState('');\n    const account = useWalletAccount() || address0;\n    const [foundStreams, setFoundStreams] = useState([]);\n    const [page, setPage] = useState(0);\n    const streams = foundStreams.slice(0, (page + 1) * PageSize);\n    const [streamStats, setStreamStats] = useState({});\n    const hasMore = foundStreams.length > streams.length;\n    const abortControllerRef = useRef();\n    const update = ProjectDraft.useUpdateEntity();\n    const chainId = useCurrentChainId();\n    /**\n     * @todo Refactor to use `useInfiniteQuery`\n     */\n    const search = useCallback((phrase) => {\n        abortControllerRef.current?.abort();\n        const abortController = new AbortController();\n        abortControllerRef.current = abortController;\n        setTimeout(async () => {\n            try {\n                const foundStreams = await getStreamsOwnedBy(chainId, account, phrase, projectType === ProjectType.OpenData);\n                /**\n                 * If the signal got aborted we ignore the rest of the\n                 * flow. Aborting happens in a couple of reasonable places\n                 * throughout this components.\n                 */\n                if (abortController.signal.aborted) {\n                    return;\n                }\n                setFoundStreams(foundStreams);\n                setPage(0);\n            }\n            catch (e) {\n                console.warn('Faild to load streams', e);\n            }\n        });\n        return () => {\n            abortController.abort();\n        };\n    }, [account, projectType, chainId]);\n    /**\n     * Keep a ref for the search value to avoid triggering the below \"auto-search\"\n     * `useEffect`. Searching directly associated with the search value changes gets\n     * triggered from within SearchBar's `onChange` callback. See below.\n     */\n    const searchValueRef = useRef(searchValue);\n    useEffect(() => {\n        /**\n         * `search` returns a cancel/abort callback which we use as the teardown\n         * callback of this effect. It's important.\n         */\n        return search(searchValueRef.current);\n    }, [search]);\n    useEffect(() => {\n        /**\n         * This effect aborts the ongoing search on unmount. We aim mainly at the searches\n         * initiated by the `SearchBar`. Searches initiated by the \"auto-search\" `useEffect`\n         * above get aborted automatically by the hook.\n         */\n        const { current: abortController } = abortControllerRef;\n        return () => {\n            abortController?.abort();\n        };\n    }, []);\n    useEffect(() => {\n        let mounted = true;\n        const startAt = page * PageSize;\n        const streamIds = foundStreams\n            .slice(startAt, startAt + PageSize)\n            .map(({ id }) => id);\n        setTimeout(async () => {\n            try {\n                const { streams: stats } = await getStreamsFromIndexer(chainId, {\n                    pageSize: Math.min(1000, streamIds.length),\n                    streamIds,\n                });\n                if (!mounted || !stats.length) {\n                    return;\n                }\n                setStreamStats((prev) => ({\n                    ...prev,\n                    ...Object.fromEntries(stats.map((is) => [is.id, is])),\n                }));\n            }\n            catch (e) {\n                console.warn('Fetching stream stats failed', e);\n            }\n        });\n        return () => {\n            mounted = false;\n        };\n    }, [page, foundStreams, chainId]);\n    return (React.createElement(React.Fragment, null,\n        React.createElement(SearchBar, { disabled: busy, placeholder: \"Search stream\", value: searchValue, onChange: (value) => {\n                setSearchValue(value);\n                searchValueRef.current = value;\n                /**\n                 * Each new value triggers a search. Previous searches are\n                 * cancelled via the `abortControllerRef`.\n                 */\n                search(value);\n            } }),\n        React.createElement(StreamSelectTable, { disabled: busy, streams: streams, streamStats: streamStats, loadMore: () => {\n                setPage((p) => p + 1);\n            }, hasMoreResults: hasMore, onSelectionChange: (streamIds) => {\n                update((project) => {\n                    project.streams = streamIds.sort();\n                });\n            }, selected: projectStreams })));\n}\n","import React, { useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport Layout, { LayoutColumn, LayoutInner as PrestyledLayoutInner, } from '~/components/Layout';\nimport { SegmentGrid } from '~/components/NetworkPageSegment';\nimport BeneficiaryAddressEditor from '~/components/SalePointSelector/BeneficiaryAddressEditor';\nimport SalePointOption, { DataUnionOption, } from '~/components/SalePointSelector/SalePointOption';\nimport SalePointTokenSelector from '~/components/SalePointSelector/SalePointTokenSelector';\nimport { getProjectTypeTitle } from '~/getters';\nimport ProjectLinkTabs from '~/pages/ProjectPage/ProjectLinkTabs';\nimport TermsOfUse from '~/pages/ProjectPage/TermsOfUse';\nimport { deleteProject } from '~/services/projects';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport useIsMounted from '~/shared/hooks/useIsMounted';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft } from '~/stores/projectDraft';\nimport { SalePointsPayload } from '~/types/projects';\nimport { getChainDisplayName, getChainKey, getMarketplaceChainConfigs, useCurrentChainId, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { toastedOperation } from '~/utils/toastedOperation';\nimport DataUnionFee from './DataUnionFee';\nimport DataUnionPayment from './DataUnionPayment';\nimport EditorHero from './EditorHero';\nimport EditorNav from './EditorNav';\nimport EditorStreams from './EditorStreams';\nconst EmptySalePoints = {};\nconst EmptyErrors = {};\nexport default function ProjectEditorPage() {\n    const { id: projectId, type = ProjectType.OpenData, creator = '', salePoints: existingSalePoints = EmptySalePoints, } = ProjectDraft.useEntity({ hot: true }) || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const { fetching = false, errors = EmptyErrors } = ProjectDraft.useDraft() || {};\n    const update = ProjectDraft.useUpdateEntity();\n    const chainId = useCurrentChainId();\n    const availableChainConfigs = useMemo(() => getMarketplaceChainConfigs(chainId), [chainId]);\n    const salePoints = availableChainConfigs\n        .map(({ id }) => existingSalePoints[getChainKey(id)])\n        .filter(Boolean);\n    function onSalePointChange(value) {\n        if (busy) {\n            return;\n        }\n        update((draft) => {\n            const chainKey = getChainKey(value.chainId);\n            if (draft.salePoints[chainKey]?.readOnly) {\n                /**\n                 * Read-only sale point must not be updated.\n                 */\n                return;\n            }\n            draft.salePoints[chainKey] = value;\n            if (draft.type !== ProjectType.DataUnion) {\n                return;\n            }\n            if (value.enabled) {\n                /**\n                 * Disable all other sale points making the current one the sole\n                 * selection. We're mimicing radio's behaviour here.\n                 */\n                Object.values(draft.salePoints).forEach((salePoint) => {\n                    if (!salePoint?.enabled || salePoint.chainId === value.chainId) {\n                        return;\n                    }\n                    salePoint.enabled = false;\n                });\n            }\n        });\n    }\n    const setErrors = ProjectDraft.useSetDraftErrors();\n    const isMounted = useIsMounted();\n    const navigate = useNavigate();\n    return (React.createElement(Layout, { innerComponent: LayoutInner, nav: React.createElement(EditorNav, null), pageTitle: projectId ? 'Edit project' : 'Create a new project' },\n        React.createElement(DetailsPageHeader, { pageTitle: !!creator && (React.createElement(React.Fragment, null,\n                getProjectTypeTitle(type),\n                \" by\",\n                React.createElement(\"strong\", null,\n                    \"\\u00A0\",\n                    creator))), rightComponent: React.createElement(ProjectLinkTabs, null) }),\n        React.createElement(LoadingIndicator, { loading: busy }),\n        React.createElement(LayoutColumn, null, !fetching && (React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(EditorHero, null)),\n            type === ProjectType.PaidData && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Select chains\"),\n                        React.createElement(\"p\", null, \"Access to the project data can be purchased on the selected chains. You can set the payment token, price, and beneficiary address on each chain separately.\")),\n                    React.createElement(Content, { \"$desktopMaxWidth\": 728 }, salePoints.map((salePoint) => {\n                        const chainKey = getChainKey(salePoint.chainId);\n                        const chainName = getChainDisplayName(salePoint.chainId);\n                        const beneficiaryErrorKey = `salePoints.${chainKey}.beneficiaryAddress`;\n                        const beneficiaryInvalid = !!errors[beneficiaryErrorKey];\n                        return (React.createElement(SalePointOption, { key: salePoint.chainId, multiSelect: true, onSalePointChange: onSalePointChange, salePoint: salePoint },\n                            React.createElement(\"h4\", null,\n                                \"Set the payment token and price on the \",\n                                chainName,\n                                \" chain\"),\n                            React.createElement(\"p\", null, \"You can set a price for others to access the streams in your project. The price can be set in DATA or any other ERC-20 token.\"),\n                            React.createElement(SalePointTokenSelector, { disabled: salePoint.readOnly, onSalePointChange: onSalePointChange, salePoint: salePoint }),\n                            React.createElement(\"h4\", null, \"Set beneficiary\"),\n                            React.createElement(\"p\", null,\n                                \"This wallet address receives the payments for this product on\",\n                                ' ',\n                                chainName,\n                                \" chain.\"),\n                            React.createElement(BeneficiaryAddressEditor, { invalid: beneficiaryInvalid, disabled: busy || salePoint.readOnly, value: salePoint.beneficiaryAddress, onChange: (beneficiaryAddress) => {\n                                    const newSalePoint = {\n                                        ...salePoint,\n                                        beneficiaryAddress,\n                                    };\n                                    onSalePointChange?.(newSalePoint);\n                                    /**\n                                     * If the field is valid we skip on-the-fly validation assuming\n                                     * correct user input at first.\n                                     */\n                                    if (!beneficiaryInvalid) {\n                                        return;\n                                    }\n                                    try {\n                                        try {\n                                            SalePointsPayload.parse({\n                                                [chainName]: newSalePoint,\n                                            });\n                                        }\n                                        catch (e) {\n                                            if (!(e instanceof\n                                                z.ZodError)) {\n                                                throw e;\n                                            }\n                                            const issues = e.issues.filter(({ path }) => path.slice(-1)[0] ===\n                                                'beneficiaryAddress');\n                                            if (issues.length) {\n                                                throw new z.ZodError(issues);\n                                            }\n                                        }\n                                        setErrors((errors0) => {\n                                            delete errors0[beneficiaryErrorKey];\n                                        });\n                                    }\n                                    catch (e) {\n                                        if (e instanceof\n                                            z.ZodError) {\n                                            return;\n                                        }\n                                        console.warn('Failed to validate beneficiary address', e);\n                                    }\n                                } })));\n                    }))))),\n            type === ProjectType.DataUnion && (React.createElement(DataUnionPayment, null, (salePoint) => (React.createElement(React.Fragment, null,\n                !projectId && (React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, \"Select chain\"),\n                            React.createElement(\"p\", null, \"Select the chain for your Data Union.\")),\n                        React.createElement(Content, { \"$desktopMaxWidth\": 728 }, salePoints.map((salePoint) => (React.createElement(SalePointOption, { key: salePoint.chainId, onSalePointChange: onSalePointChange, salePoint: salePoint },\n                            React.createElement(DataUnionOption, { salePoint: salePoint, onSalePointChange: onSalePointChange })))))))),\n                React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, salePoint ? (React.createElement(React.Fragment, null,\n                                \"Set the payment token and price on\\u00A0the\\u00A0\",\n                                getChainDisplayName(salePoint.chainId),\n                                ' ',\n                                \"chain\")) : (React.createElement(React.Fragment, null, \"Set the payment token and price\"))),\n                            React.createElement(\"p\", null, \"You can set a price for others to access the streams in your project. The price can be set in DATA or any other ERC-20 token.\")),\n                        salePoint ? (React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                            React.createElement(SalePointTokenSelector, { disabled: salePoint.readOnly, salePoint: salePoint, onSalePointChange: onSalePointChange }))) : (React.createElement(React.Fragment, null, \"Select a chain first!\")))),\n                !projectId && salePoint?.beneficiaryAddress ? (React.createElement(React.Fragment, null)) : (React.createElement(Segment, null,\n                    React.createElement(ColoredBox, { \"$pad\": true },\n                        React.createElement(Content, null,\n                            React.createElement(\"h2\", null, \"Data Union admin fee\")),\n                        React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                            React.createElement(DataUnionFee, null))))))))),\n            React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Add streams\")),\n                    React.createElement(EditorStreams, null))),\n            React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Set terms of use\"),\n                        React.createElement(\"p\", null, \"Indicate the terms of use you prefer, either simply, by checking the appropriate boxes below to\\u00A0show usage types are permitted, or optionally, give more detail by providing a link to your own terms of use document.\")),\n                    React.createElement(Content, { \"$desktopMaxWidth\": 728 },\n                        React.createElement(TermsOfUse, null)))),\n            projectId && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, { \"$borderColor\": \"#cdcdcd\", \"$backgroundColor\": \"transparent\", \"$pad\": true },\n                    React.createElement(Content, null,\n                        React.createElement(\"h2\", null, \"Delete project\"),\n                        React.createElement(\"p\", null, \"Delete this project forever. You can't undo this.\")),\n                    React.createElement(Button, { kind: \"destructive\", onClick: async () => {\n                            try {\n                                await toastedOperation('Delete project', () => deleteProject(chainId, projectId));\n                                if (!isMounted()) {\n                                    return;\n                                }\n                                navigate(R.projects(routeOptions(chainId)));\n                            }\n                            catch (e) {\n                                console.warn('Failed to delete a project', e);\n                            }\n                        } }, \"Delete\")))))))));\n}\nconst Segment = styled.div.withConfig({ displayName: \"Segment\", componentId: \"sc-13rxivr\" }) `\n    h2 {\n        font-size: 34px;\n        font-weight: 400;\n        line-height: 1.5em;\n        margin: 0 0 28px;\n    }\n\n    h2 + p {\n        font-size: 16px;\n        margin-bottom: 40px;\n    }\n`;\nconst Content = styled.div.withConfig({ displayName: \"Content\", componentId: \"sc-185oicp\" }) `\n    ${({ $desktopMaxWidth = 678 }) => css `\n        @media (min-width: ${$desktopMaxWidth + 64}px) {\n            max-width: ${$desktopMaxWidth}px;\n        }\n    `}\n`;\nconst LayoutInner = styled(PrestyledLayoutInner).withConfig({ displayName: \"LayoutInner\", componentId: \"sc-1vp5ld7\" }) `\n    width: 100%;\n    overflow: hidden;\n`;\n","import React, { useEffect, useMemo } from 'react';\nimport { Link, Navigate, Outlet, useParams, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { Pad, SegmentGrid } from '~/components/NetworkPageSegment';\nimport { QueriedStreamsTable } from '~/components/QueriedStreamsTable';\nimport { TermsOfUse } from '~/components/TermsOfUse';\nimport { useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { useProjectByIdQuery } from '~/hooks/projects';\nimport { useStreamsQuery } from '~/hooks/streams';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport ProjectHero from '~/marketplace/containers/ProjectPage/Hero/ProjectHero2';\nimport NotFoundPage from '~/pages/NotFoundPage';\nimport { getEmptyParsedProject } from '~/parsers/ProjectParser';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport Segment from '~/shared/components/Segment';\nimport { StreamConnect } from '~/shared/components/StreamConnect';\nimport { StreamPreview } from '~/shared/components/StreamPreview';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { ProjectPermission, useCurrentProjectAbility, } from '~/shared/stores/projectAbilities';\nimport { ProjectType } from '~/shared/types';\nimport { ProjectDraft, preselectSalePoint, useIsAccessibleByCurrentWallet, } from '~/stores/projectDraft';\nimport { isProjectType } from '~/utils';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { AccessManifest } from './AccessManifest';\nimport GetAccess from './GetAccess';\nimport ProjectEditorPage from './ProjectEditorPage';\nimport ProjectLinkTabs from './ProjectLinkTabs';\nexport function ProjectDraftPage() {\n    const { id: projectId } = useParams();\n    const draftId = ProjectDraft.useInitDraft(projectId);\n    return (React.createElement(ProjectDraft.DraftContext.Provider, { value: draftId },\n        React.createElement(Outlet, null)));\n}\nexport function NewProjectPage() {\n    const type = useSearchParams()[0].get('type');\n    const projectType = isProjectType(type) ? type : ProjectType.OpenData;\n    const project = useMemo(() => {\n        const project = getEmptyParsedProject({\n            type: projectType,\n        });\n        preselectSalePoint(project);\n        return project;\n    }, [projectType]);\n    const draftId = ProjectDraft.useDraftId();\n    const { assign } = ProjectDraft.useDraftStore();\n    const initialized = ProjectDraft.useDraft()?.initialized || false;\n    useEffect(function assignProjectToDraft() {\n        if (initialized) {\n            assign(draftId, project);\n        }\n    }, [assign, draftId, initialized, project]);\n    return React.createElement(ProjectEditorPage, null);\n}\nexport function ExistingProjectPageWrap() {\n    const { id: projectId } = useParams();\n    const projectQuery = useProjectByIdQuery(projectId);\n    const initialBehindBlockError = useInitialBehindIndexError(projectQuery, [projectId]);\n    useRefetchQueryBehindIndexEffect(projectQuery);\n    const behindBlockError = useLatestBehindBlockError(projectQuery);\n    const { data: project = null } = projectQuery;\n    const isFetching = projectQuery.isLoading || projectQuery.isFetching || !!behindBlockError;\n    const draftId = ProjectDraft.useDraftId();\n    const { assign } = ProjectDraft.useDraftStore();\n    const initialized = ProjectDraft.useDraft()?.initialized || false;\n    useEffect(function assignProjectToDraft() {\n        if (initialized) {\n            assign(draftId, project);\n        }\n    }, [assign, draftId, initialized, project]);\n    const placeholder = behindBlockError ? (React.createElement(Layout, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })))) : isFetching ? (React.createElement(Layout, null,\n        React.createElement(LoadingIndicator, { loading: true }))) : (React.createElement(NotFoundPage, null));\n    if (!project) {\n        return placeholder;\n    }\n    return React.createElement(Outlet, null);\n}\nexport function ProjectOverviewPage() {\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, description, termsOfUse, imageUrl, streams, type, contact, salePoints, } = project;\n    if (!id) {\n        return null;\n    }\n    const [firstSalePoint = undefined, ...otherSalePoints] = Object.values(salePoints).filter((salePoint) => salePoint?.enabled);\n    return (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(ProjectHero, { contact: contact, description: description, imageUrl: imageUrl || undefined, name: name })),\n            firstSalePoint && (React.createElement(Segment, null,\n                React.createElement(ColoredBox, null,\n                    React.createElement(Pad, null,\n                        React.createElement(AccessManifest, { projectId: id, projectType: type, firstSalePoint: firstSalePoint, otherSalePoints: otherSalePoints }))))),\n            React.createElement(NetworkPageSegment, { title: \"Streams\" },\n                React.createElement(StreamTable, { streamIds: streams })),\n            React.createElement(NetworkPageSegment, { title: \"Terms and conditions\" },\n                React.createElement(Pad, null,\n                    React.createElement(TermsOfUse, { ...termsOfUse }))))));\n}\nexport function ProjectConnectPage() {\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, type, streams, salePoints } = project;\n    if (!id) {\n        return null;\n    }\n    return (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null, hasAccess ? (React.createElement(ColoredBox, null,\n                React.createElement(Pad, null,\n                    React.createElement(StreamConnect, { streams: streams })))) : (React.createElement(GetAccess, { projectId: id, projectName: name, projectType: type, salePoints: Object.values(salePoints).filter((salePoint) => salePoint?.enabled) }))))));\n}\nexport function ProjectLiveDataPage() {\n    const hasAccess = useIsAccessibleByCurrentWallet();\n    const project = ProjectDraft.useEntity();\n    if (!project) {\n        return null;\n    }\n    const { id, name, type, streams, salePoints } = project;\n    if (!id) {\n        return null;\n    }\n    return hasAccess ? (React.createElement(StreamPreview, { streamsList: streams })) : (React.createElement(LayoutColumn, null,\n        React.createElement(SegmentGrid, null,\n            React.createElement(Segment, null,\n                React.createElement(GetAccess, { projectId: id, projectName: name, projectType: type, salePoints: Object.values(salePoints).filter((salePoint) => salePoint?.enabled) })))));\n}\nexport function ProjectTabbedPage() {\n    const { id = '', name = '', creator = '' } = ProjectDraft.useEntity() || {};\n    const busy = ProjectDraft.useIsDraftBusy();\n    const canEdit = useCurrentProjectAbility(ProjectPermission.Edit);\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(Layout, { pageTitle: name },\n        React.createElement(DetailsPageHeader, { backButtonLink: R.projects(routeOptions(chainKey)), pageTitle: React.createElement(PageTitleContainer, null,\n                React.createElement(ProjectTitle, null,\n                    name,\n                    !!creator && (React.createElement(React.Fragment, null,\n                        React.createElement(Separator, null, \" by \"),\n                        React.createElement(\"strong\", null, creator)))),\n                canEdit && (React.createElement(EditButton, { as: Link, to: R.projectEdit(id, routeOptions(chainKey)), kind: \"secondary\", size: \"mini\" },\n                    React.createElement(SvgIcon, { name: \"pencilFull\" })))), rightComponent: React.createElement(ProjectLinkTabs, { projectId: id }) }),\n        React.createElement(LoadingIndicator, { loading: busy }),\n        React.createElement(Outlet, null)));\n}\n/**\n * @todo Taken care of in `app`, no? Double-check & remove.\n */\nexport function ProjectIndexRedirect() {\n    const { id = '' } = useParams();\n    return (React.createElement(Navigate, { to: {\n            pathname: R.project(id),\n            search: window.location.search,\n        }, replace: true }));\n}\nfunction StreamTable({ streamIds }) {\n    const { orderBy = 'mps', orderDirection = 'desc', setOrder, } = useTableOrder();\n    const streamsQuery = useStreamsQuery({\n        orderBy,\n        orderDirection,\n        streamIds,\n    });\n    return (React.createElement(QueriedStreamsTable, { onOrderChange: setOrder, orderBy: orderBy, orderDirection: orderDirection, query: streamsQuery }));\n}\nconst PageTitleContainer = styled.div.withConfig({ displayName: \"PageTitleContainer\", componentId: \"sc-1j4hr77\" }) `\n    align-items: center;\n    display: flex;\n`;\nconst EditButton = styled(Button).withConfig({ displayName: \"EditButton\", componentId: \"sc-1qgaeso\" }) `\n    border-radius: 100%;\n    height: 32px;\n    margin-left: 10px;\n    width: 32px;\n`;\nconst ProjectTitle = styled.span.withConfig({ displayName: \"ProjectTitle\", componentId: \"sc-12msef4\" }) `\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n`;\nconst Separator = styled.span.withConfig({ displayName: \"Separator\", componentId: \"sc-1rrqbi7\" }) `\n    white-space: pre-wrap;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport { getParsedProjectById } from '~/getters/hub';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useRequestedBlockNumber } from '.';\nexport function useProjectByIdQuery(projectId) {\n    const chainId = useCurrentChainId();\n    const minBlockNumber = useRequestedBlockNumber();\n    return useQuery({\n        queryKey: [\n            'useProjectByIdQuery',\n            chainId,\n            projectId?.toLowerCase(),\n            minBlockNumber,\n        ],\n        queryFn: async () => {\n            if (!projectId) {\n                return null;\n            }\n            const result = await getParsedProjectById(chainId, projectId, {\n                force: true,\n                minBlockNumber,\n            });\n            if (!result) {\n                throw new Error('Project could not be found or is invalid');\n            }\n            return result;\n        },\n        staleTime: Infinity,\n        gcTime: 0,\n        retry: false,\n    });\n}\n","import styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport const Address = styled.div.withConfig({ displayName: \"Address\", componentId: \"sc-525xn6\" }) `\n    align-items: center;\n    color: ${COLORS.primaryLight};\n    display: grid;\n    font-size: 14px;\n    gap: 4px;\n    grid-template-columns: 1fr;\n    line-height: 20px;\n\n    p + & {\n        margin-top: 8px;\n    }\n\n    strong {\n        color: ${COLORS.primary};\n    }\n\n    svg {\n        display: block;\n    }\n\n    @media (min-width: 400px) {\n        grid-template-columns: max-content max-content;\n    }\n`;\nexport const AddressLabel = styled.div.withConfig({ displayName: \"AddressLabel\", componentId: \"sc-vfe0wz\" }) ``;\nexport const AddressContent = styled.div.withConfig({ displayName: \"AddressContent\", componentId: \"sc-1eirsmw\" }) `\n    align-items: center;\n    display: grid;\n    gap: 4px;\n    grid-template-columns: max-content max-content;\n`;\nexport const Banner = styled.div.withConfig({ displayName: \"Banner\", componentId: \"sc-1r3oqd7\" }) `\n    background: ${COLORS.secondaryLight};\n    border-radius: 6px;\n    padding: 12px;\n    display: grid;\n    gap: 10px;\n    grid-template-columns: 24px 1fr;\n\n    * + & {\n        margin-top: 20px;\n    }\n\n    span[role='img'] {\n        color: ${COLORS.primaryDisabled};\n    }\n\n    svg,\n    span[role='img'] {\n        display: block;\n        width: 20px;\n        height: 20px;\n    }\n`;\nexport const IconWrap = styled.div.withConfig({ displayName: \"IconWrap\", componentId: \"sc-1yovopn\" }) `\n    align-items: center;\n    display: flex;\n    height: 24px;\n    justify-content: center;\n    width: 24px;\n`;\n","import InfoIcon from '@atlaskit/icon/glyph/info';\nimport React from 'react';\nimport { Link as PrestyledLink } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Address, AddressContent, AddressLabel, Banner, IconWrap, } from '~/components/ActionBars/AboutEntity';\nimport { DefaultSimpleDropdownMenu } from '~/components/SimpleDropdown';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { ExternalLinkIcon } from '~/icons';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nexport function AboutSponsorship({ sponsorship }) {\n    const { streamId } = sponsorship;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(DefaultSimpleDropdownMenu, null,\n        streamId && (React.createElement(Address, null,\n            React.createElement(AddressLabel, null, \"Sponsored stream:\"),\n            React.createElement(AddressContent, null,\n                React.createElement(\"strong\", null, truncateStreamName(streamId)),\n                React.createElement(\"div\", null,\n                    React.createElement(Link, { to: R.stream(streamId, routeOptions(chainKey)), target: \"_blank\" },\n                        React.createElement(ExternalLinkIcon, null)))))),\n        React.createElement(Banner, null,\n            React.createElement(IconWrap, null,\n                React.createElement(InfoIcon, { label: \"Info\" })),\n            React.createElement(\"div\", null,\n                React.createElement(\"p\", null,\n                    \"Sponsorships payout \",\n                    React.createElement(SponsorshipPaymentTokenName, null),\n                    \" tokens to staked Operators that relay data in the sponsored stream. Anyone can fund or extend a Sponsorship.\"),\n                React.createElement(\"p\", null,\n                    React.createElement(\"a\", { href: R.docs('/streamr-network/network-incentives'), target: \"_blank\", rel: \"noreferrer noopener\" }, \"Learn more\"))))));\n}\nconst Link = styled(PrestyledLink).withConfig({ displayName: \"Link\", componentId: \"sc-ri9tjx\" }) `\n    display: block;\n\n    :active {\n        transform: translateY(1px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { COLORS } from '~/shared/utils/styled';\nimport { ExternalLinkIcon } from '~/icons';\nimport { Tooltip } from '~/components/Tooltip';\nimport { truncate } from '~/shared/utils/text';\nimport { CopyButton } from '~/components/CopyButton';\nimport { getChainConfig, useCurrentChainId } from '~/utils/chains';\nexport const ActionBarButtonBody = styled.div.withConfig({ displayName: \"ActionBarButtonBody\", componentId: \"sc-8l5xq2\" }) `\n    align-items: center;\n    border-radius: 8px;\n    display: grid;\n    font-size: 14px;\n    gap: 12px;\n    grid-template-columns: repeat(\n        ${({ children }) => React.Children.toArray(children).filter(Boolean).length},\n        max-content\n    );\n    height: 40px;\n    padding: 0 12px;\n    transition: 250ms background;\n\n    ${({ $background = COLORS.secondary, $color = COLORS.primary }) => css `\n        background: ${$background};\n        color: ${$color};\n    `}\n`;\nconst ActionBarButtonRoot = styled.button.withConfig({ displayName: \"ActionBarButtonRoot\", componentId: \"sc-e5t7kd\" }) `\n    appearance: none;\n    background: none;\n    border: 0;\n    display: block;\n    padding: 0;\n\n    :hover ${ActionBarButtonBody} {\n        background: ${COLORS.secondaryLight};\n    }\n\n    :active ${ActionBarButtonBody} {\n        background: ${COLORS.secondaryHover};\n        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.03);\n    }\n\n    ${({ $active = false }) => $active &&\n    css `\n            :hover ${ActionBarButtonBody}, ${ActionBarButtonBody} {\n                background: ${COLORS.secondaryHover};\n                box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.01);\n            }\n        `}\n`;\nexport function ActionBarButton({ active = false, children, ...props }) {\n    return (React.createElement(ActionBarButtonRoot, { type: \"button\", ...props, \"$active\": active },\n        React.createElement(ActionBarButtonBody, null, children)));\n}\nexport const ActionBarButtonInnerBody = styled.div.withConfig({ displayName: \"ActionBarButtonInnerBody\", componentId: \"sc-9ckhfi\" }) `\n    ${({ children }) => {\n    const count = React.Children.count(children);\n    return (count > 1 &&\n        css `\n                align-items: center;\n                display: grid;\n                gap: 6px;\n                grid-template-columns: repeat(${count}, max-content);\n            `);\n}}\n`;\nfunction getActionBarButtonCaretAttrs() {\n    return {\n        name: 'caretDown',\n    };\n}\nexport const ActionBarButtonCaret = styled(SvgIcon).attrs(getActionBarButtonCaretAttrs).withConfig({ displayName: \"ActionBarButtonCaret\", componentId: \"sc-4laj10\" }) `\n    color: ${COLORS.primaryDisabled};\n    width: 12px;\n    transition: 150ms transform;\n\n    ${({ $invert = false }) => $invert &&\n    css `\n            transform: rotate(180deg);\n        `}\n`;\nexport function ActionBarWalletDisplay({ address, label = 'Wallet', }) {\n    const chainId = useCurrentChainId();\n    const { blockExplorerUrl } = getChainConfig(chainId);\n    return (React.createElement(ActionBarButtonBody, null,\n        React.createElement(\"div\", null,\n            label,\n            \": \",\n            React.createElement(\"strong\", null, truncate(address))),\n        React.createElement(Tooltip, { content: \"Copy address\" },\n            React.createElement(CopyButton, { value: address })),\n        blockExplorerUrl && (React.createElement(Tooltip, { content: \"View on explorer\" },\n            React.createElement(\"a\", { href: `${blockExplorerUrl}/address/${address}`, target: \"_blank\", rel: \"noreferrer\" },\n                React.createElement(ExternalLinkIcon, null))))));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { NetworkActionBarBackButtonIcon, NetworkActionBarBackLink, NetworkActionBarStatsTitle, NetworkActionBarTitle, } from '~/components/ActionBars/NetworkActionBar.styles';\nimport { Separator } from '~/components/Separator';\nimport { COLORS, LAPTOP, MAX_BODY_WIDTH, TABLET } from '~/shared/utils/styled';\nimport { goBack } from '~/utils';\nexport function AbstractActionBar({ fallbackBackButtonUrl, title, buttons = React.createElement(React.Fragment, null), ctas = React.createElement(React.Fragment, null), summaryTitle, summary, }) {\n    return (React.createElement(Root, null,\n        React.createElement(OuterWrap, null,\n            React.createElement(InnerWrap, null,\n                React.createElement(NetworkActionBarBackLink, { to: fallbackBackButtonUrl, onClick: (e) => {\n                        goBack({\n                            onBeforeNavigate() {\n                                e.preventDefault();\n                            },\n                        });\n                    } },\n                    React.createElement(NetworkActionBarBackButtonIcon, { name: \"backArrow\" })),\n                React.createElement(NetworkActionBarTitle, null, title)),\n            React.createElement(ActionsOuterWrap, null,\n                React.createElement(Buttons, null, buttons),\n                React.createElement(Ctas, null, ctas)),\n            summary && (React.createElement(React.Fragment, null,\n                summaryTitle && (React.createElement(NetworkActionBarStatsTitle, null, summaryTitle)),\n                React.createElement(Separator, null),\n                summary)))));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1dydze1\" }) `\n    background: #fff;\n    color: ${COLORS.primary};\n    padding-top: 34px;\n\n    @media ${TABLET} {\n        padding-top: 60px;\n    }\n\n    @media ${LAPTOP} {\n        padding-top: 108px;\n    }\n`;\nconst OuterWrap = styled.div.withConfig({ displayName: \"OuterWrap\", componentId: \"sc-ucv31y\" }) `\n    margin: 0 auto;\n    max-width: ${MAX_BODY_WIDTH}px;\n    padding: 0 24px 28px;\n    width: 100%;\n\n    @media (min-width: ${MAX_BODY_WIDTH + 48}px) {\n        padding: 0;\n    }\n`;\nconst InnerWrap = styled.div.withConfig({ displayName: \"InnerWrap\", componentId: \"sc-1cawsc3\" }) `\n    align-items: center;\n    display: flex;\n`;\nconst ActionsOuterWrap = styled(InnerWrap).withConfig({ displayName: \"ActionsOuterWrap\", componentId: \"sc-5zelr\" }) `\n    gap: 40px;\n    flex-wrap: wrap;\n    margin-top: 10px;\n\n    @media ${LAPTOP} {\n        padding-left: 40px;\n    }\n`;\nconst Buttons = styled(InnerWrap).withConfig({ displayName: \"Buttons\", componentId: \"sc-19if7x7\" }) `\n    flex-grow: 1;\n    flex-wrap: wrap;\n    gap: 8px;\n`;\nconst Ctas = styled.div.withConfig({ displayName: \"Ctas\", componentId: \"sc-lz5lvo\" }) `\n    display: grid;\n    grid-template-columns: 1fr 1fr;\n    gap: 8px;\n    width: 100%;\n    max-width: 480px;\n\n    button {\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        max-width: none;\n        width: auto;\n    }\n`;\n","import moment from 'moment';\nimport React, { useMemo } from 'react';\nimport { AboutSponsorship } from '~/components/ActionBars/AboutSponsorship';\nimport { ActionBarButton, ActionBarButtonBody, ActionBarButtonCaret, ActionBarButtonInnerBody, ActionBarWalletDisplay, } from '~/components/ActionBars/ActionBarButton';\nimport { Button } from '~/components/Button';\nimport { SimpleDropdown } from '~/components/SimpleDropdown';\nimport { Tooltip } from '~/components/Tooltip';\nimport { useOperatorForWalletQuery } from '~/hooks/operators';\nimport { useEditSponsorshipFunding, useFundSponsorshipCallback, useIsEditingSponsorshipFunding, useIsFundingSponsorship, useIsJoiningSponsorshipAsOperator, useJoinSponsorshipAsOperator, } from '~/hooks/sponsorships';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate, truncateStreamName } from '~/shared/utils/text';\nimport { useCurrentChainId, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { isSponsorshipFundedByOperator } from '~/utils/sponsorships';\nimport { AbstractActionBar } from './AbstractActionBar';\nexport function SponsorshipActionBar({ sponsorship }) {\n    const wallet = useWalletAccount();\n    const { data: operator = null } = useOperatorForWalletQuery(wallet);\n    const canEditStake = isSponsorshipFundedByOperator(sponsorship, operator);\n    const { projectedInsolvencyAt, isRunning } = sponsorship;\n    const isPaying = isRunning && sponsorship.timeCorrectedRemainingBalanceWeiAt(Date.now()) > 0n;\n    const [fundedUntil, detailedFundedUntil] = useMemo(() => projectedInsolvencyAt == null\n        ? [null, null]\n        : [\n            moment(projectedInsolvencyAt).format('D MMM YYYY'),\n            moment(projectedInsolvencyAt).format('D MMM YYYY, HH:mm'),\n        ], [projectedInsolvencyAt]);\n    const fundSponsorship = useFundSponsorshipCallback();\n    const isFundingSponsorship = useIsFundingSponsorship(sponsorship.id, wallet);\n    const editSponsorshipFunding = useEditSponsorshipFunding();\n    const isEditingSponsorshipFunding = useIsEditingSponsorshipFunding(sponsorship.id, operator?.id);\n    const { streamId } = sponsorship;\n    const chainId = useCurrentChainId();\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(AbstractActionBar, { fallbackBackButtonUrl: R.sponsorships(routeOptions(chainKey)), title: streamId ? (truncateStreamName(streamId, 30)) : (React.createElement(React.Fragment, null,\n            \"Sponsorship \",\n            truncate(sponsorship.id))), buttons: React.createElement(React.Fragment, null,\n            React.createElement(ActionBarButtonBody, { \"$background\": isPaying ? COLORS.activeBackground : COLORS.radioBorder, \"$color\": isPaying ? COLORS.active : COLORS.primary },\n                React.createElement(\"strong\", null, isPaying ? 'Paying' : 'Inactive')),\n            React.createElement(SimpleDropdown, { menu: React.createElement(AboutSponsorship, { sponsorship: sponsorship }) }, (toggle, isOpen) => (React.createElement(ActionBarButton, { active: isOpen, onClick: () => void toggle((c) => !c) },\n                React.createElement(ActionBarButtonInnerBody, null,\n                    React.createElement(SvgIcon, { name: \"page\" }),\n                    React.createElement(\"strong\", null, \"About Sponsorship\")),\n                React.createElement(ActionBarButtonCaret, { \"$invert\": isOpen })))),\n            fundedUntil && (React.createElement(ActionBarButtonBody, null,\n                React.createElement(\"div\", null,\n                    \"Funded until:\",\n                    ' ',\n                    React.createElement(\"strong\", null,\n                        React.createElement(Tooltip, { anchorDisplay: \"inline\", content: detailedFundedUntil || '' }, fundedUntil))))),\n            React.createElement(ActionBarWalletDisplay, { address: sponsorship.id, label: \"Contract\" })), ctas: React.createElement(React.Fragment, null,\n            canEditStake ? (React.createElement(Button, { disabled: !operator, waiting: isEditingSponsorshipFunding, onClick: async () => {\n                    if (!operator) {\n                        return;\n                    }\n                    editSponsorshipFunding({\n                        chainId,\n                        sponsorshipOrSponsorshipId: sponsorship,\n                        operator,\n                    });\n                } }, \"Edit stake\")) : (React.createElement(JoinAsOperatorButton, { sponsorship: sponsorship, operator: operator })),\n            React.createElement(Button\n            // We decided to disable sponsoring for now as users don't know what it does.\n            // https://streamr-team.slack.com/archives/C9QB9RJ48/p1701774490263629\n            , { \n                // We decided to disable sponsoring for now as users don't know what it does.\n                // https://streamr-team.slack.com/archives/C9QB9RJ48/p1701774490263629\n                disabled: !streamId || true, kind: \"secondary\", waiting: isFundingSponsorship, onClick: () => {\n                    fundSponsorship(chainId, sponsorship);\n                } }, \"Sponsor\")) }));\n}\nfunction JoinAsOperatorButton({ sponsorship, operator }) {\n    const walletLocked = !useWalletAccount();\n    const { streamId, operatorCount, maxOperators } = sponsorship;\n    const isJoiningSponsorshipAsOperator = useIsJoiningSponsorshipAsOperator(sponsorship.id, operator?.id);\n    const chainId = useCurrentChainId();\n    const joinSponsorshipAsOperator = useJoinSponsorshipAsOperator();\n    const maxOperatorsReached = operatorCount >= maxOperators;\n    const tip = walletLocked ? ('Unlock your wallet first') : !operator ? ('You need an Operator to join a Sponsorship') : !streamId ? ('Sponsored stream does not exist') : maxOperatorsReached ? (React.createElement(React.Fragment, null, \"This Sponsorship does not allow more\\u00A0Operators\")) : undefined;\n    if (tip) {\n        return (React.createElement(Tooltip, { content: tip },\n            React.createElement(Button, { disabled: true }, \"Join as operator\")));\n    }\n    return (React.createElement(Button, { waiting: isJoiningSponsorshipAsOperator, onClick: () => {\n            if (!operator) {\n                return;\n            }\n            joinSponsorshipAsOperator({\n                chainId,\n                sponsorship,\n                operator,\n            });\n        } }, \"Join as operator\"));\n}\n","import React from 'react';\nimport styled from 'styled-components';\nimport { SponsorshipDecimals } from '~/components/Decimals';\nimport { Hint } from '~/components/Hint';\nimport { LayoutColumn } from '~/components/Layout';\nimport { SponsorshipPaymentTokenName } from '~/components/SponsorshipPaymentTokenName';\nimport { StatCell, StatGrid } from '~/components/StatGrid';\nimport { DayInSeconds } from '~/consts';\nimport { COLORS } from '~/shared/utils/styled';\nexport function SponsorshipSummary({ sponsorship }) {\n    const minimumStakingDays = sponsorship.minimumStakingPeriodSeconds / DayInSeconds;\n    return (React.createElement(SponsorshipSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(StatGrid, { \"$desktopColumnCount\": 3 },\n                React.createElement(StatCell, { label: \"Payout rate\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The rate of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that are distributed to Operators that have staked on this Sponsorship.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.payoutPerDay, unitSuffix: \"/day\" })),\n                React.createElement(StatCell, { label: \"Remaining balance\" },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.timeCorrectedRemainingBalanceWeiAt(Date.now()) })),\n                React.createElement(StatCell, { label: \"Total staked\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The total amount of \",\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            ' ',\n                            \"tokens that has been staked on this Sponsorship by\\u00A0Operators.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.totalStakedWei })),\n                React.createElement(StatCell, { label: \"APY\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The annualized yield that the staked Operators are currently earning from this Sponsorship.\")) },\n                    (sponsorship.spotApy * 100).toFixed(0),\n                    \"%\"),\n                React.createElement(StatCell, { label: \"Total sponsored\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null,\n                            \"The cumulative amount of\",\n                            ' ',\n                            React.createElement(SponsorshipPaymentTokenName, null),\n                            \" tokens that Sponsors have funded this Sponsorship with.\")) },\n                    React.createElement(SponsorshipDecimals, { abbr: true, amount: sponsorship.cumulativeSponsoring })),\n                React.createElement(StatCell, { label: \"Minimum stake duration\", tip: React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"The minimum time that Operators must stay staked in this Sponsorship before they are able to fully unstake without a penalty. Stake reduction is always allowed and only limited by minimum\\u00A0stake.\")) },\n                    minimumStakingDays.toFixed(0),\n                    \" day\",\n                    minimumStakingDays !== 1 && 's')))));\n}\nconst SponsorshipSummaryRoot = styled.div.withConfig({ displayName: \"SponsorshipSummaryRoot\", componentId: \"sc-mfyvrj\" }) `\n    background: ${COLORS.Background};\n    padding: 24px 0;\n`;\n","import React, { useCallback, useMemo, useState } from 'react';\nimport { Link, useParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { SponsorshipActionBar } from '~/components/ActionBars/SponsorshipActionBar';\nimport { BehindBlockErrorDisplay } from '~/components/BehindBlockErrorDisplay';\nimport { ChartPeriodTabs } from '~/components/ChartPeriodTabs';\nimport { Decimals, SponsorshipDecimals } from '~/components/Decimals';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkChartDisplay from '~/components/NetworkChartDisplay';\nimport NetworkPageSegment, { Pad, SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport Spinner from '~/components/Spinner';\nimport { OperatorIdCell } from '~/components/Table';\nimport { useInitialBehindIndexError, useLatestBehindBlockError, useRefetchQueryBehindIndexEffect, } from '~/hooks';\nimport { useSponsorshipByIdQuery, useSponsorshipDailyBucketsQuery, useSponsorshipTokenInfo, } from '~/hooks/sponsorships';\nimport { useSponsorshipFundingHistoryQuery } from '~/hooks/useSponsorshipFundingHistoryQuery';\nimport { SponsorshipSummary } from '~/pages/SponsorshipPage/SponsorshipSummary';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { NoData } from '~/shared/components/NoData';\nimport { ScrollTable } from '~/shared/components/ScrollTable/ScrollTable';\nimport { NoDataWrap } from '~/shared/components/ScrollTable/ScrollTable.styles';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { NetworkChart } from '~/shared/components/TimeSeriesGraph';\nimport { formatLongDate, formatShortDate, } from '~/shared/components/TimeSeriesGraph/chartUtils';\nimport { COLORS, LAPTOP, TABLET } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { ChartPeriod } from '~/types';\nimport { abbr } from '~/utils';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst EmptyArray = [];\nexport const SingleSponsorshipPage = () => {\n    const sponsorshipId = useParams().id || '';\n    const sponsorshipQuery = useSponsorshipByIdQuery(sponsorshipId);\n    const initialBehindBlockError = useInitialBehindIndexError(sponsorshipQuery, [\n        sponsorshipId,\n    ]);\n    useRefetchQueryBehindIndexEffect(sponsorshipQuery);\n    const behindBlockError = useLatestBehindBlockError(sponsorshipQuery);\n    const isFetching = sponsorshipQuery.isFetching || sponsorshipQuery.isLoading || !!behindBlockError;\n    const sponsorship = sponsorshipQuery.data || null;\n    const { symbol: tokenSymbol = 'DATA', decimals = 18n } = useSponsorshipTokenInfo() || {};\n    const [selectedDataSource, setSelectedDataSource] = useState('amountStaked');\n    const [selectedPeriod, setSelectedPeriod] = useState(ChartPeriod.ThreeMonths);\n    const chartQuery = useSponsorshipDailyBucketsQuery({\n        sponsorshipId,\n        period: selectedPeriod,\n        dataSource: selectedDataSource,\n    });\n    const { data: chartData = [] } = chartQuery;\n    const tooltipPrefix = useMemo(() => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return 'Amount Staked';\n            case 'numberOfOperators':\n                return 'Number of Operators';\n            case 'apy':\n                return 'APY';\n            default:\n                return '';\n        }\n    }, [selectedDataSource]);\n    const formatTooltipValue = useCallback((value) => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return `${abbr(value)} ${tokenSymbol}`;\n            case 'numberOfOperators':\n                return value.toString();\n            case 'apy':\n                return `${value.toFixed(2)}%`;\n            default:\n                return '';\n        }\n    }, [selectedDataSource, tokenSymbol]);\n    const formatYAxisValue = useCallback((value) => {\n        switch (selectedDataSource) {\n            case 'amountStaked':\n                return abbr(value);\n            case 'numberOfOperators':\n                return value.toString();\n            case 'apy':\n                return `${value.toFixed(2)}%`;\n            default:\n                return '';\n        }\n    }, [selectedDataSource]);\n    const fundingEventsQuery = useSponsorshipFundingHistoryQuery(sponsorshipId);\n    const { operatorCount = 0, minOperators } = sponsorship || {};\n    const operational = minOperators == null || operatorCount >= minOperators;\n    const fullChainName = useCurrentChainFullName();\n    const placeholder = behindBlockError ? (React.createElement(BehindBlockErrorDisplay, { latest: behindBlockError, initial: initialBehindBlockError || undefined })) : !isFetching ? (React.createElement(NoData, { firstLine: `Sponsorship not found on the ${fullChainName} chain.` })) : null;\n    const chainKey = useCurrentChainKey();\n    const rawFundingEvents = fundingEventsQuery.data?.pages || EmptyArray;\n    const fundingEvents = useMemo(() => rawFundingEvents.map((page) => page.events).flat() || EmptyArray, [rawFundingEvents]);\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Sponsorship\" }),\n        React.createElement(LoadingIndicator, { loading: isFetching }),\n        !!sponsorship && (React.createElement(React.Fragment, null,\n            React.createElement(SponsorshipActionBar, { sponsorship: sponsorship }),\n            React.createElement(SponsorshipSummary, { sponsorship: sponsorship }))),\n        React.createElement(LayoutColumn, null, sponsorship == null ? (placeholder) : (React.createElement(SegmentGrid, null,\n            React.createElement(ChartGrid, null,\n                React.createElement(NetworkPageSegment, { title: \"Overview charts\" },\n                    React.createElement(Pad, null,\n                        React.createElement(NetworkChartDisplay, { periodTabs: React.createElement(ChartPeriodTabs, { value: selectedPeriod, onChange: setSelectedPeriod }), sourceTabs: React.createElement(Tabs, { selection: selectedDataSource, onSelectionChange: (dataSource) => {\n                                    if (dataSource !== 'amountStaked' &&\n                                        dataSource !==\n                                            'numberOfOperators' &&\n                                        dataSource !== 'apy') {\n                                        return;\n                                    }\n                                    setSelectedDataSource(dataSource);\n                                } },\n                                React.createElement(Tab, { id: \"amountStaked\" }, \"Amount Staked\"),\n                                React.createElement(Tab, { id: \"numberOfOperators\" }, \"Number of Operators\"),\n                                React.createElement(Tab, { id: \"apy\" }, \"APY\")) },\n                            React.createElement(NetworkChart, { isLoading: chartQuery.isLoading ||\n                                    chartQuery.isFetching, tooltipValuePrefix: tooltipPrefix, graphData: chartData, xAxisDisplayFormatter: formatShortDate, yAxisAxisDisplayFormatter: formatYAxisValue, tooltipLabelFormatter: formatLongDate, tooltipValueFormatter: formatTooltipValue })))),\n                React.createElement(NetworkPageSegment, { title: React.createElement(TitleBar, { aux: operational ? undefined : (React.createElement(MinOperatorCountNotReached, null,\n                            sponsorship.operatorCount,\n                            \"/\",\n                            sponsorship.minOperators,\n                            React.createElement(OperatorSpinner, { color: \"green\", strokeWidth: 3, size: 20, fixed: true, coverage: Math.max(0.01, sponsorship.operatorCount /\n                                    sponsorship.minOperators) }))), label: operational\n                            ? sponsorship.operatorCount\n                            : undefined }, \"Operators\"), foot: true },\n                    React.createElement(OperatorListWrap, null,\n                        React.createElement(OperatorList, null,\n                            React.createElement(OperatorListHeader, null,\n                                React.createElement(\"div\", null,\n                                    React.createElement(\"strong\", null, \"Operator\")),\n                                React.createElement(\"div\", null,\n                                    React.createElement(\"strong\", null, \"Staked\"))),\n                            sponsorship.stakes.map((stake) => (React.createElement(OperatorListItem, { key: stake.operatorId },\n                                React.createElement(Link, { to: R.operator(stake.operatorId, routeOptions(chainKey)) },\n                                    React.createElement(\"div\", null,\n                                        React.createElement(OperatorIdCell, { truncate: true, operatorId: stake.operatorId, imageUrl: stake.metadata.imageUrl, operatorName: stake.metadata.name })),\n                                    React.createElement(\"strong\", null,\n                                        React.createElement(Decimals, { abbr: true, amount: stake.amountWei, decimals: decimals })))))),\n                            !sponsorship.stakes.length && (React.createElement(\"li\", null,\n                                React.createElement(NoDataWrap, null,\n                                    React.createElement(NoData, { firstLine: \"No operators\", compact: true })))))))),\n            React.createElement(NetworkPageSegment, { foot: true, title: \"Funding history\" },\n                React.createElement(ScrollTable, { hasMoreResults: fundingEventsQuery.hasNextPage, onLoadMore: () => fundingEventsQuery.fetchNextPage(), elements: fundingEvents, isLoading: fundingEventsQuery.isLoading ||\n                        fundingEventsQuery.isFetching, columns: [\n                        {\n                            displayName: 'Date',\n                            valueMapper: (element) => element.date,\n                            align: 'start',\n                            isSticky: true,\n                            key: 'date',\n                        },\n                        {\n                            displayName: 'Amount',\n                            valueMapper: (element) => (React.createElement(SponsorshipDecimals, { abbr: true, amount: element.amount })),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'amount',\n                        },\n                        {\n                            displayName: 'Sponsor',\n                            valueMapper: (element) => truncate(element.sponsor),\n                            align: 'start',\n                            isSticky: false,\n                            key: 'sponsor',\n                        },\n                    ] })))))));\n};\nconst ChartGrid = styled(SegmentGrid).withConfig({ displayName: \"ChartGrid\", componentId: \"sc-18g5mqj\" }) `\n    grid-template-columns: minmax(0, 1fr);\n\n    @media ${LAPTOP} {\n        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);\n    }\n`;\nconst OperatorList = styled.ul.withConfig({ displayName: \"OperatorList\", componentId: \"sc-1rt3be3\" }) `\n    font-size: 14px;\n    list-style: none;\n    line-height: 1.5em;\n    margin: 0;\n    padding: 0;\n\n    li {\n        background: #ffffff;\n    }\n\n    li + li {\n        border-top: 1px solid ${COLORS.Border};\n    }\n`;\nconst OperatorListHeader = styled.li.withConfig({ displayName: \"OperatorListHeader\", componentId: \"sc-13lv7x6\" }) `\n    background: rgba(255, 255, 255, 0.9) !important;\n    backdrop-filter: blur(8px);\n    box-shadow: 0 1px 0 ${COLORS.Border};\n    display: flex;\n    padding: 16px 24px;\n    position: sticky;\n    top: 0;\n    z-index: 1;\n\n    > div:first-child {\n        flex-grow: 1;\n    }\n\n    @media ${TABLET} {\n        padding: 24px 40px;\n    }\n`;\nconst OperatorListItem = styled.li.withConfig({ displayName: \"OperatorListItem\", componentId: \"sc-1r8m12v\" }) `\n    > a {\n        align-items: center;\n        color: inherit !important;\n        display: flex;\n        padding: 16px 24px;\n    }\n\n    > a:hover {\n        background-color: ${COLORS.secondaryLight};\n    }\n\n    > a > div:first-child {\n        flex-grow: 1;\n        margin-right: 12px;\n        min-width: 0;\n    }\n\n    @media ${TABLET} {\n        > a {\n            padding: 24px 40px;\n        }\n    }\n`;\nconst OperatorListWrap = styled.div.withConfig({ displayName: \"OperatorListWrap\", componentId: \"sc-1efyfsa\" }) `\n    max-height: 538px;\n    overflow: auto;\n`;\nconst MinOperatorCountNotReached = styled.div.withConfig({ displayName: \"MinOperatorCountNotReached\", componentId: \"sc-hj6vbc\" }) `\n    align-items: center;\n    display: flex;\n    color: #525252;\n    font-size: 14px;\n    font-style: normal;\n    font-weight: 500;\n    line-height: 30px;\n    letter-spacing: 0.14px;\n    justify-self: right;\n`;\nconst OperatorSpinner = styled(Spinner).withConfig({ displayName: \"OperatorSpinner\", componentId: \"sc-14jinxi\" }) `\n    margin-left: 8px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { COLORS } from '~/shared/utils/styled';\nexport function Toggle({ id, value, onChange, ...rest }) {\n    return (React.createElement(Root, { ...rest },\n        React.createElement(Input, { type: \"checkbox\", id: id, checked: value, onChange: (e) => {\n                onChange(e.target.checked);\n            } }),\n        React.createElement(Label, { htmlFor: id })));\n}\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1yx1atx\" }) `\n    display: flex;\n`;\nconst Label = styled.label.withConfig({ displayName: \"Label\", componentId: \"sc-1coaev5\" }) `\n    display: inline-block;\n    width: 32px;\n    height: 20px;\n    background-color: #78788029;\n    border-radius: 10px;\n    position: relative;\n    cursor: pointer;\n\n    &::before {\n        content: '';\n        position: absolute;\n        top: 2px;\n        left: 2px;\n        width: 16px;\n        height: 16px;\n        background-color: white;\n        border-radius: 50%;\n        transition: transform 0.3s;\n    }\n`;\nconst Input = styled.input.withConfig({ displayName: \"Input\", componentId: \"sc-1vc78pc\" }) `\n    display: none;\n\n    &:checked + ${Label} {\n        background-color: ${COLORS.link};\n    }\n\n    &:checked + ${Label}::before {\n        transform: translateX(12px);\n    }\n`;\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { SimpleDropdown, SimpleListDropdownMenu } from '~/components/SimpleDropdown';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { Toggle } from '~/shared/components/Toggle';\nimport { COLORS } from '~/shared/utils/styled';\nexport const defaultFilters = {\n    inactive: true,\n    noFunding: true,\n    expired: true,\n    my: false,\n};\nexport const SponsorshipFilterButton = ({ filter = defaultFilters, onFilterChange, }) => {\n    return (React.createElement(SimpleDropdown, { menu: React.createElement(Menu, { value: filter, onChange: onFilterChange }), align: \"right\" }, (toggle, isOpen) => (React.createElement(Button, { type: \"button\", onClick: () => void toggle((c) => !c), \"$active\": isOpen },\n        React.createElement(SvgIcon, { name: \"faders\" }),\n        \"Display\"))));\n};\nconst ToggleOption = ({ id, label, value, onChange }) => {\n    return (React.createElement(Option, null,\n        React.createElement(ToggleLabel, { htmlFor: id }, label),\n        React.createElement(Toggle, { id: id, value: value, onChange: onChange })));\n};\nconst Menu = ({ value, onChange }) => {\n    return (React.createElement(DropdownMenu, null,\n        React.createElement(Title, null, \"Showing\"),\n        React.createElement(ToggleContainer, null,\n            React.createElement(ToggleOption, { id: 'inactive', label: \"Inactive sponsorships\", value: value.inactive, onChange: (val) => {\n                    onChange?.({ ...value, inactive: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'noFunding', label: \"Without funding sponsorships\", value: value.noFunding, onChange: (val) => {\n                    onChange?.({ ...value, noFunding: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'expired', label: \"Expired funding sponsorships\", value: value.expired, onChange: (val) => {\n                    onChange?.({ ...value, expired: val });\n                } }),\n            React.createElement(ToggleOption, { id: 'my', label: \"Sponsorships with my Operator\", value: value.my, onChange: (val) => {\n                    onChange?.({ ...value, my: val });\n                } }))));\n};\nconst DropdownMenu = styled(SimpleListDropdownMenu).withConfig({ displayName: \"DropdownMenu\", componentId: \"sc-ry9m2u\" }) `\n    padding: 16px;\n    color: ${COLORS.primary};\n`;\nconst Button = styled.button.withConfig({ displayName: \"Button\", componentId: \"sc-5ms2sw\" }) `\n    display: flex;\n    flex-direction: row;\n    align-items: center;\n    padding: 4px 8px;\n    gap: 6px;\n    color: ${COLORS.primaryLight};\n    background-color: ${COLORS.secondaryLight};\n    border-radius: 8px;\n    border: none;\n    cursor: pointer;\n\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 18.2px;\n\n    ${({ $active = false }) => $active &&\n    css `\n            color: ${COLORS.primaryContrast};\n            background-color: ${COLORS.primary};\n        `}\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-94zcw0\" }) `\n    font-size: 16px;\n    font-weight: 500;\n    line-height: 20px;\n    margin-bottom: 16px;\n`;\nconst ToggleContainer = styled.div.withConfig({ displayName: \"ToggleContainer\", componentId: \"sc-6da4qk\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto;\n    min-width: 377px;\n    gap: 16px;\n`;\nconst Option = styled.div.withConfig({ displayName: \"Option\", componentId: \"sc-13iygz\" }) `\n    display: grid;\n    grid-template-columns: subgrid;\n    grid-column: span 2;\n`;\nconst ToggleLabel = styled.label.withConfig({ displayName: \"ToggleLabel\", componentId: \"sc-161gwty\" }) `\n    font-size: 14px;\n    font-weight: 500;\n    line-height: 20px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { NetworkActionBar } from '~/components/ActionBars/NetworkActionBar';\nimport { Button } from '~/components/Button';\nimport { NetworkHelmet } from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { SegmentGrid } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { SponsorshipFilterButton, defaultFilters, } from '~/components/SponsorshipFilterButton';\nimport { useAllSponsorshipsQuery, useCreateSponsorship, useIsCreatingSponsorshipForWallet, useSponsorshipsForCreatorQuery, } from '~/hooks/sponsorships';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useIsWalletLoading, useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainFullName, useCurrentChainId, useCurrentChainKey, } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nvar TabOption;\n(function (TabOption) {\n    TabOption[\"AllSponsorships\"] = \"all\";\n    TabOption[\"MySponsorships\"] = \"my\";\n})(TabOption || (TabOption = {}));\nconst PAGE_SIZE = 20;\nconst DEFAULT_ORDER_BY = 'remainingWei';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = TabOption.AllSponsorships;\nfunction isTabOption(value) {\n    return value === TabOption.AllSponsorships || value === TabOption.MySponsorships;\n}\nexport const SponsorshipsPage = () => {\n    const [params] = useSearchParams();\n    const initialFilters = {\n        ...defaultFilters,\n        ...Object.keys(defaultFilters).reduce((acc, key) => {\n            if (params.has(key)) {\n                return { ...acc, [key]: params.get(key) === 'true' };\n            }\n            return acc;\n        }, {}),\n    };\n    const [filters, setFilters] = useState(initialFilters);\n    const wallet = useWalletAccount();\n    const isWalletLoading = useIsWalletLoading();\n    const { orderBy, orderDirection, setOrder } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    const tab = params.get('tab');\n    const selectedTab = isTabOption(tab) ? tab : DEFAULT_TAB;\n    const [searchQuery, setSearchQuery] = useState(params.get('search') || '');\n    useUrlParams([\n        {\n            param: 'tab',\n            value: selectedTab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n        {\n            param: 'search',\n            value: searchQuery,\n            defaultValue: '',\n        },\n        ...Object.entries(defaultFilters).map(([key, value]) => ({\n            param: key,\n            value: filters[key].toString(),\n            defaultValue: value.toString(),\n        })),\n    ]);\n    const allSponsorshipsQuery = useAllSponsorshipsQuery({\n        pageSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const mySponsorshipsQuery = useSponsorshipsForCreatorQuery(wallet, {\n        pageSize: PAGE_SIZE,\n        searchQuery,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const navigate = useNavigate();\n    const chainKey = useCurrentChainKey();\n    useEffect(() => {\n        if (!wallet && !isWalletLoading) {\n            navigate(R.sponsorships(routeOptions(chainKey, {\n                tab: TabOption.AllSponsorships,\n            })));\n        }\n    }, [wallet, navigate, chainKey, isWalletLoading]);\n    const createSponsorship = useCreateSponsorship();\n    const isCreatingSponsorship = useIsCreatingSponsorshipForWallet(wallet);\n    const chainId = useCurrentChainId();\n    const chainFullName = useCurrentChainFullName();\n    return (React.createElement(Layout, null,\n        React.createElement(NetworkHelmet, { title: \"Sponsorships\" }),\n        React.createElement(NetworkActionBar, { searchEnabled: true, searchValue: searchQuery, onSearch: setSearchQuery, leftSideContent: React.createElement(Tabs, { onSelectionChange: (value) => {\n                    navigate(R.sponsorships(routeOptions(chainKey, { tab: value })));\n                }, selection: selectedTab, fullWidthOnMobile: true },\n                React.createElement(Tab, { id: TabOption.AllSponsorships }, \"All sponsorships\"),\n                React.createElement(Tab, { id: TabOption.MySponsorships, disabled: !wallet }, \"My sponsorships\")), rightSideContent: React.createElement(Button, { waiting: isCreatingSponsorship, onClick: () => {\n                    createSponsorship(chainId, wallet, {\n                        onDone(id, blockNumber) {\n                            navigate(R.sponsorship(id, routeOptions(chainId, {\n                                b: blockNumber,\n                            })));\n                        },\n                    });\n                }, disabled: !wallet }, \"Create sponsorship\") }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(Title, null,\n                        React.createElement(\"h2\", null, selectedTab === TabOption.AllSponsorships ? (React.createElement(React.Fragment, null, \"All sponsorships\")) : (React.createElement(React.Fragment, null, \"My sponsorships\"))),\n                        React.createElement(SponsorshipFilterButton, { filter: filters, onFilterChange: setFilters })) },\n                    React.createElement(QueriedSponsorshipsTable, { query: selectedTab === TabOption.AllSponsorships\n                            ? allSponsorshipsQuery\n                            : mySponsorshipsQuery, noDataFirstLine: selectedTab === TabOption.AllSponsorships\n                            ? `No sponsorships found on the ${chainFullName} chain.`\n                            : `You do not have any sponsorships on the ${chainFullName} chain yet.`, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder }))))));\n};\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1ds6rh1\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { defaultStreamStats } from '~/getters/getStreamStats';\nimport { useStreamStatsQuery } from '~/hooks/useStreamStats';\nfunction Stat({ label, value, unit, ...props }) {\n    return (React.createElement(StatRoot, { type: \"button\", ...props },\n        React.createElement(StatName, null, label),\n        React.createElement(StatValue, null,\n            value !== undefined && value,\n            value === undefined && React.createElement(Dimm, null, \"\\u221E\"),\n            value !== undefined && unit)));\n}\nconst StatName = styled.div.withConfig({ displayName: \"StatName\", componentId: \"sc-1r7jdwi\" }) `\n    font-size: 10px;\n    font-weight: 500;\n    line-height: normal;\n    letter-spacing: 0.05em;\n    color: #adadad;\n    text-transform: uppercase;\n`;\nconst StatValue = styled.div.withConfig({ displayName: \"StatValue\", componentId: \"sc-bwcph1\" }) `\n    font-size: 16px;\n    line-height: normal;\n    margin-top: 0.25em;\n    color: #323232;\n\n    svg {\n        width: 13px;\n        height: 13px;\n        color: #adadad;\n    }\n`;\nconst Dimm = styled.span.withConfig({ displayName: \"Dimm\", componentId: \"sc-1vylgji\" }) `\n    color: #adadad;\n`;\nexport const StatRoot = styled.button.withConfig({ displayName: \"StatRoot\", componentId: \"sc-1lapg84\" }) `\n    background: transparent;\n    border: 0;\n    appearance: none;\n    text-align: center;\n    user-select: none;\n    position: relative;\n    font-family: inherit;\n    outline: none;\n\n    &:focus {\n        outline: none;\n    }\n\n    ${StatName} {\n        transition: color 300ms ease-in-out;\n    }\n`;\nconst ButtonGrid = styled.div.withConfig({ displayName: \"ButtonGrid\", componentId: \"sc-1a3ch8s\" }) `\n    background: #ffffff;\n    border-radius: 8px;\n    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);\n    display: flex;\n    flex-direction: row;\n    padding: 16px 0;\n    pointer-events: auto;\n\n    > ${StatRoot} {\n        flex-grow: 1;\n        flex-basis: 0;\n    }\n`;\nexport function StreamStats({ streamId }) {\n    const { data: stats } = useStreamStatsQuery(streamId);\n    const { messagesPerSecond, peerCount, latency } = stats || defaultStreamStats;\n    return (React.createElement(StreamStatsRoot, null,\n        React.createElement(ButtonGrid, null,\n            React.createElement(Stat, { id: \"streamMessagesPerSecond\", label: \"Msgs / sec\", value: messagesPerSecond }),\n            React.createElement(Stat, { id: \"peerCount\", label: \"Peers\", value: peerCount }),\n            React.createElement(Stat, { id: \"latency\", label: \"Latency ms\", value: latency == null ? undefined : latency.toFixed(0) }))));\n}\nconst StreamStatsRoot = styled.div.withConfig({ displayName: \"StreamStatsRoot\", componentId: \"sc-1wl2di2\" }) `\n    max-width: 480px;\n    padding: 24px;\n    pointer-events: none;\n    position: absolute;\n    top: 0;\n    width: 100%;\n`;\n","import { useQuery } from '@tanstack/react-query';\nimport React, { useMemo } from 'react';\nimport Markdown from 'react-markdown';\nimport styled, { css } from 'styled-components';\nimport { z } from 'zod';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { getStreamGptApiUrl } from '~/utils';\nimport { getChainConfigExtension } from '~/utils/chains';\nimport { LayoutColumn } from './Layout';\nimport { StreamStats } from './Stats';\nexport function StreamSummary(props) {\n    const { streamId } = props;\n    const streamSummaryQuery = useStreamSummaryQuery(streamId);\n    const { data: summary } = streamSummaryQuery;\n    const info = useMemo(() => {\n        const { about = '', usage = '', imageUrl = null, schema = {}, tags = [], } = summary || {};\n        if (!about &&\n            !usage &&\n            !imageUrl &&\n            !Object.keys(schema).length &&\n            !tags.length) {\n            return null;\n        }\n        return {\n            about,\n            usage,\n            imageUrl,\n            schema: Object.entries(schema),\n            tags,\n        };\n    }, [summary]);\n    if (!info) {\n        return null;\n    }\n    return (React.createElement(StreamSummaryRoot, null,\n        React.createElement(LayoutColumn, null,\n            React.createElement(OuterWings, null,\n                React.createElement(Grid, null,\n                    !!(info.about || info.imageUrl || info.tags.length) && (React.createElement(StreamSummarySection, { title: \"About Stream\", ai: true },\n                        React.createElement(AboutWrap, null,\n                            info.imageUrl && (React.createElement(\"div\", null, info.imageUrl && (React.createElement(StreamImage, { src: info.imageUrl })))),\n                            React.createElement(AboutWrapInner, null,\n                                info.about ? (React.createElement(\"div\", null,\n                                    React.createElement(Markdown, null, info.about))) : (React.createElement(React.Fragment, null)),\n                                info.tags.length > 0 && (React.createElement(Tags, null, info.tags.map((tag) => (React.createElement(Tag, { key: tag },\n                                    \"#\",\n                                    tag))))))))),\n                    React.createElement(InnerWings, null,\n                        info.schema.length > 0 && (React.createElement(\"div\", null,\n                            React.createElement(StreamSummarySection, { title: \"Schema\", ai: true, scrollMode: \"always\" },\n                                React.createElement(Schema, null, info.schema.map(([key, desc]) => (React.createElement(SchemaPair, { key: key },\n                                    React.createElement(SchemaKey, null, key),\n                                    desc))))))),\n                        info.usage && (React.createElement(\"div\", null,\n                            React.createElement(StreamSummarySection, { title: \"Stream usage\", ai: true },\n                                React.createElement(Markdown, null, info.usage)))))),\n                React.createElement(IFrameWrap, null,\n                    React.createElement(\"iframe\", { src: `https://streamr.network/network-explorer/streams/${encodeURIComponent(streamId)}?hud=467` }),\n                    React.createElement(StreamStats, { streamId: streamId }))))));\n}\nfunction useStreamSummaryQuery(streamId) {\n    return useQuery({\n        queryKey: ['useStreamSummaryQuery', streamId],\n        queryFn: async () => {\n            const resp = await fetch(getStreamGptApiUrl(`streams/${encodeURIComponent(streamId)}`));\n            /**\n             * The GPT only processes streams on the Polygon network (137).\n             */\n            const { ipfsGatewayUrl } = getChainConfigExtension(137).ipfs;\n            return z\n                .object({\n                about: z.string(),\n                id: z.string(),\n                imageHash: z.string(),\n                rank: z.number(),\n                schema: z.record(z.string(), z.string()),\n                streamId: z.string(),\n                tags: z\n                    .string()\n                    .transform((value) => value.split(/\\s*,\\s*/).filter(Boolean)),\n                usage: z.string(),\n            })\n                .transform(({ imageHash, ...rest }) => ({\n                imageUrl: imageHash ? `${ipfsGatewayUrl}${imageHash}` : null,\n                ...rest,\n            }))\n                .parse(await resp.json());\n        },\n    });\n}\nfunction StreamSummarySection(props) {\n    const { ai = false, children, title, scrollMode = 'desktopOnly' } = props;\n    return (React.createElement(StreamSummarySectionRoot, null,\n        React.createElement(StreamSummarySectionInner, { \"$scrollMode\": scrollMode },\n            React.createElement(StreamSummarySectionHeader, null,\n                React.createElement(\"h5\", null, title),\n                ai && React.createElement(AiGenerated, null)),\n            React.createElement(StreamSummarySectionBody, null, children))));\n}\nfunction AiGenerated() {\n    return (React.createElement(AiGeneratedRoot, null,\n        React.createElement(\"div\", null,\n            React.createElement(\"svg\", { width: \"11\", height: \"11\", viewBox: \"0 0 11 11\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" },\n                React.createElement(\"path\", { \n                    // eslint-disable-next-line max-len\n                    d: \"M5.06321 0.326186C4.88824 0.794011 4.51917 1.16308 4.05134 1.33805C3.99274 1.35954 3.95367 1.41619 3.95367 1.4787C3.95367 1.54121 3.99274 1.59786 4.05134 1.61934C4.51917 1.79431 4.88824 2.16339 5.06321 2.63121C5.0847 2.68981 5.14135 2.72888 5.20386 2.72888C5.26637 2.72888 5.32302 2.68981 5.3445 2.63121C5.51947 2.16339 5.88855 1.79431 6.35637 1.61934C6.41497 1.59786 6.45404 1.54121 6.45404 1.4787C6.45404 1.41619 6.41497 1.35954 6.35637 1.33805C5.88855 1.16308 5.51947 0.794011 5.3445 0.326186C5.32302 0.267584 5.26637 0.228516 5.20386 0.228516C5.14135 0.228516 5.0847 0.267584 5.06321 0.326186ZM1.10365 7.9523C0.73836 8.31759 0.73836 8.91143 1.10365 9.27867L1.77953 9.95455C2.14482 10.3198 2.73865 10.3198 3.10589 9.95455L10.5543 2.50424C10.9195 2.13895 10.9195 1.54511 10.5543 1.17787L9.87837 0.503947C9.51308 0.138659 8.91925 0.138659 8.552 0.503947L1.10365 7.9523ZM9.44178 1.61446C9.56747 1.74015 9.56747 1.94392 9.44178 2.06961L7.84585 3.66554C7.72016 3.79123 7.51639 3.79123 7.3907 3.66554C7.26502 3.53986 7.26502 3.33608 7.3907 3.2104L8.98664 1.61446C9.11232 1.48878 9.3161 1.48878 9.44178 1.61446ZM0.349631 2.51791C0.261727 2.55112 0.203125 2.63512 0.203125 2.72888C0.203125 2.82265 0.261727 2.90664 0.349631 2.93985C1.05093 3.20299 1.60429 3.75636 1.86743 4.45765C1.90064 4.54555 1.98464 4.60416 2.0784 4.60416C2.17216 4.60416 2.25616 4.54555 2.28937 4.45765C2.55251 3.75636 3.10587 3.20299 3.80717 2.93985C3.89507 2.90664 3.95367 2.82265 3.95367 2.72888C3.95367 2.63512 3.89507 2.55112 3.80717 2.51791C3.10587 2.25477 2.55251 1.70141 2.28937 1.00011C2.25616 0.91221 2.17216 0.853607 2.0784 0.853607C1.98464 0.853607 1.90064 0.91221 1.86743 1.00011C1.60429 1.70141 1.05093 2.25477 0.349631 2.51791ZM7.22564 7.51865C7.13773 7.55185 7.07913 7.63585 7.07913 7.72961C7.07913 7.82338 7.13773 7.90737 7.22564 7.94058C7.92693 8.20372 8.4803 8.75709 8.74344 9.45838C8.77665 9.54629 8.86064 9.60489 8.95441 9.60489C9.04817 9.60489 9.13217 9.54629 9.16537 9.45838C9.42852 8.75709 9.98188 8.20372 10.6832 7.94058C10.7711 7.90737 10.8297 7.82338 10.8297 7.72961C10.8297 7.63585 10.7711 7.55185 10.6832 7.51865C9.98188 7.25551 9.42852 6.70214 9.16537 6.00085C9.13217 5.91294 9.04817 5.85434 8.95441 5.85434C8.86064 5.85434 8.77665 5.91294 8.74344 6.00085C8.4803 6.70214 7.92693 7.25551 7.22564 7.51865Z\", fill: \"url(#paint0_linear_6944_9126)\" }),\n                React.createElement(\"defs\", null,\n                    React.createElement(\"linearGradient\", { id: \"paint0_linear_6944_9126\", x1: \"0.203125\", y1: \"5.22852\", x2: \"18.4602\", y2: \"5.22852\", gradientUnits: \"userSpaceOnUse\" },\n                        React.createElement(\"stop\", { stopColor: \"#9747FF\" }),\n                        React.createElement(\"stop\", { offset: \"1\", stopColor: \"#0065FF\" }))))),\n        React.createElement(\"strong\", null, \"AI Generated\")));\n}\nconst AiGeneratedRoot = styled.div.withConfig({ displayName: \"AiGeneratedRoot\", componentId: \"sc-p83ixg\" }) `\n    align-items: center;\n    background: #faf8ff;\n    border-radius: 4px;\n    display: flex;\n    font-size: 12px;\n    gap: 6px;\n    height: 24px;\n    line-height: normal;\n    padding: 0 8px;\n    text-wrap: nowrap;\n\n    strong {\n        background: linear-gradient(90deg, #9747ff 0%, #0065ff 171.81%);\n        background-clip: text;\n        -webkit-text-fill-color: transparent;\n    }\n`;\nconst Schema = styled.ul.withConfig({ displayName: \"Schema\", componentId: \"sc-1m1kbwm\" }) `\n    list-style: none;\n    line-height: 1.5em;\n`;\nconst SchemaKey = styled.span.withConfig({ displayName: \"SchemaKey\", componentId: \"sc-1qg3vxs\" }) `\n    background: ${COLORS.secondary};\n    border-radius: 4px;\n    padding: 3px 4px;\n    font-size: 14px;\n    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n    margin-right: 8px;\n`;\nconst SchemaPair = styled.li.withConfig({ displayName: \"SchemaPair\", componentId: \"sc-7ue6xp\" }) `\n    & + & {\n        margin-top: 4px;\n    }\n`;\nconst Tags = styled.div.withConfig({ displayName: \"Tags\", componentId: \"sc-12nsarg\" }) `\n    align-items: center;\n    display: flex;\n    flex-wrap: wrap;\n    gap: 4px;\n\n    * + & {\n        margin-top: 16px;\n    }\n`;\nconst Tag = styled.div.withConfig({ displayName: \"Tag\", componentId: \"sc-kpnr8y\" }) `\n    background: ${COLORS.Border};\n    border-radius: 4px;\n    font-size: 12px;\n    font-weight: 500;\n    line-height: 24px;\n    min-width: 0;\n    overflow: hidden;\n    padding: 2px 8px;\n    text-overflow: ellipsis;\n    text-wrap: nowrap;\n    flex-shrink: 1;\n`;\nconst PictureOnSideMedia = `(min-width: 420px)`;\nconst StreamImage = styled.img.withConfig({ displayName: \"StreamImage\", componentId: \"sc-1ozutjn\" }) `\n    border-radius: 16px;\n    display: block;\n    max-width: 100%;\n\n    @media ${PictureOnSideMedia} {\n        max-width: 192px;\n        min-width: 64px;\n        width: 20vw;\n    }\n`;\nconst Grid = styled.div.withConfig({ displayName: \"Grid\", componentId: \"sc-ri6ggy\" }) `\n    display: grid;\n    gap: 20px;\n`;\nconst MapToSideMedia = `(min-width: 1200px)`;\nconst OuterWings = styled(Grid).withConfig({ displayName: \"OuterWings\", componentId: \"sc-10xg2an\" }) `\n    grid-template-columns: 1fr;\n\n    @media ${MapToSideMedia} {\n        grid-template-columns: 2fr 1fr;\n    }\n`;\nconst StreamSummaryRoot = styled.div.withConfig({ displayName: \"StreamSummaryRoot\", componentId: \"sc-176jfgf\" }) `\n    background-color: white;\n    padding-bottom: 56px;\n`;\nconst IFrameWrap = styled.div.withConfig({ displayName: \"IFrameWrap\", componentId: \"sc-kvvu9c\" }) `\n    position: relative;\n\n    iframe {\n        border-radius: 16px;\n        border: 0;\n        display: block;\n        height: 320px;\n        width: 100%;\n    }\n\n    @media ${TABLET} {\n        display: block;\n    }\n\n    @media ${MapToSideMedia} {\n        iframe {\n            height: 604px;\n        }\n    }\n`;\nconst StreamSummarySectionRoot = styled.div.withConfig({ displayName: \"StreamSummarySectionRoot\", componentId: \"sc-1bmxn94\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-radius: 16px;\n    color: ${COLORS.primaryLight};\n    overflow: hidden;\n\n    h5 {\n        font-size: 14px;\n        font-weight: 500;\n        line-height: 26px;\n        margin: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        text-wrap: nowrap;\n    }\n\n    p {\n        font-size: 16px;\n        line-height: 1.5em;\n    }\n`;\nconst InnerWings = styled(Grid).withConfig({ displayName: \"InnerWings\", componentId: \"sc-15rc6bh\" }) `\n    grid-template-columns: 1fr;\n\n    &:empty {\n        display: none;\n    }\n\n    @media ${MapToSideMedia} {\n        grid-template-columns: 1fr 1fr;\n    }\n`;\nconst AboutWrap = styled(Grid).withConfig({ displayName: \"AboutWrap\", componentId: \"sc-1el2a67\" }) `\n    grid-template-columns: 1fr;\n    gap: 32px;\n\n    @media ${PictureOnSideMedia} {\n        grid-template-columns: auto 1fr;\n    }\n`;\nconst AboutWrapInner = styled.div.withConfig({ displayName: \"AboutWrapInner\", componentId: \"sc-u2o6re\" }) `\n    min-width: 0;\n`;\nconst StreamSummarySectionHeader = styled.div.withConfig({ displayName: \"StreamSummarySectionHeader\", componentId: \"sc-1nr95c9\" }) `\n    align-items: center;\n    backdrop-filter: blur(6px);\n    background: rgba(255, 255, 255, 0.9);\n    display: flex;\n    gap: 12px;\n    height: 74px;\n    padding: 0 24px;\n    position: sticky;\n    top: 0;\n`;\nconst StreamSummarySectionInner = styled.div.withConfig({ displayName: \"StreamSummarySectionInner\", componentId: \"sc-163s346\" }) `\n    height: auto;\n    overflow: auto;\n\n    ${({ $scrollMode }) => $scrollMode === 'always' &&\n    css `\n            max-height: 290px;\n        `}\n\n    @media ${MapToSideMedia} {\n        height: 290px;\n    }\n`;\nconst StreamSummarySectionBody = styled.div.withConfig({ displayName: \"StreamSummarySectionBody\", componentId: \"sc-ldh6yk\" }) `\n    padding: 0 24px 24px;\n    word-wrap: break-word;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { REGULAR, COLORS } from '~/shared/utils/styled';\nconst Root = styled.div.withConfig({ displayName: \"Root\", componentId: \"sc-1pycplb\" }) `\n    margin-bottom: 60px;\n`;\nconst Title = styled.h3.withConfig({ displayName: \"Title\", componentId: \"sc-1hpfsa9\" }) `\n    color: ${COLORS.primary};\n    font-size: 24px;\n    font-weight: ${REGULAR};\n    letter-spacing: 0;\n    line-height: 150%;\n    margin-bottom: 16px;\n`;\nconst TitleWrapper = styled.div.withConfig({ displayName: \"TitleWrapper\", componentId: \"sc-rvlrch\" }) `\n    display: inline-flex;\n    align-items: center;\n    width: 100%;\n`;\nconst TitleText = styled.span.withConfig({ displayName: \"TitleText\", componentId: \"sc-180h2s\" }) `\n    margin-right: 16px;\n`;\nexport default function Section({ title, status, children, ...props }) {\n    return (React.createElement(Root, { ...props },\n        React.createElement(Title, null,\n            React.createElement(TitleWrapper, null,\n                React.createElement(TitleText, null, title),\n                !!status && React.createElement(\"span\", null, status))),\n        children));\n}\n","import uniqueId from 'lodash/uniqueId';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport SharedCheckbox from '~/shared/components/Checkbox';\nimport { COLORS } from '~/shared/utils/styled';\nconst Label = styled.label.withConfig({ displayName: \"Label\", componentId: \"sc-eodaqx\" }) `\n    border: 1px solid ${COLORS.Border};\n    border-radius: 4px;\n    display: grid;\n    grid-template-columns: 1fr auto;\n    align-items: center;\n    justify-items: left;\n    padding: 0px 12px 0px 18px;\n    height: 40px;\n    margin: 0;\n    cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};\n`;\nconst Checkbox = ({ operationName, value, publicKey, onChange, disabled, }) => {\n    const uniqueKey = useMemo(() => uniqueId(`${operationName}-${publicKey}-`), [operationName, publicKey]);\n    return (React.createElement(Label, { htmlFor: uniqueKey, disabled: disabled },\n        operationName,\n        React.createElement(SharedCheckbox, { id: uniqueKey, onChange: (ev) => onChange(ev.target.checked), value: value, disabled: disabled })));\n};\nexport default Checkbox;\n","import React from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport styled from 'styled-components';\nimport { Bits, matchBits } from '~/parsers/StreamParser';\nimport { MEDIUM, TABLET } from '~/shared/utils/styled';\nimport Checkbox from './Checkbox';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-w3wa5g\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 21px;\n    align-items: start;\n    user-select: none;\n\n    @media ${TABLET} {\n        grid-template-rows: unset;\n        grid-template-columns: 1fr 1fr 1fr;\n    }\n`;\nconst Column = styled.div.withConfig({ displayName: \"Column\", componentId: \"sc-ly5e7q\" }) `\n    display: grid;\n    grid-template-rows: auto auto auto;\n    gap: 12px;\n\n    & > span {\n        color: #000000;\n        font-weight: ${MEDIUM};\n        font-size: 12px;\n        line-height: 16px;\n        justify-self: left;\n    }\n`;\nfunction UnstyledPermissionEditor({ publicKey, permissionBits, disabled, onChange, ...props }) {\n    return (React.createElement(Container, { ...props },\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Read\"),\n            React.createElement(Checkbox, { operationName: \"Subscribe\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.SUBSCRIBE], permissionBits), onChange: (value) => onChange(StreamPermission.SUBSCRIBE, value), disabled: disabled })),\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Write\"),\n            React.createElement(Checkbox, { operationName: \"Publish\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.PUBLISH], permissionBits), onChange: (value) => onChange(StreamPermission.PUBLISH, value), disabled: disabled })),\n        React.createElement(Column, null,\n            React.createElement(\"span\", null, \"Manage\"),\n            React.createElement(Checkbox, { operationName: \"Grant\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.GRANT], permissionBits), onChange: (value) => onChange(StreamPermission.GRANT, value), disabled: disabled }),\n            React.createElement(Checkbox, { operationName: \"Edit\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.EDIT], permissionBits), onChange: (value) => onChange(StreamPermission.EDIT, value), disabled: disabled }),\n            React.createElement(Checkbox, { operationName: \"Delete\", publicKey: publicKey, value: matchBits(Bits[StreamPermission.DELETE], permissionBits), onChange: (value) => onChange(StreamPermission.DELETE, value), disabled: disabled }))));\n}\nconst PermissionEditor = styled(UnstyledPermissionEditor).withConfig({ displayName: \"PermissionEditor\", componentId: \"sc-6r0adt\" }) ``;\nexport default PermissionEditor;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { StreamPermission } from '@streamr/sdk';\nimport PermissionEditor from '~/pages/AbstractStreamEditPage/AccessControlSection/PermissionEditor';\nimport { Bits, matchBits, setBits, unsetBits } from '~/parsers/StreamParser';\nimport UnstyledErrors, { MarketplaceTheme } from '~/shared/components/Ui/Errors';\nimport UnstyledLabel from '~/shared/components/Ui/Label';\nimport Text from '~/shared/components/Ui/Text';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { RejectionReason, isMessagedObject } from '~/utils/exceptions';\nimport FormModal from './FormModal';\nconst Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-1724o6i\" }) `\n    border-bottom: 1px solid ${COLORS.Border};\n    margin: 24px 0;\n\n    @media ${TABLET} {\n        border: 0;\n        margin: 40px 0 0;\n    }\n`;\nconst Label = styled(UnstyledLabel).withConfig({ displayName: \"Label\", componentId: \"sc-1ip35yz\" }) `\n    display: flex;\n`;\nconst Errors = styled(UnstyledErrors).withConfig({ displayName: \"Errors\", componentId: \"sc-1gjtc59\" }) `\n    display: flex;\n`;\nconst ethereumAddressRegex = /^0x[0-9a-fA-F]{40}$/;\nconst hexStringRegex = /^0x([0-9a-fA-F]{2})+$/;\nconst zeroAddressRegex = /^(0x)?0+$/;\nexport default function NewStreamPermissionsModal({ onReject, onResolve, onBeforeSubmit, ...props }) {\n    const [permissionBits, setPermissionBits] = useState(0);\n    const [publicKey, setPublicKey] = useState('');\n    const [error, setError] = useState('');\n    const cancelLabel = publicKey || permissionBits !== 0 ? 'Cancel' : undefined;\n    return (React.createElement(FormModal, { ...props, title: \"Authorize Public Key\", onReject: onReject, onBeforeAbort: (reason) => {\n            return ((permissionBits === 0 && publicKey === '') ||\n                reason !== RejectionReason.Backdrop);\n        }, onSubmit: () => {\n            const normalizedPublicKey = `${publicKey.startsWith('0x') ? '' : '0x'}${publicKey.toLowerCase()}`;\n            if (zeroAddressRegex.test(normalizedPublicKey)) {\n                return void setError('Invalid key - cannot assign to zero key');\n            }\n            if (!hexStringRegex.test(normalizedPublicKey)) {\n                return void setError('Invalid key - must be a hex string');\n            }\n            if (!ethereumAddressRegex.test(normalizedPublicKey) && (matchBits(Bits[StreamPermission.GRANT], permissionBits) ||\n                matchBits(Bits[StreamPermission.DELETE], permissionBits) ||\n                matchBits(Bits[StreamPermission.EDIT], permissionBits))) {\n                return void setError('Only Ethereum addresses can have Grant, Edit, or Delete permission');\n            }\n            const result = {\n                publicKey: normalizedPublicKey,\n                bits: permissionBits,\n            };\n            try {\n                onBeforeSubmit?.(result);\n            }\n            catch (e) {\n                if (isMessagedObject(e)) {\n                    return void setError(e.message);\n                }\n                return void setError('Something bad happened');\n            }\n            onResolve?.(result);\n        }, canSubmit: !!publicKey && permissionBits !== 0, submitLabel: \"Authorize Public Key\", cancelLabel: cancelLabel },\n        React.createElement(\"div\", null,\n            React.createElement(Label, null, \"Public Key\"),\n            React.createElement(Text, { onCommit: (value) => {\n                    setPublicKey(value);\n                    setError('');\n                }, placeholder: \"Hex public key or Ethereum address\" }),\n            !!error && (React.createElement(Errors, { theme: MarketplaceTheme, overlap: true }, error))),\n        React.createElement(Separator, null),\n        React.createElement(PermissionEditor, { publicKey: publicKey, permissionBits: permissionBits, onChange: (permission, enabled) => {\n                setPermissionBits((enabled ? setBits : unsetBits)(permissionBits, Bits[permission]));\n            } })));\n}\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Bits, matchBits, setBits, unsetBits } from '~/parsers/StreamParser';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport UnstyledPermissionEditor from './PermissionEditor';\nexport function PermissionItem(props) {\n    const { disabled = false, publicKey, permissionBits } = props;\n    const [isOpen, setIsOpen] = useState(false);\n    const account = useWalletAccount();\n    const operations = Object.keys(Bits).filter((permission) => matchBits(Bits[permission], permissionBits));\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Container, null,\n        React.createElement(Title, { \"$isOpen\": isOpen, onClick: () => {\n                setIsOpen((prev) => !prev);\n            } },\n            isOpen ? truncate(publicKey, 50, 20, 20) : truncate(publicKey),\n            isOpen ? (React.createElement(\"div\", null)) : (React.createElement(Labels, null,\n                account?.toLowerCase() === publicKey.toLowerCase() && (React.createElement(YouLabel, null, \"You\")),\n                operations.map((op) => (React.createElement(Label, { key: op }, op.replace(/^\\w/, (s) => s.toUpperCase())))))),\n            React.createElement(DropdownCaret, { name: \"caretDown\", \"$isOpen\": isOpen })),\n        isOpen && (React.createElement(PermissionEditor, { publicKey: publicKey, permissionBits: permissionBits, disabled: disabled, onChange: (permission, enabled) => {\n                update((hot, cold) => {\n                    if (cold.permissions[publicKey] == null) {\n                        cold.permissions[publicKey] = 0;\n                    }\n                    hot.permissions[publicKey] = (enabled ? setBits : unsetBits)(permissionBits, Bits[permission]);\n                });\n            } }))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1e8uvil\" }) `\n    background: #ffffff;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: 1fr auto auto;\n    align-items: center;\n    transition: all 180ms ease-in-out;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-a1yqlc\" }) `\n    display: grid;\n    grid-template-columns: auto 1fr auto;\n    gap: 8px;\n    align-items: center;\n    border-bottom: ${({ $isOpen }) => ($isOpen ? '1px' : '0px')} solid ${COLORS.Border};\n    height: 72px;\n    padding: 21px;\n\n    &:hover {\n        cursor: pointer;\n    }\n`;\nconst Labels = styled.div.withConfig({ displayName: \"Labels\", componentId: \"sc-13s6ui5\" }) `\n    display: flex;\n    overflow: hidden;\n`;\nconst Label = styled.div.withConfig({ displayName: \"Label\", componentId: \"sc-7w5k4j\" }) `\n    color: ${COLORS.primary};\n    background-color: ${COLORS.secondary};\n    border-radius: 4px;\n    font-size: 12px;\n    line-height: 16px;\n    padding: 4px 8px;\n    margin-right: 8px;\n`;\nconst YouLabel = styled(Label).withConfig({ displayName: \"YouLabel\", componentId: \"sc-8xv30j\" }) `\n    color: white;\n    background-color: ${COLORS.primaryLight};\n`;\nconst PermissionEditor = styled(UnstyledPermissionEditor).withConfig({ displayName: \"PermissionEditor\", componentId: \"sc-1vo77d2\" }) `\n    padding: 21px;\n`;\nconst DropdownCaret = styled(SvgIcon).withConfig({ displayName: \"DropdownCaret\", componentId: \"sc-1cn26lq\" }) `\n    display: block;\n    color: ${COLORS.primaryLight};\n    width: 12px;\n    height: 12px;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(180deg)' : 'rotate(0deg)')};\n    transition: transform 180ms ease-in-out;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { toaster } from 'toasterhea';\nimport { Button } from '~/components/Button';\nimport { address0 } from '~/consts';\nimport NewStreamPermissionsModal from '~/modals/NewStreamPermissionsModal';\nimport { isAbandonment } from '~/modals/ProjectModal';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Layer } from '~/utils/Layer';\nimport { PermissionItem } from './PermissionItem';\nexport function PermissionList({ disabled = false }) {\n    const { permissions = {} } = StreamDraft.useEntity({ hot: true }) || {};\n    const permissionList = Object.entries(permissions);\n    const count = permissionList.length - (address0 in permissions ? 1 : 0);\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Container, null,\n        permissionList.map(([key, bits]) => key !== address0 && (React.createElement(PermissionItem, { key: key, publicKey: key, permissionBits: bits || 0, disabled: disabled }))),\n        React.createElement(Footer, null,\n            React.createElement(\"span\", null,\n                count,\n                \" Public Key\",\n                count === 1 ? '' : 's'),\n            React.createElement(Button, { kind: \"primary\", type: \"button\", disabled: disabled, outline: true, onClick: async () => {\n                    try {\n                        const { publicKey, bits } = await toaster(NewStreamPermissionsModal, Layer.Modal).pop({\n                            onBeforeSubmit(payload) {\n                                if (permissions[payload.publicKey] != null) {\n                                    throw new Error('Permissions for this public key already exist');\n                                }\n                            },\n                        });\n                        update((hot, cold) => {\n                            if (cold.permissions[publicKey] == null) {\n                                cold.permissions[publicKey] = 0;\n                            }\n                            hot.permissions[publicKey] = bits;\n                        });\n                    }\n                    catch (e) {\n                        if (isAbandonment(e)) {\n                            return;\n                        }\n                        console.warn('Could not add permissions for a new public key', e);\n                    }\n                } }, \"Add Public Key\"))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1yocizz\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: auto;\n    grid-gap: 1em;\n    padding: 1.5em;\n    margin-top: 16px;\n`;\nconst Footer = styled.div.withConfig({ displayName: \"Footer\", componentId: \"sc-1hu9d6w\" }) `\n    display: grid;\n    grid-template-columns: 1fr auto auto;\n    gap: 8px;\n    align-items: center;\n`;\n","import React, { useMemo } from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport styled from 'styled-components';\nimport { address0 } from '~/consts';\nimport { Bits } from '~/parsers/StreamParser';\nimport { MEDIUM } from '~/shared/utils/styled';\nimport { StreamDraft } from '~/stores/streamDraft';\nvar StreamType;\n(function (StreamType) {\n    StreamType[\"PublicSubscribe\"] = \"publicSubscribe\";\n    StreamType[\"Private\"] = \"private\";\n    StreamType[\"PublicPubSub\"] = \"publicPubSub\";\n})(StreamType || (StreamType = {}));\nexport function StreamTypeSelector({ disabled }) {\n    const update = StreamDraft.useUpdateEntity();\n    const bits = StreamDraft.useEntity({ hot: true })?.permissions[address0] ?? null;\n    const streamType = useMemo(() => {\n        if (!bits) {\n            return StreamType.Private;\n        }\n        switch (bits) {\n            case Bits[StreamPermission.SUBSCRIBE]:\n                return StreamType.PublicSubscribe;\n            case Bits[StreamPermission.SUBSCRIBE] | Bits[StreamPermission.PUBLISH]:\n                return StreamType.PublicPubSub;\n            default:\n                return StreamType.Private;\n        }\n    }, [bits]);\n    return (React.createElement(Container, null,\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"publicSubscribe\" },\n                React.createElement(Radio, { id: \"publicSubscribe\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.PublicSubscribe, onChange: () => {\n                        update((entity) => {\n                            entity.permissions[address0] =\n                                Bits[StreamPermission.SUBSCRIBE];\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Public subscribe\"),\n                    React.createElement(Description, null, \"Anyone can read/subscribe to the stream\")))),\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"private\" },\n                React.createElement(Radio, { id: \"private\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.Private, onChange: () => {\n                        update((hot, cold) => {\n                            if (cold.permissions[address0] == null) {\n                                cold.permissions[address0] = 0;\n                            }\n                            hot.permissions[address0] = 0;\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Private subscribe\"),\n                    React.createElement(Description, null, \"Only the keys listed below can read/subscribe to the stream.\")))),\n        React.createElement(Item, null,\n            React.createElement(RadioContainer, { htmlFor: \"publicPubSub\" },\n                React.createElement(Radio, { id: \"publicPubSub\", type: \"radio\", name: \"streamType\", checked: streamType === StreamType.PublicPubSub, onChange: () => {\n                        update((entity) => {\n                            entity.permissions[address0] =\n                                Bits[StreamPermission.SUBSCRIBE] |\n                                    Bits[StreamPermission.PUBLISH];\n                        });\n                    }, disabled: disabled }),\n                React.createElement(\"div\", null,\n                    React.createElement(Title, null, \"Public publish & subscribe\"),\n                    React.createElement(Description, null, \"Anyone can write/publish to the stream\"))))));\n}\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1n6i7ua\" }) `\n    background: #f1f1f1;\n    border-radius: 4px;\n    display: grid;\n    grid-template-rows: auto;\n    grid-gap: 1em;\n    padding: 1.5em;\n`;\nconst Item = styled.div.withConfig({ displayName: \"Item\", componentId: \"sc-e8dhrp\" }) `\n    background: #ffffff;\n    border-radius: 4px;\n    height: 100px;\n    display: flex;\n    align-items: center;\n`;\nconst Radio = styled.input.withConfig({ displayName: \"Radio\", componentId: \"sc-1dxk15b\" }) `\n    width: 16px;\n    justify-self: center;\n    align-self: center;\n`;\nconst RadioContainer = styled.label.withConfig({ displayName: \"RadioContainer\", componentId: \"sc-nmbwx0\" }) `\n    width: 100%;\n    margin: 0;\n    display: grid;\n    grid-template-columns: 48px auto 48px;\n`;\nconst Title = styled.div.withConfig({ displayName: \"Title\", componentId: \"sc-1ux92rx\" }) `\n    font-weight: ${MEDIUM};\n    font-size: 16px;\n    line-height: 20px;\n`;\nconst Description = styled.div.withConfig({ displayName: \"Description\", componentId: \"sc-1lmeybv\" }) `\n    font-size: 14px;\n    line-height: 24px;\n`;\n","import React from 'react';\nimport { StreamPermission } from '@streamr/sdk';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport Section from '../Section';\nimport { PermissionList } from './PermissionList';\nimport { StreamTypeSelector } from './StreamTypeSelector';\nexport function AccessControlSection({ disabled: disabledProp = false }) {\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const canGrant = useCurrentStreamAbility(streamId, StreamPermission.GRANT);\n    const disabled = disabledProp || !canGrant;\n    return (React.createElement(Section, { title: \"Access control\" },\n        React.createElement(\"p\", null,\n            \"You can make your stream public, or grant access to holders of specific cryptographic keys. Learn more about stream access control and permissions from the\",\n            ' ',\n            React.createElement(\"a\", { href: R.docs('/usage/streams/permissions/') }, \"docs\"),\n            \".\"),\n        React.createElement(StreamTypeSelector, { disabled: disabled }),\n        React.createElement(PermissionList, { disabled: disabled })));\n}\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport dataUnionImage2x from '~/marketplace/assets/product_dataunion@2x.png';\nimport CreateProjectModal from '~/marketplace/containers/CreateProjectModal';\nimport { getProjects } from '~/services/projects';\nimport useModal from '~/shared/hooks/useModal';\nimport { DESKTOP, LAPTOP, TABLET } from '~/shared/utils/styled';\nimport { useCurrentChainId } from '~/utils/chains';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1tfmnkb\" }) `\n    padding: 76px 32px;\n    display: grid;\n    grid-template-rows: auto auto;\n    grid-template-columns: unset;\n    gap: 40px;\n\n    @media (${LAPTOP}) {\n        padding: 60px 116px;\n        grid-template-rows: unset;\n        grid-template-columns: auto auto;\n    }\n\n    @media (${DESKTOP}) {\n        padding: 165px 125px;\n        grid-template-rows: unset;\n        grid-template-columns: auto auto;\n    }\n`;\nconst TextContainer = styled.div.withConfig({ displayName: \"TextContainer\", componentId: \"sc-nt5zi9\" }) `\n    margin-left: 0;\n    display: grid;\n    grid-template-rows: auto auto;\n    gap: 40px;\n    align-content: center;\n\n    @media (${DESKTOP}) {\n        margin-left: 112px;\n    }\n`;\nconst Text = styled.div.withConfig({ displayName: \"Text\", componentId: \"sc-12ep14w\" }) `\n    display: flex;\n    font-size: 24px;\n    line-height: 150%;\n    text-align: center;\n    justify-self: center;\n\n    @media (${TABLET}) {\n        font-size: 34px;\n    }\n\n    @media (${DESKTOP}) {\n        text-align: left;\n        justify-self: left;\n    }\n`;\nconst Image = styled.img.withConfig({ displayName: \"Image\", componentId: \"sc-1g525k8\" }) `\n    width: 261px;\n    justify-self: center;\n\n    @media (${TABLET}) {\n        width: 364px;\n    }\n`;\nconst CreateButton = styled(Button).withConfig({ displayName: \"CreateButton\", componentId: \"sc-57e4sq\" }) `\n    width: fit-content;\n    justify-self: center;\n\n    @media (${DESKTOP}) {\n        justify-self: left;\n    }\n`;\nexport default function CreateProjectHint({ streamId }) {\n    const [projects, setProjects] = useState([]);\n    const { api: createProductModal } = useModal('marketplace.createProduct');\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        const loadProjects = async () => {\n            const result = await getProjects({\n                chainId,\n                first: 4,\n                streamId,\n            });\n            if (mounted) {\n                setProjects(result.projects);\n            }\n        };\n        if (streamId) {\n            loadProjects();\n        }\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    // If the stream already has a project, show nothing\n    if (projects.length > 0) {\n        return null;\n    }\n    return (React.createElement(Container, null,\n        React.createElement(Image, { src: dataUnionImage2x, alt: \"Create a project\" }),\n        React.createElement(TextContainer, null,\n            React.createElement(Text, null, \"Make your stream more discoverable by creating a project.\"),\n            React.createElement(CreateButton, { type: \"button\", onClick: () => createProductModal.open() }, \"Create a project\")),\n        React.createElement(CreateProjectModal, null)));\n}\n","import React from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport { getStreamrClientInstance } from '~/getters/getStreamrClient';\nimport { isRejectionReason, isTransactionRejection } from '~/utils/exceptions';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport Section from './Section';\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-1v03886\" }) `\n    margin-bottom: 3rem;\n`;\nexport default function DeleteSection() {\n    const navigate = useNavigate();\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const chainId = useCurrentChainId();\n    return (React.createElement(Section, { title: \"Delete stream\" },\n        React.createElement(Description, null, \"Delete this stream forever. You can't undo this.\"),\n        React.createElement(Button, { type: \"button\", kind: \"destructive\", disabled: !streamId, onClick: async () => {\n                if (!streamId) {\n                    return;\n                }\n                try {\n                    const client = await getStreamrClientInstance(chainId, {\n                        transactional: true,\n                    });\n                    await client.deleteStream(streamId);\n                    /**\n                     * @FIXME: If the user navigates away before the above transaciton is\n                     * done the app is gonna navigate to streams/index.\n                     */\n                    navigate(R.streams(routeOptions(chainId)));\n                }\n                catch (e) {\n                    if (isRejectionReason(e)) {\n                        return;\n                    }\n                    if (isTransactionRejection(e)) {\n                        return;\n                    }\n                    throw e;\n                }\n            } }, \"Delete\")));\n}\n","import React from 'react';\nimport styled, { css } from 'styled-components';\nimport { Hint } from '~/components/Hint';\nimport { Tick } from '~/shared/components/Checkbox';\nimport Spinner from '~/components/Spinner';\nimport { StreamDraft } from '~/stores/streamDraft';\nfunction UnstyledStorageNodeItem({ address, className, disabled = false, children, thirdPartyUrl, }) {\n    const active = !!StreamDraft.useEntity({ hot: true })?.storage[address];\n    const busy = false;\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Root, { className: className, onClick: () => {\n            update((hot, cold) => {\n                if (cold.storage[address] == null) {\n                    cold.storage[address] = false;\n                }\n                const enabled = !hot.storage[address];\n                hot.storage[address] = enabled;\n                if (!enabled && !Object.values(hot.storage).some(Boolean)) {\n                    /**\n                     * If there are no other enabled storage nodes\n                     * revert the storage days.\n                     */\n                    hot.metadata.storageDays = cold.metadata.storageDays;\n                }\n            });\n        }, type: \"button\", \"$active\": active, disabled: disabled },\n        React.createElement(\"div\", null, children),\n        thirdPartyUrl && (React.createElement(Hint, null,\n            React.createElement(\"p\", null, \"Third-party Storage Provider\"),\n            React.createElement(\"p\", null,\n                React.createElement(\"a\", { href: thirdPartyUrl, target: '_blank', rel: \"noreferrer\" }, \"Learn more\")))),\n        !disabled && (React.createElement(Tick, { \"$checked\": active, \"data-test-hook\": active ? 'Checkbox on' : 'Checkbox off' })),\n        busy && React.createElement(Spinner, { color: \"gray\" })));\n}\nconst StorageNodeItem = styled(UnstyledStorageNodeItem).withConfig({ displayName: \"StorageNodeItem\", componentId: \"sc-tig4mx\" }) `\n    align-items: center;\n    appearance: none;\n    background: #ffffff;\n    border: 1px solid #efefef;\n    border-radius: 4px;\n    box-sizing: border-box;\n    display: flex;\n    font-size: 16px;\n    height: 40px;\n    line-height: normal;\n    padding: 0 16px;\n    text-align: left;\n    transition: color 0.1s;\n    width: 100%;\n\n    :disabled,\n    &[disabled] {\n        background: #efefef;\n        border-color: #efefef;\n    }\n\n    :focus {\n        outline: 0;\n    }\n\n    & + & {\n        margin-top: 16px;\n    }\n\n    > div:first-child {\n        flex-grow: 1;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n    }\n\n    ${Tick} {\n        flex-shrink: 0;\n        margin-left: 12px;\n    }\n`;\nconst Root = styled.button.withConfig({ displayName: \"Root\", componentId: \"sc-16yvi4m\" }) `\n    color: #cdcdcd;\n    cursor: pointer;\n\n    :disabled,\n    &[disabled] {\n        cursor: not-allowed;\n    }\n\n    ${({ $active }) => !!$active &&\n    css `\n            color: #323232;\n        `}\n\n    ${({ $active }) => typeof $active === 'undefined' &&\n    css `\n            cursor: default !important;\n        `}\n`;\nexport default StorageNodeItem;\n","import React from 'react';\nimport styled from 'styled-components';\nimport Label from '~/shared/components/Ui/Label';\nimport { getChainConfigExtension, useCurrentChainId } from '~/utils/chains';\nimport StorageNodeItem from './StorageNodeItem';\nfunction UnstyledStorageNodeList({ className, disabled = false }) {\n    const chainId = useCurrentChainId();\n    const storageNodes = getChainConfigExtension(chainId).storageNodes;\n    return (React.createElement(\"div\", { className: className },\n        React.createElement(Label, null, disabled ? 'Storage nodes' : 'Choose storage nodes (one or more)'),\n        React.createElement(\"ul\", { \"data-test-hook\": \"Storage nodes\" }, storageNodes.map(({ address, name, thirdPartyUrl }) => (React.createElement(\"li\", { key: address },\n            React.createElement(StorageNodeItem, { address: address.toLowerCase(), disabled: disabled, thirdPartyUrl: thirdPartyUrl }, name)))))));\n}\nconst StorageNodes = styled(UnstyledStorageNodeList).withConfig({ displayName: \"StorageNodes\", componentId: \"sc-1djyh7y\" }) `\n    margin-bottom: 40px;\n\n    ul {\n        list-style: none;\n        margin: 0;\n        padding: 0;\n    }\n\n    ul > li + li {\n        margin-top: 6px;\n    }\n`;\nexport default StorageNodes;\n","import { StreamPermission } from '@streamr/sdk';\nimport React from 'react';\nimport styled from 'styled-components';\nimport Label from '~/shared/components/Ui/Label';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport Section from '../Section';\nimport StorageNodeList from './StorageNodeList';\nconst Desc = styled.div.withConfig({ displayName: \"Desc\", componentId: \"sc-1bimo02\" }) `\n    margin-bottom: 3.125rem;\n\n    > p {\n        margin: 0;\n    }\n\n    > p + p {\n        margin-top: 0.5em;\n    }\n`;\nexport function HistorySection({ disabled: disabledProp = false }) {\n    const { id: streamId, storage, metadata, } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const { storageDays } = metadata;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const noStorageEnabled = !Object.values(storage).some(Boolean);\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Section, { title: \"Data storage\" },\n        React.createElement(Desc, null,\n            React.createElement(\"p\", null, \"Enable data storage on your streams to retain historical messages and access them later via a resend. Choose your storage provider and set the duration for storing data before it is marked for deletion.\"),\n            React.createElement(\"p\", null,\n                \"For more details, see the\",\n                ' ',\n                React.createElement(\"a\", { target: \"_blank\", rel: \"noopener noreferrer\", href: R.docs('/usage/streams/store-and-retrieve') }, \"docs\"),\n                \".\")),\n        React.createElement(StorageNodeList, { disabled: disabled }),\n        React.createElement(Label, { htmlFor: \"storageAmount\" }, \"Store historical data for (days)\"),\n        React.createElement(TextFieldWrap, null,\n            React.createElement(TextInput, { disabled: disabled || noStorageEnabled, type: \"number\", step: 1, min: 1, value: storageDays, onChange: (e) => {\n                    update((hot) => {\n                        hot.metadata.storageDays = e.target.value;\n                    });\n                } }))));\n}\nconst TextFieldWrap = styled.div.withConfig({ displayName: \"TextFieldWrap\", componentId: \"sc-nn7s2f\" }) `\n    width: 11rem;\n`;\n","import React from 'react';\nexport default function Surround({ head, children, tail }) {\n    return (React.createElement(React.Fragment, null,\n        head,\n        children,\n        tail));\n}\n","import React from 'react';\nimport ReactSelect, { components } from 'react-select';\nimport styled from 'styled-components';\nimport SvgIcon from '~/shared/components/SvgIcon';\n// TODO add typing\nconst customStyles = {\n    control: (provided, state) => ({\n        ...provided,\n        padding: '0',\n        '&:hover': {\n            path: {\n                stroke: '#A3A3A3',\n            },\n        },\n        backgroundColor: state.isDisabled ? '#EFEFEF' : provided.backgroundColor,\n        opacity: state.isDisabled ? 0.5 : 1,\n        backfaceVisibility: 'hidden',\n        color: state.isDisabled ? '#32323280' : '#323232',\n        border: state.isFocused ? '1px solid #0324FF' : '1px solid #EFEFEF',\n        borderRadius: '4px',\n        height: '40px',\n        boxShadow: 'none',\n        cursor: state.isDisabled ? 'not-allowed' : 'pointer',\n        pointerEvents: 'auto',\n        fontSize: '1rem',\n        letterSpacing: '0',\n        lineHeight: '2rem',\n        width: '100%',\n    }),\n    dropdownIndicator: (provided, state) => ({\n        ...provided,\n        color: state.isDisabled ? '#32323280' : '#323232',\n        marginRight: '8px',\n    }),\n    indicatorSeparator: () => ({}),\n    menu: (provided) => ({\n        ...provided,\n        marginTop: '0.5rem',\n        padding: '0',\n        zIndex: '10',\n    }),\n    menuList: (provided) => ({ ...provided, margin: '0.2rem 0', padding: '0' }),\n    option: (provided, state) => ({\n        ...provided,\n        display: 'flex',\n        textAlign: 'left',\n        padding: '0 1rem',\n        paddingLeft: '1rem',\n        color: '#323232',\n        position: 'relative',\n        backgroundColor: state.isSelected || state.isFocused ? '#f8f8f8' : null,\n        '&:active': {\n            backgroundColor: '#f8f8f8',\n        },\n        lineHeight: '2rem',\n        alignItems: 'center',\n    }),\n    placeholder: () => ({\n        color: '#CDCDCD',\n        lineHeight: '1rem',\n        position: 'absolute',\n        left: '16px',\n    }),\n    valueContainer: (provided) => ({\n        ...provided,\n        padding: '0 1rem',\n        color: '#323232',\n        lineHeight: '1rem',\n        overflow: 'visible',\n    }),\n    singleValue: (provided) => ({\n        ...provided,\n        margin: 0,\n        overflow: 'hidden',\n        display: 'flex',\n        alignItems: 'center',\n    }),\n};\nconst Control = ({ className, children, ...props }) => {\n    const { controlClassName } = props.selectProps;\n    return (React.createElement(components.Control, { ...props, className: `${className || ''} ${controlClassName || ''}`.trim() }, children));\n};\nconst EllipsisSpan = styled.span.withConfig({ displayName: \"EllipsisSpan\", componentId: \"sc-t47p98\" }) `\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n`;\nconst EllipsisSpanWithTickMargin = styled(EllipsisSpan).withConfig({ displayName: \"EllipsisSpanWithTickMargin\", componentId: \"sc-ff60bv\" }) `\n    margin-right: 18px;\n`;\nconst UnstyledTick = (props) => React.createElement(SvgIcon, { ...props, name: \"tick\" });\nconst Tick = styled(UnstyledTick).withConfig({ displayName: \"Tick\", componentId: \"sc-a51f0c\" }) `\n    height: 8px;\n    right: 12px;\n    position: absolute;\n    top: 50%;\n    transform: translate(-50%, -50%);\n    width: 10px;\n`;\nconst OptionIconWrapper = styled.div.withConfig({ displayName: \"OptionIconWrapper\", componentId: \"sc-1xxj5za\" }) `\n    width: 20px;\n    margin-right: 0.5rem;\n`;\nconst IconOption = (props) => (React.createElement(components.Option, { ...props },\n    props.isSelected && React.createElement(Tick, null),\n    props.data.icon != null && (React.createElement(OptionIconWrapper, null, props.data.icon)),\n    React.createElement(EllipsisSpanWithTickMargin, null, props.data.label)));\nconst Caret = styled(SvgIcon).withConfig({ displayName: \"Caret\", componentId: \"sc-1250yop\" }) `\n    height: 8px;\n    width: 10px;\n    transition: transform 180ms ease-in-out;\n    transform: ${({ $isOpen }) => ($isOpen ? 'rotate(180deg)' : '')};\n`;\nconst DropdownIndicator = (props) => components.DropdownIndicator && (React.createElement(components.DropdownIndicator, { ...props },\n    React.createElement(Caret, { name: \"caretDown\", \"$isOpen\": props.selectProps.menuIsOpen })));\nconst IconWrapper = styled.div.withConfig({ displayName: \"IconWrapper\", componentId: \"sc-1xs89r\" }) `\n    width: 24px;\n    margin-right: 0.5rem;\n`;\nconst SingleValue = ({ children, ...props }) => {\n    const { icon } = props.getValue()[0] || {};\n    return (React.createElement(components.SingleValue, { ...props },\n        icon != null && React.createElement(IconWrapper, null, icon),\n        React.createElement(EllipsisSpan, null, children)));\n};\nconst ClearIndicator = () => React.createElement(React.Fragment, null);\nconst UnstyledSelect = ({ controlClassName, required = false, clearable = true, disabled, ...props }) => (React.createElement(ReactSelect, { styles: customStyles, components: {\n        Control,\n        IndicatorSeparator: null,\n        Option: IconOption,\n        DropdownIndicator,\n        SingleValue,\n        ClearIndicator,\n    }, isMulti: false, className: controlClassName, required: required, isClearable: clearable, isDisabled: disabled, isSearchable: false, ...props }));\nconst Select = styled(UnstyledSelect).withConfig({ displayName: \"Select\", componentId: \"sc-r7dwwj\" }) `\n    font-size: 0.875rem;\n`;\n/**\n * @deprecated\n * Replaced by SelectField2 due to redesign of the Hub\n */\nexport default Select;\n","import { useEffect, useState } from 'react';\nimport { isAddress } from 'web3-validator';\nimport { getENSDomainsForWallet } from '~/getters';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { truncate } from '~/shared/utils/text';\nexport const ADD_ENS_DOMAIN_VALUE = '::ens/add_domain';\n/**\n * @todo Refactor using `useQuery` and bake `fetchDomains` into it (it hasn't been used anywhere else).\n * @returns an array of `OptionGroup` items, or `undefined` if entries are being loaded.\n */\nexport default function useStreamOwnerOptionGroups(domain) {\n    const [groups, setGroups] = useState();\n    const account = useWalletAccount();\n    useEffect(() => {\n        let mounted = true;\n        setGroups(undefined);\n        async function fn() {\n            if (!account) {\n                return void setGroups([]);\n            }\n            const domains = await (async () => {\n                try {\n                    return await getENSDomainsForWallet(account);\n                }\n                catch (_) {\n                    return [];\n                }\n            })();\n            if (!mounted) {\n                return;\n            }\n            const ensDomainGiven = /\\.eth$/.test(domain);\n            const ensOptions = [];\n            if (ensDomainGiven && domains.indexOf(domain) === -1) {\n                domains.push(domain);\n            }\n            domains.forEach((value) => {\n                ensOptions.push({\n                    value,\n                    label: value,\n                });\n            });\n            ensOptions.push({\n                value: ADD_ENS_DOMAIN_VALUE,\n                label: 'Add new domain',\n            });\n            const addrOptions = [\n                {\n                    value: account,\n                    label: truncate(account),\n                },\n            ];\n            if (isAddress(domain) && domain.toLowerCase() !== account.toLowerCase()) {\n                addrOptions.push({\n                    value: domain,\n                    label: truncate(domain),\n                });\n            }\n            setGroups([\n                {\n                    label: 'ENS domains',\n                    options: ensOptions,\n                },\n                {\n                    label: 'Eth Account',\n                    options: addrOptions,\n                },\n            ]);\n        }\n        fn();\n        return () => {\n            mounted = false;\n        };\n    }, [account, domain]);\n    return groups;\n}\n","import React, { useEffect, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { Button } from '~/components/Button';\nimport { Hint } from '~/components/Hint';\nimport Spinner from '~/components/Spinner';\nimport { PathnameSchema } from '~/parsers/StreamParser';\nimport SvgIcon from '~/shared/components/SvgIcon';\nimport Errors, { MarketplaceTheme } from '~/shared/components/Ui/Errors';\nimport Label from '~/shared/components/Ui/Label';\nimport Select from '~/shared/components/Ui/Select';\nimport Text from '~/shared/components/Ui/Text';\nimport useCopy from '~/shared/hooks/useCopy';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { PHONE } from '~/shared/utils/styled';\nimport { truncate } from '~/shared/utils/text';\nimport { StreamDraft } from '~/stores/streamDraft';\nimport { Route as R } from '~/utils/routes';\nimport useStreamOwnerOptionGroups, { ADD_ENS_DOMAIN_VALUE, } from './useStreamOwnerOptionGroups';\nexport const ENS_DOMAINS_URL = 'https://ens.domains';\nexport function ReadonlyStreamId({ streamId }) {\n    const { copy, isCopied } = useCopy();\n    return (React.createElement(StreamId, null,\n        React.createElement(Pathname, null,\n            React.createElement(Label, null, \"Stream ID\"),\n            React.createElement(PathnameField, null,\n                React.createElement(Text, { readOnly: true, value: streamId, disabled: true }))),\n        React.createElement(\"div\", null,\n            React.createElement(Label, null, \"\\u200C\"),\n            React.createElement(Button, { kind: \"secondary\", onClick: () => void copy(streamId || '', {\n                    toastMessage: 'Stream ID copied',\n                }), type: \"button\" }, isCopied ? 'Copied!' : 'Copy'))));\n}\nexport function EditableStreamId({ disabled = false }) {\n    const { domain = '', pathname = '' } = StreamDraft.useEntity({ hot: true }) || {};\n    const ownerGroups = useStreamOwnerOptionGroups(domain);\n    const update = StreamDraft.useUpdateEntity();\n    const [{ pathname: validationError }, setErrors] = useState({});\n    const validate = StreamDraft.useValidateEntity((entity) => {\n        z.object({\n            pathname: PathnameSchema,\n        }).parse(entity);\n    });\n    const owners = useMemo(() => {\n        const result = [];\n        if (ownerGroups) {\n            ownerGroups.forEach(({ options }) => {\n                result.push(...options);\n            });\n        }\n        return result;\n    }, [ownerGroups]);\n    const isOwnersLoading = typeof ownerGroups === 'undefined';\n    const account = useWalletAccount();\n    useEffect(function setCurrentAccountAsDomain() {\n        /**\n         * We may wanna skip this step of delay it while we're doing\n         * something to the stream, e.g. transacting or block-awaiting.\n         */\n        /**\n         * We set the domain for both hot and cold copies of the entity\n         * here so that *just* changing the account does not cause the state\n         * to be dirty. All we care about is, after all, the pathname.\n         */\n        update((hot, cold) => {\n            if (!hot.domain) {\n                hot.domain = account || '';\n            }\n            cold.domain = hot.domain;\n        });\n    }, [update, account]);\n    return (React.createElement(StreamId, null,\n        React.createElement(Domain, null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null, \"Domain\")),\n            disabled || isOwnersLoading || !account ? (React.createElement(DisabledDomain, null, isOwnersLoading ? (React.createElement(React.Fragment, null,\n                React.createElement(\"span\", null, \"Loading domains\\u2026\"),\n                !disabled && React.createElement(Spinner, { color: \"blue\" }))) : (React.createElement(\"span\", null, truncate(domain || account || 'No account'))))) : (React.createElement(Select, { options: ownerGroups, value: owners.find(({ value }) => value.toLowerCase() === (domain || account)), onChange: (option) => {\n                    const { value = '' } = option || {};\n                    if (value === ADD_ENS_DOMAIN_VALUE) {\n                        window.open(ENS_DOMAINS_URL, '_blank', 'noopener noreferrer');\n                        return;\n                    }\n                    /**\n                     * We set the domain for both hot and cold copies of the entity\n                     * here so that *just* changing the account does not cause the state\n                     * to be dirty. All we care about is, after all, the pathname.\n                     */\n                    update((hot, cold) => {\n                        hot.domain = value;\n                        cold.domain = value;\n                    });\n                }, disabled: disabled, name: \"domain\" }))),\n        React.createElement(\"div\", null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null)),\n            React.createElement(Separator, null)),\n        React.createElement(Pathname, null,\n            React.createElement(Label, null,\n                React.createElement(LabelInner, null,\n                    React.createElement(\"span\", null, \"Path name\"),\n                    React.createElement(Hint, null,\n                        React.createElement(\"p\", null, \"Stream paths can be single or multi-level.\"),\n                        React.createElement(\"p\", null, \"Single\"),\n                        React.createElement(\"pre\", null, \"streamr.eth/coffeemachine\"),\n                        React.createElement(\"p\", null, \"Multi\"),\n                        React.createElement(\"pre\", null, \"streamr.eth/oracles/price\"),\n                        React.createElement(\"p\", null,\n                            \"For more information, see the \",\n                            React.createElement(\"a\", { href: R.docs() }, \"docs\"),\n                            \".\")))),\n            React.createElement(PathnameField, null,\n                React.createElement(Text, { disabled: disabled, invalid: !!validationError, onChange: ({ target }) => {\n                        update((draft) => {\n                            draft.pathname = target.value;\n                        });\n                        setErrors(validate());\n                    }, placeholder: \"Enter a unique stream path name\", value: pathname }),\n                pathname && !disabled && (React.createElement(ClearButton, { type: \"button\", onClick: () => {\n                        update((draft) => {\n                            draft.pathname = '';\n                        });\n                        setErrors(validate());\n                    } },\n                    React.createElement(SvgIcon, { name: \"clear\" })))),\n            !!validationError && (React.createElement(Errors, { overlap: true, theme: MarketplaceTheme }, validationError)))));\n}\nconst Domain = styled.div.withConfig({ displayName: \"Domain\", componentId: \"sc-j0ydgn\" }) `\n    flex-grow: 1;\n\n    @media ${PHONE} {\n        max-width: 222px;\n    }\n`;\nconst SeparatorAttrs = {\n    children: '/',\n};\nconst Separator = styled.div.attrs(SeparatorAttrs).withConfig({ displayName: \"Separator\", componentId: \"sc-1gstqu9\" }) `\n    line-height: 40px;\n`;\nconst Pathname = styled.div.withConfig({ displayName: \"Pathname\", componentId: \"sc-m9p0ie\" }) `\n    flex-grow: 1;\n\n    ${Label} {\n        flex-grow: 1;\n    }\n`;\nconst PathnameField = styled.div.withConfig({ displayName: \"PathnameField\", componentId: \"sc-zbkf0q\" }) `\n    position: relative;\n`;\nconst DisabledDomain = styled.div.withConfig({ displayName: \"DisabledDomain\", componentId: \"sc-3a5w4s\" }) `\n    align-items: center;\n    background-color: #efefef;\n    border-radius: 4px;\n    border: 1px solid #efefef;\n    color: #525252;\n    display: flex;\n    font-size: 0.875rem;\n    height: 40px;\n    padding: 0 1rem;\n    width: 100%;\n\n    > span {\n        flex: 1;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n    }\n`;\nconst ClearButton = styled.button.withConfig({ displayName: \"ClearButton\", componentId: \"sc-1jyptkc\" }) `\n    width: 40px;\n    height: 40px;\n    color: #989898;\n    position: absolute;\n    top: 0;\n    line-height: 16px;\n    right: 0;\n    border: 0;\n    background: none;\n    outline: none;\n    appearance: none;\n\n    :focus {\n        outline: none;\n    }\n\n    svg {\n        width: 16px;\n        height: 16px;\n        position: absolute;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n    }\n\n    :hover circle {\n        fill: #525252;\n        stroke: #525252;\n    }\n`;\nconst StreamId = styled.div.withConfig({ displayName: \"StreamId\", componentId: \"sc-13t8y8p\" }) `\n    display: flex;\n\n    > * + * {\n        margin-left: 16px;\n    }\n`;\nconst LabelInner = styled.div.withConfig({ displayName: \"LabelInner\", componentId: \"sc-zbslrf\" }) `\n    align-items: center;\n    display: flex;\n    min-height: 24px;\n\n    span {\n        flex-grow: 1;\n    }\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React, { useEffect } from 'react';\nimport styled from 'styled-components';\nimport Surround from '~/shared/components/Surround';\nimport Label from '~/shared/components/Ui/Label';\nimport Text from '~/shared/components/Ui/Text';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport Section from '../Section';\nimport { ENS_DOMAINS_URL, EditableStreamId, ReadonlyStreamId } from './StreamId';\nexport function InfoSection({ disabled: disabledProp = false }) {\n    const { id: streamId, metadata } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const { description } = metadata;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const update = StreamDraft.useUpdateEntity();\n    const selectedChainId = useCurrentChainId();\n    useEffect(function applySelectedChainIdToNewStream() {\n        if (!streamId) {\n            /**\n             * Only allow the global chain selector changes to update\n             * chain id of *new* streams.\n             */\n            update((hot, cold) => {\n                hot.chainId = selectedChainId;\n                cold.chainId = selectedChainId;\n            });\n        }\n    }, [update, streamId, selectedChainId]);\n    return (React.createElement(Section, { title: \"Details\" },\n        React.createElement(Description, null,\n            \"All streams have a unique id in the format\",\n            ' ',\n            React.createElement(\"strong\", null, \"domain/pathname\"),\n            \".\",\n            React.createElement(Surround, { head: \" \", tail: \" \" }, \"The domain part can be your Ethereum address or an ENS name you own.\"),\n            React.createElement(Surround, null,\n                React.createElement(\"a\", { href: ENS_DOMAINS_URL, target: \"_blank\", rel: \"nofollow noopener noreferrer\" }, \"Need an ENS name?\"))),\n        React.createElement(Row, null, streamId ? (React.createElement(ReadonlyStreamId, { streamId: streamId })) : (React.createElement(EditableStreamId, { disabled: disabled }))),\n        React.createElement(Row, null,\n            React.createElement(Label, { htmlFor: \"streamDescription\" }, \"Description\"),\n            React.createElement(Text, { type: \"text\", id: \"streamDescription\", name: \"description\", placeholder: \"Add a brief description\", value: description, onChange: ({ target }) => {\n                    update((draft) => {\n                        draft.metadata.description = target.value;\n                    });\n                }, disabled: disabled, autoComplete: \"off\" }))));\n}\nconst Row = styled.div.withConfig({ displayName: \"Row\", componentId: \"sc-zfw7en\" }) `\n    & + & {\n        margin-top: 2rem;\n    }\n\n    input[disabled] {\n        background-color: #efefef;\n        color: #525252;\n        opacity: 1;\n    }\n`;\nconst Description = styled.p.withConfig({ displayName: \"Description\", componentId: \"sc-zl4txk\" }) `\n    margin-bottom: 3rem;\n`;\n","import styled from 'styled-components';\nfunction getAdvancedLabelProps() {\n    return { children: 'Advanced' };\n}\nexport const Advanced = styled.div.attrs(getAdvancedLabelProps).withConfig({ displayName: \"Advanced\", componentId: \"sc-65gz6g\" }) `\n    background-color: #a3a3a3;\n    color: #fff;\n    font-size: 0.75rem;\n    line-height: 0.75rem;\n    font-weight: var(--medium);\n    letter-spacing: 0;\n    border-radius: 2px;\n    padding: 0.375rem 0.5rem;\n    text-align: center;\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { z } from 'zod';\nimport { Advanced } from '~/shared/components/StatusLabel';\nimport Label from '~/shared/components/Ui/Label';\nimport TextInput from '~/shared/components/Ui/Text/StyledInput';\nimport { useCurrentStreamAbility } from '~/shared/stores/streamAbilities';\nimport { StreamDraft, getEmptyStreamEntity } from '~/stores/streamDraft';\nimport Section from './Section';\nexport function PartitionsSection({ disabled: disabledProp = false }) {\n    const { id: streamId, metadata } = StreamDraft.useEntity({ hot: true }) || getEmptyStreamEntity();\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const disabled = disabledProp || !canEdit;\n    const { partitions } = metadata;\n    const update = StreamDraft.useUpdateEntity();\n    return (React.createElement(Section, { title: \"Stream partitions\", status: React.createElement(Advanced, null) },\n        React.createElement(Desc, null, \"Partitioning enables high-volume streams to scale beyond what a typical node can handle. If you're not sure if your stream needs partitions, leave it set to 1.\"),\n        React.createElement(Partitions, null,\n            React.createElement(Label, null, \"Partitions\"),\n            React.createElement(TextInput, { type: \"number\", min: PartitionRange.Min, max: PartitionRange.Max, step: 1, value: partitions, onChange: (e) => {\n                    update((hot) => {\n                        hot.metadata.partitions = e.target.value;\n                    });\n                }, onBlur: () => {\n                    update((hot, cold) => {\n                        const valid = z.coerce\n                            .number()\n                            .min(PartitionRange.Min)\n                            .max(PartitionRange.Max)\n                            .safeParse(partitions).success;\n                        if (valid) {\n                            return;\n                        }\n                        hot.metadata.partitions = cold.metadata.partitions;\n                    });\n                }, disabled: disabled }))));\n}\nconst PartitionRange = {\n    Min: 1,\n    Max: 100,\n};\nconst Partitions = styled.div.withConfig({ displayName: \"Partitions\", componentId: \"sc-19bwcq\" }) `\n    max-width: 136px;\n`;\nconst Desc = styled.p.withConfig({ displayName: \"Desc\", componentId: \"sc-fy4k9b\" }) `\n    margin-bottom: 3.125rem;\n    max-width: 660px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { MarketplaceProductTile } from '~/shared/components/Tile';\nimport { TABLET, PHONE } from '~/shared/utils/styled';\nimport { getProjects } from '~/services/projects';\nimport { useCurrentChainId } from '~/utils/chains';\nconst Container = styled.div.withConfig({ displayName: \"Container\", componentId: \"sc-1k2csbv\" }) `\n    margin-top: 80px;\n    margin-bottom: 120px;\n`;\nconst Header = styled.div.withConfig({ displayName: \"Header\", componentId: \"sc-1bb2vzg\" }) `\n    font-size: 34px;\n    line-height: 34px;\n    color: #000000;\n    padding-bottom: 40px;\n`;\nconst ProjectGrid = styled.div.withConfig({ displayName: \"ProjectGrid\", componentId: \"sc-1349zu6\" }) `\n    display: grid;\n    grid-template-columns: 1fr;\n    gap: 36px;\n\n    @media (${PHONE}) {\n        grid-template-columns: 1fr 1fr;\n    }\n\n    @media (${TABLET}) {\n        grid-template-columns: 1fr 1fr 1fr 1fr;\n    }\n`;\nexport default function RelatedProjects({ streamId }) {\n    const [projects, setProjects] = useState([]);\n    const chainId = useCurrentChainId();\n    useEffect(() => {\n        /**\n         * @todo Refactor using useQuery. #refactor\n         */\n        let mounted = true;\n        const loadProjects = async () => {\n            const result = await getProjects({\n                chainId,\n                first: 4,\n                streamId,\n            });\n            if (mounted) {\n                setProjects(result.projects);\n            }\n        };\n        loadProjects();\n        return () => {\n            mounted = false;\n        };\n    }, [streamId, chainId]);\n    if (projects.length === 0) {\n        return null;\n    }\n    return (React.createElement(Container, null,\n        React.createElement(Header, null, \"This stream belongs to following projects\"),\n        React.createElement(ProjectGrid, null, projects.map((project) => (React.createElement(MarketplaceProductTile, { key: project.id, product: project, showDataUnionBadge: false, showEditButton: false }))))));\n}\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport NetworkPageSegment, { TitleBar } from '~/components/NetworkPageSegment';\nimport { QueriedSponsorshipsTable } from '~/components/QueriedSponsorshipsTable';\nimport { SponsorshipFilterButton, } from '~/components/SponsorshipFilterButton';\nimport { useCreateSponsorship, useSponsorshipsByStreamIdQuery, } from '~/hooks/sponsorships';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { NoData } from '~/shared/components/NoData';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { Route as R } from '~/utils/routes';\nconst PAGE_SIZE = 5;\nexport default function SponsorshipsTable({ streamId }) {\n    const [filters, setFilters] = useState({\n        expired: false,\n        inactive: false,\n        my: false,\n        noFunding: false,\n    });\n    const { orderBy = 'remainingWei', orderDirection = 'desc', setOrder, } = useTableOrder();\n    const wallet = useWalletAccount();\n    const createSponsorship = useCreateSponsorship();\n    const chainId = useCurrentChainId();\n    const query = useSponsorshipsByStreamIdQuery({\n        pageSize: PAGE_SIZE,\n        streamId,\n        orderBy,\n        orderDirection,\n        filters,\n    });\n    const sponsorships = query.data?.pages.map((page) => page.sponsorships).flat() || [];\n    return (React.createElement(NetworkPageSegment, { foot: sponsorships.length > 0, title: React.createElement(TitleBar, { aux: React.createElement(React.Fragment, null,\n                sponsorships.length > 0 && (React.createElement(React.Fragment, null,\n                    React.createElement(CreateButton, { type: \"button\", onClick: () => createSponsorship(chainId, wallet, {\n                            streamId,\n                        }), disabled: streamId == null || wallet == null }, \"Sponsor stream\"),\n                    React.createElement(Separator, null))),\n                React.createElement(SponsorshipFilterButton, { filter: filters, onFilterChange: setFilters })) }, \"Active Stream Sponsorships\") }, sponsorships.length > 0 ? (React.createElement(QueriedSponsorshipsTable, { query: query, orderBy: orderBy, orderDirection: orderDirection, onOrderChange: setOrder, hideStreamId: true })) : (React.createElement(NoDataContainer, null,\n        React.createElement(NoData, { firstLine: \"This stream does not have any Sponsorships matching your criteria yet.\", secondLine: React.createElement(\"span\", null,\n                React.createElement(\"a\", { href: R.docs('/streamr-network/incentives/stream-sponsorships'), rel: \"noopener noreferrer\", target: \"_blank\" }, \"Stream Sponsorships\"),\n                ' ',\n                \"incentivize node operators to relay the\",\n                React.createElement(\"br\", null),\n                \" stream's data, which enhances its connectability and robustness.\"), compact: true }),\n        React.createElement(CreateButton, { type: \"button\", onClick: () => {\n                createSponsorship(chainId, wallet, { streamId });\n            }, disabled: streamId == null || wallet == null }, \"Sponsor stream\")))));\n}\nconst NoDataContainer = styled.div.withConfig({ displayName: \"NoDataContainer\", componentId: \"sc-1qjm9p4\" }) `\n    display: grid;\n    padding: 80px;\n`;\nconst CreateButton = styled(Button).withConfig({ displayName: \"CreateButton\", componentId: \"sc-8kdyl5\" }) `\n    width: fit-content;\n    justify-self: center;\n`;\nconst Separator = styled.div.withConfig({ displayName: \"Separator\", componentId: \"sc-hiahbb\" }) `\n    width: 1px;\n    height: 1rem;\n    background: #f0f0f0;\n    margin: 0 8px;\n`;\n","import { StreamPermission } from '@streamr/sdk';\nimport React, { useEffect } from 'react';\nimport { Link, Navigate, Outlet, useLocation, useNavigate, useParams, } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Button } from '~/components/Button';\nimport ColoredBox from '~/components/ColoredBox';\nimport { CopyButton } from '~/components/CopyButton';\nimport { FloatingToolbar } from '~/components/FloatingToolbar';\nimport Helmet from '~/components/Helmet';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport { Pad, SegmentGrid } from '~/components/NetworkPageSegment';\nimport { StreamSummary } from '~/components/StreamSummary';\nimport { useInViewport } from '~/hooks/useInViewport';\nimport { GenericErrorPageContent } from '~/pages/GenericErrorPage';\nimport { NotFoundPageContent } from '~/pages/NotFoundPage';\nimport { DetailsPageHeader } from '~/shared/components/DetailsPageHeader';\nimport LoadingIndicator from '~/shared/components/LoadingIndicator';\nimport { StreamConnect } from '~/shared/components/StreamConnect';\nimport { StreamPreview } from '~/shared/components/StreamPreview';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport StreamNotFoundError from '~/shared/errors/StreamNotFoundError';\nimport { useCurrentStreamAbility, useInvalidateStreamAbilities, } from '~/shared/stores/streamAbilities';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { truncateStreamName } from '~/shared/utils/text';\nimport { StreamDraft, usePersistStreamDraft, useStreamEntityQuery, } from '~/stores/streamDraft';\nimport { useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nimport { AccessControlSection } from '../AbstractStreamEditPage/AccessControlSection';\nimport CreateProjectHint from '../AbstractStreamEditPage/CreateProjectHint';\nimport DeleteSection from '../AbstractStreamEditPage/DeleteSection';\nimport { HistorySection } from '../AbstractStreamEditPage/HistorySection';\nimport { InfoSection } from '../AbstractStreamEditPage/InfoSection';\nimport { PartitionsSection } from '../AbstractStreamEditPage/PartitionsSection';\nimport RelatedProjects from '../AbstractStreamEditPage/RelatedProjects';\nimport SponsorshipsTable from '../AbstractStreamEditPage/SponsorshipsTable';\nexport function StreamEditPage({ saveButtonRef, }) {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId } = StreamDraft.useEntity() || {};\n    const isNew = !streamId;\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const canDelete = useCurrentStreamAbility(streamId, StreamPermission.DELETE);\n    const canGrant = useCurrentStreamAbility(streamId, StreamPermission.GRANT);\n    const busy = StreamDraft.useIsDraftBusy();\n    const canSubmit = useCanSubmit();\n    const disabled = typeof canEdit === 'undefined' || busy;\n    const isLoading = typeof canEdit === 'undefined' || busy || fetching;\n    return (React.createElement(React.Fragment, null,\n        streamId ? React.createElement(StreamSummary, { streamId: streamId }) : React.createElement(React.Fragment, null),\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        React.createElement(LayoutColumn, null,\n            React.createElement(React.Fragment, null,\n                React.createElement(SegmentGrid, null,\n                    React.createElement(ColoredBox, null,\n                        React.createElement(Pad, null,\n                            React.createElement(Wings, null,\n                                React.createElement(\"div\", null,\n                                    React.createElement(InfoSection, { disabled: disabled }),\n                                    React.createElement(AccessControlSection, { disabled: disabled }),\n                                    React.createElement(HistorySection, { disabled: disabled }),\n                                    React.createElement(PartitionsSection, { disabled: disabled }),\n                                    canDelete && React.createElement(DeleteSection, null)),\n                                !isNew && (React.createElement(SaveButton, { kind: \"primary\", type: \"submit\", disabled: disabled || !canSubmit, ref: saveButtonRef }, \"Save\"))))),\n                    streamId != null && React.createElement(SponsorshipsTable, { streamId: streamId })),\n                streamId != null && (React.createElement(React.Fragment, null,\n                    React.createElement(RelatedProjects, { streamId: streamId }),\n                    canGrant && React.createElement(CreateProjectHint, { streamId: streamId })))))));\n}\nexport function StreamLiveDataPage() {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId = undefined } = StreamDraft.useEntity() || {};\n    const canSubscribe = useCurrentStreamAbility(streamId, StreamPermission.SUBSCRIBE);\n    const isLoading = fetching || canSubscribe == null;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        streamId != null && (React.createElement(StreamPreview, { streamsList: [streamId], previewDisabled: canSubscribe === false }))));\n}\nexport function StreamConnectPage() {\n    const { fetching = false } = StreamDraft.useDraft() || {};\n    const { id: streamId = undefined } = StreamDraft.useEntity() || {};\n    const canEdit = useCurrentStreamAbility(streamId, StreamPermission.EDIT);\n    const isLoading = fetching || canEdit == null;\n    return (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, { loading: isLoading }),\n        React.createElement(LayoutColumn, null, streamId != null && (React.createElement(React.Fragment, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(ColoredBox, null,\n                    React.createElement(Pad, null,\n                        React.createElement(StreamConnect, { streams: [streamId] })))),\n            React.createElement(RelatedProjects, { streamId: streamId }))))));\n}\n/**\n * @todo Taken care of in `app`, no? Double-check & remove.\n */\nexport function StreamIndexRedirect() {\n    const { id } = useParams();\n    if (!id) {\n        throw new Error('Invalid context (missing stream id)');\n    }\n    return (React.createElement(Navigate, { to: {\n            pathname: R.streamOverview(id),\n            search: window.location.search,\n        }, replace: true }));\n}\nexport function StreamDraftPage() {\n    const { id: streamId } = useParams();\n    const draftId = StreamDraft.useInitDraft(streamId);\n    return (React.createElement(StreamDraft.DraftContext.Provider, { value: draftId },\n        React.createElement(Outlet, null)));\n}\nexport function StreamTabbedPage(props) {\n    const { stickySubmit = false, children = React.createElement(Outlet, null) } = props;\n    const query = useStreamEntityQuery();\n    const { data: stream = null } = query;\n    const isLoading = !stream && (query.isLoading || query.isFetching);\n    const { assign } = StreamDraft.useDraftStore();\n    const draftId = StreamDraft.useDraftId();\n    const initialized = StreamDraft.useDraft()?.initialized || false;\n    useEffect(function assignEntity() {\n        if (initialized) {\n            assign(draftId, stream);\n        }\n    }, [assign, draftId, initialized, stream]);\n    return (React.createElement(StreamEntityForm, { stickySubmit: stickySubmit }, isLoading ? (React.createElement(LoadingIndicator, { loading: true })) : query.error instanceof StreamNotFoundError ? (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, null),\n        React.createElement(NotFoundPageContent, null))) : query.error ? (React.createElement(React.Fragment, null,\n        React.createElement(LoadingIndicator, null),\n        React.createElement(GenericErrorPageContent, null))) : (children)));\n}\nfunction StreamEntityForm(props) {\n    const { children, stickySubmit = false } = props;\n    const [attach, isSaveButtonVisible] = useInViewport();\n    const canSubmit = useCanSubmit();\n    const navigate = useNavigate();\n    const account = useWalletAccount()?.toLowerCase();\n    const invalidateAbilities = useInvalidateStreamAbilities();\n    const persist = usePersistStreamDraft({\n        onCreate(chainId, streamId, { abortSignal }) {\n            if (abortSignal?.aborted) {\n                /**\n                 * Avoid redirecting to the new stream's edit page after the stream\n                 * page has been unmounted.\n                 */\n                return;\n            }\n            navigate(R.streamOverview(streamId, routeOptions(chainId)));\n        },\n        onPermissionsChange(streamId, assignments) {\n            if (!account) {\n                return;\n            }\n            for (const assignment of assignments) {\n                /**\n                 * Detect if the new set of assignments affect the current user\n                 * and, if so, invalidate associated stream abilities.\n                 */\n                if ('userId' in assignment &&\n                    assignment.userId.toLowerCase() === account) {\n                    invalidateAbilities(streamId, account);\n                    break;\n                }\n            }\n        },\n    });\n    const ready = !!StreamDraft.useEntity({ hot: true });\n    return (React.createElement(\"form\", { onSubmit: (e) => {\n            e.preventDefault();\n            if (stickySubmit) {\n                persist();\n            }\n        } },\n        React.createElement(Layout, null,\n            React.createElement(Header, { saveButtonRef: attach }),\n            typeof children === 'function' ? children(attach, ready) : children),\n        React.createElement(FloatingToolbar, { \"$active\": !isSaveButtonVisible && stickySubmit && ready },\n            React.createElement(Button, { type: \"submit\", disabled: !canSubmit || isSaveButtonVisible }, \"Save\"))));\n}\nfunction useCanSubmit() {\n    const busy = StreamDraft.useIsDraftBusy();\n    const clean = StreamDraft.useIsDraftClean();\n    return !busy && !clean;\n}\nfunction Header({ saveButtonRef, }) {\n    const entity = StreamDraft.useEntity({ hot: true });\n    const { id: streamId, domain = '', pathname = '' } = entity || {};\n    const isNew = !streamId;\n    const transientStreamId = domain && pathname ? `${domain}/${pathname}` : undefined;\n    const location = useLocation();\n    const canSubmit = useCanSubmit();\n    const clean = StreamDraft.useIsDraftClean();\n    const ready = !!entity;\n    const chainKey = useCurrentChainKey();\n    return (React.createElement(React.Fragment, null,\n        React.createElement(Helmet, { title: ready ? (streamId ? `Stream ${streamId}` : 'New stream') : undefined }),\n        React.createElement(DetailsPageHeader, { backButtonLink: R.streams(routeOptions(chainKey)), pageTitle: React.createElement(TitleContainer, null,\n                React.createElement(\"span\", { title: streamId }, ready ? (streamId ? (truncateStreamName(streamId, 50)) : (transientStreamId || 'New stream')) : (React.createElement(React.Fragment, null, \"\\u200C\"))),\n                streamId ? React.createElement(CopyButton, { value: streamId }) : ''), rightComponent: streamId ? (React.createElement(Tabs, null,\n                React.createElement(Tab, { id: \"overview\", tag: Link, to: R.streamOverview(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamOverview(streamId)) },\n                    \"Stream overview\",\n                    !clean && React.createElement(Asterisk, null)),\n                React.createElement(Tab, { id: \"connect\", tag: Link, to: R.streamConnect(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamConnect(streamId)) }, \"Connect\"),\n                React.createElement(Tab, { id: \"liveData\", tag: Link, to: R.streamLiveData(streamId, routeOptions(chainKey)), selected: location.pathname.startsWith(R.streamLiveData(streamId)) }, \"Live data\"))) : isNew && ready ? (React.createElement(\"div\", null,\n                React.createElement(Button, { disabled: !canSubmit, kind: \"primary\", type: \"submit\", ref: saveButtonRef }, \"Save\"))) : null })));\n}\nconst TitleContainer = styled.div.withConfig({ displayName: \"TitleContainer\", componentId: \"sc-1vf2qaf\" }) `\n    align-items: center;\n    display: flex;\n    gap: 8px;\n`;\nconst Asterisk = styled.span.withConfig({ displayName: \"Asterisk\", componentId: \"sc-1ogoqoh\" }) `\n    :after {\n        content: '*';\n        position: absolute;\n    }\n`;\nconst SaveButton = styled(Button).withConfig({ displayName: \"SaveButton\", componentId: \"sc-12qosyl\" }) `\n    width: fit-content;\n    justify-self: right;\n`;\nconst Wings = styled.div.withConfig({ displayName: \"Wings\", componentId: \"sc-1tcavlf\" }) `\n    display: grid;\n    grid-template-columns: fit-content(680px) auto;\n\n    div:first-child {\n        min-width: 0;\n    }\n`;\n","import React, { useEffect, useState } from 'react';\nimport { Link, useNavigate, useSearchParams } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { ActionBarContainer, FiltersBar, FiltersWrap, } from '~/components/ActionBar.styles';\nimport { Button } from '~/components/Button';\nimport Layout, { LayoutColumn } from '~/components/Layout';\nimport NetworkPageSegment, { SegmentGrid, TitleBar, } from '~/components/NetworkPageSegment';\nimport { QueriedStreamsTable } from '~/components/QueriedStreamsTable';\nimport { StreamsTabOption, isStreamsTabOption, useGlobalStreamStatsQuery, useStreamsQuery, } from '~/hooks/streams';\nimport { useTableOrder } from '~/hooks/useTableOrder';\nimport { useUrlParams } from '~/hooks/useUrlParams';\nimport SearchBar, { SearchBarWrap } from '~/shared/components/SearchBar';\nimport Tabs, { Tab } from '~/shared/components/Tabs';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { COLORS, TABLET } from '~/shared/utils/styled';\nimport { useCurrentChainFullName, useCurrentChainKey } from '~/utils/chains';\nimport { Route as R, routeOptions } from '~/utils/routes';\nconst DEFAULT_ORDER_BY = 'peerCount';\nconst DEFAULT_ORDER_DIRECTION = 'desc';\nconst DEFAULT_TAB = StreamsTabOption.All;\nconst DEFAULT_SEARCH = '';\nexport function StreamsPage() {\n    const [params] = useSearchParams();\n    const [search, setSearch] = useState(params.get('search') || DEFAULT_SEARCH);\n    const tabParam = params.get('tab');\n    const tab = isStreamsTabOption(tabParam) ? tabParam : DEFAULT_TAB;\n    const navigate = useNavigate();\n    const account = useWalletAccount();\n    const chainKey = useCurrentChainKey();\n    useEffect(function changeToAllTabOnWalletLock() {\n        if (account) {\n            return;\n        }\n        navigate(R.streams(routeOptions(chainKey, { tab: StreamsTabOption.All })));\n    }, [account, navigate, chainKey]);\n    const { orderBy = DEFAULT_ORDER_BY, orderDirection = DEFAULT_ORDER_DIRECTION, setOrder, } = useTableOrder({\n        orderBy: params.get('orderBy') || DEFAULT_ORDER_BY,\n        orderDirection: params.get('orderDir') || DEFAULT_ORDER_DIRECTION,\n    });\n    useUrlParams([\n        {\n            param: 'tab',\n            value: tab,\n            defaultValue: DEFAULT_TAB,\n        },\n        {\n            param: 'search',\n            value: search,\n            defaultValue: DEFAULT_SEARCH,\n        },\n        {\n            param: 'orderBy',\n            value: orderBy,\n            defaultValue: DEFAULT_ORDER_BY,\n        },\n        {\n            param: 'orderDir',\n            value: orderDirection,\n            defaultValue: DEFAULT_ORDER_DIRECTION,\n        },\n    ]);\n    const streamsQuery = useStreamsQuery({\n        orderBy,\n        orderDirection,\n        search,\n        tab,\n    });\n    const globalStats = useGlobalStreamStatsQuery().data;\n    const globalStreamCount = tab === StreamsTabOption.All && globalStats ? globalStats.streamCount : undefined;\n    const [globalMps, globalBps] = tab === StreamsTabOption.All && globalStats\n        ? [globalStats.messagesPerSecond, globalStats.bytesPerSecond]\n        : [undefined, undefined];\n    const chainFullName = useCurrentChainFullName();\n    const [throughputMode, setThroughputMode] = useState('bps');\n    return (React.createElement(Layout, { pageTitle: \"Streams\" },\n        React.createElement(ActionBarContainer, null,\n            React.createElement(SearchBarWrap, null,\n                React.createElement(SearchBar, { value: search, onChange: (value) => void setSearch(value) })),\n            React.createElement(FiltersBar, null,\n                React.createElement(FiltersWrap, null,\n                    React.createElement(Tabs, { fullWidthOnMobile: true, selection: tab, onSelectionChange: (id) => {\n                            navigate(R.streams(routeOptions(chainKey, { tab: id })));\n                        } },\n                        React.createElement(Tab, { id: StreamsTabOption.All }, \"All streams\"),\n                        React.createElement(Tab, { id: StreamsTabOption.Your, disabled: !account, title: account\n                                ? undefined\n                                : 'Connect your wallet to view your streams' }, \"Your streams\"))),\n                React.createElement(CreateStreamButtonWrap, null,\n                    React.createElement(Button, { as: Link, to: R.stream('new', routeOptions(chainKey)) }, \"Create stream\")))),\n        React.createElement(LayoutColumn, null,\n            React.createElement(SegmentGrid, null,\n                React.createElement(NetworkPageSegment, { foot: true, title: React.createElement(TitleBar, { label: globalStreamCount, aux: React.createElement(React.Fragment, null,\n                            throughputMode === 'mps' &&\n                                typeof globalMps === 'number' && (React.createElement(ThroughputDisplay, { type: \"button\", onClick: () => {\n                                    if (typeof globalBps === 'number') {\n                                        setThroughputMode('bps');\n                                    }\n                                } },\n                                React.createElement(\"span\", null, \"Data rate\"),\n                                React.createElement(\"strong\", null,\n                                    Math.floor(globalMps),\n                                    \" msg/s\"))),\n                            throughputMode === 'bps' &&\n                                typeof globalBps === 'number' && (React.createElement(ThroughputDisplay, { type: \"button\", onClick: () => {\n                                    if (typeof globalMps === 'number') {\n                                        setThroughputMode('mps');\n                                    }\n                                } },\n                                React.createElement(\"span\", null, \"Data rate\"),\n                                React.createElement(\"strong\", null, formatBytes(globalBps))))) }, tab === StreamsTabOption.Your\n                        ? 'Your Streams'\n                        : 'All Streams') },\n                    React.createElement(QueriedStreamsTable, { onOrderChange: setOrder, orderBy: orderBy, orderDirection: orderDirection, query: streamsQuery, noDataFirstLine: `No streams found on the ${chainFullName} chain.` }))))));\n}\nfunction formatBytes(value) {\n    if (value > 1048576) {\n        return `${(value / 1048576).toFixed(3)} MB/s`;\n    }\n    if (value > 1024) {\n        return `${(value / 1024).toFixed(2)} KB/s`;\n    }\n    return `${value} B/s`;\n}\nconst LabelledThroughputDisplayMq = '(min-width: 430px)';\nconst VisibleThroughputDisplayMq = '(min-width: 400px)';\nconst ThroughputDisplay = styled.button.withConfig({ displayName: \"ThroughputDisplay\", componentId: \"sc-ekxsp4\" }) `\n    appearance: none;\n    border: 0;\n    align-items: center;\n    background: ${COLORS.secondary};\n    border-radius: 16px;\n    display: none;\n    font-size: 14px;\n    gap: 0.4em;\n    height: 32px;\n    min-width: 0;\n    padding: 0 12px;\n\n    span {\n        display: none;\n        min-width: 0;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n\n    strong {\n        white-space: nowrap;\n    }\n\n    @media ${VisibleThroughputDisplayMq} {\n        display: flex;\n    }\n\n    @media ${LabelledThroughputDisplayMq} {\n        span {\n            display: inline;\n        }\n    }\n`;\nconst CreateStreamButtonWrap = styled.div.withConfig({ displayName: \"CreateStreamButtonWrap\", componentId: \"sc-1evpq0u\" }) `\n    display: none;\n\n    @media ${TABLET} {\n        display: block;\n    }\n`;\n","import { useInfoToastEffect } from '~/hooks';\nimport { useSetSentryScopeEffect } from '~/utils/sentry';\nexport default function Globals() {\n    useInfoToastEffect();\n    useSetSentryScopeEffect();\n    return null;\n}\n","import { getGlobalScope } from '@sentry/react';\nimport { useEffect } from 'react';\nimport { useWalletAccount } from '~/shared/stores/wallet';\nimport { useCurrentChainId } from '~/utils/chains';\nexport function useSetSentryScopeEffect() {\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    useEffect(function setSentryScopeUser() {\n        getGlobalScope().setUser({ id: account });\n    }, [account]);\n    useEffect(function setSentryScopeChainId() {\n        getGlobalScope().setExtra('chainId', chainId);\n    }, [chainId]);\n}\n","import React, { useEffect, useState } from 'react';\nimport Provider from 'streamr-client-react';\nimport getClientConfig from '~/getters/getClientConfig';\nimport { useCurrentChainId } from '~/utils/chains';\nimport { getWalletProvider, useWalletAccount } from '../stores/wallet';\nexport default function StreamrClientProvider({ children }) {\n    const account = useWalletAccount();\n    const chainId = useCurrentChainId();\n    const [config, setConfig] = useState(getClientConfig(chainId));\n    useEffect(() => {\n        const newConfig = getClientConfig(chainId);\n        setConfig((current) => ({\n            ...current,\n            ...newConfig,\n        }));\n    }, [chainId]);\n    useEffect(() => {\n        let mounted = true;\n        async function fn() {\n            if (!account) {\n                return;\n            }\n            try {\n                const provider = await getWalletProvider();\n                if (!mounted) {\n                    return;\n                }\n                setConfig((current) => ({\n                    ...current,\n                    auth: {\n                        ...(current.auth || {}),\n                        ethereum: provider,\n                    },\n                }));\n            }\n            catch (e) {\n                console.warn('Failed to update config', e);\n            }\n        }\n        fn();\n        return () => {\n            mounted = false;\n        };\n    }, [account]);\n    return React.createElement(Provider, { ...config }, children);\n}\n","import { CodeSnippet } from '@streamr/streamr-layout';\nimport JavaScript from 'react-syntax-highlighter/dist/esm/languages/prism/javascript';\nimport Java from 'react-syntax-highlighter/dist/esm/languages/prism/java';\nimport Python from 'react-syntax-highlighter/dist/esm/languages/prism/python';\nimport Bash from 'react-syntax-highlighter/dist/esm/languages/prism/bash';\nCodeSnippet.registerLanguages(JavaScript, Java, Python, Bash);\n","import '@ibm/plex/css/ibm-plex.css';\nimport { NavProvider } from '@streamr/streamr-layout';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport React from 'react';\nimport { createBrowserRouter, Navigate, Route, RouterProvider, Routes, } from 'react-router-dom';\nimport styled from 'styled-components';\nimport { Container } from 'toasterhea';\nimport '~/analytics';\nimport GenericErrorPage from '~/pages/GenericErrorPage';\nimport { NetworkOverviewPage } from '~/pages/NetworkOverviewPage';\nimport NotFoundPage from '~/pages/NotFoundPage';\nimport { OperatorPage } from '~/pages/OperatorPage';\nimport { OperatorsPage } from '~/pages/OperatorsPage';\nimport ProjectListingPage from '~/pages/ProjectListingPage';\nimport { ExistingProjectPageWrap, NewProjectPage, ProjectConnectPage, ProjectDraftPage, ProjectIndexRedirect, ProjectLiveDataPage, ProjectOverviewPage, ProjectTabbedPage, } from '~/pages/ProjectPage';\nimport { SingleSponsorshipPage } from '~/pages/SingleSponsorshipPage';\nimport { SponsorshipsPage } from '~/pages/SponsorshipsPage';\nimport { StreamConnectPage, StreamDraftPage, StreamEditPage, StreamIndexRedirect, StreamLiveDataPage, StreamTabbedPage, } from '~/pages/StreamPage';\nimport { StreamsPage } from '~/pages/StreamsPage';\nimport '~/shared/assets/stylesheets';\nimport Globals from '~/shared/components/Globals';\nimport StreamrClientProvider from '~/shared/components/StreamrClientProvider';\nimport { Provider as ModalProvider } from '~/shared/contexts/ModalApi';\nimport { Provider as ModalPortalProvider } from '~/shared/contexts/ModalPortal';\nimport { getQueryClient } from '~/utils';\nimport { Layer } from '~/utils/Layer';\nimport { Route as R } from '~/utils/routes';\nimport '~/utils/setupSnippets';\nimport ProjectEditorPage from './pages/ProjectPage/ProjectEditorPage';\nconst Root = () => (React.createElement(Providers, null,\n    React.createElement(Globals, null),\n    React.createElement(Routes, null,\n        React.createElement(Route, { errorElement: React.createElement(GenericErrorPage, null) },\n            React.createElement(Route, { path: \"/hub/projects\" },\n                React.createElement(Route, { index: true, element: React.createElement(ProjectListingPage, null) }),\n                React.createElement(Route, { element: React.createElement(ProjectDraftPage, null) },\n                    React.createElement(Route, { path: \"new\", element: React.createElement(NewProjectPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(ExistingProjectPageWrap, null) },\n                        React.createElement(Route, { index: true, element: React.createElement(ProjectIndexRedirect, null) }),\n                        React.createElement(Route, { path: \"edit\", element: React.createElement(ProjectEditorPage, null) }),\n                        React.createElement(Route, { element: React.createElement(ProjectTabbedPage, null) },\n                            React.createElement(Route, { path: \"overview\", element: React.createElement(ProjectOverviewPage, null) }),\n                            React.createElement(Route, { path: \"connect\", element: React.createElement(ProjectConnectPage, null) }),\n                            React.createElement(Route, { path: \"live-data\", element: React.createElement(ProjectLiveDataPage, null) }))))),\n            React.createElement(Route, { path: \"/hub/streams\" },\n                React.createElement(Route, { index: true, element: React.createElement(StreamsPage, null) }),\n                React.createElement(Route, { element: React.createElement(StreamDraftPage, null) },\n                    React.createElement(Route, { path: \"new\", element: React.createElement(StreamTabbedPage, { stickySubmit: true }, (attach, ready) => ready ? (React.createElement(StreamEditPage, { saveButtonRef: attach })) : null) }),\n                    React.createElement(Route, { path: \":id\" },\n                        React.createElement(Route, { index: true, element: React.createElement(StreamIndexRedirect, null) }),\n                        React.createElement(Route, { path: \"overview\", element: React.createElement(StreamTabbedPage, { stickySubmit: true }, (attach, ready) => ready ? (React.createElement(StreamEditPage, { saveButtonRef: attach })) : null) }),\n                        React.createElement(Route, { element: React.createElement(StreamTabbedPage, null) },\n                            React.createElement(Route, { path: \"connect\", element: React.createElement(StreamConnectPage, null) }),\n                            React.createElement(Route, { path: \"live-data\", element: React.createElement(StreamLiveDataPage, null) }))))),\n            React.createElement(Route, { path: \"/hub/network\" },\n                React.createElement(Route, { index: true, element: React.createElement(Navigate, { to: {\n                            pathname: R.sponsorships(),\n                            search: window.location.search,\n                        }, replace: true }) }),\n                React.createElement(Route, { path: \"operators\" },\n                    React.createElement(Route, { index: true, element: React.createElement(OperatorsPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(OperatorPage, null) })),\n                React.createElement(Route, { path: \"sponsorships\" },\n                    React.createElement(Route, { index: true, element: React.createElement(SponsorshipsPage, null) }),\n                    React.createElement(Route, { path: \":id\", element: React.createElement(SingleSponsorshipPage, null) })),\n                React.createElement(Route, { path: \"overview\", element: React.createElement(NetworkOverviewPage, null) })),\n            React.createElement(Route, { path: \"/\", element: React.createElement(Navigate, { to: R.operators(), replace: true }) }),\n            React.createElement(Route, { path: \"/hub\", element: React.createElement(Navigate, { to: {\n                        pathname: R.operators(),\n                        search: window.location.search,\n                    }, replace: true }) }),\n            React.createElement(Route, { path: \"/error\", element: React.createElement(GenericErrorPage, null) }),\n            React.createElement(Route, { path: \"*\", element: React.createElement(NotFoundPage, null) }),\n            \",\")),\n    React.createElement(ModalContainer, { id: Layer.Modal }),\n    React.createElement(ToastContainer, { id: Layer.Toast })));\nexport default App;\nconst ModalContainer = styled(Container).withConfig({ displayName: \"ModalContainer\", componentId: \"sc-1e1q2t1\" }) `\n    position: relative;\n    z-index: 11;\n`;\nconst ToastContainer = styled(Container).withConfig({ displayName: \"ToastContainer\", componentId: \"sc-u4zp2e\" }) `\n    bottom: 0;\n    left: 0;\n    max-width: 100%;\n    padding-bottom: 24px;\n    padding-right: 24px;\n    position: fixed;\n    z-index: 12;\n`;\nfunction Providers({ children }) {\n    return (React.createElement(NavProvider, null,\n        React.createElement(StreamrClientProvider, null,\n            React.createElement(ModalPortalProvider, null,\n                React.createElement(ModalProvider, null, children)))));\n}\nconst router = createBrowserRouter([\n    { path: '*', element: React.createElement(Root, null), errorElement: React.createElement(GenericErrorPage, null) },\n]);\nfunction App() {\n    return (React.createElement(QueryClientProvider, { client: getQueryClient() },\n        React.createElement(RouterProvider, { router: router })));\n}\n","import React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport App from '~/app';\nconst container = document.getElementById('root');\nconst root = createRoot(container);\nif (container) {\n    root.render(React.createElement(App, null));\n}\nelse {\n    throw new Error('Root element could not be found.');\n}\n","import { BN } from '~/utils/bn';\nBN.config({\n    DECIMAL_PLACES: 18,\n    EXPONENTIAL_AT: BN.config().RANGE,\n});\n","import { getGlobalScope, init } from '@sentry/react';\nif (process.env.SENTRY_DSN) {\n    init({\n        dsn: process.env.SENTRY_DSN,\n        release: process.env.VERSION,\n        environment: process.env.SENTRY_ENVIRONMENT,\n        debug: true,\n    });\n    getGlobalScope().setExtras({\n        '@streamr/sdk': process.env.STREAMR_SDK_VERSION,\n        '@streamr/config': process.env.STREAMR_CONFIG_VERSION,\n    });\n}\n","// You should init the Sentry browser SDK as soon as possible during your application load up, before initializing React\n// https://docs.sentry.io/platforms/javascript/react/\nimport '~/analytics';\nimport packageLock from '../../../package-lock.json';\nconst navigator = global.navigator || {};\nconst streamrClientVersion = packageLock.packages['node_modules/@streamr/sdk']\n    .version;\nglobal.streamr = Object.assign(global.streamr || {}, {\n    info() {\n        const info = {\n            userAgent: navigator.userAgent,\n            environment: process.env.NODE_ENV,\n            streamrClientVersion,\n        };\n        const version = process.env.GIT_VERSION || '';\n        const branch = process.env.GIT_BRANCH || '';\n        const isMaster = branch === 'master';\n        // version e.g. v2.0.5-926-g7e20dd2eb\n        const [versionNumber, , hash] = version.split('-');\n        // hash minus leading 'g', not shown on master\n        const displayHash = isMaster ? '' : hash && hash.slice(1);\n        // don't show branch if master\n        let displayBranch = branch === 'master' ? '' : branch;\n        // replace hyphen in branch name with non-breaking hyphen\n        displayBranch = branch.replace(/-/g, '‑');\n        return {\n            ...info,\n            version: versionNumber,\n            branch: displayBranch,\n            hash: displayHash,\n        };\n    },\n});\n","import BN from 'bignumber.js';\nexport { BN };\nexport function toBN(value) {\n    return typeof value === 'bigint' ? toBN(value.toString()) : new BN(value);\n}\nexport function toBigInt(value, decimals = 0n) {\n    try {\n        return BigInt(toBN(value)\n            .multipliedBy(toBN(10n ** decimals))\n            .toFixed(0));\n    }\n    catch (_) {\n        console.warn('Failed to convert BigNumberish value to BigInt. Using 0n.', value);\n    }\n    return 0n;\n}\nexport function toFloat(value, decimals) {\n    return toBN(value).dividedBy(toBN(10n ** decimals));\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"https://cdn.streamr.com/\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkcore_frontend\"] = self[\"webpackChunkcore_frontend\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\n__webpack_require__.O(undefined, [436], () => (__webpack_require__(47855)))\n__webpack_require__.O(undefined, [436], () => (__webpack_require__(8945)))\nvar __webpack_exports__ = __webpack_require__.O(undefined, [436], () => (__webpack_require__(43600)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","module","exports","MD","REGULAR","MEDIUM","SANS","PHONE","TABLET","LAPTOP","DESKTOP","MAX_BODY_WIDTH","COLORS","primary","primaryLight","primaryContrast","primaryDisabled","secondary","secondaryHover","secondaryLight","focus","click","selection","disabled","section","inputBackground","radioBorder","close","link","linkInactive","error","warning","dialogBorder","black","active","greenSpinner","spinnerBorder","activeBackground","alertInfoBackground","alertErrorBackground","alertSuccessBackground","SecondaryText","Border","Background","Text","rotate","keyframes","SpinnerRoot","div","withConfig","displayName","componentId","$animate","css","Spinner","coverage","fixed","color","size","sizeProp","strokeWidth","innerRef","props","r","d","Math","PI","ringColor","strokeColor","ring","stroke","ref","style","width","height","viewBox","cx","cy","fill","strokeLinecap","strokeDasharray","strokeDashoffset","Button","button","attrs","children","waiting","outline","onClick","kind","tabIndex","e","preventDefault","currentTarget","HTMLElement","blur","Buttonesque","$css","EmptyState","image","className","linkOnMobile","Root","ImageWrap","LinkWrap","svg","CircleIcon","xmlns","transform","fillRule","defaultProps","PinIcon","ArrowIcon","ArrowHeadIcon","LongArrowIcon","DefaultPath","path","sources","back","strokeLinejoin","backArrow","clipRule","forward","caretUp","caretDown","disconnect","tick","exclamation","cross","crossMedium","crossHeavy","linkOut","play","pause","minus","minusSmall","plus","plusSmall","user","userFull","checkmark","checkmarkOutline","opacity","checkMarkMono","refresh","circle","pin","arrow","longArrow","arrowhead","keyboard","x","y","rx","share","emptyAvatarUpload","profileMan","ry","hamburger","search","questionMark","outlineQuestionMark","outlineQuestionMark2","lockOutline","lock","lockClosed","checkBadgeOutline","checkBadge","checkBadgeHD","dropPlus","infoBadge","warnBadge","errorBadge","clear","trash","brevetDown","transfer","dataUnion","DATA","DATAColor","ETH","fillOpacity","DAI","unknownToken","console","copy","alarmBell","product","id","xlinkHref","mask","stream","clipboardPlus","clipboardCheck","expand","list","listInspect","listSettings","page","fullScreen","clipPath","externalLink","pencil","pencilFull","eye","ellipse","email","zoomOut","zoomIn","faders","github","medium","peepeth","reddit","telegram","trello","twitter","youtube","linkedin","instagram","facebook","web","xCom","SvgIcon","name","Object","keys","sort","RejectionReason","CloseButton","Symbol","Backdrop","EscapeKey","CancelButton","BackButton","isRejectionReason","value","CodedError","z","object","code","number","isCodedError","safeParse","success","ObjectWithMessage","message","string","isMessagedObject","isTransactionRejection","test","bringIn","bringOut","fadeAway","BaseModal","darkBackdrop","onBeforeAbort","onReject","onResolve","_","dismissed","dismiss","useReducer","rootRef","useRef","discard","current","root","addEventListener","animationName","getName","wigglyRef","tweenRef","reason","beforeAbort","kill","gsap","to","duration","onUpdate","wiggly","p","this","progress","intensity","sin","wave","closeRef","useEffect","onKeyDown","key","window","removeEventListener","NoScrollStyles","onMouseDown","OuterWrap","InnerWrap","Pad","Interactive","AnimatedWrap","Wigglable","createGlobalStyle","$dismissed","$dark","Footer","$borderless","$spacious","$autoHeight","LightModal","title","Head","Title","type","Content","Layer","address0","DayInSeconds","defaultChainKey","formatConfigUrl","url","options","protocol","dockerHost","includes","replace","ChainConfigExtension","coingeckoNetworkId","optional","dataUnionJoinServerUrl","dataunionGraphNames","array","chainId","default","ipfs","apiSecretKey","ipfsGatewayUrl","ipfsUploadEndpoint","projectId","marketplaceChains","networkSubgraphUrl","slug","sponsorshipPaymentToken","storageNodes","address","refine","thirdPartyUrl","streamIndexerUrl","fallbackChainConfigExtension","parse","parsedChainConfigExtension","record","union","undefined","draft","values","forEach","extension","lowerCasedChainKeyToChainKeyMap","getChainKey","candidate","toLowerCase","chainKey","isChainKey","warn","getCurrentChain","getChainConfig","URLSearchParams","location","get","getCurrentChainId","useCurrentChain","chainName","useMemo","useCurrentChainId","useCurrentChainKey","useCurrentChainFullName","getChainDisplayName","chainKeyToChainEntryMap","getChainEntry","config","configExtension","entry","rpc","rpcEndpoints","entryPoints","entrypoint","websocket","host","theGraphUrl","chainIdOrChainKey","getChainConfigExtension","getChainSlug","chainEntry","prototype","hasOwnProperty","call","getMarketplaceChainConfigs","marketplaceChainKeys","result","push","routeOptions","hash","chain","withSuffix","pathname","qs","stringify","encode","uriComponent","encodeURIComponent","Route","allowanceInfo","blog","contactGeneral","contactJobs","contactLabs","contactMedia","createOperator","docs","giveFeedback","hub","network","networkExplorer","networkOverview","operator","operators","privacyPolicy","project","projectConnect","projectEdit","projectLiveData","projectOverview","projects","publisherTerms","resetAllowanceInfo","siteAbout","siteDataToken","siteDataUnions","siteDesign","siteEcosystem","siteFund","siteMarketplace","siteNetwork","sitePapers","siteRoadmap","siteTokenMigration","streamConnect","streamLiveData","streamOverview","streams","sponsorship","sponsorships","tos","DisclaimerBar","href","target","rel","async","pop","MadeBy","LayoutFooter","FooterColumns","separate","topBorder","FooterColumn","SocialChannels","PosterUrl","description","otherTags","filter","Boolean","join","content","property","NetworkHelmet","Anchor","indicateOrigin","translate","component","Component","componentProps","display","useBoundingClientRect","rect","createPortal","document","getElementById","OriginIndicator","resizeSubscribe","cb","Point","JSON","useSyncExternalStore","getBoundingClientRect","$display","SimpleDropdown","detached","menu","menuWrapComponent","MenuWrap","SimpleDropdownMenu","onToggle","align","isOpen","setIsOpen","useState","toggle","useCallback","menuRef","contains","onToggleRef","stopPropagation","body","onFocus","posRef","scrollY","dx","maxWidth","clientWidth","documentElement","min","round","myWidth","SimpleDropdownRoot","top","left","$disabled","$visible","SimpleListDropdownMenu","DefaultSimpleDropdownMenu","EnvironmentConfig","availableChains","defaultChain","platformOriginUrl","streamrUrl","rest","availableChainConfigs","map","fallbackEnvironmentConfig","parsedConfig","NODE_ENV","actualEnvironment","process","env","icons","emptyIcon","alt","src","String","DraftValidationError","Error","constructor","super","captureStackTrace","setPrototypeOf","ValidationError","messages","ParseError","entity","_abi","anonymous","inputs","indexed","internalType","outputs","stateMutability","_bytecode","MarketplaceV4__factory","args","length","getDeployTransaction","overrides","deploy","connect","runner","createInterface","bytecode","abi","RemoteMarketplaceV1__factory","Uniswap2AdapterV4__factory","_marketplace","_projectRegistry","_uniswapRouter","_deployedOnDomainId","components","ProjectRegistryV1__factory","ProjectStakingV1__factory","constant","payable","Token__factory","getContractAbi","contractKey","getContractAddress","addressKey","contracts","StreamrConfig","MarketplaceV4","RemoteMarketplaceV1","MarketplaceV3","OperatorFactory","ProjectRegistryV1","OperatorDefaultDelegationPolicy","OperatorDefaultExchangeRatePolicy","OperatorDefaultUndelegationPolicy","SponsorshipDefaultLeavePolicy","SponsorshipFactory","SponsorshipMaxOperatorsJoinPolicy","SponsorshipStakeWeightedAllocationPolicy","SponsorshipVoteKickPolicy","StreamRegistry","StreamStorageRegistry","DataUnionFactory","graphClients","getGraphClient","graphClient","ApolloClient","uri","getGraphUrl","cache","defaultUrl","customUrl","dataUnionGraphClients","indexerGraphClients","getIndexerClient","client","getClientConfig","mods","chainConfig","metrics","controlLayer","ethereumNetwork","rpcs","streamRegistryChainAddress","streamStorageRegistryChainAddress","BehindIndexError","expectedBlockNumber","actualBlockNumber","prehandleBehindBlockError","blockRegexp0","blockRegexp1","Number","match","AbiChanged_OrderBy","Account_OrderBy","AddrChanged_OrderBy","Aggregation_Interval","AuthorisationChanged_OrderBy","ContenthashChanged_OrderBy","DomainEvent_OrderBy","Domain_OrderBy","ExpiryExtended_OrderBy","FusesSet_OrderBy","InterfaceChanged_OrderBy","MulticoinAddrChanged_OrderBy","NameChanged_OrderBy","NameRegistered_OrderBy","NameRenewed_OrderBy","NameTransferred_OrderBy","NameUnwrapped_OrderBy","NameWrapped_OrderBy","NewOwner_OrderBy","NewResolver_OrderBy","NewTtl_OrderBy","OrderDirection","PubkeyChanged_OrderBy","RegistrationEvent_OrderBy","Registration_OrderBy","ResolverEvent_OrderBy","Resolver_OrderBy","TextChanged_OrderBy","Transfer_OrderBy","VersionChanged_OrderBy","WrappedDomain_OrderBy","WrappedTransfer_OrderBy","_SubgraphErrorPolicy_","GetEnsDomainsForAccountDocument","Delegation_OrderBy","DelegatorDailyBucket_OrderBy","Delegator_OrderBy","Flag_OrderBy","Network_OrderBy","Node_OrderBy","OperatorDailyBucket_OrderBy","Operator_OrderBy","ProjectPaymentDetails_OrderBy","ProjectPermission_OrderBy","ProjectPurchase_OrderBy","ProjectStakeByUser_OrderBy","ProjectStakingDayBucket_OrderBy","ProjectSubscription_OrderBy","Project_OrderBy","QueueEntry_OrderBy","SlashingEvent_OrderBy","SponsoringEvent_OrderBy","SponsorshipDailyBucket_OrderBy","Sponsorship_OrderBy","Stake_OrderBy","StakingEvent_OrderBy","StreamPermission_OrderBy","Stream_OrderBy","Vote_OrderBy","StakeFieldsFragmentDoc","SponsorshipFieldsFragmentDoc","OperatorFieldsFragmentDoc","ProjectFieldsFragmentDoc","StreamFieldsFragmentDoc","SponsorshipDailyBucketFieldsFragmentDoc","SponsoringEventFieldsFragmentDoc","OperatorDailyBucketFieldsFragmentDoc","DelegatorDailyBucketFieldsFragmentDoc","GetAllOperatorsDocument","SearchOperatorsByMetadataDocument","GetOperatorByIdDocument","GetOperatorsByDelegationDocument","GetOperatorsByDelegationAndIdDocument","GetOperatorsByDelegationAndMetadataDocument","GetOperatorByOwnerAddressDocument","GetOperatorsByOwnerOrControllerAddressDocument","GetAllSponsorshipsDocument","GetSponsorshipsByCreatorDocument","GetSponsorshipByIdDocument","GetSponsorshipByStreamIdDocument","GetProjectDocument","GetProjectsDocument","GetProjectsByTextDocument","GetProjectSubscriptionsDocument","GetStreamByIdDocument","GetPagedStreamsDocument","GetSponsorshipDailyBucketsDocument","GetSponsoringEventsDocument","GetOperatorDailyBucketsDocument","GetDelegatorDailyBucketsDocument","GetMetadataDocument","GetNetworkStatsDocument","Parsable","raw","preparsed","preparse","getValue","parser","cachedValue","RawOperatorMetadata","SyntaxError","unknown","catch","pipe","imageIpfsCid","redundancyFactor","linkedIn","UrlParser","OperatorMetadata","ZodError","trim","v","imageUrl","coerce","int","RawOperator","contractVersion","controllers","cumulativeOperatorsCutWei","cumulativeProfitsWei","dataTokenBalanceWei","delegations","delegatorCount","exchangeRate","metadataJsonString","nodes","operatorsCutFraction","operatorTokenTotalSupplyWei","owner","queueEntries","slashingEvents","stakes","totalStakeInSponsorshipsWei","valueUpdateBlockNumber","valueUpdateTimestamp","valueWithoutEarnings","Operator","arguments","_shares","addr","enabled","persisted","null","delegator","operatorTokenBalanceWei","latestDelegationTimestamp","earliestUndelegationTimestamp","amount","multipliedBy","metadata","operatorsCut","toNumber","date","entries","queuedAt","Date","events","sponsorshipId","streamId","amountWei","earningsWei","joinTimestamp","isRunning","boolean","remainingWei","minimumStakingPeriodSeconds","spotAPY","projectedInsolvency","s","isSponsorshipPaying","joinedAt","operatorId","projectedInsolvencyAt","apy","_apy","getSpotApy","wallet","getDelegatedAmountForWallet","RawSponsorship","cumulativeSponsoring","minOperators","maxOperators","operatorCount","remainingWeiUpdateTimestamp","totalPayoutWeiPerSec","totalStakedWei","Sponsorship","Infinity","remainingBalanceWei","remainingBalanceUpdatedAt","spotApy","lockedWei","payoutPerSecond","payoutPerDay","timeCorrectedRemainingBalanceWeiAt","timestampInMillis","time","secondsElapsed","max","getTime","toastIn","toastSqueeze","toastOut","AbstractToast","hidden","hide","squeezed","squeeze","setHeight","mountedAtRef","performance","now","setTimeout","useLayoutEffect","$hidden","$squeezed","ToastType","Toast","Info","desc","okLabel","cancelLabel","canSubmit","autoCloseAfter","autoCloseAfterProp","Processing","timeoutId","clearTimeout","Form","onSubmit","Success","IconWrap","label","Warning","Body","Buttons","Dot","form","$color","ProjectType","TheGraph","ChartPeriod","providers","getPublicProvider","provider","getStreamrClientInstance","newProvider","getSigner","toast","t","successToast","errorToast","vet","validationErrorToast","index","DEFAULT_OPERATOR_ORDER_BY","Id","DEFAULT_SPONSORSHIP_ORDER_BY","DEFAULT_ORDER_DIRECTION","Asc","getProjectRegistryContract","getERC20TokenContract","tokenAddress","getMarketplaceContract","getAllowance","account","recover","allowance","getProjectTypeName","projectType","DataUnion","OpenData","PaidData","getProjectTypeTitle","getProjectImageUrl","getParsedSponsorshipById","force","minBlockNumber","rawSponsorship","data","query","variables","fetchPolicy","getOperatorsByDelegation","first","skip","orderBy","orderDirection","getParsedOperatorByOwnerAddress","getParsedOperatorsByOwnerOrControllerAddress","queryResult","getParsedOperators","getter","rawOperators","mapper","yearlyIncome","reduce","sum","isEqualTo","dividedBy","find","getDelegationFractionForWallet","offset","total","getSelfDelegationFraction","getTimestampForChartPeriod","period","end","SevenDays","clone","subtract","OneMonth","ThreeMonths","OneYear","YearToDate","startOf","All","utc","getNetworkStats","stats","totalStake","sponsorshipsCount","operatorsCount","networks","parseNetworkStats","getOperatorDailyBuckets","dateLowerThan","date_lt","dateGreaterEqualThan","date_gte","batchSize","where","operator_","operatorDailyBuckets","getSponsorshipDailyBuckets","sponsorship_","sponsorshipDailyBuckets","getDelegatorDailyBuckets","delegatorId","delegatorDailyBuckets","ensApolloClient","getENSDomainsForWallet","domains","wrappedDomains","getDescription","streamalike","TimeoutError","useIsMounted","Inner","Panel","Link","TitleBar","connectModal","connectDeferral","setConnectDeferral","connecting","setError","isMounted","reject","useWalletAccount","Logo","deferral","currentAccount","Promise","race","getWalletAccount","promise","_resolve","Auth","LoadingIndicator","loading","PanelRow","Header","SignInMethod","theme","themes","Icon","Metamask","Break","freeze","break","FlagBusy","providerPromise","getWalletProvider","resolve","isMetaMask","getWalletWeb3Provider","retry","signer","getAddress","f","promiseMap","Map","accounts","request","method","existingPromise","set","delete","useWalletStore","lastKnownAccount","ensLookups","onAccountsChange","ens","ensName","next","on","isLoading","useIsWalletLoading","DefaultActions","actions","visible","linkTo","spinner","cn","Tag","ButtonWithMinWidth","as","browserNotSupported","srcSet","discardChanges","imageUpload","metamask","publishFailed","walletNoData","walletNoEth","walletError","txFailed","PngIcon","names","Modal","getChainName","some","SwitchNetworkModal","expectedChainId","actualChainId","P","cancel","add","getChainId","getNetwork","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","networkPreflight","params","toString","rpcUrls","nativeCurrency","blockExplorerUrls","blockExplorerUrl","StreamrClient","getStreamrClient","transactional","ethereum","auth","Raw","decorated","assign","Copy","Exchanges","truncate","input","truncateLongerThan","pickFirst","pickLast","regex","RegExp","substr","substring","parseStreamId","truncateStreamName","streamName","limit","separatorIndex","indexOf","addressPart","namePart","truncateStartingWithTheAddressPart","truncateStartingWithTheNamePart","shortenedAddressPart","truncateAddressPart","truncateNamePart","shortenedNamePart","StreamParser","or","parseStream","permissionAssignments","storage","permissions","assignment","userId","memo","permission","Bits","domain","parseStreamMetadata","partitions","DELETE","EDIT","GRANT","PUBLISH","SUBSCRIBE","setBits","bitsA","bitsB","unsetBits","matchBits","storageDays","inactivityThresholdHours","PathnameSchema","superRefine","ctx","addIssue","fatal","ZodIssueCode","custom","NEVER","InsufficientFundsError","StreamNotFoundError","mapping","getBalance","walletAddress","balanceOf","requirePositiveBalance","getEmptyDraft","abandoned","dirty","cold","hot","errors","fetching","initialized","persisting","createDraftStore","useDraftStore","isPersisting","draftId","drafts","setDraft","update","store","updater","isEqual","idMap","init","setErrors","teardown","onlyAbandoned","abandon","persist","fn","abortSignal","bind","issues","validate","validator","useStore","DraftContext","createContext","useDraftId","useContext","useDraft","useIsDraftClean","useIsDraftBusy","useBoundDraft","entityId","useEntity","useIsAnyDraftBeingPersisted","useIsFetchingEntity","usePersist","abortControllerRef","abortController","AbortController","abort","fnRef","signal","usePersistCallback","busy","clean","aborted","onDone","onError","useSetDraftErrors","useUpdateEntity","useValidateEntity","validatorRef","useInitDraft","recycledDraftId","generator","deps","generatorRef","useId","prefix","DefaultIdGenerator","TransactionListToast","operations","Container","state","action","Action","Item","Name","ActionWrap","IconContainer","li","$complete","$ongoing","toastedOperation","toastedOperations","op","pos","notify","StreamDraft","getEmptyStreamEntity","formatStorageOperationLabel","NewStreamLink","getOpenStreamLink","decodeURIComponent","getCryptoModal","tokenName","MenuItem","isSelected","MenuItemContainer","Menu","chains","selectedChain","setSearchParams","MenuContainer","ChainGrid","c","prev","fromEntries","Toggle","$isOpen","Caret","infoToast","useConfigValueFromChain","setValue","transformRef","mounted","newValue","updatedAt","contract","obj","getConfigValueFromChain","useMediaQuery","subscribe","matchMedia","matches","useRequestedBlockNumber","blockNumber","useLatestBehindBlockError","isSuccess","behindBlockErrorRef","useInitialBehindIndexError","resetDeps","errorRef","resetKey","resetKeyRef","useRefetchQueryBehindIndexEffect","isBehindError","refetch","confirmationModal","proceedLabel","isDangerous","ModalBody","Description","DecisionButtons","DecisionButton","$isDangerous","Alert","AlertWrap","AlertIcon","StyledIcon","StyledSpinner","$type","SliderRoot","ACTIVE","SUCCESS","CAUTION","ERROR","PROCESSING","DEFAULT","$wrap","FormModal","submitLabel","submitting","ok","FormModalRoot","FormModalHead","FormModalTitle","FormModalCloseButton","FormModalContent","SectionHeadline","h4","Hint","Section","Prop","em","$invalid","PropValue","PropList","ul","GroupHeadline","h2","Group","WingedLabelWrap","ErrorWrap","ErrorLabel","TextInput","TextareaInput","textarea","$minHeight","TextareaCounter","span","Appendix","TextAppendix","FieldWrap","$grayedOut","$top","$bottom","$padded","CopyButtonWrapAppendix","IconWrapAppendix","MaxButton","MAX_WIDTH","file","editorRef","sliderValue","setSliderValue","onSave","blob","cropInfo","imageElement","createElement","onload","canvas","cropCanvasContext","getContext","drawImage","resizedCanvas","resizedCanvasContext","toBlob","getCroppedAndResizedBlob","getCroppingRect","File","AvatarEditorWrap","StyledAvatarEditor","border","borderRadius","scale","ZoomControls","ZoomIcon","ZoomSlider","onChange","ButtonsContainer","StyledButton","$mask","onChangeProp","borderPercentage","parseInt","background","Tooltip","anchorDisplay","scrollSpy","TooltipComponent","onMouseEnter","onMouseLeave","setMounted","animated","setAnimated","TooltipRoot","onTransitionEnd","propertyName","HTMLDivElement","getComputedStyle","visibility","TooltipBody","Indicator","TooltipContent","TooltipIconWrap","$svgSize","QuestionMarkIcon","PropertyDropdown","onDismiss","toggleIcon","valuePlaceholder","open","setOpen","displayValue","Value","PropertyPopover","placeholder","required","valueProp","bodyRef","onDismissRef","Element","PropertyPopoverRoot","PropertyPopoverBody","Optional","InputWrap","Input","autoFocus","EnterButton","Submit","PlusIcon","dark","$active","$unset","PropertyDropdownList","toArray","PropertyDisplay","icon","toggleProps","PropertyIcon","RequestError","res","statusCode","response","status","getError","defaultOptions","headers","requestOptions","axios","postImage","username","password","FormData","append","uploadResult","Hash","onReceipt","replaceable","getBlockNumber","tx","replaceableTransaction","receipt","wait","cancelled","replacement","getOperatorDelegationAmount","balanceInData","DefaultImagePlaceholder","DefaultImagePlaceholderRoot","FallbackImage","unloader","Identicon","AvatarImage","upload","initials","split","slice","toUpperCase","HubAvatar","HubImageAvatar","cropModal","Validator","cut","imageToUpload","instanceof","literal","operatorModal","setBusy","currentData","nextData","updateNextData","changelog","randomAddress","fileInputRef","imageBlob","URL","createObjectURL","resetError","newErrors","existingErrors","finalData","readonlyCut","hasUpdateCutOperation","hasUpdateMetadataOperation","blockNumbers","operatorContract","updateOperator","blockNo","waitForIndexedBlock","factory","poolTokenName","operatorMetadata","policies","policyParams","sleep","readOnly","AlertContainer","step","AboutOperator","AboutOperatorField","pick","AvatarField","AvatarDisplayContainer","OperatorAvatar","AvatarPlaceholder","accept","files","ButtonIcon","AvatarRequirements","AvatarImageStyles","img","blockObservers","getBlockObserver","blockObserver","lastKnownBlockNumber","pending","emitter","started","once","failureCount","idleCount","consecutiveChangeCount","_meta","meta","block","emit","off","onIndexedBlock","ensureGasMonies","waitForPurchasePropagation","attempts","fromBlock","i","queryFilter","filters","Subscribed","millis","goBack","idx","history","onBeforeNavigate","getQueryClient","queries","throwOnError","SiSymbol","defaultFractionLength","integral","abbr","fractionalLength","stripFractionalZeros","dp","isFinite","sign","isLessThan","fractional","abs","fracLength","Array","frac","saveOperator","invalidateActiveOperatorByIdQueries","invalidateQueries","exact","queryKey","refetchType","invalidateAllOperatorsQueries","invalidateDelegationsForWalletQueries","getStreamGptApiUrl","getTokenInfo","tokenInfo","fetchQuery","tokenInfoQueryParams","symbol","useTokenInfo","useQuery","queryFn","contact","decimals","staleTime","gcTime","getCachedTokenInfo","getQueryData","getSponsorshipTokenInfo","useSponsorshipFundingHistoryQuery","pageSize","currentChainId","useInfiniteQuery","skippedElements","sponsoringEvents","event","sponsor","format","getSponsoringEvents","pageParam","initialPageParam","getNextPageParam","lastPage","SponsorshipPaymentTokenName","useSponsorshipTokenInfo","Decimals","abbrProp","tooltip","unit","humanAmount","SponsorshipDecimals","unitSuffix","Tick","$checked","noop","checked","SponsorshipDisclaimer","checkboxState","onCheckboxStateChange","joinSponsorshipAsOperator","useJoinSponsorshipAsOperator","useOperatorForWalletQuery","StyledAlert","Confirm","htmlFor","mapStream","publisherCount","subscriberCount","counts","perm","subscribeExpiration","publishExpiration","calculatePubSubCount","getPagedStreams","lastId","orderOperator","graphOrderDirection","Desc","permissions_","stream_contains_nocase","hasNextPage","splice","prepareStreamResult","userAddress","DropdownMenuItem","highlight","highlightOnFocus","onKeyDownProp","onKeyDownToNextButton","onKeyDownToPrevButton","ItemRoot","el","b","parentElement","nextElementSibling","querySelector","previousElementSibling","withPrevButton","ReturnIconWrap","$highlightOnFocus","$highlight","StreamIdDropdown","onBlur","onBlurProp","onFocusProp","inputRef","listRef","queryValue","streamIds","inputFocused","setInputFocused","StreamDropdownMenuWrap","SpinnerWrap","shortStreamId","Zero","getSponsorshipStakeForOperator","stake","isSponsorshipFundedByOperator","operatorStake","getSponsorshipExtensionInDays","dailyPayoutRate","MinNumberOfOperatorsParser","gte","isSafeInteger","CreateSponsorshipForm","initialAmount","bigint","gt","minStakeDuration","minNumberOfOperators","maxNumberOfOperators","useUncollectedEarningsStore","updateEarnings","earnings","lastUpdatedTimestamp","lastSyncTimestamp","fetch","operatorAddress","addresses","getSponsorshipsAndEarnings","uncollectedEarnings","changePerSecond","myStake","totalPayoutPerSecond","myPayoutPerSecond","getEarningsForSponsorships","operatorEarnings","elapsedInSeconds","sponsorshipEarnings","stakeOnSponsorship","toastLabel","getState","forceUnstakeFromSponsorship","streamNotFoundToaster","createSponsorshipModal","balance","streamIdProp","confirmState","setConfirmState","setStreamId","rawInitialAmount","setRawInitialAmount","rawDailyPayoutRate","setRawDailyPayoutRate","rawMinStakeDurationInDays","setRawMinStakeDurationInDays","rawMinNumberOfOperators","setRawMinNumberOfOperators","backdropDismissable","extensionInDays","insufficientFunds","tooLowOperatorCount","formData","invalidMinStakeDuration","maxPenaltyPeriodInDays","tooLongMinStakeDuration","limitedSpace","potentialStreamId","checkIfStreamExists","payoutRatePerSecond","minStakeDurationInSeconds","defaultAbiCoder","policy","param","token","rawReceipt","interface","logs","item","eventName","createSponsorship","toFixed","EmptyStake","editStakeModal","leavePenalty","availableBalance","lockedStake","globalMinimumStakeWei","minimumStakeWei","a","currentAmount","rawAmount","setRawAmount","minLeaveDate","hasUndelegationQueue","difference","isAmountWithinAcceptedRange","slashingAmount","targetAmount","reduceStakeOnSponsorship","slashingReason","pluralizeUnit","fundSponsorshipModal","pricePerSecond","extensionInSeconds","extensionDuration","extensionText","asSeconds","years","months","days","hours","minutes","startDate","endDate","fundSponsorship","useInterceptHeartbeats","heartbeats","setHeartbeats","cacheKey","onMessage","msg","parsedContent","getParsedContent","messageId","arg","HeartbeatMessage","peerDescriptor","applicationVersion","timestamp","nodeId","msgType","nativeEnum","port","tls","openInternet","region","useOperatorLiveNodes","count","setIsLoading","detectedAny","transitionTime","StyledCaretIcon","StyledDropdownIndicator","DropdownIndicator","StyledCloseIcon","StyledOptionAfter","StyledOption","Option","SelectedWhiteOption","StyledWhiteDropdownOption","selectProps","menuIsOpen","isDisabled","whiteVariant","ClearIndicator","SelectField2","isClearable","noShrink","fullWidth","selected","setSelected","defaultStyles","control","styles","isFocused","styleObject","backgroundColor","fontWeight","transition","cursor","boxShadow","flexWrap","getControlStyles","position","fontSize","lineHeight","getPlaceholderStyles","singleValue","overflow","getSingleValueStyles","marginTop","padding","getMenuStyles","menuList","getMenuListStyles","menuPortal","zIndex","option","getOptionStyles","clearIndicator","getClearIndicatorStyles","whiteVariantStyles","getWhitePlaceholderStyles","borderColor","getWhiteControlStyles","getWhiteMenuStyles","getWhiteMenuListStyles","getWhiteOptionStyles","isSearchable","onMenuOpen","onMenuClose","IndicatorSeparator","menuPortalTarget","copyToast","useCopy","isCopied","setIsCopied","copiedAt","touch","NEGATIVE_INFINITY","onAfterCopied","toastMessage","timeout","normalizeVersion","ver","NaN","parts","part","num","isNaN","humanFormat","diff","divisor","val","humanize","durationSeconds","durationMs","limitErrorToaster","requiredNodeVersion","LiveNodesAndVersionCheck","liveNodesCountLoading","liveNodesCount","hasWaitedForHeartbeats","setHasWaitedForHeartbeats","timer","heartbeat","every","version","requiredVersion","major","minor","patch","requiredMajor","requiredMinor","requiredPatch","isNodeVersionGreaterThanOrEqualTo","LinkIcon","StyledLabelWrap","joinSponsorshipModal","preselectedOperator","operatorChoices","useAllOperatorsForWalletQuery","setSelectedOperator","operatorBalance","liveNodesOk","minimumSelfDelegationFraction","minimumSelfDelegationAmount","earlyLeaverPenaltyWei","ownerDelegationPercentage","currentSelfDelegationAmount","isBelowSelfFundingLimit","isAboveMinimumStake","defaultValue","o","selectedOp","Flag","isDelegatingFunds","isUndelegatingFunds","isCreatingSponsorship","isFundingSponsorship","isJoiningSponsorshipAsOperator","isEditingSponsorshipFunding","flagKey","useFlagStore","flags","wrap","useIsFlagged","useFlagger","getSponsorshipsAndParse","rawSponsorships","useSponsorshipsForCreatorQuery","searchQuery","creator","expired","inactive","my","noFunding","includeInactive","includeWithoutFunding","includeExpiredFunding","hasOperatorId","whereFilters","remainingWei_gt","projectedInsolvency_gt","floor","stakes_","operator_contains_nocase","getSponsorshipsByCreator","mapSponsorshipOrder","placeholderData","useAllSponsorshipsQuery","getAllSponsorships","useSponsorshipsByStreamIdQuery","getSponsorshipsByStreamId","useCreateSponsorship","withFlag","invalidateSponsorshipQueries","useSponsorshipDailyBucketsQuery","dataSource","selectedPeriod","ignoreToday","start","unix","maxAmount","maxIterations","elements","partialResult","bucket","yValue","pow","getSponsorshipStats","useFundSponsorshipCallback","onJoin","useEditSponsorshipFunding","sponsorshipOrSponsorshipId","getLeavePenalty","getSponsorshipLeavePenalty","columnKey","OperatorCount","TotalStakedWei","SpotApy","ProjectedInsolvency","TotalPayoutWeiPerSec","RemainingWei","invalidator","invalidateSponsorshipsForCreatorQueries","invalidateAllSponsorshipsQueries","invalidateSponsorshipByIdQueries","invalidateSponsorshipDailyBucketsQueries","invalidateSponsorshipFundingHistoryQueries","invalidateSponsorshipsByStreamIdQueries","StreamDescription","setDesc","getStreamDescription","OperatorIdCell","operatorName","truncateProp","OperatorIdCellRoot","OperatorAvatarWrap","OperatorName","$truncate","DeletedStreamIdCell","StreamInfoCell","StreamAvatarWrap","StreamInfoCellOuter","StreamIdWrap","StreamIdCell","imageUrlQuery","resp","imageHash","json","useStreamImageUrlQuery","isFetching","StreamDescriptionWrap","FundedUntilCell","remainingBalance","Iconized","isValid","SponsorshipApyCell","NumberOfOperatorsCell","currentOperatorId","joinedByCurrentOperator","Radio","disabledReason","handleChange","RadioLabel","LoadMoreButton","Meatball","layout","vertical","propsToCss","WrappedComponent","FlushHistoryDecoratorWrapperFR","forwardRef","blurCount","setBlurCount","flushHistoryOnBlur","OnCommitDecoratorWrapperFR","noEmptyCommit","onCommit","onCommitProp","smartCommit","valueRef","requireChanged","sanitise","normalize","HTMLInputElement","HTMLTextAreaElement","sanitizeValue","RevertOnEscapeDecoratorWrapperFR","revertOnEscape","SelectAllOnFocusDecoratorWrapperFR","select","selectAllOnFocus","StyledInput","invalid","EnhancedText","fns","reduceRight","acc","cur","compose","tag","unstyled","BucketType","DataUnionStatsBucket_OrderBy","DataUnion_OrderBy","MemberStatus","Member_OrderBy","RevenueEvent_OrderBy","DataUnionFieldsFragmentDoc","GetDataUnionsOwnedByDocument","getDataUnionsOwnedByInChain","origin","getDataUnionGraphClient","dataUnions","du","getDataUnionClient","joinServerUrl","providerUrl","startsWith","isProviderInCorrectChain","privateKey","factoryAddress","getDataUnion","dataUnionId","getDataUnionAdminFeeForSalePoint","salePoint","beneficiary","domainId","getAdminFee","getDataUnionAdminFee","Transaction","onTransactionHash","onTransactionComplete","deployDataUnion","productId","adminFee","duAddress","dataUnionName","contractAddress","errorHandler","timeUnits","second","minute","hour","day","week","month","timeUnitSecondsMultiplierMap","getFormattedChainNameFromContext","SalePointsPayload","beneficiaryAddress","price","pricingTokenAddress","timeUnit","OpenDataPayload","newImageToUpload","termsOfUse","commercialUse","redistribution","reselling","termsName","termsUrl","salePoints","DataUnionPayload","merge","parseFloat","PaidDataPayload","enabledSalePoints","PublishableProjectPayload","momentDurationFormatsByTimeUnit","abbrMapping","toSeconds","quantity","formatDateTime","timezone","convertPrice","roundingMode","BN","ROUND_HALF_UP","valueAmount","valueUnit","targetQuantity","targetUnit","prepareProjectResult","results","mapProject","getProjectFilter","Open","paymentDetails_","Paid","pricePerSecond_gt","isDataUnion","canGrant","streams_contains","getProjects","getPublishableProjectProperties","payload","domainIds","paymentDetails","currentPricePerSecond","contactDetails","existingImageIpfsCid","formatMetadata","contractCurrencies","USD","PRODUCT_DEFINED","paymentCurrencies","maxFileSizeForImageUpload","getMostRelevantTimeUnit","formatPrice","currency","actualTimeUnit","timeUnitAbbreviation","getAbbreviation","roundedPrice","bn","lt","decimalPlaces","formatDecimals","actualSymbol","ParsedPaymentDetail","ProjectParser","canBuy","canDelete","canEdit","getEmptySalePoints","marketplaceChainConfigs","getEmptyParsedProject","chainIdProp","getParsedProjectById","payment","secondPayment","isOpenData","multiplier","parseAsync","parseProject","getTokenLogoUrl","tokenContractAddress","getCoingeckoNetworkId","Circle","tokenColor","isDark","cssColor","intToRGB","str","charCodeAt","hashCode","charAt","Image","logoUrl","imgSrc","useImage","useSuspense","srcList","isAbandonment","Host","Unmount","Update","Column","ScrollableContent","Nav","BackButtonIcon","Actions","ProjectModal","backable","closeOnEscape","PeriodContainer","DetailsContainer","Chain","ChainIcon","ChainName","Amount","AmountBoxInner","AmountBox","AmountScrollable","AmountBarInner","AmountBar","Currency","AccessPeriodModal","tokenDecimals","tokenSymbol","usdRate","rawLength","setRawLength","selectedUnit","setSelectedUnit","totalInUSD","isSubmitting","setIsSubmitting","exceedsAllowance","animation","$loading","AccessingProjectModal","Box","Explainer","AllowanceModal","chainIdToNetworkMapping","$selected","Placeholder","getPurchasePreconditions","paymentDetail","getUsdRate","ChainSelectorModal","chainIds","selectedChainId","selectedChainIdProp","selectChainId","preconditions","ConfirmPurchaseModal","FailedPurchaseModal","PurchaseCompleteModal","usePurchaseStore","inProgress","subscriptions","fetchingSubscriptions","fetchSubscriptions","getProjectSubscriptions","invalidateSubscription","purchase","projectChainId","isInProgress","preselectedChainId","skipChainSelector","chainSelectorResult","accessPeriod","initialAccessRange","allowanceModal","startOver","bail","setAllowance","seconds","buy","confirmPurchaseModal","accessingProjectModal","buyPromise","gasLimit","usePurchaseCallback","useIsProjectBeingPurchased","ProjectDraft","shouldUpdateAdminFee","requiresAdminFeeUpdate","shouldUpdateMatadata","eq","setAdminFee","minimumSubscriptionSeconds","updateProject","shouldDeployDataUnion","requiresDataUnionDeployment","deployDataUnionContract","isPublicPurchasable","createProject","useIsAccessibleByCurrentWallet","hasActiveProjectSubscription","endTimestamp","useHasActiveProjectSubscription","isProjectOwnedBy","usePersistProjectCallback","navigate","BeneficiaryAddressEditor","accountAddress","AddressItem","ActionsToggle","NoData","firstLine","secondLine","compact","EmptyStateWrap","EmptyStateParagraph","horizontalPaddingMobile","horizontalPaddingDesktop","actionPadding","ScrollTableCellsWrap","stickyColumnCount","nonStickyColumnCount","ScrollTableColumn","$actionColumn","ScrollTableNonStickyColumnsWrap","ScrollTableHeaderCell","$align","$pointer","$actionCell","ScrollTableCell","$hover","OrderCaretIcon","$direction","FloatingLoadingIndicator","NoDataWrap","ScrollTable","footerComponent","hasMoreResults","onLoadMore","tableProps","ScrollTableCore","columns","noDataFirstLine","noDataSecondLine","onOrderChange","linkMapper","actualColumns","isSticky","stickyColumns","column","nonStickyColumns","hoveredRowIndex","setHoveredRowIndex","hasOrderingEnabled","stickyColumn","sortable","OrderCaret","element","valueMapper","nonStickyColumn","actionIndex","callback","isStakedLongEnough","forceUndelegateModal","selectedSponsorshipId","setSelectedSponsorshipId","requestedAmount","getOptimalStake","selectedSponsorship","willSlash","isPartialPayout","ForceUndelegateFormModal","TableWrap","WarningCell","undelegateFundsModal","delegatedTotal","isOwner","amountLabel","totalLabel","subtitlePartial","pastAction","maxUndelegationQueueDays","freeFunds","hasZeroDeployed","minimumSelfDelegationPercentage","isSelfDelegationTooLow","isGreaterThan","isTooEarlyToUndelegate","undelegateFromOperator","allOperators","useOperatorByIdQuery","getOperatorById","useDelegationsForWalletQuery","addressProp","searchQueryProp","mapOperatorOrder","getOperatorsByDelegationAndId","getOperatorsByDelegationAndMetadata","useAllOperatorsQuery","searchOperatorsByMetadata","getAllOperators","delegateFundsModal","minimumDelegationWei","minimumDelegationSeconds","selfDelegationFraction","nextSelfDelegationFraction","tooLowCurrentSelfDelegation","isLessThanOrEqualTo","tooLowNextSelfDelegation","tooLowOwnerSelfDelegation","maxNextAmount","operatorSelfStake","getSelfDelegatedAmount","delegateToOperator","ValueWithoutEarnings","TotalStakeInSponsorshipsWei","OperatorsCutFraction","useCollectEarnings","fetchUncollectedEarnings","sponsorshipIds","collectEarnings","useProcessUndelegationQueue","processOperatorUndelegationQueue","Username","Avatarless","source","CaretDownIcon","CaretUpIcon","DropdownToggle","TextMenuItem","UserInfoMenuItem","MenuDivider","Divider","WalletAddress","SignedInUserMenu","NavDropdown","Navbar","MenuGrid","NavLink","NavbarItem","LinkWrapper","UnstyledNavbarLink","NavbarLinkDesktop","NavbarLinkMobile","$bottomBorder","NavbarItemAccount","LogoLink","Avatar","MenuItemAvatarContainer","UserInfoMobile","Dropdown","timeoutRef","show","immediately","isNetworkTabActive","NetworkNavItems","DropdownItem","linkFn","Subtitle","subtitle","networkLinks","TickIcon","NetworkAccordion","Wings","networkNavElement","NetworkMobileLink","NetworkNavElement","$flipped","DesktopNav","useEns","operatorQuery","isOperatorFetching","isMobile","menuAlignment","edge","alignMenu","nodeco","HamburgerButton","idle","MobileNav","NavOverlay","NavContainer","isAnyDraftBeingPersisted","N","shadow","Layout","footer","nav","columnize","pageTitle","innerBackgroundColor","outerBackgroundColor","rootBackgroundColor","rootComponent","LayoutRoot","outerComponent","Outer","LayoutOuter","innerComponent","LayoutInner","pathnameRef","scroll","useScrollToTop","GlobalStyles","LayoutColumn","main","$bg","GenericErrorPage","ParseErrorPage","GenericErrorPageContent","SecondaryP","isPreventable","defaultPrevented","Tab","isTab","child","$flexBasis","ItemContent","Trolley","$animated","Rails","Tabs","onSelectionChange","selectionProp","spreadEvenly","fullWidthOnMobile","smallPadding","tabs","selectedId","_tag","windowWidth","setWindowWidth","onResize","outerWidth","elementSettersRef","setElement","setElementAt","setter","newElements","w","canAnimate","enableAnimation","_selected","otherArgs","preventable","ChartPeriodTabs","isChartPeriod","NetworkChartDisplay","periodTabs","sourceTabs","SetSelector","ChartPeriodWrap","$backgroundColor","$borderColor","$pad","NetworkPageSegment","bodyComponent","BodyComponent","foot","headerComponent","HeaderComponent","RootComponent","Foot","SegmentGrid","aux","TitleBarRoot","Lhs","TitleBarLabel","Rhs","QueriedSponsorshipsTable","hideStreamId","pages","flat","editSponsorshipFunding","isFetchingNextPage","maxOperatorsReached","fetchNextPage","Separator","StatGrid","$desktopColumnCount","maxColumns","StatCell","tip","StatCellRoot","StatCellLabel","StatCellBody","StatCellContent","TipWrap","NoWalletOverlay","resourceName","WalletPass","roundBorders","locked","$roundBorders","$blur","StreamOrderBy","GetStreamsDocument","GetGlobalStreamsStatsDocument","GetNeighborsDocument","NoDataContainer","SpinnerContainer","CustomCursor","setSelectedPointValues","setSelectedPointValuesRef","CustomTooltipContainer","CustomTooltip","valuePrefix","labelFormatter","valueFormatter","NetworkChart","graphData","xAxisDisplayFormatter","yAxisAxisDisplayFormatter","tooltipLabelFormatter","tooltipValueFormatter","tooltipValuePrefix","noDataText","chartData","crossHairY","setCrossHairY","crossHairX","setCrossHairX","updateCrossHairCoordinates","xValue","ResponsiveContainer","LineChart","Line","dataKey","dot","activeDot","isAnimationActive","CartesianGrid","XAxis","tickFormatter","tickMargin","tickLine","minTickGap","interval","YAxis","orientation","ReferenceLine","formatShortDate","formatLongDate","NetworkOverviewPage","NetworkStats","MyOperatorSummary","MyDelegationsSummary","MyDelegations","MySponsorships","statsQuery","operatorCountQuery","uniquenessGate","MessagesPerSecond","breakEarly","items","messagesPerSecond","useActiveOperatorCountQuery","numOfDelegators","numOfSponsorships","useOperatorStatsForWallet","chartPeriod","setChartPeriod","chartId","setChartId","endOf","buckets","toValue","cumulativeEarningsWei","chartLabel","newChartId","setStats","minApy","maxApy","numOfOperators","POSITIVE_INFINITY","useDelegationsStats","chartDataSource","setChartDataSource","dailyDelegationChartQuery","totalValueDataWei","getDelegationStats","flatMap","NotFoundPage","NotFoundPageContent","fullChainName","AddressType","dialogTitleMap","Node","Automation","dialogSubmitLabelMap","AddressTable","disableEditing","onAddAddress","onRemoveAddress","Address","PolBalance","PendingIndicator","node","addAddressModal","newAddress","$new","setAddress","isValidAddress","LowBalanceThreshold","setBalance","newBalance","lowBalance","PolBalanceRoot","PendingIndicatorRoot","useSubmitNodeAddressesCallback","onSuccess","setOperatorNodeAddresses","useSubmitControllerAddressesCallback","addNew","CONTROLLER_ROLE","addOperatorControllerAddress","removeOperatorControllerAddress","BehindBlockErrorDisplay","latest","initial","initialBlockNumber","completed","togo","Blocks","useOperatorReachabilityStore","updateProbe","probes","reachable","probe","IPv4RegExp","IPv6RegExp","LiveNodesTable","hit","truncateNodeId","Connectivity","useIsNodeIdReachable","NetworkActionBarBackLink","NetworkActionBarBackButtonIcon","NetworkActionBarTitle","NetworkActionBarStatsTitle","OperatorActionBar","delegateFunds","useDelegateFunds","useIsUndelegatingFundsToOperator","undelegateFunds","useUndelegateFunds","canUndelegateQuery","canUndelegate","delegateLabel","undelegateLabel","OperatorActionBarRoot","Wrap0","Wrap1","getFinalKey","useBlockNumberDependenciesStore","dependencies","setDependency","finalKey","OperatorChecklist","funded","nodesDeclared","nodesFunded","nodesReachability","nodesRunning","stale","awaitedBlockNumber","useIsWaitingForBlockNumber","setNodesFunded","isLoadingLiveNodes","reachability","nodeIds","numOfReachableNodes","useOperatorReachability","nodeAddress","useOperatorChecklist","nodesReachable","ChecklistItem","stateProp","ChecklistItemRoot","IconButton","CopyIcon","ExternalLinkIcon","$width","$height","CopyButton","OperatorDetails","OperatorDetailsRoot","OperatorMetadataWrap","Addresses","AddressDisplay","OperatorVersionBadge","CtaWrap","InfoWrap","SideImageMq","$noDesc","AddressDisplayRoot","AddressDisplayLabel","AddressDisplayValue","OperatorSummary","liveNodeCount","liveNodeCountIsLoading","OperatorSummaryRoot","SponsorshipTable","isController","canCollect","useCanCollectEarningsCallback","allSponsorshipIds","canCollectAllEarnings","minimumStakeReachTime","isAfter","fromNow","UncollectedEarnings","setInterval","clearInterval","useUncollectedEarnings","getUndelegationExpirationDate","maxUndelegationQueueSeconds","UndelegationQueue","forceUndelegate","processUndelegationQueue","undelegationQueueSize","lookup","calculateUndelegationQueueSize","isProcessButtonDisabled","ProcessQueueButton","Badge","expirationDate","isBefore","defaultChartData","defaultPersistedNodes","defaultPersistedControllers","OperatorPage","initialBehindBlockError","behindBlockError","slashingFraction","selectedDataSource","setSelectedDataSource","setSelectedPeriod","chartQuery","getOperatorStats","myDelegationAmount","myDelegationPercentage","persistedNodes","setNodes","saveNodeAddresses","isSavingNodeAddresses","persistedControllers","setControllers","saveControllers","isSavingControllerAddresses","setBlockDependency","saveNodeAddressesCb","newAddresses","n","saveControllerAddressesCb","isNew","OperatorVersionNotice","ChartGrid","DelegationCell","SlashingHistoryTableContainer","NodeAddressHeader","NoticeBar","NoticeWrap","notice","FormWrapper","SearchInput","SearchIcon","ClearButton","debounceTime","focused","setFocused","inputValue","setInputValue","debouncedChangeHandler","searchValue","SearchBarWrap","NetworkActionBarWrap","NetworkActionBar","searchEnabled","onSearch","leftSideContent","rightSideContent","useTableOrder","order","setOrder","direction","currentOrder","currentOrderBy","newOrderBy","currentOrderDirection","newDirection","getNextSortingParameters","useUrlParams","searchParams","needsUpdate","currentParams","currentValue","targetValue","prevParams","newParams","TabOption","DEFAULT_ORDER_BY","DEFAULT_TAB","AllOperators","OperatorsPage","isWalletLoading","tab","selectedTab","setSearchQuery","allOperatorsQuery","myDelegationsQuery","currentQuery","OperatorsTable","DelegationsTable","chainFullName","FiltersBar","FiltersWrap","DropdownFilters","SelectFieldWrap","MobileFilterWrap","MobileFilterText","CreateProjectButton","ActionBarContainer","TimeUnitOptions","isTokenInfoCached","SalePointTokenSelector","onSalePointChange","dataTokenAddress","useDataToken","setUseDataToken","isLoadingTokenInfo","rawPrice","setRawPrice","customTokenAddress","setCustomTokenAddress","isCustomTokenInfoCached","canFetchTokenInfo","commitNewPrice","RadioButton","DataTokenIcon","CustomTokenAddressInputContainer","autoComplete","SetTokenContainer","PriceContainer","PriceInputWrap","TokenSymbol","SelectContainer","SalePointOption","multiSelect","DropdownWrap","RadioCircle","ToggleText","PlusSymbol","DropdownOuter","DropdownInner","$open","NamedMetadata","isNamedMetadata","DataUnionOption","setDataUnionId","deployNew","setDeployNew","setDataUnions","isLoadingDataUnions","canUseExisting","updateSalePoint","updateSalePointRef","foundDataUnions","getMetadata","DeployList","SelectWrap","newDataUnionId","projectTypeFilterModal","localValue","setLocalValue","productTypeOptions","Any","Owned","ActionBar","onCreateProject","onFilterChange","scope","walletAccount","MobileFilterTrigger","ratio","_width","_block","defaultStreamStats","latency","peerCount","getStreamStats","neighbors","streamPartitionId","streamPart","nodeId1","nodeId2","streamPartId","finalStreamPartitionId","rtt","pair","nodeId0","getNeighbors","validRTTs","calculateLatencyForStream","SingleBadge","BadgeContainer","right","bottom","DataUnionBadge","memberCount","linkHref","BadgeLink","StatsBadge","StreamStatsBadge","all","curr","useMultipleStreamStatsQuery","formattedMsgRate","Secondary","skeletonize","Img","TileThumbnail","loader","Tile","suppressHover","EditButton","TileImageContainer","autoSize","autoSizeProp","MarketplaceProductTile","showDataUnionBadge","showEditButton","DottedLoadingIndicator","DottedLoadingIndicatorRoot","Left","Right","NoProductsView","noOwnProjects","MarketplaceProjectRow","$fetching","ProjectsContainer","Projects","loadProducts","hasMoreSearchResults","currentUserAddress","isEditable","ModalContext","closeModal","modals","openModal","useModalContext","setModals","modalId","prevModals","nextModals","ModalContextProvider","Provider","useModal","api","PageTitleContainer","PageTitle","ProductChoices","Product","ProductTitle","ProductImage","RadioWrap","NoStreamsWarningBox","ButtonContainer","defaultContext","isModalOpen","registerModal","unregisterModal","ModalPortalContext","ModalPortalProvider","setState","render","NoModalRootError","__proto__","ModalPortal","componentDidMount","modalRoot","context","appendChild","componentWillUnmount","removeChild","contextType","getApplicationElement","Fullpage","noScroll","onClose","backdropClassName","fullpage","otherProps","modalClassName","StyledProjectTypeChooser","selectedProductType","setSelectedProductType","gotAnyStreams","useGotAnyStreams","CreateProjectModal","filterReducer","partial","proposalState","ProjectListingPage","DefaultFilter","setFilter","createProductModal","text","projectSearch","getProjectsByText","StreamsTabOption","getStreamsFromIndexer","streamIdsOption","nextPageParam","pageId","PeerCount","BytesPerSecond","bytesPerSecond","getStreamsFromGraph","orderDirectionParam","id_in","id_lt","getStatsFromPermissions","useStreamsQuery","Your","isIndexerColumn","QueriedStreamsTable","streamStats","setStreamStats","indexerQueryErrored","isError","onOrderChangeRef","StreamStatsLoader","onStats","mps","bps","streamIdsRef","onStatsRef","TermsOfUse","permitted","flag","notPermitted","permittedStr","getTermStrings","notPermittedStr","termNames","ids","mobileSpacing","tabletSpacing","desktopSpacing","ProjectHeroContainer","overflowVisible","ProjectHeroImageStyles","ProjectHeroImage","noBorderRadius","ProjectHeroTitleStyles","ProjectHeroTitle","h1","ProjectHeroMetadataContainer","ProjectHero2","descriptionProp","MarkdownWrap","DetailsPageHeader","backButtonLink","rightComponent","DetailsPageHeaderBackground","DetailsPageHeaderContainer","DetailsPageHeaderBar","LeftSideContainer","BackLink","RightSideContainer","pad","Segment","accountKey","permissionKey","useStreamAbilitiesStore","toggleFetching","fetchPermission","streamrClient","pkey","getStream","hasPermission","public","allowPublic","group","invalidate","useStreamAbility","useCurrentStreamAbility","stripIndent","minIndent","Snippet","createClient","lightNodeHeader","lightNodeSubscribe","lightNodePublish","websocketHeader","websocketPublish","websocketSubscribe","httpSubscribe","httpPublish","mqttHeader","mqttSubscribe","mqttPublish","StreamConnect","setSelectedStream","setAction","nodeType","setNodeType","currentProtocol","setCurrentProtocol","hasPublicPubPermission","hasPublicSubPermission","lightNodeSnippet","websocketSnippet","httpSnippet","mqttSnippet","currentBrokerSnippet","Grid","StreamConnectHeader","StreamConnectText","SnippetSelectorContainer","StreamConnectLightNodeSnippetContainer","CodeSnippet","language","StreamConnectSnippetCopyContainer","BrokerNodeSnippetContainer","onSelect","RightColumn","StreamConnectLink","MarketplaceTheme","DefaultTheme","Errors","_theme","overlap","_overlap","Fragment","inspectorWidth","Pusher","ModalContainer","HeaderTitle","StreamsList","StreamName","SelectorWrapper","ModalStreamSelector","selectedStream","StreamSelectorModal","closeOnEsc","Selector","prevOption","nextOption","SettingsButton","LG","Toolbar","onPartitionChange","onSettingsButtonClick","partition","inspectorFocused","LeftFiller","RightFiller","Row","Viewport","Side","ToolbarContainer","tz","guess","TooltipTheme","BottomTheme","StreamSelectorContainer","StreamSelector","DesktopStreamSelector","MobileStreamSelector","DesktopToolbar","Feed","errorComponent","streamData","streamLoaded","onStreamChange","datapoint","setDatapoint","selectedMsgId","selectedTimestamp","rowRef","copyText","streamOptions","onCopyClick","prevRow","msgId","Parent","placement","k","inlineCharacterLimit","formatValue","Cell","InspectorButton","StreamPreview","streamsList","activePartition","preselectedStreamId","previewDisabled","setInspectorFocused","selectedStreamId","setSelectedStreamId","setPartition","setStream","setPartitions","activeFn","activeFnProp","onErrorProp","tail","cacheRef","setData","onErrorRef","dataPoint","getTimestamp","areMessagesSame","toMessageRef","compareTo","unshift","firstRunRef","useStreamData","partitionCount","loadStreamData","partitionOptions","ProjectPermission","useProjectAbilitiesStore","fetchPermissions","getPermission","getProjectPermissions","pkay","useCurrentProjectAbility","Buy","Delete","Edit","Grant","useProjectAbility","FormattedPaymentRate","AccessManifest","firstSalePoint","otherSalePoints","hasAccess","isBeingPurchased","GetAccessContainer","GetAccess","projectName","ProjectLinkTabs","termsUrlError","Checkboxes","TickButton","Links","DataUnionFee","emptyProject","coldProject","DataUnionPayment","RichMarkdownEditor","defaultTheme","toolbarBackground","toolbarHoverBackground","toolbarItem","defaultDisabledExtensions","RichTextEditor","disableExtensions","ImageFilePicker","onDrop","getRootProps","getInputProps","isDragActive","maxSize","maxFiles","onDropAccepted","onDropRejected","ImageFilePickerRoot","Wide","CoverImage","Dropzone","Mobile","Desktop","Preview","EditorHero","newImageUrl","setNewImageUrl","imageAbortControllerRef","HeroContainer","NameInput","croppedFile","reader","FileReader","readAsDataURL","onerror","getBase64ForFile","DetailsWrap","newDescription","FloatingToolbar","isSSR","IntersectionObserver","useInViewport","setTarget","targetRef","inViewport","setInViewport","observerRef","isIntersecting","observer","observe","unobserve","FlexNavbar","FlexNavbarItem","EditorNav","attach","isSaveButtonVisible","StyledContainer","preserveSpace","TableGrid","Table","TableHeader","TableRows","rowCount","TableRow","GridCell","onlyDesktop","onlyTablet","notOnTablet","flex","NoStreams","StreamDetails","StreamId","StreamSelectTable","loadMore","selectedStreams","setSelectedStreams","allSelected","setAllSelected","emitSelectedStreamsChange","selectedStreamsArray","handleSelectChange","newSelectedStreams","handleSelectAllChange","shouldAllBeChecked","EmptyStreams","EditorStreams","projectStreams","setSearchValue","foundStreams","setFoundStreams","setPage","hasMore","phrase","onlyPublic","getStreamsOwnedBy","searchValueRef","startAt","is","EmptySalePoints","EmptyErrors","ProjectEditorPage","existingSalePoints","beneficiaryErrorKey","beneficiaryInvalid","newSalePoint","errors0","deleteProject","$desktopMaxWidth","ProjectDraftPage","NewProjectPage","preselectSalePoint","ExistingProjectPageWrap","projectQuery","useProjectByIdQuery","ProjectOverviewPage","StreamTable","ProjectConnectPage","ProjectLiveDataPage","ProjectTabbedPage","ProjectTitle","ProjectIndexRedirect","streamsQuery","AddressLabel","AddressContent","Banner","AboutSponsorship","ActionBarButtonBody","$background","ActionBarButtonRoot","ActionBarButton","ActionBarButtonInnerBody","ActionBarButtonCaret","$invert","ActionBarWalletDisplay","AbstractActionBar","fallbackBackButtonUrl","buttons","ctas","summaryTitle","summary","ActionsOuterWrap","Ctas","SponsorshipActionBar","canEditStake","isPaying","fundedUntil","detailedFundedUntil","useIsFundingSponsorship","JoinAsOperatorButton","walletLocked","SponsorshipSummary","minimumStakingDays","SponsorshipSummaryRoot","EmptyArray","SingleSponsorshipPage","sponsorshipQuery","useSponsorshipByIdQuery","tooltipPrefix","formatTooltipValue","formatYAxisValue","fundingEventsQuery","operational","rawFundingEvents","fundingEvents","MinOperatorCountNotReached","OperatorSpinner","OperatorListWrap","OperatorList","OperatorListHeader","OperatorListItem","defaultFilters","SponsorshipFilterButton","ToggleOption","ToggleLabel","DropdownMenu","ToggleContainer","AllSponsorships","SponsorshipsPage","initialFilters","has","setFilters","allSponsorshipsQuery","mySponsorshipsQuery","useIsCreatingSponsorshipForWallet","Stat","StatRoot","StatName","StatValue","Dimm","ButtonGrid","StreamStats","useStreamStatsQuery","StreamStatsRoot","StreamSummary","streamSummaryQuery","about","rank","schema","tags","usage","useStreamSummaryQuery","info","StreamSummaryRoot","OuterWings","StreamSummarySection","ai","AboutWrap","StreamImage","AboutWrapInner","Tags","InnerWings","scrollMode","Schema","SchemaPair","SchemaKey","IFrameWrap","StreamSummarySectionRoot","StreamSummarySectionInner","StreamSummarySectionHeader","AiGenerated","StreamSummarySectionBody","AiGeneratedRoot","x1","y1","x2","y2","gradientUnits","stopColor","PictureOnSideMedia","MapToSideMedia","$scrollMode","h3","TitleWrapper","TitleText","operationName","publicKey","uniqueKey","ev","permissionBits","ethereumAddressRegex","hexStringRegex","zeroAddressRegex","NewStreamPermissionsModal","onBeforeSubmit","setPermissionBits","setPublicKey","normalizedPublicKey","bits","PermissionItem","Labels","YouLabel","DropdownCaret","PermissionList","permissionList","StreamType","StreamTypeSelector","streamType","Private","PublicSubscribe","PublicPubSub","RadioContainer","AccessControlSection","disabledProp","TextContainer","CreateButton","CreateProjectHint","setProjects","loadProjects","DeleteSection","deleteStream","StorageNodeItem","HistorySection","noStorageEnabled","StorageNodeList","TextFieldWrap","Surround","head","customStyles","provided","backfaceVisibility","pointerEvents","letterSpacing","dropdownIndicator","marginRight","indicatorSeparator","margin","textAlign","paddingLeft","alignItems","valueContainer","Control","controlClassName","EllipsisSpan","EllipsisSpanWithTickMargin","OptionIconWrapper","IconOption","IconWrapper","SingleValue","clearable","isMulti","ADD_ENS_DOMAIN_VALUE","ENS_DOMAINS_URL","ReadonlyStreamId","Pathname","PathnameField","EditableStreamId","ownerGroups","groups","setGroups","ensDomainGiven","ensOptions","addrOptions","useStreamOwnerOptionGroups","validationError","owners","isOwnersLoading","Domain","LabelInner","DisabledDomain","InfoSection","Advanced","PartitionsSection","Partitions","PartitionRange","Min","Max","ProjectGrid","RelatedProjects","SponsorshipsTable","StreamEditPage","saveButtonRef","useCanSubmit","SaveButton","StreamLiveDataPage","canSubscribe","StreamConnectPage","StreamIndexRedirect","StreamDraftPage","StreamTabbedPage","stickySubmit","getStorageNodes","getPermissions","useStreamEntityQuery","StreamEntityForm","invalidateAbilities","updateOperation","permissionsOperation","storageOperation","metadataChanged","shouldUpdateMetadata","hotBits","coldBits","shouldUpdatePermissions","storageNodeChanges","hotEnabled","checkBalance","transientStreamId","otherMetadata","isInteger","finalMetadata","createStream","setStreamMetadata","currentStreamId","currentMetadata","newMetadata","onCreate","setPermissions","assignments","onPermissionsChange","addStreamToStorageNode","removeStreamFromStorageNode","usePersistStreamDraft","ready","TitleContainer","Asterisk","StreamsPage","setSearch","tabParam","globalStats","streamCount","useGlobalStreamStatsQuery","globalStreamCount","globalMps","globalBps","throughputMode","setThroughputMode","CreateStreamButtonWrap","ThroughputDisplay","formatBytes","Globals","recentKey","onKeyUp","setUser","setExtra","useSetSentryScopeEffect","StreamrClientProvider","setConfig","newConfig","registerLanguages","QueryClientProvider","router","ToastContainer","Providers","NavProvider","errorElement","container","DECIMAL_PLACES","EXPONENTIAL_AT","RANGE","dsn","release","environment","debug","setExtras","g","navigator","streamrClientVersion","streamr","userAgent","branch","isMaster","versionNumber","displayHash","displayBranch","toBN","toBigInt","BigInt","toFloat","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","amdO","O","chunkIds","priority","notFulfilled","fulfilled","j","__esModule","getPrototypeOf","mode","then","ns","create","def","getOwnPropertyNames","definition","defineProperty","enumerable","globalThis","Function","prop","toStringTag","nmd","paths","baseURI","self","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","nc","__webpack_exports__"],"sourceRoot":""}