@directcryptopay/sdk 0.2.2 → 0.2.4
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/ExchangeController-CbO41bcH.js +217 -0
- package/dist/HelpersUtil-DHm6EVSE.js +120 -0
- package/dist/NavigationUtil-kj9LEOOd.js +8 -0
- package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
- package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
- package/dist/PhArrowDown-C9AkNvLs.js +73 -0
- package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
- package/dist/PhArrowRight-DM1tna0G.js +73 -0
- package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
- package/dist/PhArrowUp-DmktzOWy.js +73 -0
- package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
- package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
- package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
- package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
- package/dist/PhBank-4_9QzqIB.js +73 -0
- package/dist/PhBrowser-B-JSznId.js +73 -0
- package/dist/PhCaretDown-vV5oHMNi.js +73 -0
- package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
- package/dist/PhCaretRight-CqQN4TT3.js +73 -0
- package/dist/PhCaretUp-Df7UCAHy.js +73 -0
- package/dist/PhCheck-gtpfK4ed.js +73 -0
- package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
- package/dist/PhClock-SDCW-NmF.js +73 -0
- package/dist/PhCompass-B7hgtdx-.js +73 -0
- package/dist/PhCopy-BcnhyXCy.js +73 -0
- package/dist/PhCreditCard-BJjByVgu.js +73 -0
- package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
- package/dist/PhDesktop-B3VKPuJx.js +73 -0
- package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
- package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
- package/dist/PhEnvelope-67uzHbI9.js +73 -0
- package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
- package/dist/PhGlobe-TMm_6qGk.js +73 -0
- package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
- package/dist/PhImage-gY96WtHR.js +73 -0
- package/dist/PhInfo-DRQM_ZDP.js +73 -0
- package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
- package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
- package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
- package/dist/PhPlus-BfTsQnUz.js +73 -0
- package/dist/PhPower-CxYUGOWn.js +73 -0
- package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
- package/dist/PhQrCode-BuJ97NYJ.js +73 -0
- package/dist/PhQuestion-kJoP8Mja.js +73 -0
- package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
- package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
- package/dist/PhSignOut-jk97OSVt.js +73 -0
- package/dist/PhSpinner-CiYOhwMg.js +73 -0
- package/dist/PhTrash-pxerMqzd.js +73 -0
- package/dist/PhUser-BMg0VV4A.js +73 -0
- package/dist/PhVault-DYQvx5A-.js +73 -0
- package/dist/PhWarning-NLC5Mj87.js +73 -0
- package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
- package/dist/PhX-Bx4wpwm3.js +73 -0
- package/dist/SwapController-Ch0FFTEt.js +457 -0
- package/dist/{ccip-BIGqktC1.js → ccip-BrGhNXIM.js} +4 -4
- package/dist/data-capture-CpafmuCb.js +490 -0
- package/dist/dcp-sdk.umd.js +7400 -6589
- package/dist/email-Dcg4jlai.js +344 -0
- package/dist/embedded-wallet-DeoRdAPw.js +820 -0
- package/dist/features-B9Nde43h.js +274 -0
- package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-a7b8tdkO.js} +6 -6
- package/dist/if-defined-k21LutCn.js +10 -0
- package/dist/index-9vLw53Xl.js +228 -0
- package/dist/index-B5wUyynz.js +107 -0
- package/dist/index-B8LkUrww.js +86 -0
- package/dist/{index-CPTcEPbD.js → index-BA0VwKg0.js} +296 -298
- package/dist/index-BB9JJ24N.js +125 -0
- package/dist/index-BCkEvPQ6.js +172 -0
- package/dist/index-BDeO_csr.js +171 -0
- package/dist/index-Bb7babLF.js +1281 -0
- package/dist/index-BjOhprVS.js +199 -0
- package/dist/{index-Dy4NyE6l.js → index-BjyMgZsf.js} +7 -7
- package/dist/index-BkThIDLX.js +159 -0
- package/dist/index-BmFs6nb7.js +209 -0
- package/dist/{index-5mp7WkhV.js → index-C4qc4PdD.js} +2 -2
- package/dist/{index-BdSIrl-R.js → index-CAPvUh14.js} +578 -570
- package/dist/index-CBMU3PTE.js +65 -0
- package/dist/index-CGwPkJLF.js +355 -0
- package/dist/index-CNGEqX3D.js +153 -0
- package/dist/index-CRlCq6IB.js +7981 -0
- package/dist/index-Cg_o-i9X.js +118 -0
- package/dist/index-D1BvhCbI.js +62 -0
- package/dist/index-DFi8TiHc.js +128 -0
- package/dist/index-DLwuveL9.js +555 -0
- package/dist/index-DMn7ktUQ.js +56 -0
- package/dist/index-DOXwtuwa.js +117 -0
- package/dist/index-DPPOW_Tp.js +118 -0
- package/dist/{index-f3LXSfM5.js → index-DQpzHpW-.js} +56 -142
- package/dist/{index-D6h-qfpt.js → index-DXHg5C-W.js} +5 -5
- package/dist/index-DcYjZV4H.js +110 -0
- package/dist/{index-BJ7cbG3N.js → index-DeL88Lwc.js} +36769 -40177
- package/dist/index-DrWVlf8b.js +46 -0
- package/dist/index-Dsfuc4rB.js +123 -0
- package/dist/index-DuTny38n.js +1175 -0
- package/dist/{index-D5r0iSq4.js → index-Nfjb6bV0.js} +1 -1
- package/dist/index-WwwdQSN2.js +85 -0
- package/dist/index-Yha9Afch.js +174 -0
- package/dist/index-cbQHN7GC.js +100 -0
- package/dist/{index-DobBVPe4.js → index-hyG3cYsv.js} +481 -236
- package/dist/index-qLxmmPaL.js +257 -0
- package/dist/index.js +1 -1
- package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-vfcvRH0G.js} +1 -1
- package/dist/onramp-BSiyOX4L.js +855 -0
- package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CdCMAPZN.js} +2312 -2313
- package/dist/pay-with-exchange-CduNoMEz.js +525 -0
- package/dist/property-Bd8U3_QP.js +618 -0
- package/dist/receive-CrmptJlq.js +232 -0
- package/dist/ref-SOwYtCZb.js +107 -0
- package/dist/send-oMcHMEr6.js +1166 -0
- package/dist/socials-C0A4-FbY.js +620 -0
- package/dist/swaps-CbJJ9Ciu.js +1760 -0
- package/dist/{transactions-DujFkB-M.js → transactions-BDfCoBS5.js} +10 -10
- package/dist/w3m-modal-BjsTkny7.js +1706 -0
- package/package.json +3 -3
- package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
- package/dist/add-sji6scSD.js +0 -19
- package/dist/all-wallets-B4H-890E.js +0 -10
- package/dist/app-store-Z433s97G.js +0 -21
- package/dist/apple-b8Lxj7nb.js +0 -22
- package/dist/arrow-bottom-M9oWWo_9.js +0 -12
- package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
- package/dist/arrow-left-Dw8AKfwf.js +0 -12
- package/dist/arrow-right-DwLQZSC_.js +0 -12
- package/dist/arrow-top-zhUjkBe1.js +0 -12
- package/dist/bank-CbQdnILK.js +0 -18
- package/dist/browser-xAqNwt7z.js +0 -18
- package/dist/card-Dr1QBmWp.js +0 -18
- package/dist/checkmark-BhT1dTgG.js +0 -15
- package/dist/checkmark-bold-CPB29wqQ.js +0 -12
- package/dist/chevron-bottom-BhNyx2II.js +0 -12
- package/dist/chevron-left-CGuEjQlY.js +0 -12
- package/dist/chevron-right-CvIRRsqZ.js +0 -12
- package/dist/chevron-top-RSzCqjBd.js +0 -12
- package/dist/chrome-store-Cs8dAgs0.js +0 -65
- package/dist/clock-fhZO5otC.js +0 -12
- package/dist/close-BPuztrdR.js +0 -12
- package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
- package/dist/compass-WMc5huk0.js +0 -12
- package/dist/copy-DVAeT17y.js +0 -19
- package/dist/cursor-BJ4YLXfy.js +0 -7
- package/dist/cursor-transparent-DN2fLQN4.js +0 -16
- package/dist/desktop-6avxisBw.js +0 -13
- package/dist/disconnect-AReVI8Gk.js +0 -12
- package/dist/discord-CxrI30BZ.js +0 -21
- package/dist/email-B8dIIaay.js +0 -696
- package/dist/embedded-wallet-C_5hF7rM.js +0 -468
- package/dist/etherscan-BnAy8cIF.js +0 -10
- package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
- package/dist/extension-F0LIhvcf.js +0 -12
- package/dist/external-link-CP6phyaM.js +0 -12
- package/dist/facebook-BtQ-Io2y.js +0 -30
- package/dist/farcaster-BmaN1ugd.js +0 -16
- package/dist/filters-DpEwoOmy.js +0 -12
- package/dist/github-q7qO9V-b.js +0 -22
- package/dist/google-DH_ZE8bW.js +0 -22
- package/dist/help-circle-BAQVmKas.js +0 -16
- package/dist/id-Cj68Zwgo.js +0 -16
- package/dist/if-defined-CNte9B3N.js +0 -744
- package/dist/image-BKJDw6N-.js +0 -8
- package/dist/index-7toZMdtG.js +0 -573
- package/dist/index-B1uKzdvN.js +0 -170
- package/dist/index-BHFZVF-b.js +0 -257
- package/dist/index-BKwa5JSA.js +0 -559
- package/dist/index-BP4B9VUt.js +0 -54
- package/dist/index-BVdzXHpO.js +0 -181
- package/dist/index-BYND0GJ9.js +0 -146
- package/dist/index-BaJ0zEbh.js +0 -97
- package/dist/index-Bh0MPFwP.js +0 -58
- package/dist/index-Bsh7_qTp.js +0 -511
- package/dist/index-BwnXTNNg.js +0 -199
- package/dist/index-C0kPDbg_.js +0 -77
- package/dist/index-CKikVKe2.js +0 -75
- package/dist/index-ChVh0Hkp.js +0 -243
- package/dist/index-Cle_NnnS.js +0 -305
- package/dist/index-CmWdvIFT.js +0 -51
- package/dist/index-D2AMA8Bu.js +0 -65
- package/dist/index-DAUM8CO4.js +0 -65
- package/dist/index-DGjZW6uR.js +0 -78
- package/dist/index-DQe94z7X.js +0 -265
- package/dist/index-DTo6w99t.js +0 -7864
- package/dist/index-DYdXjap2.js +0 -320
- package/dist/index-DceCxNV5.js +0 -181
- package/dist/index-Uw9cSw0q.js +0 -294
- package/dist/index-qiuyrukh.js +0 -45
- package/dist/index-zddvaohA.js +0 -78
- package/dist/info-RfPsmroW.js +0 -7
- package/dist/info-circle-DFKHB_ZN.js +0 -16
- package/dist/lightbulb-B-Bykj9X.js +0 -7
- package/dist/mail-mBAgGuw5.js +0 -12
- package/dist/mobile-Dhh3ndkf.js +0 -13
- package/dist/more-D1h7UTvg.js +0 -15
- package/dist/network-placeholder-Dqynvc-t.js +0 -18
- package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
- package/dist/off-BmG3cHTX.js +0 -12
- package/dist/onramp-C401Aenb.js +0 -1279
- package/dist/play-store-4q1fzL_P.js +0 -36
- package/dist/plus-603Gs3yG.js +0 -17
- package/dist/qr-code-Dgwhf6M1.js +0 -10
- package/dist/receive-CYXbbEUR.js +0 -186
- package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
- package/dist/ref-DpmKRWBK.js +0 -41
- package/dist/refresh-BMZFu0mu.js +0 -12
- package/dist/reown-logo-BXph7ThY.js +0 -16
- package/dist/search-Cm_V42Y_.js +0 -12
- package/dist/secp256k1-C0iX1TUr.js +0 -1510
- package/dist/secp256k1-DOQBqE4Z.js +0 -1302
- package/dist/send-BSMYxDuP.js +0 -19
- package/dist/send-C8EeIzRB.js +0 -1038
- package/dist/socials-DQrHQajs.js +0 -574
- package/dist/swapHorizontal-98rnJewS.js +0 -12
- package/dist/swapHorizontalBold-C299FjEt.js +0 -12
- package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
- package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
- package/dist/swapVertical-DSL75l8L.js +0 -12
- package/dist/swaps-BuTNp65Y.js +0 -1637
- package/dist/telegram-cJP7hgUb.js +0 -20
- package/dist/three-dots-DHnEh28O.js +0 -9
- package/dist/twitch-CR2iGcBo.js +0 -22
- package/dist/twitterIcon-E5TAQjOn.js +0 -10
- package/dist/verify-DEukUJp0.js +0 -12
- package/dist/verify-filled-BXsx1i_p.js +0 -12
- package/dist/w3m-modal-Bm7BqVng.js +0 -1037
- package/dist/wallet-CzyyvdrT.js +0 -12
- package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
- package/dist/walletconnect-BSYogWiE.js +0 -36
- package/dist/warning-circle-Cgp2BW3m.js +0 -16
- package/dist/x-BJinLpTw.js +0 -16
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { cC as k, cD as U, cE as l, cF as w, cG as E, cH as A, cI as x, cJ as P, cK as N, cL as I, cM as L, cN as f, cO as C, cP as T, cQ as W, cR as _, cS as v } from "./index-DeL88Lwc.js";
|
|
2
|
+
const D = 0, b = {
|
|
3
|
+
paymentAsset: null,
|
|
4
|
+
amount: null,
|
|
5
|
+
tokenAmount: 0,
|
|
6
|
+
priceLoading: !1,
|
|
7
|
+
error: null,
|
|
8
|
+
exchanges: [],
|
|
9
|
+
isLoading: !1,
|
|
10
|
+
currentPayment: void 0,
|
|
11
|
+
isPaymentInProgress: !1,
|
|
12
|
+
paymentId: "",
|
|
13
|
+
assets: []
|
|
14
|
+
}, e = k(b), m = {
|
|
15
|
+
state: e,
|
|
16
|
+
// -- Subscriptions ----------------------------------- //
|
|
17
|
+
subscribe(t) {
|
|
18
|
+
return v(e, () => t(e));
|
|
19
|
+
},
|
|
20
|
+
subscribeKey(t, n) {
|
|
21
|
+
return _(e, t, n);
|
|
22
|
+
},
|
|
23
|
+
resetState() {
|
|
24
|
+
Object.assign(e, { ...b });
|
|
25
|
+
},
|
|
26
|
+
async getAssetsForNetwork(t) {
|
|
27
|
+
const n = W(t), s = await m.getAssetsImageAndPrice(n), r = n.map((a) => {
|
|
28
|
+
var i, o, p, y;
|
|
29
|
+
const u = a.asset === "native" ? C() : `${a.network}:${a.asset}`, c = s.find((S) => {
|
|
30
|
+
var g, d, h;
|
|
31
|
+
return ((h = (d = (g = S.fungibles) == null ? void 0 : g[0]) == null ? void 0 : d.address) == null ? void 0 : h.toLowerCase()) === u.toLowerCase();
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
...a,
|
|
35
|
+
price: ((o = (i = c == null ? void 0 : c.fungibles) == null ? void 0 : i[0]) == null ? void 0 : o.price) || 1,
|
|
36
|
+
metadata: {
|
|
37
|
+
...a.metadata,
|
|
38
|
+
iconUrl: (y = (p = c == null ? void 0 : c.fungibles) == null ? void 0 : p[0]) == null ? void 0 : y.iconUrl
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
return e.assets = r, r;
|
|
43
|
+
},
|
|
44
|
+
async getAssetsImageAndPrice(t) {
|
|
45
|
+
const n = t.map((r) => r.asset === "native" ? C() : `${r.network}:${r.asset}`);
|
|
46
|
+
return await Promise.all(n.map((r) => T.fetchTokenPrice({ addresses: [r] })));
|
|
47
|
+
},
|
|
48
|
+
getTokenAmount() {
|
|
49
|
+
var s;
|
|
50
|
+
if (!((s = e == null ? void 0 : e.paymentAsset) != null && s.price))
|
|
51
|
+
throw new Error("Cannot get token price");
|
|
52
|
+
const t = f.bigNumber(e.amount ?? 0).round(8), n = f.bigNumber(e.paymentAsset.price).round(8);
|
|
53
|
+
return t.div(n).round(8).toNumber();
|
|
54
|
+
},
|
|
55
|
+
setAmount(t) {
|
|
56
|
+
var n;
|
|
57
|
+
e.amount = t, (n = e.paymentAsset) != null && n.price && (e.tokenAmount = m.getTokenAmount());
|
|
58
|
+
},
|
|
59
|
+
setPaymentAsset(t) {
|
|
60
|
+
e.paymentAsset = t;
|
|
61
|
+
},
|
|
62
|
+
isPayWithExchangeEnabled() {
|
|
63
|
+
var t;
|
|
64
|
+
return (t = L.state.remoteFeatures) == null ? void 0 : t.payWithExchange;
|
|
65
|
+
},
|
|
66
|
+
isPayWithExchangeSupported() {
|
|
67
|
+
return m.isPayWithExchangeEnabled() && l.state.activeCaipNetwork && I.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace);
|
|
68
|
+
},
|
|
69
|
+
// -- Getters ----------------------------------------- //
|
|
70
|
+
async fetchExchanges() {
|
|
71
|
+
var t;
|
|
72
|
+
try {
|
|
73
|
+
const n = m.isPayWithExchangeSupported();
|
|
74
|
+
if (!e.paymentAsset || !n) {
|
|
75
|
+
e.exchanges = [], e.isLoading = !1;
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
e.isLoading = !0;
|
|
79
|
+
const s = await N({
|
|
80
|
+
page: D,
|
|
81
|
+
asset: P(e.paymentAsset.network, e.paymentAsset.asset),
|
|
82
|
+
amount: ((t = e.amount) == null ? void 0 : t.toString()) ?? "0"
|
|
83
|
+
});
|
|
84
|
+
e.exchanges = s.exchanges.slice(0, 2);
|
|
85
|
+
} catch {
|
|
86
|
+
throw A.showError("Unable to get exchanges"), new Error("Unable to get exchanges");
|
|
87
|
+
} finally {
|
|
88
|
+
e.isLoading = !1;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
async getPayUrl(t, n) {
|
|
92
|
+
try {
|
|
93
|
+
const s = Number(n.amount), r = await x({
|
|
94
|
+
exchangeId: t,
|
|
95
|
+
asset: P(n.network, n.asset),
|
|
96
|
+
amount: s.toString(),
|
|
97
|
+
recipient: `${n.network}:${n.recipient}`
|
|
98
|
+
});
|
|
99
|
+
return w.sendEvent({
|
|
100
|
+
type: "track",
|
|
101
|
+
event: "PAY_EXCHANGE_SELECTED",
|
|
102
|
+
properties: {
|
|
103
|
+
exchange: {
|
|
104
|
+
id: t
|
|
105
|
+
},
|
|
106
|
+
configuration: {
|
|
107
|
+
network: n.network,
|
|
108
|
+
asset: n.asset,
|
|
109
|
+
recipient: n.recipient,
|
|
110
|
+
amount: s
|
|
111
|
+
},
|
|
112
|
+
currentPayment: {
|
|
113
|
+
type: "exchange",
|
|
114
|
+
exchangeId: t
|
|
115
|
+
},
|
|
116
|
+
source: "fund-from-exchange",
|
|
117
|
+
headless: !1
|
|
118
|
+
}
|
|
119
|
+
}), r;
|
|
120
|
+
} catch (s) {
|
|
121
|
+
throw s instanceof Error && s.message.includes("is not supported") ? new Error("Asset not supported") : new Error(s.message);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
async handlePayWithExchange(t) {
|
|
125
|
+
var n;
|
|
126
|
+
try {
|
|
127
|
+
const s = (n = l.getAccountData()) == null ? void 0 : n.address;
|
|
128
|
+
if (!s)
|
|
129
|
+
throw new Error("No account connected");
|
|
130
|
+
if (!e.paymentAsset)
|
|
131
|
+
throw new Error("No payment asset selected");
|
|
132
|
+
const r = E.returnOpenHref("", "popupWindow", "scrollbar=yes,width=480,height=720");
|
|
133
|
+
if (!r)
|
|
134
|
+
throw new Error("Could not create popup window");
|
|
135
|
+
e.isPaymentInProgress = !0, e.paymentId = crypto.randomUUID(), e.currentPayment = {
|
|
136
|
+
type: "exchange",
|
|
137
|
+
exchangeId: t
|
|
138
|
+
};
|
|
139
|
+
const { network: a, asset: u } = e.paymentAsset, c = {
|
|
140
|
+
network: a,
|
|
141
|
+
asset: u,
|
|
142
|
+
amount: e.tokenAmount,
|
|
143
|
+
recipient: s
|
|
144
|
+
}, i = await m.getPayUrl(t, c);
|
|
145
|
+
if (!i) {
|
|
146
|
+
try {
|
|
147
|
+
r.close();
|
|
148
|
+
} catch (o) {
|
|
149
|
+
console.error("Unable to close popup window", o);
|
|
150
|
+
}
|
|
151
|
+
throw new Error("Unable to initiate payment");
|
|
152
|
+
}
|
|
153
|
+
e.currentPayment.sessionId = i.sessionId, e.currentPayment.status = "IN_PROGRESS", e.currentPayment.exchangeId = t, r.location.href = i.url;
|
|
154
|
+
} catch {
|
|
155
|
+
e.error = "Unable to initiate payment", A.showError(e.error);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
async waitUntilComplete({ exchangeId: t, sessionId: n, paymentId: s, retries: r = 20 }) {
|
|
159
|
+
const a = await m.getBuyStatus(t, n, s);
|
|
160
|
+
if (a.status === "SUCCESS" || a.status === "FAILED")
|
|
161
|
+
return a;
|
|
162
|
+
if (r === 0)
|
|
163
|
+
throw new Error("Unable to get deposit status");
|
|
164
|
+
return await new Promise((u) => {
|
|
165
|
+
setTimeout(u, 5e3);
|
|
166
|
+
}), m.waitUntilComplete({
|
|
167
|
+
exchangeId: t,
|
|
168
|
+
sessionId: n,
|
|
169
|
+
paymentId: s,
|
|
170
|
+
retries: r - 1
|
|
171
|
+
});
|
|
172
|
+
},
|
|
173
|
+
async getBuyStatus(t, n, s) {
|
|
174
|
+
var r, a, u, c, i;
|
|
175
|
+
try {
|
|
176
|
+
if (!e.currentPayment)
|
|
177
|
+
throw new Error("No current payment");
|
|
178
|
+
const o = await U({ sessionId: n, exchangeId: t });
|
|
179
|
+
if (e.currentPayment.status = o.status, o.status === "SUCCESS" || o.status === "FAILED") {
|
|
180
|
+
const p = (r = l.getAccountData()) == null ? void 0 : r.address;
|
|
181
|
+
e.currentPayment.result = o.txHash, e.isPaymentInProgress = !1, w.sendEvent({
|
|
182
|
+
type: "track",
|
|
183
|
+
event: o.status === "SUCCESS" ? "PAY_SUCCESS" : "PAY_ERROR",
|
|
184
|
+
properties: {
|
|
185
|
+
message: o.status === "FAILED" ? E.parseError(e.error) : void 0,
|
|
186
|
+
source: "fund-from-exchange",
|
|
187
|
+
paymentId: s,
|
|
188
|
+
configuration: {
|
|
189
|
+
network: ((a = e.paymentAsset) == null ? void 0 : a.network) || "",
|
|
190
|
+
asset: ((u = e.paymentAsset) == null ? void 0 : u.asset) || "",
|
|
191
|
+
recipient: p || "",
|
|
192
|
+
amount: e.amount ?? 0
|
|
193
|
+
},
|
|
194
|
+
currentPayment: {
|
|
195
|
+
type: "exchange",
|
|
196
|
+
exchangeId: (c = e.currentPayment) == null ? void 0 : c.exchangeId,
|
|
197
|
+
sessionId: (i = e.currentPayment) == null ? void 0 : i.sessionId,
|
|
198
|
+
result: o.txHash
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return o;
|
|
204
|
+
} catch {
|
|
205
|
+
return {
|
|
206
|
+
status: "UNKNOWN",
|
|
207
|
+
txHash: ""
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
reset() {
|
|
212
|
+
e.currentPayment = void 0, e.isPaymentInProgress = !1, e.paymentId = "", e.paymentAsset = null, e.amount = 0, e.tokenAmount = 0, e.priceLoading = !1, e.error = null, e.exchanges = [], e.isLoading = !1;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
export {
|
|
216
|
+
m as E
|
|
217
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { cU as g, cV as f, cX as p, cY as m, d0 as v, dg as c, cM as u, d2 as $ } from "./index-DeL88Lwc.js";
|
|
2
|
+
import { n as h, c as y } from "./index-DuTny38n.js";
|
|
3
|
+
const b = g`
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: ${({ spacing: t }) => t[1]};
|
|
9
|
+
text-transform: uppercase;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([data-variant='accent']) {
|
|
14
|
+
background-color: ${({ tokens: t }) => t.core.foregroundAccent010};
|
|
15
|
+
color: ${({ tokens: t }) => t.core.textAccentPrimary};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([data-variant='info']) {
|
|
19
|
+
background-color: ${({ tokens: t }) => t.theme.foregroundSecondary};
|
|
20
|
+
color: ${({ tokens: t }) => t.theme.textSecondary};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([data-variant='success']) {
|
|
24
|
+
background-color: ${({ tokens: t }) => t.core.backgroundSuccess};
|
|
25
|
+
color: ${({ tokens: t }) => t.core.textSuccess};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([data-variant='warning']) {
|
|
29
|
+
background-color: ${({ tokens: t }) => t.core.backgroundWarning};
|
|
30
|
+
color: ${({ tokens: t }) => t.core.textWarning};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([data-variant='error']) {
|
|
34
|
+
background-color: ${({ tokens: t }) => t.core.backgroundError};
|
|
35
|
+
color: ${({ tokens: t }) => t.core.textError};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([data-variant='certified']) {
|
|
39
|
+
background-color: ${({ tokens: t }) => t.theme.foregroundSecondary};
|
|
40
|
+
color: ${({ tokens: t }) => t.theme.textSecondary};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([data-size='md']) {
|
|
44
|
+
height: 30px;
|
|
45
|
+
padding: 0 ${({ spacing: t }) => t[2]};
|
|
46
|
+
border-radius: ${({ borderRadius: t }) => t[2]};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([data-size='sm']) {
|
|
50
|
+
height: 20px;
|
|
51
|
+
padding: 0 ${({ spacing: t }) => t[1]};
|
|
52
|
+
border-radius: ${({ borderRadius: t }) => t[1]};
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
var d = function(t, e, r, a) {
|
|
56
|
+
var n = arguments.length, o = n < 3 ? e : a === null ? a = Object.getOwnPropertyDescriptor(e, r) : a, s;
|
|
57
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(t, e, r, a);
|
|
58
|
+
else for (var l = t.length - 1; l >= 0; l--) (s = t[l]) && (o = (n < 3 ? s(o) : n > 3 ? s(e, r, o) : s(e, r)) || o);
|
|
59
|
+
return n > 3 && o && Object.defineProperty(e, r, o), o;
|
|
60
|
+
};
|
|
61
|
+
let i = class extends p {
|
|
62
|
+
constructor() {
|
|
63
|
+
super(...arguments), this.variant = "accent", this.size = "md", this.icon = void 0;
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
this.dataset.variant = this.variant, this.dataset.size = this.size;
|
|
67
|
+
const e = this.size === "md" ? "md-medium" : "sm-medium", r = this.size === "md" ? "md" : "sm";
|
|
68
|
+
return m`
|
|
69
|
+
${this.icon ? m`<wui-icon size=${r} name=${this.icon}></wui-icon>` : null}
|
|
70
|
+
<wui-text
|
|
71
|
+
display="inline"
|
|
72
|
+
data-variant=${this.variant}
|
|
73
|
+
variant=${e}
|
|
74
|
+
color="inherit"
|
|
75
|
+
>
|
|
76
|
+
<slot></slot>
|
|
77
|
+
</wui-text>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
i.styles = [f, b];
|
|
82
|
+
d([
|
|
83
|
+
h()
|
|
84
|
+
], i.prototype, "variant", void 0);
|
|
85
|
+
d([
|
|
86
|
+
h()
|
|
87
|
+
], i.prototype, "size", void 0);
|
|
88
|
+
d([
|
|
89
|
+
h()
|
|
90
|
+
], i.prototype, "icon", void 0);
|
|
91
|
+
i = d([
|
|
92
|
+
y("wui-tag")
|
|
93
|
+
], i);
|
|
94
|
+
const C = {
|
|
95
|
+
getTabsByNamespace(t) {
|
|
96
|
+
var r;
|
|
97
|
+
return !!t && t === $.CHAIN.EVM ? ((r = u.state.remoteFeatures) == null ? void 0 : r.activity) === !1 ? c.ACCOUNT_TABS.filter((a) => a.label !== "Activity") : c.ACCOUNT_TABS : [];
|
|
98
|
+
},
|
|
99
|
+
isValidReownName(t) {
|
|
100
|
+
return /^[a-zA-Z0-9]+$/gu.test(t);
|
|
101
|
+
},
|
|
102
|
+
isValidEmail(t) {
|
|
103
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/gu.test(t);
|
|
104
|
+
},
|
|
105
|
+
validateReownName(t) {
|
|
106
|
+
return t.replace(/\^/gu, "").toLowerCase().replace(/[^a-zA-Z0-9]/gu, "");
|
|
107
|
+
},
|
|
108
|
+
hasFooter() {
|
|
109
|
+
var e;
|
|
110
|
+
const t = v.state.view;
|
|
111
|
+
if (c.VIEWS_WITH_LEGAL_FOOTER.includes(t)) {
|
|
112
|
+
const { termsConditionsUrl: r, privacyPolicyUrl: a } = u.state, n = (e = u.state.features) == null ? void 0 : e.legalCheckbox;
|
|
113
|
+
return !(!r && !a || n);
|
|
114
|
+
}
|
|
115
|
+
return c.VIEWS_WITH_DEFAULT_FOOTER.includes(t);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
C as H
|
|
120
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { n as g, Y as c, t as r, p as d, O as s, s as A } from "./property-Bd8U3_QP.js";
|
|
2
|
+
var m = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (a, o, p, i) => {
|
|
3
|
+
for (var e = i > 1 ? void 0 : i ? w(o, p) : o, h = a.length - 1, n; h >= 0; h--)
|
|
4
|
+
(n = a[h]) && (e = (i ? n(o, p, e) : n(e)) || e);
|
|
5
|
+
return i && e && m(o, p, e), e;
|
|
6
|
+
};
|
|
7
|
+
let t = class extends g {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.size = "1em", this.weight = "regular", this.color = "currentColor", this.mirrored = !1;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
var a;
|
|
13
|
+
return c`<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="${this.size}"
|
|
16
|
+
height="${this.size}"
|
|
17
|
+
fill="${this.color}"
|
|
18
|
+
viewBox="0 0 256 256"
|
|
19
|
+
transform=${this.mirrored ? "scale(-1, 1)" : null}
|
|
20
|
+
>
|
|
21
|
+
${t.weightsMap.get((a = this.weight) != null ? a : "regular")}
|
|
22
|
+
</svg>`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
t.weightsMap = /* @__PURE__ */ new Map([
|
|
26
|
+
[
|
|
27
|
+
"thin",
|
|
28
|
+
r`<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-86.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L124,158.34V88a4,4,0,0,1,8,0v70.34l25.17-25.17A4,4,0,0,1,162.83,133.17Z"/>`
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"light",
|
|
32
|
+
r`<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-86.24a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L122,153.51V88a6,6,0,0,1,12,0v65.51l21.76-21.75A6,6,0,0,1,164.24,131.76Z"/>`
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"regular",
|
|
36
|
+
r`<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-85.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L120,148.69V88a8,8,0,0,1,16,0v60.69l18.34-18.35A8,8,0,0,1,165.66,130.34Z"/>`
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"bold",
|
|
40
|
+
r`<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-84.49a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L116,139V88a12,12,0,0,1,24,0v51l11.51-11.52A12,12,0,0,1,168.49,127.51Z"/>`
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"fill",
|
|
44
|
+
r`<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,117.66-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L120,148.69V88a8,8,0,0,1,16,0v60.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"/>`
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"duotone",
|
|
48
|
+
r`<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-85.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L120,148.69V88a8,8,0,0,1,16,0v60.69l18.34-18.35A8,8,0,0,1,165.66,130.34Z"/>`
|
|
49
|
+
]
|
|
50
|
+
]);
|
|
51
|
+
t.styles = d`
|
|
52
|
+
:host {
|
|
53
|
+
display: contents;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
l([
|
|
57
|
+
s({ type: String, reflect: !0 })
|
|
58
|
+
], t.prototype, "size", 2);
|
|
59
|
+
l([
|
|
60
|
+
s({ type: String, reflect: !0 })
|
|
61
|
+
], t.prototype, "weight", 2);
|
|
62
|
+
l([
|
|
63
|
+
s({ type: String, reflect: !0 })
|
|
64
|
+
], t.prototype, "color", 2);
|
|
65
|
+
l([
|
|
66
|
+
s({ type: Boolean, reflect: !0 })
|
|
67
|
+
], t.prototype, "mirrored", 2);
|
|
68
|
+
t = l([
|
|
69
|
+
A("ph-arrow-circle-down")
|
|
70
|
+
], t);
|
|
71
|
+
export {
|
|
72
|
+
t as PhArrowCircleDown
|
|
73
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { n as g, Y as c, t as r, p as d, O as i, s as w } from "./property-Bd8U3_QP.js";
|
|
2
|
+
var u = Object.defineProperty, A = Object.getOwnPropertyDescriptor, o = (a, l, s, h) => {
|
|
3
|
+
for (var e = h > 1 ? void 0 : h ? A(l, s) : l, p = a.length - 1, n; p >= 0; p--)
|
|
4
|
+
(n = a[p]) && (e = (h ? n(l, s, e) : n(e)) || e);
|
|
5
|
+
return h && e && u(l, s, e), e;
|
|
6
|
+
};
|
|
7
|
+
let t = class extends g {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.size = "1em", this.weight = "regular", this.color = "currentColor", this.mirrored = !1;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
var a;
|
|
13
|
+
return c`<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="${this.size}"
|
|
16
|
+
height="${this.size}"
|
|
17
|
+
fill="${this.color}"
|
|
18
|
+
viewBox="0 0 256 256"
|
|
19
|
+
transform=${this.mirrored ? "scale(-1, 1)" : null}
|
|
20
|
+
>
|
|
21
|
+
${t.weightsMap.get((a = this.weight) != null ? a : "regular")}
|
|
22
|
+
</svg>`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
t.weightsMap = /* @__PURE__ */ new Map([
|
|
26
|
+
[
|
|
27
|
+
"thin",
|
|
28
|
+
r`<path d="M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"/>`
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"light",
|
|
32
|
+
r`<path d="M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"/>`
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"regular",
|
|
36
|
+
r`<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>`
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"bold",
|
|
40
|
+
r`<path d="M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"/>`
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"fill",
|
|
44
|
+
r`<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"/>`
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"duotone",
|
|
48
|
+
r`<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>`
|
|
49
|
+
]
|
|
50
|
+
]);
|
|
51
|
+
t.styles = d`
|
|
52
|
+
:host {
|
|
53
|
+
display: contents;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
o([
|
|
57
|
+
i({ type: String, reflect: !0 })
|
|
58
|
+
], t.prototype, "size", 2);
|
|
59
|
+
o([
|
|
60
|
+
i({ type: String, reflect: !0 })
|
|
61
|
+
], t.prototype, "weight", 2);
|
|
62
|
+
o([
|
|
63
|
+
i({ type: String, reflect: !0 })
|
|
64
|
+
], t.prototype, "color", 2);
|
|
65
|
+
o([
|
|
66
|
+
i({ type: Boolean, reflect: !0 })
|
|
67
|
+
], t.prototype, "mirrored", 2);
|
|
68
|
+
t = o([
|
|
69
|
+
w("ph-arrow-clockwise")
|
|
70
|
+
], t);
|
|
71
|
+
export {
|
|
72
|
+
t as PhArrowClockwise
|
|
73
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { n as g, Y as d, t as r, p as w, O as s, s as c } from "./property-Bd8U3_QP.js";
|
|
2
|
+
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, l = (a, o, h, i) => {
|
|
3
|
+
for (var e = i > 1 ? void 0 : i ? y(o, h) : o, p = a.length - 1, n; p >= 0; p--)
|
|
4
|
+
(n = a[p]) && (e = (i ? n(o, h, e) : n(e)) || e);
|
|
5
|
+
return i && e && u(o, h, e), e;
|
|
6
|
+
};
|
|
7
|
+
let t = class extends g {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.size = "1em", this.weight = "regular", this.color = "currentColor", this.mirrored = !1;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
var a;
|
|
13
|
+
return d`<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="${this.size}"
|
|
16
|
+
height="${this.size}"
|
|
17
|
+
fill="${this.color}"
|
|
18
|
+
viewBox="0 0 256 256"
|
|
19
|
+
transform=${this.mirrored ? "scale(-1, 1)" : null}
|
|
20
|
+
>
|
|
21
|
+
${t.weightsMap.get((a = this.weight) != null ? a : "regular")}
|
|
22
|
+
</svg>`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
t.weightsMap = /* @__PURE__ */ new Map([
|
|
26
|
+
[
|
|
27
|
+
"thin",
|
|
28
|
+
r`<path d="M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"/>`
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"light",
|
|
32
|
+
r`<path d="M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"/>`
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"regular",
|
|
36
|
+
r`<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"/>`
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"bold",
|
|
40
|
+
r`<path d="M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"/>`
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"fill",
|
|
44
|
+
r`<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"/>`
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"duotone",
|
|
48
|
+
r`<path d="M200,144l-72,72L56,144Z" opacity="0.2"/><path d="M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"/>`
|
|
49
|
+
]
|
|
50
|
+
]);
|
|
51
|
+
t.styles = w`
|
|
52
|
+
:host {
|
|
53
|
+
display: contents;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
l([
|
|
57
|
+
s({ type: String, reflect: !0 })
|
|
58
|
+
], t.prototype, "size", 2);
|
|
59
|
+
l([
|
|
60
|
+
s({ type: String, reflect: !0 })
|
|
61
|
+
], t.prototype, "weight", 2);
|
|
62
|
+
l([
|
|
63
|
+
s({ type: String, reflect: !0 })
|
|
64
|
+
], t.prototype, "color", 2);
|
|
65
|
+
l([
|
|
66
|
+
s({ type: Boolean, reflect: !0 })
|
|
67
|
+
], t.prototype, "mirrored", 2);
|
|
68
|
+
t = l([
|
|
69
|
+
c("ph-arrow-down")
|
|
70
|
+
], t);
|
|
71
|
+
export {
|
|
72
|
+
t as PhArrowDown
|
|
73
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { n as g, Y as d, t as r, p as c, O as s, s as u } from "./property-Bd8U3_QP.js";
|
|
2
|
+
var w = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (a, o, h, i) => {
|
|
3
|
+
for (var e = i > 1 ? void 0 : i ? f(o, h) : o, p = a.length - 1, n; p >= 0; p--)
|
|
4
|
+
(n = a[p]) && (e = (i ? n(o, h, e) : n(e)) || e);
|
|
5
|
+
return i && e && w(o, h, e), e;
|
|
6
|
+
};
|
|
7
|
+
let t = class extends g {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments), this.size = "1em", this.weight = "regular", this.color = "currentColor", this.mirrored = !1;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
var a;
|
|
13
|
+
return d`<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
width="${this.size}"
|
|
16
|
+
height="${this.size}"
|
|
17
|
+
fill="${this.color}"
|
|
18
|
+
viewBox="0 0 256 256"
|
|
19
|
+
transform=${this.mirrored ? "scale(-1, 1)" : null}
|
|
20
|
+
>
|
|
21
|
+
${t.weightsMap.get((a = this.weight) != null ? a : "regular")}
|
|
22
|
+
</svg>`;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
t.weightsMap = /* @__PURE__ */ new Map([
|
|
26
|
+
[
|
|
27
|
+
"thin",
|
|
28
|
+
r`<path d="M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"/>`
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
"light",
|
|
32
|
+
r`<path d="M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"/>`
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"regular",
|
|
36
|
+
r`<path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"/>`
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"bold",
|
|
40
|
+
r`<path d="M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"/>`
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"fill",
|
|
44
|
+
r`<path d="M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"/>`
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"duotone",
|
|
48
|
+
r`<path d="M112,56V200L40,128Z" opacity="0.2"/><path d="M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"/>`
|
|
49
|
+
]
|
|
50
|
+
]);
|
|
51
|
+
t.styles = c`
|
|
52
|
+
:host {
|
|
53
|
+
display: contents;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
l([
|
|
57
|
+
s({ type: String, reflect: !0 })
|
|
58
|
+
], t.prototype, "size", 2);
|
|
59
|
+
l([
|
|
60
|
+
s({ type: String, reflect: !0 })
|
|
61
|
+
], t.prototype, "weight", 2);
|
|
62
|
+
l([
|
|
63
|
+
s({ type: String, reflect: !0 })
|
|
64
|
+
], t.prototype, "color", 2);
|
|
65
|
+
l([
|
|
66
|
+
s({ type: Boolean, reflect: !0 })
|
|
67
|
+
], t.prototype, "mirrored", 2);
|
|
68
|
+
t = l([
|
|
69
|
+
u("ph-arrow-left")
|
|
70
|
+
], t);
|
|
71
|
+
export {
|
|
72
|
+
t as PhArrowLeft
|
|
73
|
+
};
|