upgini 1.1.227__py3-none-any.whl → 1.1.230a1__py3-none-any.whl
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.
Potentially problematic release.
This version of upgini might be problematic. Click here for more details.
- upgini/autofe/__init__.py +0 -0
- upgini/autofe/all_operands.py +43 -0
- upgini/autofe/binary.py +134 -0
- upgini/autofe/feature.py +297 -0
- upgini/autofe/groupby.py +83 -0
- upgini/autofe/operand.py +71 -0
- upgini/autofe/unary.py +106 -0
- upgini/autofe/vector.py +21 -0
- upgini/features_enricher.py +7 -4
- upgini/metadata.py +1 -1
- upgini/resource_bundle/strings.properties +1 -1
- upgini/utils/cv_utils.py +1 -1
- upgini/utils/display_utils.py +1 -1
- {upgini-1.1.227.dist-info → upgini-1.1.230a1.dist-info}/METADATA +15 -14
- {upgini-1.1.227.dist-info → upgini-1.1.230a1.dist-info}/RECORD +18 -11
- {upgini-1.1.227.dist-info → upgini-1.1.230a1.dist-info}/WHEEL +1 -1
- upgini/fingerprint.js +0 -8
- {upgini-1.1.227.dist-info → upgini-1.1.230a1.dist-info}/LICENSE +0 -0
- {upgini-1.1.227.dist-info → upgini-1.1.230a1.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from typing import Dict
|
|
2
|
+
from upgini.autofe.groupby import GroupByThenAgg, GroupByThenRank
|
|
3
|
+
from upgini.autofe.operand import Operand
|
|
4
|
+
from upgini.autofe.unary import Abs, Log, Residual, Sqrt, Square, Sigmoid, Floor, Freq
|
|
5
|
+
from upgini.autofe.binary import Min, Max, Add, Subtract, Multiply, Divide, Sim
|
|
6
|
+
from upgini.autofe.vector import Mean, Sum
|
|
7
|
+
|
|
8
|
+
ALL_OPERANDS: Dict[str, Operand] = {
|
|
9
|
+
op.name: op
|
|
10
|
+
for op in [
|
|
11
|
+
Freq(),
|
|
12
|
+
Mean(),
|
|
13
|
+
Sum(),
|
|
14
|
+
Abs(),
|
|
15
|
+
Log(),
|
|
16
|
+
Sqrt(),
|
|
17
|
+
Square(),
|
|
18
|
+
Sigmoid(),
|
|
19
|
+
Floor(),
|
|
20
|
+
Residual(),
|
|
21
|
+
Min(),
|
|
22
|
+
Max(),
|
|
23
|
+
Add(),
|
|
24
|
+
Subtract(),
|
|
25
|
+
Multiply(),
|
|
26
|
+
Divide(),
|
|
27
|
+
GroupByThenAgg(name="GroupByThenMin", agg="min"),
|
|
28
|
+
GroupByThenAgg(name="GroupByThenMax", agg="max"),
|
|
29
|
+
GroupByThenAgg(name="GroupByThenMean", agg="mean"),
|
|
30
|
+
GroupByThenAgg(name="GroupByThenMedian", agg="median"),
|
|
31
|
+
GroupByThenAgg(name="GroupByThenStd", output_type="float", agg="std"),
|
|
32
|
+
GroupByThenRank(),
|
|
33
|
+
Operand(name="Combine", has_symmetry_importance=True, output_type="object", is_categorical=True),
|
|
34
|
+
Operand(name="CombineThenFreq", has_symmetry_importance=True, output_type="float"),
|
|
35
|
+
Operand(name="GroupByThenNUnique", output_type="int", is_vectorizable=True, is_grouping=True),
|
|
36
|
+
Operand(name="GroupByThenFreq", output_type="float", is_grouping=True),
|
|
37
|
+
Sim(),
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def find_op(name):
|
|
43
|
+
return ALL_OPERANDS.get(name)
|
upgini/autofe/binary.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
from upgini.autofe.operand import PandasOperand, VectorizableMixin
|
|
2
|
+
from typing import List
|
|
3
|
+
import numpy as np
|
|
4
|
+
import pandas as pd
|
|
5
|
+
from numpy import dot
|
|
6
|
+
from numpy.linalg import norm
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Min(PandasOperand):
|
|
10
|
+
name = "min"
|
|
11
|
+
is_binary = True
|
|
12
|
+
has_symmetry_importance = True
|
|
13
|
+
|
|
14
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
15
|
+
return np.minimum(left, right)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Max(PandasOperand):
|
|
19
|
+
name = "max"
|
|
20
|
+
is_binary = True
|
|
21
|
+
has_symmetry_importance = True
|
|
22
|
+
|
|
23
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
24
|
+
return np.maximum(left, right)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Add(PandasOperand, VectorizableMixin):
|
|
28
|
+
name = "+"
|
|
29
|
+
alias = "add"
|
|
30
|
+
is_binary = True
|
|
31
|
+
has_symmetry_importance = True
|
|
32
|
+
is_vectorizable = True
|
|
33
|
+
|
|
34
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
35
|
+
return left + right
|
|
36
|
+
|
|
37
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
38
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
39
|
+
d1 = data[value_columns]
|
|
40
|
+
d2 = data[group_column]
|
|
41
|
+
|
|
42
|
+
return d1.add(d2, axis=0)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class Subtract(PandasOperand, VectorizableMixin):
|
|
46
|
+
name = "-"
|
|
47
|
+
alias = "sub"
|
|
48
|
+
is_binary = True
|
|
49
|
+
has_symmetry_importance = True
|
|
50
|
+
is_vectorizable = True
|
|
51
|
+
|
|
52
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
53
|
+
return left - right
|
|
54
|
+
|
|
55
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
56
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
57
|
+
d1 = data[value_columns]
|
|
58
|
+
d2 = data[group_column]
|
|
59
|
+
|
|
60
|
+
return d1.sub(d2, axis=0)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class Multiply(PandasOperand, VectorizableMixin):
|
|
64
|
+
name = "*"
|
|
65
|
+
alias = "mul"
|
|
66
|
+
is_binary = True
|
|
67
|
+
has_symmetry_importance = True
|
|
68
|
+
is_vectorizable = True
|
|
69
|
+
|
|
70
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
71
|
+
return left * right
|
|
72
|
+
|
|
73
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
74
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
75
|
+
d1 = data[value_columns]
|
|
76
|
+
d2 = data[group_column]
|
|
77
|
+
|
|
78
|
+
return d1.mul(d2, axis=0)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class Divide(PandasOperand, VectorizableMixin):
|
|
82
|
+
name = "/"
|
|
83
|
+
alias = "div"
|
|
84
|
+
is_binary = True
|
|
85
|
+
has_symmetry_importance = True
|
|
86
|
+
is_vectorizable = True
|
|
87
|
+
output_type = "float"
|
|
88
|
+
|
|
89
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
90
|
+
return left / right.replace(0, np.nan)
|
|
91
|
+
|
|
92
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
93
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
94
|
+
d1 = data[value_columns]
|
|
95
|
+
d2 = data[group_column]
|
|
96
|
+
|
|
97
|
+
return d1.div(d2.replace(0, np.nan), axis=0)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class Combine(PandasOperand):
|
|
101
|
+
name = "Combine"
|
|
102
|
+
is_binary = True
|
|
103
|
+
has_symmetry_importance = True
|
|
104
|
+
output_type = "object"
|
|
105
|
+
|
|
106
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
107
|
+
temp = left.astype(str) + "_" + right.astype(str)
|
|
108
|
+
temp[left.isna() | right.isna()] = np.nan
|
|
109
|
+
return pd.Series(temp, index=left.index)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class CombineThenFreq(PandasOperand):
|
|
113
|
+
name = "CombineThenFreq"
|
|
114
|
+
is_binary = True
|
|
115
|
+
has_symmetry_importance = True
|
|
116
|
+
output_type = "float"
|
|
117
|
+
is_distribution_dependent = True
|
|
118
|
+
input_type = "discrete"
|
|
119
|
+
|
|
120
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
121
|
+
temp = left.astype(str) + "_" + right.astype(str)
|
|
122
|
+
temp[left.isna() | right.isna()] = np.nan
|
|
123
|
+
value_counts = temp.value_counts(normalize=True)
|
|
124
|
+
self._loc(temp, value_counts)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class Sim(PandasOperand):
|
|
128
|
+
name = "sim"
|
|
129
|
+
is_binary = True
|
|
130
|
+
output_type = "float"
|
|
131
|
+
has_symmetry_importance = True
|
|
132
|
+
|
|
133
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
134
|
+
return dot(left, right) / (norm(left) * norm(right))
|
upgini/autofe/feature.py
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import hashlib
|
|
2
|
+
from typing import Dict
|
|
3
|
+
import numpy as np
|
|
4
|
+
import pandas as pd
|
|
5
|
+
import itertools
|
|
6
|
+
from upgini.autofe.operand import PandasOperand
|
|
7
|
+
from upgini.autofe.all_operands import (
|
|
8
|
+
find_op,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FeatureGroup(object):
|
|
13
|
+
def __init__(self, op, main_column=None, children=[]):
|
|
14
|
+
self.op = op
|
|
15
|
+
self.main_column_node = main_column
|
|
16
|
+
self.children = children
|
|
17
|
+
self.data = None
|
|
18
|
+
|
|
19
|
+
def get_columns(self, **kwargs):
|
|
20
|
+
column_list = []
|
|
21
|
+
seen = set()
|
|
22
|
+
for child in self.children:
|
|
23
|
+
columns = child.get_columns(**kwargs)
|
|
24
|
+
column_list.extend([f for f in columns if f not in seen])
|
|
25
|
+
seen.update(columns)
|
|
26
|
+
return column_list
|
|
27
|
+
|
|
28
|
+
def get_display_names(self, **kwargs):
|
|
29
|
+
names = [f.get_display_name(**kwargs) for f in self.children]
|
|
30
|
+
return names
|
|
31
|
+
|
|
32
|
+
def calculate(self, data: pd.DataFrame, is_root=False):
|
|
33
|
+
main_column = None if self.main_column_node is None else self.main_column_node.get_columns()[0]
|
|
34
|
+
if isinstance(self.op, PandasOperand):
|
|
35
|
+
columns = self.get_columns()
|
|
36
|
+
new_data = self.op.calculate_group(data[columns], main_column=main_column)
|
|
37
|
+
new_data.rename(columns=dict(zip(columns, self.get_display_names())), inplace=True)
|
|
38
|
+
|
|
39
|
+
else:
|
|
40
|
+
raise NotImplementedError(f"Unrecognized operator {self.op.name}.")
|
|
41
|
+
|
|
42
|
+
new_data.replace([-np.inf, np.inf], np.nan, inplace=True)
|
|
43
|
+
|
|
44
|
+
if is_root:
|
|
45
|
+
self.data = new_data
|
|
46
|
+
return new_data
|
|
47
|
+
|
|
48
|
+
@staticmethod
|
|
49
|
+
def make_groups(candidates):
|
|
50
|
+
grouped_features = []
|
|
51
|
+
for op_child, features in itertools.groupby(
|
|
52
|
+
candidates, lambda f: (f.op, f.children[0] if f.op.is_unary or f.op.is_vector else f.children[1])
|
|
53
|
+
):
|
|
54
|
+
op, main_child = op_child
|
|
55
|
+
if op.is_vectorizable:
|
|
56
|
+
if op.is_unary:
|
|
57
|
+
group = FeatureGroup(op, children=list(features))
|
|
58
|
+
else:
|
|
59
|
+
group = FeatureGroup(op, main_column=main_child, children=list(features))
|
|
60
|
+
grouped_features.append(group)
|
|
61
|
+
else:
|
|
62
|
+
grouped_features.extend(list(features))
|
|
63
|
+
return grouped_features
|
|
64
|
+
|
|
65
|
+
def delete_data(self):
|
|
66
|
+
self.data = None
|
|
67
|
+
if self.main_column_node:
|
|
68
|
+
self.main_column_node.delete_data()
|
|
69
|
+
for child in self.children:
|
|
70
|
+
child.delete_data()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class Feature(object):
|
|
74
|
+
def __init__(self, op, children, data=None, display_index=None, cached_display_name=None, alias=None):
|
|
75
|
+
self.op = op
|
|
76
|
+
self.children = children
|
|
77
|
+
self.data = data
|
|
78
|
+
self.display_index = display_index
|
|
79
|
+
self.cached_display_name = cached_display_name
|
|
80
|
+
self.alias = alias
|
|
81
|
+
|
|
82
|
+
def set_op_params(self, params: Dict):
|
|
83
|
+
self.op.set_params(params)
|
|
84
|
+
return self
|
|
85
|
+
|
|
86
|
+
def get_hash(self):
|
|
87
|
+
return hashlib.sha256("_".join([self.op.name] + [ch.name for ch in self.children]).encode("utf-8")).hexdigest()[
|
|
88
|
+
:8
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
def set_alias(self, alias):
|
|
92
|
+
self.alias = alias
|
|
93
|
+
return self
|
|
94
|
+
|
|
95
|
+
def rename_columns(self, mapping: Dict):
|
|
96
|
+
for child in self.children:
|
|
97
|
+
child.rename_columns(mapping)
|
|
98
|
+
self.cached_display_name = None
|
|
99
|
+
return self
|
|
100
|
+
|
|
101
|
+
def get_column_nodes(self):
|
|
102
|
+
res = []
|
|
103
|
+
for child in self.children:
|
|
104
|
+
res.extend(child.get_column_nodes())
|
|
105
|
+
return res
|
|
106
|
+
|
|
107
|
+
def get_columns(self, **kwargs):
|
|
108
|
+
column_list = []
|
|
109
|
+
seen = set()
|
|
110
|
+
for child in self.children:
|
|
111
|
+
columns = child.get_columns(**kwargs)
|
|
112
|
+
column_list.extend([f for f in columns if f not in seen])
|
|
113
|
+
seen.update(columns)
|
|
114
|
+
return column_list
|
|
115
|
+
|
|
116
|
+
def delete_data(self):
|
|
117
|
+
self.data = None
|
|
118
|
+
for child in self.children:
|
|
119
|
+
child.delete_data()
|
|
120
|
+
|
|
121
|
+
def get_display_name(self, cache: bool = True, shorten: bool = False, **kwargs):
|
|
122
|
+
if self.cached_display_name is not None and cache:
|
|
123
|
+
return self.cached_display_name
|
|
124
|
+
|
|
125
|
+
if self.alias:
|
|
126
|
+
components = ["f_autofe", self.alias]
|
|
127
|
+
elif shorten and not self.op.is_unary:
|
|
128
|
+
components = ["f_autofe", self.op.alias or self.op.name.lower()]
|
|
129
|
+
else:
|
|
130
|
+
components = ["f_" + "_f_".join(self.get_columns(**kwargs))] + [
|
|
131
|
+
"autofe",
|
|
132
|
+
self.op.alias or self.op.name.lower(),
|
|
133
|
+
]
|
|
134
|
+
components.extend([str(self.display_index)] if self.display_index is not None else [])
|
|
135
|
+
display_name = "_".join(components)
|
|
136
|
+
|
|
137
|
+
if cache:
|
|
138
|
+
self.cached_display_name = display_name
|
|
139
|
+
return display_name
|
|
140
|
+
|
|
141
|
+
def set_display_index(self, index):
|
|
142
|
+
self.display_index = index
|
|
143
|
+
self.cached_display_name = None
|
|
144
|
+
return self
|
|
145
|
+
|
|
146
|
+
def infer_type(self, data):
|
|
147
|
+
if self.op.output_type:
|
|
148
|
+
return self.op.output_type
|
|
149
|
+
else:
|
|
150
|
+
# either a symmetrical operator or group by
|
|
151
|
+
return self.children[0].infer_type(data)
|
|
152
|
+
|
|
153
|
+
def calculate(self, data, is_root=False):
|
|
154
|
+
if isinstance(self.op, PandasOperand) and self.op.is_vector:
|
|
155
|
+
ds = [child.calculate(data) for child in self.children]
|
|
156
|
+
new_data = self.op.calculate(data=ds)
|
|
157
|
+
|
|
158
|
+
elif isinstance(self.op, PandasOperand):
|
|
159
|
+
d1 = self.children[0].calculate(data)
|
|
160
|
+
d2 = None if len(self.children) < 2 else self.children[1].calculate(data)
|
|
161
|
+
new_data = self.op.calculate(data=d1, left=d1, right=d2)
|
|
162
|
+
else:
|
|
163
|
+
raise NotImplementedError(f"Unrecognized operator {self.op.name}.")
|
|
164
|
+
|
|
165
|
+
if (str(new_data.dtype) == "category") | (str(new_data.dtype) == "object"):
|
|
166
|
+
pass
|
|
167
|
+
else:
|
|
168
|
+
new_data = new_data.replace([-np.inf, np.inf], np.nan)
|
|
169
|
+
|
|
170
|
+
if is_root:
|
|
171
|
+
self.data = new_data
|
|
172
|
+
return new_data
|
|
173
|
+
|
|
174
|
+
@staticmethod
|
|
175
|
+
def check_xor(left, right):
|
|
176
|
+
def _get_all_columns(feature):
|
|
177
|
+
if isinstance(feature, Column):
|
|
178
|
+
return [feature.name]
|
|
179
|
+
else:
|
|
180
|
+
res = []
|
|
181
|
+
for child in feature.children:
|
|
182
|
+
res.extend(_get_all_columns(child))
|
|
183
|
+
return res
|
|
184
|
+
|
|
185
|
+
column1 = set(_get_all_columns(left))
|
|
186
|
+
column2 = set(_get_all_columns(right))
|
|
187
|
+
if len(column1 ^ column2) == 0:
|
|
188
|
+
return False
|
|
189
|
+
else:
|
|
190
|
+
return True
|
|
191
|
+
|
|
192
|
+
def to_formula(self, **kwargs):
|
|
193
|
+
if self.op.name in ["+", "-", "*", "/"]:
|
|
194
|
+
left = self.children[0].to_formula(**kwargs)
|
|
195
|
+
right = self.children[1].to_formula(**kwargs)
|
|
196
|
+
return f"({left}{self.op.name}{right})"
|
|
197
|
+
else:
|
|
198
|
+
result = [self.op.name, "("]
|
|
199
|
+
for i in range(len(self.children)):
|
|
200
|
+
string_i = self.children[i].to_formula(**kwargs)
|
|
201
|
+
result.append(string_i)
|
|
202
|
+
result.append(",")
|
|
203
|
+
result.pop()
|
|
204
|
+
result.append(")")
|
|
205
|
+
return "".join(result)
|
|
206
|
+
|
|
207
|
+
@staticmethod
|
|
208
|
+
def from_formula(string):
|
|
209
|
+
if string[-1] != ")":
|
|
210
|
+
return Column(string)
|
|
211
|
+
|
|
212
|
+
def is_trivial_char(c):
|
|
213
|
+
return not (c in "()+-*/,")
|
|
214
|
+
|
|
215
|
+
def find_prev(string):
|
|
216
|
+
if string[-1] != ")":
|
|
217
|
+
return max([(0 if is_trivial_char(c) else i + 1) for i, c in enumerate(string)])
|
|
218
|
+
level, pos = 0, -1
|
|
219
|
+
for i in range(len(string) - 1, -1, -1):
|
|
220
|
+
if string[i] == ")":
|
|
221
|
+
level += 1
|
|
222
|
+
if string[i] == "(":
|
|
223
|
+
level -= 1
|
|
224
|
+
if level == 0:
|
|
225
|
+
pos = i
|
|
226
|
+
break
|
|
227
|
+
while (pos > 0) and is_trivial_char(string[pos - 1]):
|
|
228
|
+
pos -= 1
|
|
229
|
+
return pos
|
|
230
|
+
|
|
231
|
+
p2 = find_prev(string[:-1])
|
|
232
|
+
if string[p2 - 1] == "(":
|
|
233
|
+
return Feature(find_op(string[: p2 - 1]), [Feature.from_formula(string[p2:-1])])
|
|
234
|
+
p1 = find_prev(string[: p2 - 1])
|
|
235
|
+
if string[0] == "(":
|
|
236
|
+
return Feature(
|
|
237
|
+
find_op(string[p2 - 1]),
|
|
238
|
+
[Feature.from_formula(string[p1 : p2 - 1]), Feature.from_formula(string[p2:-1])],
|
|
239
|
+
)
|
|
240
|
+
else:
|
|
241
|
+
op = find_op(string[: p1 - 1])
|
|
242
|
+
if op is not None:
|
|
243
|
+
return Feature(
|
|
244
|
+
op,
|
|
245
|
+
[Feature.from_formula(string[p1 : p2 - 1]), Feature.from_formula(string[p2:-1])],
|
|
246
|
+
)
|
|
247
|
+
else:
|
|
248
|
+
base_features = [
|
|
249
|
+
Feature.from_formula(string[p2:-1]),
|
|
250
|
+
Feature.from_formula(string[p1 : p2 - 1]),
|
|
251
|
+
]
|
|
252
|
+
while op is None:
|
|
253
|
+
p2 = p1
|
|
254
|
+
p1 = find_prev(string[: p1 - 1])
|
|
255
|
+
base_features.append(Feature.from_formula(string[p1 : p2 - 1]))
|
|
256
|
+
op = find_op(string[: p1 - 1])
|
|
257
|
+
base_features.reverse()
|
|
258
|
+
return Feature(op, base_features)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
class Column(object):
|
|
262
|
+
def __init__(self, name, data=None, calculate_all=False):
|
|
263
|
+
self.name = name
|
|
264
|
+
self.data = data
|
|
265
|
+
self.calculate_all = calculate_all
|
|
266
|
+
|
|
267
|
+
def rename_columns(self, mapping: Dict):
|
|
268
|
+
self.name = self._unhash(mapping.get(self.name) or self.name)
|
|
269
|
+
return self
|
|
270
|
+
|
|
271
|
+
def _unhash(self, feature_name):
|
|
272
|
+
last_component_idx = feature_name.rfind("_")
|
|
273
|
+
if not feature_name.startswith("f_"):
|
|
274
|
+
return feature_name # etalon feature
|
|
275
|
+
elif last_component_idx == 1:
|
|
276
|
+
return feature_name[2:] # fully hashed name, cannot unhash
|
|
277
|
+
else:
|
|
278
|
+
return feature_name[2:last_component_idx]
|
|
279
|
+
|
|
280
|
+
def delete_data(self):
|
|
281
|
+
self.data = None
|
|
282
|
+
|
|
283
|
+
def get_column_nodes(self):
|
|
284
|
+
return [self]
|
|
285
|
+
|
|
286
|
+
def get_columns(self):
|
|
287
|
+
return [self.name]
|
|
288
|
+
|
|
289
|
+
def infer_type(self, data):
|
|
290
|
+
return data[self.name].dtype
|
|
291
|
+
|
|
292
|
+
def calculate(self, data):
|
|
293
|
+
self.data = data[self.name]
|
|
294
|
+
return self.data
|
|
295
|
+
|
|
296
|
+
def to_formula(self, **kwargs):
|
|
297
|
+
return str(self.get_columns(**kwargs)[0])
|
upgini/autofe/groupby.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from upgini.autofe.operand import PandasOperand, VectorizableMixin
|
|
2
|
+
from typing import Dict, List, Optional, Tuple, Union
|
|
3
|
+
import numpy as np
|
|
4
|
+
import pandas as pd
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class GroupByThenAgg(PandasOperand, VectorizableMixin):
|
|
8
|
+
agg: Optional[str]
|
|
9
|
+
is_vectorizable = True
|
|
10
|
+
is_grouping = True
|
|
11
|
+
is_distribution_dependent = True
|
|
12
|
+
|
|
13
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
14
|
+
temp = left.groupby(right).agg(self.agg)
|
|
15
|
+
return self._loc(right, temp)
|
|
16
|
+
|
|
17
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
18
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
19
|
+
d1 = data[value_columns]
|
|
20
|
+
d2 = data[group_column]
|
|
21
|
+
temp = d1.groupby(d2).agg(self.agg)
|
|
22
|
+
return temp.merge(d2, how="right", on=[group_column])[value_columns]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GroupByThenMedian(GroupByThenAgg):
|
|
26
|
+
name = "GroupByThenMedian"
|
|
27
|
+
pandas_agg = "median"
|
|
28
|
+
is_distribution_dependent = True
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class GroupByThenRank(PandasOperand, VectorizableMixin):
|
|
32
|
+
name = "GroupByThenRank"
|
|
33
|
+
is_vectorizable = True
|
|
34
|
+
is_grouping = True
|
|
35
|
+
output_type = "float"
|
|
36
|
+
is_distribution_dependent = True
|
|
37
|
+
|
|
38
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
39
|
+
temp = pd.DataFrame(left[~right.isna()].groupby(right).rank(ascending=True, pct=True)).reset_index()
|
|
40
|
+
return temp.merge(pd.DataFrame(right).reset_index(), how="right", on=["index"])[left.name]
|
|
41
|
+
|
|
42
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
43
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
44
|
+
d1 = data[value_columns]
|
|
45
|
+
d2 = data[group_column]
|
|
46
|
+
temp = d1[~d2.isna()].groupby(d2).rank(ascending=True, pct=True)[value_columns].reset_index()
|
|
47
|
+
return temp.merge(d2.reset_index(), how="right", on=["index"])[value_columns]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class GroupByThenNUnique(PandasOperand, VectorizableMixin):
|
|
51
|
+
name = "GroupByThenNUnique"
|
|
52
|
+
is_vectorizable = True
|
|
53
|
+
is_grouping = True
|
|
54
|
+
output_type = "int"
|
|
55
|
+
is_distribution_dependent = True
|
|
56
|
+
input_type = "discrete"
|
|
57
|
+
|
|
58
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
59
|
+
nunique = left.groupby(right).nunique()
|
|
60
|
+
return self._loc(right, nunique)
|
|
61
|
+
|
|
62
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
63
|
+
group_column, value_columns = self.validate_calculation(data.columns, **kwargs)
|
|
64
|
+
d1 = data[value_columns]
|
|
65
|
+
d2 = data[group_column]
|
|
66
|
+
nunique = d1.groupby(d2).nunique()
|
|
67
|
+
return nunique.merge(d2, how="right", on=[group_column])[value_columns]
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class GroupByThenFreq(PandasOperand):
|
|
71
|
+
name = "GroupByThenFreq"
|
|
72
|
+
is_grouping = True
|
|
73
|
+
output_type = "float"
|
|
74
|
+
is_distribution_dependent = True
|
|
75
|
+
input_type = "discrete"
|
|
76
|
+
|
|
77
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
78
|
+
def _f(x):
|
|
79
|
+
value_counts = x.value_counts(normalize=True)
|
|
80
|
+
return self._loc(x, value_counts)
|
|
81
|
+
|
|
82
|
+
freq = left.groupby(right).apply(_f)
|
|
83
|
+
return pd.Series(freq, index=right.index)
|
upgini/autofe/operand.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
from pydantic import BaseModel
|
|
2
|
+
from typing import Dict, List, Optional, Tuple
|
|
3
|
+
from enum import Enum
|
|
4
|
+
import abc
|
|
5
|
+
import pandas as pd
|
|
6
|
+
import numpy as np
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Operand(BaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
alias: Optional[str]
|
|
12
|
+
is_unary: bool = False
|
|
13
|
+
has_symmetry_importance: bool = False
|
|
14
|
+
input_type: Optional[str]
|
|
15
|
+
output_type: Optional[str]
|
|
16
|
+
is_categorical: bool = False
|
|
17
|
+
is_vectorizable: bool = False
|
|
18
|
+
is_grouping: bool = False
|
|
19
|
+
is_binary: bool = False
|
|
20
|
+
is_vector: bool = False
|
|
21
|
+
is_distribution_dependent: bool = False
|
|
22
|
+
params: Optional[Dict[str, str]]
|
|
23
|
+
|
|
24
|
+
def set_params(self, params: Dict[str, str]):
|
|
25
|
+
self.params = params
|
|
26
|
+
return self
|
|
27
|
+
|
|
28
|
+
def get_params(self) -> Dict[str, str]:
|
|
29
|
+
return self.params
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
MAIN_COLUMN = "main_column"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class PandasOperand(Operand, abc.ABC):
|
|
36
|
+
def calculate(self, **kwargs) -> pd.Series:
|
|
37
|
+
if self.is_unary:
|
|
38
|
+
return self.calculate_unary(kwargs["data"])
|
|
39
|
+
elif self.is_binary or self.is_grouping:
|
|
40
|
+
return self.calculate_binary(kwargs["left"], kwargs["right"])
|
|
41
|
+
else:
|
|
42
|
+
return self.calculate_vector(kwargs["data"])
|
|
43
|
+
|
|
44
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
45
|
+
pass
|
|
46
|
+
|
|
47
|
+
def calculate_binary(self, left: pd.Series, right: pd.Series) -> pd.Series:
|
|
48
|
+
pass
|
|
49
|
+
|
|
50
|
+
def calculate_vector(self, data: List[pd.Series]) -> pd.Series:
|
|
51
|
+
pass
|
|
52
|
+
|
|
53
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
54
|
+
if not self.is_vectorizable:
|
|
55
|
+
raise RuntimeError(f"Cannot apply calculate_group: operator {self.name} is not vectorizable")
|
|
56
|
+
else:
|
|
57
|
+
raise RuntimeError(f"Unimplemented calculate_group for operator {self.name}")
|
|
58
|
+
|
|
59
|
+
def _loc(self, df_to, df_from):
|
|
60
|
+
df_from.loc[np.nan] = np.nan
|
|
61
|
+
return df_to.fillna(np.nan).apply(lambda x: df_from.loc[x])
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class VectorizableMixin(Operand):
|
|
65
|
+
def validate_calculation(self, input_columns: List[str], **kwargs) -> Tuple[str, List[str]]:
|
|
66
|
+
if not kwargs.get(MAIN_COLUMN):
|
|
67
|
+
raise ValueError(f"Expected argument {MAIN_COLUMN} for grouping operator {self.name} not found")
|
|
68
|
+
group_column = kwargs[MAIN_COLUMN]
|
|
69
|
+
value_columns = [col for col in input_columns if col != group_column]
|
|
70
|
+
|
|
71
|
+
return group_column, value_columns
|
upgini/autofe/unary.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from upgini.autofe.operand import PandasOperand
|
|
2
|
+
from typing import List
|
|
3
|
+
import numpy as np
|
|
4
|
+
import pandas as pd
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Abs(PandasOperand):
|
|
8
|
+
name = "abs"
|
|
9
|
+
is_unary = True
|
|
10
|
+
is_vectorizable = True
|
|
11
|
+
|
|
12
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
13
|
+
return data.abs()
|
|
14
|
+
|
|
15
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
16
|
+
return data.abs()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Log(PandasOperand):
|
|
20
|
+
name = "log"
|
|
21
|
+
is_unary = True
|
|
22
|
+
is_vectorizable = True
|
|
23
|
+
output_type = "float"
|
|
24
|
+
|
|
25
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
26
|
+
return np.log(np.abs(data.replace(0, np.nan)))
|
|
27
|
+
|
|
28
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
29
|
+
return np.log(data.replace(0, np.nan).abs())
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Sqrt(PandasOperand):
|
|
33
|
+
name = "sqrt"
|
|
34
|
+
is_unary = True
|
|
35
|
+
is_vectorizable = True
|
|
36
|
+
output_type = "float"
|
|
37
|
+
|
|
38
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
39
|
+
return np.sqrt(np.abs(data))
|
|
40
|
+
|
|
41
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
42
|
+
return np.sqrt(data.abs())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class Square(PandasOperand):
|
|
46
|
+
name = "square"
|
|
47
|
+
is_unary = True
|
|
48
|
+
is_vectorizable = True
|
|
49
|
+
|
|
50
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
51
|
+
return np.square(data)
|
|
52
|
+
|
|
53
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
54
|
+
return np.square(data)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class Sigmoid(PandasOperand):
|
|
58
|
+
name = "sigmoid"
|
|
59
|
+
is_unary = True
|
|
60
|
+
is_vectorizable = True
|
|
61
|
+
output_type = "float"
|
|
62
|
+
|
|
63
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
64
|
+
return 1 / (1 + np.exp(-data))
|
|
65
|
+
|
|
66
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
67
|
+
return 1 / (1 + np.exp(-data))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class Floor(PandasOperand):
|
|
71
|
+
name = "floor"
|
|
72
|
+
is_unary = True
|
|
73
|
+
is_vectorizable = True
|
|
74
|
+
output_type = "int"
|
|
75
|
+
input_type = "continuous"
|
|
76
|
+
|
|
77
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
78
|
+
return np.floor(data)
|
|
79
|
+
|
|
80
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
81
|
+
return np.floor(data)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class Residual(PandasOperand):
|
|
85
|
+
name = "residual"
|
|
86
|
+
is_unary = True
|
|
87
|
+
is_vectorizable = True
|
|
88
|
+
input_type = "continuous"
|
|
89
|
+
|
|
90
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
91
|
+
return data - np.floor(data)
|
|
92
|
+
|
|
93
|
+
def calculate_group(self, data: pd.DataFrame, **kwargs) -> pd.DataFrame:
|
|
94
|
+
return data - np.floor(data)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class Freq(PandasOperand):
|
|
98
|
+
name = "freq"
|
|
99
|
+
is_unary = True
|
|
100
|
+
output_type = "float"
|
|
101
|
+
is_distribution_dependent = True
|
|
102
|
+
input_type = "discrete"
|
|
103
|
+
|
|
104
|
+
def calculate_unary(self, data: pd.Series) -> pd.Series:
|
|
105
|
+
value_counts = data.value_counts(normalize=True)
|
|
106
|
+
return self._loc(data, value_counts)
|
upgini/autofe/vector.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
import pandas as pd
|
|
3
|
+
from typing import List
|
|
4
|
+
from upgini.autofe.operand import PandasOperand
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Mean(PandasOperand):
|
|
8
|
+
name = "mean"
|
|
9
|
+
output_type = "float"
|
|
10
|
+
is_vector = True
|
|
11
|
+
|
|
12
|
+
def calculate_vector(self, data: List[pd.Series]) -> pd.Series:
|
|
13
|
+
return pd.DataFrame(data).T.fillna(0).mean(axis=1)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Sum(PandasOperand):
|
|
17
|
+
name = "sum"
|
|
18
|
+
is_vector = True
|
|
19
|
+
|
|
20
|
+
def calculate_vector(self, data: List[pd.Series]) -> pd.Series:
|
|
21
|
+
return pd.DataFrame(data).T.fillna(0).sum(axis=1)
|
upgini/features_enricher.py
CHANGED
|
@@ -904,6 +904,9 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
904
904
|
|
|
905
905
|
model_task_type = self.model_task_type or define_task(y_sorted, self.logger, silent=True)
|
|
906
906
|
_cv = cv or self.cv
|
|
907
|
+
if groups is None and _cv == CVType.group_k_fold:
|
|
908
|
+
self.logger.info("Replacing group_k_fold with k_fold as no groups were found")
|
|
909
|
+
_cv = CVType.k_fold
|
|
907
910
|
if not isinstance(_cv, BaseCrossValidator):
|
|
908
911
|
date_column = self._get_date_column(search_keys)
|
|
909
912
|
date_series = validated_X[date_column] if date_column is not None else None
|
|
@@ -1629,9 +1632,9 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
1629
1632
|
c.originalName or c.name for c in file_metadata.columns if c.name in features_for_transform
|
|
1630
1633
|
]
|
|
1631
1634
|
features_section = (
|
|
1632
|
-
', "features": {'
|
|
1633
|
-
", ".join([f'"{feature}": "test_value"' for feature in original_features_for_transform])
|
|
1634
|
-
"}"
|
|
1635
|
+
', "features": {'
|
|
1636
|
+
+ ", ".join([f'"{feature}": "test_value"' for feature in original_features_for_transform])
|
|
1637
|
+
+ "}"
|
|
1635
1638
|
)
|
|
1636
1639
|
else:
|
|
1637
1640
|
features_section = ""
|
|
@@ -2269,7 +2272,7 @@ class FeaturesEnricher(TransformerMixin):
|
|
|
2269
2272
|
msg = bundle.get("multivariate_timeseries_detected")
|
|
2270
2273
|
self.__override_cv(CVType.blocked_time_series, msg, print_warning=False)
|
|
2271
2274
|
elif (
|
|
2272
|
-
|
|
2275
|
+
self.cv is None
|
|
2273
2276
|
and model_task_type != ModelTaskType.REGRESSION
|
|
2274
2277
|
and self._get_group_columns(self.fit_search_keys)
|
|
2275
2278
|
):
|
upgini/metadata.py
CHANGED
|
@@ -68,7 +68,7 @@ class SearchKey(Enum):
|
|
|
68
68
|
@staticmethod
|
|
69
69
|
def personal_keys() -> List["SearchKey"]:
|
|
70
70
|
return [SearchKey.EMAIL, SearchKey.HEM, SearchKey.IP, SearchKey.PHONE]
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
@staticmethod
|
|
73
73
|
def from_meaning_type(meaning_type: FileColumnMeaningType) -> "SearchKey":
|
|
74
74
|
if meaning_type == FileColumnMeaningType.EMAIL:
|
|
@@ -110,7 +110,7 @@ y_is_empty=y is empty
|
|
|
110
110
|
x_contains_reserved_column_name=Column name {} is reserved. Please rename column and try again
|
|
111
111
|
missing_generate_feature=\nWARNING: Feature {} specified in `generate_features` is not present in input columns: {}
|
|
112
112
|
# eval set validation
|
|
113
|
-
unsupported_type_eval_set=Unsupported type of eval_set: {}. It should be
|
|
113
|
+
unsupported_type_eval_set=Unsupported type of eval_set: {}. It should be list of tuples with two elements: X and y
|
|
114
114
|
eval_set_invalid_tuple_size=eval_set contains a tuple of size {}. It should contain only pairs of X and y
|
|
115
115
|
unsupported_x_type_eval_set=Unsupported type of X in eval_set: {}. Use pandas.DataFrame, pandas.Series or numpy.ndarray or list.
|
|
116
116
|
eval_x_and_x_diff_shape=The column set in eval_set are differ from the column set in X
|
upgini/utils/cv_utils.py
CHANGED
|
@@ -22,7 +22,7 @@ class CVConfig:
|
|
|
22
22
|
elif isinstance(cv_type, CVType):
|
|
23
23
|
self.cv_type = cv_type
|
|
24
24
|
else:
|
|
25
|
-
raise Exception(f"
|
|
25
|
+
raise Exception(f"Unexpected type of cv_type: {type(cv_type)}")
|
|
26
26
|
|
|
27
27
|
self.shuffle_kfold: Optional[bool] = shuffle_kfold
|
|
28
28
|
self.test_size = 0.2
|
upgini/utils/display_utils.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: upgini
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.230a1
|
|
4
4
|
Summary: Intelligent data search & enrichment for Machine Learning
|
|
5
5
|
Home-page: https://upgini.com/
|
|
6
6
|
Author: Upgini Developers
|
|
@@ -27,19 +27,19 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
|
27
27
|
Requires-Python: >=3.7,<3.11
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
License-File: LICENSE
|
|
30
|
-
Requires-Dist: python-dateutil
|
|
31
|
-
Requires-Dist: requests
|
|
32
|
-
Requires-Dist: pandas
|
|
33
|
-
Requires-Dist: numpy
|
|
34
|
-
Requires-Dist: scikit-learn
|
|
35
|
-
Requires-Dist: pydantic
|
|
36
|
-
Requires-Dist: fastparquet
|
|
37
|
-
Requires-Dist: python-json-logger
|
|
38
|
-
Requires-Dist: catboost
|
|
39
|
-
Requires-Dist: lightgbm
|
|
40
|
-
Requires-Dist: pyjwt
|
|
41
|
-
Requires-Dist: xhtml2pdf
|
|
42
|
-
Requires-Dist: ipywidgets
|
|
30
|
+
Requires-Dist: python-dateutil >=2.8.0
|
|
31
|
+
Requires-Dist: requests >=2.8.0
|
|
32
|
+
Requires-Dist: pandas <2.0.0,>=1.1.0
|
|
33
|
+
Requires-Dist: numpy >=1.19.0
|
|
34
|
+
Requires-Dist: scikit-learn >=1.0.1
|
|
35
|
+
Requires-Dist: pydantic <2.0.0,>=1.8.2
|
|
36
|
+
Requires-Dist: fastparquet >=0.8.1
|
|
37
|
+
Requires-Dist: python-json-logger >=2.0.2
|
|
38
|
+
Requires-Dist: catboost >=1.0.3
|
|
39
|
+
Requires-Dist: lightgbm >=3.3.2
|
|
40
|
+
Requires-Dist: pyjwt >=2.8.0
|
|
41
|
+
Requires-Dist: xhtml2pdf ==0.2.11
|
|
42
|
+
Requires-Dist: ipywidgets >=8.1.0
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
<!-- <h2 align="center"> <a href="https://upgini.com/">Upgini</a> : low-code feature search and enrichment library for machine learning </h2> -->
|
|
@@ -437,6 +437,7 @@ Search keys and features in X should be the same as for `fit()`
|
|
|
437
437
|
enricher = FeaturesEnricher(
|
|
438
438
|
#same set of a search keys as for the fit step
|
|
439
439
|
search_keys={"date": SearchKey.DATE},
|
|
440
|
+
api_key="<YOUR API_KEY>", # if you fit enricher with api_key then you should use it here
|
|
440
441
|
search_id = "abcdef00-0000-0000-0000-999999999999"
|
|
441
442
|
)
|
|
442
443
|
enriched_prod_dataframe=enricher.transform(input_dataframe)
|
|
@@ -2,16 +2,23 @@ upgini/__init__.py,sha256=asENHgEVHQBIkV-e_0IhE_ZWqkCG6398U3ZLrNzAH6k,407
|
|
|
2
2
|
upgini/ads.py,sha256=mre6xn44wcC_fg63iLT_kTh4mViZqR9AKRJZAtpQz8Y,2592
|
|
3
3
|
upgini/dataset.py,sha256=7z9zbVvd1_MiufmoZlCwEHwQ25Q2DX_0g9PFcSMlqMY,49764
|
|
4
4
|
upgini/errors.py,sha256=BqpvfhW2jJW5fa5KXj0alhXatGl-WK4xTl309-QNLp8,959
|
|
5
|
-
upgini/features_enricher.py,sha256=
|
|
6
|
-
upgini/fingerprint.js,sha256=VygVIQlN1v4NGZfjHqtRogOw8zjTnnMNJg_f7M5iGQU,33442
|
|
5
|
+
upgini/features_enricher.py,sha256=Qh7GOw0GYnnjSvYjJV0X2qGP_vhRkBXMg9i6m7WKXmw,158550
|
|
7
6
|
upgini/http.py,sha256=HzUSZudCdISJGUqHC1gAT1v_x1n_dIFVDJW4z3Q7DCs,41204
|
|
8
|
-
upgini/metadata.py,sha256=
|
|
7
|
+
upgini/metadata.py,sha256=kJfQcK_UctNrRIZWTgqDa0uu0awod452ezrNcj0-oiU,9561
|
|
9
8
|
upgini/metrics.py,sha256=YeYHJtEIs8OG-EzidG-nbSYB919pjZ4MMbdcZ_jfV2s,23639
|
|
10
9
|
upgini/search_task.py,sha256=7YxH1zrUHMmePO0VbPBBCJjeoer7jAC0Gltc9EVAOIg,17126
|
|
11
10
|
upgini/spinner.py,sha256=yhakBaydMNS8E8TRAwTdCMdnWrHeWT0cR1M8c9hP6jA,1157
|
|
12
11
|
upgini/version_validator.py,sha256=rDIncP6BEko4J2F2hUcMOtKm_vZbI4ICWcNcw8hrwM4,1400
|
|
13
12
|
upgini/ads_management/__init__.py,sha256=qzyisOToVRP-tquAJD1PblZhNtMrOB8FiyF9JvfkvgE,50
|
|
14
13
|
upgini/ads_management/ads_manager.py,sha256=O6Pcl_y5e_ULfQ-xmGGn_qBP4z7EtV7TP9etjrsLkLE,2647
|
|
14
|
+
upgini/autofe/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
+
upgini/autofe/all_operands.py,sha256=du44N6ISWe3ikb0y9ZzSOHNbLiyEYrJPwoBo0Z6xp2s,1487
|
|
16
|
+
upgini/autofe/binary.py,sha256=zYSNKbOpnSxt2AdztDvXKeSYZXnF7aliQTnlFXJVAQw,3996
|
|
17
|
+
upgini/autofe/feature.py,sha256=wmsaFc5qPOyzfkPbEZ-95NK3WBIUCME0VOhoHFOKzjE,10087
|
|
18
|
+
upgini/autofe/groupby.py,sha256=frvv5S5Yy21pBKGDchGMpManntq1Ecj0pvjZG9dKeh8,3134
|
|
19
|
+
upgini/autofe/operand.py,sha256=jQoTOu62_zd-_Z-BOhCv-oq8OxpxDEq4p0Qwb6MOQvY,2313
|
|
20
|
+
upgini/autofe/unary.py,sha256=OJhFvJ9mZxuxC558xhU4Vg3FRQ8icf2PcUkt-kUdzGI,2755
|
|
21
|
+
upgini/autofe/vector.py,sha256=okjxNAFgvQhHny3h__dYWYizxXDVwqDSXznkmKirzuw,531
|
|
15
22
|
upgini/data_source/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
23
|
upgini/data_source/data_source_publisher.py,sha256=zFu0WMKwPM11gPZHq8dpsBP7s4wmTtBqYoDEakgNxoY,13725
|
|
17
24
|
upgini/mdc/__init__.py,sha256=CuKmWYCqAnmiq1S7wgMzJhSCTsXuoeiZWXSfzw0lyig,1152
|
|
@@ -20,7 +27,7 @@ upgini/normalizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
20
27
|
upgini/normalizer/phone_normalizer.py,sha256=VIgLXuDuzzjPEXiy_LyDVLZKGaS7-le6Fh6T4D-TQDU,9930
|
|
21
28
|
upgini/resource_bundle/__init__.py,sha256=M7GtS7KPQw9pinz8P2aQWXpSkD2YFwUPVGk1w92Pn84,7888
|
|
22
29
|
upgini/resource_bundle/exceptions.py,sha256=KT-OnqA2J4OTfLjhbEl3KFZM2ci7EOPjqJuY_rXp3vs,622
|
|
23
|
-
upgini/resource_bundle/strings.properties,sha256=
|
|
30
|
+
upgini/resource_bundle/strings.properties,sha256=1mpOkd_wkKIJGwWRBgfXz0mLx4lqdDro5IUoj8BBxuE,24527
|
|
24
31
|
upgini/sampler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
32
|
upgini/sampler/base.py,sha256=X2PVsfZ3Rl7twpFDh5UWyxqY2K_jcMGxZ2NcHLwFRj4,6489
|
|
26
33
|
upgini/sampler/random_under_sampler.py,sha256=whX_f_TtalHH8Seyn_7n3sX_TSiDHeYfALmme9saqDg,4082
|
|
@@ -30,9 +37,9 @@ upgini/utils/base_search_key_detector.py,sha256=DGwhXLvc8i5VZWMDr0rncFfV5GEHdsCS
|
|
|
30
37
|
upgini/utils/blocked_time_series.py,sha256=dMz5ewk3PsoeOrc3lDzInCVPS9u_2XQkV0W6PuMMjPg,3380
|
|
31
38
|
upgini/utils/country_utils.py,sha256=9BXSXoGm3nVoOZE_bRENY-KMkwMUFvAF3Au0zxUNA1o,6436
|
|
32
39
|
upgini/utils/custom_loss_utils.py,sha256=DBslpjWGPt7xTeypt78baR59012SYphbPsO_YLKdilo,3972
|
|
33
|
-
upgini/utils/cv_utils.py,sha256=
|
|
40
|
+
upgini/utils/cv_utils.py,sha256=6pSSL_Ft_8C6n6aInJeiyeSBD7McjsMxKZpHqSBV0uY,2491
|
|
34
41
|
upgini/utils/datetime_utils.py,sha256=P56e7gcgAogJYfs2Blzk1uypxb9yrFzNaeJpMCRm6Zc,7716
|
|
35
|
-
upgini/utils/display_utils.py,sha256=
|
|
42
|
+
upgini/utils/display_utils.py,sha256=tiq5sFOfMwkKCjQ7OGdyK_twe0Qdr9F3mzkW1QXSDog,10664
|
|
36
43
|
upgini/utils/email_utils.py,sha256=MhCLUAWqbp81xRyKizauNhVx6t_MFeJQRQ8pFM7EpFo,3480
|
|
37
44
|
upgini/utils/fallback_progress_bar.py,sha256=f-VzVbiO6oU9WoKzEgoegYotixdiKanGlvdQCOGC-NY,1128
|
|
38
45
|
upgini/utils/features_validator.py,sha256=iP8muF3PUf_aP9m7O3i3LPMuJPTNbw8rCAWqgvDt_h8,2369
|
|
@@ -45,8 +52,8 @@ upgini/utils/sklearn_ext.py,sha256=IMx2La70AXAggApVpT7sMEjWqVWon5AMZt4MARDsIMQ,4
|
|
|
45
52
|
upgini/utils/target_utils.py,sha256=cu52icjhDIPpEStHYMXrD2hIl9gzvfnxZr0Ra5osV0k,1616
|
|
46
53
|
upgini/utils/track_info.py,sha256=DVNVZmXUb4f25DSPEuUNEFx49hNEBfmuY9iSW5jkMnI,5708
|
|
47
54
|
upgini/utils/warning_counter.py,sha256=vnmdFo5-7GBkU2bK9h_uC0K0Y_wtfcYstxOdeRfacO0,228
|
|
48
|
-
upgini-1.1.
|
|
49
|
-
upgini-1.1.
|
|
50
|
-
upgini-1.1.
|
|
51
|
-
upgini-1.1.
|
|
52
|
-
upgini-1.1.
|
|
55
|
+
upgini-1.1.230a1.dist-info/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
|
56
|
+
upgini-1.1.230a1.dist-info/METADATA,sha256=BYtpbaY26K2iktbK2zvesCC2TTzyVh_ORPro8KYgGos,48374
|
|
57
|
+
upgini-1.1.230a1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
58
|
+
upgini-1.1.230a1.dist-info/top_level.txt,sha256=OFhTGiDIWKl5gFI49qvWq1R9IKflPaE2PekcbDXDtx4,7
|
|
59
|
+
upgini-1.1.230a1.dist-info/RECORD,,
|
upgini/fingerprint.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FingerprintJS v3.4.2 - Copyright (c) FingerprintJS, Inc, 2023 (https://fingerprint.com)
|
|
3
|
-
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
|
4
|
-
*
|
|
5
|
-
* This software contains code from open-source projects:
|
|
6
|
-
* MurmurHash3 by Karan Lyons (https://github.com/karanlyons/murmurHash3.js)
|
|
7
|
-
*/
|
|
8
|
-
var e=function(){return e=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},e.apply(this,arguments)};function n(e,n,t,r){return new(t||(t=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(n){a(n)}}function c(e){try{u(r.throw(e))}catch(n){a(n)}}function u(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(i,c)}u((r=r.apply(e,n||[])).next())}))}function t(e,n){var t,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(u){c=[6,u],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function r(e,n,t){if(t||2===arguments.length)for(var r,o=0,a=n.length;o<a;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function o(e,n){return new Promise((function(t){return setTimeout(t,e,n)}))}function a(e){return!!e&&"function"==typeof e.then}function i(e,n){try{var t=e();a(t)?t.then((function(e){return n(!0,e)}),(function(e){return n(!1,e)})):n(!0,t)}catch(r){n(!1,r)}}function c(e,r,a){return void 0===a&&(a=16),n(this,void 0,void 0,(function(){var n,i,c,u;return t(this,(function(t){switch(t.label){case 0:n=Array(e.length),i=Date.now(),c=0,t.label=1;case 1:return c<e.length?(n[c]=r(e[c],c),(u=Date.now())>=i+a?(i=u,[4,o(0)]):[3,3]):[3,4];case 2:t.sent(),t.label=3;case 3:return++c,[3,1];case 4:return[2,n]}}))}))}function u(e){e.then(void 0,(function(){}))}function l(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]+n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]+n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]+n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]+n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function s(e,n){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],n=[n[0]>>>16,65535&n[0],n[1]>>>16,65535&n[1]];var t=[0,0,0,0];return t[3]+=e[3]*n[3],t[2]+=t[3]>>>16,t[3]&=65535,t[2]+=e[2]*n[3],t[1]+=t[2]>>>16,t[2]&=65535,t[2]+=e[3]*n[2],t[1]+=t[2]>>>16,t[2]&=65535,t[1]+=e[1]*n[3],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[2]*n[2],t[0]+=t[1]>>>16,t[1]&=65535,t[1]+=e[3]*n[1],t[0]+=t[1]>>>16,t[1]&=65535,t[0]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0],t[0]&=65535,[t[0]<<16|t[1],t[2]<<16|t[3]]}function d(e,n){return 32===(n%=64)?[e[1],e[0]]:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n|e[0]>>>32-n]:(n-=32,[e[1]<<n|e[0]>>>32-n,e[0]<<n|e[1]>>>32-n])}function m(e,n){return 0===(n%=64)?e:n<32?[e[0]<<n|e[1]>>>32-n,e[1]<<n]:[e[1]<<n-32,0]}function f(e,n){return[e[0]^n[0],e[1]^n[1]]}function v(e){return e=f(e,[0,e[0]>>>1]),e=f(e=s(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=f(e=s(e,[3301882366,444984403]),[0,e[0]>>>1])}function h(e,n){n=n||0;var t,r=(e=e||"").length%16,o=e.length-r,a=[0,n],i=[0,n],c=[0,0],u=[0,0],h=[2277735313,289559509],p=[1291169091,658871167];for(t=0;t<o;t+=16)c=[255&e.charCodeAt(t+4)|(255&e.charCodeAt(t+5))<<8|(255&e.charCodeAt(t+6))<<16|(255&e.charCodeAt(t+7))<<24,255&e.charCodeAt(t)|(255&e.charCodeAt(t+1))<<8|(255&e.charCodeAt(t+2))<<16|(255&e.charCodeAt(t+3))<<24],u=[255&e.charCodeAt(t+12)|(255&e.charCodeAt(t+13))<<8|(255&e.charCodeAt(t+14))<<16|(255&e.charCodeAt(t+15))<<24,255&e.charCodeAt(t+8)|(255&e.charCodeAt(t+9))<<8|(255&e.charCodeAt(t+10))<<16|(255&e.charCodeAt(t+11))<<24],c=d(c=s(c,h),31),a=l(a=d(a=f(a,c=s(c,p)),27),i),a=l(s(a,[0,5]),[0,1390208809]),u=d(u=s(u,p),33),i=l(i=d(i=f(i,u=s(u,h)),31),a),i=l(s(i,[0,5]),[0,944331445]);switch(c=[0,0],u=[0,0],r){case 15:u=f(u,m([0,e.charCodeAt(t+14)],48));case 14:u=f(u,m([0,e.charCodeAt(t+13)],40));case 13:u=f(u,m([0,e.charCodeAt(t+12)],32));case 12:u=f(u,m([0,e.charCodeAt(t+11)],24));case 11:u=f(u,m([0,e.charCodeAt(t+10)],16));case 10:u=f(u,m([0,e.charCodeAt(t+9)],8));case 9:u=s(u=f(u,[0,e.charCodeAt(t+8)]),p),i=f(i,u=s(u=d(u,33),h));case 8:c=f(c,m([0,e.charCodeAt(t+7)],56));case 7:c=f(c,m([0,e.charCodeAt(t+6)],48));case 6:c=f(c,m([0,e.charCodeAt(t+5)],40));case 5:c=f(c,m([0,e.charCodeAt(t+4)],32));case 4:c=f(c,m([0,e.charCodeAt(t+3)],24));case 3:c=f(c,m([0,e.charCodeAt(t+2)],16));case 2:c=f(c,m([0,e.charCodeAt(t+1)],8));case 1:c=s(c=f(c,[0,e.charCodeAt(t)]),h),a=f(a,c=s(c=d(c,31),p))}return a=l(a=f(a,[0,e.length]),i=f(i,[0,e.length])),i=l(i,a),a=l(a=v(a),i=v(i)),i=l(i,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)}function p(e){return parseInt(e)}function b(e){return parseFloat(e)}function y(e,n){return"number"==typeof e&&isNaN(e)?n:e}function g(e){return e.reduce((function(e,n){return e+(n?1:0)}),0)}function w(e,n){if(void 0===n&&(n=1),Math.abs(n)>=1)return Math.round(e/n)*n;var t=1/n;return Math.round(e*t)/t}function L(e){return e&&"object"==typeof e&&"message"in e?e:{message:e}}function k(e){return"function"!=typeof e}function V(e,r,o){var a=Object.keys(e).filter((function(e){return!function(e,n){for(var t=0,r=e.length;t<r;++t)if(e[t]===n)return!0;return!1}(o,e)})),l=c(a,(function(n){return function(e,n){var t=new Promise((function(t){var r=Date.now();i(e.bind(null,n),(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=Date.now()-r;if(!e[0])return t((function(){return{error:L(e[1]),duration:o}}));var a=e[1];if(k(a))return t((function(){return{value:a,duration:o}}));t((function(){return new Promise((function(e){var n=Date.now();i(a,(function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var a=o+Date.now()-n;if(!t[0])return e({error:L(t[1]),duration:a});e({value:t[1],duration:a})}))}))}))}))}));return u(t),function(){return t.then((function(e){return e()}))}}(e[n],r)}));return u(l),function(){return n(this,void 0,void 0,(function(){var e,n,r,o;return t(this,(function(t){switch(t.label){case 0:return[4,l];case 1:return[4,c(t.sent(),(function(e){var n=e();return u(n),n}))];case 2:return e=t.sent(),[4,Promise.all(e)];case 3:for(n=t.sent(),r={},o=0;o<a.length;++o)r[a[o]]=n[o];return[2,r]}}))}))}}function Z(e,n){var t=function(e){return k(e)?n(e):function(){var t=e();return a(t)?t.then(n):n(t)}};return function(n){var r=e(n);return a(r)?r.then(t):t(r)}}function W(){var e=window,n=navigator;return g(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in n,"msPointerEnabled"in n])>=4}function C(){var e=window,n=navigator;return g(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in n,"msSaveBlob"in n])>=3&&!W()}function S(){var e=window,n=navigator;return g(["webkitPersistentStorage"in n,"webkitTemporaryStorage"in n,0===n.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function x(){var e=window,n=navigator;return g(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===n.vendor.indexOf("Apple"),"getStorageUpdates"in n,"WebKitMediaKeys"in e])>=4}function F(){var e=window;return g(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Y(){var e,n,t=window;return g(["buildID"in navigator,"MozAppearance"in(null!==(n=null===(e=document.documentElement)||void 0===e?void 0:e.style)&&void 0!==n?n:{}),"onmozfullscreenchange"in t,"mozInnerScreenX"in t,"CSSMozDocumentRule"in t,"CanvasCaptureMediaStream"in t])>=4}function M(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function G(){var e=S(),n=Y();if(!e&&!n)return!1;var t=window;return g(["onorientationchange"in t,"orientation"in t,e&&!("SharedWorker"in t),n&&/android/i.test(navigator.appVersion)])>=2}function R(e){var n=new Error(e);return n.name=e,n}function X(e,r,a){var i,c,u;return void 0===a&&(a=50),n(this,void 0,void 0,(function(){var n,l;return t(this,(function(t){switch(t.label){case 0:n=document,t.label=1;case 1:return n.body?[3,3]:[4,o(a)];case 2:return t.sent(),[3,1];case 3:l=n.createElement("iframe"),t.label=4;case 4:return t.trys.push([4,,10,11]),[4,new Promise((function(e,t){var o=!1,a=function(){o=!0,e()};l.onload=a,l.onerror=function(e){o=!0,t(e)};var i=l.style;i.setProperty("display","block","important"),i.position="absolute",i.top="0",i.left="0",i.visibility="hidden",r&&"srcdoc"in l?l.srcdoc=r:l.src="about:blank",n.body.appendChild(l);var c=function(){var e,n;o||("complete"===(null===(n=null===(e=l.contentWindow)||void 0===e?void 0:e.document)||void 0===n?void 0:n.readyState)?a():setTimeout(c,10))};c()}))];case 5:t.sent(),t.label=6;case 6:return(null===(c=null===(i=l.contentWindow)||void 0===i?void 0:i.document)||void 0===c?void 0:c.body)?[3,8]:[4,o(a)];case 7:return t.sent(),[3,6];case 8:return[4,e(l,l.contentWindow)];case 9:return[2,t.sent()];case 10:return null===(u=l.parentNode)||void 0===u||u.removeChild(l),[7];case 11:return[2]}}))}))}function A(e){for(var n=function(e){for(var n,t,r="Unexpected syntax '".concat(e,"'"),o=/^\s*([a-z-]*)(.*)$/i.exec(e),a=o[1]||void 0,i={},c=/([.:#][\w-]+|\[.+?\])/gi,u=function(e,n){i[e]=i[e]||[],i[e].push(n)};;){var l=c.exec(o[2]);if(!l)break;var s=l[0];switch(s[0]){case".":u("class",s.slice(1));break;case"#":u("id",s.slice(1));break;case"[":var d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(s);if(!d)throw new Error(r);u(d[1],null!==(t=null!==(n=d[4])&&void 0!==n?n:d[5])&&void 0!==t?t:"");break;default:throw new Error(r)}}return[a,i]}(e),t=n[0],r=n[1],o=document.createElement(null!=t?t:"div"),a=0,i=Object.keys(r);a<i.length;a++){var c=i[a],u=r[c].join(" ");"style"===c?j(o.style,u):o.setAttribute(c,u)}return o}function j(e,n){for(var t=0,r=n.split(";");t<r.length;t++){var o=r[t],a=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(o);if(a){var i=a[1],c=a[2],u=a[4];e.setProperty(i,c,u||"")}}}var I=["monospace","sans-serif","serif"],J=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function H(e){return e.toDataURL()}var P,N;function z(){var e=this;return function(){if(void 0===N){var e=function(){var n=D();E(n)?N=setTimeout(e,2500):(P=n,N=void 0)};e()}}(),function(){return n(e,void 0,void 0,(function(){var e;return t(this,(function(n){switch(n.label){case 0:return E(e=D())?P?[2,r([],P,!0)]:M()?[4,(t=document,(t.exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t))]:[3,2]:[3,2];case 1:n.sent(),e=D(),n.label=2;case 2:return E(e)||(P=e),[2,e]}var t}))}))}}function D(){var e=screen;return[y(b(e.availTop),null),y(b(e.width)-b(e.availWidth)-y(b(e.availLeft),0),null),y(b(e.height)-b(e.availHeight)-y(b(e.availTop),0),null),y(b(e.availLeft),null)]}function E(e){for(var n=0;n<4;++n)if(e[n])return!1;return!0}function T(e){var r;return n(this,void 0,void 0,(function(){var n,a,i,c,u,l,s;return t(this,(function(t){switch(t.label){case 0:for(n=document,a=n.createElement("div"),i=new Array(e.length),c={},B(a),s=0;s<e.length;++s)"DIALOG"===(u=A(e[s])).tagName&&u.show(),B(l=n.createElement("div")),l.appendChild(u),a.appendChild(l),i[s]=u;t.label=1;case 1:return n.body?[3,3]:[4,o(50)];case 2:return t.sent(),[3,1];case 3:n.body.appendChild(a);try{for(s=0;s<e.length;++s)i[s].offsetParent||(c[e[s]]=!0)}finally{null===(r=a.parentNode)||void 0===r||r.removeChild(a)}return[2,c]}}))}))}function B(e){e.style.setProperty("display","block","important")}function _(e){return matchMedia("(inverted-colors: ".concat(e,")")).matches}function O(e){return matchMedia("(forced-colors: ".concat(e,")")).matches}function U(e){return matchMedia("(prefers-contrast: ".concat(e,")")).matches}function Q(e){return matchMedia("(prefers-reduced-motion: ".concat(e,")")).matches}function K(e){return matchMedia("(dynamic-range: ".concat(e,")")).matches}var q=Math,$=function(){return 0};var ee={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var ne={fonts:function(){return X((function(e,n){var t=n.document,r=t.body;r.style.fontSize="48px";var o=t.createElement("div"),a={},i={},c=function(e){var n=t.createElement("span"),r=n.style;return r.position="absolute",r.top="0",r.left="0",r.fontFamily=e,n.textContent="mmMwWLliI0O&1",o.appendChild(n),n},u=I.map(c),l=function(){for(var e={},n=function(n){e[n]=I.map((function(e){return function(e,n){return c("'".concat(e,"',").concat(n))}(n,e)}))},t=0,r=J;t<r.length;t++){n(r[t])}return e}();r.appendChild(o);for(var s=0;s<I.length;s++)a[I[s]]=u[s].offsetWidth,i[I[s]]=u[s].offsetHeight;return J.filter((function(e){return n=l[e],I.some((function(e,t){return n[t].offsetWidth!==a[e]||n[t].offsetHeight!==i[e]}));var n}))}))},domBlockers:function(e){var r=(void 0===e?{}:e).debug;return n(this,void 0,void 0,(function(){var e,n,o,a,i;return t(this,(function(t){switch(t.label){case 0:return x()||G()?(c=atob,e={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',c("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",c("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",c("LnNwb25zb3JpdA=="),".ylamainos",c("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),c("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",c("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",c("LmhlYWRlci1ibG9ja2VkLWFk"),c("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",c("I2FkXzMwMFgyNTA="),c("I2Jhbm5lcmZsb2F0MjI="),c("I2NhbXBhaWduLWJhbm5lcg=="),c("I0FkLUNvbnRlbnQ=")],adGuardChinese:[c("LlppX2FkX2FfSA=="),c("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",c("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),c("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",c("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",c("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",c("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),c("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),c("LmFkZ29vZ2xl"),c("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[c("YW1wLWF1dG8tYWRz"),c("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",c("I2FkX2ludmlld19hcmVh")],adGuardRussian:[c("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),c("LnJlY2xhbWE="),'div[id^="smi2adblock"]',c("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[c("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),c("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",c("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),c("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),c("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",c("I3Jla2xhbWk="),c("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),c("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),c("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[c("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",c("LndpZGdldF9wb19hZHNfd2lkZ2V0"),c("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",c("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[c("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),c("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",c("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",c("I3Jla2xhbW5pLWJveA=="),c("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",c("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[c("I2FkdmVydGVudGll"),c("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",c("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",c("LnNwb25zb3JsaW5rZ3J1ZW4="),c("I3dlcmJ1bmdza3k="),c("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),c("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[c("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",c("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),c("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),c("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[c("LnJla2xhbW9zX3RhcnBhcw=="),c("LnJla2xhbW9zX251b3JvZG9z"),c("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),c("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),c("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[c("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[c("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),c("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",c("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[c("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),c("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),c("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",c("LmFkX19tYWlu"),c("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[c("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[c("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),c("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[c("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),c("I2xpdmVyZUFkV3JhcHBlcg=="),c("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),c("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[c("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",c("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),c("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),c("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[c("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),c("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),c("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",c("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),c("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),c("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),c("ZGl2I3NrYXBpZWNfYWQ=")],ro:[c("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),c("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),c("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),c("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[c("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),c("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),c("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",c("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),c("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",c("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},n=Object.keys(e),[4,T((i=[]).concat.apply(i,n.map((function(n){return e[n]}))))]):[2,void 0];case 1:return o=t.sent(),r&&function(e,n){for(var t="DOM blockers debug:\n```",r=0,o=Object.keys(e);r<o.length;r++){var a=o[r];t+="\n".concat(a,":");for(var i=0,c=e[a];i<c.length;i++){var u=c[i];t+="\n ".concat(n[u]?"🚫":"➡️"," ").concat(u)}}console.log("".concat(t,"\n```"))}(e,o),(a=n.filter((function(n){var t=e[n];return g(t.map((function(e){return o[e]})))>.6*t.length}))).sort(),[2,a]}var c}))}))},fontPreferences:function(){return function(e,n){void 0===n&&(n=4e3);return X((function(t,o){var a=o.document,i=a.body,c=i.style;c.width="".concat(n,"px"),c.webkitTextSizeAdjust=c.textSizeAdjust="none",S()?i.style.zoom="".concat(1/o.devicePixelRatio):x()&&(i.style.zoom="reset");var u=a.createElement("div");return u.textContent=r([],Array(n/20<<0),!0).map((function(){return"word"})).join(" "),i.appendChild(u),e(a,i)}),'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((function(e,n){for(var t={},r={},o=0,a=Object.keys(ee);o<a.length;o++){var i=a[o],c=ee[i],u=c[0],l=void 0===u?{}:u,s=c[1],d=void 0===s?"mmMwWLliI0fiflO&1":s,m=e.createElement("span");m.textContent=d,m.style.whiteSpace="nowrap";for(var f=0,v=Object.keys(l);f<v.length;f++){var h=v[f],p=l[h];void 0!==p&&(m.style[h]=p)}t[i]=m,n.appendChild(e.createElement("br")),n.appendChild(m)}for(var b=0,y=Object.keys(ee);b<y.length;b++){r[i=y[b]]=t[i].getBoundingClientRect().width}return r}))},audio:function(){var e=window,n=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!n)return-2;if(x()&&!F()&&!function(){var e=window;return g(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}())return-1;var t=new n(1,5e3,44100),r=t.createOscillator();r.type="triangle",r.frequency.value=1e4;var o=t.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(t.destination),r.start(0);var i=function(e){var n=3,t=500,r=500,o=5e3,i=function(){};return[new Promise((function(c,l){var s=!1,d=0,m=0;e.oncomplete=function(e){return c(e.renderedBuffer)};var f=function(){setTimeout((function(){return l(R("timeout"))}),Math.min(r,m+o-Date.now()))},v=function(){try{var r=e.startRendering();switch(a(r)&&u(r),e.state){case"running":m=Date.now(),s&&f();break;case"suspended":document.hidden||d++,s&&d>=n?l(R("suspended")):setTimeout(v,t)}}catch(o){l(o)}};v(),i=function(){s||(s=!0,m>0&&f())}})),i]}(t),c=i[0],l=i[1],s=c.then((function(e){return function(e){for(var n=0,t=0;t<e.length;++t)n+=Math.abs(e[t]);return n}(e.getChannelData(0).subarray(4500))}),(function(e){if("timeout"===e.name||"suspended"===e.name)return-3;throw e}));return u(s),function(){return l(),s}},screenFrame:function(){var e=this,r=z();return function(){return n(e,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return[4,r()];case 1:return e=t.sent(),[2,[(n=function(e){return null===e?null:w(e,10)})(e[0]),n(e[1]),n(e[2]),n(e[3])]]}}))}))}},osCpu:function(){return navigator.oscpu},languages:function(){var e,n=navigator,t=[],r=n.language||n.userLanguage||n.browserLanguage||n.systemLanguage;if(void 0!==r&&t.push([r]),Array.isArray(n.languages))S()&&g([!("MediaSettingsRange"in(e=window)),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3||t.push(n.languages);else if("string"==typeof n.languages){var o=n.languages;o&&t.push(o.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return y(b(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,n=function(e){return y(p(e),null)},t=[n(e.width),n(e.height)];return t.sort().reverse(),t},hardwareConcurrency:function(){return y(p(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,n=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(n){var t=(new n).resolvedOptions().timeZone;if(t)return t}var r,o=(r=(new Date).getFullYear(),-Math.max(b(new Date(r,0,1).getTimezoneOffset()),b(new Date(r,6,1).getTimezoneOffset())));return"UTC".concat(o>=0?"+":"").concat(Math.abs(o))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!W()&&!C())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return"MacIntel"===e&&x()&&!F()?function(){if("iPad"===navigator.platform)return!0;var e=screen,n=e.width/e.height;return g(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,n>.65&&n<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var n=[],t=0;t<e.length;++t){var r=e[t];if(r){for(var o=[],a=0;a<r.length;++a){var i=r[a];o.push({type:i.type,suffixes:i.suffixes})}n.push({name:r.name,description:r.description,mimeTypes:o})}}return n}},canvas:function(){var e,n,t=!1,r=function(){var e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}(),o=r[0],a=r[1];if(function(e,n){return!(!n||!e.toDataURL)}(o,a)){t=function(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}(a),function(e,n){e.width=240,e.height=60,n.textBaseline="alphabetic",n.fillStyle="#f60",n.fillRect(100,1,62,20),n.fillStyle="#069",n.font='11pt "Times New Roman"';var t="Cwm fjordbank gly ".concat(String.fromCharCode(55357,56835));n.fillText(t,2,15),n.fillStyle="rgba(102, 204, 0, 0.2)",n.font="18pt Arial",n.fillText(t,4,45)}(o,a);var i=H(o);i!==H(o)?e=n="unstable":(n=i,function(e,n){e.width=122,e.height=110,n.globalCompositeOperation="multiply";for(var t=0,r=[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]];t<r.length;t++){var o=r[t],a=o[0],i=o[1],c=o[2];n.fillStyle=a,n.beginPath(),n.arc(i,c,40,0,2*Math.PI,!0),n.closePath(),n.fill()}n.fillStyle="#f9c",n.arc(60,60,60,0,2*Math.PI,!0),n.arc(60,60,20,0,2*Math.PI,!0),n.fill("evenodd")}(o,a),e=H(o))}else e=n="";return{winding:t,geometry:e,text:n}},touchSupport:function(){var e,n=navigator,t=0;void 0!==n.maxTouchPoints?t=p(n.maxTouchPoints):void 0!==n.msMaxTouchPoints&&(t=n.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(r){e=!1}return{maxTouchPoints:t,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){for(var e=[],n=0,t=["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"];n<t.length;n++){var r=t[n],o=window[r];o&&"object"==typeof o&&e.push(r)}return e.sort()},cookiesEnabled:function(){var e=document;try{e.cookie="cookietest=1; SameSite=Strict;";var n=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",n}catch(t){return!1}},colorGamut:function(){for(var e=0,n=["rec2020","p3","srgb"];e<n.length;e++){var t=n[e];if(matchMedia("(color-gamut: ".concat(t,")")).matches)return t}},invertedColors:function(){return!!_("inverted")||!_("none")&&void 0},forcedColors:function(){return!!O("active")||!O("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(var e=0;e<=100;++e)if(matchMedia("(max-monochrome: ".concat(e,")")).matches)return e;throw new Error("Too high value")}},contrast:function(){return U("no-preference")?0:U("high")||U("more")?1:U("low")||U("less")?-1:U("forced")?10:void 0},reducedMotion:function(){return!!Q("reduce")||!Q("no-preference")&&void 0},hdr:function(){return!!K("high")||!K("standard")&&void 0},math:function(){var e,n=q.acos||$,t=q.acosh||$,r=q.asin||$,o=q.asinh||$,a=q.atanh||$,i=q.atan||$,c=q.sin||$,u=q.sinh||$,l=q.cos||$,s=q.cosh||$,d=q.tan||$,m=q.tanh||$,f=q.exp||$,v=q.expm1||$,h=q.log1p||$;return{acos:n(.12312423423423424),acosh:t(1e308),acoshPf:(e=1e154,q.log(e+q.sqrt(e*e-1))),asin:r(.12312423423423424),asinh:o(1),asinhPf:function(e){return q.log(e+q.sqrt(e*e+1))}(1),atanh:a(.5),atanhPf:function(e){return q.log((1+e)/(1-e))/2}(.5),atan:i(.5),sin:c(-1e300),sinh:u(1),sinhPf:function(e){return q.exp(e)-1/q.exp(e)/2}(1),cos:l(10.000000000123),cosh:s(1),coshPf:function(e){return(q.exp(e)+1/q.exp(e))/2}(1),tan:d(-1e300),tanh:m(1),tanhPf:function(e){return(q.exp(2*e)-1)/(q.exp(2*e)+1)}(1),exp:f(1),expm1:v(1),expm1Pf:function(e){return q.exp(e)-1}(1),log1p:h(10),log1pPf:function(e){return q.log(1+e)}(10),powPI:function(e){return q.pow(q.PI,e)}(-100)}},videoCard:function(){var e,n=document.createElement("canvas"),t=null!==(e=n.getContext("webgl"))&&void 0!==e?e:n.getContext("experimental-webgl");if(t&&"getExtension"in t){var r=t.getExtension("WEBGL_debug_renderer_info");if(r)return{vendor:(t.getParameter(r.UNMASKED_VENDOR_WEBGL)||"").toString(),renderer:(t.getParameter(r.UNMASKED_RENDERER_WEBGL)||"").toString()}}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){var e=new Float32Array(1),n=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],n[3]}};function te(e){var n=function(e){if(G())return.4;if(x())return F()?.5:.3;var n=e.platform.value||"";if(/^Win/.test(n))return.6;if(/^Mac/.test(n))return.5;return.7}(e),t=function(e){return w(.99+.01*e,1e-4)}(n);return{score:n,comment:"$ if upgrade to Pro: https://fpjs.dev/pro".replace(/\$/g,"".concat(t))}}function re(n){return JSON.stringify(n,(function(n,t){return t instanceof Error?e({name:(r=t).name,message:r.message,stack:null===(o=r.stack)||void 0===o?void 0:o.split("\n")},r):t;var r,o}),2)}function oe(e){return h(function(e){for(var n="",t=0,r=Object.keys(e).sort();t<r.length;t++){var o=r[t],a=e[o],i=a.error?"error":JSON.stringify(a.value);n+="".concat(n?"|":"").concat(o.replace(/([:|\\])/g,"\\$1"),":").concat(i)}return n}(e))}function ae(e){return void 0===e&&(e=50),function(e,n){void 0===n&&(n=1/0);var t=window.requestIdleCallback;return t?new Promise((function(e){return t.call(window,(function(){return e()}),{timeout:n})})):o(Math.min(e,n))}(e,2*e)}function ie(e,r){var o=Date.now();return{get:function(a){return n(this,void 0,void 0,(function(){var n,i,c;return t(this,(function(t){switch(t.label){case 0:return n=Date.now(),[4,e()];case 1:return i=t.sent(),c=function(e){var n;return{get visitorId(){return void 0===n&&(n=oe(this.components)),n},set visitorId(e){n=e},confidence:te(e),components:e,version:"3.4.2"}}(i),(r||(null==a?void 0:a.debug))&&console.log("Copy the text below to get the debug data:\n\n```\nversion: ".concat(c.version,"\nuserAgent: ").concat(navigator.userAgent,"\ntimeBetweenLoadAndGet: ").concat(n-o,"\nvisitorId: ").concat(c.visitorId,"\ncomponents: ").concat(re(i),"\n```")),[2,c]}}))}))}}}function ce(e){var r=void 0===e?{}:e,o=r.delayFallback,a=r.debug;return r.monitoring,n(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,ae(o)];case 1:return e.sent(),[2,ie(V(ne,{debug:a},[]),a)]}}))}))}var ue={load:ce,hashComponents:oe,componentsToDebugString:re},le=h;export{re as componentsToDebugString,ue as default,M as getFullscreenElement,z as getScreenFrame,oe as hashComponents,G as isAndroid,S as isChromium,F as isDesktopSafari,C as isEdgeHTML,Y as isGecko,W as isTrident,x as isWebKit,ce as load,V as loadSources,le as murmurX64Hash128,ae as prepareForSources,ne as sources,Z as transformSource,X as withIframe};
|
|
File without changes
|
|
File without changes
|