@alodi/site 1.1.0 → 1.1.2

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/cjs/site.js CHANGED
@@ -24,60 +24,40 @@ __export(site_exports, {
24
24
  getSiteConfig: () => getSiteConfig
25
25
  });
26
26
  module.exports = __toCommonJS(site_exports);
27
- var SITE = {
28
- JILI_291: "291jili",
29
- SUPER_291: "super291",
30
- JILI_646: "646jili",
31
- LODI_291: "lodi291",
32
- TOP_646: "top646",
33
- JILI_80: "80jili",
34
- PH_646: "ph646",
35
- ACE_291: "ace291",
36
- HOT_646: "hot646",
37
- LODI_646: "lodi646",
38
- LODI_GAME: "lodigame",
39
- LOL_646: "lol646",
40
- LODI_777: "lodi777",
41
- YDG_777: "ydg777",
42
- WASP: "wasp",
43
- PG_82: "82pg",
44
- PG_91: "91pg",
45
- ZAPP_SPIN: "zappspin",
46
- WASP_SPIN: "waspspin",
47
- HAA_555: "haa555",
48
- TRADING: "trading",
49
- VANG_WIN: "vangwin",
50
- SORTE_WIN: "sortewin"
51
- };
52
- var SiteConfig = {
27
+ var BRANDS = {
53
28
  // 'PHL'
54
- [SITE.JILI_291]: { name: "291JILI", country: "PHL" },
55
- [SITE.SUPER_291]: { name: "super291", country: "PHL" },
56
- [SITE.JILI_646]: { name: "646JILI", country: "PHL" },
57
- [SITE.LODI_291]: { name: "Lodi291", country: "PHL" },
58
- [SITE.TOP_646]: { name: "TOP646", country: "PHL" },
59
- [SITE.JILI_80]: { name: "80JILI", country: "PHL" },
60
- [SITE.PH_646]: { name: "PH646", country: "PHL" },
61
- [SITE.ACE_291]: { name: "Ace291", country: "PHL" },
62
- [SITE.HOT_646]: { name: "HOT646", country: "PHL" },
63
- [SITE.LODI_646]: { name: "Lodi646", country: "PHL" },
64
- [SITE.LODI_GAME]: { name: "lodigame", country: "PHL" },
65
- [SITE.LOL_646]: { name: "lol646", country: "PHL" },
66
- [SITE.LODI_777]: { name: "Lodi777", country: "PHL" },
67
- [SITE.YDG_777]: { name: "ydg777", country: "PHL" },
29
+ JILI_291: { value: "291jili", country: "PHL", name: "291JILI" },
30
+ SUPER_291: { value: "super291", country: "PHL", name: "super291" },
31
+ JILI_646: { value: "646jili", country: "PHL", name: "646JILI" },
32
+ LODI_291: { value: "lodi291", country: "PHL", name: "Lodi291" },
33
+ TOP_646: { value: "top646", country: "PHL", name: "TOP646" },
34
+ JILI_80: { value: "80jili", country: "PHL", name: "80JILI" },
35
+ PH_646: { value: "ph646", country: "PHL", name: "PH646" },
36
+ ACE_291: { value: "ace291", country: "PHL", name: "Ace291" },
37
+ HOT_646: { value: "hot646", country: "PHL", name: "HOT646" },
38
+ LODI_646: { value: "lodi646", country: "PHL", name: "Lodi646" },
39
+ LODI_GAME: { value: "lodigame", country: "PHL", name: "lodigame" },
40
+ LOL_646: { value: "lol646", country: "PHL", name: "lol646" },
41
+ LODI_777: { value: "lodi777", country: "PHL", name: "Lodi777" },
42
+ YDG_777: { value: "ydg777", country: "PHL", name: "ydg777" },
68
43
  // 'THA'
69
- [SITE.WASP]: { name: "WASPBET", country: "THA" },
70
- [SITE.PG_82]: { name: "AURA88", country: "THA" },
71
- [SITE.PG_91]: { name: "AURA69", country: "THA" },
72
- [SITE.ZAPP_SPIN]: { name: "WASP.WIN", country: "THA" },
73
- [SITE.WASP_SPIN]: { name: "WASP SPIN", country: "THA" },
74
- [SITE.HAA_555]: { name: "HAA555", country: "THA" },
75
- [SITE.TRADING]: { name: "COINAX", country: "THA" },
44
+ WASP: { value: "wasp", country: "THA", name: "WASPBET" },
45
+ PG_82: { value: "82pg", country: "THA", name: "AURA88" },
46
+ PG_91: { value: "91pg", country: "THA", name: "AURA69" },
47
+ ZAPP_SPIN: { value: "zappspin", country: "THA", name: "WASP.WIN" },
48
+ WASP_SPIN: { value: "waspspin", country: "THA", name: "WASP SPIN" },
49
+ HAA_555: { value: "haa555", country: "THA", name: "HAA555" },
50
+ TRADING: { value: "trading", country: "THA", name: "COINAX" },
76
51
  // 'VNM'
77
- [SITE.VANG_WIN]: { name: "VANGWIN", country: "VNM" },
52
+ VANG_WIN: { value: "vangwin", country: "VNM", name: "VANGWIN" },
78
53
  // 'BRA'
79
- [SITE.SORTE_WIN]: { name: "SO99", country: "BRA" }
54
+ SORTE_WIN: { value: "sortewin", country: "BRA", name: "SO99" },
55
+ SORTE_WIN_V1: { value: "sortewin_v1", country: "BRA", name: "SO99" }
80
56
  };
57
+ var SITE = Object.fromEntries(Object.entries(BRANDS).map(([key, value]) => [key, value.value]));
58
+ var SiteConfig = Object.fromEntries(
59
+ Object.entries(BRANDS).map(([, value]) => [value.value, { name: value.name, country: value.country }])
60
+ );
81
61
  var getSiteConfig = (site) => {
82
62
  return {
83
63
  site,
package/dist/env.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  /// <reference types="node" />
2
+ import process from 'node:process';
2
3
  import { type SiteName } from './site';
4
+ /** Node `process.env` 形状,避免给 client 入口引入全局 Node 类型 */
5
+ export type ProcessEnv = typeof process.env;
3
6
  export declare const PLATFORMS: readonly ["ios", "android"];
4
7
  export type PlatformName = (typeof PLATFORMS)[number];
5
8
  export declare const ENVS: readonly ["dev", "test", "beta", "prod"];
@@ -13,13 +16,13 @@ export declare const DEFAULT_ENV_KEYS: {
13
16
  readonly env: "BIU_ENV";
14
17
  };
15
18
  export type OptionName = keyof typeof DEFAULT_ENV_KEYS;
16
- export type OptionConfig = {
19
+ export interface OptionConfig {
17
20
  enable?: boolean;
18
21
  /** 自定义环境变量名,默认 BIU_PLATFORM / BIU_SITE / BIU_API / BIU_WS / BIU_ENV */
19
22
  envKey?: string;
20
23
  demandOption?: boolean;
21
24
  choices?: readonly string[];
22
- };
25
+ }
23
26
  export type ResolvedOptionConfig = {
24
27
  enable: false;
25
28
  } | {
@@ -28,33 +31,33 @@ export type ResolvedOptionConfig = {
28
31
  demandOption: boolean;
29
32
  choices?: readonly string[];
30
33
  };
31
- export type ParseEnvOption = {
32
- env?: NodeJS.ProcessEnv;
34
+ export interface ParseEnvOption {
35
+ env?: ProcessEnv;
33
36
  option?: Partial<Record<OptionName, OptionConfig | false>>;
34
- };
35
- export type SiteEnv = {
37
+ }
38
+ export interface SiteEnv {
36
39
  platform: PlatformName;
37
40
  site: SiteName;
38
41
  api: string;
39
42
  ws: string;
40
43
  env: EnvName;
41
- };
44
+ }
42
45
  /** 解析站点值,支持别名 */
43
46
  export declare function resolveSite(value: string): SiteName;
44
47
  /** 读取环境变量;demand 为 true 且缺失时抛错 */
45
- export declare function readEnvValue(env: NodeJS.ProcessEnv, key: string, demand?: boolean): string | undefined;
48
+ export declare function readEnvValue(env: ProcessEnv, key: string, demand?: boolean): string | undefined;
46
49
  /** 校验取值是否在可选列表中 */
47
50
  export declare function assertEnvChoice<T extends string>(value: string, choices: readonly T[], key: string): T;
48
51
  /** 解析单个字段的 option 配置 */
49
52
  export declare function resolveOptionConfig(conf: OptionConfig | false | undefined, defaultEnvKey: string): ResolvedOptionConfig;
50
- type ReadEnvFieldOptions<T> = {
51
- env?: NodeJS.ProcessEnv;
53
+ interface ReadEnvFieldOptions<T> {
54
+ env?: ProcessEnv;
52
55
  envKey: string;
53
56
  demandOption?: boolean;
54
57
  choices?: readonly string[];
55
58
  /** 原始字符串转换;默认原样返回 */
56
59
  parse?: (raw: string) => T;
57
- };
60
+ }
58
61
  /**
59
62
  * 读取并解析单个环境变量字段,便于扩展自定义配置。
60
63
  *
@@ -77,7 +80,7 @@ export declare function readEnvField<T = string>({ env, envKey, demandOption, ch
77
80
  * return { ...base, cdn };
78
81
  * ```
79
82
  */
80
- export declare function readEnvOption<T = string>(env: NodeJS.ProcessEnv, conf: ResolvedOptionConfig, parse?: (raw: string) => T): T | undefined;
83
+ export declare function readEnvOption<T = string>(env: ProcessEnv, conf: ResolvedOptionConfig, parse?: (raw: string) => T): T | undefined;
81
84
  /**
82
85
  * 从环境变量读取站点构建配置。
83
86
  *
@@ -115,7 +118,7 @@ type SiteEnvKeyMap = Partial<Record<OptionName, string>> & Record<string, string
115
118
  * const env = siteEnvToProcessEnv(values, { cdn: 'BIU_CDN' });
116
119
  * ```
117
120
  */
118
- export declare function siteEnvToProcessEnv(values: Partial<SiteEnv> & Record<string, string | undefined>, keys?: SiteEnvKeyMap): NodeJS.ProcessEnv;
121
+ export declare function siteEnvToProcessEnv(values: Partial<SiteEnv> & Record<string, string | undefined>, keys?: SiteEnvKeyMap): ProcessEnv;
119
122
  /**
120
123
  * 把解析后的配置写回目标 env(默认 process.env),供后续子进程继承。
121
124
  *
@@ -167,7 +170,7 @@ export declare function siteEnvToProcessEnv(values: Partial<SiteEnv> & Record<st
167
170
  * BIU_PLATFORM=ios BIU_SITE=291jili BIU_API=https://api.example.com BIU_WS=wss://ws.example.com BIU_ENV=prod BIU_CDN=https://cdn.example.com npm run build
168
171
  * ```
169
172
  */
170
- export declare function applySiteEnv(values: Partial<SiteEnv> & Record<string, string | undefined>, target?: NodeJS.ProcessEnv, keys?: SiteEnvKeyMap): NodeJS.ProcessEnv;
173
+ export declare function applySiteEnv(values: Partial<SiteEnv> & Record<string, string | undefined>, target?: ProcessEnv, keys?: SiteEnvKeyMap): ProcessEnv;
171
174
  /** 将 env 字典格式化为 dotenv 文本,便于 Vite 读取 */
172
175
  export declare function formatDotEnv(env: Record<string, string | undefined>): string;
173
176
  export {};
package/dist/env.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["env.ts"],"names":[],"mappings":";AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE7C,eAAO,MAAM,SAAS,6BAA8B,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,eAAO,MAAM,IAAI,0CAA2C,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,eAAO,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAC7D,MAAM,GAAE,UAAwB,EAChC,IAAI,GAAE,aAAgC,GACrC,UAAU,CAEZ;AASD,wCAAwC;AACxC,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAK5E"}
package/dist/env.js CHANGED
@@ -10,7 +10,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
+ import process from 'node:process';
13
14
  import { SITE } from "./site";
15
+
16
+ /** Node `process.env` 形状,避免给 client 入口引入全局 Node 类型 */
17
+
14
18
  export var PLATFORMS = ['ios', 'android'];
15
19
  export var ENVS = ['dev', 'test', 'beta', 'prod'];
16
20
  export var SITE_ALIASES = {
package/dist/site.d.ts CHANGED
@@ -22,197 +22,206 @@ export declare const SITE: {
22
22
  readonly TRADING: "trading";
23
23
  readonly VANG_WIN: "vangwin";
24
24
  readonly SORTE_WIN: "sortewin";
25
+ readonly SORTE_WIN_V1: "sortewin_v1";
25
26
  };
26
- export type SiteName = (typeof SITE)[keyof typeof SITE];
27
- export type CountryName = 'PHL' | 'THA' | 'VNM' | 'BRA';
28
27
  export declare const SiteConfig: {
29
28
  readonly "291jili": {
30
- readonly name: "291JILI";
31
- readonly country: "PHL";
29
+ name: "291JILI";
30
+ country: "PHL";
32
31
  };
33
32
  readonly super291: {
34
- readonly name: "super291";
35
- readonly country: "PHL";
33
+ name: "super291";
34
+ country: "PHL";
36
35
  };
37
36
  readonly "646jili": {
38
- readonly name: "646JILI";
39
- readonly country: "PHL";
37
+ name: "646JILI";
38
+ country: "PHL";
40
39
  };
41
40
  readonly lodi291: {
42
- readonly name: "Lodi291";
43
- readonly country: "PHL";
41
+ name: "Lodi291";
42
+ country: "PHL";
44
43
  };
45
44
  readonly top646: {
46
- readonly name: "TOP646";
47
- readonly country: "PHL";
45
+ name: "TOP646";
46
+ country: "PHL";
48
47
  };
49
48
  readonly "80jili": {
50
- readonly name: "80JILI";
51
- readonly country: "PHL";
49
+ name: "80JILI";
50
+ country: "PHL";
52
51
  };
53
52
  readonly ph646: {
54
- readonly name: "PH646";
55
- readonly country: "PHL";
53
+ name: "PH646";
54
+ country: "PHL";
56
55
  };
57
56
  readonly ace291: {
58
- readonly name: "Ace291";
59
- readonly country: "PHL";
57
+ name: "Ace291";
58
+ country: "PHL";
60
59
  };
61
60
  readonly hot646: {
62
- readonly name: "HOT646";
63
- readonly country: "PHL";
61
+ name: "HOT646";
62
+ country: "PHL";
64
63
  };
65
64
  readonly lodi646: {
66
- readonly name: "Lodi646";
67
- readonly country: "PHL";
65
+ name: "Lodi646";
66
+ country: "PHL";
68
67
  };
69
68
  readonly lodigame: {
70
- readonly name: "lodigame";
71
- readonly country: "PHL";
69
+ name: "lodigame";
70
+ country: "PHL";
72
71
  };
73
72
  readonly lol646: {
74
- readonly name: "lol646";
75
- readonly country: "PHL";
73
+ name: "lol646";
74
+ country: "PHL";
76
75
  };
77
76
  readonly lodi777: {
78
- readonly name: "Lodi777";
79
- readonly country: "PHL";
77
+ name: "Lodi777";
78
+ country: "PHL";
80
79
  };
81
80
  readonly ydg777: {
82
- readonly name: "ydg777";
83
- readonly country: "PHL";
81
+ name: "ydg777";
82
+ country: "PHL";
84
83
  };
85
84
  readonly wasp: {
86
- readonly name: "WASPBET";
87
- readonly country: "THA";
85
+ name: "WASPBET";
86
+ country: "THA";
88
87
  };
89
88
  readonly "82pg": {
90
- readonly name: "AURA88";
91
- readonly country: "THA";
89
+ name: "AURA88";
90
+ country: "THA";
92
91
  };
93
92
  readonly "91pg": {
94
- readonly name: "AURA69";
95
- readonly country: "THA";
93
+ name: "AURA69";
94
+ country: "THA";
96
95
  };
97
96
  readonly zappspin: {
98
- readonly name: "WASP.WIN";
99
- readonly country: "THA";
97
+ name: "WASP.WIN";
98
+ country: "THA";
100
99
  };
101
100
  readonly waspspin: {
102
- readonly name: "WASP SPIN";
103
- readonly country: "THA";
101
+ name: "WASP SPIN";
102
+ country: "THA";
104
103
  };
105
104
  readonly haa555: {
106
- readonly name: "HAA555";
107
- readonly country: "THA";
105
+ name: "HAA555";
106
+ country: "THA";
108
107
  };
109
108
  readonly trading: {
110
- readonly name: "COINAX";
111
- readonly country: "THA";
109
+ name: "COINAX";
110
+ country: "THA";
112
111
  };
113
112
  readonly vangwin: {
114
- readonly name: "VANGWIN";
115
- readonly country: "VNM";
113
+ name: "VANGWIN";
114
+ country: "VNM";
116
115
  };
117
116
  readonly sortewin: {
118
- readonly name: "SO99";
119
- readonly country: "BRA";
117
+ name: "SO99";
118
+ country: "BRA";
119
+ };
120
+ readonly sortewin_v1: {
121
+ name: "SO99";
122
+ country: "BRA";
120
123
  };
121
124
  };
125
+ export type SiteName = (typeof SITE)[keyof typeof SITE];
126
+ export type CountryName = (typeof SiteConfig)[keyof typeof SiteConfig]['country'];
122
127
  export declare const getSiteConfig: <T extends SiteName>(site: T) => {
123
128
  site: T;
124
129
  } & {
125
130
  readonly "291jili": {
126
- readonly name: "291JILI";
127
- readonly country: "PHL";
131
+ name: "291JILI";
132
+ country: "PHL";
128
133
  };
129
134
  readonly super291: {
130
- readonly name: "super291";
131
- readonly country: "PHL";
135
+ name: "super291";
136
+ country: "PHL";
132
137
  };
133
138
  readonly "646jili": {
134
- readonly name: "646JILI";
135
- readonly country: "PHL";
139
+ name: "646JILI";
140
+ country: "PHL";
136
141
  };
137
142
  readonly lodi291: {
138
- readonly name: "Lodi291";
139
- readonly country: "PHL";
143
+ name: "Lodi291";
144
+ country: "PHL";
140
145
  };
141
146
  readonly top646: {
142
- readonly name: "TOP646";
143
- readonly country: "PHL";
147
+ name: "TOP646";
148
+ country: "PHL";
144
149
  };
145
150
  readonly "80jili": {
146
- readonly name: "80JILI";
147
- readonly country: "PHL";
151
+ name: "80JILI";
152
+ country: "PHL";
148
153
  };
149
154
  readonly ph646: {
150
- readonly name: "PH646";
151
- readonly country: "PHL";
155
+ name: "PH646";
156
+ country: "PHL";
152
157
  };
153
158
  readonly ace291: {
154
- readonly name: "Ace291";
155
- readonly country: "PHL";
159
+ name: "Ace291";
160
+ country: "PHL";
156
161
  };
157
162
  readonly hot646: {
158
- readonly name: "HOT646";
159
- readonly country: "PHL";
163
+ name: "HOT646";
164
+ country: "PHL";
160
165
  };
161
166
  readonly lodi646: {
162
- readonly name: "Lodi646";
163
- readonly country: "PHL";
167
+ name: "Lodi646";
168
+ country: "PHL";
164
169
  };
165
170
  readonly lodigame: {
166
- readonly name: "lodigame";
167
- readonly country: "PHL";
171
+ name: "lodigame";
172
+ country: "PHL";
168
173
  };
169
174
  readonly lol646: {
170
- readonly name: "lol646";
171
- readonly country: "PHL";
175
+ name: "lol646";
176
+ country: "PHL";
172
177
  };
173
178
  readonly lodi777: {
174
- readonly name: "Lodi777";
175
- readonly country: "PHL";
179
+ name: "Lodi777";
180
+ country: "PHL";
176
181
  };
177
182
  readonly ydg777: {
178
- readonly name: "ydg777";
179
- readonly country: "PHL";
183
+ name: "ydg777";
184
+ country: "PHL";
180
185
  };
181
186
  readonly wasp: {
182
- readonly name: "WASPBET";
183
- readonly country: "THA";
187
+ name: "WASPBET";
188
+ country: "THA";
184
189
  };
185
190
  readonly "82pg": {
186
- readonly name: "AURA88";
187
- readonly country: "THA";
191
+ name: "AURA88";
192
+ country: "THA";
188
193
  };
189
194
  readonly "91pg": {
190
- readonly name: "AURA69";
191
- readonly country: "THA";
195
+ name: "AURA69";
196
+ country: "THA";
192
197
  };
193
198
  readonly zappspin: {
194
- readonly name: "WASP.WIN";
195
- readonly country: "THA";
199
+ name: "WASP.WIN";
200
+ country: "THA";
196
201
  };
197
202
  readonly waspspin: {
198
- readonly name: "WASP SPIN";
199
- readonly country: "THA";
203
+ name: "WASP SPIN";
204
+ country: "THA";
200
205
  };
201
206
  readonly haa555: {
202
- readonly name: "HAA555";
203
- readonly country: "THA";
207
+ name: "HAA555";
208
+ country: "THA";
204
209
  };
205
210
  readonly trading: {
206
- readonly name: "COINAX";
207
- readonly country: "THA";
211
+ name: "COINAX";
212
+ country: "THA";
208
213
  };
209
214
  readonly vangwin: {
210
- readonly name: "VANGWIN";
211
- readonly country: "VNM";
215
+ name: "VANGWIN";
216
+ country: "VNM";
212
217
  };
213
218
  readonly sortewin: {
214
- readonly name: "SO99";
215
- readonly country: "BRA";
219
+ name: "SO99";
220
+ country: "BRA";
221
+ };
222
+ readonly sortewin_v1: {
223
+ name: "SO99";
224
+ country: "BRA";
216
225
  };
217
226
  }[T];
218
227
  //# sourceMappingURL=site.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"site.d.ts","sourceRoot":"","sources":["site.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAwBP,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,OAAO,IAAI,CAAC,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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