PageSourceSearch

https://www.poloniex.com/v3/entry/v3.js

js poloniex.com collected 2026-10-01 08:59:20 UTC 7,804 bytes, 214 lines download raw bytes

1(function (web, UniFrame) {
2  /* ------ 通过 @fe/figma-token-export 导出,请勿修改 start ------ */
3  /** 基础颜色 */
4  var baseColors = [
5    "rgba(255, 255, 255, 1)",
6    "rgba(250, 250, 250, 1)",
7    "rgba(243, 243, 243, 1)",
8    "rgba(228, 228, 228, 1)",
9    "rgba(204, 204, 204, 1)",
10    "rgba(179, 179, 179, 1)",
11    "rgba(179, 179, 179, 1)",
12    "rgba(166, 166, 166, 1)",
13    "rgba(153, 153, 153, 1)",
14    "rgba(140, 140, 140, 1)",
15    "rgba(128, 128, 128, 1)",
16    "rgba(115, 115, 115, 1)",
17    "rgba(102, 102, 102, 1)",
18    "rgba(89, 89, 89, 1)",
19    "rgba(76, 76, 76, 1)",
20    "rgba(64, 64, 64, 1)",
21    "rgba(51, 51, 51, 1)",
22    "rgba(38, 38, 38, 1)",
23    "rgba(26, 26, 26, 1)",
24    "rgba(13, 13, 13, 1)",
25    "rgba(0, 0, 0, 1)",
26    "rgba(229, 246, 239, 1)",
27    "rgba(160, 216, 191, 1)",
28    "rgba(112, 197, 159, 1)",
29    "rgba(65, 177, 127, 1)",
30    "rgba(17, 158, 95, 1)",
31    "rgba(14, 126, 76, 1)",
32    "rgba(10, 95, 57, 1)",
33    "rgba(5, 52, 31, 1)",
34    "rgba(3, 32, 19, 1)",
35    "rgba(255, 242, 243, 1)",
36    "rgba(231, 181, 182, 1)",
37    "rgba(220, 145, 146, 1)",
38    "rgba(208, 108, 109, 1)",
39    "rgba(196, 71, 73, 1)",
40    "rgba(157, 57, 58, 1)",
41    "rgba(118, 43, 44, 1)",
42    "rgba(66, 16, 17, 1)",
43    "rgba(39, 14, 15, 1)",
44    "rgba(254, 245, 234, 1)",
45    "rgba(245, 214, 179, 1)",
46    "rgba(239, 194, 140, 1)",
47    "rgba(234, 173, 102, 1)",
48    "rgba(229, 153, 64, 1)",
49    "rgba(183, 122, 51, 1)",
50    "rgba(137, 92, 38, 1)",
51    "rgba(67, 40, 9, 1)",
52    "rgba(46, 31, 13, 1)",
53  ];
54
55  /** 主题颜色对应关系 */
56  var themeColorMap = {
57    "light": {
58      "background-h1": baseColors["0"],
59      "background-h2": baseColors["1"],
60      "background-h3": baseColors["2"],
61      "background-negative": baseColors["30"],
62      "background-positive": baseColors["21"],
63      "background-warning": baseColors["39"],
64      "text-h1": baseColors["20"],
65      "text-h2": baseColors["10"],
66      "text-h3": baseColors["6"],
67      "text-h4": baseColors["4"],
68      "text-positive": baseColors["25"],
69      "text-negative": baseColors["34"],
70      "text-warning": baseColors["43"],
71      "text-button-primary": baseColors["0"],
72      "text-button-secondary": baseColors["0"],
73      "text-button-ghost-outline": baseColors["20"],
74      "text-button-disable": baseColors["6"],
75      "icon-h1": baseColors["20"],
76      "icon-h2": baseColors["10"],
77      "icon-h3": baseColors["6"],
78      "icon-h4": baseColors["4"],
79      "icon-positive": baseColors["25"],
80      "icon-negative": baseColors["34"],
81      "icon-warning": baseColors["43"],
82      "icon-button-primary": baseColors["0"],
83      "icon-button-secondary": baseColors["0"],
84      "icon-button-ghost-outline": baseColors["20"],
85      "icon-button-disable": baseColors["6"],
86      "border-h1": baseColors["2"],
87      "border-h2": baseColors["3"],
88      "border-h3": baseColors["4"],
89      "border-input": baseColors["20"],
90      "border-positive": baseColors["25"],
91      "border-negative": baseColors["34"],
92      "button-primary-rest": baseColors["25"],
93      "button-primary-hover": baseColors["26"],
94      "button-secondary-rest": baseColors["20"],
95      "button-outline-rest": baseColors["4"],
96      "button-outline-hover": baseColors["20"],
97      "button-ghost-rest": baseColors["2"],
98      "button-ghost-hover": baseColors["3"],
99      "button-secondary-hover": baseColors["18"],
100      "button-disable-rest": baseColors["3"],
101      "button-danger-rest": baseColors["34"],
102      "button-danger-hover": baseColors["35"],
103      "dialogue-h1": baseColors["0"],
104      "dialogue-h2": baseColors["1"],
105      "dialogue-mask": "rgba(0, 0, 0, 0.5)",
106      "skeletonloader-bgcolor": baseColors["1"]
107    },
108    "dark": {
109      "background-h1": baseColors["20"],
110      "background-h2": baseColors["18"],
111      "background-h3": baseColors["17"],
112      "background-negative": baseColors["37"],
113      "background-positive": baseColors["28"],
114      "background-warning": baseColors["46"],
115      "text-h1": baseColors["0"],
116      "text-h2": baseColors["10"],
117      "text-h3": baseColors["14"],
118      "text-h4": baseColors["16"],
119      "text-positive": baseColors["25"],
120      "text-negative": baseColors["34"],
121      "text-warning": baseColors["43"],
122      "text-button-primary": baseColors["0"],
123      "text-button-secondary": baseColors["20"],
124      "text-button-ghost-outline": baseColors["0"],
125      "text-button-disable": baseColors["12"],
126      "icon-h1": baseColors["0"],
127      "icon-h2": baseColors["10"],
128      "icon-h3": baseColors["14"],
129      "icon-h4": baseColors["16"],
130      "icon-positive": baseColors["25"],
131      "icon-negative": baseColors["34"],
132      "icon-warning": baseColors["43"],
133      "icon-button-primary": baseColors["0"],
134      "icon-button-secondary": baseColors["20"],
135      "icon-button-ghost-outline": baseColors["0"],
136      "icon-button-disable": baseColors["12"],
137      "border-h1": baseColors["17"],
138      "border-h2": baseColors["16"],
139      "border-h3": baseColors["15"],
140      "border-input": baseColors["0"],
141      "border-positive": baseColors["25"],
142      "border-negative": baseColors["34"],
143      "button-primary-rest": baseColors["25"],
144      "button-primary-hover": baseColors["26"],
145      "button-secondary-rest": baseColors["0"],
146      "button-outline-rest": baseColors["16"],
147      "button-outline-hover": baseColors["0"],
148      "button-ghost-rest": baseColors["17"],
149      "button-ghost-hover": baseColors["16"],
150      "button-secondary-hover": baseColors["2"],
151      "button-disable-rest": baseColors["16"],
152      "button-danger-rest": baseColors["34"],
153      "button-danger-hover": baseColors["35"],
154      "dialogue-h1": baseColors["18"],
155      "dialogue-h2": baseColors["17"],
156      "dialogue-mask": "rgba(0, 0, 0, 0.5)",
157      "skeletonloader-bgcolor": baseColors["19"]
158    }
159  };
160
161  web.getThemeColor = function (key, parmas) {
162    var theme = parmas && typeof parmas === "object" ? parmas.theme : undefined;
163    var colorType = parmas && typeof parmas === "object" ? parmas.colorType : undefined;
164    key = String(key).replace(/[/_]/g, "-").replace("--", "").toLowerCase();
165    if (!theme) theme = UniFrame.get("theme");
166    if (!themeColorMap[theme] || !themeColorMap[theme][key]) return "";
167    var result = themeColorMap[theme][key];
168    if (colorType === 16) {
169      result = rgbaTo16color(result);
170    }
171    return result;
172  };
173
174  /**
175   * 封装rgbaTo16color功能函数
176   * 功能: 把rgba颜色(或rgb颜色)转成十六进制颜色
177   */
178  function rgbaTo16color(color) {
179    var val = String(color)
180      .replace(/rgba?\(/, "")
181      .replace(/\)/, "")
182      .replace(/[\s+]/g, "")
183      .split(",");
184
185    var r = parseInt(val[0]);
186    var g = parseInt(val[1]);
187    var b = parseInt(val[2]);
188    var a = parseFloat(val[3] || 1);
189
190    // 确保值在 0-255 范围内(RGB)和 0-1 范围内(Alpha)
191    r = Math.max(0, Math.min(255, r));
192    g = Math.max(0, Math.min(255, g));
193    b = Math.max(0, Math.min(255, b));
194    a = Math.max(0, Math.min(1, a));
195
196    // 转换为 2 位十六进制
197    var hexR = ("0" + r.toString(16)).slice(-2);
198    var hexG = ("0" + g.toString(16)).slice(-2);
199    var hexB = ("0" + b.toString(16)).slice(-2);
200    var hexA = ("0" + Math.round(a * 255).toString(16)).slice(-2);
201    hexA = hexA ? (hexA.toLowerCase() == "ff" ? "" : hexA) : "";
202    // 返回 8 位 RGBA 格式(如 #43ad7f7f)
203    return "#" + hexR + hexG + hexB + hexA;
204  }
205  /* ------ 通过 @fe/figma-token-export 导出,请勿修改 end ------ */
206})((window.__WEB__ = window.__WEB__ || {}), window.UniFrame);
207
208// 动态加载新版 iconfont(p-icon- 前缀),与旧版并行,互不影响
209(function () {
210  var s = document.createElement('script');
211  s.src = '/v3/poloicon/iconfont-v3.js';
212  s.async = true;
213  document.head.appendChild(s);
214})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.