@stakekit/widget 0.0.292 → 0.0.294
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{DateTime-BBRIKkPv.js → DateTime-CMMZj2i-.js} +54 -54
- package/dist/bundle/{assets-vw12jo1v.js → assets-Bc9gJ-IT.js} +6 -6
- package/dist/bundle/{cardano-connector-DCWdS4Lt.js → cardano-connector-4FH7sm5s.js} +2 -2
- package/dist/bundle/{configured-chains-Bc6_pgMo.js → configured-chains-DF5IpaPp.js} +1 -1
- package/dist/bundle/{cosmos-connector-meta-Br67nymZ.js → cosmos-connector-meta-BKRBGzAs.js} +1 -1
- package/dist/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +15768 -15242
- package/dist/bundle/{ledger-connector-wZ-AWITi.js → ledger-connector-Em3Ex6Ns.js} +5 -5
- package/dist/bundle/{network-D8-Flo2u.js → network-D2ajkWp0.js} +1 -1
- package/dist/bundle/{reward-rate-chart-B41r4AU4.js → reward-rate-chart-6q6gJawR.js} +4 -4
- package/dist/bundle/{solana-connector-CXe_nU4I.js → solana-connector-DHrdMGZC.js} +3 -3
- package/dist/bundle/{stellar-connector-Cdl9Hnba.js → stellar-connector-DkR_jg41.js} +2 -2
- package/dist/bundle/{styles.css-BJ7-ORZP.js → styles.css-DQG3ba8V.js} +6 -6
- package/dist/bundle/{substrate-connector-DFeFqV_q.js → substrate-connector-CzewVoQ6.js} +1 -1
- package/dist/bundle/{ton-connector-CWmOukzn.js → ton-connector-CcahoFeW.js} +3 -3
- package/dist/bundle/{transaction-BwhgjU0e.js → transaction-BGiGADTK.js} +1 -1
- package/dist/bundle/{transaction-CUoDE6CU.js → transaction-BvpQWKqm.js} +1 -1
- package/dist/bundle/{transaction-B8S7Vgaq.js → transaction-CD_QhA6u.js} +2 -2
- package/dist/bundle/{transaction-DxrR2BHC.js → transaction-CiEShf7a.js} +1 -1
- package/dist/bundle/{tron-connector--M_0_Iy7.js → tron-connector-Dy_36o_J.js} +3 -3
- package/dist/bundle/{utils-CoW929-6.js → utils-BMTuLksW.js} +1 -1
- package/dist/bundle/{wallet-manager-C3rmOq7t.js → wallet-manager-BLaLHs2U.js} +11 -11
- package/dist/package/{DateTime-DJZXpaqx.js → DateTime-CGVpQQm9.js} +24 -2
- package/dist/package/{assets-BuIo5TOF.js → assets-CEn8BPdT.js} +1 -1
- package/dist/package/{cardano-connector-DIZuipB7.js → cardano-connector-BDWTBXaS.js} +2 -2
- package/dist/package/{configured-chains-B6PD9hvx.js → configured-chains-CRuy8tse.js} +1 -1
- package/dist/package/{cosmos-connector-meta-CgvZWkLV.js → cosmos-connector-meta-B-ke1Dvw.js} +1 -1
- package/dist/package/index.package.css +162 -162
- package/dist/package/index.package.js +4126 -3050
- package/dist/package/{ledger-connector-B3kEcKjM.js → ledger-connector-BQDRUjOJ.js} +5 -5
- package/dist/package/{network-B4Qs3uRl.js → network-K03Uj00V.js} +1 -1
- package/dist/package/{reward-rate-chart-B42ZCby7.js → reward-rate-chart-DBx39GdL.js} +2 -2
- package/dist/package/{solana-connector-VG2pC1EJ.js → solana-connector-fL70NOkD.js} +3 -3
- package/dist/package/{stellar-connector-DO9tJUOg.js → stellar-connector-C_33sqO5.js} +2 -2
- package/dist/package/{styles.css-DwJjrmLr.js → styles.css-BOghDWGq.js} +1 -1
- package/dist/package/{substrate-connector-P80MVt5T.js → substrate-connector-Cr7LEt2o.js} +1 -1
- package/dist/package/{ton-connector-3rqiqNZO.js → ton-connector-81-rUhzX.js} +3 -3
- package/dist/package/{transaction-DTbU7sxm.js → transaction-BHIZ9rKF.js} +1 -1
- package/dist/package/{transaction-CuMGfUeE.js → transaction-C5e_gCK6.js} +1 -1
- package/dist/package/{transaction-V39s0qKU.js → transaction-DMMfLvk1.js} +2 -2
- package/dist/package/{transaction-Do_oUKxl.js → transaction-DgdU5pHH.js} +1 -1
- package/dist/package/{tron-connector-CKUZFHDh.js → tron-connector-Cuez3U16.js} +3 -3
- package/dist/package/{wallet-manager-CioQJQ5H.js → wallet-manager-DWFwmdLb.js} +2 -2
- package/dist/types/domain/earn/contract.d.ts +1 -0
- package/dist/types/generated/yield-provider-ids.d.ts +86 -0
- package/dist/types/index.bundle.d.ts +2 -2
- package/dist/types/index.package.d.ts +2 -2
- package/dist/types/public-api/types.d.ts +21 -3
- package/dist/website/assets/AlertController-Dd3t1FDe.js +1 -0
- package/dist/website/assets/{CaipNetworkUtil-CIgzbD6k.js → CaipNetworkUtil-CyIDQhS0.js} +1 -1
- package/dist/website/assets/DateTime-ByC3zr_K.js +1 -0
- package/dist/website/assets/{HelpersUtil-BokHy7la.js → HelpersUtil-Bpil3MMz.js} +1 -1
- package/dist/website/assets/ModalController-BhWRBcfd.js +5 -0
- package/dist/website/assets/{albedo.module-Dn9vkw3f.js → albedo.module-DkOe0Unb.js} +1 -1
- package/dist/website/assets/assets-DXO6qW6R.js +2 -0
- package/dist/website/assets/{axios-Dl6BaS8Y.js → axios-rFNl7rAx.js} +2 -2
- package/dist/website/assets/{base-signer-b1ff2VPI-DF_m1Hx-.js → base-signer-b1ff2VPI-DEykpag5.js} +1 -1
- package/dist/website/assets/{basic-Bt_YnOIC.js → basic-By5_muQ4.js} +1 -1
- package/dist/website/assets/bignumber-FohbSRh0.js +1 -0
- package/dist/website/assets/blakejs-x6iaQxOd.js +3 -0
- package/dist/website/assets/bn-Ck4DeaX2.js +1 -0
- package/dist/website/assets/{browser-ponyfill-_v4sZCld.js → browser-ponyfill-lHyeX8iJ.js} +1 -1
- package/dist/website/assets/{bs58-CiFyCgrv.js → bs58-gzsgdke5.js} +1 -1
- package/dist/website/assets/{build-DM4Sawu1.js → build-ClRxYQRR.js} +1 -1
- package/dist/website/assets/{build-Butjcagw.js → build-TBrHU398.js} +1 -1
- package/dist/website/assets/{build-B5AnTSOq.js → build-Tl3I8dhV.js} +1 -1
- package/dist/website/assets/{cardano-connector-BC5bF4Y2.js → cardano-connector-8El4Ztf_.js} +9 -9
- package/dist/website/assets/{configured-chains-Bp7rWkOZ.js → configured-chains-DQ_M8-li.js} +1 -1
- package/dist/website/assets/core-BiDQVY37.js +2 -0
- package/dist/website/assets/{cosmos-connector-meta-CZFaunIB.js → cosmos-connector-meta-DRTieEt0.js} +1 -1
- package/dist/website/assets/dist-BVuLBvyS.js +7 -0
- package/dist/website/assets/{dist-BKdXTi2f.js → dist-Bo7ZdXT8.js} +3 -3
- package/dist/website/assets/{dist-7PipG_eL.js → dist-DlLKQSrv.js} +3 -3
- package/dist/website/assets/dist-ZKTSEBXW.js +1 -0
- package/dist/website/assets/{elliptic-j9CClrcl.js → elliptic-BdE4gFqn.js} +2 -2
- package/dist/website/assets/{esm-DVfwo40P.js → esm-BjyHrLEJ.js} +1 -1
- package/dist/website/assets/events-CMzhc0tf.js +1 -0
- package/dist/website/assets/{extrinsic-encoding-B3zynq2U.js → extrinsic-encoding-BIj1XBpl.js} +1 -1
- package/dist/website/assets/{features-LE43LGiF.js → features-Cy1CFK9a.js} +1 -1
- package/dist/website/assets/{fhevm-relayer-DXLb4mIw-bVmGMiQn.js → fhevm-relayer-DXLb4mIw-Bbrz0cha.js} +5 -3
- package/dist/website/assets/freighter.module-DsmrpiWT.js +1 -0
- package/dist/website/assets/index-7hHJ2eI5.js +558 -0
- package/dist/website/assets/index-zFAIWvcU.css +1 -0
- package/dist/website/assets/{index.es-D6B6PG3M.js → index.es-BGzDKZr_.js} +1 -1
- package/dist/website/assets/index.es-BHs2-Pa6.js +1 -0
- package/dist/website/assets/{index.es-wqX1ruQA.js → index.es-Bpga9r91.js} +5 -5
- package/dist/website/assets/{kms_lib-mPebVu09.js → kms_lib-BgnOy0xU.js} +1 -1
- package/dist/website/assets/{kms_lib-Bh_Z1nH6.js → kms_lib-w0jRi8cP.js} +1 -1
- package/dist/website/assets/{ledger-connector-BOOoTKx_.js → ledger-connector-CNNjVgC1.js} +3 -3
- package/dist/website/assets/{lib-es-5LFNYQ9J.js → lib-es-DmH9FYVZ.js} +1 -1
- package/dist/website/assets/lobstr.module-BUAItZUt.js +1 -0
- package/dist/website/assets/{nacl-fast-BI97gFtf.js → nacl-fast-B5R4wpqG.js} +1 -1
- package/dist/website/assets/{nacl-util-DCWJejqG.js → nacl-util-6167mj42.js} +1 -1
- package/dist/website/assets/{network-CEcIzsgc.js → network-BVzpe0Ii.js} +1 -1
- package/dist/website/assets/{polkadot-ledger-transaction-DaDP252u.js → polkadot-ledger-transaction-Dp6EFfyV.js} +1 -1
- package/dist/website/assets/registry-BgQw-qJW.js +1 -0
- package/dist/website/assets/{reward-rate-chart-COP_M115.js → reward-rate-chart-CO_yI4og.js} +4 -4
- package/dist/website/assets/{safe-buffer-Dz6e-rwu.js → safe-buffer-BUgQmBOp.js} +1 -1
- package/dist/website/assets/{safe-connector-DG2cXEO5.js → safe-connector-BObu9WgG.js} +2 -2
- package/dist/website/assets/{solana-connector-DSpWnxwA.js → solana-connector-CVuV_EKp.js} +1 -1
- package/dist/website/assets/{src-Zq1Jw-Sn.js → src-DbdC_Alu.js} +1 -1
- package/dist/website/assets/{src-hSPfFTzN.js → src-Dl7INWvU.js} +1 -1
- package/dist/website/assets/state-D5Nw1L4F.js +1 -0
- package/dist/website/assets/{stellar-connector-BAbbdkSK.js → stellar-connector-Ba7Jcrbg.js} +1 -1
- package/dist/website/assets/styles.css-NtRiu07M.js +1 -0
- package/dist/website/assets/substrate-connector-hQ3vc47X.js +2 -0
- package/dist/website/assets/tfhe-BACovsAk.js +1 -0
- package/dist/website/assets/{tfhe-DuWT_ao1.js → tfhe-BSAXrnM6.js} +1 -1
- package/dist/website/assets/ton-connector-CU1xiP2u.js +2264 -0
- package/dist/website/assets/tracking-variants-CtfEiKNR.js +93 -0
- package/dist/website/assets/{transaction-BH4ssPh3.js → transaction-B5hUD0AE.js} +1 -1
- package/dist/website/assets/{transaction-BVuftLt1.js → transaction-BWEzzOww.js} +1 -1
- package/dist/website/assets/transaction-BmFUkzQv.js +2 -0
- package/dist/website/assets/{transaction-1KdJeqcp.js → transaction-C_iyacpP.js} +1 -1
- package/dist/website/assets/{tron-connector-CJURHEQe.js → tron-connector-gXtlAAuG.js} +7 -7
- package/dist/website/assets/{tx-Bkou_ALe.js → tx-Cosvp39i.js} +1 -1
- package/dist/website/assets/{utils-CH0e59XB.js → utils-meUBO1X1.js} +1 -1
- package/dist/website/assets/{viem-BQ_7aeKB.js → viem-8-EtcU49.js} +1 -1
- package/dist/website/assets/{w3m-modal-BLY--NNS.js → w3m-modal-HS9RLkN8.js} +2 -2
- package/dist/website/assets/wallet-manager-BQrZx180.js +5 -0
- package/dist/website/assets/{web-4qAQ-Ymk.js → web-azgm2Psf.js} +1 -1
- package/dist/website/assets/{wui-list-item-1gzb5UQJ.js → wui-list-item-CfZ1WQql.js} +1 -1
- package/dist/website/assets/{xbull.module-B4N1LGQD.js → xbull.module-DQx6rh7x.js} +1 -1
- package/dist/website/index.html +19 -19
- package/package.json +3 -2
- package/dist/website/assets/AlertController-CH5fpr36.js +0 -1
- package/dist/website/assets/DateTime-DR7XeJxF.js +0 -1
- package/dist/website/assets/ModalController-CWwEAkfw.js +0 -5
- package/dist/website/assets/assets-Dk5ppLtc.js +0 -2
- package/dist/website/assets/bignumber-CziKLYjt.js +0 -1
- package/dist/website/assets/blakejs-Dx-Zt5zT.js +0 -3
- package/dist/website/assets/bn-CJG5j3KW.js +0 -1
- package/dist/website/assets/core-uatW2d6Y.js +0 -2
- package/dist/website/assets/dist-CELdgNh9.js +0 -1
- package/dist/website/assets/dist-omv2KNC4.js +0 -5
- package/dist/website/assets/events-D2w4OsQJ.js +0 -1
- package/dist/website/assets/freighter.module-CaBNS6Y-.js +0 -1
- package/dist/website/assets/index-3l3n0-cX.js +0 -540
- package/dist/website/assets/index-Dpi1HuAK.css +0 -1
- package/dist/website/assets/index.es-DCi2xZ1b.js +0 -1
- package/dist/website/assets/lobstr.module-GQjJAf8P.js +0 -1
- package/dist/website/assets/registry-DVfYVrCY.js +0 -1
- package/dist/website/assets/state-B8Vu3fYx.js +0 -1
- package/dist/website/assets/styles.css-BK5OO2Hh.js +0 -1
- package/dist/website/assets/substrate-connector-CwnGlD2K.js +0 -2
- package/dist/website/assets/tfhe-PDJAG8Bv.js +0 -1
- package/dist/website/assets/ton-connector-DMNOeieX.js +0 -2264
- package/dist/website/assets/tracking-variants-CuRpr0B_.js +0 -85
- package/dist/website/assets/transaction-CbxrIerN.js +0 -2
- package/dist/website/assets/wallet-manager-D8tOJ1jy.js +0 -5
- package/dist/website/mockServiceWorker.js +0 -460
|
@@ -3,16 +3,16 @@ import { s as __toESM, t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js
|
|
|
3
3
|
import { D as require_events, N as init_dist, j as Buffer } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
4
|
import { c as map, d as succeed, i as getOrThrow, r as flatMap, t as fail } from "./Result-C9rUSa4S.js";
|
|
5
5
|
import { vi as getOrNull } from "./Cause-R9rwCrUh.js";
|
|
6
|
-
import { A as Struct, B as Unknown, C as NullOr, K as decodeEffect, M as TaggedError, k as String$1, p as Finite, q as decodeOption, r as walletImages, rt as fromJsonString, sn as toEntries, vt as optional$1 } from "./assets-
|
|
6
|
+
import { A as Struct, B as Unknown, C as NullOr, K as decodeEffect, M as TaggedError, k as String$1, p as Finite, q as decodeOption, r as walletImages, rt as fromJsonString, sn as toEntries, vt as optional$1 } from "./assets-CEn8BPdT.js";
|
|
7
7
|
import { F as map$1, n as createConnector, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
8
8
|
import { $ as map$2, G as fromResult, It as succeed$1, K as gen, Wt as tryPromise, j as flatMap$1, l as cached, nt as mapError, w as fail$1 } from "./Effect-wPJyM__c.js";
|
|
9
|
-
import { S as toSafeIntegerCount, b as exactZero, l as normalizeChainId, n as decodeWalletPayload, o as unsignedEVMTransactionCodec, s as configMeta, t as substratePayloadCodec, w as BigNumber$1, y as exactDecimal } from "./transaction-
|
|
10
|
-
import { a as isCosmosWalletNetwork, o as isEvmWalletNetwork } from "./network-
|
|
9
|
+
import { S as toSafeIntegerCount, b as exactZero, l as normalizeChainId, n as decodeWalletPayload, o as unsignedEVMTransactionCodec, s as configMeta, t as substratePayloadCodec, w as BigNumber$1, y as exactDecimal } from "./transaction-DMMfLvk1.js";
|
|
10
|
+
import { a as isCosmosWalletNetwork, o as isEvmWalletNetwork } from "./network-K03Uj00V.js";
|
|
11
11
|
import { er as hexToBytes } from "./call-Be3Jcol_.js";
|
|
12
12
|
import { t as makeCurrentValueStream } from "./current-value-stream-CLE_8iFo.js";
|
|
13
13
|
import { t as LocalTracer } from "./lib-es-CLJgNc7c.js";
|
|
14
|
-
import { a as require_dist$1, i as require_dist$2, n as unsignedTonTransactionCodec } from "./transaction-
|
|
15
|
-
import { n as unsignedTronTransactionCodec } from "./transaction-
|
|
14
|
+
import { a as require_dist$1, i as require_dist$2, n as unsignedTonTransactionCodec } from "./transaction-BHIZ9rKF.js";
|
|
15
|
+
import { n as unsignedTronTransactionCodec } from "./transaction-C5e_gCK6.js";
|
|
16
16
|
import { $ as _trim, $n as extend, $t as $ZodPrefault, A as _length, An as _safeEncodeAsync, At as $ZodExactOptional, B as _normalize, Bn as flattenError, Bt as $ZodKSUID, C as _ipv6, Cn as _encode, D as _isoTime, Dn as _safeDecode, Dt as $ZodEmail, E as _isoDuration, En as _parseAsync, Et as $ZodE164, F as _minLength, Ft as $ZodISODateTime, G as _refine, Gn as config, Gt as $ZodNull, H as _number, Ht as $ZodNanoID, I as _multipleOf, It as $ZodISODuration, J as _startsWith, Jn as NUMBER_FORMAT_RANGES, Jt as $ZodNumberFormat, K as _regex, Kn as globalConfig, Kt as $ZodNullable, L as _nanoid, Ln as validate, Lt as $ZodISOTime, M as _lt, Mn as _safeParseAsync, Mt as $ZodIPv4, N as _lte, Nt as $ZodIPv6, O as _jwt, On as _safeDecodeAsync, Ot as $ZodEmoji, P as _maxLength, Pt as $ZodISODate, Q as _toUpperCase, Qn as derived, Qt as $ZodPipe, R as _never, Rn as validateAsync, Rt as $ZodIntersection, S as _ipv4, Sn as _decodeAsync, St as $ZodCustom, T as _isoDateTime, Tn as _parse, Tt as $ZodDiscriminatedUnion, U as _overwrite, Un as $ZodEncodeError, Ut as $ZodNever, V as _null$1, Vn as formatError, Vt as $ZodLiteral, Wn as $constructor, Wt as $ZodNonOptional, X as _superRefine, Xn as clone$1, Xt as $ZodObjectJIT, Y as _string, Yn as assignProp, Z as _toLowerCase, Zn as constantCatch, Zt as $ZodOptional, _ as _gt, _n as base64, _r as shallowClone, _t as $ZodCIDRv4, an as $ZodType, ar as jsonStringifyReplacer, at as _uuid, b as _includes, bn as number$1, bt as $ZodCUID2, c as _cidrv6, cn as $ZodUUID, cr as normalizeParams, ct as _uuidv7, dn as $ZodUnknown, dr as parsedType, dt as $ZodAny, en as $ZodReadonly, er as getEnumValues, et as _ulid, fn as $ZodVoid, fr as partial, ft as $ZodArray, g as _endsWith, gn as standardProps, gr as safeExtend, gt as $ZodBoolean, h as _emoji, hn as base64urlCharset, hr as required, i as _base64url, in as $ZodTransform, ir as joinValues, it as _url, j as _lowercase, jn as _safeParse, jt as $ZodGUID, k as _ksuid, kn as _safeEncode, kt as $ZodEnum, l as _cuid, ln as $ZodUndefined, lr as omit, lt as _void$1, m as _email, mn as base64Charset, mr as rawShape, mt as $ZodBase64URL, n as _array, nn as $ZodString, nr as installLazyProp, nt as _unknown, o as _boolean, on as $ZodULID, or as merge, ot as _uuidv4, p as _e164, pn as $ZodXID, pr as pick, pt as $ZodBase64, q as _slugify, qn as BIGINT_FORMAT_RANGES, qt as $ZodNumber, r as _base64, rn as $ZodStringFormat, rr as issue, rt as _uppercase, s as _cidrv4, sn as $ZodURL, sr as mergeDefs, st as _uuidv6, t as _any, tn as $ZodRecord, tr as hide, tt as _undefined$1, u as _cuid2, un as $ZodUnion, ur as own, ut as _xid, v as _gte, vn as base64url, vr as stringifyPrimitive, vt as $ZodCIDRv6, w as _isoDate, wn as _encodeAsync, wt as $ZodDefault, x as _int, xn as _decode, xt as $ZodCatch, y as _guid, yn as integer, yt as $ZodCUID, zn as $ZodError, zt as $ZodJWT } from "./api-_oaIvqGt.js";
|
|
17
17
|
import { t as makeWagmiConnectorEvents } from "./wagmi-connector-events-DW6Ytid-.js";
|
|
18
18
|
//#region ../../node_modules/.pnpm/@ledgerhq+hw-transport@6.36.0/node_modules/@ledgerhq/hw-transport/lib-es/errors.js
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as __exportAll, s as __toESM, t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { F as init_dist, I as init_dist$1, L as process$1, P as global } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
|
-
import { G as vars, K as useTranslation, N as ContentLoaderSquare, P as formatDateTime, R as Spinner, U as Box, W as clsx, a as chartLoadingOverlay, c as chartTooltipDate, i as chartContainer, l as chartTooltipValue, o as chartSurface, ot as require_compiler_runtime, q as require_shim, r as axisLabel, s as chartTooltipContainer, st as require_builtin_esm_external_require_react, u as emptyChartContainer, z as Text$1 } from "./styles.css-
|
|
4
|
+
import { G as vars, K as useTranslation, N as ContentLoaderSquare, P as formatDateTime, R as Spinner, U as Box, W as clsx, a as chartLoadingOverlay, c as chartTooltipDate, i as chartContainer, l as chartTooltipValue, o as chartSurface, ot as require_compiler_runtime, q as require_shim, r as axisLabel, s as chartTooltipContainer, st as require_builtin_esm_external_require_react, u as emptyChartContainer, z as Text$1 } from "./styles.css-BOghDWGq.js";
|
|
5
5
|
import { gr as millis, wr as toMillis } from "./Cause-R9rwCrUh.js";
|
|
6
|
-
import {
|
|
6
|
+
import { S as zoneMakeNamedUnsafe, v as toEpochMillis } from "./DateTime-CGVpQQm9.js";
|
|
7
7
|
import { r as init_eventemitter3, t as eventemitter3_default } from "./eventemitter3-DzBccw7a.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { PureComponent, cloneElement, createContext, createElement, forwardRef, isValidElement, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as getWalletNetworkLogo } from "./assets-
|
|
2
|
+
import { t as getWalletNetworkLogo } from "./assets-CEn8BPdT.js";
|
|
3
3
|
import { c as WalletNotAvailableError, n as createConnector, q as succeed, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
4
4
|
import { Bt as sync, It as succeed$1 } from "./Effect-wPJyM__c.js";
|
|
5
|
-
import { A as WalletNotReadyError, b as WalletReadyState, f as VersionedTransaction, i as extensionInstallUrls, m as init_index_browser_esm, o as porto_default, s as WalletConnectSolanaAdapter, t as decodeSolanaTransactionToBuffer, u as Transaction } from "./transaction-
|
|
6
|
-
import { r as solana } from "./configured-chains-
|
|
5
|
+
import { A as WalletNotReadyError, b as WalletReadyState, f as VersionedTransaction, i as extensionInstallUrls, m as init_index_browser_esm, o as porto_default, s as WalletConnectSolanaAdapter, t as decodeSolanaTransactionToBuffer, u as Transaction } from "./transaction-DgdU5pHH.js";
|
|
6
|
+
import { r as solana } from "./configured-chains-CRuy8tse.js";
|
|
7
7
|
import { t as makeWagmiConnectorEvents } from "./wagmi-connector-events-DW6Ytid-.js";
|
|
8
8
|
//#region src/services/wallet/internal/adapters/solana/solana-connector.ts
|
|
9
9
|
init_index_browser_esm();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Si as isSome, xi as isNone } from "./Cause-R9rwCrUh.js";
|
|
3
|
-
import { A as Struct, Q as decodeUnknownOption, k as String, t as getWalletNetworkLogo } from "./assets-
|
|
3
|
+
import { A as Struct, Q as decodeUnknownOption, k as String, t as getWalletNetworkLogo } from "./assets-CEn8BPdT.js";
|
|
4
4
|
import { n as createConnector, q as succeed, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
5
5
|
import { Ht as tapError, ht as promise } from "./Effect-wPJyM__c.js";
|
|
6
|
-
import { i as stellar } from "./configured-chains-
|
|
6
|
+
import { i as stellar } from "./configured-chains-CRuy8tse.js";
|
|
7
7
|
import { n as stellarConnectorType } from "./stellar-connector-meta--coNfb5X.js";
|
|
8
8
|
//#region src/services/wallet/internal/adapters/stellar/stellar-connector.ts
|
|
9
9
|
var reconnectStorageKey = "stellar.reconnect";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { I as init_dist, L as process$1 } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
4
|
import { Cr as toHours, Er as toSeconds, Sr as toDays, Tr as toMinutes, lr as hours, pr as isLessThan, sr as days, vr as minutes } from "./Cause-R9rwCrUh.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as isLessThanOrEqualTo, g as subtract, m as setZone, n as distance, r as format$1, y as toParts } from "./DateTime-CGVpQQm9.js";
|
|
6
6
|
import * as m from "react";
|
|
7
7
|
import React, { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { N as init_dist } from "./cosmos-kit-9pO3nD6F.js";
|
|
3
3
|
import { Bt as isNotUndefined } from "./Result-C9rUSa4S.js";
|
|
4
4
|
import { Jr as map, Vr as head, yi as getOrThrowWith } from "./Cause-R9rwCrUh.js";
|
|
5
|
-
import { A as Struct, C as NullOr, F as TemplateLiteral, k as String$1, p as Finite, t as getWalletNetworkLogo, yt as optionalKey } from "./assets-
|
|
5
|
+
import { A as Struct, C as NullOr, F as TemplateLiteral, k as String$1, p as Finite, t as getWalletNetworkLogo, yt as optionalKey } from "./assets-CEn8BPdT.js";
|
|
6
6
|
import { c as WalletNotAvailableError, n as createConnector, q as succeed, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
7
7
|
import { $ as map$1, Bt as sync, Gt as try_, It as succeed$1, K as gen, Wt as tryPromise, Zt as void_, j as flatMap, k as filterOrElse, l as cached, w as fail } from "./Effect-wPJyM__c.js";
|
|
8
8
|
import { I as hexToBytes, L as init_utils, M as concatBytes, k as bytesToHex } from "./_u64-C-W9znGE.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { s as __toESM, t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { I as init_dist, L as process$1, i as require_cjs } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
4
|
import { bi as getOrUndefined, sr as days, wr as toMillis } from "./Cause-R9rwCrUh.js";
|
|
5
|
-
import { A as Struct, K as decodeEffect, Q as decodeUnknownOption, rt as fromJsonString, t as getWalletNetworkLogo, v as Literals } from "./assets-
|
|
5
|
+
import { A as Struct, K as decodeEffect, Q as decodeUnknownOption, rt as fromJsonString, t as getWalletNetworkLogo, v as Literals } from "./assets-CEn8BPdT.js";
|
|
6
6
|
import { n as createConnector, q as succeed, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
7
7
|
import { Gt as try_, K as gen, Wt as tryPromise, nt as mapError } from "./Effect-wPJyM__c.js";
|
|
8
8
|
import { n as currentTimeMillis } from "./Clock-BcjldEnu.js";
|
|
9
|
-
import { a as ton } from "./configured-chains-
|
|
10
|
-
import { i as require_dist, r as unsignedTonTransactionTonConnectCodec } from "./transaction-
|
|
9
|
+
import { a as ton } from "./configured-chains-CRuy8tse.js";
|
|
10
|
+
import { i as require_dist, r as unsignedTonTransactionTonConnectCodec } from "./transaction-BHIZ9rKF.js";
|
|
11
11
|
import { t as require_nacl_fast } from "./nacl-fast-CJvqKL8I.js";
|
|
12
12
|
import { t as configMeta } from "./ton-connector-meta-CGPcs5EJ.js";
|
|
13
13
|
import { t as require_nacl_util } from "./nacl-util-DypGL515.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { N as init_dist, j as Buffer } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
|
-
import { A as Struct, Dt as transform, X as decodeTo, k as String$1, o as ArraySchema, p as Finite, s as BigInt$1, z as Union } from "./assets-
|
|
4
|
+
import { A as Struct, Dt as transform, X as decodeTo, k as String$1, o as ArraySchema, p as Finite, s as BigInt$1, z as Union } from "./assets-CEn8BPdT.js";
|
|
5
5
|
import { t as require_nacl_fast } from "./nacl-fast-CJvqKL8I.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@ton+core@0.63.1_@ton+crypto@3.3.0/node_modules/@ton/core/dist/inspect.js
|
|
7
7
|
var require_inspect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as Struct, B as Unknown, D as Record, j as StructWithRest, k as String, l as Boolean, o as ArraySchema, p as Finite, yt as optionalKey } from "./assets-
|
|
2
|
+
import { A as Struct, B as Unknown, D as Record, j as StructWithRest, k as String, l as Boolean, o as ArraySchema, p as Finite, yt as optionalKey } from "./assets-CEn8BPdT.js";
|
|
3
3
|
//#region src/services/wallet/internal/adapters/tron/transaction.ts
|
|
4
4
|
var unsignedTronTransactionCodec = Struct({
|
|
5
5
|
raw_data: Struct({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { l as mapError, u as match } from "./Result-C9rUSa4S.js";
|
|
3
|
-
import { $ as decodeUnknownResult, A as Struct, B as Unknown, C as NullOr, Dt as transform, K as decodeEffect, Nt as transform$1, Pt as transformEffect, R as UndefinedOr, W as declare, X as decodeTo, _t as makeFilter, c as BigIntFromString, d as DateTimeUtcFromString, gt as isStringFinite, it as instanceOf, k as String$1, o as ArraySchema, p as Finite, rt as fromJsonString, s as BigInt$1, u as DateTimeUtc, yt as optionalKey, z as Union } from "./assets-
|
|
3
|
+
import { $ as decodeUnknownResult, A as Struct, B as Unknown, C as NullOr, Dt as transform, K as decodeEffect, Nt as transform$1, Pt as transformEffect, R as UndefinedOr, W as declare, X as decodeTo, _t as makeFilter, c as BigIntFromString, d as DateTimeUtcFromString, gt as isStringFinite, it as instanceOf, k as String$1, o as ArraySchema, p as Finite, rt as fromJsonString, s as BigInt$1, u as DateTimeUtc, yt as optionalKey, z as Union } from "./assets-CEn8BPdT.js";
|
|
4
4
|
import { $ as map, It as succeed, Q as logWarning, a as annotateLogs, o as as } from "./Effect-wPJyM__c.js";
|
|
5
|
-
import { i as formatIso } from "./DateTime-
|
|
5
|
+
import { i as formatIso } from "./DateTime-CGVpQQm9.js";
|
|
6
6
|
import { Xn as hexToBigInt, ar as numberToHex, fr as isHex } from "./call-Be3Jcol_.js";
|
|
7
7
|
//#region ../../node_modules/.pnpm/bignumber.js@11.1.5/node_modules/bignumber.js/dist/bignumber.mjs
|
|
8
8
|
var BigNumber = clone();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { n as __esmMin, o as __toCommonJS, r as __exportAll, s as __toESM, t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { A as require_dist, I as init_dist$2, L as process$1, M as Buffer$1, N as init_dist$1, O as require_bs58, j as Buffer, k as require_bn } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
4
|
import { Bt as isNotUndefined } from "./Result-C9rUSa4S.js";
|
|
5
|
-
import { A as Struct$2, k as String$1, o as ArraySchema, z as Union } from "./assets-
|
|
5
|
+
import { A as Struct$2, k as String$1, o as ArraySchema, z as Union } from "./assets-CEn8BPdT.js";
|
|
6
6
|
import { $ as map, k as filterOrElse } from "./Effect-wPJyM__c.js";
|
|
7
7
|
import { n as sha256, t as init_sha256 } from "./sha256-B2wbfyRG.js";
|
|
8
8
|
import { n as keccak_256, t as init_sha3 } from "./sha3-BqGkc87X.js";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { r as __exportAll, s as __toESM, t as __commonJSMin } from "./rolldown-runtime-D_CBzjfY.js";
|
|
3
3
|
import { D as require_events, F as init_dist$1, I as init_dist$2, L as process$1, M as Buffer$1, N as init_dist, P as global, f as axios, j as Buffer, l as require_semver$2, o as BigNumber } from "./cosmos-kit-9pO3nD6F.js";
|
|
4
4
|
import { Bt as isNotUndefined } from "./Result-C9rUSa4S.js";
|
|
5
|
-
import { A as Struct, Dt as transform, X as decodeTo, _ as Literal, at as is, n as getWalletTokenLogo, r as walletImages, t as getWalletNetworkLogo, z as Union } from "./assets-
|
|
5
|
+
import { A as Struct, Dt as transform, X as decodeTo, _ as Literal, at as is, n as getWalletTokenLogo, r as walletImages, t as getWalletNetworkLogo, z as Union } from "./assets-CEn8BPdT.js";
|
|
6
6
|
import { c as WalletNotAvailableError, n as createConnector, q as succeed, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
7
7
|
import { $ as map, Bt as sync, K as gen$1, k as filterOrElse, w as fail } from "./Effect-wPJyM__c.js";
|
|
8
8
|
import { t as eventemitter3_default } from "./eventemitter3-DQ3GPwHK.js";
|
|
9
9
|
import { n as log } from "./lib-es-CLJgNc7c.js";
|
|
10
|
-
import { o as tron } from "./configured-chains-
|
|
11
|
-
import { t as signedTronTransactionCodec } from "./transaction-
|
|
10
|
+
import { o as tron } from "./configured-chains-CRuy8tse.js";
|
|
11
|
+
import { t as signedTronTransactionCodec } from "./transaction-C5e_gCK6.js";
|
|
12
12
|
import { t as configMeta } from "./tron-connector-meta-Dy7RipKo.js";
|
|
13
13
|
import { a as randomBytes$3, c as exists$1, i as concatBytes$3, l as hash$1, n as Hash$1, o as toBytes$1, s as bytes$1, t as sha256$2 } from "./sha256-DAoS29uk.js";
|
|
14
14
|
import { t as makeWagmiConnectorEvents } from "./wagmi-connector-events-DW6Ytid-.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as WalletManager, d as Logger, n as wallets$1, r as wallets, t as wallets$2 } from "./cosmos-kit-9pO3nD6F.js";
|
|
3
3
|
import { Oi as toArray, Si as isSome, Vr as head, bi as getOrUndefined, di as filter, hi as fromNullishOr, wi as map } from "./Cause-R9rwCrUh.js";
|
|
4
|
-
import { A as Struct, L as Uint8ArrayFromBase64, Q as decodeUnknownOption, T as ObjectKeyword, Y as decodeSync, _ as Literal, a as config, c as BigIntFromString, k as String, o as ArraySchema, r as walletImages, t as getWalletNetworkLogo, tt as encodeEffect } from "./assets-
|
|
4
|
+
import { A as Struct, L as Uint8ArrayFromBase64, Q as decodeUnknownOption, T as ObjectKeyword, Y as decodeSync, _ as Literal, a as config, c as BigIntFromString, k as String, o as ArraySchema, r as walletImages, t as getWalletNetworkLogo, tt as encodeEffect } from "./assets-CEn8BPdT.js";
|
|
5
5
|
import { c as WalletNotAvailableError, n as createConnector, q as succeed, s as WalletIntegrationError, t as wagmiConnectResult } from "./wagmi-connect-result-IsSALEc2.js";
|
|
6
6
|
import { $ as map$1, Gt as try_, L as forEach, Q as logWarning, U as fromNullishOr$1, Wt as tryPromise, a as annotateLogs, j as flatMap, mt as orElseSucceed, nt as mapError, v as catch_ } from "./Effect-wPJyM__c.js";
|
|
7
|
-
import { t as configMeta, u as WalletAddress } from "./cosmos-connector-meta-
|
|
7
|
+
import { t as configMeta, u as WalletAddress } from "./cosmos-connector-meta-B-ke1Dvw.js";
|
|
8
8
|
import { t as makeCurrentValueStream } from "./current-value-stream-CLE_8iFo.js";
|
|
9
9
|
import { a as require_build$1, t as require_build } from "./build-BXiBAo0g.js";
|
|
10
10
|
import { t as require_tx } from "./tx-lKUj--WJ.js";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/** Yield provider IDs, as the Yield API reports a yield's `providerId`. */
|
|
2
|
+
export declare const YieldProviderId: {
|
|
3
|
+
readonly Aave: "aave";
|
|
4
|
+
readonly Edel: "edel";
|
|
5
|
+
readonly Anchor: "anchor";
|
|
6
|
+
readonly Benqi: "benqi";
|
|
7
|
+
readonly Compound: "compound";
|
|
8
|
+
readonly Lido: "lido";
|
|
9
|
+
readonly Marinade: "marinade";
|
|
10
|
+
readonly Sushi: "sushi";
|
|
11
|
+
readonly Yearn: "yearn";
|
|
12
|
+
readonly Ape: "ape";
|
|
13
|
+
readonly CHAINLINK: "chainlink";
|
|
14
|
+
readonly Pendle: "pendle";
|
|
15
|
+
readonly ParaX: "parax";
|
|
16
|
+
readonly RocketPool: "rocket-pool";
|
|
17
|
+
readonly Stakewise: "stakewise";
|
|
18
|
+
readonly Etherfi: "etherfi";
|
|
19
|
+
readonly MorphoAave: "morpho-aave";
|
|
20
|
+
readonly Morpho: "morpho";
|
|
21
|
+
readonly MorphoCompound: "morpho-compound";
|
|
22
|
+
readonly Angle: "angle";
|
|
23
|
+
readonly KelpDAO: "kelpdao";
|
|
24
|
+
readonly Figment: "figment";
|
|
25
|
+
readonly Kiln: "kiln";
|
|
26
|
+
readonly P2P: "P2P";
|
|
27
|
+
readonly Everstake: "everstake";
|
|
28
|
+
readonly EigenLayer: "eigenlayer";
|
|
29
|
+
readonly Luganodes: "luganodes";
|
|
30
|
+
readonly Renzo: "renzo";
|
|
31
|
+
readonly InfStones: "infstones";
|
|
32
|
+
readonly Ethena: "ethena";
|
|
33
|
+
readonly Upshift: "upshift";
|
|
34
|
+
readonly Fluid: "fluid";
|
|
35
|
+
readonly IdleFinance: "idle-finance";
|
|
36
|
+
readonly Gearbox: "gearbox";
|
|
37
|
+
readonly ChorusOne: "chorus-one";
|
|
38
|
+
readonly StakeKit: "stakekit";
|
|
39
|
+
readonly Spark: "spark";
|
|
40
|
+
readonly Sommelier: "sommelier";
|
|
41
|
+
readonly SummerFi: "summer-fi";
|
|
42
|
+
readonly Venus: "venus";
|
|
43
|
+
readonly VenusFlux: "venus-flux";
|
|
44
|
+
readonly Mantle: "mantle";
|
|
45
|
+
readonly TonWhales: "ton-whales";
|
|
46
|
+
readonly Blend: "blend";
|
|
47
|
+
readonly Synthetix: "synthetix";
|
|
48
|
+
readonly Drift: "drift";
|
|
49
|
+
readonly Euler: "euler";
|
|
50
|
+
readonly Maple: "maple";
|
|
51
|
+
readonly Sky: "sky";
|
|
52
|
+
readonly YO: "yo-protocol";
|
|
53
|
+
readonly Meria: "meria";
|
|
54
|
+
readonly Stakin: "stakin";
|
|
55
|
+
readonly GlobalStake: "globalstake";
|
|
56
|
+
readonly SimplyStaking: "simplystaking";
|
|
57
|
+
readonly Coinbase: "coinbase";
|
|
58
|
+
readonly ValidationCloud: "validation-cloud";
|
|
59
|
+
readonly Curve: "curve";
|
|
60
|
+
readonly PancakeSwap: "pancakeswap";
|
|
61
|
+
readonly YieldXyz: "yield-xyz";
|
|
62
|
+
readonly Kamino: "kamino";
|
|
63
|
+
readonly Veda: "veda";
|
|
64
|
+
readonly Kinetiq: "kinetiq";
|
|
65
|
+
readonly Lista: "lista";
|
|
66
|
+
readonly Dolomite: "dolomite";
|
|
67
|
+
readonly Midas: "midas";
|
|
68
|
+
readonly Concrete: "concrete";
|
|
69
|
+
readonly Dinari: "dinari";
|
|
70
|
+
readonly Ondo: "ondo";
|
|
71
|
+
readonly Superstate: "superstate";
|
|
72
|
+
readonly Securitize: "securitize";
|
|
73
|
+
readonly Nest: "nest";
|
|
74
|
+
readonly PaxosLabs: "paxos-labs";
|
|
75
|
+
readonly R25: "r25";
|
|
76
|
+
readonly InfiniFi: "infinifi";
|
|
77
|
+
readonly RockSolid: "rocksolid";
|
|
78
|
+
readonly T9: "t9";
|
|
79
|
+
readonly GamiLabs: "gami-labs";
|
|
80
|
+
readonly Lagoon: "lagoon";
|
|
81
|
+
readonly Yuzu: "yuzu";
|
|
82
|
+
readonly Sentora: "sentora";
|
|
83
|
+
readonly Zama: "zama";
|
|
84
|
+
readonly Ember: "ember";
|
|
85
|
+
};
|
|
86
|
+
export type YieldProviderId = (typeof YieldProviderId)[keyof typeof YieldProviderId];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BundledSKWidgetProps, SKTheme } from "./public-api/types.js";
|
|
2
|
-
export type { ActionMeta, BittensorTx, BundledSKWidgetProps, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
3
|
-
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, } from "./public-api/types.js";
|
|
2
|
+
export type { ActionMeta, BittensorTx, BundledSKWidgetProps, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKYieldProviderOrder, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
3
|
+
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, YieldProviderId, } from "./public-api/types.js";
|
|
4
4
|
export declare const renderSKWidget: (props: BundledSKWidgetProps & {
|
|
5
5
|
container: Element | DocumentFragment;
|
|
6
6
|
}) => {
|
|
@@ -7,8 +7,8 @@ import type { ReactElement } from "react";
|
|
|
7
7
|
import type { HelpModalProps, SKAppProps } from "./public-api/react-types.js";
|
|
8
8
|
import type { SKTheme } from "./public-api/types.js";
|
|
9
9
|
export type { HelpModalProps, SKAppProps } from "./public-api/react-types.js";
|
|
10
|
-
export type { ActionMeta, BittensorTx, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
11
|
-
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, } from "./public-api/types.js";
|
|
10
|
+
export type { ActionMeta, BittensorTx, EvmTx, SKActionArguments, SKActionType, SKBorrowExternalProviders, SKBorrowMarketsScope, SKBorrowSignatureResult, SKBorrowTx, SKBorrowTxMeta, SKBorrowTxResult, SKBorrowWallet, SKCustomTranslations, SKEip712TypedData, SKExternalProviders, SKHostVariant, SKLanguage, SKNetwork, SKPreferredTokenYieldsPerNetwork, SKSignMessageResult, SKTheme, SKToken, SKTrackEvent, SKTrackingConfig, SKTrackPage, SKTransactionResult, SKTransactionType, SKTranslationTree, SKTx, SKTxMeta, SKWallet, SKWalletPolicy, SKYieldProviderOrder, SKZamaPermitMeta, SKZamaPermitResult, SolanaTx, SupportedSKChainIds, TonTx, TronTx, } from "./public-api/types.js";
|
|
11
|
+
export { DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, YieldProviderId, } from "./public-api/types.js";
|
|
12
12
|
export declare const SKApp: (props: SKAppProps) => ReactElement;
|
|
13
13
|
export declare const HelpModal: (props: HelpModalProps) => ReactElement;
|
|
14
14
|
export declare const darkTheme: SKTheme;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type DashboardYieldCategory, DashboardYieldCategory as DomainDashboardYieldCategory } from "../domain/earn/contract.js";
|
|
1
|
+
import { type DashboardYieldCategory, DashboardYieldCategory as DomainDashboardYieldCategory, YieldProviderId as DomainYieldProviderId, type YieldProviderId } from "../domain/earn/contract.js";
|
|
2
2
|
import type { Network } from "../domain/network/contract.js";
|
|
3
3
|
import { EvmChainIds, MiscChainIds, type WalletPolicy as SKWalletPolicy, SubstrateChainIds, type SupportedSKChainIds } from "../domain/wallet/contract.js";
|
|
4
4
|
import type { SKTheme } from "./theme.js";
|
|
5
5
|
export type { SupportedSKChainIds, WalletPolicy as SKWalletPolicy, } from "../domain/wallet/contract.js";
|
|
6
6
|
export type { SKTheme } from "./theme.js";
|
|
7
|
-
export { DomainDashboardYieldCategory as DashboardYieldCategory, EvmChainIds, MiscChainIds, SubstrateChainIds, };
|
|
7
|
+
export { DomainDashboardYieldCategory as DashboardYieldCategory, DomainYieldProviderId as YieldProviderId, EvmChainIds, MiscChainIds, SubstrateChainIds, };
|
|
8
8
|
type Hex = `0x${string}`;
|
|
9
9
|
export type SKEip712TypedData = {
|
|
10
10
|
readonly domain: {
|
|
@@ -201,7 +201,10 @@ export type SKTxMeta = ActionMeta & {
|
|
|
201
201
|
};
|
|
202
202
|
/**
|
|
203
203
|
* Outcome of `SKWallet.sendTransaction`. A bare string is the broadcast hash.
|
|
204
|
-
* `cancelled
|
|
204
|
+
* - `cancelled`: the user declined in the wallet. Nothing was broadcast.
|
|
205
|
+
* - `error`: the request failed. Include `txHash` whenever the transaction
|
|
206
|
+
* was broadcast before the failure (for example a receipt timeout): the
|
|
207
|
+
* Widget then tracks that transaction instead of asking to sign it again.
|
|
205
208
|
*/
|
|
206
209
|
export type SKTransactionResult = string | {
|
|
207
210
|
type: "success";
|
|
@@ -211,6 +214,7 @@ export type SKTransactionResult = string | {
|
|
|
211
214
|
} | {
|
|
212
215
|
type: "error";
|
|
213
216
|
error: string;
|
|
217
|
+
txHash?: string;
|
|
214
218
|
};
|
|
215
219
|
/**
|
|
216
220
|
* Outcome of `SKWallet.signMessage`. A bare string is the signature.
|
|
@@ -375,6 +379,13 @@ export type SKTrackingConfig = {
|
|
|
375
379
|
* The value is a yield ID, or `"*"` for the widget's default choice.
|
|
376
380
|
*/
|
|
377
381
|
export type SKPreferredTokenYieldsPerNetwork = Readonly<Record<string, Readonly<Record<`${string}-${string}`, string>>>>;
|
|
382
|
+
/**
|
|
383
|
+
* Yield provider IDs to list first in each dashboard category tab, in rank
|
|
384
|
+
* order. Matches a yield's provider, not the validators it stakes with.
|
|
385
|
+
* Known IDs are in `YieldProviderId`; other strings are accepted so newer
|
|
386
|
+
* providers work before the widget lists them.
|
|
387
|
+
*/
|
|
388
|
+
export type SKYieldProviderOrder = Partial<Record<DashboardYieldCategory, Array<YieldProviderId | (string & {})>>>;
|
|
378
389
|
type SettingsPropsBase = {
|
|
379
390
|
/** StakeKit API key. Read at mount; remount the widget to change it. */
|
|
380
391
|
apiKey: string;
|
|
@@ -394,6 +405,8 @@ type SettingsPropsBase = {
|
|
|
394
405
|
onMountAnimationComplete?: () => void;
|
|
395
406
|
/** Hides the network badge on token icons. */
|
|
396
407
|
hideNetworkLogo?: boolean;
|
|
408
|
+
/** Hides the estimated gas fee on the review screen. Commission and protocol fees stay visible. */
|
|
409
|
+
hideGasFee?: boolean;
|
|
397
410
|
/** Skips the initial layout and reveal animation. */
|
|
398
411
|
disableInitLayoutAnimation?: boolean;
|
|
399
412
|
/** Keeps the amount input font size fixed instead of shrinking it for long values. */
|
|
@@ -443,6 +456,11 @@ type SettingsPropsBase = {
|
|
|
443
456
|
dashboardVariant?: boolean;
|
|
444
457
|
/** Order of yield categories. Omitted categories follow in the default order. */
|
|
445
458
|
dashboardYieldCategoryOrder?: DashboardYieldCategory[];
|
|
459
|
+
/**
|
|
460
|
+
* Lists these yield providers first within each category tab, and selects
|
|
461
|
+
* the first one by default. Applies only with category yield grouping.
|
|
462
|
+
*/
|
|
463
|
+
yieldProviderOrder?: SKYieldProviderOrder;
|
|
446
464
|
/** Lists yields flat or grouped by category. Defaults to `"category"` with `dashboardVariant`, else `"flat"`. */
|
|
447
465
|
yieldGrouping?: "flat" | "category";
|
|
448
466
|
/** Offers institutional wallets instead of the regular wallet list. Read at mount. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,D as t,R as n,z as r}from"./ModalController-BhWRBcfd.js";import{r as i}from"./NetworkUtil-DsIkz0Dz.js";var a=r({message:``,variant:`info`,open:!1}),o=t({state:a,subscribeKey(e,t){return n(a,e,t)},open(t,n){let{debug:r}=e.state,{code:o,displayMessage:s,debugMessage:c}=t;if(s&&r&&(a.message=s,a.variant=n,a.open=!0),c){if(!i.IS_DEVELOPMENT)return;let e=typeof c==`function`?c():c,t=o?{code:o}:void 0;n===`error`?console.error(e,t):n===`warning`?console.warn(e,t):console.info(e,t)}},warn(e,t,n){a.open=!0,a.message=e,a.variant=`warning`,t&&console.warn(t,n)},close(){a.open=!1,a.message=``,a.variant=`info`}});export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gn as e}from"./call-ttPZjh8C.js";import{At as t,Ct as n,jt as r}from"./formatUnits-ELraYs2w.js";import{h as i,n as a,r as o}from"./_esm-DOPbMym1.js";import{P as s,n as c}from"./ModalController-CWwEAkfw.js";import{r as l}from"./NetworkUtil-DsIkz0Dz.js";import{n as u}from"./HelpersUtil-BokHy7la.js";function d(e,t={}){let{key:n=`fallback`,name:r=`Fallback`,rank:i=!1,shouldThrow:a=f,retryCount:s,retryDelay:c}=t;return(({chain:t,pollingInterval:l=4e3,timeout:u,...d})=>{let f=e,m=()=>{},h=o({key:n,name:r,async request({method:e,params:n}){let r,i=async(o=0)=>{let s=f[o]({...d,chain:t,retryCount:0,timeout:u});try{let t=await s.request({method:e,params:n});return m({method:e,params:n,response:t,transport:s,status:`success`}),t}catch(c){if(m({error:c,method:e,params:n,transport:s,status:`error`}),a(c)||o===f.length-1||(r??=f.slice(o+1).some(n=>{let{include:r,exclude:i}=n({chain:t}).config.methods||{};return r?r.includes(e):!i||!i.includes(e)}),!r))throw c;return i(o+1)}};return i()},retryCount:s,retryDelay:c,type:`fallback`},{onResponse:e=>m=e,transports:f.map(e=>e({chain:t,retryCount:0}))});if(i){let e=typeof i==`object`?i:{};p({chain:t,interval:e.interval??l,onTransports:e=>f=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:f,weights:e.weights})}return h})}function f(i){return!!(`code`in i&&typeof i.code==`number`&&(i.code===n.code||i.code===t.code||i.code===r.code||e.nodeMessage.test(i.message)||i.code===5e3))}function p({chain:e,interval:t=4e3,onTransports:n,ping:r,sampleCount:a=10,timeout:o=1e3,transports:s,weights:c={}}){let{stability:l=.7,latency:u=.3}=c,d=[],f=async()=>{let c=await Promise.all(s.map(async t=>{let n=t({chain:e,retryCount:0,timeout:o}),i=Date.now(),a,s;try{await(r?r({transport:n}):n.request({method:`net_listening`})),s=1}catch{s=0}finally{a=Date.now()}return{latency:a-i,success:s}}));d.push(c),d.length>a&&d.shift();let p=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));n(s.map((e,t)=>{let n=d.map(e=>e[t].latency),r=1-n.reduce((e,t)=>e+t,0)/n.length/p,i=d.map(e=>e[t].success),a=i.reduce((e,t)=>e+t,0)/i.length;return a===0?[0,t]:[u*r+l*a,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>s[e])),await i(t),f()};f()}var m={ConnectorExplorerIds:{[l.CONNECTOR_ID.COINBASE]:`d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8`,[l.CONNECTOR_ID.COINBASE_SDK]:`d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa`,[l.CONNECTOR_ID.SAFE]:`225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f`,[l.CONNECTOR_ID.LEDGER]:`19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927`,[l.CONNECTOR_ID.OKX]:`971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709`,[u.METMASK_CONNECTOR_NAME]:`c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96`,[u.TRUST_CONNECTOR_NAME]:`4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0`,[u.SOLFLARE_CONNECTOR_NAME]:`1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79`,[u.PHANTOM_CONNECTOR_NAME]:`a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393`,[u.COIN98_CONNECTOR_NAME]:`2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01`,[u.MAGIC_EDEN_CONNECTOR_NAME]:`8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6`,[u.BACKPACK_CONNECTOR_NAME]:`2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0`,[u.BITGET_CONNECTOR_NAME]:`38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662`,[u.FRONTIER_CONNECTOR_NAME]:`85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041`,[u.XVERSE_CONNECTOR_NAME]:`2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b`,[u.LEATHER_CONNECTOR_NAME]:`483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13`,[u.OKX_CONNECTOR_NAME]:`971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709`,[u.BINANCE_CONNECTOR_NAME]:`2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25`},NetworkImageIds:{1:`ba0ba0cd-17c6-4806-ad93-f9d174f17900`,42161:`3bff954d-5cb0-47a0-9a23-d20192e74600`,43114:`30c46e53-e989-45fb-4549-be3bd4eb3b00`,56:`93564157-2e8e-4ce7-81df-b264dbee9b00`,250:`06b26297-fe0c-4733-5d6b-ffa5498aac00`,10:`ab9c186a-c52f-464b-2906-ca59d760a400`,137:`41d04d42-da3b-4453-8506-668cc0727900`,5e3:`e86fae9b-b770-4eea-e520-150e12c81100`,295:`6a97d510-cac8-4e58-c7ce-e8681b044c00`,11155111:`e909ea0a-f92a-4512-c8fc-748044ea6800`,84532:`a18a7ecd-e307-4360-4746-283182228e00`,1301:`4eeea7ef-0014-4649-5d1d-07271a80f600`,130:`2257980a-3463-48c6-cbac-a42d2a956e00`,10143:`0a728e83-bacb-46db-7844-948f05434900`,143:`0a728e83-bacb-46db-7844-948f05434900`,100:`02b53f6a-e3d4-479e-1cb4-21178987d100`,9001:`f926ff41-260d-4028-635e-91913fc28e00`,324:`b310f07f-4ef7-49f3-7073-2a0a39685800`,314:`5a73b3dd-af74-424e-cae0-0de859ee9400`,4689:`34e68754-e536-40da-c153-6ef2e7188a00`,1088:`3897a66d-40b9-4833-162f-a2c90531c900`,1284:`161038da-44ae-4ec7-1208-0ea569454b00`,1285:`f1d73bb6-5450-4e18-38f7-fb6484264a00`,7777777:`845c60df-d429-4991-e687-91ae45791600`,42220:`ab781bbc-ccc6-418d-d32d-789b15da1f00`,8453:`7289c336-3981-4081-c5f4-efc26ac64a00`,1313161554:`3ff73439-a619-4894-9262-4470c773a100`,2020:`b8101fc0-9c19-4b6f-ec65-f6dfff106e00`,2021:`b8101fc0-9c19-4b6f-ec65-f6dfff106e00`,80094:`e329c2c9-59b0-4a02-83e4-212ff3779900`,2741:`fc2427d1-5af9-4a9c-8da5-6f94627cd900`,30:`fb7e1624-99e3-4c36-ea01-4cfe46c4a300`,31:`2eb3d92a-3d77-42aa-87c9-190adb144800`,"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":`a1b58899-f671-4276-6a5e-56ca5bd59700`,"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":`a1b58899-f671-4276-6a5e-56ca5bd59700`,EtWTRABZaYq6iMfeYKouRu166VU2xqa1:`a1b58899-f671-4276-6a5e-56ca5bd59700`,"000000000019d6689c085ae165831e93":`0b4838db-0161-4ffe-022d-532bf03dba00`,"000000000933ea01ad0ee984209779ba":`39354064-d79b-420b-065d-f980c4b78200`,"00000008819873e925422c1ff0f99f7c":`b3406e4a-bbfc-44fb-e3a6-89673c78b700`,"-239":`20f673c0-095e-49b2-07cf-eb5049dcf600`,"-3":`20f673c0-095e-49b2-07cf-eb5049dcf600`,"0x2b6653dc":`3502bb86-cc4e-420f-a387-59ea63a28b00`,"0x94a9059e":`3502bb86-cc4e-420f-a387-59ea63a28b00`,"0xcd8690dc":`3502bb86-cc4e-420f-a387-59ea63a28b00`,pubnet:``,testnet:``},ConnectorImageIds:{[l.CONNECTOR_ID.COINBASE]:`0c2840c3-5b04-4c44-9661-fbd4b49e1800`,[l.CONNECTOR_ID.COINBASE_SDK]:`0c2840c3-5b04-4c44-9661-fbd4b49e1800`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`bba2c8be-7fd1-463e-42b1-796ecb0ad200`,[l.CONNECTOR_ID.SAFE]:`461db637-8616-43ce-035a-d89b8a1d5800`,[l.CONNECTOR_ID.LEDGER]:`54a1aa77-d202-4f8d-0fb2-5d2bb6db0300`,[l.CONNECTOR_ID.WALLET_CONNECT]:`ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400`,[l.CONNECTOR_ID.INJECTED]:`07ba87ed-43aa-4adf-4540-9e6a2b9cae00`},ConnectorNamesMap:{[l.CONNECTOR_ID.INJECTED]:`Browser Wallet`,[l.CONNECTOR_ID.WALLET_CONNECT]:`WalletConnect`,[l.CONNECTOR_ID.COINBASE]:`Coinbase`,[l.CONNECTOR_ID.COINBASE_SDK]:`Coinbase`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`Base Account`,[l.CONNECTOR_ID.LEDGER]:`Ledger`,[l.CONNECTOR_ID.SAFE]:`Safe`},ConnectorTypesMap:{[l.CONNECTOR_ID.INJECTED]:`INJECTED`,[l.CONNECTOR_ID.WALLET_CONNECT]:`WALLET_CONNECT`,[l.CONNECTOR_ID.EIP6963]:`ANNOUNCED`,[l.CONNECTOR_ID.AUTH]:`AUTH`,[l.CONNECTOR_ID.COINBASE]:`EXTERNAL`,[l.CONNECTOR_ID.COINBASE_SDK]:`EXTERNAL`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`EXTERNAL`,[u.CONNECTOR_TYPE_AUTH]:`AUTH`},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},h=`rpc.walletconnect.org`;function g(e,t){let n=new URL(`https://rpc.walletconnect.org/v1/`);return n.searchParams.set(`chainId`,e),n.searchParams.set(`projectId`,t),n.toString()}var _=`near:mainnet.solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp.eip155:1101.eip155:56.eip155:42161.eip155:7777777.eip155:59144.eip155:324.solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1.eip155:5000.solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz.eip155:80084.eip155:5003.eip155:100.eip155:8453.eip155:42220.eip155:1313161555.eip155:17000.eip155:1.eip155:300.eip155:1313161554.eip155:1329.eip155:84532.eip155:421614.eip155:11155111.eip155:8217.eip155:43114.solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z.eip155:999999999.eip155:11155420.eip155:80002.eip155:97.eip155:43113.eip155:137.eip155:10.eip155:1301.eip155:80094.eip155:80069.eip155:560048.eip155:31.eip155:2818.eip155:57054.eip155:911867.eip155:534351.eip155:1112.eip155:534352.eip155:1111.eip155:146.eip155:130.eip155:1284.eip155:30.eip155:2810.eip155:55931.bip122:000000000019d6689c085ae165831e93.bip122:000000000933ea01ad0ee984209779ba.tron:0x2b6653dc.tron:0xcd8690dc`.split(`.`),v={extendRpcUrlWithProjectId(e,t){let n=!1;try{n=new URL(e).host===h}catch{n=!1}if(n){let n=new URL(e);return n.searchParams.has(`projectId`)||n.searchParams.set(`projectId`,t),n.toString()}return e},isCaipNetwork(e){return`chainNamespace`in e&&`caipNetworkId`in e},getChainNamespace(e){return this.isCaipNetwork(e)?e.chainNamespace:l.CHAIN.EVM},getCaipNetworkId(e){return this.isCaipNetwork(e)?e.caipNetworkId:`${l.CHAIN.EVM}:${e.id}`},getDefaultRpcUrl(e,t,n){let r=e.rpcUrls?.default?.http?.[0];return _.includes(t)?g(t,n):r||``},extendCaipNetwork(e,{customNetworkImageUrls:t,projectId:n,customRpcUrls:r}){let i=this.getChainNamespace(e),a=this.getCaipNetworkId(e),o=e.rpcUrls?.default?.http?.[0],s=this.getDefaultRpcUrl(e,a,n),c=e?.rpcUrls?.chainDefault?.http?.[0]||o,l=r?.[a]?.map(e=>e.url)||[],u=[...l,...s?[s]:[]],d=[...l];return c&&!d.includes(c)&&d.push(c),{...e,chainNamespace:i,caipNetworkId:a,assets:{imageId:m.NetworkImageIds[e.id],imageUrl:t?.[e.id]},rpcUrls:{...e.rpcUrls,default:{http:u},chainDefault:{http:d}}}},extendCaipNetworks(e,{customNetworkImageUrls:t,projectId:n,customRpcUrls:r}){return e.map(e=>v.extendCaipNetwork(e,{customNetworkImageUrls:t,customRpcUrls:r,projectId:n}))},getViemTransport(e,t,n){let r=[];return n?.forEach(e=>{r.push(a(e.url,e.config))}),_.includes(e.caipNetworkId)&&r.push(a(g(e.caipNetworkId,t),{fetchOptions:{headers:{"Content-Type":`text/plain`}}})),e?.rpcUrls?.default?.http?.forEach(e=>{r.push(a(e))}),d(r)},extendWagmiTransports(e,t,n){if(_.includes(e.caipNetworkId)){let r=this.getDefaultRpcUrl(e,e.caipNetworkId,t);return d([n,a(r)])}return n},getUnsupportedNetwork(e){return{id:e.split(`:`)[1],caipNetworkId:e,name:l.UNSUPPORTED_NETWORK_NAME,chainNamespace:e.split(`:`)[0],nativeCurrency:{name:``,decimals:0,symbol:``},rpcUrls:{default:{http:[]}}}},getCaipNetworkFromStorage(e){let t=s.getActiveCaipNetworkId(),n=c.getAllRequestedCaipNetworks(),r=Array.from(c.state.chains?.keys()||[]),i=t?.split(`:`)[0],a=i?r.includes(i):!1,o=n?.find(e=>e.caipNetworkId===t);return a&&!o&&t?this.getUnsupportedNetwork(t):o||e||n?.[0]}};export{v as t};
|
|
1
|
+
import{gn as e}from"./call-ttPZjh8C.js";import{At as t,Ct as n,jt as r}from"./formatUnits-ELraYs2w.js";import{h as i,n as a,r as o}from"./_esm-DOPbMym1.js";import{P as s,n as c}from"./ModalController-BhWRBcfd.js";import{r as l}from"./NetworkUtil-DsIkz0Dz.js";import{n as u}from"./HelpersUtil-Bpil3MMz.js";function d(e,t={}){let{key:n=`fallback`,name:r=`Fallback`,rank:i=!1,shouldThrow:a=f,retryCount:s,retryDelay:c}=t;return(({chain:t,pollingInterval:l=4e3,timeout:u,...d})=>{let f=e,m=()=>{},h=o({key:n,name:r,async request({method:e,params:n}){let r,i=async(o=0)=>{let s=f[o]({...d,chain:t,retryCount:0,timeout:u});try{let t=await s.request({method:e,params:n});return m({method:e,params:n,response:t,transport:s,status:`success`}),t}catch(c){if(m({error:c,method:e,params:n,transport:s,status:`error`}),a(c)||o===f.length-1||(r??=f.slice(o+1).some(n=>{let{include:r,exclude:i}=n({chain:t}).config.methods||{};return r?r.includes(e):!i||!i.includes(e)}),!r))throw c;return i(o+1)}};return i()},retryCount:s,retryDelay:c,type:`fallback`},{onResponse:e=>m=e,transports:f.map(e=>e({chain:t,retryCount:0}))});if(i){let e=typeof i==`object`?i:{};p({chain:t,interval:e.interval??l,onTransports:e=>f=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:f,weights:e.weights})}return h})}function f(i){return!!(`code`in i&&typeof i.code==`number`&&(i.code===n.code||i.code===t.code||i.code===r.code||e.nodeMessage.test(i.message)||i.code===5e3))}function p({chain:e,interval:t=4e3,onTransports:n,ping:r,sampleCount:a=10,timeout:o=1e3,transports:s,weights:c={}}){let{stability:l=.7,latency:u=.3}=c,d=[],f=async()=>{let c=await Promise.all(s.map(async t=>{let n=t({chain:e,retryCount:0,timeout:o}),i=Date.now(),a,s;try{await(r?r({transport:n}):n.request({method:`net_listening`})),s=1}catch{s=0}finally{a=Date.now()}return{latency:a-i,success:s}}));d.push(c),d.length>a&&d.shift();let p=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));n(s.map((e,t)=>{let n=d.map(e=>e[t].latency),r=1-n.reduce((e,t)=>e+t,0)/n.length/p,i=d.map(e=>e[t].success),a=i.reduce((e,t)=>e+t,0)/i.length;return a===0?[0,t]:[u*r+l*a,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>s[e])),await i(t),f()};f()}var m={ConnectorExplorerIds:{[l.CONNECTOR_ID.COINBASE]:`d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8`,[l.CONNECTOR_ID.COINBASE_SDK]:`d0ca99ff52b99abc48743dad0f7fc891e041be73574f7fac4afe5d4bb83845c8`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa`,[l.CONNECTOR_ID.SAFE]:`225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f`,[l.CONNECTOR_ID.LEDGER]:`19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927`,[l.CONNECTOR_ID.OKX]:`971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709`,[u.METMASK_CONNECTOR_NAME]:`c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96`,[u.TRUST_CONNECTOR_NAME]:`4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0`,[u.SOLFLARE_CONNECTOR_NAME]:`1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79`,[u.PHANTOM_CONNECTOR_NAME]:`a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393`,[u.COIN98_CONNECTOR_NAME]:`2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01`,[u.MAGIC_EDEN_CONNECTOR_NAME]:`8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6`,[u.BACKPACK_CONNECTOR_NAME]:`2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0`,[u.BITGET_CONNECTOR_NAME]:`38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662`,[u.FRONTIER_CONNECTOR_NAME]:`85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041`,[u.XVERSE_CONNECTOR_NAME]:`2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b`,[u.LEATHER_CONNECTOR_NAME]:`483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13`,[u.OKX_CONNECTOR_NAME]:`971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709`,[u.BINANCE_CONNECTOR_NAME]:`2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25`},NetworkImageIds:{1:`ba0ba0cd-17c6-4806-ad93-f9d174f17900`,42161:`3bff954d-5cb0-47a0-9a23-d20192e74600`,43114:`30c46e53-e989-45fb-4549-be3bd4eb3b00`,56:`93564157-2e8e-4ce7-81df-b264dbee9b00`,250:`06b26297-fe0c-4733-5d6b-ffa5498aac00`,10:`ab9c186a-c52f-464b-2906-ca59d760a400`,137:`41d04d42-da3b-4453-8506-668cc0727900`,5e3:`e86fae9b-b770-4eea-e520-150e12c81100`,295:`6a97d510-cac8-4e58-c7ce-e8681b044c00`,11155111:`e909ea0a-f92a-4512-c8fc-748044ea6800`,84532:`a18a7ecd-e307-4360-4746-283182228e00`,1301:`4eeea7ef-0014-4649-5d1d-07271a80f600`,130:`2257980a-3463-48c6-cbac-a42d2a956e00`,10143:`0a728e83-bacb-46db-7844-948f05434900`,143:`0a728e83-bacb-46db-7844-948f05434900`,100:`02b53f6a-e3d4-479e-1cb4-21178987d100`,9001:`f926ff41-260d-4028-635e-91913fc28e00`,324:`b310f07f-4ef7-49f3-7073-2a0a39685800`,314:`5a73b3dd-af74-424e-cae0-0de859ee9400`,4689:`34e68754-e536-40da-c153-6ef2e7188a00`,1088:`3897a66d-40b9-4833-162f-a2c90531c900`,1284:`161038da-44ae-4ec7-1208-0ea569454b00`,1285:`f1d73bb6-5450-4e18-38f7-fb6484264a00`,7777777:`845c60df-d429-4991-e687-91ae45791600`,42220:`ab781bbc-ccc6-418d-d32d-789b15da1f00`,8453:`7289c336-3981-4081-c5f4-efc26ac64a00`,1313161554:`3ff73439-a619-4894-9262-4470c773a100`,2020:`b8101fc0-9c19-4b6f-ec65-f6dfff106e00`,2021:`b8101fc0-9c19-4b6f-ec65-f6dfff106e00`,80094:`e329c2c9-59b0-4a02-83e4-212ff3779900`,2741:`fc2427d1-5af9-4a9c-8da5-6f94627cd900`,30:`fb7e1624-99e3-4c36-ea01-4cfe46c4a300`,31:`2eb3d92a-3d77-42aa-87c9-190adb144800`,"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":`a1b58899-f671-4276-6a5e-56ca5bd59700`,"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":`a1b58899-f671-4276-6a5e-56ca5bd59700`,EtWTRABZaYq6iMfeYKouRu166VU2xqa1:`a1b58899-f671-4276-6a5e-56ca5bd59700`,"000000000019d6689c085ae165831e93":`0b4838db-0161-4ffe-022d-532bf03dba00`,"000000000933ea01ad0ee984209779ba":`39354064-d79b-420b-065d-f980c4b78200`,"00000008819873e925422c1ff0f99f7c":`b3406e4a-bbfc-44fb-e3a6-89673c78b700`,"-239":`20f673c0-095e-49b2-07cf-eb5049dcf600`,"-3":`20f673c0-095e-49b2-07cf-eb5049dcf600`,"0x2b6653dc":`3502bb86-cc4e-420f-a387-59ea63a28b00`,"0x94a9059e":`3502bb86-cc4e-420f-a387-59ea63a28b00`,"0xcd8690dc":`3502bb86-cc4e-420f-a387-59ea63a28b00`,pubnet:``,testnet:``},ConnectorImageIds:{[l.CONNECTOR_ID.COINBASE]:`0c2840c3-5b04-4c44-9661-fbd4b49e1800`,[l.CONNECTOR_ID.COINBASE_SDK]:`0c2840c3-5b04-4c44-9661-fbd4b49e1800`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`bba2c8be-7fd1-463e-42b1-796ecb0ad200`,[l.CONNECTOR_ID.SAFE]:`461db637-8616-43ce-035a-d89b8a1d5800`,[l.CONNECTOR_ID.LEDGER]:`54a1aa77-d202-4f8d-0fb2-5d2bb6db0300`,[l.CONNECTOR_ID.WALLET_CONNECT]:`ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400`,[l.CONNECTOR_ID.INJECTED]:`07ba87ed-43aa-4adf-4540-9e6a2b9cae00`},ConnectorNamesMap:{[l.CONNECTOR_ID.INJECTED]:`Browser Wallet`,[l.CONNECTOR_ID.WALLET_CONNECT]:`WalletConnect`,[l.CONNECTOR_ID.COINBASE]:`Coinbase`,[l.CONNECTOR_ID.COINBASE_SDK]:`Coinbase`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`Base Account`,[l.CONNECTOR_ID.LEDGER]:`Ledger`,[l.CONNECTOR_ID.SAFE]:`Safe`},ConnectorTypesMap:{[l.CONNECTOR_ID.INJECTED]:`INJECTED`,[l.CONNECTOR_ID.WALLET_CONNECT]:`WALLET_CONNECT`,[l.CONNECTOR_ID.EIP6963]:`ANNOUNCED`,[l.CONNECTOR_ID.AUTH]:`AUTH`,[l.CONNECTOR_ID.COINBASE]:`EXTERNAL`,[l.CONNECTOR_ID.COINBASE_SDK]:`EXTERNAL`,[l.CONNECTOR_ID.BASE_ACCOUNT]:`EXTERNAL`,[u.CONNECTOR_TYPE_AUTH]:`AUTH`},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]},h=`rpc.walletconnect.org`;function g(e,t){let n=new URL(`https://rpc.walletconnect.org/v1/`);return n.searchParams.set(`chainId`,e),n.searchParams.set(`projectId`,t),n.toString()}var _=`near:mainnet.solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp.eip155:1101.eip155:56.eip155:42161.eip155:7777777.eip155:59144.eip155:324.solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1.eip155:5000.solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz.eip155:80084.eip155:5003.eip155:100.eip155:8453.eip155:42220.eip155:1313161555.eip155:17000.eip155:1.eip155:300.eip155:1313161554.eip155:1329.eip155:84532.eip155:421614.eip155:11155111.eip155:8217.eip155:43114.solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z.eip155:999999999.eip155:11155420.eip155:80002.eip155:97.eip155:43113.eip155:137.eip155:10.eip155:1301.eip155:80094.eip155:80069.eip155:560048.eip155:31.eip155:2818.eip155:57054.eip155:911867.eip155:534351.eip155:1112.eip155:534352.eip155:1111.eip155:146.eip155:130.eip155:1284.eip155:30.eip155:2810.eip155:55931.bip122:000000000019d6689c085ae165831e93.bip122:000000000933ea01ad0ee984209779ba.tron:0x2b6653dc.tron:0xcd8690dc`.split(`.`),v={extendRpcUrlWithProjectId(e,t){let n=!1;try{n=new URL(e).host===h}catch{n=!1}if(n){let n=new URL(e);return n.searchParams.has(`projectId`)||n.searchParams.set(`projectId`,t),n.toString()}return e},isCaipNetwork(e){return`chainNamespace`in e&&`caipNetworkId`in e},getChainNamespace(e){return this.isCaipNetwork(e)?e.chainNamespace:l.CHAIN.EVM},getCaipNetworkId(e){return this.isCaipNetwork(e)?e.caipNetworkId:`${l.CHAIN.EVM}:${e.id}`},getDefaultRpcUrl(e,t,n){let r=e.rpcUrls?.default?.http?.[0];return _.includes(t)?g(t,n):r||``},extendCaipNetwork(e,{customNetworkImageUrls:t,projectId:n,customRpcUrls:r}){let i=this.getChainNamespace(e),a=this.getCaipNetworkId(e),o=e.rpcUrls?.default?.http?.[0],s=this.getDefaultRpcUrl(e,a,n),c=e?.rpcUrls?.chainDefault?.http?.[0]||o,l=r?.[a]?.map(e=>e.url)||[],u=[...l,...s?[s]:[]],d=[...l];return c&&!d.includes(c)&&d.push(c),{...e,chainNamespace:i,caipNetworkId:a,assets:{imageId:m.NetworkImageIds[e.id],imageUrl:t?.[e.id]},rpcUrls:{...e.rpcUrls,default:{http:u},chainDefault:{http:d}}}},extendCaipNetworks(e,{customNetworkImageUrls:t,projectId:n,customRpcUrls:r}){return e.map(e=>v.extendCaipNetwork(e,{customNetworkImageUrls:t,customRpcUrls:r,projectId:n}))},getViemTransport(e,t,n){let r=[];return n?.forEach(e=>{r.push(a(e.url,e.config))}),_.includes(e.caipNetworkId)&&r.push(a(g(e.caipNetworkId,t),{fetchOptions:{headers:{"Content-Type":`text/plain`}}})),e?.rpcUrls?.default?.http?.forEach(e=>{r.push(a(e))}),d(r)},extendWagmiTransports(e,t,n){if(_.includes(e.caipNetworkId)){let r=this.getDefaultRpcUrl(e,e.caipNetworkId,t);return d([n,a(r)])}return n},getUnsupportedNetwork(e){return{id:e.split(`:`)[1],caipNetworkId:e,name:l.UNSUPPORTED_NETWORK_NAME,chainNamespace:e.split(`:`)[0],nativeCurrency:{name:``,decimals:0,symbol:``},rpcUrls:{default:{http:[]}}}},getCaipNetworkFromStorage(e){let t=s.getActiveCaipNetworkId(),n=c.getAllRequestedCaipNetworks(),r=Array.from(c.state.chains?.keys()||[]),i=t?.split(`:`)[0],a=i?r.includes(i):!1,o=n?.find(e=>e.caipNetworkId===t);return a&&!o&&t?this.getUnsupportedNetwork(t):o||e||n?.[0]}};export{v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{At as e,Ct as t,Dt as n,Tt as r,bt as i,jt as a,nn as o,st as s,un as ee,wt as te,xt as c}from"./Result-DQM8aaFz.js";import{Ci as l,Fi as ne,Ii as u,Li as d,Ni as f,gr as re,t as p,wi as ie,zt as ae}from"./Cause-1VWVIQY3.js";import{n as oe}from"./Clock-CBDokwR8.js";var m=`~effect/DateTime`,h=`~effect/DateTime/TimeZone`,g={[m]:m,pipe(){return ee(this,arguments)},[s](){return this.toString()},toJSON(){return B(this).toJSON()}},_={...g,_tag:`Utc`,[e](){return r(this.epochMilliseconds)},[c](e){return S(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${B(this).toJSON()})`}},v={...g,_tag:`Zoned`,[e](){return t(r(this.epochMilliseconds))(te(this.zone))},[c](e){return S(e)&&e._tag===`Zoned`&&this.epochMilliseconds===e.epochMilliseconds&&i(this.zone,e.zone)},toString(){return`DateTime.Zoned(${De(this)})`}},y={[h]:h,[s](){return this.toString()}},b={...y,_tag:`Named`,[e](){return n(`Named:${this.id}`)},[c](e){return se(e)&&e._tag===`Named`&&this.id===e.id},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}};({...y});var x=(e,t,n)=>{let r=Object.create(v);return r.epochMilliseconds=e,r.zone=t,Object.defineProperty(r,"partsUtc",{value:n,enumerable:!1,writable:!0}),Object.defineProperty(r,"adjustedEpochMillis",{value:void 0,enumerable:!1,writable:!0}),Object.defineProperty(r,"partsAdjusted",{value:void 0,enumerable:!1,writable:!0}),r},S=e=>a(e,m),C=e=>S(e[0]),se=e=>a(e,h),ce=e=>e._tag===`Utc`,w=d((e,t)=>e.epochMilliseconds<t.epochMilliseconds?-1:+(e.epochMilliseconds>t.epochMilliseconds)),T=e=>{let t=Object.create(_);return t.epochMilliseconds=e,Object.defineProperty(t,"partsUtc",{value:void 0,enumerable:!1,writable:!0}),t},E=e=>{let t=e.getTime();if(Number.isNaN(t))throw new p(`Invalid date`);return T(t)},D=e=>{if(S(e))return e;if(e instanceof Date)return E(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return E(new Date(e.epochMilliseconds));let t=new Date(0);return K(t,e),E(t)}return typeof e==`string`&&!le(e)?E(new Date(e+`Z`)):E(new Date(e))},le=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e),ue=l(D),de=ae(oe,T),fe=e=>T(e.epochMilliseconds),O=o(C,(e,t,n)=>n?.adjustForTimeZone===!0?J(e.epochMilliseconds,t,n?.disambiguation??`compatible`):x(e.epochMilliseconds,t,e.partsUtc)),k=new Map,A={day:`numeric`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},j=e=>{let t=e.resolvedOptions().timeZone,n=k.get(t);if(n!==void 0)return n;let r=Object.create(b);return r.id=t,r.format=e,k.set(t,r),r},M=e=>{let t=k.get(e);if(t!==void 0)return t;try{let t=j(new Intl.DateTimeFormat(`en-US`,{...A,timeZone:e}));return k.set(e,t),t}catch{throw new p(`Invalid time zone: ${e}`)}},N=l(M),P=()=>j(new Intl.DateTimeFormat(`en-US`,A)),F=o(C,(e,t,n)=>ie(N(t),t=>O(e,t,n))),I=o(2,(e,t)=>re(W(t)-W(e))),L=f(w),R=ne(w),z=u(w),B=e=>new Date(e.epochMilliseconds),V=e=>{if(e._tag===`Utc`)return new Date(e.epochMilliseconds);if(e.zone._tag===`Offset`)return new Date(e.epochMilliseconds+e.zone.offset);if(e.adjustedEpochMilliseconds!==void 0)return new Date(e.adjustedEpochMilliseconds);let t=e.zone.format.formatToParts(e.epochMilliseconds).filter(e=>e.type!==`literal`),n=new Date(0);return n.setUTCFullYear(Number(t[2].value),Number(t[0].value)-1,Number(t[1].value)),n.setUTCHours(Number(t[3].value),Number(t[4].value),Number(t[5].value),t[6]?.type===`fractionalSecond`?Number(t[6].value):(e.epochMilliseconds%1e3+1e3)%1e3),e.adjustedEpochMilliseconds=n.getTime(),n},H=e=>V(e).getTime()-W(e),U=e=>{let t=Math.abs(e),n=Math.floor(t/36e5),r=Math.round(t%36e5/6e4);return r===60&&(n+=1,r=0),`${e<0?`-`:`+`}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},pe=e=>U(H(e)),W=e=>e.epochMilliseconds,G=e=>({millisecond:e.getUTCMilliseconds(),second:e.getUTCSeconds(),minute:e.getUTCMinutes(),hour:e.getUTCHours(),day:e.getUTCDate(),weekDay:e.getUTCDay(),month:e.getUTCMonth()+1,year:e.getUTCFullYear()}),me=e=>e._tag===`Utc`?he(e):(e.partsAdjusted===void 0&&(e.partsAdjusted=xe(e,G)),e.partsAdjusted),he=e=>(e.partsUtc===void 0&&(e.partsUtc=Se(e,G)),e.partsUtc),K=(e,t)=>{if((t.year!==void 0||t.month!==void 0||t.day!==void 0)&&e.setUTCFullYear(t.year??e.getUTCFullYear(),t.month===void 0?e.getUTCMonth():t.month-1,t.day??e.getUTCDate()),t.weekDay!==void 0){let n=t.weekDay-e.getUTCDay();e.setUTCDate(e.getUTCDate()+n)}t.hour!==void 0&&e.setUTCHours(t.hour),t.minute!==void 0&&e.setUTCMinutes(t.minute),t.second!==void 0&&e.setUTCSeconds(t.second),t.millisecond!==void 0&&e.setUTCMilliseconds(t.millisecond)},ge=o(2,(e,t)=>X(e,e=>K(e,t))),q=864e5,J=(e,t,n)=>{if(t._tag===`Offset`)return x(e-t.offset,t);let r=Y(e-q,e,t),i=Y(e+q,e,t);if(r===i)return x(e-r,t);let a=r<i,o=r-i;if(a){if(Y(e-i,e,t)===i)return x(e-i,t);let a=x(e-r,t);if(e!==V(a).getTime())switch(n){case`reject`:{let n=new Date(e).toISOString();throw RangeError(`Gap time: ${n} does not exist in time zone ${t.id}`)}case`earlier`:return x(e-i,t);case`compatible`:case`later`:return a}return a}if(Y(e-r,e,t)===r){if(n===`earlier`||n===`compatible`||Y(e-r+o,e+o,t)===r)return x(e-r,t);if(n===`reject`){let n=new Date(e).toISOString();throw RangeError(`Ambiguous time: ${n} occurs twice in time zone ${t.id}`)}}return x(e-i,t)},_e=/([+-])(\d{2}):(\d{2})$/,ve=e=>{let t=_e.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},Y=(e,t,n)=>{let r=n.format.formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``;if(r===`GMT`)return 0;let i=ve(r);return i===null?H(x(t,n)):i},X=o(C,(e,t,n)=>{if(e._tag===`Utc`){let n=B(e);return t(n),T(n.getTime())}let r=V(e),i=new Date(r.getTime());return t(i),J(i.getTime(),e.zone,n?.disambiguation??`compatible`)}),ye=o(2,(e,t)=>be(e,e=>{let n=new Date(e);return t(n),n.getTime()})),be=o(2,(e,t)=>{let n=t(W(e));return e._tag===`Utc`?T(n):x(n,e.zone)}),xe=o(2,(e,t)=>t(V(e))),Se=o(2,(e,t)=>t(B(e))),Z=o(2,(e,t)=>{let n=ye(e,e=>{t.milliseconds&&e.setTime(e.getTime()+t.milliseconds),t.seconds&&e.setTime(e.getTime()+t.seconds*1e3),t.minutes&&e.setTime(e.getTime()+t.minutes*60*1e3),t.hours&&e.setTime(e.getTime()+t.hours*60*60*1e3)});return!t.days&&!t.weeks&&!t.months&&!t.years?n:X(n,e=>{if(t.days&&e.setUTCDate(e.getUTCDate()+t.days),t.weeks&&e.setUTCDate(e.getUTCDate()+t.weeks*7),t.months){let n=e.getUTCDate();e.setUTCMonth(e.getUTCMonth()+t.months+1,0),n<e.getUTCDate()&&e.setUTCDate(n)}if(t.years){let n=e.getUTCDate(),r=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()+t.years,r+1,0),n<e.getUTCDate()&&e.setUTCDate(n)}})}),Ce=o(2,(e,t)=>{let n={};for(let e in t)n[e]=-1*t[e];return Z(e,n)}),we=e=>e._tag===`Named`?e.id:U(e.offset),Te=o(C,(e,t)=>{try{return new Intl.DateTimeFormat(t?.locale,{timeZone:e._tag===`Utc`?`UTC`:we(e.zone),...t}).format(e.epochMilliseconds)}catch{return new Intl.DateTimeFormat(t?.locale,{timeZone:`UTC`,...t}).format(V(e))}}),Ee=e=>B(e).toISOString(),Q=e=>{let t=V(e);return e._tag===`Utc`?t.toISOString():`${t.toISOString().slice(0,-1)}${pe(e)}`},De=e=>e.zone._tag===`Offset`?Q(e):`${Q(e)}[${e.zone.id}]`,Oe=S,ke=ce,Ae=D,je=ue,Me=de,Ne=fe,Pe=O,$=M,Fe=P,Ie=F,Le=I,Re=L,ze=R,Be=z,Ve=B,He=W,Ue=me,We=ge,Ge=Z,Ke=Ce,qe=Te,Je=Ee;export{$ as S,Ve as _,Oe as a,Ne as b,Be as c,Ae as d,Me as f,Ke as g,Ie as h,Je as i,ke as l,Pe as m,Le as n,Re as o,We as p,qe as r,ze as s,Ge as t,je as u,He as v,Fe as x,Ue as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,K as t,M as n,N as r,P as i,S as a,c as o,d as s,g as c,k as l,m as u,n as d,t as f,v as p}from"./ModalController-CWwEAkfw.js";import{r as m}from"./NetworkUtil-DsIkz0Dz.js";import"./dist-7PipG_eL.js";var h=null,g={getSIWX(){return e.state.siwx},async initializeIfEnabled(t=d.getActiveCaipAddress()){let n=e.state.siwx;if(!(n&&t))return;let[r,i,s]=t.split(`:`);if(d.checkIfSupportedNetwork(r,`${r}:${i}`))try{if(e.state.remoteFeatures?.emailCapture){let e=d.getAccountData(r)?.user;await f.open({view:`DataCapture`,data:{email:e?.email??void 0}});return}if(h&&await h,(await n.getSessions(`${r}:${i}`,s)).length)return;await f.open({view:`SIWXSignMessage`})}catch(e){a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:this.getSIWXEventProperties(e)}),await o._getClient()?.disconnect().catch(console.error),p.reset(`Connect`),l.showError(`A problem occurred while trying initialize authentication`)}},async isAuthenticated(n=d.getActiveCaipAddress()){if(!e.state.siwx||!n)return!0;let{chainNamespace:r,chainId:i,address:a}=t.parseCaipAddress(n),o=`${r}:${i}`;return(await g.getSessions({address:a,caipNetworkId:o})).length>0},async requestSignMessage(){let t=e.state.siwx,n=r.getPlainAddress(d.getActiveCaipAddress()),i=s();if(!t)throw Error(`SIWX is not enabled`);if(!n)throw Error(`No ActiveCaipAddress found`);if(!i)throw Error(`No ActiveCaipNetwork or client found`);try{let e=await t.createMessage({chainId:i.caipNetworkId,accountAddress:n}),r=e.toString(),s=``;t.signMessage?s=await t.signMessage({message:r,chainId:i.caipNetworkId,accountAddress:n}):(c.getConnectorId(i.chainNamespace)===m.CONNECTOR_ID.AUTH&&p.pushTransactionStack({}),s=await o.signMessage(r)||``),await t.addSession({data:e,message:r,signature:s}),d.setLastConnectedSIWECaipNetwork(i),f.close(),a.sendEvent({type:`track`,event:`SIWX_AUTH_SUCCESS`,properties:this.getSIWXEventProperties()})}catch(e){(!f.state.open||p.state.view===`ApproveTransaction`)&&await f.open({view:`SIWXSignMessage`}),l.showError(`Error signing message`),a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:this.getSIWXEventProperties(e)})}},async cancelSignMessage(){try{let e=this.getSIWX();if(e?.getRequired?.()){let t=d.getLastConnectedSIWECaipNetwork();if(t){let n=await e?.getSessions(t?.caipNetworkId,r.getPlainAddress(d.getActiveCaipAddress())||``);n&&n.length>0?await d.switchActiveNetwork(t):await o.disconnect()}else await o.disconnect()}else f.close();f.close(),a.sendEvent({event:`CLICK_CANCEL_SIWX`,type:`track`,properties:this.getSIWXEventProperties()})}catch{}},async getAllSessions(){let e=this.getSIWX(),t=d.getAllRequestedCaipNetworks(),n=[];return await Promise.all(t.map(async t=>{let i=await e?.getSessions(t.caipNetworkId,r.getPlainAddress(d.getActiveCaipAddress())||``);i&&n.push(...i)})),n},async getSessions(t){let n=e.state.siwx,i=t?.address;if(!i){let e=d.getActiveCaipAddress();i=r.getPlainAddress(e)}let a=t?.caipNetworkId;return a||=d.getActiveCaipNetwork()?.caipNetworkId,n&&i&&a?n.getSessions(a,i):[]},async isSIWXCloseDisabled(){let e=this.getSIWX();if(e){let t=p.state.view===`ApproveTransaction`,n=p.state.view===`SIWXSignMessage`;if(t||n)return e.getRequired?.()&&(await this.getSessions()).length===0}return!1},async authConnectorAuthenticate({authConnector:t,chainId:n,socialUri:r,preferredAccountType:i,chainNamespace:a}){let o=g.getSIWX(),c=s();if(!o||!a.includes(m.CHAIN.EVM)||e.state.remoteFeatures?.emailCapture){let e=await t.connect({chainId:n,socialUri:r,preferredAccountType:i});return{address:e.address,chainId:e.chainId,accounts:e.accounts}}let l=`${a}:${n}`,u=await o.createMessage({chainId:l,accountAddress:`<<AccountAddress>>`}),f={accountAddress:u.accountAddress,chainId:u.chainId,domain:u.domain,uri:u.uri,version:u.version,nonce:u.nonce,notBefore:u.notBefore,statement:u.statement,resources:u.resources,requestId:u.requestId,issuedAt:u.issuedAt,expirationTime:u.expirationTime,serializedMessage:u.toString()},p=await t.connect({chainId:n,socialUri:r,siwxMessage:f,preferredAccountType:i});return f.accountAddress=p.address,f.serializedMessage=p.message||``,p.signature&&p.message&&await g.addEmbeddedWalletSession(f,p.message,p.signature),d.setLastConnectedSIWECaipNetwork(c),{address:p.address,chainId:p.chainId,accounts:p.accounts}},async addEmbeddedWalletSession(e,t,n){if(h)return h;let r=g.getSIWX();return r?(h=r.addSession({data:e,message:t,signature:n}).finally(()=>{h=null}),h):Promise.resolve()},async universalProviderAuthenticate({universalProvider:e,chains:t,methods:n}){let r=g.getSIWX(),i=s(),o=new Set(t.map(e=>e.split(`:`)[0]));if(!r||o.size!==1||!o.has(`eip155`))return!1;let c=await r.createMessage({chainId:s()?.caipNetworkId||``,accountAddress:``}),u=await e.authenticate({nonce:c.nonce,domain:c.domain,uri:c.uri,exp:c.expirationTime,iat:c.issuedAt,nbf:c.notBefore,requestId:c.requestId,version:c.version,resources:c.resources,statement:c.statement,chainId:c.chainId,methods:n,chains:[c.chainId,...t.filter(e=>e!==c.chainId)]});l.showLoading(`Authenticating...`,{autoClose:!1});let f={...u.session.peer.metadata,name:u.session.peer.metadata.name,icon:u.session.peer.metadata.icons?.[0],type:`WALLET_CONNECT`};if(d.setAccountProp(`connectedWalletInfo`,f,Array.from(o)[0]),u?.auths?.length){let t=u.auths.map(t=>{let n=e.client.formatAuthMessage({request:t.p,iss:t.p.iss});return{data:{...t.p,accountAddress:t.p.iss.split(`:`).slice(-1).join(``),chainId:t.p.iss.split(`:`).slice(2,4).join(`:`),uri:t.p.aud??``,version:t.p.version||c.version,expirationTime:t.p.exp,issuedAt:t.p.iat,notBefore:t.p.nbf},message:n,signature:t.s.s,cacao:t}});try{await r.setSessions(t),i&&d.setLastConnectedSIWECaipNetwork(i),a.sendEvent({type:`track`,event:`SIWX_AUTH_SUCCESS`,properties:g.getSIWXEventProperties()})}catch(t){throw a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:g.getSIWXEventProperties(t)}),await e.disconnect().catch(console.error),t}finally{l.hide()}}return!0},getSIWXEventProperties(e){let t=d.state.activeChain;if(!t)throw Error(`SIWXUtil:getSIWXEventProperties - namespace is required`);return{network:d.state.activeCaipNetwork?.caipNetworkId||``,isSmartAccount:u(t)===n.ACCOUNT_TYPES.SMART_ACCOUNT,message:e?r.parseError(e):void 0}},async clearSessions(){let e=this.getSIWX();e&&await e.setSessions([])}},_=globalThis,ee=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,te=Symbol(),ne=new WeakMap,re=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==te)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ee&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ne.set(t,e))}return e}toString(){return this.cssText}},v=e=>new re(typeof e==`string`?e:e+``,void 0,te),y=(e,...t)=>new re(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,te),ie=(e,t)=>{if(ee)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=_.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},ae=ee?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return v(t)})(e):e,{is:oe,defineProperty:se,getOwnPropertyDescriptor:ce,getOwnPropertyNames:le,getOwnPropertySymbols:ue,getPrototypeOf:de}=Object,b=globalThis,fe=b.trustedTypes,pe=fe?fe.emptyScript:``,me=b.reactiveElementPolyfillSupport,x=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?pe:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},C=(e,t)=>!oe(e,t),he={attribute:!0,type:String,converter:S,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol(`metadata`),b.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=he){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&se(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=ce(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??he}static _$Ei(){if(this.hasOwnProperty(x(`elementProperties`)))return;let e=de(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(x(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x(`properties`))){let e=this.properties,t=[...le(e),...ue(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(ae(e))}else e!==void 0&&t.push(ae(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ie(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?S:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?S:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??C)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};w.elementStyles=[],w.shadowRootOptions={mode:`open`},w[x(`elementProperties`)]=new Map,w[x(`finalized`)]=new Map,me?.({ReactiveElement:w}),(b.reactiveElementVersions??=[]).push(`2.1.2`);var T=globalThis,ge=e=>e,E=T.trustedTypes,_e=E?E.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ve=`$lit$`,D=`lit$${Math.random().toFixed(9).slice(2)}$`,ye=`?`+D,be=`<${ye}>`,O=document,k=()=>O.createComment(``),A=e=>e===null||typeof e!=`object`&&typeof e!=`function`,j=Array.isArray,xe=e=>j(e)||typeof e?.[Symbol.iterator]==`function`,M=`[
|
|
1
|
+
import{A as e,K as t,M as n,N as r,P as i,S as a,c as o,d as s,g as c,k as l,m as u,n as d,t as f,v as p}from"./ModalController-BhWRBcfd.js";import{r as m}from"./NetworkUtil-DsIkz0Dz.js";import"./dist-DlLKQSrv.js";var h=null,g={getSIWX(){return e.state.siwx},async initializeIfEnabled(t=d.getActiveCaipAddress()){let n=e.state.siwx;if(!(n&&t))return;let[r,i,s]=t.split(`:`);if(d.checkIfSupportedNetwork(r,`${r}:${i}`))try{if(e.state.remoteFeatures?.emailCapture){let e=d.getAccountData(r)?.user;await f.open({view:`DataCapture`,data:{email:e?.email??void 0}});return}if(h&&await h,(await n.getSessions(`${r}:${i}`,s)).length)return;await f.open({view:`SIWXSignMessage`})}catch(e){console.error(`SIWXUtil:initializeIfEnabled`,e),a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:this.getSIWXEventProperties(e)}),await o._getClient()?.disconnect().catch(console.error),p.reset(`Connect`),l.showError(`A problem occurred while trying initialize authentication`)}},async isAuthenticated(n=d.getActiveCaipAddress()){if(!e.state.siwx||!n)return!0;let{chainNamespace:r,chainId:i,address:a}=t.parseCaipAddress(n),o=`${r}:${i}`;return(await g.getSessions({address:a,caipNetworkId:o})).length>0},async requestSignMessage(){let t=e.state.siwx,n=r.getPlainAddress(d.getActiveCaipAddress()),i=s();if(!t)throw Error(`SIWX is not enabled`);if(!n)throw Error(`No ActiveCaipAddress found`);if(!i)throw Error(`No ActiveCaipNetwork or client found`);try{let e=await t.createMessage({chainId:i.caipNetworkId,accountAddress:n}),r=e.toString(),s=``;t.signMessage?s=await t.signMessage({message:r,chainId:i.caipNetworkId,accountAddress:n}):(c.getConnectorId(i.chainNamespace)===m.CONNECTOR_ID.AUTH&&p.pushTransactionStack({}),s=await o.signMessage(r)||``),await t.addSession({data:e,message:r,signature:s}),d.setLastConnectedSIWECaipNetwork(i),f.close(),a.sendEvent({type:`track`,event:`SIWX_AUTH_SUCCESS`,properties:this.getSIWXEventProperties()})}catch(e){(!f.state.open||p.state.view===`ApproveTransaction`)&&await f.open({view:`SIWXSignMessage`}),l.showError(`Error signing message`),a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:this.getSIWXEventProperties(e)}),console.error(`SWIXUtil:requestSignMessage`,e)}},async cancelSignMessage(){try{let e=this.getSIWX();if(e?.getRequired?.()){let t=d.getLastConnectedSIWECaipNetwork();if(t){let n=await e?.getSessions(t?.caipNetworkId,r.getPlainAddress(d.getActiveCaipAddress())||``);n&&n.length>0?await d.switchActiveNetwork(t):await o.disconnect()}else await o.disconnect()}else f.close();f.close(),a.sendEvent({event:`CLICK_CANCEL_SIWX`,type:`track`,properties:this.getSIWXEventProperties()})}catch(e){console.error(`SIWXUtil:cancelSignMessage`,e)}},async getAllSessions(){let e=this.getSIWX(),t=d.getAllRequestedCaipNetworks(),n=[];return await Promise.all(t.map(async t=>{let i=await e?.getSessions(t.caipNetworkId,r.getPlainAddress(d.getActiveCaipAddress())||``);i&&n.push(...i)})),n},async getSessions(t){let n=e.state.siwx,i=t?.address;if(!i){let e=d.getActiveCaipAddress();i=r.getPlainAddress(e)}let a=t?.caipNetworkId;return a||=d.getActiveCaipNetwork()?.caipNetworkId,n&&i&&a?n.getSessions(a,i):[]},async isSIWXCloseDisabled(){let e=this.getSIWX();if(e){let t=p.state.view===`ApproveTransaction`,n=p.state.view===`SIWXSignMessage`;if(t||n)return e.getRequired?.()&&(await this.getSessions()).length===0}return!1},async authConnectorAuthenticate({authConnector:t,chainId:n,socialUri:r,preferredAccountType:i,chainNamespace:a}){let o=g.getSIWX(),c=s();if(!o||!a.includes(m.CHAIN.EVM)||e.state.remoteFeatures?.emailCapture){let e=await t.connect({chainId:n,socialUri:r,preferredAccountType:i});return{address:e.address,chainId:e.chainId,accounts:e.accounts}}let l=`${a}:${n}`,u=await o.createMessage({chainId:l,accountAddress:`<<AccountAddress>>`}),f={accountAddress:u.accountAddress,chainId:u.chainId,domain:u.domain,uri:u.uri,version:u.version,nonce:u.nonce,notBefore:u.notBefore,statement:u.statement,resources:u.resources,requestId:u.requestId,issuedAt:u.issuedAt,expirationTime:u.expirationTime,serializedMessage:u.toString()},p=await t.connect({chainId:n,socialUri:r,siwxMessage:f,preferredAccountType:i});return f.accountAddress=p.address,f.serializedMessage=p.message||``,p.signature&&p.message&&await g.addEmbeddedWalletSession(f,p.message,p.signature),d.setLastConnectedSIWECaipNetwork(c),{address:p.address,chainId:p.chainId,accounts:p.accounts}},async addEmbeddedWalletSession(e,t,n){if(h)return h;let r=g.getSIWX();return r?(h=r.addSession({data:e,message:t,signature:n}).finally(()=>{h=null}),h):Promise.resolve()},async universalProviderAuthenticate({universalProvider:e,chains:t,methods:n}){let r=g.getSIWX(),i=s(),o=new Set(t.map(e=>e.split(`:`)[0]));if(!r||o.size!==1||!o.has(`eip155`))return!1;let c=await r.createMessage({chainId:s()?.caipNetworkId||``,accountAddress:``}),u=await e.authenticate({nonce:c.nonce,domain:c.domain,uri:c.uri,exp:c.expirationTime,iat:c.issuedAt,nbf:c.notBefore,requestId:c.requestId,version:c.version,resources:c.resources,statement:c.statement,chainId:c.chainId,methods:n,chains:[c.chainId,...t.filter(e=>e!==c.chainId)]});l.showLoading(`Authenticating...`,{autoClose:!1});let f={...u.session.peer.metadata,name:u.session.peer.metadata.name,icon:u.session.peer.metadata.icons?.[0],type:`WALLET_CONNECT`};if(d.setAccountProp(`connectedWalletInfo`,f,Array.from(o)[0]),u?.auths?.length){let t=u.auths.map(t=>{let n=e.client.formatAuthMessage({request:t.p,iss:t.p.iss});return{data:{...t.p,accountAddress:t.p.iss.split(`:`).slice(-1).join(``),chainId:t.p.iss.split(`:`).slice(2,4).join(`:`),uri:t.p.aud??``,version:t.p.version||c.version,expirationTime:t.p.exp,issuedAt:t.p.iat,notBefore:t.p.nbf},message:n,signature:t.s.s,cacao:t}});try{await r.setSessions(t),i&&d.setLastConnectedSIWECaipNetwork(i),a.sendEvent({type:`track`,event:`SIWX_AUTH_SUCCESS`,properties:g.getSIWXEventProperties()})}catch(t){throw console.error(`SIWX:universalProviderAuth - failed to set sessions`,t),a.sendEvent({type:`track`,event:`SIWX_AUTH_ERROR`,properties:g.getSIWXEventProperties(t)}),await e.disconnect().catch(console.error),t}finally{l.hide()}}return!0},getSIWXEventProperties(e){let t=d.state.activeChain;if(!t)throw Error(`SIWXUtil:getSIWXEventProperties - namespace is required`);return{network:d.state.activeCaipNetwork?.caipNetworkId||``,isSmartAccount:u(t)===n.ACCOUNT_TYPES.SMART_ACCOUNT,message:e?r.parseError(e):void 0}},async clearSessions(){let e=this.getSIWX();e&&await e.setSessions([])}},_=globalThis,ee=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,te=Symbol(),ne=new WeakMap,re=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==te)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ee&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ne.set(t,e))}return e}toString(){return this.cssText}},v=e=>new re(typeof e==`string`?e:e+``,void 0,te),y=(e,...t)=>new re(e.length===1?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;throw Error(`Value passed to 'css' function must be a 'css' function result: `+e+`. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(n)+e[r+1],e[0]),e,te),ie=(e,t)=>{if(ee)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=_.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},ae=ee?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return v(t)})(e):e,{is:oe,defineProperty:se,getOwnPropertyDescriptor:ce,getOwnPropertyNames:le,getOwnPropertySymbols:ue,getPrototypeOf:de}=Object,b=globalThis,fe=b.trustedTypes,pe=fe?fe.emptyScript:``,me=b.reactiveElementPolyfillSupport,x=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?pe:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},C=(e,t)=>!oe(e,t),he={attribute:!0,type:String,converter:S,reflect:!1,useDefault:!1,hasChanged:C};Symbol.metadata??=Symbol(`metadata`),b.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=he){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&se(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=ce(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??he}static _$Ei(){if(this.hasOwnProperty(x(`elementProperties`)))return;let e=de(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(x(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(x(`properties`))){let e=this.properties,t=[...le(e),...ue(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(ae(e))}else e!==void 0&&t.push(ae(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ie(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?S:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?S:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??C)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};w.elementStyles=[],w.shadowRootOptions={mode:`open`},w[x(`elementProperties`)]=new Map,w[x(`finalized`)]=new Map,me?.({ReactiveElement:w}),(b.reactiveElementVersions??=[]).push(`2.1.2`);var T=globalThis,ge=e=>e,E=T.trustedTypes,_e=E?E.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,ve=`$lit$`,D=`lit$${Math.random().toFixed(9).slice(2)}$`,ye=`?`+D,be=`<${ye}>`,O=document,k=()=>O.createComment(``),A=e=>e===null||typeof e!=`object`&&typeof e!=`function`,j=Array.isArray,xe=e=>j(e)||typeof e?.[Symbol.iterator]==`function`,M=`[
|
|
2
2
|
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Se=/-->/g,Ce=/>/g,P=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),we=/'/g,Te=/"/g,Ee=/^(?:script|style|textarea|title)$/i,F=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),De=F(1),Oe=F(2),ke=F(3),I=Symbol.for(`lit-noChange`),L=Symbol.for(`lit-nothing`),Ae=new WeakMap,R=O.createTreeWalker(O,129);function je(e,t){if(!j(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return _e===void 0?t:_e.createHTML(t)}var Me=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=N;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===N?c[1]===`!--`?o=Se:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=P):(Ee.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=P):o=Ce:o===P?c[0]===`>`?(o=i??N,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?P:c[3]===`"`?Te:we):o===Te||o===we?o=P:o===Se||o===Ce?o=N:(o=P,i=void 0);let d=o===P&&e[t+1].startsWith(`/>`)?` `:``;a+=o===N?n+be:l>=0?(r.push(s),n.slice(0,l)+ve+n.slice(l)+D+d):n+D+(l===-2?t:d)}return[je(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Ne=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Me(t,n);if(this.el=e.createElement(l,r),R.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=R.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(ve)){let t=u[o++],n=i.getAttribute(e).split(D),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Fe:r[1]===`?`?Ie:r[1]===`@`?Le:V}),i.removeAttribute(e)}else e.startsWith(D)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Ee.test(i.tagName)){let e=i.textContent.split(D),t=e.length-1;if(t>0){i.textContent=E?E.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],k()),R.nextNode(),c.push({type:2,index:++a});i.append(e[t],k())}}}else if(i.nodeType===8){if(i.data===ye)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(D,e+1))!==-1;)c.push({type:7,index:a}),e+=D.length-1}}a++}}static createElement(e,t){let n=O.createElement(`template`);return n.innerHTML=e,n}};function z(e,t,n=e,r){if(t===I)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=A(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=z(e,i._$AS(e,t.values),i,r)),t}var Pe=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??O).importNode(t,!0);R.currentNode=r;let i=R.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new B(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Re(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=R.nextNode(),a++)}return R.currentNode=O,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},B=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=z(this,e,t),A(e)?e===L||e==null||e===``?(this._$AH!==L&&this._$AR(),this._$AH=L):e!==this._$AH&&e!==I&&this._(e):e._$litType$===void 0?e.nodeType===void 0?xe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==L&&A(this._$AH)?this._$AA.nextSibling.data=e:this.T(O.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Ne.createElement(je(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Pe(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Ae.get(e.strings);return t===void 0&&Ae.set(e.strings,t=new Ne(e)),t}k(t){j(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(k()),this.O(k()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ge(e).nextSibling;ge(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},V=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=L,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=L}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=z(this,e,t,0),a=!A(e)||e!==this._$AH&&e!==I,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=z(this,r[n+o],t,o),s===I&&(s=this._$AH[o]),a||=!A(s)||s!==this._$AH[o],s===L?e=L:e!==L&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Fe=class extends V{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===L?void 0:e}},Ie=class extends V{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==L)}},Le=class extends V{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=z(this,e,t,0)??L)===I)return;let n=this._$AH,r=e===L&&n!==L||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==L&&(n===L||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Re=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){z(this,e)}},ze={M:ve,P:D,A:ye,C:1,L:Me,R:Pe,D:xe,V:z,I:B,H:V,N:Ie,U:Le,B:Fe,F:Re},Be=T.litHtmlPolyfillSupport;Be?.(Ne,B),(T.litHtmlVersions??=[]).push(`3.3.3`);var Ve=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new B(t.insertBefore(k(),e),e,void 0,n??{})}return i._$AI(e),i},He=globalThis,H=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ve(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return I}};H._$litElement$=!0,H.finalized=!0,He.litElementHydrateSupport?.({LitElement:H});var Ue=He.litElementPolyfillSupport;Ue?.({LitElement:H}),(He.litElementVersions??=[]).push(`4.2.2`);var We={black:`#202020`,white:`#FFFFFF`,white010:`rgba(255, 255, 255, 0.1)`,accent010:`rgba(9, 136, 240, 0.1)`,accent020:`rgba(9, 136, 240, 0.2)`,accent030:`rgba(9, 136, 240, 0.3)`,accent040:`rgba(9, 136, 240, 0.4)`,accent050:`rgba(9, 136, 240, 0.5)`,accent060:`rgba(9, 136, 240, 0.6)`,accent070:`rgba(9, 136, 240, 0.7)`,accent080:`rgba(9, 136, 240, 0.8)`,accent090:`rgba(9, 136, 240, 0.9)`,accent100:`rgba(9, 136, 240, 1.0)`,accentSecondary010:`rgba(199, 185, 148, 0.1)`,accentSecondary020:`rgba(199, 185, 148, 0.2)`,accentSecondary030:`rgba(199, 185, 148, 0.3)`,accentSecondary040:`rgba(199, 185, 148, 0.4)`,accentSecondary050:`rgba(199, 185, 148, 0.5)`,accentSecondary060:`rgba(199, 185, 148, 0.6)`,accentSecondary070:`rgba(199, 185, 148, 0.7)`,accentSecondary080:`rgba(199, 185, 148, 0.8)`,accentSecondary090:`rgba(199, 185, 148, 0.9)`,accentSecondary100:`rgba(199, 185, 148, 1.0)`,productWalletKit:`#FFB800`,productAppKit:`#FF573B`,productCloud:`#0988F0`,productDocumentation:`#008847`,neutrals050:`#F6F6F6`,neutrals100:`#F3F3F3`,neutrals200:`#E9E9E9`,neutrals300:`#D0D0D0`,neutrals400:`#BBB`,neutrals500:`#9A9A9A`,neutrals600:`#6C6C6C`,neutrals700:`#4F4F4F`,neutrals800:`#363636`,neutrals900:`#2A2A2A`,neutrals1000:`#252525`,semanticSuccess010:`rgba(48, 164, 107, 0.1)`,semanticSuccess020:`rgba(48, 164, 107, 0.2)`,semanticSuccess030:`rgba(48, 164, 107, 0.3)`,semanticSuccess040:`rgba(48, 164, 107, 0.4)`,semanticSuccess050:`rgba(48, 164, 107, 0.5)`,semanticSuccess060:`rgba(48, 164, 107, 0.6)`,semanticSuccess070:`rgba(48, 164, 107, 0.7)`,semanticSuccess080:`rgba(48, 164, 107, 0.8)`,semanticSuccess090:`rgba(48, 164, 107, 0.9)`,semanticSuccess100:`rgba(48, 164, 107, 1.0)`,semanticError010:`rgba(223, 74, 52, 0.1)`,semanticError020:`rgba(223, 74, 52, 0.2)`,semanticError030:`rgba(223, 74, 52, 0.3)`,semanticError040:`rgba(223, 74, 52, 0.4)`,semanticError050:`rgba(223, 74, 52, 0.5)`,semanticError060:`rgba(223, 74, 52, 0.6)`,semanticError070:`rgba(223, 74, 52, 0.7)`,semanticError080:`rgba(223, 74, 52, 0.8)`,semanticError090:`rgba(223, 74, 52, 0.9)`,semanticError100:`rgba(223, 74, 52, 1.0)`,semanticWarning010:`rgba(243, 161, 63, 0.1)`,semanticWarning020:`rgba(243, 161, 63, 0.2)`,semanticWarning030:`rgba(243, 161, 63, 0.3)`,semanticWarning040:`rgba(243, 161, 63, 0.4)`,semanticWarning050:`rgba(243, 161, 63, 0.5)`,semanticWarning060:`rgba(243, 161, 63, 0.6)`,semanticWarning070:`rgba(243, 161, 63, 0.7)`,semanticWarning080:`rgba(243, 161, 63, 0.8)`,semanticWarning090:`rgba(243, 161, 63, 0.9)`,semanticWarning100:`rgba(243, 161, 63, 1.0)`},U={core:{backgroundAccentPrimary:`#0988F0`,backgroundAccentCertified:`#C7B994`,backgroundWalletKit:`#FFB800`,backgroundAppKit:`#FF573B`,backgroundCloud:`#0988F0`,backgroundDocumentation:`#008847`,backgroundSuccess:`rgba(48, 164, 107, 0.20)`,backgroundError:`rgba(223, 74, 52, 0.20)`,backgroundWarning:`rgba(243, 161, 63, 0.20)`,textAccentPrimary:`#0988F0`,textAccentCertified:`#C7B994`,textWalletKit:`#FFB800`,textAppKit:`#FF573B`,textCloud:`#0988F0`,textDocumentation:`#008847`,textSuccess:`#30A46B`,textError:`#DF4A34`,textWarning:`#F3A13F`,borderAccentPrimary:`#0988F0`,borderSecondary:`#C7B994`,borderSuccess:`#30A46B`,borderError:`#DF4A34`,borderWarning:`#F3A13F`,foregroundAccent010:`rgba(9, 136, 240, 0.1)`,foregroundAccent020:`rgba(9, 136, 240, 0.2)`,foregroundAccent040:`rgba(9, 136, 240, 0.4)`,foregroundAccent060:`rgba(9, 136, 240, 0.6)`,foregroundSecondary020:`rgba(199, 185, 148, 0.2)`,foregroundSecondary040:`rgba(199, 185, 148, 0.4)`,foregroundSecondary060:`rgba(199, 185, 148, 0.6)`,iconAccentPrimary:`#0988F0`,iconAccentCertified:`#C7B994`,iconSuccess:`#30A46B`,iconError:`#DF4A34`,iconWarning:`#F3A13F`,glass010:`rgba(255, 255, 255, 0.1)`,zIndex:`9999`},dark:{overlay:`rgba(0, 0, 0, 0.50)`,backgroundPrimary:`#202020`,backgroundInvert:`#FFFFFF`,textPrimary:`#FFFFFF`,textSecondary:`#9A9A9A`,textTertiary:`#BBBBBB`,textInvert:`#202020`,borderPrimary:`#2A2A2A`,borderPrimaryDark:`#363636`,borderSecondary:`#4F4F4F`,foregroundPrimary:`#252525`,foregroundSecondary:`#2A2A2A`,foregroundTertiary:`#363636`,iconDefault:`#9A9A9A`,iconInverse:`#FFFFFF`},light:{overlay:`rgba(230 , 230, 230, 0.5)`,backgroundPrimary:`#FFFFFF`,borderPrimaryDark:`#E9E9E9`,backgroundInvert:`#202020`,textPrimary:`#202020`,textSecondary:`#9A9A9A`,textTertiary:`#6C6C6C`,textInvert:`#FFFFFF`,borderPrimary:`#E9E9E9`,borderSecondary:`#D0D0D0`,foregroundPrimary:`#F3F3F3`,foregroundSecondary:`#E9E9E9`,foregroundTertiary:`#D0D0D0`,iconDefault:`#9A9A9A`,iconInverse:`#202020`}},Ge={colors:We,fontFamily:{regular:`KHTeka`,mono:`KHTekaMono`},fontWeight:{regular:`400`,medium:`500`},textSize:{h1:`50px`,h2:`44px`,h3:`38px`,h4:`32px`,h5:`26px`,h6:`20px`,large:`16px`,medium:`14px`,small:`12px`},typography:{"h1-regular-mono":{lineHeight:`50px`,letterSpacing:`-3px`},"h1-regular":{lineHeight:`50px`,letterSpacing:`-1px`},"h1-medium":{lineHeight:`50px`,letterSpacing:`-0.84px`},"h2-regular-mono":{lineHeight:`44px`,letterSpacing:`-2.64px`},"h2-regular":{lineHeight:`44px`,letterSpacing:`-0.88px`},"h2-medium":{lineHeight:`44px`,letterSpacing:`-0.88px`},"h3-regular-mono":{lineHeight:`38px`,letterSpacing:`-2.28px`},"h3-regular":{lineHeight:`38px`,letterSpacing:`-0.76px`},"h3-medium":{lineHeight:`38px`,letterSpacing:`-0.76px`},"h4-regular-mono":{lineHeight:`32px`,letterSpacing:`-1.92px`},"h4-regular":{lineHeight:`32px`,letterSpacing:`-0.32px`},"h4-medium":{lineHeight:`32px`,letterSpacing:`-0.32px`},"h5-regular-mono":{lineHeight:`26px`,letterSpacing:`-1.56px`},"h5-regular":{lineHeight:`26px`,letterSpacing:`-0.26px`},"h5-medium":{lineHeight:`26px`,letterSpacing:`-0.26px`},"h6-regular-mono":{lineHeight:`20px`,letterSpacing:`-1.2px`},"h6-regular":{lineHeight:`20px`,letterSpacing:`-0.6px`},"h6-medium":{lineHeight:`20px`,letterSpacing:`-0.6px`},"lg-regular-mono":{lineHeight:`16px`,letterSpacing:`-0.96px`},"lg-regular":{lineHeight:`18px`,letterSpacing:`-0.16px`},"lg-medium":{lineHeight:`18px`,letterSpacing:`-0.16px`},"md-regular-mono":{lineHeight:`14px`,letterSpacing:`-0.84px`},"md-regular":{lineHeight:`16px`,letterSpacing:`-0.14px`},"md-medium":{lineHeight:`16px`,letterSpacing:`-0.14px`},"sm-regular-mono":{lineHeight:`12px`,letterSpacing:`-0.72px`},"sm-regular":{lineHeight:`14px`,letterSpacing:`-0.12px`},"sm-medium":{lineHeight:`14px`,letterSpacing:`-0.12px`}},tokens:{core:U.core,theme:U.dark},borderRadius:{1:`4px`,2:`8px`,10:`10px`,3:`12px`,4:`16px`,6:`24px`,5:`20px`,8:`32px`,16:`64px`,20:`80px`,32:`128px`,64:`256px`,128:`512px`,round:`9999px`},spacing:{0:`0px`,"01":`2px`,1:`4px`,2:`8px`,3:`12px`,4:`16px`,5:`20px`,6:`24px`,7:`28px`,8:`32px`,9:`36px`,10:`40px`,12:`48px`,14:`56px`,16:`64px`,20:`80px`,32:`128px`,64:`256px`},durations:{xl:`400ms`,lg:`200ms`,md:`125ms`,sm:`75ms`},easings:{"ease-out-power-2":`cubic-bezier(0.23, 0.09, 0.08, 1.13)`,"ease-out-power-1":`cubic-bezier(0.12, 0.04, 0.2, 1.06)`,"ease-in-power-2":`cubic-bezier(0.92, -0.13, 0.77, 0.91)`,"ease-in-power-1":`cubic-bezier(0.88, -0.06, 0.8, 0.96)`,"ease-inout-power-2":`cubic-bezier(0.77, 0.09, 0.23, 1.13)`,"ease-inout-power-1":`cubic-bezier(0.88, 0.04, 0.12, 1.06)`}},Ke=`--apkt`;function W(e){if(!e)return{};let t={};return t[`font-family`]=e[`--apkt-font-family`]??e[`--w3m-font-family`]??`KHTeka`,t.accent=e[`--apkt-accent`]??e[`--w3m-accent`]??`#0988F0`,t[`color-mix`]=e[`--apkt-color-mix`]??e[`--w3m-color-mix`]??`#000`,t[`color-mix-strength`]=e[`--apkt-color-mix-strength`]??e[`--w3m-color-mix-strength`]??0,t[`font-size-master`]=e[`--apkt-font-size-master`]??e[`--w3m-font-size-master`]??`10px`,t[`border-radius-master`]=e[`--apkt-border-radius-master`]??e[`--w3m-border-radius-master`]??`4px`,e[`--apkt-z-index`]===void 0?e[`--w3m-z-index`]!==void 0&&(t[`z-index`]=e[`--w3m-z-index`]):t[`z-index`]=e[`--apkt-z-index`],t}var G={createCSSVariables(e){let t={},n={};function r(e,t,n=``){for(let[i,a]of Object.entries(e)){let e=n?`${n}-${i}`:i;a&&typeof a==`object`&&Object.keys(a).length?(t[i]={},r(a,t[i],e)):typeof a==`string`&&(t[i]=`${Ke}-${e}`)}}function i(e,t){for(let[n,r]of Object.entries(e))r&&typeof r==`object`?(t[n]={},i(r,t[n])):typeof r==`string`&&(t[n]=`var(${r})`)}return r(e,t),i(t,n),{cssVariables:t,cssVariablesVarPrefix:n}},assignCSSVariables(e,t){let n={};function r(e,t,i){for(let[a,o]of Object.entries(e)){let e=i?`${i}-${a}`:a,s=t[a];o&&typeof o==`object`?r(o,s,e):typeof s==`string`&&(n[`${Ke}-${e}`]=s)}}return r(e,t),n},createRootStyles(e,t){let n={...Ge,tokens:{...Ge.tokens,theme:e===`light`?U.light:U.dark}},{cssVariables:r}=G.createCSSVariables(n),i=G.assignCSSVariables(r,n),a=G.generateW3MVariables(t),o=G.generateW3MOverrides(t),s=G.generateScaledVariables(t),c=G.generateBaseVariables(i),l={...i,...c,...a,...o,...s},u=G.applyColorMixToVariables(t,l),d={...l,...u};return`:root {${Object.entries(d).map(([e,t])=>`${e}:${t.replace(`/[:;{}</>]/g`,``)};`).join(``)}}`},generateW3MVariables(e){if(!e)return{};let t=W(e),n={};return n[`--w3m-font-family`]=t[`font-family`],n[`--w3m-accent`]=t.accent,n[`--w3m-color-mix`]=t[`color-mix`],n[`--w3m-color-mix-strength`]=`${t[`color-mix-strength`]}%`,n[`--w3m-font-size-master`]=t[`font-size-master`],n[`--w3m-border-radius-master`]=t[`border-radius-master`],n},generateW3MOverrides(e){if(!e)return{};let t=W(e),n={};if(e[`--apkt-accent`]||e[`--w3m-accent`]){let e=t.accent;n[`--apkt-tokens-core-iconAccentPrimary`]=e,n[`--apkt-tokens-core-borderAccentPrimary`]=e,n[`--apkt-tokens-core-textAccentPrimary`]=e,n[`--apkt-tokens-core-backgroundAccentPrimary`]=e}return(e[`--apkt-font-family`]||e[`--w3m-font-family`])&&(n[`--apkt-fontFamily-regular`]=t[`font-family`]),t[`z-index`]!==void 0&&(n[`--apkt-tokens-core-zIndex`]=`${t[`z-index`]}`),n},generateScaledVariables(e){if(!e)return{};let t=W(e),n={};if(e[`--apkt-font-size-master`]||e[`--w3m-font-size-master`]){let e=parseFloat(t[`font-size-master`].replace(`px`,``));n[`--apkt-textSize-h1`]=`${Number(e)*5}px`,n[`--apkt-textSize-h2`]=`${Number(e)*4.4}px`,n[`--apkt-textSize-h3`]=`${Number(e)*3.8}px`,n[`--apkt-textSize-h4`]=`${Number(e)*3.2}px`,n[`--apkt-textSize-h5`]=`${Number(e)*2.6}px`,n[`--apkt-textSize-h6`]=`${Number(e)*2}px`,n[`--apkt-textSize-large`]=`${Number(e)*1.6}px`,n[`--apkt-textSize-medium`]=`${Number(e)*1.4}px`,n[`--apkt-textSize-small`]=`${Number(e)*1.2}px`}if(e[`--apkt-border-radius-master`]||e[`--w3m-border-radius-master`]){let e=parseFloat(t[`border-radius-master`].replace(`px`,``));n[`--apkt-borderRadius-1`]=`${Number(e)}px`,n[`--apkt-borderRadius-2`]=`${Number(e)*2}px`,n[`--apkt-borderRadius-3`]=`${Number(e)*3}px`,n[`--apkt-borderRadius-4`]=`${Number(e)*4}px`,n[`--apkt-borderRadius-5`]=`${Number(e)*5}px`,n[`--apkt-borderRadius-6`]=`${Number(e)*6}px`,n[`--apkt-borderRadius-8`]=`${Number(e)*8}px`,n[`--apkt-borderRadius-16`]=`${Number(e)*16}px`,n[`--apkt-borderRadius-20`]=`${Number(e)*20}px`,n[`--apkt-borderRadius-32`]=`${Number(e)*32}px`,n[`--apkt-borderRadius-64`]=`${Number(e)*64}px`,n[`--apkt-borderRadius-128`]=`${Number(e)*128}px`}return n},generateColorMixCSS(e,t){if(!e?.[`--w3m-color-mix`]||!e[`--w3m-color-mix-strength`])return``;let n=e[`--w3m-color-mix`],r=e[`--w3m-color-mix-strength`];if(!r||r===0)return``;let i=Object.keys(t||{}).filter(e=>{let t=e.includes(`-tokens-core-background`)||e.includes(`-tokens-core-text`)||e.includes(`-tokens-core-border`)||e.includes(`-tokens-core-foreground`)||e.includes(`-tokens-core-icon`)||e.includes(`-tokens-theme-background`)||e.includes(`-tokens-theme-text`)||e.includes(`-tokens-theme-border`)||e.includes(`-tokens-theme-foreground`)||e.includes(`-tokens-theme-icon`),n=e.includes(`-borderRadius-`)||e.includes(`-spacing-`)||e.includes(`-textSize-`)||e.includes(`-fontFamily-`)||e.includes(`-fontWeight-`)||e.includes(`-typography-`)||e.includes(`-duration-`)||e.includes(`-ease-`)||e.includes(`-path-`)||e.includes(`-width-`)||e.includes(`-height-`)||e.includes(`-visual-size-`)||e.includes(`-modal-width`)||e.includes(`-cover`);return t&&!n});return i.length===0?``:` @supports (background: color-mix(in srgb, white 50%, black)) {
|
|
3
3
|
:root {
|
|
4
4
|
${i.map(e=>{let i=t?.[e]||``;return i.includes(`color-mix`)||i.startsWith(`#`)||i.startsWith(`rgb`)?`${e}: color-mix(in srgb, ${n} ${r}%, ${i});`:`${e}: color-mix(in srgb, ${n} ${r}%, var(${e}-base, ${i}));`}).join(``)}
|