常用工具集合
数据转化 数据展示 图表函数
export const itemLabel = (item: any, key: string) => {
const field = key ? key : "label";
return item && item.hasOwnProperty(field)
? item[field] !== "" && item[field] !== null
? item[field]
: "--"
: item !== "" && item !== null
? item
: "--";
};
// 回显数据字典
const selectDictLabel = (datas?: any, value?: any) => {
if (value === undefined) {
return "";
}
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].value == "" + value) {
actions.push(datas[key].label);
return true;
}
});
if (actions.length === 0) {
actions.push(value);
}
return actions.join("");
};
// 回显数据字典(字符串、数组)
const selectDictLabels = (datas?: any, value?: any, separator?: any) => {
if (value === undefined || value.length === 0) {
return "";
}
if (Array.isArray(value)) {
value = value.join(",");
}
var actions: any = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
Object.keys(value.split(currentSeparator)).some((val) => {
var match = false;
Object.keys(datas).some((key) => {
if (datas[key].value == "" + temp[val]) {
actions.push(datas[key].label + currentSeparator);
match = true;
}
});
if (!match) {
actions.push(temp[val] + currentSeparator);
}
});
return actions.join("").substring(0, actions.join("").length - 1);
};
const formatTool = () => {
// 日期格式化
function parseTime(time: any, pattern: string) {
if (arguments.length === 0 || !time) {
return null;
}
const format = pattern || "{y}-{m}-{d} {h}:{i}:{s}";
let date;
if (typeof time === "object") {
date = time;
} else {
if (typeof time === "string" && /^[0-9]+$/.test(time)) {
time = parseInt(time);
} else if (typeof time === "string") {
time = time
.replace(new RegExp(/-/gm), "/")
.replace("T", " ")
.replace(new RegExp(/\.[\d]{3}/gm), "");
}
if (typeof time === "number" && time.toString().length === 10) {
time = time * 1000;
}
date = new Date(time);
}
const formatObj: any = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay(),
};
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key];
// Note: getDay() returns 0 on Sunday
if (key === "a") {
return ["日", "一", "二", "三", "四", "五", "六"][value];
}
if (result.length > 0 && value < 10) {
value = "0" + value;
}
return value || 0;
});
return time_str;
}
// 转换字符串,undefined,null等转化为""
function parseStrEmpty(str?: string) {
if (!str || str == "undefined" || str == "null") {
return "";
}
return str;
}
// 添加日期范围
function addDateRange(params: any, dateRange: any, propName?: string) {
let search = params;
search.params =
typeof search.params === "object" &&
search.params !== null &&
!Array.isArray(search.params)
? search.params
: {};
dateRange = Array.isArray(dateRange) ? dateRange : [];
if (typeof propName === "undefined") {
search.params["beginTime"] = dateRange[0];
search.params["endTime"] = dateRange[1];
} else {
search.params["begin" + propName] = dateRange[0];
search.params["end" + propName] = dateRange[1];
}
return search;
}
/**
* 参数处理
* @param {*} params 参数
*/
function tansParams(params: any) {
let result = "";
for (const propName of Object.keys(params)) {
const value = params[propName];
var part = encodeURIComponent(propName) + "=";
if (value !== null && value !== "" && typeof value !== "undefined") {
if (typeof value === "object") {
for (const key of Object.keys(value)) {
if (
value[key] !== null &&
value[key] !== "" &&
typeof value[key] !== "undefined"
) {
let params = propName + "[" + key + "]";
var subPart = encodeURIComponent(params) + "=";
result += subPart + encodeURIComponent(value[key]) + "&";
}
}
} else {
result += part + encodeURIComponent(value) + "&";
}
}
}
return result;
}
/**
* 构造树型结构数据
* @param {*} data 数据源
* @param {*} id id字段 默认 'id'
* @param {*} parentId 父节点字段 默认 'parentId'
* @param {*} children 孩子节点字段 默认 'children'
*/
function handleTree(data: any, id?: any, parentId?: any, children?: any) {
let config = {
id: id || "id",
parentId: parentId || "parentId",
childrenList: children || "children",
};
console.log('config :>> ', config);
var childrenListMap: any = {};
var nodeIds: any = {};
var tree: any = [];
for (let d of data) {
let parentId = d[config.parentId];
if (childrenListMap[parentId] == null) {
childrenListMap[parentId] = [];
}
// console.log('d,config :>> ', d,config);
nodeIds[d[config.id]] = d;
childrenListMap[parentId].push(d);
}
for (let d of data) {
let parentId = d[config.parentId];
if (nodeIds[parentId] == null) {
tree.push(d);
}
}
for (let t of tree) {
adaptToChildrenList(t);
}
function adaptToChildrenList(o) {
if (childrenListMap[o[config.id]] !== null) {
o[config.childrenList] = childrenListMap[o[config.id]];
}
if (o[config.childrenList]) {
for (let c of o[config.childrenList]) {
adaptToChildrenList(c);
}
}
}
return tree;
}
//16进制转化 rgba 格式
export const hexToRgba = (hex, opacity) =>{
// 将十六进制颜色值分割为红、绿、蓝分量
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
if (result) {
// 转换每个分量为十进制整数并添加透明度
const [_, r, g, b] = result;
return `rgba(${parseInt(r, 16)}, ${parseInt(g, 16)}, ${parseInt(b, 16)}, ${opacity})`;
} else {
return ''
}
}
export const objectToArray = (object: any) => {
let data = [];
for (const key in object) {
if (Object.hasOwnProperty.call(object, key)) {
const element = object[key];
data.push({
name: key,
value: element ? element : 0,
});
}
}
return data;
};
//传入数组 求出指定key 的和 并且 兼容值是字符串情况
export const getSum = (arr: any, key: string,bool:boolean=true) => {
try{
let num:any = Number(
arr
.reduce((pre: any, cur: any) => {
return pre + Number(cur[key]);
}, 0)
);
console.log('num :>> ', num);
if(typeof num == 'number'&&String(num)!='NaN'){
return bool?num.toFixed(2):num;
}else{
return '***';
}
}catch(e){
return 0;
}
};
export const ArrayToObject = (array: any, props: any) => {
let data: any = {};
for (let index = 0; index < array.length; index++) {
const element = array[index];
data[element[props.name]] = element[props.value];
}
return data;
};
//自定义图表刻度
export const getTick = (maxValue:number, tickCount:number) => {
// // 计算每个刻度的间隔
var interval = Math.ceil(maxValue / tickCount);
// 找到一个更合适的间隔值,使得刻度更整齐
var magnitude = Math.pow(10, Math.floor(Math.log10(interval)));
var normalizedInterval = Math.ceil(interval / magnitude) * magnitude;
// 计算刻度的上限,确保最大值能够包含在内
var upperBound = Math.ceil(maxValue / normalizedInterval) * normalizedInterval;
// 生成刻度数组
var ticks = [];
for (var i = 0; i <= upperBound; i += normalizedInterval) {
ticks.push(i);
}
// 定义阈值
const thresholds =ticks;
// 找到大于或等于当前值的最小阈值
for (let i = 0; i < thresholds.length; i++) {
if (interval <= thresholds[i]) {
return thresholds[i];
}
}
// 如果值超过最大的阈值,按千位数向上取整
const magnitude2 = Math.pow(10, Math.floor(Math.log10(interval)));
return Math.ceil(interval / magnitude2) * magnitude2;
}
//echarts 计算滚动条展示内容数量
export const getdataZoom = (total, number, data) => {
if (total <= number) {
return {
show: false,
};
}
let end = (number / total) * 100;
return Object.assign(
{
type: "slider",
bottom: 0,
show: true,
backgroundColor: "#F5F5F5",
fillerColor: "rgba(214, 233, 255, 0.2)",
handleStyle: {
color: "#FFF",
},
borderColor: "transparent",
brushSelect: false,
height: 10,
start: 0,
end: end,
preventDefaultMouseMove:false,
dataBackground: {
lineStyle: {
color: "transparent",
},
areaStyle: {
color: "transparent",
},
},
textStyle: {
color: "#fff",
},
},
data ? data : {}
);
};
//echarts 计算滚动条展示内容数量
export const getdataZoomY = (total, number, data) => {
if (total <= number) {
return {
show: false,
};
}
let end = (number / total) * 100;
return Object.assign(
{
type: "slider",
show: true,
yAxisIndex: [0],
backgroundColor: "#F5F5F5",
fillerColor: "rgba(214, 233, 255, 0.2)",
handleStyle: {
color: "#FFF",
},
borderColor: "transparent",
brushSelect: false,
start:100,
end:100- end,
dataBackground: {
lineStyle: {
color: "transparent",
},
areaStyle: {
color: "transparent",
},
},
textStyle: {
color: "#fff",
},
width:10,
},
data ? data : {}
);
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
uniapp 统一封装工具集
//常用方法集合
export default {
/**
* toast提示
*/
toast(title, duration = 3000, mask = false, icon = 'none') {
if (Boolean(title) === false) {
return;
}
uni.showToast({
title,
duration,
mask,
icon
});
},
// 封装uni.showModal为alert
alert(msg="",confirm,cancel){ //mgs是提示的内容,字符串格式;confirm,cancel要传入函数
uni.showModal({
title:'提示', //title我定义死了,如果不想叫“提示”或者自定义,可以在上面加入title变量,并在这里写入title变量
content:msg, //提示的内容
showCancel:cancel ? true : false,//是否显示取消按钮,如果没有传入点击取消按钮的回调函数,则不显示,否则显示
success:res=>{
if(res.confirm){ //如果用户点击了确定按钮
if(confirm){ //如果confirm函数不为空,则执行该函数
confirm()
}
}
if(res.cancel){//如果用户点击了取消按钮
if(cancel){//如果cancel函数不为空,则执行该函数
cancel()
}
}
}
})
},
formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
},
/**
* 返回登录页面
*/
async backToLogin() {},
/**
* 返回上一页携带参数
*/
prePage(index) {
let pages = getCurrentPages();
let prePage = pages[pages.length - (index || 2)];
// #ifdef H5
return prePage;
// #endif
return prePage.$vm;
},
/**
* 开发环境全局打印日志
* @param {Object} title
*/
log(title) {
if (process.env.NODE_ENV === 'development' && Boolean(title) === true) {
console.log(JSON.stringify(title));
}
},
/**
* 异步获取设备信息
*/
getInfoAsync() {
return new Promise((resolve, reject) => {
plus.device.getInfo({
success(e) {
resolve(e);
},
fail(e) {
reject(e.message);
}
});
});
},
/**
* 获取一个随机数
* @param {Object} min
* @param {Object} max
*/
random(min, max) {
switch (arguments.length) {
case 1:
return parseInt(Math.random() * min + 1, 10);
break;
case 2:
return parseInt(Math.random() * (max - min + 1) + min, 10);
break;
default:
return 0;
break;
}
},
/*
* obj 转 params字符串参数
* 例子:{a:1,b:2} => a=1&b=2
*/
objParseParam(obj) {
let paramsStr = '';
if (obj instanceof Array) return paramsStr;
if (!(obj instanceof Object)) return paramsStr;
for (let key in obj) {
paramsStr += `${key}=${obj[key]}&`;
}
return paramsStr.substring(0, paramsStr.length - 1);
},
/*
* obj 转 路由地址带参数
* 例子:{a:1,b:2} => /pages/index/index?a=1&b=2
*/
objParseUrlAndParam(path, obj) {
let url = path || '/';
let paramsStr = '';
if (obj instanceof Array) return url;
if (!(obj instanceof Object)) return url;
paramsStr = this.objParseParam(obj);
paramsStr && (url += '?');
url += paramsStr;
return url;
},
/*
* 获取url字符串参数
*/
getRequestParameters(locationhref) {
let href = locationhref || '';
let theRequest = new Object();
let str = href.split('?')[1];
if (str != undefined) {
let strs = str.split('&');
for (let i = 0; i < strs.length; i++) {
theRequest[strs[i].split('=')[0]] = (strs[i].split('=')[1]);
}
}
return theRequest;
},
/**
* 加密字符串
*/
strEncode(str) {
const key = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
let l = key.length;
let a = key.split('');
let s = '', b, b1, b2, b3;
for (let i = 0; i < str.length; i++) {
b = str.charCodeAt(i);
b1 = b % l;
b = (b - b1) / l;
b2 = b % l;
b = (b - b2) / l;
b3 = b % l;
s += a[b3] + a[b2] + a[b1];
}
return s;
},
/**
* 解密字符串
*/
strDecode(str) {
const key = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
let l = key.length;
let b, b1, b2, b3, d = 0, s;
s = new Array(Math.floor(str.length / 3));
b = s.length;
for (let i = 0; i < b; i++) {
b1 = key.indexOf(str.charAt(d));
d++;
b2 = key.indexOf(str.charAt(d));
d++;
b3 = key.indexOf(str.charAt(d));
d++;
s[i] = b1 * l * l + b2 * l + b3
}
b = eval('String.fromCharCode(' + s.join(',') + ')');
return b;
},
/**
* H5复制
*/
h5Copy(content) {
let textarea = document.createElement('textarea')
textarea.value = content
textarea.readOnly = 'readOnly'
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand('Copy') // 执行浏览器复制命令
textarea.remove()
return result
},
/**
* 无限极分类
* data:[{id:1,pid:0},{id:2,pid:1},...]
* selectIds:[2,3,..] 选中的ID ,存在则 标记checked
*/
createTree(data,selectIds){
let content = selectIds || []
let temp = {}
let tree = {}
// 数组转 键值对
data.forEach(item => {
if(content.indexOf(item.id) > -1){
item.checked = true
}
temp[item.id] = item
})
let tempKeys = Object.keys(temp)
tempKeys.forEach(key => {
// 获取当前项
let item = temp[key]
// 当前项 pId
let parentItemByPid = temp[item.pid]
if (parentItemByPid) {//判断是否存在父级
if (!parentItemByPid.children) {
parentItemByPid.children = []
}
parentItemByPid.children.push(item)
} else {
tree[item.id] = item
}
})
let treeData = Object.keys(tree).map(key => tree[key])
return treeData
},
/**
* 格式化用户树列表
*/
formatUserTree(data,content){
let tree = []
let tempKeys = Object.keys(data)
tempKeys.forEach((val,key) => {
let temp = {
id:key,
name:val,
children:data[val]
}
tree.push(temp)
})
return tree
},
// 转换时间格式
friendlyDate(timestamp) {
var formats = {
'year': '%n% 年前',
'month': '%n% 月前',
'day': '%n% 天前',
'hour': '%n% 小时前',
'minute': '%n% 分钟前',
'second': '%n% 秒前',
};
var now = Date.now();
var seconds = Math.floor((now - timestamp) / 1000);
var minutes = Math.floor(seconds / 60);
var hours = Math.floor(minutes / 60);
var days = Math.floor(hours / 24);
var months = Math.floor(days / 30);
var years = Math.floor(months / 12);
var diffType = '';
var diffValue = 0;
if (years > 0) {
diffType = 'year';
diffValue = years;
} else {
if (months > 0) {
diffType = 'month';
diffValue = months;
} else {
if (days > 0) {
diffType = 'day';
diffValue = days;
} else {
if (hours > 0) {
diffType = 'hour';
diffValue = hours;
} else {
if (minutes > 0) {
diffType = 'minute';
diffValue = minutes;
} else {
diffType = 'second';
diffValue = seconds === 0 ? (seconds = 1) : seconds;
}
}
}
}
}
return formats[diffType].replace('%n%', diffValue);
},
formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':')
},
formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
},
// 获取当前年月日 format:1-精确到天 2-精确到秒
getCurrentDate(format) {
var now = new Date();
var year = now.getFullYear(); //得到年份
var month = now.getMonth();//得到月份
var date = now.getDate();//得到日期
var day = now.getDay();//得到周几
var hour = now.getHours();//得到小时
var minu = now.getMinutes();//得到分钟
var sec = now.getSeconds();//得到秒
month = month + 1;
if (month < 10) month = "0" + month;
if (date < 10) date = "0" + date;
if (hour < 10) hour = "0" + hour;
if (minu < 10) minu = "0" + minu;
if (sec < 10) sec = "0" + sec;
var time = "";
//精确到天
if(format==1){
time = year + "-" + month + "-" + date;
}
//精确到分
else if(format==2){
time = year + "-" + month + "-" + date+ " " + hour + ":" + minu + ":" + sec;
}
return time;
},
//将数字金额转为中文大写
changeNumMoneyToChinese(money) {
var cnNums = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); //汉字的数字
var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
var cnInteger = "整"; //整数金额时后面跟的字符
var cnIntLast = "圆"; //整型完以后的单位
var maxNum = 999999999999999.9999; //最大处理的数字
var IntegerNum; //金额整数部分
var DecimalNum; //金额小数部分
var ChineseStr = ""; //输出的中文金额字符串
var parts; //分离金额后用的数组,预定义
var Symbol="";//正负值标记
if (money == "") {
return "";
}
money = parseFloat(money);
if (money >= maxNum) {
alert('超出最大处理数字');
return "";
}
if (money == 0) {
ChineseStr = cnNums[0] + cnIntLast + cnInteger;
return ChineseStr;
}
if(money<0)
{
money=-money;
Symbol="负 ";
}
money = money.toString(); //转换为字符串
if (money.indexOf(".") == -1) {
IntegerNum = money;
DecimalNum = '';
} else {
parts = money.split(".");
IntegerNum = parts[0];
DecimalNum = parts[1].substr(0, 4);
}
if (parseInt(IntegerNum, 10) > 0) { //获取整型部分转换
var zeroCount = 0;
var IntLen = IntegerNum.length;
for (var i = 0; i < IntLen; i++) {
var n = IntegerNum.substr(i, 1);
var p = IntLen - i - 1;
var q = p / 4;
var m = p % 4;
if (n == "0") {
zeroCount++;
}
else {
if (zeroCount > 0) {
ChineseStr += cnNums[0];
}
zeroCount = 0; //归零
ChineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
}
if (m == 0 && zeroCount < 4) {
ChineseStr += cnIntUnits[q];
}
}
ChineseStr += cnIntLast;
//整型部分处理完毕
}
if (DecimalNum != '') { //小数部分
var decLen = DecimalNum.length;
for (var i = 0; i < decLen; i++) {
var n = DecimalNum.substr(i, 1);
if (n != '0') {
ChineseStr += cnNums[Number(n)] + cnDecUnits[i];
}
}
}
if (ChineseStr == '') {
ChineseStr += cnNums[0] + cnIntLast + cnInteger;
} else if (DecimalNum == '') {
ChineseStr += cnInteger;
}
ChineseStr = Symbol +ChineseStr;
return ChineseStr;
},
bytesToSize(bytes){
if (bytes === 0)
return '0 B';
var k = 1024;
var sizes = ['B','KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
var i = Math.floor(Math.log(bytes) / Math.log(k))
return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
},
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437