Version Description
- 29/08/2022 = Bug to "remove from cart" has been resolved when user updates product quantity in your woo-commerce store. We have also made some UI changes for easy transition and customer help.
Download this release
Release Info
Developer | ramniktatvic |
Plugin | Enhanced Ecommerce Google Analytics Plugin for WooCommerce |
Version | 4.8.9 |
Comparing to | |
See all releases |
Code changes from version 4.8.8 to 4.8.9
- LICENSE.txt +338 -338
- admin/class-conversios-admin.php +384 -384
- admin/class-conversios-onboarding.php +23 -2
- admin/class-enhanced-ecommerce-google-analytics-admin.php +211 -211
- admin/css/custom-style.css +2975 -2975
- admin/css/dataTables.bootstrap5.min.css +5 -5
- admin/css/daterangepicker.css +71 -71
- admin/css/enhanced-ecommerce-google-analytics-admin.css +712 -712
- admin/css/select2.css +108 -108
- admin/css/slick.css +46 -46
- admin/css/style.css +1386 -1381
- admin/helper/class-onboarding-helper.php +76 -10
- admin/images/icon/add.svg +35 -35
- admin/js/chart.js +4250 -13190
LICENSE.txt
CHANGED
@@ -1,339 +1,339 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
281 |
-
|
282 |
-
How to Apply These Terms to Your New Programs
|
283 |
-
|
284 |
-
If you develop a new program, and you want it to be of the greatest
|
285 |
-
possible use to the public, the best way to achieve this is to make it
|
286 |
-
free software which everyone can redistribute and change under these terms.
|
287 |
-
|
288 |
-
To do so, attach the following notices to the program. It is safest
|
289 |
-
to attach them to the start of each source file to most effectively
|
290 |
-
convey the exclusion of warranty; and each file should have at least
|
291 |
-
the "copyright" line and a pointer to where the full notice is found.
|
292 |
-
|
293 |
-
<one line to give the program's name and a brief idea of what it does.>
|
294 |
-
Copyright (C) <year> <name of author>
|
295 |
-
|
296 |
-
This program is free software; you can redistribute it and/or modify
|
297 |
-
it under the terms of the GNU General Public License as published by
|
298 |
-
the Free Software Foundation; either version 2 of the License, or
|
299 |
-
(at your option) any later version.
|
300 |
-
|
301 |
-
This program is distributed in the hope that it will be useful,
|
302 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
-
GNU General Public License for more details.
|
305 |
-
|
306 |
-
You should have received a copy of the GNU General Public License along
|
307 |
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
-
|
310 |
-
Also add information on how to contact you by electronic and paper mail.
|
311 |
-
|
312 |
-
If the program is interactive, make it output a short notice like this
|
313 |
-
when it starts in an interactive mode:
|
314 |
-
|
315 |
-
Gnomovision version 69, Copyright (C) year name of author
|
316 |
-
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
-
This is free software, and you are welcome to redistribute it
|
318 |
-
under certain conditions; type `show c' for details.
|
319 |
-
|
320 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
-
parts of the General Public License. Of course, the commands you use may
|
322 |
-
be called something other than `show w' and `show c'; they could even be
|
323 |
-
mouse-clicks or menu items--whatever suits your program.
|
324 |
-
|
325 |
-
You should also get your employer (if you work as a programmer) or your
|
326 |
-
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
-
necessary. Here is a sample; alter the names:
|
328 |
-
|
329 |
-
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
-
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
-
|
332 |
-
<signature of Ty Coon>, 1 April 1989
|
333 |
-
Ty Coon, President of Vice
|
334 |
-
|
335 |
-
This General Public License does not permit incorporating your program into
|
336 |
-
proprietary programs. If your program is a subroutine library, you may
|
337 |
-
consider it more useful to permit linking proprietary applications with the
|
338 |
-
library. If this is what you want to do, use the GNU Lesser General
|
339 |
Public License instead of this License.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 2, June 1991
|
3 |
+
|
4 |
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
Preamble
|
10 |
+
|
11 |
+
The licenses for most software are designed to take away your
|
12 |
+
freedom to share and change it. By contrast, the GNU General Public
|
13 |
+
License is intended to guarantee your freedom to share and change free
|
14 |
+
software--to make sure the software is free for all its users. This
|
15 |
+
General Public License applies to most of the Free Software
|
16 |
+
Foundation's software and to any other program whose authors commit to
|
17 |
+
using it. (Some other Free Software Foundation software is covered by
|
18 |
+
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
+
your programs, too.
|
20 |
+
|
21 |
+
When we speak of free software, we are referring to freedom, not
|
22 |
+
price. Our General Public Licenses are designed to make sure that you
|
23 |
+
have the freedom to distribute copies of free software (and charge for
|
24 |
+
this service if you wish), that you receive source code or can get it
|
25 |
+
if you want it, that you can change the software or use pieces of it
|
26 |
+
in new free programs; and that you know you can do these things.
|
27 |
+
|
28 |
+
To protect your rights, we need to make restrictions that forbid
|
29 |
+
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
+
These restrictions translate to certain responsibilities for you if you
|
31 |
+
distribute copies of the software, or if you modify it.
|
32 |
+
|
33 |
+
For example, if you distribute copies of such a program, whether
|
34 |
+
gratis or for a fee, you must give the recipients all the rights that
|
35 |
+
you have. You must make sure that they, too, receive or can get the
|
36 |
+
source code. And you must show them these terms so they know their
|
37 |
+
rights.
|
38 |
+
|
39 |
+
We protect your rights with two steps: (1) copyright the software, and
|
40 |
+
(2) offer you this license which gives you legal permission to copy,
|
41 |
+
distribute and/or modify the software.
|
42 |
+
|
43 |
+
Also, for each author's protection and ours, we want to make certain
|
44 |
+
that everyone understands that there is no warranty for this free
|
45 |
+
software. If the software is modified by someone else and passed on, we
|
46 |
+
want its recipients to know that what they have is not the original, so
|
47 |
+
that any problems introduced by others will not reflect on the original
|
48 |
+
authors' reputations.
|
49 |
+
|
50 |
+
Finally, any free program is threatened constantly by software
|
51 |
+
patents. We wish to avoid the danger that redistributors of a free
|
52 |
+
program will individually obtain patent licenses, in effect making the
|
53 |
+
program proprietary. To prevent this, we have made it clear that any
|
54 |
+
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
GNU GENERAL PUBLIC LICENSE
|
60 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
+
|
62 |
+
0. This License applies to any program or other work which contains
|
63 |
+
a notice placed by the copyright holder saying it may be distributed
|
64 |
+
under the terms of this General Public License. The "Program", below,
|
65 |
+
refers to any such program or work, and a "work based on the Program"
|
66 |
+
means either the Program or any derivative work under copyright law:
|
67 |
+
that is to say, a work containing the Program or a portion of it,
|
68 |
+
either verbatim or with modifications and/or translated into another
|
69 |
+
language. (Hereinafter, translation is included without limitation in
|
70 |
+
the term "modification".) Each licensee is addressed as "you".
|
71 |
+
|
72 |
+
Activities other than copying, distribution and modification are not
|
73 |
+
covered by this License; they are outside its scope. The act of
|
74 |
+
running the Program is not restricted, and the output from the Program
|
75 |
+
is covered only if its contents constitute a work based on the
|
76 |
+
Program (independent of having been made by running the Program).
|
77 |
+
Whether that is true depends on what the Program does.
|
78 |
+
|
79 |
+
1. You may copy and distribute verbatim copies of the Program's
|
80 |
+
source code as you receive it, in any medium, provided that you
|
81 |
+
conspicuously and appropriately publish on each copy an appropriate
|
82 |
+
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
+
notices that refer to this License and to the absence of any warranty;
|
84 |
+
and give any other recipients of the Program a copy of this License
|
85 |
+
along with the Program.
|
86 |
+
|
87 |
+
You may charge a fee for the physical act of transferring a copy, and
|
88 |
+
you may at your option offer warranty protection in exchange for a fee.
|
89 |
+
|
90 |
+
2. You may modify your copy or copies of the Program or any portion
|
91 |
+
of it, thus forming a work based on the Program, and copy and
|
92 |
+
distribute such modifications or work under the terms of Section 1
|
93 |
+
above, provided that you also meet all of these conditions:
|
94 |
+
|
95 |
+
a) You must cause the modified files to carry prominent notices
|
96 |
+
stating that you changed the files and the date of any change.
|
97 |
+
|
98 |
+
b) You must cause any work that you distribute or publish, that in
|
99 |
+
whole or in part contains or is derived from the Program or any
|
100 |
+
part thereof, to be licensed as a whole at no charge to all third
|
101 |
+
parties under the terms of this License.
|
102 |
+
|
103 |
+
c) If the modified program normally reads commands interactively
|
104 |
+
when run, you must cause it, when started running for such
|
105 |
+
interactive use in the most ordinary way, to print or display an
|
106 |
+
announcement including an appropriate copyright notice and a
|
107 |
+
notice that there is no warranty (or else, saying that you provide
|
108 |
+
a warranty) and that users may redistribute the program under
|
109 |
+
these conditions, and telling the user how to view a copy of this
|
110 |
+
License. (Exception: if the Program itself is interactive but
|
111 |
+
does not normally print such an announcement, your work based on
|
112 |
+
the Program is not required to print an announcement.)
|
113 |
+
|
114 |
+
These requirements apply to the modified work as a whole. If
|
115 |
+
identifiable sections of that work are not derived from the Program,
|
116 |
+
and can be reasonably considered independent and separate works in
|
117 |
+
themselves, then this License, and its terms, do not apply to those
|
118 |
+
sections when you distribute them as separate works. But when you
|
119 |
+
distribute the same sections as part of a whole which is a work based
|
120 |
+
on the Program, the distribution of the whole must be on the terms of
|
121 |
+
this License, whose permissions for other licensees extend to the
|
122 |
+
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
+
|
124 |
+
Thus, it is not the intent of this section to claim rights or contest
|
125 |
+
your rights to work written entirely by you; rather, the intent is to
|
126 |
+
exercise the right to control the distribution of derivative or
|
127 |
+
collective works based on the Program.
|
128 |
+
|
129 |
+
In addition, mere aggregation of another work not based on the Program
|
130 |
+
with the Program (or with a work based on the Program) on a volume of
|
131 |
+
a storage or distribution medium does not bring the other work under
|
132 |
+
the scope of this License.
|
133 |
+
|
134 |
+
3. You may copy and distribute the Program (or a work based on it,
|
135 |
+
under Section 2) in object code or executable form under the terms of
|
136 |
+
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
+
|
138 |
+
a) Accompany it with the complete corresponding machine-readable
|
139 |
+
source code, which must be distributed under the terms of Sections
|
140 |
+
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
+
|
142 |
+
b) Accompany it with a written offer, valid for at least three
|
143 |
+
years, to give any third party, for a charge no more than your
|
144 |
+
cost of physically performing source distribution, a complete
|
145 |
+
machine-readable copy of the corresponding source code, to be
|
146 |
+
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
+
customarily used for software interchange; or,
|
148 |
+
|
149 |
+
c) Accompany it with the information you received as to the offer
|
150 |
+
to distribute corresponding source code. (This alternative is
|
151 |
+
allowed only for noncommercial distribution and only if you
|
152 |
+
received the program in object code or executable form with such
|
153 |
+
an offer, in accord with Subsection b above.)
|
154 |
+
|
155 |
+
The source code for a work means the preferred form of the work for
|
156 |
+
making modifications to it. For an executable work, complete source
|
157 |
+
code means all the source code for all modules it contains, plus any
|
158 |
+
associated interface definition files, plus the scripts used to
|
159 |
+
control compilation and installation of the executable. However, as a
|
160 |
+
special exception, the source code distributed need not include
|
161 |
+
anything that is normally distributed (in either source or binary
|
162 |
+
form) with the major components (compiler, kernel, and so on) of the
|
163 |
+
operating system on which the executable runs, unless that component
|
164 |
+
itself accompanies the executable.
|
165 |
+
|
166 |
+
If distribution of executable or object code is made by offering
|
167 |
+
access to copy from a designated place, then offering equivalent
|
168 |
+
access to copy the source code from the same place counts as
|
169 |
+
distribution of the source code, even though third parties are not
|
170 |
+
compelled to copy the source along with the object code.
|
171 |
+
|
172 |
+
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
+
except as expressly provided under this License. Any attempt
|
174 |
+
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
+
void, and will automatically terminate your rights under this License.
|
176 |
+
However, parties who have received copies, or rights, from you under
|
177 |
+
this License will not have their licenses terminated so long as such
|
178 |
+
parties remain in full compliance.
|
179 |
+
|
180 |
+
5. You are not required to accept this License, since you have not
|
181 |
+
signed it. However, nothing else grants you permission to modify or
|
182 |
+
distribute the Program or its derivative works. These actions are
|
183 |
+
prohibited by law if you do not accept this License. Therefore, by
|
184 |
+
modifying or distributing the Program (or any work based on the
|
185 |
+
Program), you indicate your acceptance of this License to do so, and
|
186 |
+
all its terms and conditions for copying, distributing or modifying
|
187 |
+
the Program or works based on it.
|
188 |
+
|
189 |
+
6. Each time you redistribute the Program (or any work based on the
|
190 |
+
Program), the recipient automatically receives a license from the
|
191 |
+
original licensor to copy, distribute or modify the Program subject to
|
192 |
+
these terms and conditions. You may not impose any further
|
193 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
+
You are not responsible for enforcing compliance by third parties to
|
195 |
+
this License.
|
196 |
+
|
197 |
+
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
+
infringement or for any other reason (not limited to patent issues),
|
199 |
+
conditions are imposed on you (whether by court order, agreement or
|
200 |
+
otherwise) that contradict the conditions of this License, they do not
|
201 |
+
excuse you from the conditions of this License. If you cannot
|
202 |
+
distribute so as to satisfy simultaneously your obligations under this
|
203 |
+
License and any other pertinent obligations, then as a consequence you
|
204 |
+
may not distribute the Program at all. For example, if a patent
|
205 |
+
license would not permit royalty-free redistribution of the Program by
|
206 |
+
all those who receive copies directly or indirectly through you, then
|
207 |
+
the only way you could satisfy both it and this License would be to
|
208 |
+
refrain entirely from distribution of the Program.
|
209 |
+
|
210 |
+
If any portion of this section is held invalid or unenforceable under
|
211 |
+
any particular circumstance, the balance of the section is intended to
|
212 |
+
apply and the section as a whole is intended to apply in other
|
213 |
+
circumstances.
|
214 |
+
|
215 |
+
It is not the purpose of this section to induce you to infringe any
|
216 |
+
patents or other property right claims or to contest validity of any
|
217 |
+
such claims; this section has the sole purpose of protecting the
|
218 |
+
integrity of the free software distribution system, which is
|
219 |
+
implemented by public license practices. Many people have made
|
220 |
+
generous contributions to the wide range of software distributed
|
221 |
+
through that system in reliance on consistent application of that
|
222 |
+
system; it is up to the author/donor to decide if he or she is willing
|
223 |
+
to distribute software through any other system and a licensee cannot
|
224 |
+
impose that choice.
|
225 |
+
|
226 |
+
This section is intended to make thoroughly clear what is believed to
|
227 |
+
be a consequence of the rest of this License.
|
228 |
+
|
229 |
+
8. If the distribution and/or use of the Program is restricted in
|
230 |
+
certain countries either by patents or by copyrighted interfaces, the
|
231 |
+
original copyright holder who places the Program under this License
|
232 |
+
may add an explicit geographical distribution limitation excluding
|
233 |
+
those countries, so that distribution is permitted only in or among
|
234 |
+
countries not thus excluded. In such case, this License incorporates
|
235 |
+
the limitation as if written in the body of this License.
|
236 |
+
|
237 |
+
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
+
of the General Public License from time to time. Such new versions will
|
239 |
+
be similar in spirit to the present version, but may differ in detail to
|
240 |
+
address new problems or concerns.
|
241 |
+
|
242 |
+
Each version is given a distinguishing version number. If the Program
|
243 |
+
specifies a version number of this License which applies to it and "any
|
244 |
+
later version", you have the option of following the terms and conditions
|
245 |
+
either of that version or of any later version published by the Free
|
246 |
+
Software Foundation. If the Program does not specify a version number of
|
247 |
+
this License, you may choose any version ever published by the Free Software
|
248 |
+
Foundation.
|
249 |
+
|
250 |
+
10. If you wish to incorporate parts of the Program into other free
|
251 |
+
programs whose distribution conditions are different, write to the author
|
252 |
+
to ask for permission. For software which is copyrighted by the Free
|
253 |
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
+
make exceptions for this. Our decision will be guided by the two goals
|
255 |
+
of preserving the free status of all derivatives of our free software and
|
256 |
+
of promoting the sharing and reuse of software generally.
|
257 |
+
|
258 |
+
NO WARRANTY
|
259 |
+
|
260 |
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
+
REPAIR OR CORRECTION.
|
269 |
+
|
270 |
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
+
POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
END OF TERMS AND CONDITIONS
|
281 |
+
|
282 |
+
How to Apply These Terms to Your New Programs
|
283 |
+
|
284 |
+
If you develop a new program, and you want it to be of the greatest
|
285 |
+
possible use to the public, the best way to achieve this is to make it
|
286 |
+
free software which everyone can redistribute and change under these terms.
|
287 |
+
|
288 |
+
To do so, attach the following notices to the program. It is safest
|
289 |
+
to attach them to the start of each source file to most effectively
|
290 |
+
convey the exclusion of warranty; and each file should have at least
|
291 |
+
the "copyright" line and a pointer to where the full notice is found.
|
292 |
+
|
293 |
+
<one line to give the program's name and a brief idea of what it does.>
|
294 |
+
Copyright (C) <year> <name of author>
|
295 |
+
|
296 |
+
This program is free software; you can redistribute it and/or modify
|
297 |
+
it under the terms of the GNU General Public License as published by
|
298 |
+
the Free Software Foundation; either version 2 of the License, or
|
299 |
+
(at your option) any later version.
|
300 |
+
|
301 |
+
This program is distributed in the hope that it will be useful,
|
302 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
+
GNU General Public License for more details.
|
305 |
+
|
306 |
+
You should have received a copy of the GNU General Public License along
|
307 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
308 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
309 |
+
|
310 |
+
Also add information on how to contact you by electronic and paper mail.
|
311 |
+
|
312 |
+
If the program is interactive, make it output a short notice like this
|
313 |
+
when it starts in an interactive mode:
|
314 |
+
|
315 |
+
Gnomovision version 69, Copyright (C) year name of author
|
316 |
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
317 |
+
This is free software, and you are welcome to redistribute it
|
318 |
+
under certain conditions; type `show c' for details.
|
319 |
+
|
320 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
321 |
+
parts of the General Public License. Of course, the commands you use may
|
322 |
+
be called something other than `show w' and `show c'; they could even be
|
323 |
+
mouse-clicks or menu items--whatever suits your program.
|
324 |
+
|
325 |
+
You should also get your employer (if you work as a programmer) or your
|
326 |
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
327 |
+
necessary. Here is a sample; alter the names:
|
328 |
+
|
329 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
330 |
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
331 |
+
|
332 |
+
<signature of Ty Coon>, 1 April 1989
|
333 |
+
Ty Coon, President of Vice
|
334 |
+
|
335 |
+
This General Public License does not permit incorporating your program into
|
336 |
+
proprietary programs. If your program is a subroutine library, you may
|
337 |
+
consider it more useful to permit linking proprietary applications with the
|
338 |
+
library. If this is what you want to do, use the GNU Lesser General
|
339 |
Public License instead of this License.
|
admin/class-conversios-admin.php
CHANGED
@@ -1,385 +1,385 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* The admin-specific functionality of the plugin.
|
5 |
-
*
|
6 |
-
* @link tatvic.com
|
7 |
-
* @since 1.0.0
|
8 |
-
*
|
9 |
-
* @package Enhanced_Ecommerce_Google_Analytics
|
10 |
-
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* The admin-specific functionality of the plugin.
|
15 |
-
*
|
16 |
-
* Defines the plugin name, version, and two examples hooks for how to
|
17 |
-
* enqueue the admin-specific stylesheet and JavaScript.
|
18 |
-
*
|
19 |
-
* @package Enhanced_Ecommerce_Google_Analytics
|
20 |
-
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
21 |
-
* @author Tatvic
|
22 |
-
*/
|
23 |
-
if ( ! class_exists( 'Conversios_Admin' ) ) {
|
24 |
-
class Conversios_Admin extends TVC_Admin_Helper {
|
25 |
-
protected $google_detail;
|
26 |
-
protected $url;
|
27 |
-
protected $version;
|
28 |
-
protected $plan_id;
|
29 |
-
public function __construct() {
|
30 |
-
$this->version = PLUGIN_TVC_VERSION;
|
31 |
-
$this->includes();
|
32 |
-
$this->url = $this->get_onboarding_page_url(); // use in setting page
|
33 |
-
$this->google_detail = $this->get_ee_options_data();
|
34 |
-
add_action( 'admin_menu', array( $this, 'add_admin_pages' ) );
|
35 |
-
add_action('admin_init',array($this, 'init'));
|
36 |
-
$this->plan_id = $this->get_plan_id();
|
37 |
-
if( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && $this->plan_id != 1 ) {
|
38 |
-
add_action( 'woocommerce_order_fully_refunded', array($this,'action_woocommerce_order_refunded'),10,2 );
|
39 |
-
add_action( 'woocommerce_order_partially_refunded', array($this,'woocommerce_partial_order_refunded'),10,2 );
|
40 |
-
}
|
41 |
-
}
|
42 |
-
public function includes() {
|
43 |
-
if (!class_exists('Conversios_Header')) {
|
44 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/class-conversios-header.php');
|
45 |
-
}
|
46 |
-
if (!class_exists('Conversios_Footer')) {
|
47 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/class-conversios-footer.php');
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
public function init(){
|
52 |
-
add_action( 'admin_enqueue_scripts', array($this,'enqueue_styles'));
|
53 |
-
add_action( 'admin_enqueue_scripts', array($this,'enqueue_scripts'));
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Woo Full order refund.
|
58 |
-
*
|
59 |
-
* @since 1.0.0
|
60 |
-
*/
|
61 |
-
public function action_woocommerce_order_refunded($order_id, $refund_id) {
|
62 |
-
$data = unserialize(get_option('ee_options'));
|
63 |
-
if (empty($data['ga_eeT']) ||
|
64 |
-
get_post_meta($order_id, "tvc_tracked_refund", true) == 1 || $this->plan_id == 1){
|
65 |
-
return;
|
66 |
-
}
|
67 |
-
$refund = wc_get_order( $refund_id );
|
68 |
-
$value = $refund->get_amount();
|
69 |
-
$query = urlencode( '/refundorders/' );
|
70 |
-
$currency = $this->get_woo_currency();
|
71 |
-
$client_id =mt_rand(1000000000,9999999999).".".time();
|
72 |
-
$ga_id = $data['ga_id'];
|
73 |
-
$total_refunds = 0;
|
74 |
-
if($ga_id){
|
75 |
-
$url = "https://www.google-analytics.com/collect?v=1&t=event&ni=1&cu=".$currency."&ec=Enhanced-Ecommerce&ea=click&el=full_refund&tid=".$ga_id."&cid=".$client_id."&ti=".$order_id."&pa=refund&tr=".$value."&dp=".$query;
|
76 |
-
$request = wp_remote_get(esc_url_raw($url),array( 'timeout' => 1000 ));
|
77 |
-
}
|
78 |
-
$gm_id = sanitize_text_field($data['gm_id']);
|
79 |
-
$api_secret = sanitize_text_field($data['ga4_api_secret']);
|
80 |
-
if($gm_id && $api_secret){
|
81 |
-
$postData = array(
|
82 |
-
"client_id"=> $client_id,
|
83 |
-
"non_personalized_ads" => true,
|
84 |
-
"events" => [array(
|
85 |
-
"name" => "refund",
|
86 |
-
"params" => array(
|
87 |
-
"currency" => $currency,
|
88 |
-
"transaction_id" => $order_id,
|
89 |
-
"value" => $value
|
90 |
-
)
|
91 |
-
)]
|
92 |
-
);
|
93 |
-
$args = array(
|
94 |
-
'method' => 'POST',
|
95 |
-
'body' => wp_json_encode($postData)
|
96 |
-
);
|
97 |
-
$url = "https://www.google-analytics.com/mp/collect?measurement_id=".$gm_id."&api_secret=".$api_secret;
|
98 |
-
$request = wp_remote_post(esc_url_raw($url),$args);
|
99 |
-
}
|
100 |
-
update_post_meta($order_id, "tvc_tracked_refund", 1);
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Woo Partial order refund.
|
105 |
-
*
|
106 |
-
* @since 1.0.0
|
107 |
-
*/
|
108 |
-
public function woocommerce_partial_order_refunded($order_id, $refund_id) {
|
109 |
-
$data = unserialize(get_option('ee_options'));
|
110 |
-
if (empty($data['ga_eeT']) || $this->plan_id == 1){
|
111 |
-
return;
|
112 |
-
}
|
113 |
-
$refund = wc_get_order( $refund_id );
|
114 |
-
$value = $refund->get_amount();
|
115 |
-
$refunded_items = array();
|
116 |
-
$currency = $this->get_woo_currency();
|
117 |
-
$client_id =mt_rand(1000000000,9999999999).".".time();
|
118 |
-
$query_params = array();
|
119 |
-
$i = 1;
|
120 |
-
//GA3
|
121 |
-
$ga_id = $data['ga_id'];
|
122 |
-
if($ga_id){
|
123 |
-
foreach($refund->get_items('line_item') as $item_id=>$item) {
|
124 |
-
$query_params["pr{$i}id"] = $item['product_id'];
|
125 |
-
$query_params["pr{$i}qt"] = abs($item['qty']);
|
126 |
-
$query_params["pr{$i}pr"] = abs($item['total']);
|
127 |
-
$i++;
|
128 |
-
}
|
129 |
-
$param_url = http_build_query( $query_params, '', '&' );
|
130 |
-
$url = "https://www.google-analytics.com/collect?v=1&t=event&ni=1&cu=".$currency."&ec=Enhanced-Ecommerce&ea=Refund&el=partial_refunded&tid=".sanitize_text_field($ga_id)."&cid=".$client_id."&tr=".$value."&ti=".$order_id."&pa=refund&".$param_url;
|
131 |
-
$request = wp_remote_get(esc_url_raw($url),array( 'timeout' => 1000 ));
|
132 |
-
}
|
133 |
-
//GA4
|
134 |
-
$gm_id = sanitize_text_field($data['gm_id']);
|
135 |
-
$api_secret = sanitize_text_field($data['ga4_api_secret']);
|
136 |
-
if($gm_id && $api_secret){
|
137 |
-
$items = array();
|
138 |
-
foreach($refund->get_items('line_item') as $item_id=>$item) {
|
139 |
-
$items[] = array("item_id" => $item['product_id'],"item_name" => $item['name'],"quantity" => abs($item['qty']),"price" => abs($item['total']),"currency" => $currency);
|
140 |
-
}
|
141 |
-
$postData = array(
|
142 |
-
"client_id"=> $client_id,
|
143 |
-
"non_personalized_ads" => true,
|
144 |
-
"events" => [array(
|
145 |
-
"name" => "refund",
|
146 |
-
"params" => array(
|
147 |
-
"items" => $items,
|
148 |
-
"currency" => $currency,
|
149 |
-
"transaction_id" => $order_id,
|
150 |
-
"value" => $value
|
151 |
-
)
|
152 |
-
)]
|
153 |
-
);
|
154 |
-
$args = array(
|
155 |
-
'method' => 'POST',
|
156 |
-
'body' => wp_json_encode($postData)
|
157 |
-
);
|
158 |
-
$url = "https://www.google-analytics.com/mp/collect?measurement_id=".$gm_id."&api_secret=".$api_secret;
|
159 |
-
$request = wp_remote_post(esc_url_raw($url),$args);
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Register the stylesheets for the admin area.
|
165 |
-
*
|
166 |
-
* @since 4.1.4
|
167 |
-
*/
|
168 |
-
public function enqueue_styles() {
|
169 |
-
$screen = get_current_screen();
|
170 |
-
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
171 |
-
//developres hook to custom css
|
172 |
-
do_action('add_conversios_css_'.sanitize_text_field($_GET['page']));
|
173 |
-
//conversios page css
|
174 |
-
if(sanitize_text_field($_GET['page']) == "conversios"){
|
175 |
-
wp_register_style('conversios-slick-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/slick.css') );
|
176 |
-
wp_enqueue_style('conversios-slick-css');
|
177 |
-
wp_register_style('conversios-daterangepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css') );
|
178 |
-
wp_enqueue_style('conversios-daterangepicker-css');
|
179 |
-
}else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
|
180 |
-
wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
|
181 |
-
wp_enqueue_style('tvc-bootstrap-datepicker-css');
|
182 |
-
}
|
183 |
-
//all conversios page css
|
184 |
-
wp_enqueue_style('conversios-style-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/style.css'), array(), esc_attr($this->version), 'all' );
|
185 |
-
wp_enqueue_style('conversios-responsive-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/responsive.css'), array(), esc_attr($this->version), 'all');
|
186 |
-
|
187 |
-
}
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Register the JavaScript for the admin area.
|
192 |
-
*
|
193 |
-
* @since 4.1.4
|
194 |
-
*/
|
195 |
-
public function enqueue_scripts() {
|
196 |
-
$screen = get_current_screen();
|
197 |
-
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
198 |
-
if(sanitize_text_field($_GET['page']) == "conversios"){
|
199 |
-
|
200 |
-
wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
|
201 |
-
wp_enqueue_script( 'conversios-chart-datalabels-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chartjs-plugin-datalabels.js') );
|
202 |
-
wp_enqueue_script( 'conversios-basictable-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.basictable.min.js') );
|
203 |
-
wp_enqueue_script( 'conversios-moment-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/moment.min.js') );
|
204 |
-
wp_enqueue_script( 'conversios-daterangepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/daterangepicker.js') );
|
205 |
-
|
206 |
-
wp_enqueue_script( 'conversios-custom-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
207 |
-
}else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
|
208 |
-
//wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
|
209 |
-
wp_enqueue_script( 'conversios-pmax-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/pmax-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
210 |
-
wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
|
211 |
-
wp_enqueue_script('tvc-bootstrap-datepicker-js');
|
212 |
-
}
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Display Admin Page.
|
218 |
-
*
|
219 |
-
* @since 4.1.4
|
220 |
-
*/
|
221 |
-
public function add_admin_pages() {
|
222 |
-
$google_detail = $this->google_detail;
|
223 |
-
$plan_id = 1;
|
224 |
-
if(isset($google_detail['setting'])){
|
225 |
-
$googleDetail = $google_detail['setting'];
|
226 |
-
if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
|
227 |
-
$plan_id = $googleDetail->plan_id;
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
add_menu_page(
|
232 |
-
esc_html__('Conversios','conversios'), esc_html__('Conversios','conversios'), 'manage_options', "conversios", array($this, 'showPage'), esc_url_raw(plugin_dir_url(__FILE__) . 'images/tatvic_logo.png'), 26
|
233 |
-
);
|
234 |
-
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
235 |
-
require_once( ABSPATH . '/wp-admin/includes/woocommerce.php' );
|
236 |
-
}
|
237 |
-
if ( is_plugin_active_for_network( 'woocommerce/woocommerce.php') || in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
238 |
-
add_submenu_page(
|
239 |
-
'conversios',
|
240 |
-
esc_html__('Dashboard','conversios'),
|
241 |
-
esc_html__('Dashboard','conversios'),
|
242 |
-
'manage_options',
|
243 |
-
'conversios' );
|
244 |
-
add_submenu_page(
|
245 |
-
'conversios',
|
246 |
-
esc_html__('Google Shopping', 'conversios'),
|
247 |
-
esc_html__('Google Shopping', 'conversios'),
|
248 |
-
'manage_options',
|
249 |
-
'conversios-google-shopping-feed',
|
250 |
-
array($this, 'showPage')
|
251 |
-
);
|
252 |
-
add_submenu_page(
|
253 |
-
'conversios',
|
254 |
-
esc_html__('Google Ads', 'conversios'),
|
255 |
-
esc_html__('Google Ads', 'conversios'),
|
256 |
-
'manage_options',
|
257 |
-
'conversios-google-ads',
|
258 |
-
array($this, 'showPage')
|
259 |
-
);
|
260 |
-
add_submenu_page(
|
261 |
-
'conversios',
|
262 |
-
esc_html__('Performance Max', 'conversios'),
|
263 |
-
esc_html__('Performance Max', 'conversios'),
|
264 |
-
'manage_options',
|
265 |
-
'conversios-pmax',
|
266 |
-
array($this, 'showPage')
|
267 |
-
);
|
268 |
-
add_submenu_page(
|
269 |
-
'conversios',
|
270 |
-
esc_html__('Account Settings', 'conversios'),
|
271 |
-
esc_html__('Account Settings', 'conversios'),
|
272 |
-
'manage_options',
|
273 |
-
'conversios-google-analytics',
|
274 |
-
array($this, 'showPage')
|
275 |
-
);
|
276 |
-
|
277 |
-
add_submenu_page(
|
278 |
-
'conversios',
|
279 |
-
esc_html__('Account Summary', 'conversios'),
|
280 |
-
esc_html__('Account Summary', 'conversios'),
|
281 |
-
'manage_options',
|
282 |
-
'conversios-account',
|
283 |
-
array($this, 'showPage')
|
284 |
-
);
|
285 |
-
if($plan_id == 1){
|
286 |
-
add_submenu_page(
|
287 |
-
'conversios',
|
288 |
-
esc_html__('Free Vs Pro', 'conversios'),
|
289 |
-
esc_html__('Free Vs Pro', 'conversios'),
|
290 |
-
'manage_options',
|
291 |
-
'conversios-pricings',
|
292 |
-
array($this, 'showPage')
|
293 |
-
);
|
294 |
-
}
|
295 |
-
}
|
296 |
-
}
|
297 |
-
|
298 |
-
/**
|
299 |
-
* Display page.
|
300 |
-
*
|
301 |
-
* @since 4.1.4
|
302 |
-
*/
|
303 |
-
public function showPage() {
|
304 |
-
do_action('add_conversios_header');
|
305 |
-
if (!empty(sanitize_text_field($_GET['page']))) {
|
306 |
-
$get_action = str_replace("-", "_", sanitize_text_field($_GET['page']));
|
307 |
-
} else {
|
308 |
-
$get_action = "conversios";
|
309 |
-
}
|
310 |
-
if (method_exists($this, $get_action)) {
|
311 |
-
$this->$get_action();
|
312 |
-
}
|
313 |
-
echo $this->get_tvc_popup_message();
|
314 |
-
do_action('add_conversios_footer');
|
315 |
-
}
|
316 |
-
|
317 |
-
public function conversios(){
|
318 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/class-conversios-dashboard.php');
|
319 |
-
}
|
320 |
-
|
321 |
-
public function conversios_pricings(){
|
322 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/pricings.php');
|
323 |
-
new TVC_Pricings();
|
324 |
-
}
|
325 |
-
public function conversios_account(){
|
326 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
327 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/account.php');
|
328 |
-
new TVC_Account();
|
329 |
-
}
|
330 |
-
public function conversios_google_analytics() {
|
331 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
332 |
-
require_once( 'partials/general-fields.php');
|
333 |
-
}
|
334 |
-
public function conversios_google_ads() {
|
335 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
336 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-ads.php');
|
337 |
-
new GoogleAds();
|
338 |
-
}
|
339 |
-
public function conversios_pmax(){
|
340 |
-
$action_tab = (isset($_GET['tab']))?sanitize_text_field($_GET['tab']):"";
|
341 |
-
if($action_tab!=""){
|
342 |
-
$this->$action_tab();
|
343 |
-
}else{
|
344 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax.php');
|
345 |
-
new TVC_PMax();
|
346 |
-
}
|
347 |
-
}
|
348 |
-
public function pmax_add(){
|
349 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax-add.php');
|
350 |
-
new TVC_PMaxAdd();
|
351 |
-
}
|
352 |
-
public function pmax_edit(){
|
353 |
-
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax-edit.php');
|
354 |
-
new TVC_PMaxEdit();
|
355 |
-
}
|
356 |
-
public function conversios_google_shopping_feed() {
|
357 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
358 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed.php');
|
359 |
-
$action_tab = (isset($_GET['tab']))?sanitize_text_field($_GET['tab']):"";
|
360 |
-
if($action_tab!=""){
|
361 |
-
$this->$action_tab();
|
362 |
-
}else{
|
363 |
-
new GoogleShoppingFeed();
|
364 |
-
}
|
365 |
-
}
|
366 |
-
public function gaa_config_page() {
|
367 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-gaa-config.php');
|
368 |
-
new GAAConfiguration();
|
369 |
-
}
|
370 |
-
public function sync_product_page() {
|
371 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-sync-product.php');
|
372 |
-
new SyncProductConfiguration();
|
373 |
-
}
|
374 |
-
public function shopping_campaigns_page() {
|
375 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-shopping-campaigns.php');
|
376 |
-
new CampaignsConfiguration();
|
377 |
-
}
|
378 |
-
public function add_campaign_page() {
|
379 |
-
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/add-campaign.php');
|
380 |
-
new AddCampaign();
|
381 |
-
}
|
382 |
-
|
383 |
-
}
|
384 |
-
}
|
385 |
new Conversios_Admin();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The admin-specific functionality of the plugin.
|
5 |
+
*
|
6 |
+
* @link tatvic.com
|
7 |
+
* @since 1.0.0
|
8 |
+
*
|
9 |
+
* @package Enhanced_Ecommerce_Google_Analytics
|
10 |
+
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
11 |
+
*/
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The admin-specific functionality of the plugin.
|
15 |
+
*
|
16 |
+
* Defines the plugin name, version, and two examples hooks for how to
|
17 |
+
* enqueue the admin-specific stylesheet and JavaScript.
|
18 |
+
*
|
19 |
+
* @package Enhanced_Ecommerce_Google_Analytics
|
20 |
+
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
21 |
+
* @author Tatvic
|
22 |
+
*/
|
23 |
+
if ( ! class_exists( 'Conversios_Admin' ) ) {
|
24 |
+
class Conversios_Admin extends TVC_Admin_Helper {
|
25 |
+
protected $google_detail;
|
26 |
+
protected $url;
|
27 |
+
protected $version;
|
28 |
+
protected $plan_id;
|
29 |
+
public function __construct() {
|
30 |
+
$this->version = PLUGIN_TVC_VERSION;
|
31 |
+
$this->includes();
|
32 |
+
$this->url = $this->get_onboarding_page_url(); // use in setting page
|
33 |
+
$this->google_detail = $this->get_ee_options_data();
|
34 |
+
add_action( 'admin_menu', array( $this, 'add_admin_pages' ) );
|
35 |
+
add_action('admin_init',array($this, 'init'));
|
36 |
+
$this->plan_id = $this->get_plan_id();
|
37 |
+
if( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && $this->plan_id != 1 ) {
|
38 |
+
add_action( 'woocommerce_order_fully_refunded', array($this,'action_woocommerce_order_refunded'),10,2 );
|
39 |
+
add_action( 'woocommerce_order_partially_refunded', array($this,'woocommerce_partial_order_refunded'),10,2 );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
public function includes() {
|
43 |
+
if (!class_exists('Conversios_Header')) {
|
44 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/class-conversios-header.php');
|
45 |
+
}
|
46 |
+
if (!class_exists('Conversios_Footer')) {
|
47 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/class-conversios-footer.php');
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
public function init(){
|
52 |
+
add_action( 'admin_enqueue_scripts', array($this,'enqueue_styles'));
|
53 |
+
add_action( 'admin_enqueue_scripts', array($this,'enqueue_scripts'));
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Woo Full order refund.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
*/
|
61 |
+
public function action_woocommerce_order_refunded($order_id, $refund_id) {
|
62 |
+
$data = unserialize(get_option('ee_options'));
|
63 |
+
if (empty($data['ga_eeT']) ||
|
64 |
+
get_post_meta($order_id, "tvc_tracked_refund", true) == 1 || $this->plan_id == 1){
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
$refund = wc_get_order( $refund_id );
|
68 |
+
$value = $refund->get_amount();
|
69 |
+
$query = urlencode( '/refundorders/' );
|
70 |
+
$currency = $this->get_woo_currency();
|
71 |
+
$client_id =mt_rand(1000000000,9999999999).".".time();
|
72 |
+
$ga_id = $data['ga_id'];
|
73 |
+
$total_refunds = 0;
|
74 |
+
if($ga_id){
|
75 |
+
$url = "https://www.google-analytics.com/collect?v=1&t=event&ni=1&cu=".$currency."&ec=Enhanced-Ecommerce&ea=click&el=full_refund&tid=".$ga_id."&cid=".$client_id."&ti=".$order_id."&pa=refund&tr=".$value."&dp=".$query;
|
76 |
+
$request = wp_remote_get(esc_url_raw($url),array( 'timeout' => 1000 ));
|
77 |
+
}
|
78 |
+
$gm_id = sanitize_text_field($data['gm_id']);
|
79 |
+
$api_secret = sanitize_text_field($data['ga4_api_secret']);
|
80 |
+
if($gm_id && $api_secret){
|
81 |
+
$postData = array(
|
82 |
+
"client_id"=> $client_id,
|
83 |
+
"non_personalized_ads" => true,
|
84 |
+
"events" => [array(
|
85 |
+
"name" => "refund",
|
86 |
+
"params" => array(
|
87 |
+
"currency" => $currency,
|
88 |
+
"transaction_id" => $order_id,
|
89 |
+
"value" => $value
|
90 |
+
)
|
91 |
+
)]
|
92 |
+
);
|
93 |
+
$args = array(
|
94 |
+
'method' => 'POST',
|
95 |
+
'body' => wp_json_encode($postData)
|
96 |
+
);
|
97 |
+
$url = "https://www.google-analytics.com/mp/collect?measurement_id=".$gm_id."&api_secret=".$api_secret;
|
98 |
+
$request = wp_remote_post(esc_url_raw($url),$args);
|
99 |
+
}
|
100 |
+
update_post_meta($order_id, "tvc_tracked_refund", 1);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Woo Partial order refund.
|
105 |
+
*
|
106 |
+
* @since 1.0.0
|
107 |
+
*/
|
108 |
+
public function woocommerce_partial_order_refunded($order_id, $refund_id) {
|
109 |
+
$data = unserialize(get_option('ee_options'));
|
110 |
+
if (empty($data['ga_eeT']) || $this->plan_id == 1){
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
$refund = wc_get_order( $refund_id );
|
114 |
+
$value = $refund->get_amount();
|
115 |
+
$refunded_items = array();
|
116 |
+
$currency = $this->get_woo_currency();
|
117 |
+
$client_id =mt_rand(1000000000,9999999999).".".time();
|
118 |
+
$query_params = array();
|
119 |
+
$i = 1;
|
120 |
+
//GA3
|
121 |
+
$ga_id = $data['ga_id'];
|
122 |
+
if($ga_id){
|
123 |
+
foreach($refund->get_items('line_item') as $item_id=>$item) {
|
124 |
+
$query_params["pr{$i}id"] = $item['product_id'];
|
125 |
+
$query_params["pr{$i}qt"] = abs($item['qty']);
|
126 |
+
$query_params["pr{$i}pr"] = abs($item['total']);
|
127 |
+
$i++;
|
128 |
+
}
|
129 |
+
$param_url = http_build_query( $query_params, '', '&' );
|
130 |
+
$url = "https://www.google-analytics.com/collect?v=1&t=event&ni=1&cu=".$currency."&ec=Enhanced-Ecommerce&ea=Refund&el=partial_refunded&tid=".sanitize_text_field($ga_id)."&cid=".$client_id."&tr=".$value."&ti=".$order_id."&pa=refund&".$param_url;
|
131 |
+
$request = wp_remote_get(esc_url_raw($url),array( 'timeout' => 1000 ));
|
132 |
+
}
|
133 |
+
//GA4
|
134 |
+
$gm_id = sanitize_text_field($data['gm_id']);
|
135 |
+
$api_secret = sanitize_text_field($data['ga4_api_secret']);
|
136 |
+
if($gm_id && $api_secret){
|
137 |
+
$items = array();
|
138 |
+
foreach($refund->get_items('line_item') as $item_id=>$item) {
|
139 |
+
$items[] = array("item_id" => $item['product_id'],"item_name" => $item['name'],"quantity" => abs($item['qty']),"price" => abs($item['total']),"currency" => $currency);
|
140 |
+
}
|
141 |
+
$postData = array(
|
142 |
+
"client_id"=> $client_id,
|
143 |
+
"non_personalized_ads" => true,
|
144 |
+
"events" => [array(
|
145 |
+
"name" => "refund",
|
146 |
+
"params" => array(
|
147 |
+
"items" => $items,
|
148 |
+
"currency" => $currency,
|
149 |
+
"transaction_id" => $order_id,
|
150 |
+
"value" => $value
|
151 |
+
)
|
152 |
+
)]
|
153 |
+
);
|
154 |
+
$args = array(
|
155 |
+
'method' => 'POST',
|
156 |
+
'body' => wp_json_encode($postData)
|
157 |
+
);
|
158 |
+
$url = "https://www.google-analytics.com/mp/collect?measurement_id=".$gm_id."&api_secret=".$api_secret;
|
159 |
+
$request = wp_remote_post(esc_url_raw($url),$args);
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Register the stylesheets for the admin area.
|
165 |
+
*
|
166 |
+
* @since 4.1.4
|
167 |
+
*/
|
168 |
+
public function enqueue_styles() {
|
169 |
+
$screen = get_current_screen();
|
170 |
+
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
171 |
+
//developres hook to custom css
|
172 |
+
do_action('add_conversios_css_'.sanitize_text_field($_GET['page']));
|
173 |
+
//conversios page css
|
174 |
+
if(sanitize_text_field($_GET['page']) == "conversios"){
|
175 |
+
wp_register_style('conversios-slick-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/slick.css') );
|
176 |
+
wp_enqueue_style('conversios-slick-css');
|
177 |
+
wp_register_style('conversios-daterangepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css') );
|
178 |
+
wp_enqueue_style('conversios-daterangepicker-css');
|
179 |
+
}else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
|
180 |
+
wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
|
181 |
+
wp_enqueue_style('tvc-bootstrap-datepicker-css');
|
182 |
+
}
|
183 |
+
//all conversios page css
|
184 |
+
wp_enqueue_style('conversios-style-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/style.css'), array(), esc_attr($this->version), 'all' );
|
185 |
+
wp_enqueue_style('conversios-responsive-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/responsive.css'), array(), esc_attr($this->version), 'all');
|
186 |
+
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Register the JavaScript for the admin area.
|
192 |
+
*
|
193 |
+
* @since 4.1.4
|
194 |
+
*/
|
195 |
+
public function enqueue_scripts() {
|
196 |
+
$screen = get_current_screen();
|
197 |
+
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
198 |
+
if(sanitize_text_field($_GET['page']) == "conversios"){
|
199 |
+
|
200 |
+
wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
|
201 |
+
wp_enqueue_script( 'conversios-chart-datalabels-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chartjs-plugin-datalabels.js') );
|
202 |
+
wp_enqueue_script( 'conversios-basictable-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.basictable.min.js') );
|
203 |
+
wp_enqueue_script( 'conversios-moment-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/moment.min.js') );
|
204 |
+
wp_enqueue_script( 'conversios-daterangepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/daterangepicker.js') );
|
205 |
+
|
206 |
+
wp_enqueue_script( 'conversios-custom-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
207 |
+
}else if(sanitize_text_field($_GET['page']) == "conversios-pmax"){
|
208 |
+
//wp_enqueue_script( 'conversios-chart-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
|
209 |
+
wp_enqueue_script( 'conversios-pmax-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/pmax-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
210 |
+
wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
|
211 |
+
wp_enqueue_script('tvc-bootstrap-datepicker-js');
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Display Admin Page.
|
218 |
+
*
|
219 |
+
* @since 4.1.4
|
220 |
+
*/
|
221 |
+
public function add_admin_pages() {
|
222 |
+
$google_detail = $this->google_detail;
|
223 |
+
$plan_id = 1;
|
224 |
+
if(isset($google_detail['setting'])){
|
225 |
+
$googleDetail = $google_detail['setting'];
|
226 |
+
if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
|
227 |
+
$plan_id = $googleDetail->plan_id;
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
add_menu_page(
|
232 |
+
esc_html__('Conversios','conversios'), esc_html__('Conversios','conversios'), 'manage_options', "conversios", array($this, 'showPage'), esc_url_raw(plugin_dir_url(__FILE__) . 'images/tatvic_logo.png'), 26
|
233 |
+
);
|
234 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
235 |
+
require_once( ABSPATH . '/wp-admin/includes/woocommerce.php' );
|
236 |
+
}
|
237 |
+
if ( is_plugin_active_for_network( 'woocommerce/woocommerce.php') || in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
|
238 |
+
add_submenu_page(
|
239 |
+
'conversios',
|
240 |
+
esc_html__('Dashboard','conversios'),
|
241 |
+
esc_html__('Dashboard','conversios'),
|
242 |
+
'manage_options',
|
243 |
+
'conversios' );
|
244 |
+
add_submenu_page(
|
245 |
+
'conversios',
|
246 |
+
esc_html__('Google Shopping', 'conversios'),
|
247 |
+
esc_html__('Google Shopping', 'conversios'),
|
248 |
+
'manage_options',
|
249 |
+
'conversios-google-shopping-feed',
|
250 |
+
array($this, 'showPage')
|
251 |
+
);
|
252 |
+
add_submenu_page(
|
253 |
+
'conversios',
|
254 |
+
esc_html__('Google Ads', 'conversios'),
|
255 |
+
esc_html__('Google Ads', 'conversios'),
|
256 |
+
'manage_options',
|
257 |
+
'conversios-google-ads',
|
258 |
+
array($this, 'showPage')
|
259 |
+
);
|
260 |
+
add_submenu_page(
|
261 |
+
'conversios',
|
262 |
+
esc_html__('Performance Max', 'conversios'),
|
263 |
+
esc_html__('Performance Max', 'conversios'),
|
264 |
+
'manage_options',
|
265 |
+
'conversios-pmax',
|
266 |
+
array($this, 'showPage')
|
267 |
+
);
|
268 |
+
add_submenu_page(
|
269 |
+
'conversios',
|
270 |
+
esc_html__('Account Settings', 'conversios'),
|
271 |
+
esc_html__('Account Settings', 'conversios'),
|
272 |
+
'manage_options',
|
273 |
+
'conversios-google-analytics',
|
274 |
+
array($this, 'showPage')
|
275 |
+
);
|
276 |
+
|
277 |
+
add_submenu_page(
|
278 |
+
'conversios',
|
279 |
+
esc_html__('Account Summary', 'conversios'),
|
280 |
+
esc_html__('Account Summary', 'conversios'),
|
281 |
+
'manage_options',
|
282 |
+
'conversios-account',
|
283 |
+
array($this, 'showPage')
|
284 |
+
);
|
285 |
+
if($plan_id == 1){
|
286 |
+
add_submenu_page(
|
287 |
+
'conversios',
|
288 |
+
esc_html__('Free Vs Pro', 'conversios'),
|
289 |
+
esc_html__('Free Vs Pro', 'conversios'),
|
290 |
+
'manage_options',
|
291 |
+
'conversios-pricings',
|
292 |
+
array($this, 'showPage')
|
293 |
+
);
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Display page.
|
300 |
+
*
|
301 |
+
* @since 4.1.4
|
302 |
+
*/
|
303 |
+
public function showPage() {
|
304 |
+
do_action('add_conversios_header');
|
305 |
+
if (!empty(sanitize_text_field($_GET['page']))) {
|
306 |
+
$get_action = str_replace("-", "_", sanitize_text_field($_GET['page']));
|
307 |
+
} else {
|
308 |
+
$get_action = "conversios";
|
309 |
+
}
|
310 |
+
if (method_exists($this, $get_action)) {
|
311 |
+
$this->$get_action();
|
312 |
+
}
|
313 |
+
echo $this->get_tvc_popup_message();
|
314 |
+
do_action('add_conversios_footer');
|
315 |
+
}
|
316 |
+
|
317 |
+
public function conversios(){
|
318 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/class-conversios-dashboard.php');
|
319 |
+
}
|
320 |
+
|
321 |
+
public function conversios_pricings(){
|
322 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'admin/partials/pricings.php');
|
323 |
+
new TVC_Pricings();
|
324 |
+
}
|
325 |
+
public function conversios_account(){
|
326 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
327 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/account.php');
|
328 |
+
new TVC_Account();
|
329 |
+
}
|
330 |
+
public function conversios_google_analytics() {
|
331 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
332 |
+
require_once( 'partials/general-fields.php');
|
333 |
+
}
|
334 |
+
public function conversios_google_ads() {
|
335 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
336 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-ads.php');
|
337 |
+
new GoogleAds();
|
338 |
+
}
|
339 |
+
public function conversios_pmax(){
|
340 |
+
$action_tab = (isset($_GET['tab']))?sanitize_text_field($_GET['tab']):"";
|
341 |
+
if($action_tab!=""){
|
342 |
+
$this->$action_tab();
|
343 |
+
}else{
|
344 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax.php');
|
345 |
+
new TVC_PMax();
|
346 |
+
}
|
347 |
+
}
|
348 |
+
public function pmax_add(){
|
349 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax-add.php');
|
350 |
+
new TVC_PMaxAdd();
|
351 |
+
}
|
352 |
+
public function pmax_edit(){
|
353 |
+
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/pmax-edit.php');
|
354 |
+
new TVC_PMaxEdit();
|
355 |
+
}
|
356 |
+
public function conversios_google_shopping_feed() {
|
357 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
|
358 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed.php');
|
359 |
+
$action_tab = (isset($_GET['tab']))?sanitize_text_field($_GET['tab']):"";
|
360 |
+
if($action_tab!=""){
|
361 |
+
$this->$action_tab();
|
362 |
+
}else{
|
363 |
+
new GoogleShoppingFeed();
|
364 |
+
}
|
365 |
+
}
|
366 |
+
public function gaa_config_page() {
|
367 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-gaa-config.php');
|
368 |
+
new GAAConfiguration();
|
369 |
+
}
|
370 |
+
public function sync_product_page() {
|
371 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-sync-product.php');
|
372 |
+
new SyncProductConfiguration();
|
373 |
+
}
|
374 |
+
public function shopping_campaigns_page() {
|
375 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-shopping-campaigns.php');
|
376 |
+
new CampaignsConfiguration();
|
377 |
+
}
|
378 |
+
public function add_campaign_page() {
|
379 |
+
include(ENHANCAD_PLUGIN_DIR . 'includes/setup/add-campaign.php');
|
380 |
+
new AddCampaign();
|
381 |
+
}
|
382 |
+
|
383 |
+
}
|
384 |
+
}
|
385 |
new Conversios_Admin();
|
admin/class-conversios-onboarding.php
CHANGED
@@ -115,6 +115,13 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
115 |
$this->TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
|
116 |
|
117 |
$this->is_refresh_token_expire = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
}
|
120 |
|
@@ -534,6 +541,15 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
534 |
<li><a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" href=""><?php esc_html_e("FAQ","conversios"); ?></a></li>
|
535 |
</ul>
|
536 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
</div>
|
538 |
</div>
|
539 |
<!-- onborading right panel over -->
|
@@ -885,13 +901,16 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
885 |
success: function (response) {
|
886 |
//console.log(response);
|
887 |
if (response.error === false) {
|
|
|
888 |
//console.log(response.return_url);
|
889 |
if(response.return_url){
|
890 |
location.replace( response.return_url);
|
891 |
}else{
|
892 |
location.replace( "admin.php?page=conversios-google-analytics");
|
893 |
-
}
|
|
|
894 |
}else{
|
|
|
895 |
loaderSection(false);
|
896 |
}
|
897 |
}
|
@@ -924,9 +943,11 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
|
|
924 |
location.replace( "admin.php?page=conversios");
|
925 |
}else{
|
926 |
location.replace( "admin.php?page=conversios-google-analytics");
|
927 |
-
}
|
|
|
928 |
}else{
|
929 |
loaderSection(false);
|
|
|
930 |
}
|
931 |
}
|
932 |
});
|
115 |
$this->TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
|
116 |
|
117 |
$this->is_refresh_token_expire = false;
|
118 |
+
?>
|
119 |
+
<script type="text/javascript">
|
120 |
+
jQuery(document).ready(function () {
|
121 |
+
user_tracking_data('sign_in', 'null' ,'conversios_onboarding','Google_Sing_in');
|
122 |
+
});
|
123 |
+
</script>
|
124 |
+
<?php
|
125 |
}
|
126 |
}
|
127 |
|
541 |
<li><a target="_blank" href="<?php echo esc_url_raw("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" href=""><?php esc_html_e("FAQ","conversios"); ?></a></li>
|
542 |
</ul>
|
543 |
</div>
|
544 |
+
<div class="onbrdr-msg">
|
545 |
+
<ul>
|
546 |
+
<li><?php esc_html_e('Not able to connect with any of the google accounts, reach out to us ','conversios'); ?>
|
547 |
+
<a class="contct-lnk" target="_blank" href="<?php echo esc_url_raw("https://conversios.io/contact-us/?utm_source=app_woo&utm_medium=inapp&utm_campaign=pro_contact"); ?>" href=""><?php esc_html_e("here.","conversios"); ?>
|
548 |
+
</a>
|
549 |
+
</li>
|
550 |
+
</ul>
|
551 |
+
</div>
|
552 |
+
</div>
|
553 |
</div>
|
554 |
</div>
|
555 |
<!-- onborading right panel over -->
|
901 |
success: function (response) {
|
902 |
//console.log(response);
|
903 |
if (response.error === false) {
|
904 |
+
var error_msg = 'null';
|
905 |
//console.log(response.return_url);
|
906 |
if(response.return_url){
|
907 |
location.replace( response.return_url);
|
908 |
}else{
|
909 |
location.replace( "admin.php?page=conversios-google-analytics");
|
910 |
+
}
|
911 |
+
user_tracking_data('complate_onboard', error_msg,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
912 |
}else{
|
913 |
+
user_tracking_data('complate_onboard', response.errors,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
914 |
loaderSection(false);
|
915 |
}
|
916 |
}
|
943 |
location.replace( "admin.php?page=conversios");
|
944 |
}else{
|
945 |
location.replace( "admin.php?page=conversios-google-analytics");
|
946 |
+
}
|
947 |
+
user_tracking_data('complate_onboard', response.errors,'conversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
948 |
}else{
|
949 |
loaderSection(false);
|
950 |
+
user_tracking_data('complate_onboard', 'null','cnversios_onboarding','Confirm_to_Finish_the_Onboarding_process');
|
951 |
}
|
952 |
}
|
953 |
});
|
admin/class-enhanced-ecommerce-google-analytics-admin.php
CHANGED
@@ -1,211 +1,211 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The admin-specific functionality of the plugin.
|
4 |
-
*
|
5 |
-
* @link tatvic.com
|
6 |
-
* @since 1.0.0
|
7 |
-
*
|
8 |
-
* @package Enhanced_Ecommerce_Google_Analytics
|
9 |
-
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
10 |
-
* @author Tatvic
|
11 |
-
*/
|
12 |
-
|
13 |
-
class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* The ID of this plugin.
|
17 |
-
*
|
18 |
-
* @since 1.0.0
|
19 |
-
* @access private
|
20 |
-
* @var string $plugin_name The ID of this plugin.
|
21 |
-
*/
|
22 |
-
private $plugin_name;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* The version of this plugin.
|
26 |
-
*
|
27 |
-
* @since 1.0.0
|
28 |
-
* @access private
|
29 |
-
* @var string $version The current version of this plugin.
|
30 |
-
*/
|
31 |
-
private $version;
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Initialize the class and set its properties.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
* @param string $plugin_name The name of this plugin.
|
38 |
-
* @param string $version The version of this plugin.
|
39 |
-
*/
|
40 |
-
protected $ga_id;
|
41 |
-
protected $ga_LC;
|
42 |
-
protected $ga_eeT;
|
43 |
-
protected $site_url;
|
44 |
-
protected $pro_plan_site;
|
45 |
-
protected $google_detail;
|
46 |
-
public function __construct($plugin_name, $version) {
|
47 |
-
$this->plugin_name = $plugin_name;
|
48 |
-
$this->version = $version;
|
49 |
-
$this->google_detail = $this->get_ee_options_data();
|
50 |
-
}
|
51 |
-
public function tvc_admin_notice(){
|
52 |
-
// add fixed message notification
|
53 |
-
//$this->add_tvc_fixed_nofification();
|
54 |
-
$ee_settings = unserialize(get_option('ee_options'));
|
55 |
-
$ee_additional_data = $this->get_ee_additional_data();
|
56 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_a']) && $ee_additional_data['dismissed_ee_adimin_notic_a'] == 1){
|
57 |
-
}else{
|
58 |
-
if(!$this->get_subscriptionId()){
|
59 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_a">
|
60 |
-
<p>'. esc_html__("Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("CONFIGURE NOW","conversios").'</u></b></a></p>
|
61 |
-
</div>';
|
62 |
-
}
|
63 |
-
}
|
64 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_b']) && $ee_additional_data['dismissed_ee_adimin_notic_b'] == 1){
|
65 |
-
}else{
|
66 |
-
$google_detail = $this->get_ee_options_data();
|
67 |
-
if(isset($google_detail['setting']) && $google_detail['setting']){
|
68 |
-
$googleDetail = $google_detail['setting'];
|
69 |
-
if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
|
70 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_b">
|
71 |
-
<p>'. esc_html__("Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("Automate now","conversios").'</u></b></a></p>
|
72 |
-
</div>';
|
73 |
-
|
74 |
-
}
|
75 |
-
}
|
76 |
-
}
|
77 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
|
78 |
-
}else{
|
79 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_c">
|
80 |
-
<p>'. esc_html__("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("View it from here.","conversios").'</u></b></a></p>
|
81 |
-
</div>';
|
82 |
-
|
83 |
-
}
|
84 |
-
$fb_pixel_id = isset($ee_settings['fb_pixel_id'])?$ee_settings['fb_pixel_id']:"";
|
85 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1){
|
86 |
-
|
87 |
-
}else{
|
88 |
-
|
89 |
-
if($fb_pixel_id == ""){
|
90 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_d">
|
91 |
-
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/fb-pixel.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Introducing the all-new Facebook Pixel Tracking in Conversios today!","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios-google-analytics#fb_pixel_id').'"><b><u>'. esc_html__(" Check it out for yourself.","conversios").'</u></b></a></p>
|
92 |
-
</div>';
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_e']) && $ee_additional_data['dismissed_ee_adimin_notic_e'] == 1){
|
97 |
-
}else if(( isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1) || $fb_pixel_id != ""){
|
98 |
-
$gm_id = isset($ee_settings['gm_id'])?$ee_settings['gm_id']:"";
|
99 |
-
if($gm_id != ""){
|
100 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_e">
|
101 |
-
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/icon-dashboard.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Your GA4 Dashboard is just a click away !","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios&ga_type=ga4').'"><b><u>'. esc_html__(" Go to GA4 Dashboard.","conversios").'</u></b></a></p>
|
102 |
-
</div>';
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
if(isset($ee_additional_data['dismissed_ee_adimin_notic_f']) && $ee_additional_data['dismissed_ee_adimin_notic_f'] == 1){
|
107 |
-
}else {
|
108 |
-
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_f"><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Grow your business with Performance Max Campaigns. You can create a campaign through our plugin with just a few clicks, and promote products across Google Platforms,","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios-pmax').'"><b><u>'. esc_html__(" Try now.","conversios").'</u></b></a></p>
|
109 |
-
</div>';
|
110 |
-
|
111 |
-
}
|
112 |
-
?>
|
113 |
-
<script>
|
114 |
-
var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
|
115 |
-
(function( $ ) {
|
116 |
-
jQuery( function() {
|
117 |
-
jQuery( '.notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
|
118 |
-
var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
|
119 |
-
jQuery.post(tvc_ajax_url,{
|
120 |
-
action: "tvc_call_notice_dismiss",
|
121 |
-
data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
|
122 |
-
dataType: "json"
|
123 |
-
},function( response ){
|
124 |
-
});
|
125 |
-
});
|
126 |
-
});
|
127 |
-
})( jQuery );
|
128 |
-
</script>
|
129 |
-
<?php
|
130 |
-
}
|
131 |
-
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Register the stylesheets for the admin area.
|
135 |
-
*
|
136 |
-
* @since 1.0.0
|
137 |
-
*/
|
138 |
-
public function enqueue_styles() {
|
139 |
-
$screen = get_current_screen();
|
140 |
-
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
141 |
-
if(sanitize_text_field($_GET['page']) == "conversios_onboarding"){
|
142 |
-
return;
|
143 |
-
}
|
144 |
-
if(is_rtl()){
|
145 |
-
wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.rtl.min.css') );
|
146 |
-
}else{
|
147 |
-
wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css') );
|
148 |
-
}
|
149 |
-
wp_enqueue_style('plugin-bootstrap');
|
150 |
-
wp_enqueue_style('custom-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css'), array(), esc_attr($this->version), 'all' );
|
151 |
-
//if(is_rtl()){ }
|
152 |
-
if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
|
153 |
-
wp_register_style('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/select2.css') );
|
154 |
-
wp_enqueue_style('plugin-select2');
|
155 |
-
wp_register_style('plugin-steps', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.css'));
|
156 |
-
wp_enqueue_style('plugin-steps');
|
157 |
-
wp_register_style('tvc-dataTables-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/dataTables.bootstrap5.min.css'));
|
158 |
-
wp_enqueue_style('tvc-dataTables-css');
|
159 |
-
}else if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
|
160 |
-
|
161 |
-
wp_register_style('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/select2.css') );
|
162 |
-
wp_enqueue_style('plugin-select2');
|
163 |
-
wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
|
164 |
-
wp_enqueue_style('tvc-bootstrap-datepicker-css');
|
165 |
-
}
|
166 |
-
wp_enqueue_style(esc_attr($this->plugin_name), esc_url_raw(plugin_dir_url(__FILE__) . 'css/enhanced-ecommerce-google-analytics-admin.css'), array(), esc_attr($this->version), 'all');
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Register the JavaScript for the admin area.
|
172 |
-
*
|
173 |
-
* @since 1.0.0
|
174 |
-
*/
|
175 |
-
public function enqueue_scripts() {
|
176 |
-
$screen = get_current_screen();
|
177 |
-
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
178 |
-
if(sanitize_text_field($_GET['page']) == "conversios_onboarding"){
|
179 |
-
return;
|
180 |
-
}
|
181 |
-
|
182 |
-
wp_register_script('popper_bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/js/popper.min.js') );
|
183 |
-
wp_enqueue_script('popper_bootstrap');
|
184 |
-
wp_register_script('atvc_bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/js/bootstrap.min.js') );
|
185 |
-
wp_enqueue_script('atvc_bootstrap');
|
186 |
-
|
187 |
-
wp_enqueue_script( 'tvc-ee-custom-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
188 |
-
|
189 |
-
wp_enqueue_script( 'tvc-ee-slick-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/slick.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
190 |
-
|
191 |
-
if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
|
192 |
-
wp_register_script('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/select2.min.js') );
|
193 |
-
wp_enqueue_script('plugin-select2');
|
194 |
-
wp_register_script('plugin-step-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.js') );
|
195 |
-
wp_enqueue_script('plugin-step-js');
|
196 |
-
}
|
197 |
-
if($this->is_current_tab_in(array('sync_product_page'))){
|
198 |
-
wp_enqueue_script( 'tvc-ee-dataTables-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.dataTables.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
199 |
-
wp_enqueue_script( 'tvc-ee-dataTables-v5-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/dataTables.bootstrap5.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
200 |
-
}
|
201 |
-
if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
|
202 |
-
wp_register_script('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/select2.min.js') );
|
203 |
-
wp_enqueue_script('plugin-select2');
|
204 |
-
wp_register_script('plugin-chart', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js'));
|
205 |
-
wp_enqueue_script('plugin-chart');
|
206 |
-
wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
|
207 |
-
wp_enqueue_script('tvc-bootstrap-datepicker-js');
|
208 |
-
}
|
209 |
-
}
|
210 |
-
}
|
211 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The admin-specific functionality of the plugin.
|
4 |
+
*
|
5 |
+
* @link tatvic.com
|
6 |
+
* @since 1.0.0
|
7 |
+
*
|
8 |
+
* @package Enhanced_Ecommerce_Google_Analytics
|
9 |
+
* @subpackage Enhanced_Ecommerce_Google_Analytics/admin
|
10 |
+
* @author Tatvic
|
11 |
+
*/
|
12 |
+
|
13 |
+
class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* The ID of this plugin.
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
* @access private
|
20 |
+
* @var string $plugin_name The ID of this plugin.
|
21 |
+
*/
|
22 |
+
private $plugin_name;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The version of this plugin.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @access private
|
29 |
+
* @var string $version The current version of this plugin.
|
30 |
+
*/
|
31 |
+
private $version;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Initialize the class and set its properties.
|
35 |
+
*
|
36 |
+
* @since 1.0.0
|
37 |
+
* @param string $plugin_name The name of this plugin.
|
38 |
+
* @param string $version The version of this plugin.
|
39 |
+
*/
|
40 |
+
protected $ga_id;
|
41 |
+
protected $ga_LC;
|
42 |
+
protected $ga_eeT;
|
43 |
+
protected $site_url;
|
44 |
+
protected $pro_plan_site;
|
45 |
+
protected $google_detail;
|
46 |
+
public function __construct($plugin_name, $version) {
|
47 |
+
$this->plugin_name = $plugin_name;
|
48 |
+
$this->version = $version;
|
49 |
+
$this->google_detail = $this->get_ee_options_data();
|
50 |
+
}
|
51 |
+
public function tvc_admin_notice(){
|
52 |
+
// add fixed message notification
|
53 |
+
//$this->add_tvc_fixed_nofification();
|
54 |
+
$ee_settings = unserialize(get_option('ee_options'));
|
55 |
+
$ee_additional_data = $this->get_ee_additional_data();
|
56 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_a']) && $ee_additional_data['dismissed_ee_adimin_notic_a'] == 1){
|
57 |
+
}else{
|
58 |
+
if(!$this->get_subscriptionId()){
|
59 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_a">
|
60 |
+
<p>'. esc_html__("Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("CONFIGURE NOW","conversios").'</u></b></a></p>
|
61 |
+
</div>';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_b']) && $ee_additional_data['dismissed_ee_adimin_notic_b'] == 1){
|
65 |
+
}else{
|
66 |
+
$google_detail = $this->get_ee_options_data();
|
67 |
+
if(isset($google_detail['setting']) && $google_detail['setting']){
|
68 |
+
$googleDetail = $google_detail['setting'];
|
69 |
+
if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
|
70 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_b">
|
71 |
+
<p>'. esc_html__("Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("Automate now","conversios").'</u></b></a></p>
|
72 |
+
</div>';
|
73 |
+
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
|
78 |
+
}else{
|
79 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_c">
|
80 |
+
<p>'. esc_html__("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios').'"><b><u>'. esc_html__("View it from here.","conversios").'</u></b></a></p>
|
81 |
+
</div>';
|
82 |
+
|
83 |
+
}
|
84 |
+
$fb_pixel_id = isset($ee_settings['fb_pixel_id'])?$ee_settings['fb_pixel_id']:"";
|
85 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1){
|
86 |
+
|
87 |
+
}else{
|
88 |
+
|
89 |
+
if($fb_pixel_id == ""){
|
90 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_d">
|
91 |
+
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/fb-pixel.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Introducing the all-new Facebook Pixel Tracking in Conversios today!","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios-google-analytics#fb_pixel_id').'"><b><u>'. esc_html__(" Check it out for yourself.","conversios").'</u></b></a></p>
|
92 |
+
</div>';
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_e']) && $ee_additional_data['dismissed_ee_adimin_notic_e'] == 1){
|
97 |
+
}else if(( isset($ee_additional_data['dismissed_ee_adimin_notic_d']) && $ee_additional_data['dismissed_ee_adimin_notic_d'] == 1) || $fb_pixel_id != ""){
|
98 |
+
$gm_id = isset($ee_settings['gm_id'])?$ee_settings['gm_id']:"";
|
99 |
+
if($gm_id != ""){
|
100 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_e">
|
101 |
+
<img style="float: left; height: 45px;" src="'.esc_url_raw(ENHANCAD_PLUGIN_URL . "/admin/images/icon-dashboard.jpg").'" ><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Your GA4 Dashboard is just a click away !","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios&ga_type=ga4').'"><b><u>'. esc_html__(" Go to GA4 Dashboard.","conversios").'</u></b></a></p>
|
102 |
+
</div>';
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
if(isset($ee_additional_data['dismissed_ee_adimin_notic_f']) && $ee_additional_data['dismissed_ee_adimin_notic_f'] == 1){
|
107 |
+
}else {
|
108 |
+
echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_f"><p style="line-height: 28px; margin-left: 5px; display: inline-block;">'. esc_html__("Grow your business with Performance Max Campaigns. You can create a campaign through our plugin with just a few clicks, and promote products across Google Platforms,","conversios").' <a href="'.esc_url_raw('admin.php?page=conversios-pmax').'"><b><u>'. esc_html__(" Try now.","conversios").'</u></b></a></p>
|
109 |
+
</div>';
|
110 |
+
|
111 |
+
}
|
112 |
+
?>
|
113 |
+
<script>
|
114 |
+
var tvc_ajax_url = '<?php echo esc_url_raw(admin_url( 'admin-ajax.php' )); ?>';
|
115 |
+
(function( $ ) {
|
116 |
+
jQuery( function() {
|
117 |
+
jQuery( '.notice' ).on( 'click', '.notice-dismiss', function( event, el ) {
|
118 |
+
var ee_notice_dismiss_id = jQuery(this).parent('.is-dismissible').attr("data-id");
|
119 |
+
jQuery.post(tvc_ajax_url,{
|
120 |
+
action: "tvc_call_notice_dismiss",
|
121 |
+
data:{ee_notice_dismiss_id:ee_notice_dismiss_id},
|
122 |
+
dataType: "json"
|
123 |
+
},function( response ){
|
124 |
+
});
|
125 |
+
});
|
126 |
+
});
|
127 |
+
})( jQuery );
|
128 |
+
</script>
|
129 |
+
<?php
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Register the stylesheets for the admin area.
|
135 |
+
*
|
136 |
+
* @since 1.0.0
|
137 |
+
*/
|
138 |
+
public function enqueue_styles() {
|
139 |
+
$screen = get_current_screen();
|
140 |
+
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
141 |
+
if(sanitize_text_field($_GET['page']) == "conversios_onboarding"){
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
if(is_rtl()){
|
145 |
+
wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.rtl.min.css') );
|
146 |
+
}else{
|
147 |
+
wp_register_style('plugin-bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css') );
|
148 |
+
}
|
149 |
+
wp_enqueue_style('plugin-bootstrap');
|
150 |
+
wp_enqueue_style('custom-css', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css'), array(), esc_attr($this->version), 'all' );
|
151 |
+
//if(is_rtl()){ }
|
152 |
+
if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
|
153 |
+
wp_register_style('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/select2.css') );
|
154 |
+
wp_enqueue_style('plugin-select2');
|
155 |
+
wp_register_style('plugin-steps', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.css'));
|
156 |
+
wp_enqueue_style('plugin-steps');
|
157 |
+
wp_register_style('tvc-dataTables-css', esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/css/dataTables.bootstrap5.min.css'));
|
158 |
+
wp_enqueue_style('tvc-dataTables-css');
|
159 |
+
}else if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
|
160 |
+
|
161 |
+
wp_register_style('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/css/select2.css') );
|
162 |
+
wp_enqueue_style('plugin-select2');
|
163 |
+
wp_register_style('tvc-bootstrap-datepicker-css', esc_url_raw(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
|
164 |
+
wp_enqueue_style('tvc-bootstrap-datepicker-css');
|
165 |
+
}
|
166 |
+
wp_enqueue_style(esc_attr($this->plugin_name), esc_url_raw(plugin_dir_url(__FILE__) . 'css/enhanced-ecommerce-google-analytics-admin.css'), array(), esc_attr($this->version), 'all');
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Register the JavaScript for the admin area.
|
172 |
+
*
|
173 |
+
* @since 1.0.0
|
174 |
+
*/
|
175 |
+
public function enqueue_scripts() {
|
176 |
+
$screen = get_current_screen();
|
177 |
+
if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos(sanitize_text_field($_GET['page']), 'conversios') !== false) ) {
|
178 |
+
if(sanitize_text_field($_GET['page']) == "conversios_onboarding"){
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
|
182 |
+
wp_register_script('popper_bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/js/popper.min.js') );
|
183 |
+
wp_enqueue_script('popper_bootstrap');
|
184 |
+
wp_register_script('atvc_bootstrap', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/js/bootstrap.min.js') );
|
185 |
+
wp_enqueue_script('atvc_bootstrap');
|
186 |
+
|
187 |
+
wp_enqueue_script( 'tvc-ee-custom-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), esc_attr($this->version), false );
|
188 |
+
|
189 |
+
wp_enqueue_script( 'tvc-ee-slick-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/slick.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
190 |
+
|
191 |
+
if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
|
192 |
+
wp_register_script('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/select2.min.js') );
|
193 |
+
wp_enqueue_script('plugin-select2');
|
194 |
+
wp_register_script('plugin-step-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.js') );
|
195 |
+
wp_enqueue_script('plugin-step-js');
|
196 |
+
}
|
197 |
+
if($this->is_current_tab_in(array('sync_product_page'))){
|
198 |
+
wp_enqueue_script( 'tvc-ee-dataTables-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.dataTables.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
199 |
+
wp_enqueue_script( 'tvc-ee-dataTables-v5-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/dataTables.bootstrap5.min.js'), array( 'jquery' ), esc_attr($this->version), false );
|
200 |
+
}
|
201 |
+
if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
|
202 |
+
wp_register_script('plugin-select2', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/select2.min.js') );
|
203 |
+
wp_enqueue_script('plugin-select2');
|
204 |
+
wp_register_script('plugin-chart', esc_url_raw(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js'));
|
205 |
+
wp_enqueue_script('plugin-chart');
|
206 |
+
wp_register_script('tvc-bootstrap-datepicker-js', esc_url_raw(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
|
207 |
+
wp_enqueue_script('tvc-bootstrap-datepicker-js');
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
admin/css/custom-style.css
CHANGED
@@ -1,2976 +1,2976 @@
|
|
1 |
-
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap");
|
2 |
-
html,
|
3 |
-
body {
|
4 |
-
height: 100%;
|
5 |
-
}
|
6 |
-
|
7 |
-
body {
|
8 |
-
margin: 0;
|
9 |
-
padding: 0;
|
10 |
-
-webkit-font-smoothing: antialiased;
|
11 |
-
-moz-osx-font-smoothing: grayscale;
|
12 |
-
font-size: 14px;
|
13 |
-
color: #25283D;
|
14 |
-
font-weight: 400;
|
15 |
-
line-height: normal;
|
16 |
-
background-color: #F2F2F2;
|
17 |
-
font-family: 'Lato', sans-serif;
|
18 |
-
}
|
19 |
-
|
20 |
-
p {
|
21 |
-
font-size: 14px;
|
22 |
-
line-height: 18px;
|
23 |
-
}
|
24 |
-
|
25 |
-
a {
|
26 |
-
-webkit-transition: all ease 0.5s;
|
27 |
-
transition: all ease 0.5s;
|
28 |
-
color: #2D62ED;
|
29 |
-
}
|
30 |
-
|
31 |
-
a:hover {
|
32 |
-
text-decoration: none;
|
33 |
-
-webkit-transition: all ease 0.5s;
|
34 |
-
transition: all ease 0.5s;
|
35 |
-
color: #2D62ED;
|
36 |
-
}
|
37 |
-
|
38 |
-
a:focus {
|
39 |
-
-webkit-box-shadow: none !important;
|
40 |
-
box-shadow: none !important;
|
41 |
-
}
|
42 |
-
|
43 |
-
ul {
|
44 |
-
margin-bottom: 0;
|
45 |
-
}
|
46 |
-
|
47 |
-
a:focus,
|
48 |
-
button:focus,
|
49 |
-
input[type="checkbox"],
|
50 |
-
input[type="radio"] {
|
51 |
-
outline: none;
|
52 |
-
}
|
53 |
-
|
54 |
-
:focus {
|
55 |
-
-ms-box-shadow: none;
|
56 |
-
-webkit-box-shadow: none;
|
57 |
-
box-shadow: none;
|
58 |
-
outline: none;
|
59 |
-
}
|
60 |
-
|
61 |
-
.text-underline {
|
62 |
-
text-decoration: underline;
|
63 |
-
}
|
64 |
-
|
65 |
-
.blue-color {
|
66 |
-
color: #2D62ED !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
section {
|
70 |
-
padding: 10px 0;
|
71 |
-
}
|
72 |
-
|
73 |
-
.title {
|
74 |
-
font-size: 16px;
|
75 |
-
font-weight: 700;
|
76 |
-
margin-bottom: 20px;
|
77 |
-
}
|
78 |
-
|
79 |
-
.sub-title {
|
80 |
-
margin-bottom: 5px;
|
81 |
-
font-size: 14px;
|
82 |
-
}
|
83 |
-
|
84 |
-
.upgrade {
|
85 |
-
color: #03D7FD;
|
86 |
-
}
|
87 |
-
|
88 |
-
.campaigns .campaign-date {
|
89 |
-
border: 1px solid #A9A9A9;
|
90 |
-
padding: 8px;
|
91 |
-
}
|
92 |
-
|
93 |
-
.campaigns .radio-buttons .custom-control-label {
|
94 |
-
width: 100%;
|
95 |
-
}
|
96 |
-
|
97 |
-
.chart {
|
98 |
-
margin-bottom: 15px;
|
99 |
-
background-color: #FFFFFF;
|
100 |
-
}
|
101 |
-
|
102 |
-
.chart canvas {
|
103 |
-
-ms-box-shadow: 0 3px 6px #00000029;
|
104 |
-
-webkit-box-shadow: 0 3px 6px #00000029;
|
105 |
-
box-shadow: 0 3px 6px #00000029;
|
106 |
-
border-radius: 10px;
|
107 |
-
}
|
108 |
-
|
109 |
-
.chart .sub-title {
|
110 |
-
margin-bottom: 10px;
|
111 |
-
color: #5E5E5E;
|
112 |
-
}
|
113 |
-
|
114 |
-
/*.dataTables_length {
|
115 |
-
display: none;
|
116 |
-
}*/
|
117 |
-
|
118 |
-
.table-section {
|
119 |
-
padding: 8px;
|
120 |
-
margin-bottom: 15px;
|
121 |
-
background-color: #FFFFFF;
|
122 |
-
border-radius: 10px;
|
123 |
-
-ms-box-shadow: 0 3px 6px #00000029;
|
124 |
-
-webkit-box-shadow: 0 3px 6px #00000029;
|
125 |
-
box-shadow: 0 3px 6px #00000029;
|
126 |
-
}
|
127 |
-
|
128 |
-
.table-section .table {
|
129 |
-
margin-bottom: 0;
|
130 |
-
}
|
131 |
-
|
132 |
-
.table-section .table thead th {
|
133 |
-
border: 0;
|
134 |
-
padding: 0.45rem;
|
135 |
-
color: #25283D;
|
136 |
-
vertical-align: top;
|
137 |
-
}
|
138 |
-
|
139 |
-
.table-section .table tr th,
|
140 |
-
.table-section .table tr td {
|
141 |
-
border: 0;
|
142 |
-
}
|
143 |
-
|
144 |
-
.table-section .table tr td {
|
145 |
-
padding: 0.45rem;
|
146 |
-
color: #5E5E5E;
|
147 |
-
}
|
148 |
-
|
149 |
-
.table-section .table tr td.product-image {
|
150 |
-
width: 70px;
|
151 |
-
}
|
152 |
-
|
153 |
-
.table-section .table tr td.product-image img {
|
154 |
-
width: 100%;
|
155 |
-
-o-object-fit: cover;
|
156 |
-
object-fit: cover;
|
157 |
-
}
|
158 |
-
|
159 |
-
.table-section .table tr td .text-underline {
|
160 |
-
text-decoration: none;
|
161 |
-
color: #5E5E5E;
|
162 |
-
}
|
163 |
-
|
164 |
-
.table-section .pagination {
|
165 |
-
-webkit-box-pack: end;
|
166 |
-
-ms-flex-pack: end;
|
167 |
-
justify-content: flex-end;
|
168 |
-
}
|
169 |
-
|
170 |
-
.btn {
|
171 |
-
border-radius: 500px;
|
172 |
-
padding: 0.375rem 1rem;
|
173 |
-
font-size: 14px;
|
174 |
-
}
|
175 |
-
|
176 |
-
.btn:focus, .btn:active {
|
177 |
-
-ms-box-shadow: none !important;
|
178 |
-
-webkit-box-shadow: none !important;
|
179 |
-
box-shadow: none !important;
|
180 |
-
outline: 0 !important;
|
181 |
-
}
|
182 |
-
|
183 |
-
.btn-primary {
|
184 |
-
background-color: #2D62ED;
|
185 |
-
border-color: #2D62ED;
|
186 |
-
}
|
187 |
-
|
188 |
-
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus {
|
189 |
-
background-color: #1248d5 !important;
|
190 |
-
border-color: #1248d5 !important;
|
191 |
-
}
|
192 |
-
|
193 |
-
.btn-secondary {
|
194 |
-
background-color: #FFFFFF;
|
195 |
-
border-color: #FFFFFF;
|
196 |
-
color: #2D62ED !important;
|
197 |
-
}
|
198 |
-
|
199 |
-
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary.focus {
|
200 |
-
background-color: #1248d5 !important;
|
201 |
-
border-color: #1248d5 !important;
|
202 |
-
color: #FFFFFF !important;
|
203 |
-
}
|
204 |
-
|
205 |
-
.btn-default {
|
206 |
-
background-color: #F2F2F2;
|
207 |
-
border-color: #F2F2F2;
|
208 |
-
color: #25283D;
|
209 |
-
}
|
210 |
-
|
211 |
-
.btn-default:hover, .btn-default:focus, .btn-default.focus {
|
212 |
-
background-color: #d9d9d9 !important;
|
213 |
-
border-color: #d9d9d9 !important;
|
214 |
-
}
|
215 |
-
|
216 |
-
.btn-outline-primary {
|
217 |
-
color: #2D62ED;
|
218 |
-
border-color: #2D62ED;
|
219 |
-
}
|
220 |
-
|
221 |
-
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary.focus {
|
222 |
-
background-color: #2D62ED !important;
|
223 |
-
border-color: #2D62ED !important;
|
224 |
-
color: #FFFFFF !important;
|
225 |
-
}
|
226 |
-
|
227 |
-
.btn-white {
|
228 |
-
background-color: #FFFFFF;
|
229 |
-
border: 1px solid #000000;
|
230 |
-
color: #000000;
|
231 |
-
padding: 5px 10px;
|
232 |
-
font-size: 14px;
|
233 |
-
line-height: normal;
|
234 |
-
border-radius: 0;
|
235 |
-
font-weight: 700;
|
236 |
-
}
|
237 |
-
|
238 |
-
.btn-white:focus {
|
239 |
-
-webkit-box-shadow: none !important;
|
240 |
-
box-shadow: none !important;
|
241 |
-
}
|
242 |
-
|
243 |
-
.btn-grey {
|
244 |
-
background-color: #F2F2F2 !important;
|
245 |
-
}
|
246 |
-
|
247 |
-
.text-underline {
|
248 |
-
text-decoration: underline;
|
249 |
-
}
|
250 |
-
|
251 |
-
.arrow-angle {
|
252 |
-
border-color: #888 transparent transparent transparent;
|
253 |
-
border-style: solid;
|
254 |
-
border-width: 8px 7px 0 7px;
|
255 |
-
height: 0;
|
256 |
-
width: 0;
|
257 |
-
}
|
258 |
-
|
259 |
-
.popup-modal .modal-dialog .modal-content {
|
260 |
-
border-radius: 15px;
|
261 |
-
border: 1px solid #707070;
|
262 |
-
background: #FAFAFA;
|
263 |
-
}
|
264 |
-
|
265 |
-
.popup-modal .modal-dialog .modal-header {
|
266 |
-
border: 0;
|
267 |
-
padding: 30px;
|
268 |
-
}
|
269 |
-
|
270 |
-
.popup-modal .modal-dialog .modal-header .modal-title {
|
271 |
-
font-weight: 700;
|
272 |
-
}
|
273 |
-
|
274 |
-
.popup-modal .modal-dialog .modal-body {
|
275 |
-
padding: 30px;
|
276 |
-
}
|
277 |
-
|
278 |
-
.popup-modal .modal-dialog .modal-body p {
|
279 |
-
color: #5E5E5E;
|
280 |
-
}
|
281 |
-
|
282 |
-
.popup-modal .modal-dialog .close {
|
283 |
-
position: absolute;
|
284 |
-
right: 10px;
|
285 |
-
top: 5px;
|
286 |
-
padding: 0;
|
287 |
-
margin: 0;
|
288 |
-
font-weight: 300;
|
289 |
-
opacity: 1;
|
290 |
-
color: #25283D;
|
291 |
-
font-size: 1.8rem;
|
292 |
-
}
|
293 |
-
|
294 |
-
.popup-modal .modal-dialog .mw-100 {
|
295 |
-
min-width: 100px;
|
296 |
-
}
|
297 |
-
|
298 |
-
.accordion .card {
|
299 |
-
margin-bottom: 15px;
|
300 |
-
background-color: transparent;
|
301 |
-
border: 1px solid #d1d1d1 !important;
|
302 |
-
}
|
303 |
-
|
304 |
-
.accordion .card:last-child {
|
305 |
-
margin-bottom: 0 !important;
|
306 |
-
}
|
307 |
-
|
308 |
-
.accordion .card .card-header {
|
309 |
-
padding: 0;
|
310 |
-
background-color: transparent;
|
311 |
-
border-radius: 0;
|
312 |
-
border: 0;
|
313 |
-
}
|
314 |
-
|
315 |
-
.accordion .card .card-header .btn {
|
316 |
-
padding: 5px 15px;
|
317 |
-
display: block;
|
318 |
-
width: 100%;
|
319 |
-
text-align: left;
|
320 |
-
color: #000000;
|
321 |
-
font-weight: 500;
|
322 |
-
font-size: 14px;
|
323 |
-
position: relative;
|
324 |
-
padding-right: 40px !important;
|
325 |
-
}
|
326 |
-
|
327 |
-
.accordion .card .card-header .btn:hover {
|
328 |
-
text-decoration: none;
|
329 |
-
}
|
330 |
-
|
331 |
-
.accordion .card .card-header .btn:focus {
|
332 |
-
text-decoration: none;
|
333 |
-
outline: none;
|
334 |
-
-webkit-box-shadow: none;
|
335 |
-
box-shadow: none;
|
336 |
-
}
|
337 |
-
|
338 |
-
.accordion .card .card-header .btn:after {
|
339 |
-
content: "";
|
340 |
-
border-color: #888 transparent transparent transparent;
|
341 |
-
border-style: solid;
|
342 |
-
border-width: 8px 7px 0 7px;
|
343 |
-
height: 0;
|
344 |
-
width: 0;
|
345 |
-
position: absolute;
|
346 |
-
right: 10px;
|
347 |
-
top: 11px;
|
348 |
-
-webkit-transform: rotate(180deg);
|
349 |
-
transform: rotate(180deg);
|
350 |
-
}
|
351 |
-
|
352 |
-
.accordion .card .card-header .btn.collapsed:after {
|
353 |
-
-webkit-transform: rotate(0deg);
|
354 |
-
transform: rotate(0deg);
|
355 |
-
}
|
356 |
-
|
357 |
-
.accordion .card .card-body {
|
358 |
-
padding: 10px 15px;
|
359 |
-
}
|
360 |
-
|
361 |
-
.accordion .card .card-body p {
|
362 |
-
font-size: 14px;
|
363 |
-
margin-bottom: 0.35rem;
|
364 |
-
}
|
365 |
-
|
366 |
-
.accordion .card .card-body .table-section {
|
367 |
-
border: 0;
|
368 |
-
padding: 0;
|
369 |
-
margin-bottom: 0;
|
370 |
-
}
|
371 |
-
|
372 |
-
.accordion .card .card-body .table-section .table tr td {
|
373 |
-
font-size: 14px;
|
374 |
-
}
|
375 |
-
|
376 |
-
.accordion-section .accordion .card {
|
377 |
-
margin-bottom: 15px;
|
378 |
-
border-radius: 0;
|
379 |
-
border: 1px solid #d1d1d1;
|
380 |
-
background-color: #ffffff;
|
381 |
-
}
|
382 |
-
|
383 |
-
.accordion-section .accordion .card .card-header {
|
384 |
-
padding: 0;
|
385 |
-
background-color: transparent;
|
386 |
-
border-radius: 0;
|
387 |
-
border: 0;
|
388 |
-
}
|
389 |
-
|
390 |
-
.accordion-section .accordion .card .card-header .btn {
|
391 |
-
padding: 5px 10px;
|
392 |
-
display: block;
|
393 |
-
width: 100%;
|
394 |
-
text-align: left;
|
395 |
-
color: #000000;
|
396 |
-
font-weight: 700;
|
397 |
-
font-size: 14px;
|
398 |
-
}
|
399 |
-
|
400 |
-
.accordion-section .accordion .card .card-header .btn:hover {
|
401 |
-
text-decoration: none;
|
402 |
-
}
|
403 |
-
|
404 |
-
.accordion-section .accordion .card .card-header .btn:focus {
|
405 |
-
text-decoration: none;
|
406 |
-
outline: none;
|
407 |
-
-webkit-box-shadow: none;
|
408 |
-
box-shadow: none;
|
409 |
-
}
|
410 |
-
|
411 |
-
.accordion-section .accordion .card .card-body {
|
412 |
-
padding: 10px 15px;
|
413 |
-
}
|
414 |
-
|
415 |
-
.nbk-tbl {
|
416 |
-
background-color: transparent;
|
417 |
-
border: 0;
|
418 |
-
padding: 0;
|
419 |
-
margin-bottom: 0;
|
420 |
-
}
|
421 |
-
|
422 |
-
.card-wrapper {
|
423 |
-
max-width: 100%;
|
424 |
-
margin: 0 auto;
|
425 |
-
}
|
426 |
-
|
427 |
-
.wrapper-main {
|
428 |
-
max-width: 90%;
|
429 |
-
margin: 0 auto;
|
430 |
-
}
|
431 |
-
|
432 |
-
.configuration-section .note-follow {
|
433 |
-
border: 1px solid #A9A9A9;
|
434 |
-
padding: 10px 15px;
|
435 |
-
border-radius: 10px;
|
436 |
-
margin-bottom: 15px;
|
437 |
-
}
|
438 |
-
|
439 |
-
.configuration-section .note-follow p {
|
440 |
-
margin-bottom: 0;
|
441 |
-
}
|
442 |
-
|
443 |
-
.configuration-section .confg-card .card {
|
444 |
-
border-radius: 15px;
|
445 |
-
background-color: #FFFFFF;
|
446 |
-
-ms-box-shadow: 0 3px 5px #00000029;
|
447 |
-
-webkit-box-shadow: 0 3px 5px #00000029;
|
448 |
-
box-shadow: 0 3px 5px #00000029;
|
449 |
-
height: 100%;
|
450 |
-
border: 0;
|
451 |
-
}
|
452 |
-
|
453 |
-
.configuration-section .confg-card .card .card-header {
|
454 |
-
background-color: #000338;
|
455 |
-
border: 0;
|
456 |
-
text-align: center;
|
457 |
-
padding-left: 15px;
|
458 |
-
padding-right: 15px;
|
459 |
-
}
|
460 |
-
|
461 |
-
.configuration-section .confg-card .card .card-header:first-child {
|
462 |
-
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
463 |
-
}
|
464 |
-
|
465 |
-
.configuration-section .confg-card .card .card-header .confg-title {
|
466 |
-
font-weight: 700;
|
467 |
-
font-size: 14px;
|
468 |
-
color: #FFFFFF;
|
469 |
-
margin: 0;
|
470 |
-
}
|
471 |
-
|
472 |
-
.configuration-section .confg-card .card .card-body {
|
473 |
-
padding: 15px;
|
474 |
-
}
|
475 |
-
|
476 |
-
.configuration-section .confg-card .card .card-body .list-unstyled {
|
477 |
-
margin: 0;
|
478 |
-
}
|
479 |
-
|
480 |
-
.configuration-section .confg-card .card .card-body .list-unstyled li {
|
481 |
-
display: block;
|
482 |
-
margin-bottom: 10px;
|
483 |
-
}
|
484 |
-
|
485 |
-
.configuration-section .confg-card .card .card-body .list-unstyled li:last-child {
|
486 |
-
margin-bottom: 0;
|
487 |
-
}
|
488 |
-
|
489 |
-
.configuration-section .confg-card .card .card-body .list-unstyled li .text {
|
490 |
-
display: block;
|
491 |
-
}
|
492 |
-
|
493 |
-
.configuration-section .confg-card .card .card-body .list-unstyled li .list-image img {
|
494 |
-
max-width: 18px;
|
495 |
-
}
|
496 |
-
|
497 |
-
.configuration-section .confg-card .card .card-footer {
|
498 |
-
background-color: transparent;
|
499 |
-
border: 0;
|
500 |
-
text-align: center;
|
501 |
-
padding-left: 15px;
|
502 |
-
padding-right: 15px;
|
503 |
-
}
|
504 |
-
|
505 |
-
.configuration-section .confg-card .card .card-footer:last-child {
|
506 |
-
border-radius: 0 0 calc(15px - 1px) calc(15px - 1px);
|
507 |
-
}
|
508 |
-
|
509 |
-
.configuration-section .confg-card .card .card-footer .explr {
|
510 |
-
padding: 0;
|
511 |
-
font-weight: 700;
|
512 |
-
font-size: 14px;
|
513 |
-
text-decoration: underline;
|
514 |
-
color: #000000;
|
515 |
-
}
|
516 |
-
|
517 |
-
.border-right {
|
518 |
-
border-right: 1px solid #A9A9A9;
|
519 |
-
}
|
520 |
-
|
521 |
-
@media (min-width: 576px) {
|
522 |
-
.modal-sm-custom {
|
523 |
-
max-width: 355px;
|
524 |
-
}
|
525 |
-
}
|
526 |
-
|
527 |
-
.dataTables_paginate .page-item .page-link {
|
528 |
-
color: #000000;
|
529 |
-
}
|
530 |
-
|
531 |
-
.dataTables_paginate .page-item.active .page-link {
|
532 |
-
background-color: #000000;
|
533 |
-
border-color: #000000;
|
534 |
-
color: #ffffff !important;
|
535 |
-
font-weight: 700;
|
536 |
-
}
|
537 |
-
|
538 |
-
.dataTables_paginate .page-item.disabled {
|
539 |
-
opacity: 0.5;
|
540 |
-
}
|
541 |
-
|
542 |
-
.loader-section {
|
543 |
-
position: fixed;
|
544 |
-
top: 0;
|
545 |
-
bottom: 0;
|
546 |
-
left: 0;
|
547 |
-
right: 0;
|
548 |
-
height: 100%;
|
549 |
-
background-color: rgba(255, 255, 255, 0.85);
|
550 |
-
display: -webkit-box;
|
551 |
-
display: -ms-flexbox;
|
552 |
-
display: flex;
|
553 |
-
-webkit-box-pack: center;
|
554 |
-
-ms-flex-pack: center;
|
555 |
-
justify-content: center;
|
556 |
-
-webkit-box-align: center;
|
557 |
-
-ms-flex-align: center;
|
558 |
-
align-items: center;
|
559 |
-
z-index: 999;
|
560 |
-
}
|
561 |
-
|
562 |
-
.loader-section img {
|
563 |
-
max-width: 80px;
|
564 |
-
}
|
565 |
-
|
566 |
-
.border-right {
|
567 |
-
border-right: 0 !important;
|
568 |
-
}
|
569 |
-
|
570 |
-
.right-content {
|
571 |
-
border: 0.5px solid #A9A9A9;
|
572 |
-
border-radius: 15px;
|
573 |
-
margin-bottom: 30px;
|
574 |
-
padding: 15px;
|
575 |
-
}
|
576 |
-
|
577 |
-
.right-content:last-child {
|
578 |
-
margin-bottom: 0;
|
579 |
-
}
|
580 |
-
|
581 |
-
.right-content p {
|
582 |
-
margin-bottom: 0;
|
583 |
-
}
|
584 |
-
|
585 |
-
.right-content .content-section {
|
586 |
-
position: relative;
|
587 |
-
padding-left: 30px;
|
588 |
-
}
|
589 |
-
|
590 |
-
.right-content .content-section .content-icon {
|
591 |
-
position: absolute;
|
592 |
-
left: 0;
|
593 |
-
top: 0;
|
594 |
-
}
|
595 |
-
|
596 |
-
.right-content .content-section .content-icon img {
|
597 |
-
width: 20px;
|
598 |
-
}
|
599 |
-
|
600 |
-
.right-content .pagination {
|
601 |
-
margin-top: 5px;
|
602 |
-
}
|
603 |
-
|
604 |
-
.right-content .pagination .page-item .page-link {
|
605 |
-
padding: 0 5px;
|
606 |
-
border: 0;
|
607 |
-
color: #25283D;
|
608 |
-
}
|
609 |
-
.right-content .pagination .page-item .paging_info{padding: 0 5px; border: 0; color: #25283D; margin-top: 1px; display: inline-block;}
|
610 |
-
.right-content .pagination .page-item span.page-link {
|
611 |
-
cursor: pointer;
|
612 |
-
}
|
613 |
-
|
614 |
-
.right-content .pagination .page-item.page-prev img {
|
615 |
-
-webkit-transform: rotate(90deg);
|
616 |
-
transform: rotate(90deg);
|
617 |
-
}
|
618 |
-
|
619 |
-
.right-content .pagination .page-item.page-next img {
|
620 |
-
-webkit-transform: rotate(-90deg);
|
621 |
-
transform: rotate(-90deg);
|
622 |
-
}
|
623 |
-
|
624 |
-
.listing-content {
|
625 |
-
margin-bottom: 0;
|
626 |
-
margin-top: 15px;
|
627 |
-
}
|
628 |
-
|
629 |
-
.listing-content li {
|
630 |
-
margin-bottom: 12px;
|
631 |
-
font-size: 14px;
|
632 |
-
position: relative;
|
633 |
-
padding-left: 24px;
|
634 |
-
color: #5E5E5E;
|
635 |
-
}
|
636 |
-
|
637 |
-
.listing-content li:last-child {
|
638 |
-
margin-bottom: 0;
|
639 |
-
}
|
640 |
-
|
641 |
-
.listing-content li .tick-icon {
|
642 |
-
position: absolute;
|
643 |
-
left: 0;
|
644 |
-
top: 5px;
|
645 |
-
width: 14px;
|
646 |
-
}
|
647 |
-
|
648 |
-
.custom-tooltip {
|
649 |
-
position: relative;
|
650 |
-
}
|
651 |
-
|
652 |
-
.custom-tooltip:hover .tooltip-drop {
|
653 |
-
display: block;
|
654 |
-
}
|
655 |
-
|
656 |
-
.custom-tooltip .tooltip-drop {
|
657 |
-
position: absolute;
|
658 |
-
background-color: #C0F2CA;
|
659 |
-
padding: 25px 15px 15px 15px;
|
660 |
-
top: 0;
|
661 |
-
border-radius: 15px;
|
662 |
-
min-width: 16rem;
|
663 |
-
z-index: 1;
|
664 |
-
display: none;
|
665 |
-
}
|
666 |
-
|
667 |
-
.custom-tooltip .tooltip-drop .tooltip-title {
|
668 |
-
font-size: 16px;
|
669 |
-
color: #5E5E5E;
|
670 |
-
}
|
671 |
-
|
672 |
-
.custom-tooltip .tooltip-drop p {
|
673 |
-
font-size: 12px;
|
674 |
-
color: #757575;
|
675 |
-
font-weight: 400;
|
676 |
-
margin-bottom: 0;
|
677 |
-
}
|
678 |
-
|
679 |
-
.alert-message {
|
680 |
-
text-align: right;
|
681 |
-
}
|
682 |
-
|
683 |
-
.alert-message .alert {
|
684 |
-
display: inline-block;
|
685 |
-
border-radius: 500px;
|
686 |
-
border: 0;
|
687 |
-
padding-top: 0.5rem;
|
688 |
-
padding-bottom: 0.5rem;
|
689 |
-
color: #FFFFFF;
|
690 |
-
background-color: #66BB6A;
|
691 |
-
padding-left: 30px;
|
692 |
-
}
|
693 |
-
.alert-message.tvc-alert-error .alert{
|
694 |
-
background-color: #fff3cd;
|
695 |
-
color: #856404;
|
696 |
-
}
|
697 |
-
.alert-message.tvc-alert-success .alert:after {
|
698 |
-
content: '\2713';
|
699 |
-
position: absolute;
|
700 |
-
left: 12px;
|
701 |
-
}
|
702 |
-
|
703 |
-
.alert-message .error {
|
704 |
-
display: inline-block;
|
705 |
-
border-radius: 500px;
|
706 |
-
border: 0;
|
707 |
-
padding-top: 0.5rem;
|
708 |
-
padding-bottom: 0.5rem;
|
709 |
-
color: #FFFFFF;
|
710 |
-
background-color: #dc3232;
|
711 |
-
}
|
712 |
-
|
713 |
-
.tooltip.show {
|
714 |
-
opacity: 1;
|
715 |
-
}
|
716 |
-
|
717 |
-
.tooltip .arrow {
|
718 |
-
display: none;
|
719 |
-
}
|
720 |
-
|
721 |
-
.tooltip .tooltip-inner {
|
722 |
-
background-color: #FFFFFF;
|
723 |
-
color: #5E5E5E;
|
724 |
-
font-size: 12px;
|
725 |
-
text-align: left;
|
726 |
-
}
|
727 |
-
|
728 |
-
.header-section {
|
729 |
-
display: block;
|
730 |
-
background-color: #FFFFFF;
|
731 |
-
}
|
732 |
-
|
733 |
-
.header-section .top-section {
|
734 |
-
background-color: #25283D;
|
735 |
-
padding: 8px 15px;
|
736 |
-
}
|
737 |
-
|
738 |
-
.header-section .top-section p {
|
739 |
-
margin-bottom: 0;
|
740 |
-
text-align: center;
|
741 |
-
color: #FFFFFF;
|
742 |
-
font-weight: 700;
|
743 |
-
}
|
744 |
-
|
745 |
-
.header-section .navbar-section {
|
746 |
-
/* padding: 15px 0;*/
|
747 |
-
padding: 10px 0 2px 0;
|
748 |
-
margin-bottom: 0;
|
749 |
-
}
|
750 |
-
|
751 |
-
.header-section .navbar-section .navbar-brand {
|
752 |
-
padding-left: 15px;
|
753 |
-
}
|
754 |
-
|
755 |
-
.header-section .navbar-section .navbar-brand img {
|
756 |
-
width: auto;
|
757 |
-
max-height: 45px;
|
758 |
-
}
|
759 |
-
|
760 |
-
.header-section .navbar-section .nav-btn {
|
761 |
-
position: relative;
|
762 |
-
margin: 0 18px;
|
763 |
-
}
|
764 |
-
|
765 |
-
.header-section .navbar-section .nav-btn .nav-icon {
|
766 |
-
max-width: 19px;
|
767 |
-
}
|
768 |
-
|
769 |
-
.header-section .navbar-section .nav-btn .not-count {
|
770 |
-
position: absolute;
|
771 |
-
top: -5px;
|
772 |
-
right: -15px;
|
773 |
-
width: 20px;
|
774 |
-
height: 20px;
|
775 |
-
line-height: 20px;
|
776 |
-
text-align: center;
|
777 |
-
padding: 0;
|
778 |
-
border-radius: 50%;
|
779 |
-
background-color: #2D62ED;
|
780 |
-
}
|
781 |
-
|
782 |
-
.header-section .navbar-section .nav-btn .free-plan {
|
783 |
-
background-color: rgba(8, 114, 252, 0.1);
|
784 |
-
color: #0872FC;
|
785 |
-
border-radius: 500px;
|
786 |
-
padding: 5px 10px;
|
787 |
-
font-size: 14px;
|
788 |
-
font-weight: 400;
|
789 |
-
text-transform: capitalize;
|
790 |
-
}
|
791 |
-
|
792 |
-
.header-section .navbar-section .account-dropdown .btn {
|
793 |
-
border: 0;
|
794 |
-
font-size: 14px;
|
795 |
-
font-weight: 700;
|
796 |
-
}
|
797 |
-
|
798 |
-
.header-section .navbar-section .account-dropdown .btn.dropdown-toggle::after {
|
799 |
-
border: solid black;
|
800 |
-
border-style: solid;
|
801 |
-
border-width: 0 1px 1px 0;
|
802 |
-
vertical-align: middle;
|
803 |
-
-webkit-transform: rotate(45deg);
|
804 |
-
transform: rotate(45deg);
|
805 |
-
padding: 3px;
|
806 |
-
margin-left: 10px;
|
807 |
-
margin-top: -2px;
|
808 |
-
}
|
809 |
-
|
810 |
-
.header-section .navbar-section .account-dropdown .btn:focus {
|
811 |
-
-webkit-box-shadow: none;
|
812 |
-
box-shadow: none;
|
813 |
-
}
|
814 |
-
|
815 |
-
.header-section .navbar-section .account-dropdown .dropdown-menu {
|
816 |
-
padding: 0;
|
817 |
-
margin: -15px 1rem 0 0;
|
818 |
-
border-radius: 0;
|
819 |
-
border: 0;
|
820 |
-
border-radius: 5px;
|
821 |
-
-ms-box-shadow: 0 3px 6px #00000029;
|
822 |
-
-webkit-box-shadow: 0 3px 6px #00000029;
|
823 |
-
box-shadow: 0 3px 6px #00000029;
|
824 |
-
}
|
825 |
-
|
826 |
-
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item {
|
827 |
-
font-size: 14px;
|
828 |
-
padding: 5px 10px;
|
829 |
-
}
|
830 |
-
|
831 |
-
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:first-child {
|
832 |
-
border-radius: 4px 4px 0 0;
|
833 |
-
}
|
834 |
-
|
835 |
-
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:last-child {
|
836 |
-
border-radius: 0 0 4px 4px;
|
837 |
-
}
|
838 |
-
|
839 |
-
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:focus {
|
840 |
-
color: #16181b;
|
841 |
-
background-color: #f8f9fa;
|
842 |
-
}
|
843 |
-
|
844 |
-
.form-group {
|
845 |
-
position: relative;
|
846 |
-
}
|
847 |
-
|
848 |
-
.form-control, .select2.select2-container--default .select2-selection--single {
|
849 |
-
border-color: #707070;
|
850 |
-
height: 30px;
|
851 |
-
font-size: 14px;
|
852 |
-
background-color: #FFFFFF;
|
853 |
-
border-width: 0.5px;
|
854 |
-
border-radius: 15px;
|
855 |
-
padding-left: 7px;
|
856 |
-
}
|
857 |
-
.wp-core-ui select{padding-left: 15px; margin-top: 2px; border-radius: 15px; background-position: right 8px top 55%;}
|
858 |
-
.form-control::-webkit-input-placeholder, .select2.select2-container--default .select2-selection--single::-webkit-input-placeholder {
|
859 |
-
color: #B2B2B2;
|
860 |
-
}
|
861 |
-
|
862 |
-
.form-control::-ms-input-placeholder, .select2.select2-container--default .select2-selection--single::-ms-input-placeholder {
|
863 |
-
color: #B2B2B2;
|
864 |
-
}
|
865 |
-
|
866 |
-
.form-control:-ms-input-placeholder, .select2.select2-container--default .select2-selection--single:-ms-input-placeholder {
|
867 |
-
color: #B2B2B2;
|
868 |
-
}
|
869 |
-
|
870 |
-
.form-control::placeholder, .select2.select2-container--default .select2-selection--single::placeholder {
|
871 |
-
color: #B2B2B2;
|
872 |
-
}
|
873 |
-
|
874 |
-
.form-control:focus, .select2.select2-container--default .select2-selection--single:focus {
|
875 |
-
-ms-box-shadow: none;
|
876 |
-
-webkit-box-shadow: none;
|
877 |
-
box-shadow: none;
|
878 |
-
outline: none;
|
879 |
-
border-color: #1A2750;
|
880 |
-
}
|
881 |
-
|
882 |
-
.select2 {
|
883 |
-
width: 100% !important;
|
884 |
-
}
|
885 |
-
|
886 |
-
/*.select2.select2-container--default .select2-selection--single .select2-selection__rendered {
|
887 |
-
line-height: 38px;
|
888 |
-
}*/
|
889 |
-
|
890 |
-
.select2.select2-container--default .select2-selection__arrow {
|
891 |
-
height: 40px !important;
|
892 |
-
}
|
893 |
-
|
894 |
-
|
895 |
-
.select2-dropdown {
|
896 |
-
border-color: #707070 !important;
|
897 |
-
}
|
898 |
-
|
899 |
-
.select2-dropdown .select2-results__options .select2-results__option--highlighted {
|
900 |
-
background-color: #5c85f1 !important;
|
901 |
-
color: #FFFFFF !important;
|
902 |
-
}
|
903 |
-
|
904 |
-
.select2-dropdown .select2-results__options .select2-results__option--selected {
|
905 |
-
background-color: #2D62ED !important;
|
906 |
-
color: #FFFFFF !important;
|
907 |
-
}
|
908 |
-
|
909 |
-
.input-daterange .form-control, .input-daterange .select2.select2-container--default .select2-selection--single, .select2.select2-container--default .input-daterange .select2-selection--single {
|
910 |
-
text-align: left;
|
911 |
-
border-radius: 10px !important;
|
912 |
-
border-width: 0.5px;
|
913 |
-
height: 35px;
|
914 |
-
background: url(../images/icon/arrow-down-sign-to-navigate.svg) no-repeat 95%;
|
915 |
-
}
|
916 |
-
|
917 |
-
.input-daterange .text {
|
918 |
-
font-size: 14px;
|
919 |
-
}
|
920 |
-
|
921 |
-
.campaing-date {
|
922 |
-
width: 350px;
|
923 |
-
}
|
924 |
-
|
925 |
-
.campaing-date .input-group {
|
926 |
-
-webkit-box-align: center;
|
927 |
-
-ms-flex-align: center;
|
928 |
-
align-items: center;
|
929 |
-
}
|
930 |
-
|
931 |
-
.datepicker.datepicker-dropdown {
|
932 |
-
border: 0;
|
933 |
-
font-size: 14px;
|
934 |
-
border-radius: 15px;
|
935 |
-
-ms-box-shadow: 0 3px 6px #272D3B33;
|
936 |
-
-webkit-box-shadow: 0 3px 6px #272D3B33;
|
937 |
-
box-shadow: 0 3px 6px #272D3B33;
|
938 |
-
width: 220px;
|
939 |
-
}
|
940 |
-
|
941 |
-
.datepicker .table-condensed {
|
942 |
-
width: 100%;
|
943 |
-
}
|
944 |
-
|
945 |
-
.datepicker th {
|
946 |
-
font-weight: 500 !important;
|
947 |
-
}
|
948 |
-
|
949 |
-
.datepicker td,
|
950 |
-
.datepicker th {
|
951 |
-
width: 30px !important;
|
952 |
-
height: 30px !important;
|
953 |
-
border-radius: 50% !important;
|
954 |
-
}
|
955 |
-
|
956 |
-
.datepicker td.day.active {
|
957 |
-
background: #1A2750 !important;
|
958 |
-
}
|
959 |
-
|
960 |
-
.datepicker td.day.today {
|
961 |
-
background: #2D62ED !important;
|
962 |
-
color: #FFFFFF;
|
963 |
-
}
|
964 |
-
|
965 |
-
.datepicker td span.month.active {
|
966 |
-
background: #1A2750 !important;
|
967 |
-
}
|
968 |
-
|
969 |
-
.datepicker td span.year.active, .datepicker td span.year.focused {
|
970 |
-
background: #1A2750 !important;
|
971 |
-
}
|
972 |
-
|
973 |
-
.custom-control .custom-control-input:focus ~ .custom-control-label::before {
|
974 |
-
-ms-box-shadow: none;
|
975 |
-
-webkit-box-shadow: none;
|
976 |
-
box-shadow: none;
|
977 |
-
outline: none;
|
978 |
-
}
|
979 |
-
|
980 |
-
.custom-control.custom-radio .custom-control-label {
|
981 |
-
padding-left: 0;
|
982 |
-
}
|
983 |
-
|
984 |
-
.custom-control.custom-radio .custom-control-label::before {
|
985 |
-
width: 16px;
|
986 |
-
height: 16px;
|
987 |
-
background-color: transparent;
|
988 |
-
border-width: 1px;
|
989 |
-
border-color: #707070;
|
990 |
-
top: 1px;
|
991 |
-
}
|
992 |
-
|
993 |
-
.custom-control.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
|
994 |
-
border-color: #707070;
|
995 |
-
}
|
996 |
-
|
997 |
-
.custom-control.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
|
998 |
-
width: 8px;
|
999 |
-
height: 8px;
|
1000 |
-
border-radius: 50%;
|
1001 |
-
background-image: none;
|
1002 |
-
background-color: #2D62ED;
|
1003 |
-
margin-left: 4px;
|
1004 |
-
top: 5px;
|
1005 |
-
}
|
1006 |
-
|
1007 |
-
.custom-control.custom-checkbox .custom-control-label:before {
|
1008 |
-
border-radius: 2px;
|
1009 |
-
margin-top: -3px;
|
1010 |
-
border-color: #5E5E5E;
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
.custom-control.custom-checkbox .custom-control-input:checked ~ .custom-control-label:before {
|
1014 |
-
background-color: #2D62ED;
|
1015 |
-
border-color: #2D62ED;
|
1016 |
-
border-radius: 2px;
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
.custom-control.custom-checkbox .custom-control-input:checked ~ .custom-control-label:after {
|
1020 |
-
margin-top: -3px;
|
1021 |
-
background-image: url(../img/tick-white.svg);
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
.custom-control.custom-checkbox .custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
|
1025 |
-
-ms-box-shadow: none;
|
1026 |
-
-webkit-box-shadow: none;
|
1027 |
-
box-shadow: none;
|
1028 |
-
outline: none;
|
1029 |
-
border-color: #2D62ED;
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
.custom-switch .custom-control-label:before {
|
1033 |
-
width: 35px;
|
1034 |
-
height: 20px;
|
1035 |
-
border-radius: 500px;
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
.custom-switch .custom-control-label:after {
|
1039 |
-
left: calc(-2.25rem + 3px);
|
1040 |
-
top: calc(.25rem + 4px);
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
.custom-switch .custom-control-input:checked ~ .custom-control-label:after {
|
1044 |
-
-webkit-transform: translateX(1.25rem);
|
1045 |
-
transform: translateX(1.25rem);
|
1046 |
-
top: calc(.25rem + 4px);
|
1047 |
-
left: calc(-2.25rem + 1px);
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
.custom-control-label {
|
1051 |
-
color: #5E5E5E;
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
textarea.form-control, .select2.select2-container--default textarea.select2-selection--single {
|
1055 |
-
height: auto !important;
|
1056 |
-
}
|
1057 |
-
|
1058 |
-
.form-label-control {
|
1059 |
-
margin-bottom: 0.8rem;
|
1060 |
-
font-weight: 700;
|
1061 |
-
}
|
1062 |
-
|
1063 |
-
.campaign-date .custom-control-label {
|
1064 |
-
display: inline;
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
.campaign-date .custom-control-label .custom-radio .select2 {
|
1068 |
-
vertical-align: middle;
|
1069 |
-
}
|
1070 |
-
|
1071 |
-
.wiz-tab .nav-pills {
|
1072 |
-
-ms-box-shadow: 0 1px 2px #00000029;
|
1073 |
-
-webkit-box-shadow: 0 1px 2px #00000029;
|
1074 |
-
box-shadow: 0 1px 2px #00000029;
|
1075 |
-
background-color: #FFFFFF;
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
.wiz-tab .nav-pills .nav-item {
|
1079 |
-
-ms-flex-preferred-size: auto;
|
1080 |
-
flex-basis: auto;
|
1081 |
-
-webkit-box-flex: initial;
|
1082 |
-
-ms-flex-positive: initial;
|
1083 |
-
flex-grow: initial;
|
1084 |
-
margin-bottom: 0px !important;
|
1085 |
-
}
|
1086 |
-
.wiz-tab .nav-pills .nav-item .nav-link a{color: #000000;}
|
1087 |
-
.wiz-tab .nav-pills .nav-item .nav-link {
|
1088 |
-
color: #000000;
|
1089 |
-
padding: 15px 20px;
|
1090 |
-
-webkit-box-align: center;
|
1091 |
-
-ms-flex-align: center;
|
1092 |
-
align-items: center;
|
1093 |
-
-webkit-box-pack: center;
|
1094 |
-
-ms-flex-pack: center;
|
1095 |
-
justify-content: center;
|
1096 |
-
display: -webkit-box;
|
1097 |
-
display: -ms-flexbox;
|
1098 |
-
display: flex;
|
1099 |
-
height: 100%;
|
1100 |
-
border-radius: 0;
|
1101 |
-
font-size: 14px;
|
1102 |
-
font-weight: 700;
|
1103 |
-
text-transform: uppercase;
|
1104 |
-
border-bottom: 2px solid transparent;
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
.wiz-tab .nav-pills .nav-item .nav-link.active {
|
1108 |
-
border-color: #0872FC !important;
|
1109 |
-
color: #0872FC !important;
|
1110 |
-
background-color: transparent !important;
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
.tab-content {
|
1114 |
-
margin-top: 15px;
|
1115 |
-
padding-bottom: 15px;
|
1116 |
-
}
|
1117 |
-
|
1118 |
-
.tab-content .tab-card {
|
1119 |
-
background: #ffffff;
|
1120 |
-
padding: 30px;
|
1121 |
-
border-radius: 15px;
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
.tab-content .tab-card.bg-none {
|
1125 |
-
background: none;
|
1126 |
-
border: 0;
|
1127 |
-
padding: 0;
|
1128 |
-
}
|
1129 |
-
|
1130 |
-
.tab-content .tab-card .text-header {
|
1131 |
-
font-size: 20px;
|
1132 |
-
font-weight: 700;
|
1133 |
-
margin-bottom: 1.5rem;
|
1134 |
-
}
|
1135 |
-
|
1136 |
-
.tab-content .tab-card .working {
|
1137 |
-
max-width: 100%;
|
1138 |
-
text-align: center;
|
1139 |
-
}
|
1140 |
-
|
1141 |
-
.tab-content .tab-card .working img {
|
1142 |
-
max-width: 100%;
|
1143 |
-
margin: 0 auto;
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
.tab-content .tab-card .db-btn {
|
1147 |
-
margin-top: 30px;
|
1148 |
-
}
|
1149 |
-
|
1150 |
-
.tab-content .tab-card .db-btn .btn {
|
1151 |
-
margin-right: 30px;
|
1152 |
-
}
|
1153 |
-
|
1154 |
-
.tab-content .tab-card .custom-control-label {
|
1155 |
-
font-size: 14px;
|
1156 |
-
}
|
1157 |
-
|
1158 |
-
.tab-content .white-box {
|
1159 |
-
background-color: #FFFFFF;
|
1160 |
-
border: 1px solid #d1d1d1;
|
1161 |
-
padding: 10px;
|
1162 |
-
margin-bottom: 15px;
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
.tab-content .white-box:last-child {
|
1166 |
-
margin-bottom: 0;
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
.tab-content .text-m {
|
1170 |
-
display: block;
|
1171 |
-
margin-bottom: 0.35rem;
|
1172 |
-
font-size: 14px;
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
.btn-google {
|
1176 |
-
-ms-box-shadow: 3px 3px 3px #00000029;
|
1177 |
-
-webkit-box-shadow: 3px 3px 3px #00000029;
|
1178 |
-
box-shadow: 3px 3px 3px #00000029;
|
1179 |
-
font-weight: 900;
|
1180 |
-
font-size: 14px;
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
.btn-google img {
|
1184 |
-
width: 25px;
|
1185 |
-
margin-right: 1.5rem;
|
1186 |
-
}
|
1187 |
-
|
1188 |
-
.licence {
|
1189 |
-
border: 0.5px solid #A9A9A9;
|
1190 |
-
padding: 30px;
|
1191 |
-
margin-bottom: 15px;
|
1192 |
-
border-radius: 15px;
|
1193 |
-
}
|
1194 |
-
|
1195 |
-
.licence p {
|
1196 |
-
margin-bottom: 0.35rem;
|
1197 |
-
font-size: 14px;
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
.licence .input-group {
|
1201 |
-
margin-top: 15px;
|
1202 |
-
}
|
1203 |
-
|
1204 |
-
.licence .input-group .form-control, .licence .input-group .select2.select2-container--default .select2-selection--single, .select2.select2-container--default .licence .input-group .select2-selection--single {
|
1205 |
-
border-radius: 10px;
|
1206 |
-
margin-right: 15px;
|
1207 |
-
color: #000000;
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
.licence .input-group .input-group-append {
|
1211 |
-
margin-left: 0;
|
1212 |
-
}
|
1213 |
-
|
1214 |
-
.licence .input-group .input-group-append .btn {
|
1215 |
-
width: 40px;
|
1216 |
-
height: 40px;
|
1217 |
-
padding: 0;
|
1218 |
-
border-radius: 50%;
|
1219 |
-
line-height: normal;
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
.licence .input-group .input-group-append .btn img {
|
1223 |
-
max-width: 18px;
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
.ecom-track {
|
1227 |
-
margin-top: 5px;
|
1228 |
-
margin-bottom: 0;
|
1229 |
-
}
|
1230 |
-
|
1231 |
-
.ecom-track li {
|
1232 |
-
margin-bottom: 15px;
|
1233 |
-
font-size: 14px;
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
.ecom-track li .img-icon {
|
1237 |
-
width: 18px;
|
1238 |
-
margin-right: 5px;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
.ecom-track li .trk-text {
|
1242 |
-
vertical-align: middle;
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
.premium-list {
|
1246 |
-
margin-bottom: 0;
|
1247 |
-
margin-top: 15px;
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
.premium-list li {
|
1251 |
-
margin-bottom: 15px;
|
1252 |
-
font-size: 14px;
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
.premium-list li span {
|
1256 |
-
position: relative;
|
1257 |
-
display: block;
|
1258 |
-
padding-left: 15px;
|
1259 |
-
}
|
1260 |
-
|
1261 |
-
.premium-list li span:before {
|
1262 |
-
content: '';
|
1263 |
-
width: 5px;
|
1264 |
-
height: 5px;
|
1265 |
-
border-radius: 50%;
|
1266 |
-
background: #000;
|
1267 |
-
position: absolute;
|
1268 |
-
left: 0;
|
1269 |
-
top: 7px;
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
.google-account-analytics .ga-title {
|
1273 |
-
font-size: 14px;
|
1274 |
-
font-weight: 700;
|
1275 |
-
margin-bottom: 0;
|
1276 |
-
}
|
1277 |
-
|
1278 |
-
.google-account-analytics .ga-text {
|
1279 |
-
margin-bottom: 0;
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
.google-account-analytics .acc-num {
|
1283 |
-
display: inline-block;
|
1284 |
-
border: 0.5px solid #A9A9A9;
|
1285 |
-
border-radius: 10px;
|
1286 |
-
padding: 5px 8px;
|
1287 |
-
min-width: 180px;
|
1288 |
-
text-align: right;
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
.google-account-analytics .acc-num .ga-text {
|
1292 |
-
font-weight: 900;
|
1293 |
-
border-right: 1px solid #A9A9A9;
|
1294 |
-
padding: 0 5px;
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
.google-account-analytics .acc-num .ga-text:last-child {
|
1298 |
-
border-right: 0;
|
1299 |
-
padding-right: 0;
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
.google-account-analytics .acc-num p {
|
1303 |
-
display: inline-block;
|
1304 |
-
}
|
1305 |
-
|
1306 |
-
.content-heading {
|
1307 |
-
font-size: 18px;
|
1308 |
-
font-weight: 700;
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
.wizard-section.campaign-wizard {
|
1312 |
-
padding: 0;
|
1313 |
-
}
|
1314 |
-
|
1315 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps {
|
1316 |
-
border-radius: 0 !important;
|
1317 |
-
-ms-box-shadow: none;
|
1318 |
-
-webkit-box-shadow: none;
|
1319 |
-
box-shadow: none;
|
1320 |
-
background-color: transparent;
|
1321 |
-
max-width: 520px;
|
1322 |
-
margin: 0 auto 20px auto;
|
1323 |
-
}
|
1324 |
-
|
1325 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li {
|
1326 |
-
text-align: center;
|
1327 |
-
border-right: 0;
|
1328 |
-
padding: 0 25px;
|
1329 |
-
}
|
1330 |
-
|
1331 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li:last-child::before {
|
1332 |
-
display: none;
|
1333 |
-
}
|
1334 |
-
|
1335 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li .wiz-title {
|
1336 |
-
color: #5E5E5E;
|
1337 |
-
font-size: 14px;
|
1338 |
-
font-weight: 400;
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li .step {
|
1342 |
-
visibility: hidden;
|
1343 |
-
}
|
1344 |
-
|
1345 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li a::before {
|
1346 |
-
content: '' !important;
|
1347 |
-
width: 16px;
|
1348 |
-
height: 16px;
|
1349 |
-
border: 1px solid #707070;
|
1350 |
-
display: inline-block;
|
1351 |
-
position: absolute;
|
1352 |
-
margin: 0 auto;
|
1353 |
-
left: 0;
|
1354 |
-
right: 0;
|
1355 |
-
top: 0;
|
1356 |
-
border-radius: 50%;
|
1357 |
-
z-index: 10;
|
1358 |
-
background-color: #F2F2F2;
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li::before {
|
1362 |
-
content: '' !important;
|
1363 |
-
width: 100%;
|
1364 |
-
border: 2px solid #5E5E5E;
|
1365 |
-
display: inline-block;
|
1366 |
-
position: absolute;
|
1367 |
-
left: 50%;
|
1368 |
-
top: 0;
|
1369 |
-
margin-top: 5px;
|
1370 |
-
}
|
1371 |
-
|
1372 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current {
|
1373 |
-
background-color: transparent;
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current .wiz-title {
|
1377 |
-
color: #25283D;
|
1378 |
-
font-weight: 700;
|
1379 |
-
}
|
1380 |
-
|
1381 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current a::after {
|
1382 |
-
content: '' !important;
|
1383 |
-
width: calc(16px - 8px);
|
1384 |
-
height: calc(16px - 8px);
|
1385 |
-
background-color: #2D62ED;
|
1386 |
-
display: inline-block;
|
1387 |
-
position: absolute;
|
1388 |
-
margin: 0 auto;
|
1389 |
-
left: 0;
|
1390 |
-
right: 0;
|
1391 |
-
top: 0;
|
1392 |
-
margin-top: 4px;
|
1393 |
-
border-radius: 50%;
|
1394 |
-
z-index: 10;
|
1395 |
-
}
|
1396 |
-
|
1397 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a::before {
|
1398 |
-
top: 0;
|
1399 |
-
width: 16px;
|
1400 |
-
height: 16px;
|
1401 |
-
background-size: 16px auto;
|
1402 |
-
border-color: transparent;
|
1403 |
-
}
|
1404 |
-
|
1405 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a::after {
|
1406 |
-
display: none;
|
1407 |
-
}
|
1408 |
-
|
1409 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a .wiz-title {
|
1410 |
-
color: #25283D;
|
1411 |
-
font-weight: 400;
|
1412 |
-
}
|
1413 |
-
|
1414 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content {
|
1415 |
-
background-color: transparent;
|
1416 |
-
-ms-box-shadow: none;
|
1417 |
-
-webkit-box-shadow: none;
|
1418 |
-
box-shadow: none;
|
1419 |
-
padding: 0;
|
1420 |
-
margin-bottom: 30px;
|
1421 |
-
overflow: initial;
|
1422 |
-
}
|
1423 |
-
|
1424 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content > .body {
|
1425 |
-
padding: 0;
|
1426 |
-
}
|
1427 |
-
|
1428 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper {
|
1429 |
-
background-color: #F2F2F2;
|
1430 |
-
-ms-box-shadow: none;
|
1431 |
-
-webkit-box-shadow: none;
|
1432 |
-
box-shadow: none;
|
1433 |
-
padding: 0;
|
1434 |
-
border-radius: 15px;
|
1435 |
-
}
|
1436 |
-
|
1437 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child {
|
1438 |
-
background-color: #000338;
|
1439 |
-
padding: 3px;
|
1440 |
-
margin-bottom: 1rem;
|
1441 |
-
margin-left: 0;
|
1442 |
-
margin-right: 0;
|
1443 |
-
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
1444 |
-
}
|
1445 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .col-6:first-child{
|
1446 |
-
border-right: 1px solid #FFFFFF;
|
1447 |
-
}
|
1448 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .heading-tbl {
|
1449 |
-
margin-bottom: 0;
|
1450 |
-
font-size: 15px;
|
1451 |
-
color: #FFFFFF;
|
1452 |
-
text-decoration: none;
|
1453 |
-
font-weight: normal;
|
1454 |
-
text-align: center;
|
1455 |
-
}
|
1456 |
-
|
1457 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .col-6:last-child .heading-tbl {
|
1458 |
-
border-right: 0;
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row .col-6 .form-group {
|
1462 |
-
padding-left: 15px;
|
1463 |
-
padding-right: 15px;
|
1464 |
-
margin-bottom: 10px;
|
1465 |
-
}
|
1466 |
-
|
1467 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row .col-6 .form-group .form-label-control {
|
1468 |
-
margin-bottom: 0;
|
1469 |
-
}
|
1470 |
-
|
1471 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .heading-tbl {
|
1472 |
-
font-size: 16px;
|
1473 |
-
text-decoration: underline;
|
1474 |
-
margin-bottom: 1rem;
|
1475 |
-
font-weight: 400;
|
1476 |
-
}
|
1477 |
-
|
1478 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .content .td-head {
|
1479 |
-
display: block;
|
1480 |
-
font-weight: 700;
|
1481 |
-
text-align: right;
|
1482 |
-
}
|
1483 |
-
|
1484 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .actions {
|
1485 |
-
position: static;
|
1486 |
-
height: auto;
|
1487 |
-
padding: 0;
|
1488 |
-
}
|
1489 |
-
|
1490 |
-
.wizard-section.campaign-wizard .wizard-content .wizard .actions ul {
|
1491 |
-
-webkit-box-pack: start;
|
1492 |
-
-ms-flex-pack: start;
|
1493 |
-
justify-content: flex-start;
|
1494 |
-
}
|
1495 |
-
|
1496 |
-
.sync-new-product .product-card {
|
1497 |
-
background-color: #F2F2F2;
|
1498 |
-
border-radius: 10px;
|
1499 |
-
-ms-box-shadow: 0 3px 6px #00000029;
|
1500 |
-
-webkit-box-shadow: 0 3px 6px #00000029;
|
1501 |
-
box-shadow: 0 3px 6px #00000029;
|
1502 |
-
margin-top: 1rem;
|
1503 |
-
}
|
1504 |
-
|
1505 |
-
.sync-new-product .product-card .row {
|
1506 |
-
margin-left: 0;
|
1507 |
-
margin-right: 0;
|
1508 |
-
}
|
1509 |
-
|
1510 |
-
.sync-new-product .product-card .row [class*="col-"] {
|
1511 |
-
padding: 0;
|
1512 |
-
}
|
1513 |
-
|
1514 |
-
.sync-new-product .product-card .row [class*="col-"]:first-child .card {
|
1515 |
-
border-radius: calc(10px - 1px) 0 0 calc(10px - 1px);
|
1516 |
-
margin-left: -1px;
|
1517 |
-
}
|
1518 |
-
|
1519 |
-
.sync-new-product .product-card .row [class*="col-"]:last-child .card {
|
1520 |
-
border-radius: 0 0 calc(10px - 1px) calc(10px - 1px);
|
1521 |
-
margin-right: -1px;
|
1522 |
-
}
|
1523 |
-
|
1524 |
-
.sync-new-product .product-card .row [class*="col"]:last-child .card:after {
|
1525 |
-
border-right: 0;
|
1526 |
-
}
|
1527 |
-
|
1528 |
-
.sync-new-product .product-card .card {
|
1529 |
-
border: 0;
|
1530 |
-
padding: 10px 5px;
|
1531 |
-
text-align: center;
|
1532 |
-
border-radius: 0;
|
1533 |
-
background-color: transparent;
|
1534 |
-
box-shadow: none;
|
1535 |
-
margin: 0;
|
1536 |
-
}
|
1537 |
-
|
1538 |
-
.sync-new-product .product-card .col:after {
|
1539 |
-
content: '';
|
1540 |
-
border-right: 1px solid #A9A9A9;
|
1541 |
-
display: block;
|
1542 |
-
position: absolute;
|
1543 |
-
top: 8px;
|
1544 |
-
bottom: 8px;
|
1545 |
-
right: 0;
|
1546 |
-
}
|
1547 |
-
.sync-new-product .product-card .col:last-child:after {
|
1548 |
-
border-right: 0;
|
1549 |
-
}
|
1550 |
-
|
1551 |
-
.sync-new-product .product-card .card.active {
|
1552 |
-
background-color: #FFFFFF;
|
1553 |
-
}
|
1554 |
-
|
1555 |
-
.sync-new-product .product-card .card.active .pro-title, .sync-new-product .product-card .card.active .pro-count {
|
1556 |
-
color: #2D62ED !important;
|
1557 |
-
}
|
1558 |
-
|
1559 |
-
.sync-new-product .product-card .card.active:before {
|
1560 |
-
content: '';
|
1561 |
-
border-bottom: 2px solid #2D62ED;
|
1562 |
-
display: block;
|
1563 |
-
position: absolute;
|
1564 |
-
left: 5px;
|
1565 |
-
bottom: 0;
|
1566 |
-
right: 5px;
|
1567 |
-
}
|
1568 |
-
|
1569 |
-
.sync-new-product .product-card .card.active:after {
|
1570 |
-
border-color: #FFFFFF;
|
1571 |
-
}
|
1572 |
-
|
1573 |
-
.sync-new-product .product-card .card .pro-title {
|
1574 |
-
font-weight: 400;
|
1575 |
-
margin-bottom: 0;
|
1576 |
-
}
|
1577 |
-
|
1578 |
-
.sync-new-product .product-card .card .pro-count {
|
1579 |
-
font-size: 35px;
|
1580 |
-
font-weight: 900;
|
1581 |
-
margin-bottom: 0;
|
1582 |
-
}
|
1583 |
-
|
1584 |
-
.sync-new-product .product-card .card.pending .pro-count, .sync-new-product .product-card .card.pending .pro-title {
|
1585 |
-
color: #5E5E5E;
|
1586 |
-
}
|
1587 |
-
|
1588 |
-
.sync-new-product .product-card .card.approved .pro-count, .sync-new-product .product-card .card.approved .pro-title {
|
1589 |
-
color: #66BB6A;
|
1590 |
-
}
|
1591 |
-
|
1592 |
-
.sync-new-product .product-card .card.disapproved .pro-count, .sync-new-product .product-card .card.disapproved .pro-title {
|
1593 |
-
color: #EE2C3C;
|
1594 |
-
}
|
1595 |
-
|
1596 |
-
.sync-new-product .title {
|
1597 |
-
font-size: 14px;
|
1598 |
-
font-weight: 500;
|
1599 |
-
}
|
1600 |
-
|
1601 |
-
.feature-list-section {
|
1602 |
-
background: transparent linear-gradient(63deg, #03D7FD 0%, #0872FC 100%) 0% 0% no-repeat padding-box;
|
1603 |
-
border-radius: 15px;
|
1604 |
-
padding: 15px 30px;
|
1605 |
-
margin-top: 30px;
|
1606 |
-
}
|
1607 |
-
|
1608 |
-
.feature-list-section .feature-heading {
|
1609 |
-
text-align: center;
|
1610 |
-
margin-bottom: 30px;
|
1611 |
-
}
|
1612 |
-
|
1613 |
-
.feature-list-section .feature-heading span {
|
1614 |
-
border-bottom: 1px solid #FFFFFF;
|
1615 |
-
padding: 0 10px 5px 10px;
|
1616 |
-
font-size: 18px;
|
1617 |
-
color: #FFFFFF;
|
1618 |
-
}
|
1619 |
-
|
1620 |
-
.feature-list-section .media {
|
1621 |
-
position: relative;
|
1622 |
-
max-width: 85%;
|
1623 |
-
}
|
1624 |
-
|
1625 |
-
.feature-list-section .media .feature-icon {
|
1626 |
-
width: 50px;
|
1627 |
-
margin-right: 20px;
|
1628 |
-
}
|
1629 |
-
|
1630 |
-
.feature-list-section .media .feature-icon .img-tg {
|
1631 |
-
max-width: 50px;
|
1632 |
-
}
|
1633 |
-
|
1634 |
-
.feature-list-section .media .title-feature {
|
1635 |
-
color: #FFFFFF;
|
1636 |
-
font-size: 14px;
|
1637 |
-
font-weight: 900;
|
1638 |
-
margin-bottom: 6px;
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
.feature-list-section .media .feature-content {
|
1642 |
-
color: #FFFFFF;
|
1643 |
-
font-weight: 300;
|
1644 |
-
margin-bottom: 0;
|
1645 |
-
}
|
1646 |
-
|
1647 |
-
.feature-list-section .media.lock .feature-icon, .feature-list-section .media.lock .media-body {
|
1648 |
-
opacity: 0.5;
|
1649 |
-
}
|
1650 |
-
|
1651 |
-
.feature-list-section .media .lock-icon {
|
1652 |
-
position: absolute;
|
1653 |
-
top: 12px;
|
1654 |
-
left: -30px;
|
1655 |
-
}
|
1656 |
-
|
1657 |
-
.feature-list-section .list-section {
|
1658 |
-
margin-bottom: 0;
|
1659 |
-
}
|
1660 |
-
|
1661 |
-
.feature-list-section .list-section .row > [class*="col-"] {
|
1662 |
-
padding-bottom: 15px;
|
1663 |
-
display: -webkit-box;
|
1664 |
-
display: -ms-flexbox;
|
1665 |
-
display: flex;
|
1666 |
-
-webkit-box-pack: center;
|
1667 |
-
-ms-flex-pack: center;
|
1668 |
-
justify-content: center;
|
1669 |
-
}
|
1670 |
-
|
1671 |
-
.feature-list-section .unlock-premium {
|
1672 |
-
text-align: center;
|
1673 |
-
margin-top: 50px;
|
1674 |
-
}
|
1675 |
-
|
1676 |
-
.feature-list-section .unlock-premium .btn:hover img, .feature-list-section .unlock-premium .btn:focus img {
|
1677 |
-
-webkit-filter: grayscale(100%) brightness(100);
|
1678 |
-
filter: grayscale(100%) brightness(100);
|
1679 |
-
}
|
1680 |
-
|
1681 |
-
.google-slider {
|
1682 |
-
margin-top: 30px;
|
1683 |
-
-ms-box-shadow: 1px 1px 4px #00000026;
|
1684 |
-
-webkit-box-shadow: 1px 1px 4px #00000026;
|
1685 |
-
box-shadow: 1px 1px 4px #00000026;
|
1686 |
-
padding: 30px;
|
1687 |
-
border-radius: 15px;
|
1688 |
-
}
|
1689 |
-
|
1690 |
-
.google-slider .slider-img img {
|
1691 |
-
max-width: 400px;
|
1692 |
-
}
|
1693 |
-
|
1694 |
-
.google-slider .sld-hd {
|
1695 |
-
font-size: 12px;
|
1696 |
-
color: #A9A9A9;
|
1697 |
-
margin-bottom: 15px;
|
1698 |
-
}
|
1699 |
-
|
1700 |
-
.google-slider .sld-sbhd {
|
1701 |
-
font-size: 18px;
|
1702 |
-
margin-bottom: 15px;
|
1703 |
-
font-weight: 700;
|
1704 |
-
}
|
1705 |
-
|
1706 |
-
.google-slider .sld-cnt {
|
1707 |
-
font-size: 14px;
|
1708 |
-
color: #5E5E5E;
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
.google-slider .sld-list {
|
1712 |
-
margin-bottom: 0;
|
1713 |
-
margin-top: 30px;
|
1714 |
-
}
|
1715 |
-
|
1716 |
-
.google-slider .sld-list li {
|
1717 |
-
margin-bottom: 12px;
|
1718 |
-
font-weight: 700;
|
1719 |
-
font-size: 14px;
|
1720 |
-
position: relative;
|
1721 |
-
padding-left: 24px;
|
1722 |
-
}
|
1723 |
-
|
1724 |
-
.google-slider .sld-list li:last-child {
|
1725 |
-
margin-bottom: 0;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
.google-slider .sld-list li .tick-icon {
|
1729 |
-
position: absolute;
|
1730 |
-
left: 0;
|
1731 |
-
top: 5px;
|
1732 |
-
width: 14px;
|
1733 |
-
}
|
1734 |
-
|
1735 |
-
.google-slider .carousel-item {
|
1736 |
-
padding: 0 30px;
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
.testimonials {
|
1740 |
-
margin-top: 30px;
|
1741 |
-
}
|
1742 |
-
|
1743 |
-
.testimonials ul li {
|
1744 |
-
margin-bottom: 15px;
|
1745 |
-
}
|
1746 |
-
|
1747 |
-
.testimonials ul li:last-child {
|
1748 |
-
margin-bottom: 0;
|
1749 |
-
}
|
1750 |
-
|
1751 |
-
.testimonials ul li:nth-child(even) .user-details {
|
1752 |
-
-webkit-box-ordinal-group: 3;
|
1753 |
-
-ms-flex-order: 2;
|
1754 |
-
order: 2;
|
1755 |
-
margin-left: 50px;
|
1756 |
-
margin-right: 0 !important;
|
1757 |
-
}
|
1758 |
-
|
1759 |
-
.testimonials ul li:nth-child(even) .media-body {
|
1760 |
-
-webkit-box-ordinal-group: 2;
|
1761 |
-
-ms-flex-order: 1;
|
1762 |
-
order: 1;
|
1763 |
-
}
|
1764 |
-
|
1765 |
-
.testimonials ul li .testimonila-box {
|
1766 |
-
background-color: #000338;
|
1767 |
-
padding: 15px 30px;
|
1768 |
-
border-radius: 15px;
|
1769 |
-
}
|
1770 |
-
|
1771 |
-
.testimonials ul li .testimonila-box .user-details {
|
1772 |
-
margin-right: 50px;
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
.testimonials ul li .testimonila-box .user-details .user-image-box {
|
1776 |
-
width: 100px;
|
1777 |
-
height: 100px;
|
1778 |
-
border-radius: 50%;
|
1779 |
-
margin: 0 auto 5px auto;
|
1780 |
-
}
|
1781 |
-
|
1782 |
-
.testimonials ul li .testimonila-box .user-details .user-image-box .user-image {
|
1783 |
-
border-radius: 50%;
|
1784 |
-
width: 100%;
|
1785 |
-
height: 100%;
|
1786 |
-
-o-object-fit: cover;
|
1787 |
-
object-fit: cover;
|
1788 |
-
}
|
1789 |
-
|
1790 |
-
.testimonials ul li .testimonila-box .user-details .user-name {
|
1791 |
-
font-size: 12px;
|
1792 |
-
color: #FFFFFF;
|
1793 |
-
margin-bottom: 3px;
|
1794 |
-
text-align: center;
|
1795 |
-
}
|
1796 |
-
|
1797 |
-
.testimonials ul li .testimonila-box .user-details .designation {
|
1798 |
-
color: #FFFFFF;
|
1799 |
-
font-weight: 300;
|
1800 |
-
text-align: center;
|
1801 |
-
font-size: 12px;
|
1802 |
-
margin-bottom: 0;
|
1803 |
-
}
|
1804 |
-
|
1805 |
-
.testimonials ul li .testimonila-box .testi-content {
|
1806 |
-
color: #FFFFFF;
|
1807 |
-
font-size: 13px;
|
1808 |
-
font-weight: 300;
|
1809 |
-
padding: 0 20px;
|
1810 |
-
margin-bottom: 0;
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
.testimonials ul li .testimonila-box .quote {
|
1814 |
-
font-weight: 900;
|
1815 |
-
font-size: 30px;
|
1816 |
-
opacity: rgba(255, 255, 255, 0.5);
|
1817 |
-
margin-bottom: 0;
|
1818 |
-
}
|
1819 |
-
|
1820 |
-
.carousel-indicators {
|
1821 |
-
bottom: -30px;
|
1822 |
-
}
|
1823 |
-
|
1824 |
-
.carousel-indicators li {
|
1825 |
-
width: 7px;
|
1826 |
-
height: 7px;
|
1827 |
-
border: 1px solid #FFFFFF;
|
1828 |
-
background-color: transparent;
|
1829 |
-
border-radius: 50%;
|
1830 |
-
opacity: 1;
|
1831 |
-
}
|
1832 |
-
|
1833 |
-
.carousel-indicators li.active {
|
1834 |
-
background-color: #FFFFFF;
|
1835 |
-
border-color: #FFFFFF;
|
1836 |
-
}
|
1837 |
-
|
1838 |
-
.carousel-control-prev, .carousel-control-next {
|
1839 |
-
opacity: 1;
|
1840 |
-
width: auto;
|
1841 |
-
bottom: auto;
|
1842 |
-
top: 50%;
|
1843 |
-
-webkit-transform: translateY(-50%);
|
1844 |
-
transform: translateY(-50%);
|
1845 |
-
left: -15px;
|
1846 |
-
}
|
1847 |
-
|
1848 |
-
.carousel-control-prev .carousel-control-prev-icon, .carousel-control-next .carousel-control-prev-icon {
|
1849 |
-
background-image: none;
|
1850 |
-
}
|
1851 |
-
|
1852 |
-
.carousel-control-prev .carousel-control-prev-icon img, .carousel-control-next .carousel-control-prev-icon img {
|
1853 |
-
-webkit-transform: rotate(90deg);
|
1854 |
-
transform: rotate(90deg);
|
1855 |
-
width: 15px;
|
1856 |
-
}
|
1857 |
-
|
1858 |
-
.carousel-control-next {
|
1859 |
-
left: auto;
|
1860 |
-
right: -15px;
|
1861 |
-
}
|
1862 |
-
|
1863 |
-
.carousel-control-next .carousel-control-next-icon {
|
1864 |
-
background-image: none;
|
1865 |
-
}
|
1866 |
-
|
1867 |
-
.carousel-control-next .carousel-control-next-icon img {
|
1868 |
-
-webkit-transform: rotate(-90deg);
|
1869 |
-
transform: rotate(-90deg);
|
1870 |
-
width: 15px;
|
1871 |
-
}
|
1872 |
-
|
1873 |
-
.rating {
|
1874 |
-
padding: 30px 0 0 0;
|
1875 |
-
text-align: center;
|
1876 |
-
}
|
1877 |
-
|
1878 |
-
.rating .rating-text {
|
1879 |
-
font-size: 18px;
|
1880 |
-
font-weight: 700;
|
1881 |
-
margin-left: 24px;
|
1882 |
-
}
|
1883 |
-
|
1884 |
-
.upgrade-section {
|
1885 |
-
margin-bottom: 30px;
|
1886 |
-
}
|
1887 |
-
|
1888 |
-
.upgrade-section .upgrade-info {
|
1889 |
-
background-color: #F2F2F2;
|
1890 |
-
padding: 10px 15px;
|
1891 |
-
border-radius: 15px;
|
1892 |
-
}
|
1893 |
-
|
1894 |
-
.upgrade-section .upgrade-info span {
|
1895 |
-
font-size: 16px;
|
1896 |
-
}
|
1897 |
-
|
1898 |
-
.upgrade-section .upgrade-info .btn-outline-primary {
|
1899 |
-
background-color: #FFFFFF;
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
.upgrade-section .package-details {
|
1903 |
-
margin-top: 30px;
|
1904 |
-
}
|
1905 |
-
|
1906 |
-
.upgrade-section .package-details .package-card {
|
1907 |
-
border: 0;
|
1908 |
-
border-radius: 15px;
|
1909 |
-
-ms-box-shadow: 0 3px 10px #00000029;
|
1910 |
-
-webkit-box-shadow: 0 3px 10px #00000029;
|
1911 |
-
box-shadow: 0 3px 10px #00000029;
|
1912 |
-
}
|
1913 |
-
|
1914 |
-
.upgrade-section .package-details .package-card .card-header {
|
1915 |
-
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
1916 |
-
border-bottom: 0;
|
1917 |
-
background: transparent -webkit-gradient(linear, right top, left top, from(#03D7FD), to(#0872FC)) 0% 0% no-repeat padding-box;
|
1918 |
-
background: transparent linear-gradient(270deg, #03D7FD 0%, #0872FC 100%) 0% 0% no-repeat padding-box;
|
1919 |
-
padding: 25px;
|
1920 |
-
}
|
1921 |
-
|
1922 |
-
.upgrade-section .package-details .package-card .card-header .package-name {
|
1923 |
-
color: #FFFFFF;
|
1924 |
-
font-weight: 900;
|
1925 |
-
font-size: 18px;
|
1926 |
-
margin-bottom: 0;
|
1927 |
-
}
|
1928 |
-
|
1929 |
-
.upgrade-section .package-details .package-card .card-body {
|
1930 |
-
padding: 25px 25px 0 25px;
|
1931 |
-
}
|
1932 |
-
|
1933 |
-
.upgrade-section .package-details .package-card .card-body .service-provide li {
|
1934 |
-
color: #7F7F7F;
|
1935 |
-
border-bottom: 1px solid #EDEDED;
|
1936 |
-
padding-bottom: 10px;
|
1937 |
-
padding-top: 10px;
|
1938 |
-
}
|
1939 |
-
|
1940 |
-
.upgrade-section .package-details .package-card .card-body .service-provide li:first-child {
|
1941 |
-
padding-top: 0;
|
1942 |
-
}
|
1943 |
-
|
1944 |
-
.upgrade-section .package-details .package-card .card-body .service-provide li:last-child {
|
1945 |
-
border-bottom: 0;
|
1946 |
-
}
|
1947 |
-
|
1948 |
-
.upgrade-section .package-details .package-card .card-body .service-provide li img {
|
1949 |
-
max-width: 15px;
|
1950 |
-
}
|
1951 |
-
|
1952 |
-
.upgrade-section .package-details .package-card .card-footer {
|
1953 |
-
border-radius: 0 0 calc(15px - 1px) calc(15px - 1px);
|
1954 |
-
border-bottom: 0;
|
1955 |
-
background-color: transparent;
|
1956 |
-
border-top: 0;
|
1957 |
-
text-align: center;
|
1958 |
-
padding: 25px;
|
1959 |
-
}
|
1960 |
-
|
1961 |
-
.back-btn {
|
1962 |
-
padding: 0;
|
1963 |
-
color: #25283D;
|
1964 |
-
position: relative;
|
1965 |
-
left: 0;
|
1966 |
-
font-size: 12px;
|
1967 |
-
}
|
1968 |
-
|
1969 |
-
.back-btn span {
|
1970 |
-
vertical-align: middle;
|
1971 |
-
padding-left: 3px;
|
1972 |
-
}
|
1973 |
-
|
1974 |
-
.edit-section .edit-tabs {
|
1975 |
-
border: 0.5px solid #A9A9A9;
|
1976 |
-
border-radius: 15px;
|
1977 |
-
}
|
1978 |
-
|
1979 |
-
.edit-section .edit-tabs .nav-item {
|
1980 |
-
margin-bottom: 0;
|
1981 |
-
}
|
1982 |
-
|
1983 |
-
.edit-section .edit-tabs .nav-item:last-child .nav-link {
|
1984 |
-
border-right: 0;
|
1985 |
-
border-radius: 0 calc(15px - 1px) calc(15px - 1px) 0;
|
1986 |
-
margin-right: -1px;
|
1987 |
-
}
|
1988 |
-
|
1989 |
-
.edit-section .edit-tabs .nav-item:first-child .nav-link {
|
1990 |
-
border-radius: calc(15px - 1px) 0 0 calc(15px - 1px);
|
1991 |
-
}
|
1992 |
-
|
1993 |
-
.edit-section .edit-tabs .nav-link {
|
1994 |
-
border: 0;
|
1995 |
-
border-right: 0.5px solid #A9A9A9;
|
1996 |
-
border-radius: 0;
|
1997 |
-
color: #5E5E5E;
|
1998 |
-
font-size: 16px;
|
1999 |
-
font-weight: 700;
|
2000 |
-
padding: 12px 8px;
|
2001 |
-
}
|
2002 |
-
.edit-section .edit-tabs .nav-link a{
|
2003 |
-
color: #5E5E5E;
|
2004 |
-
}
|
2005 |
-
|
2006 |
-
.edit-section .edit-tabs .nav-link.active {
|
2007 |
-
background-color: #000338 !important;
|
2008 |
-
color: #FFFFFF !important;
|
2009 |
-
}
|
2010 |
-
.edit-section .edit-tabs .nav-link.active a{
|
2011 |
-
background-color: #000338 !important;
|
2012 |
-
color: #FFFFFF !important;
|
2013 |
-
}
|
2014 |
-
|
2015 |
-
.product-title {
|
2016 |
-
font-size: 16px;
|
2017 |
-
font-weight: 700;
|
2018 |
-
color: #5E5E5E;
|
2019 |
-
margin-bottom: 15px;
|
2020 |
-
}
|
2021 |
-
|
2022 |
-
.total-products {
|
2023 |
-
margin-top: 30px;
|
2024 |
-
}
|
2025 |
-
|
2026 |
-
.total-products .table-section {
|
2027 |
-
background-color: #F2F2F2;
|
2028 |
-
border-radius: 15px;
|
2029 |
-
padding: 0 15px;
|
2030 |
-
border: 0;
|
2031 |
-
-ms-box-shadow: none;
|
2032 |
-
-webkit-box-shadow: none;
|
2033 |
-
box-shadow: none;
|
2034 |
-
}
|
2035 |
-
|
2036 |
-
.total-products .table-section .table th, .total-products .table-section .table td {
|
2037 |
-
color: #5E5E5E;
|
2038 |
-
}
|
2039 |
-
|
2040 |
-
.total-products .table-section .table tr th {
|
2041 |
-
padding: 10px 10px;
|
2042 |
-
}
|
2043 |
-
|
2044 |
-
.total-products .table-section .table tbody tr td {
|
2045 |
-
padding: 25px 10px;
|
2046 |
-
background-color: #FFFFFF;
|
2047 |
-
vertical-align: middle;
|
2048 |
-
position: relative;
|
2049 |
-
}
|
2050 |
-
|
2051 |
-
.total-products .table-section .table tbody tr td:after {
|
2052 |
-
content: '';
|
2053 |
-
border-right: 1px solid #A9A9A9;
|
2054 |
-
display: block;
|
2055 |
-
position: absolute;
|
2056 |
-
top: 10px;
|
2057 |
-
bottom: 20px;
|
2058 |
-
right: 0;
|
2059 |
-
}
|
2060 |
-
.total-products .table-section .table tbody tr td:before{
|
2061 |
-
content: '';
|
2062 |
-
border-bottom: 10px solid #f2f2f2;
|
2063 |
-
position: absolute;
|
2064 |
-
display: block;
|
2065 |
-
width: 100%;
|
2066 |
-
top: 10px;
|
2067 |
-
bottom: 0px;
|
2068 |
-
right: 0;
|
2069 |
-
}
|
2070 |
-
|
2071 |
-
.total-products .table-section .table tbody tr td:first-child {
|
2072 |
-
border-radius: 15px 0 0 15px;
|
2073 |
-
}
|
2074 |
-
|
2075 |
-
.total-products .table-section .table tbody tr td:first-child:after {
|
2076 |
-
border-right: 0;
|
2077 |
-
}
|
2078 |
-
|
2079 |
-
.total-products .table-section .table tbody tr td:last-child {
|
2080 |
-
border-radius: 0 15px 15px 0;
|
2081 |
-
}
|
2082 |
-
|
2083 |
-
.total-products .table-section .table tbody tr td:last-child:after {
|
2084 |
-
border-right: 0;
|
2085 |
-
}
|
2086 |
-
|
2087 |
-
.total-products .table-section .table tbody tr td.product-image {
|
2088 |
-
width: 80px;
|
2089 |
-
}
|
2090 |
-
|
2091 |
-
.smart-shopping-section .sec-title {
|
2092 |
-
font-size: 16px;
|
2093 |
-
font-weight: 700;
|
2094 |
-
}
|
2095 |
-
|
2096 |
-
.smart-shopping-section .create-campaign-btn .btn {
|
2097 |
-
width: 190px;
|
2098 |
-
}
|
2099 |
-
|
2100 |
-
.account-performance {
|
2101 |
-
margin-top: 15px;
|
2102 |
-
}
|
2103 |
-
|
2104 |
-
.pro-account {
|
2105 |
-
max-width: 250px;
|
2106 |
-
position: relative;
|
2107 |
-
margin-top: 65px;
|
2108 |
-
}
|
2109 |
-
|
2110 |
-
.pro-account .card {
|
2111 |
-
border: 0;
|
2112 |
-
border-radius: 10px;
|
2113 |
-
-ms-box-shadow: 0 3px 6px #272D3B33;
|
2114 |
-
-webkit-box-shadow: 0 3px 6px #272D3B33;
|
2115 |
-
box-shadow: 0 3px 6px #272D3B33;
|
2116 |
-
}
|
2117 |
-
|
2118 |
-
.pro-account .card .card-footer {
|
2119 |
-
background-color: transparent;
|
2120 |
-
border-top: 0;
|
2121 |
-
text-align: center;
|
2122 |
-
}
|
2123 |
-
|
2124 |
-
.pro-account .card .card-body .account-img {
|
2125 |
-
margin-bottom: 15px;
|
2126 |
-
position: absolute;
|
2127 |
-
top: -60px;
|
2128 |
-
}
|
2129 |
-
|
2130 |
-
.pro-account .card .card-body .account-img img {
|
2131 |
-
max-width: 100%;
|
2132 |
-
}
|
2133 |
-
|
2134 |
-
.pro-account .card .card-body .pro-content {
|
2135 |
-
margin-top: 90px;
|
2136 |
-
}
|
2137 |
-
|
2138 |
-
.pro-account .card .card-body .pro-content p {
|
2139 |
-
margin-bottom: 0;
|
2140 |
-
}
|
2141 |
-
|
2142 |
-
.pro-account .card .card-body .userName {
|
2143 |
-
font-weight: 900;
|
2144 |
-
font-size: 14px;
|
2145 |
-
}
|
2146 |
-
|
2147 |
-
/*.dataTables_info {
|
2148 |
-
display: none;
|
2149 |
-
}*/
|
2150 |
-
|
2151 |
-
.informanal-section {
|
2152 |
-
margin-left: 3px;
|
2153 |
-
}
|
2154 |
-
|
2155 |
-
.informanal-section img {
|
2156 |
-
width: 12px;
|
2157 |
-
}
|
2158 |
-
|
2159 |
-
.mt--top {
|
2160 |
-
margin-top: -60px;
|
2161 |
-
}
|
2162 |
-
|
2163 |
-
.bottom-section {
|
2164 |
-
position: fixed;
|
2165 |
-
right: 70px;
|
2166 |
-
bottom: 30px;
|
2167 |
-
}
|
2168 |
-
|
2169 |
-
.bottom-section .dropdown .btn {
|
2170 |
-
width: 50px;
|
2171 |
-
height: 50px;
|
2172 |
-
padding: 10px;
|
2173 |
-
background-color: #000338;
|
2174 |
-
position: relative;
|
2175 |
-
z-index: 1001;
|
2176 |
-
}
|
2177 |
-
|
2178 |
-
.bottom-section .dropdown .btn img {
|
2179 |
-
max-width: 100%;
|
2180 |
-
max-height: 100%;
|
2181 |
-
}
|
2182 |
-
|
2183 |
-
.bottom-section .dropdown .dropdown-menu {
|
2184 |
-
background-color: transparent;
|
2185 |
-
border: 0;
|
2186 |
-
min-width: auto;
|
2187 |
-
display: block !important;
|
2188 |
-
-webkit-transform: none !important;
|
2189 |
-
transform: none !important;
|
2190 |
-
top: auto !important;
|
2191 |
-
bottom: 100%;
|
2192 |
-
padding: 0;
|
2193 |
-
margin: 0;
|
2194 |
-
right: 0;
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
.bottom-section .dropdown .dropdown-menu li {
|
2198 |
-
padding: 0;
|
2199 |
-
position: relative;
|
2200 |
-
margin: 10px 0;
|
2201 |
-
}
|
2202 |
-
|
2203 |
-
.bottom-section .dropdown .dropdown-menu li .item-text {
|
2204 |
-
padding-left: 45px;
|
2205 |
-
padding-top: 10px;
|
2206 |
-
display: block;
|
2207 |
-
color: #000338;
|
2208 |
-
display: none;
|
2209 |
-
}
|
2210 |
-
|
2211 |
-
.bottom-section .dropdown .dropdown-menu li:after {
|
2212 |
-
content: '';
|
2213 |
-
height: 100%;
|
2214 |
-
width: 1px;
|
2215 |
-
border-left: 1px dashed #000338;
|
2216 |
-
position: absolute;
|
2217 |
-
top: 100%;
|
2218 |
-
bottom: 0;
|
2219 |
-
left: 50%;
|
2220 |
-
-webkit-transform: translateX(-50%);
|
2221 |
-
transform: translateX(-50%);
|
2222 |
-
}
|
2223 |
-
|
2224 |
-
.bottom-section .dropdown .dropdown-menu li .dropdown-item {
|
2225 |
-
width: calc(50px - 10px);
|
2226 |
-
height: calc(50px - 10px);
|
2227 |
-
padding: 0;
|
2228 |
-
background-color: #FFFFFF;
|
2229 |
-
border-radius: 50%;
|
2230 |
-
position: relative;
|
2231 |
-
z-index: 1;
|
2232 |
-
margin: 0 auto;
|
2233 |
-
}
|
2234 |
-
|
2235 |
-
.bottom-section .dropdown .dropdown-menu li .dropdown-item img {
|
2236 |
-
max-width: 50%;
|
2237 |
-
position: absolute;
|
2238 |
-
top: 50%;
|
2239 |
-
left: 50%;
|
2240 |
-
-webkit-transform: translate(-50%, -50%);
|
2241 |
-
transform: translate(-50%, -50%);
|
2242 |
-
}
|
2243 |
-
|
2244 |
-
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover {
|
2245 |
-
background-color: #03D7FD;
|
2246 |
-
}
|
2247 |
-
|
2248 |
-
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover img {
|
2249 |
-
-webkit-filter: grayscale(100%) brightness(30%) sepia(100%) hue-rotate(-180deg) saturate(700%) contrast(0.8);
|
2250 |
-
filter: grayscale(100%) brightness(30%) sepia(100%) hue-rotate(-180deg) saturate(700%) contrast(0.8);
|
2251 |
-
}
|
2252 |
-
|
2253 |
-
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover .item-text {
|
2254 |
-
display: block;
|
2255 |
-
}
|
2256 |
-
|
2257 |
-
.tapme .tooltip-inner {
|
2258 |
-
background-color: #03D7FD;
|
2259 |
-
color: #000338;
|
2260 |
-
border-radius: 500px;
|
2261 |
-
-ms-box-shadow: 0 3px 6px #00000029;
|
2262 |
-
-webkit-box-shadow: 0 3px 6px #00000029;
|
2263 |
-
box-shadow: 0 3px 6px #00000029;
|
2264 |
-
font-weight: 700;
|
2265 |
-
}
|
2266 |
-
|
2267 |
-
.wizard-section {
|
2268 |
-
padding: 20px 0;
|
2269 |
-
}
|
2270 |
-
|
2271 |
-
.wizard-section .wizard-content .wizard {
|
2272 |
-
overflow: initial;
|
2273 |
-
position: relative;
|
2274 |
-
}
|
2275 |
-
|
2276 |
-
.wizard-section .wizard-content .wizard .steps {
|
2277 |
-
margin-bottom: 15px;
|
2278 |
-
border-radius: 15px;
|
2279 |
-
background: #fff;
|
2280 |
-
-ms-box-shadow: 0 0 10px #00000029;
|
2281 |
-
-webkit-box-shadow: 0 0 10px #00000029;
|
2282 |
-
box-shadow: 0 0 10px #00000029;
|
2283 |
-
}
|
2284 |
-
|
2285 |
-
.wizard-section .wizard-content .wizard .steps ul li {
|
2286 |
-
text-align: left;
|
2287 |
-
padding: 15px 30px;
|
2288 |
-
border-right: 1px solid #EDEDED;
|
2289 |
-
}
|
2290 |
-
|
2291 |
-
.wizard-section .wizard-content .wizard .steps ul li:first-child {
|
2292 |
-
border-radius: 15px 0 0 15px;
|
2293 |
-
}
|
2294 |
-
|
2295 |
-
.wizard-section .wizard-content .wizard .steps ul li:last-child {
|
2296 |
-
border-right: 0;
|
2297 |
-
border-radius: 0 15px 15px 0;
|
2298 |
-
}
|
2299 |
-
|
2300 |
-
.wizard-section .wizard-content .wizard .steps ul li.current {
|
2301 |
-
background-color: #2D62ED;
|
2302 |
-
}
|
2303 |
-
|
2304 |
-
.wizard-section .wizard-content .wizard .steps ul li.current .step, .wizard-section .wizard-content .wizard .steps ul li.current .wiz-title {
|
2305 |
-
font-weight: 400;
|
2306 |
-
color: #FFFFFF;
|
2307 |
-
}
|
2308 |
-
|
2309 |
-
.wizard-section .wizard-content .wizard .steps ul li.current .step {
|
2310 |
-
background-color: transparent;
|
2311 |
-
}
|
2312 |
-
|
2313 |
-
.wizard-section .wizard-content .wizard .steps ul li.done a {
|
2314 |
-
padding-left: 25px;
|
2315 |
-
}
|
2316 |
-
|
2317 |
-
.wizard-section .wizard-content .wizard .steps ul li.done a:before {
|
2318 |
-
content: '' !important;
|
2319 |
-
width: 24px;
|
2320 |
-
height: 24px;
|
2321 |
-
position: absolute;
|
2322 |
-
background: url(../images/icon/tick-round.svg) no-repeat left top;
|
2323 |
-
background-size: 24px auto;
|
2324 |
-
top: 8px;
|
2325 |
-
left: -15px;
|
2326 |
-
}
|
2327 |
-
|
2328 |
-
.wizard-section .wizard-content .wizard .steps ul li.done .step {
|
2329 |
-
background-color: transparent;
|
2330 |
-
border-color: transparent;
|
2331 |
-
color: #9D9D9D;
|
2332 |
-
font-weight: 400;
|
2333 |
-
}
|
2334 |
-
|
2335 |
-
.wizard-section .wizard-content .wizard .steps ul li.done .wiz-title {
|
2336 |
-
color: #9D9D9D;
|
2337 |
-
font-weight: 400;
|
2338 |
-
}
|
2339 |
-
|
2340 |
-
.wizard-section .wizard-content .wizard .steps ul li a {
|
2341 |
-
padding: 0;
|
2342 |
-
margin: 0;
|
2343 |
-
-webkit-transition: none;
|
2344 |
-
transition: none;
|
2345 |
-
}
|
2346 |
-
|
2347 |
-
.wizard-section .wizard-content .wizard .steps ul li .step {
|
2348 |
-
width: auto;
|
2349 |
-
height: auto;
|
2350 |
-
border: 0;
|
2351 |
-
font-size: 14px;
|
2352 |
-
color: #9D9D9D;
|
2353 |
-
line-height: normal;
|
2354 |
-
border-radius: 0;
|
2355 |
-
position: static;
|
2356 |
-
margin: 0;
|
2357 |
-
display: block;
|
2358 |
-
text-align: left;
|
2359 |
-
font-weight: 700;
|
2360 |
-
}
|
2361 |
-
|
2362 |
-
.wizard-section .wizard-content .wizard .steps ul li:before {
|
2363 |
-
content: none !important;
|
2364 |
-
}
|
2365 |
-
|
2366 |
-
.wizard-section .wizard-content .wizard .steps ul li:after {
|
2367 |
-
content: none !important;
|
2368 |
-
}
|
2369 |
-
|
2370 |
-
.wizard-section .wizard-content .wizard .steps ul li .wiz-title {
|
2371 |
-
color: #9D9D9D;
|
2372 |
-
font-weight: 700;
|
2373 |
-
display: block;
|
2374 |
-
margin-top: 5px;
|
2375 |
-
}
|
2376 |
-
|
2377 |
-
.wizard-section .wizard-content .wizard .actions {
|
2378 |
-
margin-top: 0;
|
2379 |
-
text-align: center;
|
2380 |
-
position: absolute;
|
2381 |
-
height: 60px;
|
2382 |
-
bottom: 0;
|
2383 |
-
padding: 0 30px;
|
2384 |
-
}
|
2385 |
-
|
2386 |
-
.wizard-section .wizard-content .wizard .actions ul {
|
2387 |
-
width: 100%;
|
2388 |
-
display: -webkit-box;
|
2389 |
-
display: -ms-flexbox;
|
2390 |
-
display: flex;
|
2391 |
-
-webkit-box-pack: center;
|
2392 |
-
-ms-flex-pack: center;
|
2393 |
-
justify-content: center;
|
2394 |
-
}
|
2395 |
-
|
2396 |
-
.wizard-section .wizard-content .wizard .actions ul li {
|
2397 |
-
margin-left: 0 !important;
|
2398 |
-
margin-right: 25px;
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
.wizard-section .wizard-content .wizard .actions ul li a.next-step, .wizard-section .wizard-content .wizard .actions ul li a.prev-step {
|
2402 |
-
background: #2D62ED;
|
2403 |
-
min-width: 100px;
|
2404 |
-
font-weight: 700;
|
2405 |
-
color: #FFFFFF;
|
2406 |
-
border: 1px solid #2D62ED;
|
2407 |
-
border-radius: 500px;
|
2408 |
-
}
|
2409 |
-
|
2410 |
-
.wizard-section .wizard-content .wizard .actions ul li a.next-step:hover, .wizard-section .wizard-content .wizard .actions ul li a.prev-step:hover {
|
2411 |
-
background-color: #1248d5 !important;
|
2412 |
-
border-color: #1248d5 !important;
|
2413 |
-
color: #FFFFFF;
|
2414 |
-
}
|
2415 |
-
|
2416 |
-
.wizard-section .wizard-content .wizard .actions ul li a.prev-step {
|
2417 |
-
background-color: #F2F2F2;
|
2418 |
-
border-color: #F2F2F2;
|
2419 |
-
color: #25283D;
|
2420 |
-
}
|
2421 |
-
|
2422 |
-
.wizard-section .wizard-content .wizard .actions ul li a.prev-step:hover {
|
2423 |
-
background-color: #d9d9d9 !important;
|
2424 |
-
border-color: #d9d9d9 !important;
|
2425 |
-
color: #25283D;
|
2426 |
-
}
|
2427 |
-
|
2428 |
-
.wizard-section .wizard-content .wizard .actions ul li.disabled {
|
2429 |
-
display: none;
|
2430 |
-
}
|
2431 |
-
|
2432 |
-
.wizard-section .wizard-content .wizard .content {
|
2433 |
-
background-color: #FFFFFF;
|
2434 |
-
border-radius: 15px;
|
2435 |
-
-ms-box-shadow: 0 0 10px #00000029;
|
2436 |
-
-webkit-box-shadow: 0 0 10px #00000029;
|
2437 |
-
box-shadow: 0 0 10px #00000029;
|
2438 |
-
padding: 30px 30px 90px 30px;
|
2439 |
-
}
|
2440 |
-
|
2441 |
-
.creating-account {
|
2442 |
-
margin-bottom: 1rem;
|
2443 |
-
}
|
2444 |
-
|
2445 |
-
.creating-account li {
|
2446 |
-
position: relative;
|
2447 |
-
margin-bottom: 5px;
|
2448 |
-
color: #5E5E5E;
|
2449 |
-
}
|
2450 |
-
|
2451 |
-
.information {
|
2452 |
-
width: 20px;
|
2453 |
-
height: 20px;
|
2454 |
-
line-height: 20px;
|
2455 |
-
background-color: #5CB16D;
|
2456 |
-
border-radius: 50%;
|
2457 |
-
display: inline-block;
|
2458 |
-
color: #FFFFFF;
|
2459 |
-
text-align: center;
|
2460 |
-
font-size: 12px;
|
2461 |
-
position: relative;
|
2462 |
-
z-index: 2;
|
2463 |
-
}
|
2464 |
-
|
2465 |
-
.advance-settings {
|
2466 |
-
display: inline-block;
|
2467 |
-
position: relative;
|
2468 |
-
margin-left: 5px;
|
2469 |
-
}
|
2470 |
-
|
2471 |
-
.advance-settings .setting-icon {
|
2472 |
-
width: 20px;
|
2473 |
-
height: 20px;
|
2474 |
-
line-height: 16px;
|
2475 |
-
border: 1px solid #2D62ED;
|
2476 |
-
border-radius: 50%;
|
2477 |
-
display: block;
|
2478 |
-
color: #FFFFFF;
|
2479 |
-
text-align: center;
|
2480 |
-
font-size: 18px;
|
2481 |
-
color: #2D62ED;
|
2482 |
-
font-weight: 700;
|
2483 |
-
}
|
2484 |
-
|
2485 |
-
.advance-settings .dropdown-menu {
|
2486 |
-
background-color: #F7F7F7;
|
2487 |
-
min-width: 27rem;
|
2488 |
-
border-radius: 15px;
|
2489 |
-
border: 0;
|
2490 |
-
padding: 15px;
|
2491 |
-
}
|
2492 |
-
|
2493 |
-
.advance-settings .dropdown-menu .form-group {
|
2494 |
-
margin-bottom: 5px;
|
2495 |
-
}
|
2496 |
-
|
2497 |
-
.configuration-section .card {
|
2498 |
-
padding: 0px !important;
|
2499 |
-
}
|
2500 |
-
|
2501 |
-
.container {
|
2502 |
-
max-width: 100% !important;
|
2503 |
-
margin: 0px !important;
|
2504 |
-
}
|
2505 |
-
|
2506 |
-
.custom-thresold-label{
|
2507 |
-
font-size: 14px;
|
2508 |
-
color: #5E5E5E;
|
2509 |
-
}
|
2510 |
-
|
2511 |
-
.right-content .pagination .page-item .page-link img{
|
2512 |
-
width: 100%;
|
2513 |
-
height: 100%;
|
2514 |
-
}
|
2515 |
-
#feed-spinner {
|
2516 |
-
/* height: 50px; */
|
2517 |
-
left: 0;
|
2518 |
-
margin-left: 0;
|
2519 |
-
margin-top: 0;
|
2520 |
-
overflow: auto;
|
2521 |
-
position: fixed;
|
2522 |
-
text-align: center;
|
2523 |
-
top: 0;
|
2524 |
-
/* width: 50px; */
|
2525 |
-
z-index: 1234;
|
2526 |
-
background: rgba(255,255,255,0.65);
|
2527 |
-
bottom: 0;
|
2528 |
-
right: 0;
|
2529 |
-
}
|
2530 |
-
#feed-spinner img {
|
2531 |
-
position: absolute;
|
2532 |
-
top: 50%;
|
2533 |
-
left: 50%;
|
2534 |
-
transform: translate(-50%,-50%);
|
2535 |
-
}
|
2536 |
-
|
2537 |
-
/* slick slider */
|
2538 |
-
.slick-slider{
|
2539 |
-
position: relative;
|
2540 |
-
display: block;
|
2541 |
-
box-sizing: border-box;
|
2542 |
-
-webkit-user-select: none;
|
2543 |
-
-moz-user-select: none;
|
2544 |
-
-ms-user-select: none;
|
2545 |
-
user-select: none;
|
2546 |
-
|
2547 |
-
-webkit-touch-callout: none;
|
2548 |
-
-khtml-user-select: none;
|
2549 |
-
-ms-touch-action: pan-y;
|
2550 |
-
touch-action: pan-y;
|
2551 |
-
-webkit-tap-highlight-color: transparent;
|
2552 |
-
}
|
2553 |
-
|
2554 |
-
.slick-list{
|
2555 |
-
position: relative;
|
2556 |
-
|
2557 |
-
display: block;
|
2558 |
-
overflow: hidden;
|
2559 |
-
|
2560 |
-
margin: 0;
|
2561 |
-
padding: 0;
|
2562 |
-
}
|
2563 |
-
.slick-list:focus{
|
2564 |
-
outline: none;
|
2565 |
-
}
|
2566 |
-
.slick-list.dragging{
|
2567 |
-
cursor: pointer;
|
2568 |
-
cursor: hand;
|
2569 |
-
}
|
2570 |
-
|
2571 |
-
.slick-slider .slick-track, .slick-slider .slick-list{
|
2572 |
-
-webkit-transform: translate3d(0, 0, 0);
|
2573 |
-
-moz-transform: translate3d(0, 0, 0);
|
2574 |
-
-ms-transform: translate3d(0, 0, 0);
|
2575 |
-
-o-transform: translate3d(0, 0, 0);
|
2576 |
-
transform: translate3d(0, 0, 0);
|
2577 |
-
}
|
2578 |
-
|
2579 |
-
.slick-track{
|
2580 |
-
position: relative;
|
2581 |
-
top: 0;
|
2582 |
-
left: 0;
|
2583 |
-
|
2584 |
-
display: block;
|
2585 |
-
margin-left: auto;
|
2586 |
-
margin-right: auto;
|
2587 |
-
}
|
2588 |
-
.slick-track:before, .slick-track:after{
|
2589 |
-
display: table;
|
2590 |
-
|
2591 |
-
content: '';
|
2592 |
-
}
|
2593 |
-
.slick-track:after{
|
2594 |
-
clear: both;
|
2595 |
-
}
|
2596 |
-
.slick-loading .slick-track{
|
2597 |
-
visibility: hidden;
|
2598 |
-
}
|
2599 |
-
|
2600 |
-
.slick-slide{
|
2601 |
-
display: none;
|
2602 |
-
float: left;
|
2603 |
-
|
2604 |
-
height: 100%;
|
2605 |
-
min-height: 1px;
|
2606 |
-
}
|
2607 |
-
[dir='rtl'] .slick-slide{
|
2608 |
-
float: right;
|
2609 |
-
}
|
2610 |
-
.slick-slide img{
|
2611 |
-
display: block;
|
2612 |
-
}
|
2613 |
-
.slick-slide.slick-loading img{
|
2614 |
-
display: none;
|
2615 |
-
}
|
2616 |
-
.slick-slide.dragging img{
|
2617 |
-
pointer-events: none;
|
2618 |
-
}
|
2619 |
-
.slick-initialized .slick-slide{
|
2620 |
-
display: block;
|
2621 |
-
}
|
2622 |
-
.slick-loading .slick-slide{
|
2623 |
-
visibility: hidden;
|
2624 |
-
}
|
2625 |
-
.slick-vertical .slick-slide{
|
2626 |
-
display: block;
|
2627 |
-
height: auto;
|
2628 |
-
border: 1px solid transparent;
|
2629 |
-
}
|
2630 |
-
.slick-arrow.slick-hidden {
|
2631 |
-
display: none;
|
2632 |
-
}
|
2633 |
-
.tvc-hide{
|
2634 |
-
display: none;
|
2635 |
-
}
|
2636 |
-
.tvc_licence_key_change_wapper{height: 40px;}
|
2637 |
-
.tvc_licence_key_change{cursor: pointer;}
|
2638 |
-
.tvc_licence_key_change_wapper.google-account-analytics .acc-num{text-align: left; min-width: 100%; border: 1.3px solid #b4b9be; display: table;
|
2639 |
-
height: 100%;
|
2640 |
-
vertical-align: middle;
|
2641 |
-
background: #f4f4f4; border-radius: 20px; padding: 5px 15px;}
|
2642 |
-
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key_change{display: table-cell; vertical-align: middle;}
|
2643 |
-
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key{display: table-cell; letter-spacing: 8px;
|
2644 |
-
font-size: 15px; width: calc(100% - 110px); vertical-align: middle; font-weight: 400;}
|
2645 |
-
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key_title{vertical-align: middle; display: table-cell;}
|
2646 |
-
|
2647 |
-
/*price Table*/
|
2648 |
-
.tvc-price-table-features{
|
2649 |
-
width: 100%;
|
2650 |
-
padding-top: 60px;
|
2651 |
-
}
|
2652 |
-
.tvc-price-table-features .container {
|
2653 |
-
width: 1300px;
|
2654 |
-
min-width: 1000px;
|
2655 |
-
margin: 0 auto;
|
2656 |
-
padding-left: 20px;
|
2657 |
-
padding-right: 20px;
|
2658 |
-
position: relative;
|
2659 |
-
}
|
2660 |
-
.tvc-price-table-features .column {
|
2661 |
-
float: left;
|
2662 |
-
border-right: 1px solid #ebebeb;
|
2663 |
-
position: relative;
|
2664 |
-
text-align: center;
|
2665 |
-
}
|
2666 |
-
.tvc-price-table-features .row-heading .column {
|
2667 |
-
border-top: 1px solid #ebebeb;
|
2668 |
-
}
|
2669 |
-
.tvc-price-table-features.columns-5 .column {
|
2670 |
-
width: 20%;
|
2671 |
-
}
|
2672 |
-
.tvc-price-table-features .column:nth-child(2) {
|
2673 |
-
border-left: 1px solid #ebebeb;
|
2674 |
-
}
|
2675 |
-
|
2676 |
-
.tvc-price-table-features .row-heading .column:first-of-type {
|
2677 |
-
border-top: none;
|
2678 |
-
}
|
2679 |
-
|
2680 |
-
.tvc-price-table-features .row-heading .column:first-child{
|
2681 |
-
border-right: 1px solid transparent;
|
2682 |
-
}
|
2683 |
-
.tvc-price-table-features .row-feature .column:first-child, .tvc-price-table-features .row-footer .column:first-child{
|
2684 |
-
border-right: 1px solid transparent;
|
2685 |
-
text-align: left;
|
2686 |
-
}
|
2687 |
-
.tvc-price-table-features .row-heading {
|
2688 |
-
display: -webkit-box;
|
2689 |
-
display: -ms-flexbox;
|
2690 |
-
display: flex;
|
2691 |
-
-webkit-box-align: stretch;
|
2692 |
-
-ms-flex-align: stretch;
|
2693 |
-
align-items: stretch;
|
2694 |
-
border-top: 1px solid transparent;
|
2695 |
-
border-left: 1px solid transparent;
|
2696 |
-
border-width: 1px 0 1px 1px;
|
2697 |
-
border-style: solid;
|
2698 |
-
border-color: #ebebeb;
|
2699 |
-
border-bottom: 0;
|
2700 |
-
}
|
2701 |
-
|
2702 |
-
.tvc-price-table-features .row-feature .column{
|
2703 |
-
padding: 12px 20px 12px 20px;
|
2704 |
-
|
2705 |
-
}
|
2706 |
-
/*.tvc-price-table-features .row.feature .column:first-of-type{
|
2707 |
-
text-align: left;
|
2708 |
-
padding-right: 5px;
|
2709 |
-
padding-left: 15px;
|
2710 |
-
}*/
|
2711 |
-
.tvc-price-table-features .row-feature .column:first-child{
|
2712 |
-
border-right: 1px solid transparent;.tvc-price-table-features .row-feature .column:first-child, .tvc-price-table-features .row-footer .column:first-child
|
2713 |
-
}
|
2714 |
-
.tvc-price-table-features .row-feature{
|
2715 |
-
font-size: 14px;
|
2716 |
-
border-width: 1px 0 1px 1px;
|
2717 |
-
border-style: solid;
|
2718 |
-
border-color: #ebebeb;
|
2719 |
-
border-bottom: 0;
|
2720 |
-
display: -webkit-box;
|
2721 |
-
display: -ms-flexbox;
|
2722 |
-
display: flex;
|
2723 |
-
-webkit-box-align: stretch;
|
2724 |
-
-ms-flex-align: stretch;
|
2725 |
-
align-items: stretch;
|
2726 |
-
}
|
2727 |
-
|
2728 |
-
.tvc-price-table-features .column .name-wrap {
|
2729 |
-
background: #f9f9f9;
|
2730 |
-
padding: 12px;
|
2731 |
-
margin: 0 0 16px 0;
|
2732 |
-
}
|
2733 |
-
.tvc-price-table-features .column .name {
|
2734 |
-
font-size: 23px;
|
2735 |
-
font-weight: 600;
|
2736 |
-
color: #060221;
|
2737 |
-
line-height: 44px;
|
2738 |
-
letter-spacing: 0px;
|
2739 |
-
}
|
2740 |
-
.tvc-price-table-features .column .price-normal {
|
2741 |
-
text-align: center;
|
2742 |
-
font-weight: 300;
|
2743 |
-
font-size: 15px;
|
2744 |
-
line-height: 1;
|
2745 |
-
margin: 0 0 10px 0;
|
2746 |
-
}
|
2747 |
-
.tvc-price-table-features .column .price-normal span {
|
2748 |
-
position: relative;
|
2749 |
-
font-size: 17px;
|
2750 |
-
}
|
2751 |
-
.tvc-price-table-features .column .price-normal span:after {
|
2752 |
-
content: ' ';
|
2753 |
-
width: 100%;
|
2754 |
-
height: 1px;
|
2755 |
-
border-bottom: 1px solid red;
|
2756 |
-
position: absolute;
|
2757 |
-
top: 55%;
|
2758 |
-
left: 0;
|
2759 |
-
}
|
2760 |
-
.clearfix:after {
|
2761 |
-
clear: both;
|
2762 |
-
content: " ";
|
2763 |
-
display: table;
|
2764 |
-
}
|
2765 |
-
|
2766 |
-
|
2767 |
-
.tvc-price-table-features .row-subheading{
|
2768 |
-
border-width: 1px 0 1px 1px;
|
2769 |
-
border-style: solid;
|
2770 |
-
border-color: #ebebeb;
|
2771 |
-
border-bottom: 0;}
|
2772 |
-
.tvc-price-table-features .row-subheading {
|
2773 |
-
font-weight: 700;
|
2774 |
-
font-size: 16px;
|
2775 |
-
padding: 10px 15px;
|
2776 |
-
background: #ebebeb;
|
2777 |
-
text-align: center;
|
2778 |
-
}
|
2779 |
-
.tvc-price-table-features .row-footer {
|
2780 |
-
display: flex;
|
2781 |
-
}
|
2782 |
-
.tvc-price-table-features .row-footer {
|
2783 |
-
border-width: 1px 0 1px 1px;
|
2784 |
-
border-style: solid;
|
2785 |
-
border-color: #ebebeb;
|
2786 |
-
}
|
2787 |
-
.tvc-price-table-features .row-footer .column {
|
2788 |
-
padding: 20px 20px 18px 20px;
|
2789 |
-
}
|
2790 |
-
.tvc-guarantee .guarantee {
|
2791 |
-
border: 1px solid #ebebeb;
|
2792 |
-
background-color: #0137FC;
|
2793 |
-
color: #fff;
|
2794 |
-
padding: 30px;
|
2795 |
-
margin: 40px 0 0 0;
|
2796 |
-
|
2797 |
-
}
|
2798 |
-
.tvc-guarantee .guarantee .title{ font-size: 18px;
|
2799 |
-
font-weight: 600;}
|
2800 |
-
.tvc-guarantee .guarantee .title span{font-size: 23px;
|
2801 |
-
font-style: italic;
|
2802 |
-
margin-right: 20px;
|
2803 |
-
font-weight: bold;
|
2804 |
-
}
|
2805 |
-
.tvc-price-table-features .tvc-list-price{
|
2806 |
-
border-bottom: 1px solid #ebebeb;
|
2807 |
-
padding: 0px 0 10px 0;
|
2808 |
-
}
|
2809 |
-
|
2810 |
-
.tvc-price-table-features .tvc-list-price .price-current{
|
2811 |
-
font-size: 30px;
|
2812 |
-
font-weight: 700;
|
2813 |
-
color: #0137FC;
|
2814 |
-
}
|
2815 |
-
.tvc-price-table-features .tvc-list-price .price-current .inner span{
|
2816 |
-
font-size: 12px;
|
2817 |
-
}
|
2818 |
-
.tvc-btn{background-color: #0137FC !important;
|
2819 |
-
border-style: solid;
|
2820 |
-
border-radius: 26px 26px 26px 26px !important;
|
2821 |
-
color: #fff !important;
|
2822 |
-
display: inline-block;
|
2823 |
-
line-height: 1;
|
2824 |
-
font-size: 15px;
|
2825 |
-
padding: 12px 24px;
|
2826 |
-
fill: #fff;
|
2827 |
-
text-align: center;
|
2828 |
-
-webkit-transition: all .3s;
|
2829 |
-
-o-transition: all .3s;
|
2830 |
-
transition: all .3s;
|
2831 |
-
text-decoration:none;
|
2832 |
-
margin: 10px 0;
|
2833 |
-
}
|
2834 |
-
.tvc-blank-col span{position: absolute;
|
2835 |
-
bottom: 5px;
|
2836 |
-
font-size: 18px;
|
2837 |
-
text-align: center;
|
2838 |
-
left: 0;
|
2839 |
-
right: 0;
|
2840 |
-
font-weight: 600;}
|
2841 |
-
.tvc-free-plan span{
|
2842 |
-
position: absolute;
|
2843 |
-
bottom: 0px;
|
2844 |
-
font-size: 18px;
|
2845 |
-
text-align: center;
|
2846 |
-
left: 0;
|
2847 |
-
right: 0;
|
2848 |
-
font-weight: 600;
|
2849 |
-
}
|
2850 |
-
.tvc-free-plan .tvc-list-price .price-current span{
|
2851 |
-
position: relative;
|
2852 |
-
font-size: 30px;
|
2853 |
-
font-weight: 700;
|
2854 |
-
color: #0137FC;
|
2855 |
-
margin-top: 43px;
|
2856 |
-
display: block;
|
2857 |
-
}
|
2858 |
-
|
2859 |
-
.tvc_popular{background-color: #EE345E;
|
2860 |
-
color: white;
|
2861 |
-
font-style: normal;
|
2862 |
-
font-weight: bold;
|
2863 |
-
font-size: 12px;
|
2864 |
-
text-align: center;
|
2865 |
-
text-transform: uppercase;
|
2866 |
-
position: absolute;
|
2867 |
-
right: -41px;
|
2868 |
-
top: 2px;
|
2869 |
-
transform: rotate( 45deg );
|
2870 |
-
width: 138px;
|
2871 |
-
letter-spacing: 2px;
|
2872 |
-
clip-path: polygon(22% 0, 77% 0, 101% 100%, 0 95%);
|
2873 |
-
padding-top: 9px;
|
2874 |
-
padding-bottom: 9px;
|
2875 |
-
}
|
2876 |
-
.tvc-price-table-features .column.popular {
|
2877 |
-
background-color: #f1f9ff;
|
2878 |
-
}
|
2879 |
-
.tvc-price-table-features .column img{height: 18px;}
|
2880 |
-
.elementor-column-wrap.active{ background-color: #0137FC;}
|
2881 |
-
.elementor-column-wrap.active h5.elementor-heading-title{
|
2882 |
-
color: #fff !important;
|
2883 |
-
}
|
2884 |
-
.selected-plan-info .tvc_price_cancel{margin: 0 8px 10px 0;}
|
2885 |
-
.paypal_plan_type{float: right;
|
2886 |
-
margin-right: 20px;}
|
2887 |
-
.selected-plan-info .tvc_month_free{
|
2888 |
-
display: inline-block;
|
2889 |
-
width: 110px;
|
2890 |
-
margin-left: 5px;
|
2891 |
-
}
|
2892 |
-
a.elementor-button-link{
|
2893 |
-
text-decoration: none;
|
2894 |
-
}
|
2895 |
-
.tvc-plan-off{
|
2896 |
-
display: inline-block;
|
2897 |
-
margin-left: 5px;
|
2898 |
-
color: #2FBB0E;
|
2899 |
-
font-weight: 600;
|
2900 |
-
}
|
2901 |
-
.tvc_month_free{
|
2902 |
-
text-align: center;
|
2903 |
-
background-color: #2FBB0E;
|
2904 |
-
color: #fff;
|
2905 |
-
width: 119px;
|
2906 |
-
font-size: 14px;
|
2907 |
-
line-height: 21px;
|
2908 |
-
font-weight: 600;
|
2909 |
-
margin: 0 auto;
|
2910 |
-
}
|
2911 |
-
.tvc-plan-price span{font-size: 12px;}
|
2912 |
-
.tvc-price-table-features .tvc_popular{
|
2913 |
-
width: 100%;
|
2914 |
-
top: -35px;
|
2915 |
-
right: 0;
|
2916 |
-
left: 0;
|
2917 |
-
transform: none;
|
2918 |
-
clip-path:none;
|
2919 |
-
}
|
2920 |
-
.paypal-message-box ol{padding-left: 25px;}
|
2921 |
-
.paypal-message-box a {text-decoration: underline;}
|
2922 |
-
.tvc-list-price-month a, .tvc-list-price-year a {
|
2923 |
-
font-weight: bold;
|
2924 |
-
}
|
2925 |
-
|
2926 |
-
/*End price Table*/
|
2927 |
-
.tvc-new-freevspro{
|
2928 |
-
/* background-color: #EE345E;
|
2929 |
-
color: white;
|
2930 |
-
font-style: normal;
|
2931 |
-
font-weight: bold;
|
2932 |
-
font-size: 12px;
|
2933 |
-
height: 40px;
|
2934 |
-
text-align: center;
|
2935 |
-
text-transform: uppercase;
|
2936 |
-
position: absolute;
|
2937 |
-
|
2938 |
-
top: -7px;
|
2939 |
-
left: -25px;
|
2940 |
-
padding-top: 33px;
|
2941 |
-
|
2942 |
-
transform: rotate( 314deg );
|
2943 |
-
width: 63px;
|
2944 |
-
letter-spacing: 2px;
|
2945 |
-
/*clip-path: polygon(50% 0%, 53% 0, 109% 109%, -4% 99%);
|
2946 |
-
clip-path: polygon(50% 0%, 53% 0, 112% 97%, -11% 99%);
|
2947 |
-
padding-top: 19.5px;*/
|
2948 |
-
background-color: #EE345E;
|
2949 |
-
color: white;
|
2950 |
-
font-style: normal;
|
2951 |
-
font-weight: bold;
|
2952 |
-
font-size: 12px;
|
2953 |
-
height: 38px;
|
2954 |
-
text-align: center;
|
2955 |
-
text-transform: uppercase;
|
2956 |
-
position: absolute;
|
2957 |
-
|
2958 |
-
top: -8px;
|
2959 |
-
left: 11px;
|
2960 |
-
left: 119px;
|
2961 |
-
padding-top: 33px;
|
2962 |
-
|
2963 |
-
transform: rotate(
|
2964 |
-
43deg
|
2965 |
-
);
|
2966 |
-
width: 70px;
|
2967 |
-
letter-spacing: 2px;
|
2968 |
-
clip-path: polygon(50% 0%, 53% 0, 109% 109%, -4% 99%);
|
2969 |
-
/* clip-path: polygon(50% 0%, 53% 0, 112% 97%, -11% 99%); */
|
2970 |
-
padding-top: 19.5px;
|
2971 |
-
|
2972 |
-
}
|
2973 |
-
.tvc_plugin_container .nav-link{position: relative;}
|
2974 |
-
.tvc-new-freevspro-nav-item{
|
2975 |
-
width: 169px;
|
2976 |
}
|
1 |
+
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap");
|
2 |
+
html,
|
3 |
+
body {
|
4 |
+
height: 100%;
|
5 |
+
}
|
6 |
+
|
7 |
+
body {
|
8 |
+
margin: 0;
|
9 |
+
padding: 0;
|
10 |
+
-webkit-font-smoothing: antialiased;
|
11 |
+
-moz-osx-font-smoothing: grayscale;
|
12 |
+
font-size: 14px;
|
13 |
+
color: #25283D;
|
14 |
+
font-weight: 400;
|
15 |
+
line-height: normal;
|
16 |
+
background-color: #F2F2F2;
|
17 |
+
font-family: 'Lato', sans-serif;
|
18 |
+
}
|
19 |
+
|
20 |
+
p {
|
21 |
+
font-size: 14px;
|
22 |
+
line-height: 18px;
|
23 |
+
}
|
24 |
+
|
25 |
+
a {
|
26 |
+
-webkit-transition: all ease 0.5s;
|
27 |
+
transition: all ease 0.5s;
|
28 |
+
color: #2D62ED;
|
29 |
+
}
|
30 |
+
|
31 |
+
a:hover {
|
32 |
+
text-decoration: none;
|
33 |
+
-webkit-transition: all ease 0.5s;
|
34 |
+
transition: all ease 0.5s;
|
35 |
+
color: #2D62ED;
|
36 |
+
}
|
37 |
+
|
38 |
+
a:focus {
|
39 |
+
-webkit-box-shadow: none !important;
|
40 |
+
box-shadow: none !important;
|
41 |
+
}
|
42 |
+
|
43 |
+
ul {
|
44 |
+
margin-bottom: 0;
|
45 |
+
}
|
46 |
+
|
47 |
+
a:focus,
|
48 |
+
button:focus,
|
49 |
+
input[type="checkbox"],
|
50 |
+
input[type="radio"] {
|
51 |
+
outline: none;
|
52 |
+
}
|
53 |
+
|
54 |
+
:focus {
|
55 |
+
-ms-box-shadow: none;
|
56 |
+
-webkit-box-shadow: none;
|
57 |
+
box-shadow: none;
|
58 |
+
outline: none;
|
59 |
+
}
|
60 |
+
|
61 |
+
.text-underline {
|
62 |
+
text-decoration: underline;
|
63 |
+
}
|
64 |
+
|
65 |
+
.blue-color {
|
66 |
+
color: #2D62ED !important;
|
67 |
+
}
|
68 |
+
|
69 |
+
section {
|
70 |
+
padding: 10px 0;
|
71 |
+
}
|
72 |
+
|
73 |
+
.title {
|
74 |
+
font-size: 16px;
|
75 |
+
font-weight: 700;
|
76 |
+
margin-bottom: 20px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.sub-title {
|
80 |
+
margin-bottom: 5px;
|
81 |
+
font-size: 14px;
|
82 |
+
}
|
83 |
+
|
84 |
+
.upgrade {
|
85 |
+
color: #03D7FD;
|
86 |
+
}
|
87 |
+
|
88 |
+
.campaigns .campaign-date {
|
89 |
+
border: 1px solid #A9A9A9;
|
90 |
+
padding: 8px;
|
91 |
+
}
|
92 |
+
|
93 |
+
.campaigns .radio-buttons .custom-control-label {
|
94 |
+
width: 100%;
|
95 |
+
}
|
96 |
+
|
97 |
+
.chart {
|
98 |
+
margin-bottom: 15px;
|
99 |
+
background-color: #FFFFFF;
|
100 |
+
}
|
101 |
+
|
102 |
+
.chart canvas {
|
103 |
+
-ms-box-shadow: 0 3px 6px #00000029;
|
104 |
+
-webkit-box-shadow: 0 3px 6px #00000029;
|
105 |
+
box-shadow: 0 3px 6px #00000029;
|
106 |
+
border-radius: 10px;
|
107 |
+
}
|
108 |
+
|
109 |
+
.chart .sub-title {
|
110 |
+
margin-bottom: 10px;
|
111 |
+
color: #5E5E5E;
|
112 |
+
}
|
113 |
+
|
114 |
+
/*.dataTables_length {
|
115 |
+
display: none;
|
116 |
+
}*/
|
117 |
+
|
118 |
+
.table-section {
|
119 |
+
padding: 8px;
|
120 |
+
margin-bottom: 15px;
|
121 |
+
background-color: #FFFFFF;
|
122 |
+
border-radius: 10px;
|
123 |
+
-ms-box-shadow: 0 3px 6px #00000029;
|
124 |
+
-webkit-box-shadow: 0 3px 6px #00000029;
|
125 |
+
box-shadow: 0 3px 6px #00000029;
|
126 |
+
}
|
127 |
+
|
128 |
+
.table-section .table {
|
129 |
+
margin-bottom: 0;
|
130 |
+
}
|
131 |
+
|
132 |
+
.table-section .table thead th {
|
133 |
+
border: 0;
|
134 |
+
padding: 0.45rem;
|
135 |
+
color: #25283D;
|
136 |
+
vertical-align: top;
|
137 |
+
}
|
138 |
+
|
139 |
+
.table-section .table tr th,
|
140 |
+
.table-section .table tr td {
|
141 |
+
border: 0;
|
142 |
+
}
|
143 |
+
|
144 |
+
.table-section .table tr td {
|
145 |
+
padding: 0.45rem;
|
146 |
+
color: #5E5E5E;
|
147 |
+
}
|
148 |
+
|
149 |
+
.table-section .table tr td.product-image {
|
150 |
+
width: 70px;
|
151 |
+
}
|
152 |
+
|
153 |
+
.table-section .table tr td.product-image img {
|
154 |
+
width: 100%;
|
155 |
+
-o-object-fit: cover;
|
156 |
+
object-fit: cover;
|
157 |
+
}
|
158 |
+
|
159 |
+
.table-section .table tr td .text-underline {
|
160 |
+
text-decoration: none;
|
161 |
+
color: #5E5E5E;
|
162 |
+
}
|
163 |
+
|
164 |
+
.table-section .pagination {
|
165 |
+
-webkit-box-pack: end;
|
166 |
+
-ms-flex-pack: end;
|
167 |
+
justify-content: flex-end;
|
168 |
+
}
|
169 |
+
|
170 |
+
.btn {
|
171 |
+
border-radius: 500px;
|
172 |
+
padding: 0.375rem 1rem;
|
173 |
+
font-size: 14px;
|
174 |
+
}
|
175 |
+
|
176 |
+
.btn:focus, .btn:active {
|
177 |
+
-ms-box-shadow: none !important;
|
178 |
+
-webkit-box-shadow: none !important;
|
179 |
+
box-shadow: none !important;
|
180 |
+
outline: 0 !important;
|
181 |
+
}
|
182 |
+
|
183 |
+
.btn-primary {
|
184 |
+
background-color: #2D62ED;
|
185 |
+
border-color: #2D62ED;
|
186 |
+
}
|
187 |
+
|
188 |
+
.btn-primary:hover, .btn-primary:focus, .btn-primary.focus {
|
189 |
+
background-color: #1248d5 !important;
|
190 |
+
border-color: #1248d5 !important;
|
191 |
+
}
|
192 |
+
|
193 |
+
.btn-secondary {
|
194 |
+
background-color: #FFFFFF;
|
195 |
+
border-color: #FFFFFF;
|
196 |
+
color: #2D62ED !important;
|
197 |
+
}
|
198 |
+
|
199 |
+
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary.focus {
|
200 |
+
background-color: #1248d5 !important;
|
201 |
+
border-color: #1248d5 !important;
|
202 |
+
color: #FFFFFF !important;
|
203 |
+
}
|
204 |
+
|
205 |
+
.btn-default {
|
206 |
+
background-color: #F2F2F2;
|
207 |
+
border-color: #F2F2F2;
|
208 |
+
color: #25283D;
|
209 |
+
}
|
210 |
+
|
211 |
+
.btn-default:hover, .btn-default:focus, .btn-default.focus {
|
212 |
+
background-color: #d9d9d9 !important;
|
213 |
+
border-color: #d9d9d9 !important;
|
214 |
+
}
|
215 |
+
|
216 |
+
.btn-outline-primary {
|
217 |
+
color: #2D62ED;
|
218 |
+
border-color: #2D62ED;
|
219 |
+
}
|
220 |
+
|
221 |
+
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary.focus {
|
222 |
+
background-color: #2D62ED !important;
|
223 |
+
border-color: #2D62ED !important;
|
224 |
+
color: #FFFFFF !important;
|
225 |
+
}
|
226 |
+
|
227 |
+
.btn-white {
|
228 |
+
background-color: #FFFFFF;
|
229 |
+
border: 1px solid #000000;
|
230 |
+
color: #000000;
|
231 |
+
padding: 5px 10px;
|
232 |
+
font-size: 14px;
|
233 |
+
line-height: normal;
|
234 |
+
border-radius: 0;
|
235 |
+
font-weight: 700;
|
236 |
+
}
|
237 |
+
|
238 |
+
.btn-white:focus {
|
239 |
+
-webkit-box-shadow: none !important;
|
240 |
+
box-shadow: none !important;
|
241 |
+
}
|
242 |
+
|
243 |
+
.btn-grey {
|
244 |
+
background-color: #F2F2F2 !important;
|
245 |
+
}
|
246 |
+
|
247 |
+
.text-underline {
|
248 |
+
text-decoration: underline;
|
249 |
+
}
|
250 |
+
|
251 |
+
.arrow-angle {
|
252 |
+
border-color: #888 transparent transparent transparent;
|
253 |
+
border-style: solid;
|
254 |
+
border-width: 8px 7px 0 7px;
|
255 |
+
height: 0;
|
256 |
+
width: 0;
|
257 |
+
}
|
258 |
+
|
259 |
+
.popup-modal .modal-dialog .modal-content {
|
260 |
+
border-radius: 15px;
|
261 |
+
border: 1px solid #707070;
|
262 |
+
background: #FAFAFA;
|
263 |
+
}
|
264 |
+
|
265 |
+
.popup-modal .modal-dialog .modal-header {
|
266 |
+
border: 0;
|
267 |
+
padding: 30px;
|
268 |
+
}
|
269 |
+
|
270 |
+
.popup-modal .modal-dialog .modal-header .modal-title {
|
271 |
+
font-weight: 700;
|
272 |
+
}
|
273 |
+
|
274 |
+
.popup-modal .modal-dialog .modal-body {
|
275 |
+
padding: 30px;
|
276 |
+
}
|
277 |
+
|
278 |
+
.popup-modal .modal-dialog .modal-body p {
|
279 |
+
color: #5E5E5E;
|
280 |
+
}
|
281 |
+
|
282 |
+
.popup-modal .modal-dialog .close {
|
283 |
+
position: absolute;
|
284 |
+
right: 10px;
|
285 |
+
top: 5px;
|
286 |
+
padding: 0;
|
287 |
+
margin: 0;
|
288 |
+
font-weight: 300;
|
289 |
+
opacity: 1;
|
290 |
+
color: #25283D;
|
291 |
+
font-size: 1.8rem;
|
292 |
+
}
|
293 |
+
|
294 |
+
.popup-modal .modal-dialog .mw-100 {
|
295 |
+
min-width: 100px;
|
296 |
+
}
|
297 |
+
|
298 |
+
.accordion .card {
|
299 |
+
margin-bottom: 15px;
|
300 |
+
background-color: transparent;
|
301 |
+
border: 1px solid #d1d1d1 !important;
|
302 |
+
}
|
303 |
+
|
304 |
+
.accordion .card:last-child {
|
305 |
+
margin-bottom: 0 !important;
|
306 |
+
}
|
307 |
+
|
308 |
+
.accordion .card .card-header {
|
309 |
+
padding: 0;
|
310 |
+
background-color: transparent;
|
311 |
+
border-radius: 0;
|
312 |
+
border: 0;
|
313 |
+
}
|
314 |
+
|
315 |
+
.accordion .card .card-header .btn {
|
316 |
+
padding: 5px 15px;
|
317 |
+
display: block;
|
318 |
+
width: 100%;
|
319 |
+
text-align: left;
|
320 |
+
color: #000000;
|
321 |
+
font-weight: 500;
|
322 |
+
font-size: 14px;
|
323 |
+
position: relative;
|
324 |
+
padding-right: 40px !important;
|
325 |
+
}
|
326 |
+
|
327 |
+
.accordion .card .card-header .btn:hover {
|
328 |
+
text-decoration: none;
|
329 |
+
}
|
330 |
+
|
331 |
+
.accordion .card .card-header .btn:focus {
|
332 |
+
text-decoration: none;
|
333 |
+
outline: none;
|
334 |
+
-webkit-box-shadow: none;
|
335 |
+
box-shadow: none;
|
336 |
+
}
|
337 |
+
|
338 |
+
.accordion .card .card-header .btn:after {
|
339 |
+
content: "";
|
340 |
+
border-color: #888 transparent transparent transparent;
|
341 |
+
border-style: solid;
|
342 |
+
border-width: 8px 7px 0 7px;
|
343 |
+
height: 0;
|
344 |
+
width: 0;
|
345 |
+
position: absolute;
|
346 |
+
right: 10px;
|
347 |
+
top: 11px;
|
348 |
+
-webkit-transform: rotate(180deg);
|
349 |
+
transform: rotate(180deg);
|
350 |
+
}
|
351 |
+
|
352 |
+
.accordion .card .card-header .btn.collapsed:after {
|
353 |
+
-webkit-transform: rotate(0deg);
|
354 |
+
transform: rotate(0deg);
|
355 |
+
}
|
356 |
+
|
357 |
+
.accordion .card .card-body {
|
358 |
+
padding: 10px 15px;
|
359 |
+
}
|
360 |
+
|
361 |
+
.accordion .card .card-body p {
|
362 |
+
font-size: 14px;
|
363 |
+
margin-bottom: 0.35rem;
|
364 |
+
}
|
365 |
+
|
366 |
+
.accordion .card .card-body .table-section {
|
367 |
+
border: 0;
|
368 |
+
padding: 0;
|
369 |
+
margin-bottom: 0;
|
370 |
+
}
|
371 |
+
|
372 |
+
.accordion .card .card-body .table-section .table tr td {
|
373 |
+
font-size: 14px;
|
374 |
+
}
|
375 |
+
|
376 |
+
.accordion-section .accordion .card {
|
377 |
+
margin-bottom: 15px;
|
378 |
+
border-radius: 0;
|
379 |
+
border: 1px solid #d1d1d1;
|
380 |
+
background-color: #ffffff;
|
381 |
+
}
|
382 |
+
|
383 |
+
.accordion-section .accordion .card .card-header {
|
384 |
+
padding: 0;
|
385 |
+
background-color: transparent;
|
386 |
+
border-radius: 0;
|
387 |
+
border: 0;
|
388 |
+
}
|
389 |
+
|
390 |
+
.accordion-section .accordion .card .card-header .btn {
|
391 |
+
padding: 5px 10px;
|
392 |
+
display: block;
|
393 |
+
width: 100%;
|
394 |
+
text-align: left;
|
395 |
+
color: #000000;
|
396 |
+
font-weight: 700;
|
397 |
+
font-size: 14px;
|
398 |
+
}
|
399 |
+
|
400 |
+
.accordion-section .accordion .card .card-header .btn:hover {
|
401 |
+
text-decoration: none;
|
402 |
+
}
|
403 |
+
|
404 |
+
.accordion-section .accordion .card .card-header .btn:focus {
|
405 |
+
text-decoration: none;
|
406 |
+
outline: none;
|
407 |
+
-webkit-box-shadow: none;
|
408 |
+
box-shadow: none;
|
409 |
+
}
|
410 |
+
|
411 |
+
.accordion-section .accordion .card .card-body {
|
412 |
+
padding: 10px 15px;
|
413 |
+
}
|
414 |
+
|
415 |
+
.nbk-tbl {
|
416 |
+
background-color: transparent;
|
417 |
+
border: 0;
|
418 |
+
padding: 0;
|
419 |
+
margin-bottom: 0;
|
420 |
+
}
|
421 |
+
|
422 |
+
.card-wrapper {
|
423 |
+
max-width: 100%;
|
424 |
+
margin: 0 auto;
|
425 |
+
}
|
426 |
+
|
427 |
+
.wrapper-main {
|
428 |
+
max-width: 90%;
|
429 |
+
margin: 0 auto;
|
430 |
+
}
|
431 |
+
|
432 |
+
.configuration-section .note-follow {
|
433 |
+
border: 1px solid #A9A9A9;
|
434 |
+
padding: 10px 15px;
|
435 |
+
border-radius: 10px;
|
436 |
+
margin-bottom: 15px;
|
437 |
+
}
|
438 |
+
|
439 |
+
.configuration-section .note-follow p {
|
440 |
+
margin-bottom: 0;
|
441 |
+
}
|
442 |
+
|
443 |
+
.configuration-section .confg-card .card {
|
444 |
+
border-radius: 15px;
|
445 |
+
background-color: #FFFFFF;
|
446 |
+
-ms-box-shadow: 0 3px 5px #00000029;
|
447 |
+
-webkit-box-shadow: 0 3px 5px #00000029;
|
448 |
+
box-shadow: 0 3px 5px #00000029;
|
449 |
+
height: 100%;
|
450 |
+
border: 0;
|
451 |
+
}
|
452 |
+
|
453 |
+
.configuration-section .confg-card .card .card-header {
|
454 |
+
background-color: #000338;
|
455 |
+
border: 0;
|
456 |
+
text-align: center;
|
457 |
+
padding-left: 15px;
|
458 |
+
padding-right: 15px;
|
459 |
+
}
|
460 |
+
|
461 |
+
.configuration-section .confg-card .card .card-header:first-child {
|
462 |
+
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
463 |
+
}
|
464 |
+
|
465 |
+
.configuration-section .confg-card .card .card-header .confg-title {
|
466 |
+
font-weight: 700;
|
467 |
+
font-size: 14px;
|
468 |
+
color: #FFFFFF;
|
469 |
+
margin: 0;
|
470 |
+
}
|
471 |
+
|
472 |
+
.configuration-section .confg-card .card .card-body {
|
473 |
+
padding: 15px;
|
474 |
+
}
|
475 |
+
|
476 |
+
.configuration-section .confg-card .card .card-body .list-unstyled {
|
477 |
+
margin: 0;
|
478 |
+
}
|
479 |
+
|
480 |
+
.configuration-section .confg-card .card .card-body .list-unstyled li {
|
481 |
+
display: block;
|
482 |
+
margin-bottom: 10px;
|
483 |
+
}
|
484 |
+
|
485 |
+
.configuration-section .confg-card .card .card-body .list-unstyled li:last-child {
|
486 |
+
margin-bottom: 0;
|
487 |
+
}
|
488 |
+
|
489 |
+
.configuration-section .confg-card .card .card-body .list-unstyled li .text {
|
490 |
+
display: block;
|
491 |
+
}
|
492 |
+
|
493 |
+
.configuration-section .confg-card .card .card-body .list-unstyled li .list-image img {
|
494 |
+
max-width: 18px;
|
495 |
+
}
|
496 |
+
|
497 |
+
.configuration-section .confg-card .card .card-footer {
|
498 |
+
background-color: transparent;
|
499 |
+
border: 0;
|
500 |
+
text-align: center;
|
501 |
+
padding-left: 15px;
|
502 |
+
padding-right: 15px;
|
503 |
+
}
|
504 |
+
|
505 |
+
.configuration-section .confg-card .card .card-footer:last-child {
|
506 |
+
border-radius: 0 0 calc(15px - 1px) calc(15px - 1px);
|
507 |
+
}
|
508 |
+
|
509 |
+
.configuration-section .confg-card .card .card-footer .explr {
|
510 |
+
padding: 0;
|
511 |
+
font-weight: 700;
|
512 |
+
font-size: 14px;
|
513 |
+
text-decoration: underline;
|
514 |
+
color: #000000;
|
515 |
+
}
|
516 |
+
|
517 |
+
.border-right {
|
518 |
+
border-right: 1px solid #A9A9A9;
|
519 |
+
}
|
520 |
+
|
521 |
+
@media (min-width: 576px) {
|
522 |
+
.modal-sm-custom {
|
523 |
+
max-width: 355px;
|
524 |
+
}
|
525 |
+
}
|
526 |
+
|
527 |
+
.dataTables_paginate .page-item .page-link {
|
528 |
+
color: #000000;
|
529 |
+
}
|
530 |
+
|
531 |
+
.dataTables_paginate .page-item.active .page-link {
|
532 |
+
background-color: #000000;
|
533 |
+
border-color: #000000;
|
534 |
+
color: #ffffff !important;
|
535 |
+
font-weight: 700;
|
536 |
+
}
|
537 |
+
|
538 |
+
.dataTables_paginate .page-item.disabled {
|
539 |
+
opacity: 0.5;
|
540 |
+
}
|
541 |
+
|
542 |
+
.loader-section {
|
543 |
+
position: fixed;
|
544 |
+
top: 0;
|
545 |
+
bottom: 0;
|
546 |
+
left: 0;
|
547 |
+
right: 0;
|
548 |
+
height: 100%;
|
549 |
+
background-color: rgba(255, 255, 255, 0.85);
|
550 |
+
display: -webkit-box;
|
551 |
+
display: -ms-flexbox;
|
552 |
+
display: flex;
|
553 |
+
-webkit-box-pack: center;
|
554 |
+
-ms-flex-pack: center;
|
555 |
+
justify-content: center;
|
556 |
+
-webkit-box-align: center;
|
557 |
+
-ms-flex-align: center;
|
558 |
+
align-items: center;
|
559 |
+
z-index: 999;
|
560 |
+
}
|
561 |
+
|
562 |
+
.loader-section img {
|
563 |
+
max-width: 80px;
|
564 |
+
}
|
565 |
+
|
566 |
+
.border-right {
|
567 |
+
border-right: 0 !important;
|
568 |
+
}
|
569 |
+
|
570 |
+
.right-content {
|
571 |
+
border: 0.5px solid #A9A9A9;
|
572 |
+
border-radius: 15px;
|
573 |
+
margin-bottom: 30px;
|
574 |
+
padding: 15px;
|
575 |
+
}
|
576 |
+
|
577 |
+
.right-content:last-child {
|
578 |
+
margin-bottom: 0;
|
579 |
+
}
|
580 |
+
|
581 |
+
.right-content p {
|
582 |
+
margin-bottom: 0;
|
583 |
+
}
|
584 |
+
|
585 |
+
.right-content .content-section {
|
586 |
+
position: relative;
|
587 |
+
padding-left: 30px;
|
588 |
+
}
|
589 |
+
|
590 |
+
.right-content .content-section .content-icon {
|
591 |
+
position: absolute;
|
592 |
+
left: 0;
|
593 |
+
top: 0;
|
594 |
+
}
|
595 |
+
|
596 |
+
.right-content .content-section .content-icon img {
|
597 |
+
width: 20px;
|
598 |
+
}
|
599 |
+
|
600 |
+
.right-content .pagination {
|
601 |
+
margin-top: 5px;
|
602 |
+
}
|
603 |
+
|
604 |
+
.right-content .pagination .page-item .page-link {
|
605 |
+
padding: 0 5px;
|
606 |
+
border: 0;
|
607 |
+
color: #25283D;
|
608 |
+
}
|
609 |
+
.right-content .pagination .page-item .paging_info{padding: 0 5px; border: 0; color: #25283D; margin-top: 1px; display: inline-block;}
|
610 |
+
.right-content .pagination .page-item span.page-link {
|
611 |
+
cursor: pointer;
|
612 |
+
}
|
613 |
+
|
614 |
+
.right-content .pagination .page-item.page-prev img {
|
615 |
+
-webkit-transform: rotate(90deg);
|
616 |
+
transform: rotate(90deg);
|
617 |
+
}
|
618 |
+
|
619 |
+
.right-content .pagination .page-item.page-next img {
|
620 |
+
-webkit-transform: rotate(-90deg);
|
621 |
+
transform: rotate(-90deg);
|
622 |
+
}
|
623 |
+
|
624 |
+
.listing-content {
|
625 |
+
margin-bottom: 0;
|
626 |
+
margin-top: 15px;
|
627 |
+
}
|
628 |
+
|
629 |
+
.listing-content li {
|
630 |
+
margin-bottom: 12px;
|
631 |
+
font-size: 14px;
|
632 |
+
position: relative;
|
633 |
+
padding-left: 24px;
|
634 |
+
color: #5E5E5E;
|
635 |
+
}
|
636 |
+
|
637 |
+
.listing-content li:last-child {
|
638 |
+
margin-bottom: 0;
|
639 |
+
}
|
640 |
+
|
641 |
+
.listing-content li .tick-icon {
|
642 |
+
position: absolute;
|
643 |
+
left: 0;
|
644 |
+
top: 5px;
|
645 |
+
width: 14px;
|
646 |
+
}
|
647 |
+
|
648 |
+
.custom-tooltip {
|
649 |
+
position: relative;
|
650 |
+
}
|
651 |
+
|
652 |
+
.custom-tooltip:hover .tooltip-drop {
|
653 |
+
display: block;
|
654 |
+
}
|
655 |
+
|
656 |
+
.custom-tooltip .tooltip-drop {
|
657 |
+
position: absolute;
|
658 |
+
background-color: #C0F2CA;
|
659 |
+
padding: 25px 15px 15px 15px;
|
660 |
+
top: 0;
|
661 |
+
border-radius: 15px;
|
662 |
+
min-width: 16rem;
|
663 |
+
z-index: 1;
|
664 |
+
display: none;
|
665 |
+
}
|
666 |
+
|
667 |
+
.custom-tooltip .tooltip-drop .tooltip-title {
|
668 |
+
font-size: 16px;
|
669 |
+
color: #5E5E5E;
|
670 |
+
}
|
671 |
+
|
672 |
+
.custom-tooltip .tooltip-drop p {
|
673 |
+
font-size: 12px;
|
674 |
+
color: #757575;
|
675 |
+
font-weight: 400;
|
676 |
+
margin-bottom: 0;
|
677 |
+
}
|
678 |
+
|
679 |
+
.alert-message {
|
680 |
+
text-align: right;
|
681 |
+
}
|
682 |
+
|
683 |
+
.alert-message .alert {
|
684 |
+
display: inline-block;
|
685 |
+
border-radius: 500px;
|
686 |
+
border: 0;
|
687 |
+
padding-top: 0.5rem;
|
688 |
+
padding-bottom: 0.5rem;
|
689 |
+
color: #FFFFFF;
|
690 |
+
background-color: #66BB6A;
|
691 |
+
padding-left: 30px;
|
692 |
+
}
|
693 |
+
.alert-message.tvc-alert-error .alert{
|
694 |
+
background-color: #fff3cd;
|
695 |
+
color: #856404;
|
696 |
+
}
|
697 |
+
.alert-message.tvc-alert-success .alert:after {
|
698 |
+
content: '\2713';
|
699 |
+
position: absolute;
|
700 |
+
left: 12px;
|
701 |
+
}
|
702 |
+
|
703 |
+
.alert-message .error {
|
704 |
+
display: inline-block;
|
705 |
+
border-radius: 500px;
|
706 |
+
border: 0;
|
707 |
+
padding-top: 0.5rem;
|
708 |
+
padding-bottom: 0.5rem;
|
709 |
+
color: #FFFFFF;
|
710 |
+
background-color: #dc3232;
|
711 |
+
}
|
712 |
+
|
713 |
+
.tooltip.show {
|
714 |
+
opacity: 1;
|
715 |
+
}
|
716 |
+
|
717 |
+
.tooltip .arrow {
|
718 |
+
display: none;
|
719 |
+
}
|
720 |
+
|
721 |
+
.tooltip .tooltip-inner {
|
722 |
+
background-color: #FFFFFF;
|
723 |
+
color: #5E5E5E;
|
724 |
+
font-size: 12px;
|
725 |
+
text-align: left;
|
726 |
+
}
|
727 |
+
|
728 |
+
.header-section {
|
729 |
+
display: block;
|
730 |
+
background-color: #FFFFFF;
|
731 |
+
}
|
732 |
+
|
733 |
+
.header-section .top-section {
|
734 |
+
background-color: #25283D;
|
735 |
+
padding: 8px 15px;
|
736 |
+
}
|
737 |
+
|
738 |
+
.header-section .top-section p {
|
739 |
+
margin-bottom: 0;
|
740 |
+
text-align: center;
|
741 |
+
color: #FFFFFF;
|
742 |
+
font-weight: 700;
|
743 |
+
}
|
744 |
+
|
745 |
+
.header-section .navbar-section {
|
746 |
+
/* padding: 15px 0;*/
|
747 |
+
padding: 10px 0 2px 0;
|
748 |
+
margin-bottom: 0;
|
749 |
+
}
|
750 |
+
|
751 |
+
.header-section .navbar-section .navbar-brand {
|
752 |
+
padding-left: 15px;
|
753 |
+
}
|
754 |
+
|
755 |
+
.header-section .navbar-section .navbar-brand img {
|
756 |
+
width: auto;
|
757 |
+
max-height: 45px;
|
758 |
+
}
|
759 |
+
|
760 |
+
.header-section .navbar-section .nav-btn {
|
761 |
+
position: relative;
|
762 |
+
margin: 0 18px;
|
763 |
+
}
|
764 |
+
|
765 |
+
.header-section .navbar-section .nav-btn .nav-icon {
|
766 |
+
max-width: 19px;
|
767 |
+
}
|
768 |
+
|
769 |
+
.header-section .navbar-section .nav-btn .not-count {
|
770 |
+
position: absolute;
|
771 |
+
top: -5px;
|
772 |
+
right: -15px;
|
773 |
+
width: 20px;
|
774 |
+
height: 20px;
|
775 |
+
line-height: 20px;
|
776 |
+
text-align: center;
|
777 |
+
padding: 0;
|
778 |
+
border-radius: 50%;
|
779 |
+
background-color: #2D62ED;
|
780 |
+
}
|
781 |
+
|
782 |
+
.header-section .navbar-section .nav-btn .free-plan {
|
783 |
+
background-color: rgba(8, 114, 252, 0.1);
|
784 |
+
color: #0872FC;
|
785 |
+
border-radius: 500px;
|
786 |
+
padding: 5px 10px;
|
787 |
+
font-size: 14px;
|
788 |
+
font-weight: 400;
|
789 |
+
text-transform: capitalize;
|
790 |
+
}
|
791 |
+
|
792 |
+
.header-section .navbar-section .account-dropdown .btn {
|
793 |
+
border: 0;
|
794 |
+
font-size: 14px;
|
795 |
+
font-weight: 700;
|
796 |
+
}
|
797 |
+
|
798 |
+
.header-section .navbar-section .account-dropdown .btn.dropdown-toggle::after {
|
799 |
+
border: solid black;
|
800 |
+
border-style: solid;
|
801 |
+
border-width: 0 1px 1px 0;
|
802 |
+
vertical-align: middle;
|
803 |
+
-webkit-transform: rotate(45deg);
|
804 |
+
transform: rotate(45deg);
|
805 |
+
padding: 3px;
|
806 |
+
margin-left: 10px;
|
807 |
+
margin-top: -2px;
|
808 |
+
}
|
809 |
+
|
810 |
+
.header-section .navbar-section .account-dropdown .btn:focus {
|
811 |
+
-webkit-box-shadow: none;
|
812 |
+
box-shadow: none;
|
813 |
+
}
|
814 |
+
|
815 |
+
.header-section .navbar-section .account-dropdown .dropdown-menu {
|
816 |
+
padding: 0;
|
817 |
+
margin: -15px 1rem 0 0;
|
818 |
+
border-radius: 0;
|
819 |
+
border: 0;
|
820 |
+
border-radius: 5px;
|
821 |
+
-ms-box-shadow: 0 3px 6px #00000029;
|
822 |
+
-webkit-box-shadow: 0 3px 6px #00000029;
|
823 |
+
box-shadow: 0 3px 6px #00000029;
|
824 |
+
}
|
825 |
+
|
826 |
+
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item {
|
827 |
+
font-size: 14px;
|
828 |
+
padding: 5px 10px;
|
829 |
+
}
|
830 |
+
|
831 |
+
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:first-child {
|
832 |
+
border-radius: 4px 4px 0 0;
|
833 |
+
}
|
834 |
+
|
835 |
+
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:last-child {
|
836 |
+
border-radius: 0 0 4px 4px;
|
837 |
+
}
|
838 |
+
|
839 |
+
.header-section .navbar-section .account-dropdown .dropdown-menu .dropdown-item:focus {
|
840 |
+
color: #16181b;
|
841 |
+
background-color: #f8f9fa;
|
842 |
+
}
|
843 |
+
|
844 |
+
.form-group {
|
845 |
+
position: relative;
|
846 |
+
}
|
847 |
+
|
848 |
+
.form-control, .select2.select2-container--default .select2-selection--single {
|
849 |
+
border-color: #707070;
|
850 |
+
height: 30px;
|
851 |
+
font-size: 14px;
|
852 |
+
background-color: #FFFFFF;
|
853 |
+
border-width: 0.5px;
|
854 |
+
border-radius: 15px;
|
855 |
+
padding-left: 7px;
|
856 |
+
}
|
857 |
+
.wp-core-ui select{padding-left: 15px; margin-top: 2px; border-radius: 15px; background-position: right 8px top 55%;}
|
858 |
+
.form-control::-webkit-input-placeholder, .select2.select2-container--default .select2-selection--single::-webkit-input-placeholder {
|
859 |
+
color: #B2B2B2;
|
860 |
+
}
|
861 |
+
|
862 |
+
.form-control::-ms-input-placeholder, .select2.select2-container--default .select2-selection--single::-ms-input-placeholder {
|
863 |
+
color: #B2B2B2;
|
864 |
+
}
|
865 |
+
|
866 |
+
.form-control:-ms-input-placeholder, .select2.select2-container--default .select2-selection--single:-ms-input-placeholder {
|
867 |
+
color: #B2B2B2;
|
868 |
+
}
|
869 |
+
|
870 |
+
.form-control::placeholder, .select2.select2-container--default .select2-selection--single::placeholder {
|
871 |
+
color: #B2B2B2;
|
872 |
+
}
|
873 |
+
|
874 |
+
.form-control:focus, .select2.select2-container--default .select2-selection--single:focus {
|
875 |
+
-ms-box-shadow: none;
|
876 |
+
-webkit-box-shadow: none;
|
877 |
+
box-shadow: none;
|
878 |
+
outline: none;
|
879 |
+
border-color: #1A2750;
|
880 |
+
}
|
881 |
+
|
882 |
+
.select2 {
|
883 |
+
width: 100% !important;
|
884 |
+
}
|
885 |
+
|
886 |
+
/*.select2.select2-container--default .select2-selection--single .select2-selection__rendered {
|
887 |
+
line-height: 38px;
|
888 |
+
}*/
|
889 |
+
|
890 |
+
.select2.select2-container--default .select2-selection__arrow {
|
891 |
+
height: 40px !important;
|
892 |
+
}
|
893 |
+
|
894 |
+
|
895 |
+
.select2-dropdown {
|
896 |
+
border-color: #707070 !important;
|
897 |
+
}
|
898 |
+
|
899 |
+
.select2-dropdown .select2-results__options .select2-results__option--highlighted {
|
900 |
+
background-color: #5c85f1 !important;
|
901 |
+
color: #FFFFFF !important;
|
902 |
+
}
|
903 |
+
|
904 |
+
.select2-dropdown .select2-results__options .select2-results__option--selected {
|
905 |
+
background-color: #2D62ED !important;
|
906 |
+
color: #FFFFFF !important;
|
907 |
+
}
|
908 |
+
|
909 |
+
.input-daterange .form-control, .input-daterange .select2.select2-container--default .select2-selection--single, .select2.select2-container--default .input-daterange .select2-selection--single {
|
910 |
+
text-align: left;
|
911 |
+
border-radius: 10px !important;
|
912 |
+
border-width: 0.5px;
|
913 |
+
height: 35px;
|
914 |
+
background: url(../images/icon/arrow-down-sign-to-navigate.svg) no-repeat 95%;
|
915 |
+
}
|
916 |
+
|
917 |
+
.input-daterange .text {
|
918 |
+
font-size: 14px;
|
919 |
+
}
|
920 |
+
|
921 |
+
.campaing-date {
|
922 |
+
width: 350px;
|
923 |
+
}
|
924 |
+
|
925 |
+
.campaing-date .input-group {
|
926 |
+
-webkit-box-align: center;
|
927 |
+
-ms-flex-align: center;
|
928 |
+
align-items: center;
|
929 |
+
}
|
930 |
+
|
931 |
+
.datepicker.datepicker-dropdown {
|
932 |
+
border: 0;
|
933 |
+
font-size: 14px;
|
934 |
+
border-radius: 15px;
|
935 |
+
-ms-box-shadow: 0 3px 6px #272D3B33;
|
936 |
+
-webkit-box-shadow: 0 3px 6px #272D3B33;
|
937 |
+
box-shadow: 0 3px 6px #272D3B33;
|
938 |
+
width: 220px;
|
939 |
+
}
|
940 |
+
|
941 |
+
.datepicker .table-condensed {
|
942 |
+
width: 100%;
|
943 |
+
}
|
944 |
+
|
945 |
+
.datepicker th {
|
946 |
+
font-weight: 500 !important;
|
947 |
+
}
|
948 |
+
|
949 |
+
.datepicker td,
|
950 |
+
.datepicker th {
|
951 |
+
width: 30px !important;
|
952 |
+
height: 30px !important;
|
953 |
+
border-radius: 50% !important;
|
954 |
+
}
|
955 |
+
|
956 |
+
.datepicker td.day.active {
|
957 |
+
background: #1A2750 !important;
|
958 |
+
}
|
959 |
+
|
960 |
+
.datepicker td.day.today {
|
961 |
+
background: #2D62ED !important;
|
962 |
+
color: #FFFFFF;
|
963 |
+
}
|
964 |
+
|
965 |
+
.datepicker td span.month.active {
|
966 |
+
background: #1A2750 !important;
|
967 |
+
}
|
968 |
+
|
969 |
+
.datepicker td span.year.active, .datepicker td span.year.focused {
|
970 |
+
background: #1A2750 !important;
|
971 |
+
}
|
972 |
+
|
973 |
+
.custom-control .custom-control-input:focus ~ .custom-control-label::before {
|
974 |
+
-ms-box-shadow: none;
|
975 |
+
-webkit-box-shadow: none;
|
976 |
+
box-shadow: none;
|
977 |
+
outline: none;
|
978 |
+
}
|
979 |
+
|
980 |
+
.custom-control.custom-radio .custom-control-label {
|
981 |
+
padding-left: 0;
|
982 |
+
}
|
983 |
+
|
984 |
+
.custom-control.custom-radio .custom-control-label::before {
|
985 |
+
width: 16px;
|
986 |
+
height: 16px;
|
987 |
+
background-color: transparent;
|
988 |
+
border-width: 1px;
|
989 |
+
border-color: #707070;
|
990 |
+
top: 1px;
|
991 |
+
}
|
992 |
+
|
993 |
+
.custom-control.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
|
994 |
+
border-color: #707070;
|
995 |
+
}
|
996 |
+
|
997 |
+
.custom-control.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
|
998 |
+
width: 8px;
|
999 |
+
height: 8px;
|
1000 |
+
border-radius: 50%;
|
1001 |
+
background-image: none;
|
1002 |
+
background-color: #2D62ED;
|
1003 |
+
margin-left: 4px;
|
1004 |
+
top: 5px;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
.custom-control.custom-checkbox .custom-control-label:before {
|
1008 |
+
border-radius: 2px;
|
1009 |
+
margin-top: -3px;
|
1010 |
+
border-color: #5E5E5E;
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
.custom-control.custom-checkbox .custom-control-input:checked ~ .custom-control-label:before {
|
1014 |
+
background-color: #2D62ED;
|
1015 |
+
border-color: #2D62ED;
|
1016 |
+
border-radius: 2px;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
.custom-control.custom-checkbox .custom-control-input:checked ~ .custom-control-label:after {
|
1020 |
+
margin-top: -3px;
|
1021 |
+
background-image: url(../img/tick-white.svg);
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
.custom-control.custom-checkbox .custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
|
1025 |
+
-ms-box-shadow: none;
|
1026 |
+
-webkit-box-shadow: none;
|
1027 |
+
box-shadow: none;
|
1028 |
+
outline: none;
|
1029 |
+
border-color: #2D62ED;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
.custom-switch .custom-control-label:before {
|
1033 |
+
width: 35px;
|
1034 |
+
height: 20px;
|
1035 |
+
border-radius: 500px;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
.custom-switch .custom-control-label:after {
|
1039 |
+
left: calc(-2.25rem + 3px);
|
1040 |
+
top: calc(.25rem + 4px);
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
.custom-switch .custom-control-input:checked ~ .custom-control-label:after {
|
1044 |
+
-webkit-transform: translateX(1.25rem);
|
1045 |
+
transform: translateX(1.25rem);
|
1046 |
+
top: calc(.25rem + 4px);
|
1047 |
+
left: calc(-2.25rem + 1px);
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
.custom-control-label {
|
1051 |
+
color: #5E5E5E;
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
textarea.form-control, .select2.select2-container--default textarea.select2-selection--single {
|
1055 |
+
height: auto !important;
|
1056 |
+
}
|
1057 |
+
|
1058 |
+
.form-label-control {
|
1059 |
+
margin-bottom: 0.8rem;
|
1060 |
+
font-weight: 700;
|
1061 |
+
}
|
1062 |
+
|
1063 |
+
.campaign-date .custom-control-label {
|
1064 |
+
display: inline;
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
.campaign-date .custom-control-label .custom-radio .select2 {
|
1068 |
+
vertical-align: middle;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
.wiz-tab .nav-pills {
|
1072 |
+
-ms-box-shadow: 0 1px 2px #00000029;
|
1073 |
+
-webkit-box-shadow: 0 1px 2px #00000029;
|
1074 |
+
box-shadow: 0 1px 2px #00000029;
|
1075 |
+
background-color: #FFFFFF;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
.wiz-tab .nav-pills .nav-item {
|
1079 |
+
-ms-flex-preferred-size: auto;
|
1080 |
+
flex-basis: auto;
|
1081 |
+
-webkit-box-flex: initial;
|
1082 |
+
-ms-flex-positive: initial;
|
1083 |
+
flex-grow: initial;
|
1084 |
+
margin-bottom: 0px !important;
|
1085 |
+
}
|
1086 |
+
.wiz-tab .nav-pills .nav-item .nav-link a{color: #000000;}
|
1087 |
+
.wiz-tab .nav-pills .nav-item .nav-link {
|
1088 |
+
color: #000000;
|
1089 |
+
padding: 15px 20px;
|
1090 |
+
-webkit-box-align: center;
|
1091 |
+
-ms-flex-align: center;
|
1092 |
+
align-items: center;
|
1093 |
+
-webkit-box-pack: center;
|
1094 |
+
-ms-flex-pack: center;
|
1095 |
+
justify-content: center;
|
1096 |
+
display: -webkit-box;
|
1097 |
+
display: -ms-flexbox;
|
1098 |
+
display: flex;
|
1099 |
+
height: 100%;
|
1100 |
+
border-radius: 0;
|
1101 |
+
font-size: 14px;
|
1102 |
+
font-weight: 700;
|
1103 |
+
text-transform: uppercase;
|
1104 |
+
border-bottom: 2px solid transparent;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
.wiz-tab .nav-pills .nav-item .nav-link.active {
|
1108 |
+
border-color: #0872FC !important;
|
1109 |
+
color: #0872FC !important;
|
1110 |
+
background-color: transparent !important;
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
.tab-content {
|
1114 |
+
margin-top: 15px;
|
1115 |
+
padding-bottom: 15px;
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
.tab-content .tab-card {
|
1119 |
+
background: #ffffff;
|
1120 |
+
padding: 30px;
|
1121 |
+
border-radius: 15px;
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
.tab-content .tab-card.bg-none {
|
1125 |
+
background: none;
|
1126 |
+
border: 0;
|
1127 |
+
padding: 0;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
.tab-content .tab-card .text-header {
|
1131 |
+
font-size: 20px;
|
1132 |
+
font-weight: 700;
|
1133 |
+
margin-bottom: 1.5rem;
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
.tab-content .tab-card .working {
|
1137 |
+
max-width: 100%;
|
1138 |
+
text-align: center;
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
.tab-content .tab-card .working img {
|
1142 |
+
max-width: 100%;
|
1143 |
+
margin: 0 auto;
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
.tab-content .tab-card .db-btn {
|
1147 |
+
margin-top: 30px;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
.tab-content .tab-card .db-btn .btn {
|
1151 |
+
margin-right: 30px;
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
.tab-content .tab-card .custom-control-label {
|
1155 |
+
font-size: 14px;
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
.tab-content .white-box {
|
1159 |
+
background-color: #FFFFFF;
|
1160 |
+
border: 1px solid #d1d1d1;
|
1161 |
+
padding: 10px;
|
1162 |
+
margin-bottom: 15px;
|
1163 |
+
}
|
1164 |
+
|
1165 |
+
.tab-content .white-box:last-child {
|
1166 |
+
margin-bottom: 0;
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
.tab-content .text-m {
|
1170 |
+
display: block;
|
1171 |
+
margin-bottom: 0.35rem;
|
1172 |
+
font-size: 14px;
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
.btn-google {
|
1176 |
+
-ms-box-shadow: 3px 3px 3px #00000029;
|
1177 |
+
-webkit-box-shadow: 3px 3px 3px #00000029;
|
1178 |
+
box-shadow: 3px 3px 3px #00000029;
|
1179 |
+
font-weight: 900;
|
1180 |
+
font-size: 14px;
|
1181 |
+
}
|
1182 |
+
|
1183 |
+
.btn-google img {
|
1184 |
+
width: 25px;
|
1185 |
+
margin-right: 1.5rem;
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
.licence {
|
1189 |
+
border: 0.5px solid #A9A9A9;
|
1190 |
+
padding: 30px;
|
1191 |
+
margin-bottom: 15px;
|
1192 |
+
border-radius: 15px;
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
.licence p {
|
1196 |
+
margin-bottom: 0.35rem;
|
1197 |
+
font-size: 14px;
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
.licence .input-group {
|
1201 |
+
margin-top: 15px;
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
.licence .input-group .form-control, .licence .input-group .select2.select2-container--default .select2-selection--single, .select2.select2-container--default .licence .input-group .select2-selection--single {
|
1205 |
+
border-radius: 10px;
|
1206 |
+
margin-right: 15px;
|
1207 |
+
color: #000000;
|
1208 |
+
}
|
1209 |
+
|
1210 |
+
.licence .input-group .input-group-append {
|
1211 |
+
margin-left: 0;
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
.licence .input-group .input-group-append .btn {
|
1215 |
+
width: 40px;
|
1216 |
+
height: 40px;
|
1217 |
+
padding: 0;
|
1218 |
+
border-radius: 50%;
|
1219 |
+
line-height: normal;
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
.licence .input-group .input-group-append .btn img {
|
1223 |
+
max-width: 18px;
|
1224 |
+
}
|
1225 |
+
|
1226 |
+
.ecom-track {
|
1227 |
+
margin-top: 5px;
|
1228 |
+
margin-bottom: 0;
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
.ecom-track li {
|
1232 |
+
margin-bottom: 15px;
|
1233 |
+
font-size: 14px;
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
.ecom-track li .img-icon {
|
1237 |
+
width: 18px;
|
1238 |
+
margin-right: 5px;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
.ecom-track li .trk-text {
|
1242 |
+
vertical-align: middle;
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
.premium-list {
|
1246 |
+
margin-bottom: 0;
|
1247 |
+
margin-top: 15px;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
.premium-list li {
|
1251 |
+
margin-bottom: 15px;
|
1252 |
+
font-size: 14px;
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.premium-list li span {
|
1256 |
+
position: relative;
|
1257 |
+
display: block;
|
1258 |
+
padding-left: 15px;
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
.premium-list li span:before {
|
1262 |
+
content: '';
|
1263 |
+
width: 5px;
|
1264 |
+
height: 5px;
|
1265 |
+
border-radius: 50%;
|
1266 |
+
background: #000;
|
1267 |
+
position: absolute;
|
1268 |
+
left: 0;
|
1269 |
+
top: 7px;
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
.google-account-analytics .ga-title {
|
1273 |
+
font-size: 14px;
|
1274 |
+
font-weight: 700;
|
1275 |
+
margin-bottom: 0;
|
1276 |
+
}
|
1277 |
+
|
1278 |
+
.google-account-analytics .ga-text {
|
1279 |
+
margin-bottom: 0;
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
.google-account-analytics .acc-num {
|
1283 |
+
display: inline-block;
|
1284 |
+
border: 0.5px solid #A9A9A9;
|
1285 |
+
border-radius: 10px;
|
1286 |
+
padding: 5px 8px;
|
1287 |
+
min-width: 180px;
|
1288 |
+
text-align: right;
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
.google-account-analytics .acc-num .ga-text {
|
1292 |
+
font-weight: 900;
|
1293 |
+
border-right: 1px solid #A9A9A9;
|
1294 |
+
padding: 0 5px;
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
.google-account-analytics .acc-num .ga-text:last-child {
|
1298 |
+
border-right: 0;
|
1299 |
+
padding-right: 0;
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
.google-account-analytics .acc-num p {
|
1303 |
+
display: inline-block;
|
1304 |
+
}
|
1305 |
+
|
1306 |
+
.content-heading {
|
1307 |
+
font-size: 18px;
|
1308 |
+
font-weight: 700;
|
1309 |
+
}
|
1310 |
+
|
1311 |
+
.wizard-section.campaign-wizard {
|
1312 |
+
padding: 0;
|
1313 |
+
}
|
1314 |
+
|
1315 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps {
|
1316 |
+
border-radius: 0 !important;
|
1317 |
+
-ms-box-shadow: none;
|
1318 |
+
-webkit-box-shadow: none;
|
1319 |
+
box-shadow: none;
|
1320 |
+
background-color: transparent;
|
1321 |
+
max-width: 520px;
|
1322 |
+
margin: 0 auto 20px auto;
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li {
|
1326 |
+
text-align: center;
|
1327 |
+
border-right: 0;
|
1328 |
+
padding: 0 25px;
|
1329 |
+
}
|
1330 |
+
|
1331 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li:last-child::before {
|
1332 |
+
display: none;
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li .wiz-title {
|
1336 |
+
color: #5E5E5E;
|
1337 |
+
font-size: 14px;
|
1338 |
+
font-weight: 400;
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li .step {
|
1342 |
+
visibility: hidden;
|
1343 |
+
}
|
1344 |
+
|
1345 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li a::before {
|
1346 |
+
content: '' !important;
|
1347 |
+
width: 16px;
|
1348 |
+
height: 16px;
|
1349 |
+
border: 1px solid #707070;
|
1350 |
+
display: inline-block;
|
1351 |
+
position: absolute;
|
1352 |
+
margin: 0 auto;
|
1353 |
+
left: 0;
|
1354 |
+
right: 0;
|
1355 |
+
top: 0;
|
1356 |
+
border-radius: 50%;
|
1357 |
+
z-index: 10;
|
1358 |
+
background-color: #F2F2F2;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li::before {
|
1362 |
+
content: '' !important;
|
1363 |
+
width: 100%;
|
1364 |
+
border: 2px solid #5E5E5E;
|
1365 |
+
display: inline-block;
|
1366 |
+
position: absolute;
|
1367 |
+
left: 50%;
|
1368 |
+
top: 0;
|
1369 |
+
margin-top: 5px;
|
1370 |
+
}
|
1371 |
+
|
1372 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current {
|
1373 |
+
background-color: transparent;
|
1374 |
+
}
|
1375 |
+
|
1376 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current .wiz-title {
|
1377 |
+
color: #25283D;
|
1378 |
+
font-weight: 700;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.current a::after {
|
1382 |
+
content: '' !important;
|
1383 |
+
width: calc(16px - 8px);
|
1384 |
+
height: calc(16px - 8px);
|
1385 |
+
background-color: #2D62ED;
|
1386 |
+
display: inline-block;
|
1387 |
+
position: absolute;
|
1388 |
+
margin: 0 auto;
|
1389 |
+
left: 0;
|
1390 |
+
right: 0;
|
1391 |
+
top: 0;
|
1392 |
+
margin-top: 4px;
|
1393 |
+
border-radius: 50%;
|
1394 |
+
z-index: 10;
|
1395 |
+
}
|
1396 |
+
|
1397 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a::before {
|
1398 |
+
top: 0;
|
1399 |
+
width: 16px;
|
1400 |
+
height: 16px;
|
1401 |
+
background-size: 16px auto;
|
1402 |
+
border-color: transparent;
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a::after {
|
1406 |
+
display: none;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .steps ul li.done a .wiz-title {
|
1410 |
+
color: #25283D;
|
1411 |
+
font-weight: 400;
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content {
|
1415 |
+
background-color: transparent;
|
1416 |
+
-ms-box-shadow: none;
|
1417 |
+
-webkit-box-shadow: none;
|
1418 |
+
box-shadow: none;
|
1419 |
+
padding: 0;
|
1420 |
+
margin-bottom: 30px;
|
1421 |
+
overflow: initial;
|
1422 |
+
}
|
1423 |
+
|
1424 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content > .body {
|
1425 |
+
padding: 0;
|
1426 |
+
}
|
1427 |
+
|
1428 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper {
|
1429 |
+
background-color: #F2F2F2;
|
1430 |
+
-ms-box-shadow: none;
|
1431 |
+
-webkit-box-shadow: none;
|
1432 |
+
box-shadow: none;
|
1433 |
+
padding: 0;
|
1434 |
+
border-radius: 15px;
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child {
|
1438 |
+
background-color: #000338;
|
1439 |
+
padding: 3px;
|
1440 |
+
margin-bottom: 1rem;
|
1441 |
+
margin-left: 0;
|
1442 |
+
margin-right: 0;
|
1443 |
+
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
1444 |
+
}
|
1445 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .col-6:first-child{
|
1446 |
+
border-right: 1px solid #FFFFFF;
|
1447 |
+
}
|
1448 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .heading-tbl {
|
1449 |
+
margin-bottom: 0;
|
1450 |
+
font-size: 15px;
|
1451 |
+
color: #FFFFFF;
|
1452 |
+
text-decoration: none;
|
1453 |
+
font-weight: normal;
|
1454 |
+
text-align: center;
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row:first-child .col-6:last-child .heading-tbl {
|
1458 |
+
border-right: 0;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row .col-6 .form-group {
|
1462 |
+
padding-left: 15px;
|
1463 |
+
padding-right: 15px;
|
1464 |
+
margin-bottom: 10px;
|
1465 |
+
}
|
1466 |
+
|
1467 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .card-wrapper .row .col-6 .form-group .form-label-control {
|
1468 |
+
margin-bottom: 0;
|
1469 |
+
}
|
1470 |
+
|
1471 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .heading-tbl {
|
1472 |
+
font-size: 16px;
|
1473 |
+
text-decoration: underline;
|
1474 |
+
margin-bottom: 1rem;
|
1475 |
+
font-weight: 400;
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .content .td-head {
|
1479 |
+
display: block;
|
1480 |
+
font-weight: 700;
|
1481 |
+
text-align: right;
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .actions {
|
1485 |
+
position: static;
|
1486 |
+
height: auto;
|
1487 |
+
padding: 0;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
.wizard-section.campaign-wizard .wizard-content .wizard .actions ul {
|
1491 |
+
-webkit-box-pack: start;
|
1492 |
+
-ms-flex-pack: start;
|
1493 |
+
justify-content: flex-start;
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
.sync-new-product .product-card {
|
1497 |
+
background-color: #F2F2F2;
|
1498 |
+
border-radius: 10px;
|
1499 |
+
-ms-box-shadow: 0 3px 6px #00000029;
|
1500 |
+
-webkit-box-shadow: 0 3px 6px #00000029;
|
1501 |
+
box-shadow: 0 3px 6px #00000029;
|
1502 |
+
margin-top: 1rem;
|
1503 |
+
}
|
1504 |
+
|
1505 |
+
.sync-new-product .product-card .row {
|
1506 |
+
margin-left: 0;
|
1507 |
+
margin-right: 0;
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
.sync-new-product .product-card .row [class*="col-"] {
|
1511 |
+
padding: 0;
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
.sync-new-product .product-card .row [class*="col-"]:first-child .card {
|
1515 |
+
border-radius: calc(10px - 1px) 0 0 calc(10px - 1px);
|
1516 |
+
margin-left: -1px;
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
.sync-new-product .product-card .row [class*="col-"]:last-child .card {
|
1520 |
+
border-radius: 0 0 calc(10px - 1px) calc(10px - 1px);
|
1521 |
+
margin-right: -1px;
|
1522 |
+
}
|
1523 |
+
|
1524 |
+
.sync-new-product .product-card .row [class*="col"]:last-child .card:after {
|
1525 |
+
border-right: 0;
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
.sync-new-product .product-card .card {
|
1529 |
+
border: 0;
|
1530 |
+
padding: 10px 5px;
|
1531 |
+
text-align: center;
|
1532 |
+
border-radius: 0;
|
1533 |
+
background-color: transparent;
|
1534 |
+
box-shadow: none;
|
1535 |
+
margin: 0;
|
1536 |
+
}
|
1537 |
+
|
1538 |
+
.sync-new-product .product-card .col:after {
|
1539 |
+
content: '';
|
1540 |
+
border-right: 1px solid #A9A9A9;
|
1541 |
+
display: block;
|
1542 |
+
position: absolute;
|
1543 |
+
top: 8px;
|
1544 |
+
bottom: 8px;
|
1545 |
+
right: 0;
|
1546 |
+
}
|
1547 |
+
.sync-new-product .product-card .col:last-child:after {
|
1548 |
+
border-right: 0;
|
1549 |
+
}
|
1550 |
+
|
1551 |
+
.sync-new-product .product-card .card.active {
|
1552 |
+
background-color: #FFFFFF;
|
1553 |
+
}
|
1554 |
+
|
1555 |
+
.sync-new-product .product-card .card.active .pro-title, .sync-new-product .product-card .card.active .pro-count {
|
1556 |
+
color: #2D62ED !important;
|
1557 |
+
}
|
1558 |
+
|
1559 |
+
.sync-new-product .product-card .card.active:before {
|
1560 |
+
content: '';
|
1561 |
+
border-bottom: 2px solid #2D62ED;
|
1562 |
+
display: block;
|
1563 |
+
position: absolute;
|
1564 |
+
left: 5px;
|
1565 |
+
bottom: 0;
|
1566 |
+
right: 5px;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
.sync-new-product .product-card .card.active:after {
|
1570 |
+
border-color: #FFFFFF;
|
1571 |
+
}
|
1572 |
+
|
1573 |
+
.sync-new-product .product-card .card .pro-title {
|
1574 |
+
font-weight: 400;
|
1575 |
+
margin-bottom: 0;
|
1576 |
+
}
|
1577 |
+
|
1578 |
+
.sync-new-product .product-card .card .pro-count {
|
1579 |
+
font-size: 35px;
|
1580 |
+
font-weight: 900;
|
1581 |
+
margin-bottom: 0;
|
1582 |
+
}
|
1583 |
+
|
1584 |
+
.sync-new-product .product-card .card.pending .pro-count, .sync-new-product .product-card .card.pending .pro-title {
|
1585 |
+
color: #5E5E5E;
|
1586 |
+
}
|
1587 |
+
|
1588 |
+
.sync-new-product .product-card .card.approved .pro-count, .sync-new-product .product-card .card.approved .pro-title {
|
1589 |
+
color: #66BB6A;
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
.sync-new-product .product-card .card.disapproved .pro-count, .sync-new-product .product-card .card.disapproved .pro-title {
|
1593 |
+
color: #EE2C3C;
|
1594 |
+
}
|
1595 |
+
|
1596 |
+
.sync-new-product .title {
|
1597 |
+
font-size: 14px;
|
1598 |
+
font-weight: 500;
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
.feature-list-section {
|
1602 |
+
background: transparent linear-gradient(63deg, #03D7FD 0%, #0872FC 100%) 0% 0% no-repeat padding-box;
|
1603 |
+
border-radius: 15px;
|
1604 |
+
padding: 15px 30px;
|
1605 |
+
margin-top: 30px;
|
1606 |
+
}
|
1607 |
+
|
1608 |
+
.feature-list-section .feature-heading {
|
1609 |
+
text-align: center;
|
1610 |
+
margin-bottom: 30px;
|
1611 |
+
}
|
1612 |
+
|
1613 |
+
.feature-list-section .feature-heading span {
|
1614 |
+
border-bottom: 1px solid #FFFFFF;
|
1615 |
+
padding: 0 10px 5px 10px;
|
1616 |
+
font-size: 18px;
|
1617 |
+
color: #FFFFFF;
|
1618 |
+
}
|
1619 |
+
|
1620 |
+
.feature-list-section .media {
|
1621 |
+
position: relative;
|
1622 |
+
max-width: 85%;
|
1623 |
+
}
|
1624 |
+
|
1625 |
+
.feature-list-section .media .feature-icon {
|
1626 |
+
width: 50px;
|
1627 |
+
margin-right: 20px;
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
.feature-list-section .media .feature-icon .img-tg {
|
1631 |
+
max-width: 50px;
|
1632 |
+
}
|
1633 |
+
|
1634 |
+
.feature-list-section .media .title-feature {
|
1635 |
+
color: #FFFFFF;
|
1636 |
+
font-size: 14px;
|
1637 |
+
font-weight: 900;
|
1638 |
+
margin-bottom: 6px;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
.feature-list-section .media .feature-content {
|
1642 |
+
color: #FFFFFF;
|
1643 |
+
font-weight: 300;
|
1644 |
+
margin-bottom: 0;
|
1645 |
+
}
|
1646 |
+
|
1647 |
+
.feature-list-section .media.lock .feature-icon, .feature-list-section .media.lock .media-body {
|
1648 |
+
opacity: 0.5;
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
.feature-list-section .media .lock-icon {
|
1652 |
+
position: absolute;
|
1653 |
+
top: 12px;
|
1654 |
+
left: -30px;
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
.feature-list-section .list-section {
|
1658 |
+
margin-bottom: 0;
|
1659 |
+
}
|
1660 |
+
|
1661 |
+
.feature-list-section .list-section .row > [class*="col-"] {
|
1662 |
+
padding-bottom: 15px;
|
1663 |
+
display: -webkit-box;
|
1664 |
+
display: -ms-flexbox;
|
1665 |
+
display: flex;
|
1666 |
+
-webkit-box-pack: center;
|
1667 |
+
-ms-flex-pack: center;
|
1668 |
+
justify-content: center;
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
.feature-list-section .unlock-premium {
|
1672 |
+
text-align: center;
|
1673 |
+
margin-top: 50px;
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
.feature-list-section .unlock-premium .btn:hover img, .feature-list-section .unlock-premium .btn:focus img {
|
1677 |
+
-webkit-filter: grayscale(100%) brightness(100);
|
1678 |
+
filter: grayscale(100%) brightness(100);
|
1679 |
+
}
|
1680 |
+
|
1681 |
+
.google-slider {
|
1682 |
+
margin-top: 30px;
|
1683 |
+
-ms-box-shadow: 1px 1px 4px #00000026;
|
1684 |
+
-webkit-box-shadow: 1px 1px 4px #00000026;
|
1685 |
+
box-shadow: 1px 1px 4px #00000026;
|
1686 |
+
padding: 30px;
|
1687 |
+
border-radius: 15px;
|
1688 |
+
}
|
1689 |
+
|
1690 |
+
.google-slider .slider-img img {
|
1691 |
+
max-width: 400px;
|
1692 |
+
}
|
1693 |
+
|
1694 |
+
.google-slider .sld-hd {
|
1695 |
+
font-size: 12px;
|
1696 |
+
color: #A9A9A9;
|
1697 |
+
margin-bottom: 15px;
|
1698 |
+
}
|
1699 |
+
|
1700 |
+
.google-slider .sld-sbhd {
|
1701 |
+
font-size: 18px;
|
1702 |
+
margin-bottom: 15px;
|
1703 |
+
font-weight: 700;
|
1704 |
+
}
|
1705 |
+
|
1706 |
+
.google-slider .sld-cnt {
|
1707 |
+
font-size: 14px;
|
1708 |
+
color: #5E5E5E;
|
1709 |
+
}
|
1710 |
+
|
1711 |
+
.google-slider .sld-list {
|
1712 |
+
margin-bottom: 0;
|
1713 |
+
margin-top: 30px;
|
1714 |
+
}
|
1715 |
+
|
1716 |
+
.google-slider .sld-list li {
|
1717 |
+
margin-bottom: 12px;
|
1718 |
+
font-weight: 700;
|
1719 |
+
font-size: 14px;
|
1720 |
+
position: relative;
|
1721 |
+
padding-left: 24px;
|
1722 |
+
}
|
1723 |
+
|
1724 |
+
.google-slider .sld-list li:last-child {
|
1725 |
+
margin-bottom: 0;
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
.google-slider .sld-list li .tick-icon {
|
1729 |
+
position: absolute;
|
1730 |
+
left: 0;
|
1731 |
+
top: 5px;
|
1732 |
+
width: 14px;
|
1733 |
+
}
|
1734 |
+
|
1735 |
+
.google-slider .carousel-item {
|
1736 |
+
padding: 0 30px;
|
1737 |
+
}
|
1738 |
+
|
1739 |
+
.testimonials {
|
1740 |
+
margin-top: 30px;
|
1741 |
+
}
|
1742 |
+
|
1743 |
+
.testimonials ul li {
|
1744 |
+
margin-bottom: 15px;
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
.testimonials ul li:last-child {
|
1748 |
+
margin-bottom: 0;
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
.testimonials ul li:nth-child(even) .user-details {
|
1752 |
+
-webkit-box-ordinal-group: 3;
|
1753 |
+
-ms-flex-order: 2;
|
1754 |
+
order: 2;
|
1755 |
+
margin-left: 50px;
|
1756 |
+
margin-right: 0 !important;
|
1757 |
+
}
|
1758 |
+
|
1759 |
+
.testimonials ul li:nth-child(even) .media-body {
|
1760 |
+
-webkit-box-ordinal-group: 2;
|
1761 |
+
-ms-flex-order: 1;
|
1762 |
+
order: 1;
|
1763 |
+
}
|
1764 |
+
|
1765 |
+
.testimonials ul li .testimonila-box {
|
1766 |
+
background-color: #000338;
|
1767 |
+
padding: 15px 30px;
|
1768 |
+
border-radius: 15px;
|
1769 |
+
}
|
1770 |
+
|
1771 |
+
.testimonials ul li .testimonila-box .user-details {
|
1772 |
+
margin-right: 50px;
|
1773 |
+
}
|
1774 |
+
|
1775 |
+
.testimonials ul li .testimonila-box .user-details .user-image-box {
|
1776 |
+
width: 100px;
|
1777 |
+
height: 100px;
|
1778 |
+
border-radius: 50%;
|
1779 |
+
margin: 0 auto 5px auto;
|
1780 |
+
}
|
1781 |
+
|
1782 |
+
.testimonials ul li .testimonila-box .user-details .user-image-box .user-image {
|
1783 |
+
border-radius: 50%;
|
1784 |
+
width: 100%;
|
1785 |
+
height: 100%;
|
1786 |
+
-o-object-fit: cover;
|
1787 |
+
object-fit: cover;
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
.testimonials ul li .testimonila-box .user-details .user-name {
|
1791 |
+
font-size: 12px;
|
1792 |
+
color: #FFFFFF;
|
1793 |
+
margin-bottom: 3px;
|
1794 |
+
text-align: center;
|
1795 |
+
}
|
1796 |
+
|
1797 |
+
.testimonials ul li .testimonila-box .user-details .designation {
|
1798 |
+
color: #FFFFFF;
|
1799 |
+
font-weight: 300;
|
1800 |
+
text-align: center;
|
1801 |
+
font-size: 12px;
|
1802 |
+
margin-bottom: 0;
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
.testimonials ul li .testimonila-box .testi-content {
|
1806 |
+
color: #FFFFFF;
|
1807 |
+
font-size: 13px;
|
1808 |
+
font-weight: 300;
|
1809 |
+
padding: 0 20px;
|
1810 |
+
margin-bottom: 0;
|
1811 |
+
}
|
1812 |
+
|
1813 |
+
.testimonials ul li .testimonila-box .quote {
|
1814 |
+
font-weight: 900;
|
1815 |
+
font-size: 30px;
|
1816 |
+
opacity: rgba(255, 255, 255, 0.5);
|
1817 |
+
margin-bottom: 0;
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
.carousel-indicators {
|
1821 |
+
bottom: -30px;
|
1822 |
+
}
|
1823 |
+
|
1824 |
+
.carousel-indicators li {
|
1825 |
+
width: 7px;
|
1826 |
+
height: 7px;
|
1827 |
+
border: 1px solid #FFFFFF;
|
1828 |
+
background-color: transparent;
|
1829 |
+
border-radius: 50%;
|
1830 |
+
opacity: 1;
|
1831 |
+
}
|
1832 |
+
|
1833 |
+
.carousel-indicators li.active {
|
1834 |
+
background-color: #FFFFFF;
|
1835 |
+
border-color: #FFFFFF;
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
.carousel-control-prev, .carousel-control-next {
|
1839 |
+
opacity: 1;
|
1840 |
+
width: auto;
|
1841 |
+
bottom: auto;
|
1842 |
+
top: 50%;
|
1843 |
+
-webkit-transform: translateY(-50%);
|
1844 |
+
transform: translateY(-50%);
|
1845 |
+
left: -15px;
|
1846 |
+
}
|
1847 |
+
|
1848 |
+
.carousel-control-prev .carousel-control-prev-icon, .carousel-control-next .carousel-control-prev-icon {
|
1849 |
+
background-image: none;
|
1850 |
+
}
|
1851 |
+
|
1852 |
+
.carousel-control-prev .carousel-control-prev-icon img, .carousel-control-next .carousel-control-prev-icon img {
|
1853 |
+
-webkit-transform: rotate(90deg);
|
1854 |
+
transform: rotate(90deg);
|
1855 |
+
width: 15px;
|
1856 |
+
}
|
1857 |
+
|
1858 |
+
.carousel-control-next {
|
1859 |
+
left: auto;
|
1860 |
+
right: -15px;
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
.carousel-control-next .carousel-control-next-icon {
|
1864 |
+
background-image: none;
|
1865 |
+
}
|
1866 |
+
|
1867 |
+
.carousel-control-next .carousel-control-next-icon img {
|
1868 |
+
-webkit-transform: rotate(-90deg);
|
1869 |
+
transform: rotate(-90deg);
|
1870 |
+
width: 15px;
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
.rating {
|
1874 |
+
padding: 30px 0 0 0;
|
1875 |
+
text-align: center;
|
1876 |
+
}
|
1877 |
+
|
1878 |
+
.rating .rating-text {
|
1879 |
+
font-size: 18px;
|
1880 |
+
font-weight: 700;
|
1881 |
+
margin-left: 24px;
|
1882 |
+
}
|
1883 |
+
|
1884 |
+
.upgrade-section {
|
1885 |
+
margin-bottom: 30px;
|
1886 |
+
}
|
1887 |
+
|
1888 |
+
.upgrade-section .upgrade-info {
|
1889 |
+
background-color: #F2F2F2;
|
1890 |
+
padding: 10px 15px;
|
1891 |
+
border-radius: 15px;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
.upgrade-section .upgrade-info span {
|
1895 |
+
font-size: 16px;
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
.upgrade-section .upgrade-info .btn-outline-primary {
|
1899 |
+
background-color: #FFFFFF;
|
1900 |
+
}
|
1901 |
+
|
1902 |
+
.upgrade-section .package-details {
|
1903 |
+
margin-top: 30px;
|
1904 |
+
}
|
1905 |
+
|
1906 |
+
.upgrade-section .package-details .package-card {
|
1907 |
+
border: 0;
|
1908 |
+
border-radius: 15px;
|
1909 |
+
-ms-box-shadow: 0 3px 10px #00000029;
|
1910 |
+
-webkit-box-shadow: 0 3px 10px #00000029;
|
1911 |
+
box-shadow: 0 3px 10px #00000029;
|
1912 |
+
}
|
1913 |
+
|
1914 |
+
.upgrade-section .package-details .package-card .card-header {
|
1915 |
+
border-radius: calc(15px - 1px) calc(15px - 1px) 0 0;
|
1916 |
+
border-bottom: 0;
|
1917 |
+
background: transparent -webkit-gradient(linear, right top, left top, from(#03D7FD), to(#0872FC)) 0% 0% no-repeat padding-box;
|
1918 |
+
background: transparent linear-gradient(270deg, #03D7FD 0%, #0872FC 100%) 0% 0% no-repeat padding-box;
|
1919 |
+
padding: 25px;
|
1920 |
+
}
|
1921 |
+
|
1922 |
+
.upgrade-section .package-details .package-card .card-header .package-name {
|
1923 |
+
color: #FFFFFF;
|
1924 |
+
font-weight: 900;
|
1925 |
+
font-size: 18px;
|
1926 |
+
margin-bottom: 0;
|
1927 |
+
}
|
1928 |
+
|
1929 |
+
.upgrade-section .package-details .package-card .card-body {
|
1930 |
+
padding: 25px 25px 0 25px;
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
.upgrade-section .package-details .package-card .card-body .service-provide li {
|
1934 |
+
color: #7F7F7F;
|
1935 |
+
border-bottom: 1px solid #EDEDED;
|
1936 |
+
padding-bottom: 10px;
|
1937 |
+
padding-top: 10px;
|
1938 |
+
}
|
1939 |
+
|
1940 |
+
.upgrade-section .package-details .package-card .card-body .service-provide li:first-child {
|
1941 |
+
padding-top: 0;
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
.upgrade-section .package-details .package-card .card-body .service-provide li:last-child {
|
1945 |
+
border-bottom: 0;
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
.upgrade-section .package-details .package-card .card-body .service-provide li img {
|
1949 |
+
max-width: 15px;
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
.upgrade-section .package-details .package-card .card-footer {
|
1953 |
+
border-radius: 0 0 calc(15px - 1px) calc(15px - 1px);
|
1954 |
+
border-bottom: 0;
|
1955 |
+
background-color: transparent;
|
1956 |
+
border-top: 0;
|
1957 |
+
text-align: center;
|
1958 |
+
padding: 25px;
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
.back-btn {
|
1962 |
+
padding: 0;
|
1963 |
+
color: #25283D;
|
1964 |
+
position: relative;
|
1965 |
+
left: 0;
|
1966 |
+
font-size: 12px;
|
1967 |
+
}
|
1968 |
+
|
1969 |
+
.back-btn span {
|
1970 |
+
vertical-align: middle;
|
1971 |
+
padding-left: 3px;
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
.edit-section .edit-tabs {
|
1975 |
+
border: 0.5px solid #A9A9A9;
|
1976 |
+
border-radius: 15px;
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
.edit-section .edit-tabs .nav-item {
|
1980 |
+
margin-bottom: 0;
|
1981 |
+
}
|
1982 |
+
|
1983 |
+
.edit-section .edit-tabs .nav-item:last-child .nav-link {
|
1984 |
+
border-right: 0;
|
1985 |
+
border-radius: 0 calc(15px - 1px) calc(15px - 1px) 0;
|
1986 |
+
margin-right: -1px;
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
.edit-section .edit-tabs .nav-item:first-child .nav-link {
|
1990 |
+
border-radius: calc(15px - 1px) 0 0 calc(15px - 1px);
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
.edit-section .edit-tabs .nav-link {
|
1994 |
+
border: 0;
|
1995 |
+
border-right: 0.5px solid #A9A9A9;
|
1996 |
+
border-radius: 0;
|
1997 |
+
color: #5E5E5E;
|
1998 |
+
font-size: 16px;
|
1999 |
+
font-weight: 700;
|
2000 |
+
padding: 12px 8px;
|
2001 |
+
}
|
2002 |
+
.edit-section .edit-tabs .nav-link a{
|
2003 |
+
color: #5E5E5E;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
.edit-section .edit-tabs .nav-link.active {
|
2007 |
+
background-color: #000338 !important;
|
2008 |
+
color: #FFFFFF !important;
|
2009 |
+
}
|
2010 |
+
.edit-section .edit-tabs .nav-link.active a{
|
2011 |
+
background-color: #000338 !important;
|
2012 |
+
color: #FFFFFF !important;
|
2013 |
+
}
|
2014 |
+
|
2015 |
+
.product-title {
|
2016 |
+
font-size: 16px;
|
2017 |
+
font-weight: 700;
|
2018 |
+
color: #5E5E5E;
|
2019 |
+
margin-bottom: 15px;
|
2020 |
+
}
|
2021 |
+
|
2022 |
+
.total-products {
|
2023 |
+
margin-top: 30px;
|
2024 |
+
}
|
2025 |
+
|
2026 |
+
.total-products .table-section {
|
2027 |
+
background-color: #F2F2F2;
|
2028 |
+
border-radius: 15px;
|
2029 |
+
padding: 0 15px;
|
2030 |
+
border: 0;
|
2031 |
+
-ms-box-shadow: none;
|
2032 |
+
-webkit-box-shadow: none;
|
2033 |
+
box-shadow: none;
|
2034 |
+
}
|
2035 |
+
|
2036 |
+
.total-products .table-section .table th, .total-products .table-section .table td {
|
2037 |
+
color: #5E5E5E;
|
2038 |
+
}
|
2039 |
+
|
2040 |
+
.total-products .table-section .table tr th {
|
2041 |
+
padding: 10px 10px;
|
2042 |
+
}
|
2043 |
+
|
2044 |
+
.total-products .table-section .table tbody tr td {
|
2045 |
+
padding: 25px 10px;
|
2046 |
+
background-color: #FFFFFF;
|
2047 |
+
vertical-align: middle;
|
2048 |
+
position: relative;
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
.total-products .table-section .table tbody tr td:after {
|
2052 |
+
content: '';
|
2053 |
+
border-right: 1px solid #A9A9A9;
|
2054 |
+
display: block;
|
2055 |
+
position: absolute;
|
2056 |
+
top: 10px;
|
2057 |
+
bottom: 20px;
|
2058 |
+
right: 0;
|
2059 |
+
}
|
2060 |
+
.total-products .table-section .table tbody tr td:before{
|
2061 |
+
content: '';
|
2062 |
+
border-bottom: 10px solid #f2f2f2;
|
2063 |
+
position: absolute;
|
2064 |
+
display: block;
|
2065 |
+
width: 100%;
|
2066 |
+
top: 10px;
|
2067 |
+
bottom: 0px;
|
2068 |
+
right: 0;
|
2069 |
+
}
|
2070 |
+
|
2071 |
+
.total-products .table-section .table tbody tr td:first-child {
|
2072 |
+
border-radius: 15px 0 0 15px;
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
.total-products .table-section .table tbody tr td:first-child:after {
|
2076 |
+
border-right: 0;
|
2077 |
+
}
|
2078 |
+
|
2079 |
+
.total-products .table-section .table tbody tr td:last-child {
|
2080 |
+
border-radius: 0 15px 15px 0;
|
2081 |
+
}
|
2082 |
+
|
2083 |
+
.total-products .table-section .table tbody tr td:last-child:after {
|
2084 |
+
border-right: 0;
|
2085 |
+
}
|
2086 |
+
|
2087 |
+
.total-products .table-section .table tbody tr td.product-image {
|
2088 |
+
width: 80px;
|
2089 |
+
}
|
2090 |
+
|
2091 |
+
.smart-shopping-section .sec-title {
|
2092 |
+
font-size: 16px;
|
2093 |
+
font-weight: 700;
|
2094 |
+
}
|
2095 |
+
|
2096 |
+
.smart-shopping-section .create-campaign-btn .btn {
|
2097 |
+
width: 190px;
|
2098 |
+
}
|
2099 |
+
|
2100 |
+
.account-performance {
|
2101 |
+
margin-top: 15px;
|
2102 |
+
}
|
2103 |
+
|
2104 |
+
.pro-account {
|
2105 |
+
max-width: 250px;
|
2106 |
+
position: relative;
|
2107 |
+
margin-top: 65px;
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
.pro-account .card {
|
2111 |
+
border: 0;
|
2112 |
+
border-radius: 10px;
|
2113 |
+
-ms-box-shadow: 0 3px 6px #272D3B33;
|
2114 |
+
-webkit-box-shadow: 0 3px 6px #272D3B33;
|
2115 |
+
box-shadow: 0 3px 6px #272D3B33;
|
2116 |
+
}
|
2117 |
+
|
2118 |
+
.pro-account .card .card-footer {
|
2119 |
+
background-color: transparent;
|
2120 |
+
border-top: 0;
|
2121 |
+
text-align: center;
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
.pro-account .card .card-body .account-img {
|
2125 |
+
margin-bottom: 15px;
|
2126 |
+
position: absolute;
|
2127 |
+
top: -60px;
|
2128 |
+
}
|
2129 |
+
|
2130 |
+
.pro-account .card .card-body .account-img img {
|
2131 |
+
max-width: 100%;
|
2132 |
+
}
|
2133 |
+
|
2134 |
+
.pro-account .card .card-body .pro-content {
|
2135 |
+
margin-top: 90px;
|
2136 |
+
}
|
2137 |
+
|
2138 |
+
.pro-account .card .card-body .pro-content p {
|
2139 |
+
margin-bottom: 0;
|
2140 |
+
}
|
2141 |
+
|
2142 |
+
.pro-account .card .card-body .userName {
|
2143 |
+
font-weight: 900;
|
2144 |
+
font-size: 14px;
|
2145 |
+
}
|
2146 |
+
|
2147 |
+
/*.dataTables_info {
|
2148 |
+
display: none;
|
2149 |
+
}*/
|
2150 |
+
|
2151 |
+
.informanal-section {
|
2152 |
+
margin-left: 3px;
|
2153 |
+
}
|
2154 |
+
|
2155 |
+
.informanal-section img {
|
2156 |
+
width: 12px;
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
.mt--top {
|
2160 |
+
margin-top: -60px;
|
2161 |
+
}
|
2162 |
+
|
2163 |
+
.bottom-section {
|
2164 |
+
position: fixed;
|
2165 |
+
right: 70px;
|
2166 |
+
bottom: 30px;
|
2167 |
+
}
|
2168 |
+
|
2169 |
+
.bottom-section .dropdown .btn {
|
2170 |
+
width: 50px;
|
2171 |
+
height: 50px;
|
2172 |
+
padding: 10px;
|
2173 |
+
background-color: #000338;
|
2174 |
+
position: relative;
|
2175 |
+
z-index: 1001;
|
2176 |
+
}
|
2177 |
+
|
2178 |
+
.bottom-section .dropdown .btn img {
|
2179 |
+
max-width: 100%;
|
2180 |
+
max-height: 100%;
|
2181 |
+
}
|
2182 |
+
|
2183 |
+
.bottom-section .dropdown .dropdown-menu {
|
2184 |
+
background-color: transparent;
|
2185 |
+
border: 0;
|
2186 |
+
min-width: auto;
|
2187 |
+
display: block !important;
|
2188 |
+
-webkit-transform: none !important;
|
2189 |
+
transform: none !important;
|
2190 |
+
top: auto !important;
|
2191 |
+
bottom: 100%;
|
2192 |
+
padding: 0;
|
2193 |
+
margin: 0;
|
2194 |
+
right: 0;
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
.bottom-section .dropdown .dropdown-menu li {
|
2198 |
+
padding: 0;
|
2199 |
+
position: relative;
|
2200 |
+
margin: 10px 0;
|
2201 |
+
}
|
2202 |
+
|
2203 |
+
.bottom-section .dropdown .dropdown-menu li .item-text {
|
2204 |
+
padding-left: 45px;
|
2205 |
+
padding-top: 10px;
|
2206 |
+
display: block;
|
2207 |
+
color: #000338;
|
2208 |
+
display: none;
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
.bottom-section .dropdown .dropdown-menu li:after {
|
2212 |
+
content: '';
|
2213 |
+
height: 100%;
|
2214 |
+
width: 1px;
|
2215 |
+
border-left: 1px dashed #000338;
|
2216 |
+
position: absolute;
|
2217 |
+
top: 100%;
|
2218 |
+
bottom: 0;
|
2219 |
+
left: 50%;
|
2220 |
+
-webkit-transform: translateX(-50%);
|
2221 |
+
transform: translateX(-50%);
|
2222 |
+
}
|
2223 |
+
|
2224 |
+
.bottom-section .dropdown .dropdown-menu li .dropdown-item {
|
2225 |
+
width: calc(50px - 10px);
|
2226 |
+
height: calc(50px - 10px);
|
2227 |
+
padding: 0;
|
2228 |
+
background-color: #FFFFFF;
|
2229 |
+
border-radius: 50%;
|
2230 |
+
position: relative;
|
2231 |
+
z-index: 1;
|
2232 |
+
margin: 0 auto;
|
2233 |
+
}
|
2234 |
+
|
2235 |
+
.bottom-section .dropdown .dropdown-menu li .dropdown-item img {
|
2236 |
+
max-width: 50%;
|
2237 |
+
position: absolute;
|
2238 |
+
top: 50%;
|
2239 |
+
left: 50%;
|
2240 |
+
-webkit-transform: translate(-50%, -50%);
|
2241 |
+
transform: translate(-50%, -50%);
|
2242 |
+
}
|
2243 |
+
|
2244 |
+
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover {
|
2245 |
+
background-color: #03D7FD;
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover img {
|
2249 |
+
-webkit-filter: grayscale(100%) brightness(30%) sepia(100%) hue-rotate(-180deg) saturate(700%) contrast(0.8);
|
2250 |
+
filter: grayscale(100%) brightness(30%) sepia(100%) hue-rotate(-180deg) saturate(700%) contrast(0.8);
|
2251 |
+
}
|
2252 |
+
|
2253 |
+
.bottom-section .dropdown .dropdown-menu li .dropdown-item:hover .item-text {
|
2254 |
+
display: block;
|
2255 |
+
}
|
2256 |
+
|
2257 |
+
.tapme .tooltip-inner {
|
2258 |
+
background-color: #03D7FD;
|
2259 |
+
color: #000338;
|
2260 |
+
border-radius: 500px;
|
2261 |
+
-ms-box-shadow: 0 3px 6px #00000029;
|
2262 |
+
-webkit-box-shadow: 0 3px 6px #00000029;
|
2263 |
+
box-shadow: 0 3px 6px #00000029;
|
2264 |
+
font-weight: 700;
|
2265 |
+
}
|
2266 |
+
|
2267 |
+
.wizard-section {
|
2268 |
+
padding: 20px 0;
|
2269 |
+
}
|
2270 |
+
|
2271 |
+
.wizard-section .wizard-content .wizard {
|
2272 |
+
overflow: initial;
|
2273 |
+
position: relative;
|
2274 |
+
}
|
2275 |
+
|
2276 |
+
.wizard-section .wizard-content .wizard .steps {
|
2277 |
+
margin-bottom: 15px;
|
2278 |
+
border-radius: 15px;
|
2279 |
+
background: #fff;
|
2280 |
+
-ms-box-shadow: 0 0 10px #00000029;
|
2281 |
+
-webkit-box-shadow: 0 0 10px #00000029;
|
2282 |
+
box-shadow: 0 0 10px #00000029;
|
2283 |
+
}
|
2284 |
+
|
2285 |
+
.wizard-section .wizard-content .wizard .steps ul li {
|
2286 |
+
text-align: left;
|
2287 |
+
padding: 15px 30px;
|
2288 |
+
border-right: 1px solid #EDEDED;
|
2289 |
+
}
|
2290 |
+
|
2291 |
+
.wizard-section .wizard-content .wizard .steps ul li:first-child {
|
2292 |
+
border-radius: 15px 0 0 15px;
|
2293 |
+
}
|
2294 |
+
|
2295 |
+
.wizard-section .wizard-content .wizard .steps ul li:last-child {
|
2296 |
+
border-right: 0;
|
2297 |
+
border-radius: 0 15px 15px 0;
|
2298 |
+
}
|
2299 |
+
|
2300 |
+
.wizard-section .wizard-content .wizard .steps ul li.current {
|
2301 |
+
background-color: #2D62ED;
|
2302 |
+
}
|
2303 |
+
|
2304 |
+
.wizard-section .wizard-content .wizard .steps ul li.current .step, .wizard-section .wizard-content .wizard .steps ul li.current .wiz-title {
|
2305 |
+
font-weight: 400;
|
2306 |
+
color: #FFFFFF;
|
2307 |
+
}
|
2308 |
+
|
2309 |
+
.wizard-section .wizard-content .wizard .steps ul li.current .step {
|
2310 |
+
background-color: transparent;
|
2311 |
+
}
|
2312 |
+
|
2313 |
+
.wizard-section .wizard-content .wizard .steps ul li.done a {
|
2314 |
+
padding-left: 25px;
|
2315 |
+
}
|
2316 |
+
|
2317 |
+
.wizard-section .wizard-content .wizard .steps ul li.done a:before {
|
2318 |
+
content: '' !important;
|
2319 |
+
width: 24px;
|
2320 |
+
height: 24px;
|
2321 |
+
position: absolute;
|
2322 |
+
background: url(../images/icon/tick-round.svg) no-repeat left top;
|
2323 |
+
background-size: 24px auto;
|
2324 |
+
top: 8px;
|
2325 |
+
left: -15px;
|
2326 |
+
}
|
2327 |
+
|
2328 |
+
.wizard-section .wizard-content .wizard .steps ul li.done .step {
|
2329 |
+
background-color: transparent;
|
2330 |
+
border-color: transparent;
|
2331 |
+
color: #9D9D9D;
|
2332 |
+
font-weight: 400;
|
2333 |
+
}
|
2334 |
+
|
2335 |
+
.wizard-section .wizard-content .wizard .steps ul li.done .wiz-title {
|
2336 |
+
color: #9D9D9D;
|
2337 |
+
font-weight: 400;
|
2338 |
+
}
|
2339 |
+
|
2340 |
+
.wizard-section .wizard-content .wizard .steps ul li a {
|
2341 |
+
padding: 0;
|
2342 |
+
margin: 0;
|
2343 |
+
-webkit-transition: none;
|
2344 |
+
transition: none;
|
2345 |
+
}
|
2346 |
+
|
2347 |
+
.wizard-section .wizard-content .wizard .steps ul li .step {
|
2348 |
+
width: auto;
|
2349 |
+
height: auto;
|
2350 |
+
border: 0;
|
2351 |
+
font-size: 14px;
|
2352 |
+
color: #9D9D9D;
|
2353 |
+
line-height: normal;
|
2354 |
+
border-radius: 0;
|
2355 |
+
position: static;
|
2356 |
+
margin: 0;
|
2357 |
+
display: block;
|
2358 |
+
text-align: left;
|
2359 |
+
font-weight: 700;
|
2360 |
+
}
|
2361 |
+
|
2362 |
+
.wizard-section .wizard-content .wizard .steps ul li:before {
|
2363 |
+
content: none !important;
|
2364 |
+
}
|
2365 |
+
|
2366 |
+
.wizard-section .wizard-content .wizard .steps ul li:after {
|
2367 |
+
content: none !important;
|
2368 |
+
}
|
2369 |
+
|
2370 |
+
.wizard-section .wizard-content .wizard .steps ul li .wiz-title {
|
2371 |
+
color: #9D9D9D;
|
2372 |
+
font-weight: 700;
|
2373 |
+
display: block;
|
2374 |
+
margin-top: 5px;
|
2375 |
+
}
|
2376 |
+
|
2377 |
+
.wizard-section .wizard-content .wizard .actions {
|
2378 |
+
margin-top: 0;
|
2379 |
+
text-align: center;
|
2380 |
+
position: absolute;
|
2381 |
+
height: 60px;
|
2382 |
+
bottom: 0;
|
2383 |
+
padding: 0 30px;
|
2384 |
+
}
|
2385 |
+
|
2386 |
+
.wizard-section .wizard-content .wizard .actions ul {
|
2387 |
+
width: 100%;
|
2388 |
+
display: -webkit-box;
|
2389 |
+
display: -ms-flexbox;
|
2390 |
+
display: flex;
|
2391 |
+
-webkit-box-pack: center;
|
2392 |
+
-ms-flex-pack: center;
|
2393 |
+
justify-content: center;
|
2394 |
+
}
|
2395 |
+
|
2396 |
+
.wizard-section .wizard-content .wizard .actions ul li {
|
2397 |
+
margin-left: 0 !important;
|
2398 |
+
margin-right: 25px;
|
2399 |
+
}
|
2400 |
+
|
2401 |
+
.wizard-section .wizard-content .wizard .actions ul li a.next-step, .wizard-section .wizard-content .wizard .actions ul li a.prev-step {
|
2402 |
+
background: #2D62ED;
|
2403 |
+
min-width: 100px;
|
2404 |
+
font-weight: 700;
|
2405 |
+
color: #FFFFFF;
|
2406 |
+
border: 1px solid #2D62ED;
|
2407 |
+
border-radius: 500px;
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
.wizard-section .wizard-content .wizard .actions ul li a.next-step:hover, .wizard-section .wizard-content .wizard .actions ul li a.prev-step:hover {
|
2411 |
+
background-color: #1248d5 !important;
|
2412 |
+
border-color: #1248d5 !important;
|
2413 |
+
color: #FFFFFF;
|
2414 |
+
}
|
2415 |
+
|
2416 |
+
.wizard-section .wizard-content .wizard .actions ul li a.prev-step {
|
2417 |
+
background-color: #F2F2F2;
|
2418 |
+
border-color: #F2F2F2;
|
2419 |
+
color: #25283D;
|
2420 |
+
}
|
2421 |
+
|
2422 |
+
.wizard-section .wizard-content .wizard .actions ul li a.prev-step:hover {
|
2423 |
+
background-color: #d9d9d9 !important;
|
2424 |
+
border-color: #d9d9d9 !important;
|
2425 |
+
color: #25283D;
|
2426 |
+
}
|
2427 |
+
|
2428 |
+
.wizard-section .wizard-content .wizard .actions ul li.disabled {
|
2429 |
+
display: none;
|
2430 |
+
}
|
2431 |
+
|
2432 |
+
.wizard-section .wizard-content .wizard .content {
|
2433 |
+
background-color: #FFFFFF;
|
2434 |
+
border-radius: 15px;
|
2435 |
+
-ms-box-shadow: 0 0 10px #00000029;
|
2436 |
+
-webkit-box-shadow: 0 0 10px #00000029;
|
2437 |
+
box-shadow: 0 0 10px #00000029;
|
2438 |
+
padding: 30px 30px 90px 30px;
|
2439 |
+
}
|
2440 |
+
|
2441 |
+
.creating-account {
|
2442 |
+
margin-bottom: 1rem;
|
2443 |
+
}
|
2444 |
+
|
2445 |
+
.creating-account li {
|
2446 |
+
position: relative;
|
2447 |
+
margin-bottom: 5px;
|
2448 |
+
color: #5E5E5E;
|
2449 |
+
}
|
2450 |
+
|
2451 |
+
.information {
|
2452 |
+
width: 20px;
|
2453 |
+
height: 20px;
|
2454 |
+
line-height: 20px;
|
2455 |
+
background-color: #5CB16D;
|
2456 |
+
border-radius: 50%;
|
2457 |
+
display: inline-block;
|
2458 |
+
color: #FFFFFF;
|
2459 |
+
text-align: center;
|
2460 |
+
font-size: 12px;
|
2461 |
+
position: relative;
|
2462 |
+
z-index: 2;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
.advance-settings {
|
2466 |
+
display: inline-block;
|
2467 |
+
position: relative;
|
2468 |
+
margin-left: 5px;
|
2469 |
+
}
|
2470 |
+
|
2471 |
+
.advance-settings .setting-icon {
|
2472 |
+
width: 20px;
|
2473 |
+
height: 20px;
|
2474 |
+
line-height: 16px;
|
2475 |
+
border: 1px solid #2D62ED;
|
2476 |
+
border-radius: 50%;
|
2477 |
+
display: block;
|
2478 |
+
color: #FFFFFF;
|
2479 |
+
text-align: center;
|
2480 |
+
font-size: 18px;
|
2481 |
+
color: #2D62ED;
|
2482 |
+
font-weight: 700;
|
2483 |
+
}
|
2484 |
+
|
2485 |
+
.advance-settings .dropdown-menu {
|
2486 |
+
background-color: #F7F7F7;
|
2487 |
+
min-width: 27rem;
|
2488 |
+
border-radius: 15px;
|
2489 |
+
border: 0;
|
2490 |
+
padding: 15px;
|
2491 |
+
}
|
2492 |
+
|
2493 |
+
.advance-settings .dropdown-menu .form-group {
|
2494 |
+
margin-bottom: 5px;
|
2495 |
+
}
|
2496 |
+
|
2497 |
+
.configuration-section .card {
|
2498 |
+
padding: 0px !important;
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
.container {
|
2502 |
+
max-width: 100% !important;
|
2503 |
+
margin: 0px !important;
|
2504 |
+
}
|
2505 |
+
|
2506 |
+
.custom-thresold-label{
|
2507 |
+
font-size: 14px;
|
2508 |
+
color: #5E5E5E;
|
2509 |
+
}
|
2510 |
+
|
2511 |
+
.right-content .pagination .page-item .page-link img{
|
2512 |
+
width: 100%;
|
2513 |
+
height: 100%;
|
2514 |
+
}
|
2515 |
+
#feed-spinner {
|
2516 |
+
/* height: 50px; */
|
2517 |
+
left: 0;
|
2518 |
+
margin-left: 0;
|
2519 |
+
margin-top: 0;
|
2520 |
+
overflow: auto;
|
2521 |
+
position: fixed;
|
2522 |
+
text-align: center;
|
2523 |
+
top: 0;
|
2524 |
+
/* width: 50px; */
|
2525 |
+
z-index: 1234;
|
2526 |
+
background: rgba(255,255,255,0.65);
|
2527 |
+
bottom: 0;
|
2528 |
+
right: 0;
|
2529 |
+
}
|
2530 |
+
#feed-spinner img {
|
2531 |
+
position: absolute;
|
2532 |
+
top: 50%;
|
2533 |
+
left: 50%;
|
2534 |
+
transform: translate(-50%,-50%);
|
2535 |
+
}
|
2536 |
+
|
2537 |
+
/* slick slider */
|
2538 |
+
.slick-slider{
|
2539 |
+
position: relative;
|
2540 |
+
display: block;
|
2541 |
+
box-sizing: border-box;
|
2542 |
+
-webkit-user-select: none;
|
2543 |
+
-moz-user-select: none;
|
2544 |
+
-ms-user-select: none;
|
2545 |
+
user-select: none;
|
2546 |
+
|
2547 |
+
-webkit-touch-callout: none;
|
2548 |
+
-khtml-user-select: none;
|
2549 |
+
-ms-touch-action: pan-y;
|
2550 |
+
touch-action: pan-y;
|
2551 |
+
-webkit-tap-highlight-color: transparent;
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
.slick-list{
|
2555 |
+
position: relative;
|
2556 |
+
|
2557 |
+
display: block;
|
2558 |
+
overflow: hidden;
|
2559 |
+
|
2560 |
+
margin: 0;
|
2561 |
+
padding: 0;
|
2562 |
+
}
|
2563 |
+
.slick-list:focus{
|
2564 |
+
outline: none;
|
2565 |
+
}
|
2566 |
+
.slick-list.dragging{
|
2567 |
+
cursor: pointer;
|
2568 |
+
cursor: hand;
|
2569 |
+
}
|
2570 |
+
|
2571 |
+
.slick-slider .slick-track, .slick-slider .slick-list{
|
2572 |
+
-webkit-transform: translate3d(0, 0, 0);
|
2573 |
+
-moz-transform: translate3d(0, 0, 0);
|
2574 |
+
-ms-transform: translate3d(0, 0, 0);
|
2575 |
+
-o-transform: translate3d(0, 0, 0);
|
2576 |
+
transform: translate3d(0, 0, 0);
|
2577 |
+
}
|
2578 |
+
|
2579 |
+
.slick-track{
|
2580 |
+
position: relative;
|
2581 |
+
top: 0;
|
2582 |
+
left: 0;
|
2583 |
+
|
2584 |
+
display: block;
|
2585 |
+
margin-left: auto;
|
2586 |
+
margin-right: auto;
|
2587 |
+
}
|
2588 |
+
.slick-track:before, .slick-track:after{
|
2589 |
+
display: table;
|
2590 |
+
|
2591 |
+
content: '';
|
2592 |
+
}
|
2593 |
+
.slick-track:after{
|
2594 |
+
clear: both;
|
2595 |
+
}
|
2596 |
+
.slick-loading .slick-track{
|
2597 |
+
visibility: hidden;
|
2598 |
+
}
|
2599 |
+
|
2600 |
+
.slick-slide{
|
2601 |
+
display: none;
|
2602 |
+
float: left;
|
2603 |
+
|
2604 |
+
height: 100%;
|
2605 |
+
min-height: 1px;
|
2606 |
+
}
|
2607 |
+
[dir='rtl'] .slick-slide{
|
2608 |
+
float: right;
|
2609 |
+
}
|
2610 |
+
.slick-slide img{
|
2611 |
+
display: block;
|
2612 |
+
}
|
2613 |
+
.slick-slide.slick-loading img{
|
2614 |
+
display: none;
|
2615 |
+
}
|
2616 |
+
.slick-slide.dragging img{
|
2617 |
+
pointer-events: none;
|
2618 |
+
}
|
2619 |
+
.slick-initialized .slick-slide{
|
2620 |
+
display: block;
|
2621 |
+
}
|
2622 |
+
.slick-loading .slick-slide{
|
2623 |
+
visibility: hidden;
|
2624 |
+
}
|
2625 |
+
.slick-vertical .slick-slide{
|
2626 |
+
display: block;
|
2627 |
+
height: auto;
|
2628 |
+
border: 1px solid transparent;
|
2629 |
+
}
|
2630 |
+
.slick-arrow.slick-hidden {
|
2631 |
+
display: none;
|
2632 |
+
}
|
2633 |
+
.tvc-hide{
|
2634 |
+
display: none;
|
2635 |
+
}
|
2636 |
+
.tvc_licence_key_change_wapper{height: 40px;}
|
2637 |
+
.tvc_licence_key_change{cursor: pointer;}
|
2638 |
+
.tvc_licence_key_change_wapper.google-account-analytics .acc-num{text-align: left; min-width: 100%; border: 1.3px solid #b4b9be; display: table;
|
2639 |
+
height: 100%;
|
2640 |
+
vertical-align: middle;
|
2641 |
+
background: #f4f4f4; border-radius: 20px; padding: 5px 15px;}
|
2642 |
+
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key_change{display: table-cell; vertical-align: middle;}
|
2643 |
+
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key{display: table-cell; letter-spacing: 8px;
|
2644 |
+
font-size: 15px; width: calc(100% - 110px); vertical-align: middle; font-weight: 400;}
|
2645 |
+
.tvc_licence_key_change_wapper.google-account-analytics .acc-num .tvc_licence_key_title{vertical-align: middle; display: table-cell;}
|
2646 |
+
|
2647 |
+
/*price Table*/
|
2648 |
+
.tvc-price-table-features{
|
2649 |
+
width: 100%;
|
2650 |
+
padding-top: 60px;
|
2651 |
+
}
|
2652 |
+
.tvc-price-table-features .container {
|
2653 |
+
width: 1300px;
|
2654 |
+
min-width: 1000px;
|
2655 |
+
margin: 0 auto;
|
2656 |
+
padding-left: 20px;
|
2657 |
+
padding-right: 20px;
|
2658 |
+
position: relative;
|
2659 |
+
}
|
2660 |
+
.tvc-price-table-features .column {
|
2661 |
+
float: left;
|
2662 |
+
border-right: 1px solid #ebebeb;
|
2663 |
+
position: relative;
|
2664 |
+
text-align: center;
|
2665 |
+
}
|
2666 |
+
.tvc-price-table-features .row-heading .column {
|
2667 |
+
border-top: 1px solid #ebebeb;
|
2668 |
+
}
|
2669 |
+
.tvc-price-table-features.columns-5 .column {
|
2670 |
+
width: 20%;
|
2671 |
+
}
|
2672 |
+
.tvc-price-table-features .column:nth-child(2) {
|
2673 |
+
border-left: 1px solid #ebebeb;
|
2674 |
+
}
|
2675 |
+
|
2676 |
+
.tvc-price-table-features .row-heading .column:first-of-type {
|
2677 |
+
border-top: none;
|
2678 |
+
}
|
2679 |
+
|
2680 |
+
.tvc-price-table-features .row-heading .column:first-child{
|
2681 |
+
border-right: 1px solid transparent;
|
2682 |
+
}
|
2683 |
+
.tvc-price-table-features .row-feature .column:first-child, .tvc-price-table-features .row-footer .column:first-child{
|
2684 |
+
border-right: 1px solid transparent;
|
2685 |
+
text-align: left;
|
2686 |
+
}
|
2687 |
+
.tvc-price-table-features .row-heading {
|
2688 |
+
display: -webkit-box;
|
2689 |
+
display: -ms-flexbox;
|
2690 |
+
display: flex;
|
2691 |
+
-webkit-box-align: stretch;
|
2692 |
+
-ms-flex-align: stretch;
|
2693 |
+
align-items: stretch;
|
2694 |
+
border-top: 1px solid transparent;
|
2695 |
+
border-left: 1px solid transparent;
|
2696 |
+
border-width: 1px 0 1px 1px;
|
2697 |
+
border-style: solid;
|
2698 |
+
border-color: #ebebeb;
|
2699 |
+
border-bottom: 0;
|
2700 |
+
}
|
2701 |
+
|
2702 |
+
.tvc-price-table-features .row-feature .column{
|
2703 |
+
padding: 12px 20px 12px 20px;
|
2704 |
+
|
2705 |
+
}
|
2706 |
+
/*.tvc-price-table-features .row.feature .column:first-of-type{
|
2707 |
+
text-align: left;
|
2708 |
+
padding-right: 5px;
|
2709 |
+
padding-left: 15px;
|
2710 |
+
}*/
|
2711 |
+
.tvc-price-table-features .row-feature .column:first-child{
|
2712 |
+
border-right: 1px solid transparent;.tvc-price-table-features .row-feature .column:first-child, .tvc-price-table-features .row-footer .column:first-child
|
2713 |
+
}
|
2714 |
+
.tvc-price-table-features .row-feature{
|
2715 |
+
font-size: 14px;
|
2716 |
+
border-width: 1px 0 1px 1px;
|
2717 |
+
border-style: solid;
|
2718 |
+
border-color: #ebebeb;
|
2719 |
+
border-bottom: 0;
|
2720 |
+
display: -webkit-box;
|
2721 |
+
display: -ms-flexbox;
|
2722 |
+
display: flex;
|
2723 |
+
-webkit-box-align: stretch;
|
2724 |
+
-ms-flex-align: stretch;
|
2725 |
+
align-items: stretch;
|
2726 |
+
}
|
2727 |
+
|
2728 |
+
.tvc-price-table-features .column .name-wrap {
|
2729 |
+
background: #f9f9f9;
|
2730 |
+
padding: 12px;
|
2731 |
+
margin: 0 0 16px 0;
|
2732 |
+
}
|
2733 |
+
.tvc-price-table-features .column .name {
|
2734 |
+
font-size: 23px;
|
2735 |
+
font-weight: 600;
|
2736 |
+
color: #060221;
|
2737 |
+
line-height: 44px;
|
2738 |
+
letter-spacing: 0px;
|
2739 |
+
}
|
2740 |
+
.tvc-price-table-features .column .price-normal {
|
2741 |
+
text-align: center;
|
2742 |
+
font-weight: 300;
|
2743 |
+
font-size: 15px;
|
2744 |
+
line-height: 1;
|
2745 |
+
margin: 0 0 10px 0;
|
2746 |
+
}
|
2747 |
+
.tvc-price-table-features .column .price-normal span {
|
2748 |
+
position: relative;
|
2749 |
+
font-size: 17px;
|
2750 |
+
}
|
2751 |
+
.tvc-price-table-features .column .price-normal span:after {
|
2752 |
+
content: ' ';
|
2753 |
+
width: 100%;
|
2754 |
+
height: 1px;
|
2755 |
+
border-bottom: 1px solid red;
|
2756 |
+
position: absolute;
|
2757 |
+
top: 55%;
|
2758 |
+
left: 0;
|
2759 |
+
}
|
2760 |
+
.clearfix:after {
|
2761 |
+
clear: both;
|
2762 |
+
content: " ";
|
2763 |
+
display: table;
|
2764 |
+
}
|
2765 |
+
|
2766 |
+
|
2767 |
+
.tvc-price-table-features .row-subheading{
|
2768 |
+
border-width: 1px 0 1px 1px;
|
2769 |
+
border-style: solid;
|
2770 |
+
border-color: #ebebeb;
|
2771 |
+
border-bottom: 0;}
|
2772 |
+
.tvc-price-table-features .row-subheading {
|
2773 |
+
font-weight: 700;
|
2774 |
+
font-size: 16px;
|
2775 |
+
padding: 10px 15px;
|
2776 |
+
background: #ebebeb;
|
2777 |
+
text-align: center;
|
2778 |
+
}
|
2779 |
+
.tvc-price-table-features .row-footer {
|
2780 |
+
display: flex;
|
2781 |
+
}
|
2782 |
+
.tvc-price-table-features .row-footer {
|
2783 |
+
border-width: 1px 0 1px 1px;
|
2784 |
+
border-style: solid;
|
2785 |
+
border-color: #ebebeb;
|
2786 |
+
}
|
2787 |
+
.tvc-price-table-features .row-footer .column {
|
2788 |
+
padding: 20px 20px 18px 20px;
|
2789 |
+
}
|
2790 |
+
.tvc-guarantee .guarantee {
|
2791 |
+
border: 1px solid #ebebeb;
|
2792 |
+
background-color: #0137FC;
|
2793 |
+
color: #fff;
|
2794 |
+
padding: 30px;
|
2795 |
+
margin: 40px 0 0 0;
|
2796 |
+
|
2797 |
+
}
|
2798 |
+
.tvc-guarantee .guarantee .title{ font-size: 18px;
|
2799 |
+
font-weight: 600;}
|
2800 |
+
.tvc-guarantee .guarantee .title span{font-size: 23px;
|
2801 |
+
font-style: italic;
|
2802 |
+
margin-right: 20px;
|
2803 |
+
font-weight: bold;
|
2804 |
+
}
|
2805 |
+
.tvc-price-table-features .tvc-list-price{
|
2806 |
+
border-bottom: 1px solid #ebebeb;
|
2807 |
+
padding: 0px 0 10px 0;
|
2808 |
+
}
|
2809 |
+
|
2810 |
+
.tvc-price-table-features .tvc-list-price .price-current{
|
2811 |
+
font-size: 30px;
|
2812 |
+
font-weight: 700;
|
2813 |
+
color: #0137FC;
|
2814 |
+
}
|
2815 |
+
.tvc-price-table-features .tvc-list-price .price-current .inner span{
|
2816 |
+
font-size: 12px;
|
2817 |
+
}
|
2818 |
+
.tvc-btn{background-color: #0137FC !important;
|
2819 |
+
border-style: solid;
|
2820 |
+
border-radius: 26px 26px 26px 26px !important;
|
2821 |
+
color: #fff !important;
|
2822 |
+
display: inline-block;
|
2823 |
+
line-height: 1;
|
2824 |
+
font-size: 15px;
|
2825 |
+
padding: 12px 24px;
|
2826 |
+
fill: #fff;
|
2827 |
+
text-align: center;
|
2828 |
+
-webkit-transition: all .3s;
|
2829 |
+
-o-transition: all .3s;
|
2830 |
+
transition: all .3s;
|
2831 |
+
text-decoration:none;
|
2832 |
+
margin: 10px 0;
|
2833 |
+
}
|
2834 |
+
.tvc-blank-col span{position: absolute;
|
2835 |
+
bottom: 5px;
|
2836 |
+
font-size: 18px;
|
2837 |
+
text-align: center;
|
2838 |
+
left: 0;
|
2839 |
+
right: 0;
|
2840 |
+
font-weight: 600;}
|
2841 |
+
.tvc-free-plan span{
|
2842 |
+
position: absolute;
|
2843 |
+
bottom: 0px;
|
2844 |
+
font-size: 18px;
|
2845 |
+
text-align: center;
|
2846 |
+
left: 0;
|
2847 |
+
right: 0;
|
2848 |
+
font-weight: 600;
|
2849 |
+
}
|
2850 |
+
.tvc-free-plan .tvc-list-price .price-current span{
|
2851 |
+
position: relative;
|
2852 |
+
font-size: 30px;
|
2853 |
+
font-weight: 700;
|
2854 |
+
color: #0137FC;
|
2855 |
+
margin-top: 43px;
|
2856 |
+
display: block;
|
2857 |
+
}
|
2858 |
+
|
2859 |
+
.tvc_popular{background-color: #EE345E;
|
2860 |
+
color: white;
|
2861 |
+
font-style: normal;
|
2862 |
+
font-weight: bold;
|
2863 |
+
font-size: 12px;
|
2864 |
+
text-align: center;
|
2865 |
+
text-transform: uppercase;
|
2866 |
+
position: absolute;
|
2867 |
+
right: -41px;
|
2868 |
+
top: 2px;
|
2869 |
+
transform: rotate( 45deg );
|
2870 |
+
width: 138px;
|
2871 |
+
letter-spacing: 2px;
|
2872 |
+
clip-path: polygon(22% 0, 77% 0, 101% 100%, 0 95%);
|
2873 |
+
padding-top: 9px;
|
2874 |
+
padding-bottom: 9px;
|
2875 |
+
}
|
2876 |
+
.tvc-price-table-features .column.popular {
|
2877 |
+
background-color: #f1f9ff;
|
2878 |
+
}
|
2879 |
+
.tvc-price-table-features .column img{height: 18px;}
|
2880 |
+
.elementor-column-wrap.active{ background-color: #0137FC;}
|
2881 |
+
.elementor-column-wrap.active h5.elementor-heading-title{
|
2882 |
+
color: #fff !important;
|
2883 |
+
}
|
2884 |
+
.selected-plan-info .tvc_price_cancel{margin: 0 8px 10px 0;}
|
2885 |
+
.paypal_plan_type{float: right;
|
2886 |
+
margin-right: 20px;}
|
2887 |
+
.selected-plan-info .tvc_month_free{
|
2888 |
+
display: inline-block;
|
2889 |
+
width: 110px;
|
2890 |
+
margin-left: 5px;
|
2891 |
+
}
|
2892 |
+
a.elementor-button-link{
|
2893 |
+
text-decoration: none;
|
2894 |
+
}
|
2895 |
+
.tvc-plan-off{
|
2896 |
+
display: inline-block;
|
2897 |
+
margin-left: 5px;
|
2898 |
+
color: #2FBB0E;
|
2899 |
+
font-weight: 600;
|
2900 |
+
}
|
2901 |
+
.tvc_month_free{
|
2902 |
+
text-align: center;
|
2903 |
+
background-color: #2FBB0E;
|
2904 |
+
color: #fff;
|
2905 |
+
width: 119px;
|
2906 |
+
font-size: 14px;
|
2907 |
+
line-height: 21px;
|
2908 |
+
font-weight: 600;
|
2909 |
+
margin: 0 auto;
|
2910 |
+
}
|
2911 |
+
.tvc-plan-price span{font-size: 12px;}
|
2912 |
+
.tvc-price-table-features .tvc_popular{
|
2913 |
+
width: 100%;
|
2914 |
+
top: -35px;
|
2915 |
+
right: 0;
|
2916 |
+
left: 0;
|
2917 |
+
transform: none;
|
2918 |
+
clip-path:none;
|
2919 |
+
}
|
2920 |
+
.paypal-message-box ol{padding-left: 25px;}
|
2921 |
+
.paypal-message-box a {text-decoration: underline;}
|
2922 |
+
.tvc-list-price-month a, .tvc-list-price-year a {
|
2923 |
+
font-weight: bold;
|
2924 |
+
}
|
2925 |
+
|
2926 |
+
/*End price Table*/
|
2927 |
+
.tvc-new-freevspro{
|
2928 |
+
/* background-color: #EE345E;
|
2929 |
+
color: white;
|
2930 |
+
font-style: normal;
|
2931 |
+
font-weight: bold;
|
2932 |
+
font-size: 12px;
|
2933 |
+
height: 40px;
|
2934 |
+
text-align: center;
|
2935 |
+
text-transform: uppercase;
|
2936 |
+
position: absolute;
|
2937 |
+
|
2938 |
+
top: -7px;
|
2939 |
+
left: -25px;
|
2940 |
+
padding-top: 33px;
|
2941 |
+
|
2942 |
+
transform: rotate( 314deg );
|
2943 |
+
width: 63px;
|
2944 |
+
letter-spacing: 2px;
|
2945 |
+
/*clip-path: polygon(50% 0%, 53% 0, 109% 109%, -4% 99%);
|
2946 |
+
clip-path: polygon(50% 0%, 53% 0, 112% 97%, -11% 99%);
|
2947 |
+
padding-top: 19.5px;*/
|
2948 |
+
background-color: #EE345E;
|
2949 |
+
color: white;
|
2950 |
+
font-style: normal;
|
2951 |
+
font-weight: bold;
|
2952 |
+
font-size: 12px;
|
2953 |
+
height: 38px;
|
2954 |
+
text-align: center;
|
2955 |
+
text-transform: uppercase;
|
2956 |
+
position: absolute;
|
2957 |
+
|
2958 |
+
top: -8px;
|
2959 |
+
left: 11px;
|
2960 |
+
left: 119px;
|
2961 |
+
padding-top: 33px;
|
2962 |
+
|
2963 |
+
transform: rotate(
|
2964 |
+
43deg
|
2965 |
+
);
|
2966 |
+
width: 70px;
|
2967 |
+
letter-spacing: 2px;
|
2968 |
+
clip-path: polygon(50% 0%, 53% 0, 109% 109%, -4% 99%);
|
2969 |
+
/* clip-path: polygon(50% 0%, 53% 0, 112% 97%, -11% 99%); */
|
2970 |
+
padding-top: 19.5px;
|
2971 |
+
|
2972 |
+
}
|
2973 |
+
.tvc_plugin_container .nav-link{position: relative;}
|
2974 |
+
.tvc-new-freevspro-nav-item{
|
2975 |
+
width: 169px;
|
2976 |
}
|
admin/css/dataTables.bootstrap5.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
td.dt-control{background:url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;cursor:pointer}tr.dt-hasChild td.dt-control{background:url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}/*! Bootstrap 5 integration for DataTables
|
2 |
-
*
|
3 |
-
* ©2020 SpryMedia Ltd, all rights reserved.
|
4 |
-
* License: MIT datatables.net/license/mit
|
5 |
-
*/table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable>thead>tr>th:active,table.dataTable>thead>tr>td:active{outline:none}table.dataTable>thead>tr>th:not(.sorting_disabled),table.dataTable>thead>tr>td:not(.sorting_disabled){padding-right:30px}table.dataTable>thead .sorting,table.dataTable>thead .sorting_asc,table.dataTable>thead .sorting_desc,table.dataTable>thead .sorting_asc_disabled,table.dataTable>thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{position:absolute;bottom:.5em;display:block;opacity:.3}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:before{right:1em;content:"↑"}table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:after{right:.5em;content:"↓"}table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:after{opacity:1}table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:before,div.dataTables_scrollBody>table>thead .sorting_asc:before,div.dataTables_scrollBody>table>thead .sorting_desc:before,div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody tr:first-child th,div.dataTables_scrollBody>table>tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable thead tr:first-child th,table.table-bordered.dataTable thead tr:first-child td{border-top-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable td:first-child,table.table-bordered.dataTable td:first-child{border-left-width:1px}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-bottom-width:1px}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1){--bs-table-accent-bg: transparent}table.dataTable.table-striped>tbody>tr.odd{--bs-table-accent-bg: var(--bs-table-striped-bg)}
|
1 |
+
td.dt-control{background:url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;cursor:pointer}tr.dt-hasChild td.dt-control{background:url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}/*! Bootstrap 5 integration for DataTables
|
2 |
+
*
|
3 |
+
* ©2020 SpryMedia Ltd, all rights reserved.
|
4 |
+
* License: MIT datatables.net/license/mit
|
5 |
+
*/table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable>thead>tr>th:active,table.dataTable>thead>tr>td:active{outline:none}table.dataTable>thead>tr>th:not(.sorting_disabled),table.dataTable>thead>tr>td:not(.sorting_disabled){padding-right:30px}table.dataTable>thead .sorting,table.dataTable>thead .sorting_asc,table.dataTable>thead .sorting_desc,table.dataTable>thead .sorting_asc_disabled,table.dataTable>thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{position:absolute;bottom:.5em;display:block;opacity:.3}table.dataTable>thead .sorting:before,table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:before,table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:before{right:1em;content:"↑"}table.dataTable>thead .sorting:after,table.dataTable>thead .sorting_asc:after,table.dataTable>thead .sorting_desc:after,table.dataTable>thead .sorting_asc_disabled:after,table.dataTable>thead .sorting_desc_disabled:after{right:.5em;content:"↓"}table.dataTable>thead .sorting_asc:before,table.dataTable>thead .sorting_desc:after{opacity:1}table.dataTable>thead .sorting_asc_disabled:before,table.dataTable>thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:before,div.dataTables_scrollBody>table>thead .sorting_asc:before,div.dataTables_scrollBody>table>thead .sorting_desc:before,div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody tr:first-child th,div.dataTables_scrollBody>table>tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable thead tr:first-child th,table.table-bordered.dataTable thead tr:first-child td{border-top-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable td:first-child,table.table-bordered.dataTable td:first-child{border-left-width:1px}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-bottom-width:1px}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1){--bs-table-accent-bg: transparent}table.dataTable.table-striped>tbody>tr.odd{--bs-table-accent-bg: var(--bs-table-striped-bg)}
|
admin/css/daterangepicker.css
CHANGED
@@ -1,71 +1,71 @@
|
|
1 |
-
.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:6px;
|
2 |
-
box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.12); width:278px;max-width:none;padding:0;margin-top:7px;top:100px;left:20px;z-index:3001;display:none;line-height:1em;}
|
3 |
-
.daterangepicker:before, .daterangepicker:after{position:absolute;display:inline-block;border-bottom-color:rgba(0, 0, 0, 0.2);content:none;}
|
4 |
-
.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc;}
|
5 |
-
.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;}
|
6 |
-
.daterangepicker.opensleft:before{right:40px;}
|
7 |
-
.daterangepicker.opensleft:after{right:41px;}
|
8 |
-
.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto;}
|
9 |
-
.daterangepicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto;}
|
10 |
-
.daterangepicker.opensright:before{left:9px;}
|
11 |
-
.daterangepicker.opensright:after{left:10px;}
|
12 |
-
.daterangepicker.drop-up{margin-top:-7px;}
|
13 |
-
.daterangepicker.drop-up:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc;}
|
14 |
-
.daterangepicker.drop-up:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff;}
|
15 |
-
.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar{float:none;}
|
16 |
-
.daterangepicker.single .drp-selected{display:none;}
|
17 |
-
.daterangepicker.show-calendar .drp-calendar{display:block;}
|
18 |
-
.daterangepicker.show-calendar .drp-buttons{display:block;}
|
19 |
-
.daterangepicker.auto-apply .drp-buttons{display:none;}
|
20 |
-
.daterangepicker .drp-calendar{display:none;max-width:270px;}
|
21 |
-
.daterangepicker .drp-calendar.left{padding-top:8px; padding-bottom:8px;}
|
22 |
-
.daterangepicker .drp-calendar.right{padding-top:8px; padding-bottom: 8px}
|
23 |
-
.daterangepicker .drp-calendar.single .calendar-table{border:none;}
|
24 |
-
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span{color:#fff;display:inline-block;}
|
25 |
-
|
26 |
-
.daterangepicker .calendar-table th, .daterangepicker .calendar-table td{white-space:nowrap;text-align:center;vertical-align:middle;min-width:30px;width:30px;height:30px;line-height:22px;font-size:14px;border-radius:0px; padding: 0;white-space:nowrap;cursor:pointer;}
|
27 |
-
.daterangepicker .calendar-table th{color: #B6B6B6; font-weight: 500;}
|
28 |
-
.daterangepicker .calendar-table{border:1px solid #fff;border-radius:4px;background-color:#fff;}
|
29 |
-
.daterangepicker .calendar-table table{width:100%;margin:0;border-spacing:0;border-collapse:collapse;}
|
30 |
-
.daterangepicker td.available:hover, .daterangepicker th.available:hover{background-color:#F1F6FA;border-color:transparent;color:inherit;}
|
31 |
-
.daterangepicker td.week, .daterangepicker th.week{font-size:80%;color:#ccc;}
|
32 |
-
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date{background-color:#fff;border-color:transparent;color:#B6B6B6;}
|
33 |
-
.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#002BFC;border-radius:0;}
|
34 |
-
.daterangepicker td.start-date{border-radius:6px 0 0 6px;}
|
35 |
-
.daterangepicker td.end-date{border-radius:0 6px 6px 0;}
|
36 |
-
.daterangepicker td.start-date.end-date{border-radius:6px;}
|
37 |
-
.daterangepicker td.active, .daterangepicker td.active:hover{background-color:#002BFC;border-color:transparent;color:#fff;}
|
38 |
-
.daterangepicker th.month{width:auto; color: #1e1e1e; font-weight: 500;}
|
39 |
-
.daterangepicker td.disabled, .daterangepicker option.disabled{color:#B6B6B6;cursor:not-allowed;text-decoration:line-through;}
|
40 |
-
.daterangepicker select.monthselect, .daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default;}
|
41 |
-
.daterangepicker select.monthselect{margin-right:2%;width:56%;}
|
42 |
-
.daterangepicker select.yearselect{width:40%;}
|
43 |
-
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px;}
|
44 |
-
.daterangepicker .calendar-time{text-align:center;margin:4px auto 0 auto;line-height:30px;position:relative;}
|
45 |
-
.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed;}
|
46 |
-
.daterangepicker .drp-buttons{clear:both;padding:15px 0 0;border-top:1px solid #e9e9e9;display:none;line-height:12px;vertical-align:middle;}
|
47 |
-
.daterangepicker .drp-selected{display:inline-block;font-size:12px;padding-right:8px;}
|
48 |
-
.daterangepicker .drp-buttons .btn{margin-left:15px;font-size:12px;font-weight:400;padding:5px 10px; border:none; box-shadow: none;}
|
49 |
-
.daterangepicker.show-ranges.single.rtl .drp-calendar.left{border-right:1px solid #ddd;}
|
50 |
-
.daterangepicker.show-ranges.single.ltr .drp-calendar.left{border-left:1px solid #ddd;}
|
51 |
-
.daterangepicker .ranges{float:none;text-align:left;margin:0;}
|
52 |
-
.daterangepicker.show-calendar .ranges{padding-top:6px;}
|
53 |
-
.daterangepicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%;}
|
54 |
-
.daterangepicker .ranges li{font-size:12px;padding:6px 15px;cursor:pointer; line-height: 20px; color: #1e1e1e;}
|
55 |
-
.daterangepicker .ranges li:hover{background-color:#F1F6FA;}
|
56 |
-
|
57 |
-
@media (min-width:576px){.daterangepicker{width:auto; max-width: 690px;}
|
58 |
-
.daterangepicker .ranges ul{width:100%;}
|
59 |
-
.daterangepicker.single .ranges ul{width:100%;}
|
60 |
-
.daterangepicker.single .drp-calendar.left{clear:none;}
|
61 |
-
.daterangepicker.single .ranges, .daterangepicker.single .drp-calendar{float:left;}
|
62 |
-
.daterangepicker{direction:ltr;text-align:left;}
|
63 |
-
.daterangepicker .drp-calendar.left{clear:left;margin-right:0;}
|
64 |
-
.daterangepicker .drp-calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;}
|
65 |
-
.daterangepicker .drp-calendar.right{margin-left:0;}
|
66 |
-
.daterangepicker .drp-calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0;}
|
67 |
-
|
68 |
-
}
|
69 |
-
@media (min-width:730px){.daterangepicker .ranges{width:auto; max-width: 690px;}
|
70 |
-
.daterangepicker .drp-calendar.left{clear:none !important;}
|
71 |
-
}
|
1 |
+
.daterangepicker{position:absolute;color:inherit;background-color:#fff;border-radius:6px;
|
2 |
+
box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.12); width:278px;max-width:none;padding:0;margin-top:7px;top:100px;left:20px;z-index:3001;display:none;line-height:1em;}
|
3 |
+
.daterangepicker:before, .daterangepicker:after{position:absolute;display:inline-block;border-bottom-color:rgba(0, 0, 0, 0.2);content:none;}
|
4 |
+
.daterangepicker:before{top:-7px;border-right:7px solid transparent;border-left:7px solid transparent;border-bottom:7px solid #ccc;}
|
5 |
+
.daterangepicker:after{top:-6px;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;}
|
6 |
+
.daterangepicker.opensleft:before{right:40px;}
|
7 |
+
.daterangepicker.opensleft:after{right:41px;}
|
8 |
+
.daterangepicker.openscenter:before{left:0;right:0;width:0;margin-left:auto;margin-right:auto;}
|
9 |
+
.daterangepicker.openscenter:after{left:0;right:0;width:0;margin-left:auto;margin-right:auto;}
|
10 |
+
.daterangepicker.opensright:before{left:9px;}
|
11 |
+
.daterangepicker.opensright:after{left:10px;}
|
12 |
+
.daterangepicker.drop-up{margin-top:-7px;}
|
13 |
+
.daterangepicker.drop-up:before{top:initial;bottom:-7px;border-bottom:initial;border-top:7px solid #ccc;}
|
14 |
+
.daterangepicker.drop-up:after{top:initial;bottom:-6px;border-bottom:initial;border-top:6px solid #fff;}
|
15 |
+
.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar{float:none;}
|
16 |
+
.daterangepicker.single .drp-selected{display:none;}
|
17 |
+
.daterangepicker.show-calendar .drp-calendar{display:block;}
|
18 |
+
.daterangepicker.show-calendar .drp-buttons{display:block;}
|
19 |
+
.daterangepicker.auto-apply .drp-buttons{display:none;}
|
20 |
+
.daterangepicker .drp-calendar{display:none;max-width:270px;}
|
21 |
+
.daterangepicker .drp-calendar.left{padding-top:8px; padding-bottom:8px;}
|
22 |
+
.daterangepicker .drp-calendar.right{padding-top:8px; padding-bottom: 8px}
|
23 |
+
.daterangepicker .drp-calendar.single .calendar-table{border:none;}
|
24 |
+
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span{color:#fff;display:inline-block;}
|
25 |
+
|
26 |
+
.daterangepicker .calendar-table th, .daterangepicker .calendar-table td{white-space:nowrap;text-align:center;vertical-align:middle;min-width:30px;width:30px;height:30px;line-height:22px;font-size:14px;border-radius:0px; padding: 0;white-space:nowrap;cursor:pointer;}
|
27 |
+
.daterangepicker .calendar-table th{color: #B6B6B6; font-weight: 500;}
|
28 |
+
.daterangepicker .calendar-table{border:1px solid #fff;border-radius:4px;background-color:#fff;}
|
29 |
+
.daterangepicker .calendar-table table{width:100%;margin:0;border-spacing:0;border-collapse:collapse;}
|
30 |
+
.daterangepicker td.available:hover, .daterangepicker th.available:hover{background-color:#F1F6FA;border-color:transparent;color:inherit;}
|
31 |
+
.daterangepicker td.week, .daterangepicker th.week{font-size:80%;color:#ccc;}
|
32 |
+
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date{background-color:#fff;border-color:transparent;color:#B6B6B6;}
|
33 |
+
.daterangepicker td.in-range{background-color:#ebf4f8;border-color:transparent;color:#002BFC;border-radius:0;}
|
34 |
+
.daterangepicker td.start-date{border-radius:6px 0 0 6px;}
|
35 |
+
.daterangepicker td.end-date{border-radius:0 6px 6px 0;}
|
36 |
+
.daterangepicker td.start-date.end-date{border-radius:6px;}
|
37 |
+
.daterangepicker td.active, .daterangepicker td.active:hover{background-color:#002BFC;border-color:transparent;color:#fff;}
|
38 |
+
.daterangepicker th.month{width:auto; color: #1e1e1e; font-weight: 500;}
|
39 |
+
.daterangepicker td.disabled, .daterangepicker option.disabled{color:#B6B6B6;cursor:not-allowed;text-decoration:line-through;}
|
40 |
+
.daterangepicker select.monthselect, .daterangepicker select.yearselect{font-size:12px;padding:1px;height:auto;margin:0;cursor:default;}
|
41 |
+
.daterangepicker select.monthselect{margin-right:2%;width:56%;}
|
42 |
+
.daterangepicker select.yearselect{width:40%;}
|
43 |
+
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect{width:50px;margin:0 auto;background:#eee;border:1px solid #eee;padding:2px;outline:0;font-size:12px;}
|
44 |
+
.daterangepicker .calendar-time{text-align:center;margin:4px auto 0 auto;line-height:30px;position:relative;}
|
45 |
+
.daterangepicker .calendar-time select.disabled{color:#ccc;cursor:not-allowed;}
|
46 |
+
.daterangepicker .drp-buttons{clear:both;padding:15px 0 0;border-top:1px solid #e9e9e9;display:none;line-height:12px;vertical-align:middle;}
|
47 |
+
.daterangepicker .drp-selected{display:inline-block;font-size:12px;padding-right:8px;}
|
48 |
+
.daterangepicker .drp-buttons .btn{margin-left:15px;font-size:12px;font-weight:400;padding:5px 10px; border:none; box-shadow: none;}
|
49 |
+
.daterangepicker.show-ranges.single.rtl .drp-calendar.left{border-right:1px solid #ddd;}
|
50 |
+
.daterangepicker.show-ranges.single.ltr .drp-calendar.left{border-left:1px solid #ddd;}
|
51 |
+
.daterangepicker .ranges{float:none;text-align:left;margin:0;}
|
52 |
+
.daterangepicker.show-calendar .ranges{padding-top:6px;}
|
53 |
+
.daterangepicker .ranges ul{list-style:none;margin:0 auto;padding:0;width:100%;}
|
54 |
+
.daterangepicker .ranges li{font-size:12px;padding:6px 15px;cursor:pointer; line-height: 20px; color: #1e1e1e;}
|
55 |
+
.daterangepicker .ranges li:hover{background-color:#F1F6FA;}
|
56 |
+
|
57 |
+
@media (min-width:576px){.daterangepicker{width:auto; max-width: 690px;}
|
58 |
+
.daterangepicker .ranges ul{width:100%;}
|
59 |
+
.daterangepicker.single .ranges ul{width:100%;}
|
60 |
+
.daterangepicker.single .drp-calendar.left{clear:none;}
|
61 |
+
.daterangepicker.single .ranges, .daterangepicker.single .drp-calendar{float:left;}
|
62 |
+
.daterangepicker{direction:ltr;text-align:left;}
|
63 |
+
.daterangepicker .drp-calendar.left{clear:left;margin-right:0;}
|
64 |
+
.daterangepicker .drp-calendar.left .calendar-table{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;}
|
65 |
+
.daterangepicker .drp-calendar.right{margin-left:0;}
|
66 |
+
.daterangepicker .drp-calendar.right .calendar-table{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0;}
|
67 |
+
|
68 |
+
}
|
69 |
+
@media (min-width:730px){.daterangepicker .ranges{width:auto; max-width: 690px;}
|
70 |
+
.daterangepicker .drp-calendar.left{clear:none !important;}
|
71 |
+
}
|
admin/css/enhanced-ecommerce-google-analytics-admin.css
CHANGED
@@ -1,713 +1,713 @@
|
|
1 |
-
/**
|
2 |
-
* All of the CSS for your admin-specific functionality should be
|
3 |
-
* included in this file.
|
4 |
-
*/
|
5 |
-
*{
|
6 |
-
box-sizing: border-box;
|
7 |
-
margin:0px;
|
8 |
-
padding:0px;
|
9 |
-
}
|
10 |
-
body{
|
11 |
-
background: #f1f1f1 !important;
|
12 |
-
}
|
13 |
-
.update-nag, .updated, .error, .is-dismissible, .notice { display: none!important; }
|
14 |
-
.tvc-notice-error{display: block!important;}
|
15 |
-
.popover{
|
16 |
-
max-width:500px !important;
|
17 |
-
}
|
18 |
-
.popover-body{
|
19 |
-
text-align: justify;
|
20 |
-
text-justify: inter-word;
|
21 |
-
}
|
22 |
-
input[type=text],input[type=email],input[type=number],textarea{
|
23 |
-
border:1.3px solid #b4b9be;
|
24 |
-
}
|
25 |
-
input[type=checkbox]{
|
26 |
-
border:1.2px solid #b4b9be;
|
27 |
-
background:#fff;
|
28 |
-
-webkit-transition: all 1.5s ease;
|
29 |
-
-moz-transition: all 1.5s ease;
|
30 |
-
-o-transition: all 1.5s ease;
|
31 |
-
-ms-transition: all 1.5s ease;
|
32 |
-
transition: all 1.5s ease;
|
33 |
-
}
|
34 |
-
|
35 |
-
input[type=checkbox]:checked::before {
|
36 |
-
height:16px;
|
37 |
-
width:16px;
|
38 |
-
background:#2D73C5;
|
39 |
-
color:white;
|
40 |
-
font:100 16px/1 dashicons !important;
|
41 |
-
margin:-1px;
|
42 |
-
}
|
43 |
-
h5{
|
44 |
-
margin-top: 5px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.try-btn{
|
48 |
-
width: auto;
|
49 |
-
border: black;
|
50 |
-
text-align: center;
|
51 |
-
padding: 8px 10px 10px 10px;
|
52 |
-
font-size: 18px;
|
53 |
-
background-color: #00a32a;
|
54 |
-
float: right;
|
55 |
-
top: 60px;
|
56 |
-
height: 38px;
|
57 |
-
color: antiquewhite;
|
58 |
-
font-weight: bold;
|
59 |
-
border-radius: 4px;
|
60 |
-
-moz-box-shadow: 3px 3px 5px 6px #ccc;
|
61 |
-
-webkit-box-shadow: 3px 3px 5px 6px #ccc;
|
62 |
-
box-shadow: 0px 0px 7px 7px #ccc;
|
63 |
-
}
|
64 |
-
.top-btn{
|
65 |
-
float: right;
|
66 |
-
}
|
67 |
-
.new-img-blink{
|
68 |
-
width: 40px;
|
69 |
-
height: 25px;
|
70 |
-
}
|
71 |
-
.new-img-blink-side{
|
72 |
-
width: 40px;
|
73 |
-
height: 25px;
|
74 |
-
}
|
75 |
-
.banner-blink{width: 60px;
|
76 |
-
height: 35px;}
|
77 |
-
.rating {
|
78 |
-
unicode-bidi: bidi-override;
|
79 |
-
direction: rtl;
|
80 |
-
}
|
81 |
-
.rating > span {
|
82 |
-
display: inline-block;
|
83 |
-
position: relative;
|
84 |
-
width: 1.1em;
|
85 |
-
color: #2D73C5;
|
86 |
-
}
|
87 |
-
.rating > span:hover:before,
|
88 |
-
.rating > span:hover ~ span:before {
|
89 |
-
content: "\2605";
|
90 |
-
position: absolute;
|
91 |
-
}
|
92 |
-
.oauth-container{
|
93 |
-
display: inline-block;
|
94 |
-
width: 100%;
|
95 |
-
max-width: 100%;
|
96 |
-
padding: 5px;
|
97 |
-
border: 1px solid #bfbfbf;
|
98 |
-
height: 45px;
|
99 |
-
border-radius: 5px;
|
100 |
-
background-color: #fff;
|
101 |
-
}
|
102 |
-
.ee-oauth-container{
|
103 |
-
display: inline-block;
|
104 |
-
width: 200px;
|
105 |
-
max-width: 100%;
|
106 |
-
padding: 5px;
|
107 |
-
border: 1px solid #bfbfbf;
|
108 |
-
height: 40px;
|
109 |
-
border-radius: 30px;
|
110 |
-
background-color: #fff;
|
111 |
-
}
|
112 |
-
.left {
|
113 |
-
float: left;
|
114 |
-
}
|
115 |
-
/* checkbox admin*/
|
116 |
-
|
117 |
-
.tvc_ee_plugin_form .align-middle{margin: 0 auto;}
|
118 |
-
/*.tvc_ee_plugin_form .align-middle label, label.tvc-custom-control-input{margin: 0 auto; font-size: 15px;} */
|
119 |
-
.tvc_ee_plugin_form [type="checkbox"]:not(:checked),
|
120 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked {
|
121 |
-
position: absolute;
|
122 |
-
left: 1px;
|
123 |
-
top: 7px;
|
124 |
-
opacity: 0;
|
125 |
-
}
|
126 |
-
#ee_plugin_form #ga_PrivacyPolicy{
|
127 |
-
left: 1px;
|
128 |
-
top: 7px;
|
129 |
-
opacity: 0;
|
130 |
-
}
|
131 |
-
|
132 |
-
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label,
|
133 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked+label {
|
134 |
-
position: relative;
|
135 |
-
padding-left: 22px;
|
136 |
-
cursor: pointer;
|
137 |
-
color: #5E5E5E;
|
138 |
-
font-size: 14px;
|
139 |
-
}
|
140 |
-
|
141 |
-
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:before,
|
142 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked+label:before {
|
143 |
-
content: '';
|
144 |
-
position: absolute;
|
145 |
-
left: 0;
|
146 |
-
top: 2px;
|
147 |
-
width: 15px;
|
148 |
-
height: 15px;
|
149 |
-
background: #fff;
|
150 |
-
border-radius: 3px;
|
151 |
-
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1);
|
152 |
-
background-color: #eee;
|
153 |
-
outline: none;
|
154 |
-
}
|
155 |
-
|
156 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked+label:before {
|
157 |
-
background-color: #2D73C5;
|
158 |
-
}
|
159 |
-
|
160 |
-
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:after,
|
161 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked+label:after {
|
162 |
-
content: '\2713';
|
163 |
-
position: absolute;
|
164 |
-
top: 4px;
|
165 |
-
left: 2px;
|
166 |
-
font-size: 13px;
|
167 |
-
font-weight: bold;
|
168 |
-
line-height: 0.8;
|
169 |
-
color: #fff;
|
170 |
-
transition: all .2s;
|
171 |
-
}
|
172 |
-
|
173 |
-
|
174 |
-
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:after {
|
175 |
-
opacity: 0;
|
176 |
-
transform: scale(0);
|
177 |
-
}
|
178 |
-
|
179 |
-
.tvc_ee_plugin_form [type="checkbox"]:checked+label:after {
|
180 |
-
opacity: 1;
|
181 |
-
transform: scale(1);
|
182 |
-
}
|
183 |
-
#ee_plugin_form table th{padding: .75em 0; }
|
184 |
-
|
185 |
-
img.config-success, .nav-tabs li img.config-success, img.config-fail ,.nav-tabs li img.config-fail{
|
186 |
-
width: 14px; margin-right: 2px;
|
187 |
-
}
|
188 |
-
.configuration-section img.config-success, .configuration-section img.config-fail {
|
189 |
-
width: 16px;
|
190 |
-
margin-left: 3px;
|
191 |
-
margin-top: 1px;
|
192 |
-
}
|
193 |
-
.tvc-tooltip {
|
194 |
-
position: relative;
|
195 |
-
display: inline-block;
|
196 |
-
width: 100%;
|
197 |
-
/*margin-top: 3px;*/
|
198 |
-
}
|
199 |
-
.tvc-tooltip:hover .tvc-tooltiptext {
|
200 |
-
visibility: visible;
|
201 |
-
opacity: 1;
|
202 |
-
z-index: 999;
|
203 |
-
}
|
204 |
-
.tvc-tooltip .tvc-tooltiptext {
|
205 |
-
font-weight: normal;
|
206 |
-
font-size: 14px;
|
207 |
-
visibility: hidden;
|
208 |
-
position: absolute;
|
209 |
-
min-width: 400px;
|
210 |
-
background-color: #000338;
|
211 |
-
color: #fff;
|
212 |
-
text-align: left;
|
213 |
-
padding: 5px 6px;
|
214 |
-
border-radius: 15px 50px 30px 5px;
|
215 |
-
z-index: 999;
|
216 |
-
transition: opacity .6s;
|
217 |
-
cursor: auto;
|
218 |
-
|
219 |
-
}
|
220 |
-
.tvc-tooltip .tvc-tooltiptext a{
|
221 |
-
color: #fff;
|
222 |
-
opacity: 0.8;
|
223 |
-
}
|
224 |
-
.tvc-tooltip-top {
|
225 |
-
bottom: 115%;
|
226 |
-
left: 50%;
|
227 |
-
margin-left: -60px;
|
228 |
-
}
|
229 |
-
.tvc-tooltip-right{
|
230 |
-
top: -2px;
|
231 |
-
left: 98%;
|
232 |
-
}
|
233 |
-
.configuration-section .tvc-tooltip-right{
|
234 |
-
top: -32px;
|
235 |
-
left: 102%;
|
236 |
-
}
|
237 |
-
.tvc-tooltip.active .tvc-tooltip-right {
|
238 |
-
top: -32px;
|
239 |
-
left: 103%;
|
240 |
-
}
|
241 |
-
.edit-tabs li:last-child .tvc-tooltip-right {
|
242 |
-
top: -32px;
|
243 |
-
left: 100%;
|
244 |
-
}
|
245 |
-
.tvc-tooltip-right::after {
|
246 |
-
content: "";
|
247 |
-
position: absolute;
|
248 |
-
top: 83%;
|
249 |
-
right: 100%;
|
250 |
-
|
251 |
-
margin-top: -5px;
|
252 |
-
border-width: 5px;
|
253 |
-
border-style: solid;
|
254 |
-
border-color: transparent #000338 transparent transparent;
|
255 |
-
}
|
256 |
-
#syncProduct.popup-modal .tvc-tooltip{ position: absolute;
|
257 |
-
display: inline-block;
|
258 |
-
width: auto; top: -5px; margin-left: 2px;
|
259 |
-
}
|
260 |
-
#syncProduct.popup-modal .tvc-tooltip .tvc-tooltip-right{ bottom: 6px;
|
261 |
-
left: 125%; min-width: 285px; top: auto;}
|
262 |
-
|
263 |
-
#ee_plugin_form .align-middle{position: relative;}
|
264 |
-
|
265 |
-
|
266 |
-
/* animate button effect */
|
267 |
-
.tvc_animate_btn_wrap {
|
268 |
-
height: 100%;
|
269 |
-
display: flex;
|
270 |
-
/*align-items: center;
|
271 |
-
justify-content: center;*/
|
272 |
-
}
|
273 |
-
.btn.tvc_animate_btn {
|
274 |
-
min-width: 114px;
|
275 |
-
min-height: 30px;
|
276 |
-
letter-spacing: 1.3px;
|
277 |
-
color: #fff;
|
278 |
-
background: linear-gradient(90deg, rgba(45,105,197,1) 0%, rgba(0,105,217,1) 100%);
|
279 |
-
border: none;
|
280 |
-
border-radius: 1000px;
|
281 |
-
box-shadow: 12px 12px 24px rgba(45,105,197,.64);
|
282 |
-
transition: all 0.3s ease-in-out 0s;
|
283 |
-
cursor: pointer;
|
284 |
-
outline: none;
|
285 |
-
position: relative;
|
286 |
-
padding: 6px;
|
287 |
-
padding-right: 25px;
|
288 |
-
}
|
289 |
-
|
290 |
-
button.tvc_animate_btn::before {
|
291 |
-
content: '';
|
292 |
-
border-radius: 1000px;
|
293 |
-
min-width: calc(112px + 12px);
|
294 |
-
min-height: calc(32px + 12px);
|
295 |
-
border: 2px solid #2D73C5;
|
296 |
-
box-shadow: 0 0 30px rgba(45,105,197,.64);
|
297 |
-
position: absolute;
|
298 |
-
top: 50%;
|
299 |
-
left: 50%;
|
300 |
-
transform: translate(-50%, -50%);
|
301 |
-
opacity: 0;
|
302 |
-
transition: all .3s ease-in-out 0s;
|
303 |
-
}
|
304 |
-
|
305 |
-
.btn.tvc_animate_btn:hover, .btn.tvc_animate_btn:focus {
|
306 |
-
color: #fff;
|
307 |
-
transform: translateX(4px);
|
308 |
-
padding-right: 6px;
|
309 |
-
}
|
310 |
-
|
311 |
-
button.tvc_animate_btn:hover::before, button.tvc_animate_btn:focus::before {
|
312 |
-
opacity: 1;
|
313 |
-
}
|
314 |
-
|
315 |
-
button.tvc_animate_btn::after {
|
316 |
-
content: '';
|
317 |
-
width: 30px; height: 30px;
|
318 |
-
border-radius: 100%;
|
319 |
-
border: 2px solid #fff;
|
320 |
-
position: absolute;
|
321 |
-
z-index: 1;
|
322 |
-
top: 50%;
|
323 |
-
left: 85%;
|
324 |
-
transform: translate(-50%, -50%);
|
325 |
-
animation: tvc_ring 1.5s infinite;
|
326 |
-
}
|
327 |
-
|
328 |
-
button.tvc_animate_btn:hover::after, button.tvc_animate_btn:focus::after {
|
329 |
-
animation: none;
|
330 |
-
display: none;
|
331 |
-
}
|
332 |
-
|
333 |
-
@keyframes tvc_ring {
|
334 |
-
0% {
|
335 |
-
width: 1px;
|
336 |
-
height: 1px;
|
337 |
-
opacity: 1;
|
338 |
-
}
|
339 |
-
100% {
|
340 |
-
width: 35px;
|
341 |
-
height: 35px;
|
342 |
-
opacity: 0;
|
343 |
-
}
|
344 |
-
}
|
345 |
-
.tvc_title_val{
|
346 |
-
width: 144px;
|
347 |
-
display: inline-block;
|
348 |
-
background-color: #eee;
|
349 |
-
padding: 8px 8px;
|
350 |
-
line-height: 22px;
|
351 |
-
min-height: 30px;
|
352 |
-
}
|
353 |
-
|
354 |
-
.wp-core-ui .notice.is-dismissible {
|
355 |
-
padding: 0 1.4rem 0 1rem;
|
356 |
-
margin: 10px 14px 0 2px;
|
357 |
-
}
|
358 |
-
.conversios-body-part .modal-dialog{ max-width: 700px;}
|
359 |
-
.change_prodct_feed_cat {text-decoration: underline; transition: all ease 0.5s; color: #03a2b7; margin-left: 10px; cursor: pointer;}
|
360 |
-
.config-head-active a{ color: #fff !important;}
|
361 |
-
#staticBackdrop .modal-body, #tvc_google_connect .modal-body{padding: 2rem;}
|
362 |
-
.tvc-nb-spinner {
|
363 |
-
display: inline-block;
|
364 |
-
top: 3px;
|
365 |
-
right: 10px;
|
366 |
-
margin-left: 10px;
|
367 |
-
width: 20px;
|
368 |
-
height: 20px;
|
369 |
-
|
370 |
-
background: transparent;
|
371 |
-
border-top: 2px solid #0769D7;
|
372 |
-
border-right: 2px solid transparent;
|
373 |
-
border-radius: 50%;
|
374 |
-
-webkit-animation: 1s spin linear infinite;
|
375 |
-
animation: 1s tvc-spin linear infinite;
|
376 |
-
}
|
377 |
-
.domain-claim-spinner.tvc-nb-spinner{
|
378 |
-
top: 5px;
|
379 |
-
right: 38px;
|
380 |
-
margin-left: 0px;
|
381 |
-
width: 15px;
|
382 |
-
height: 15px;
|
383 |
-
}
|
384 |
-
#refresh_api{height: 25px;}
|
385 |
-
.btn.tvc_api_sync_btn{
|
386 |
-
min-width: 114px;
|
387 |
-
min-height: 30px;
|
388 |
-
letter-spacing: 1.3px;
|
389 |
-
color: #fff;
|
390 |
-
background: linear-gradient(90deg, rgba(45,105,197,1) 0%, rgba(0,105,217,1) 100%);
|
391 |
-
border: none;
|
392 |
-
border-radius: 1000px;
|
393 |
-
box-shadow: 6px 6px 12px rgb(45 105 197 / 64%);
|
394 |
-
transition: all 0.3s ease-in-out 0s;
|
395 |
-
cursor: pointer;
|
396 |
-
outline: none;
|
397 |
-
position: relative;
|
398 |
-
padding: 6px;
|
399 |
-
}
|
400 |
-
#tvc_msg{
|
401 |
-
margin-left: 20px;
|
402 |
-
display: block;
|
403 |
-
display: inline-block;
|
404 |
-
color: #1e7e34;
|
405 |
-
}
|
406 |
-
.tvc-api-sunc{
|
407 |
-
text-align: right;
|
408 |
-
}
|
409 |
-
#googleShoppingFeed .tvc-api-sunc{
|
410 |
-
margin-bottom: 5px;
|
411 |
-
}
|
412 |
-
#googleShoppingFeed input[type=text], #googleShoppingFeed input[type=number]{margin-bottom: 10px;}
|
413 |
-
#googleShoppingFeed input[type=radio]{margin-right: 4px;}
|
414 |
-
.tvc-api-sunc span{
|
415 |
-
color: #03a2b7;
|
416 |
-
font-weight: 700;
|
417 |
-
font-size: 14px;
|
418 |
-
margin: 7px 5px;}
|
419 |
-
@keyframes tvc-spin {
|
420 |
-
0% { transform: rotate(0deg); }
|
421 |
-
100% { transform: rotate(360deg); }
|
422 |
-
}
|
423 |
-
|
424 |
-
/* popup */
|
425 |
-
.popup-modal.overlay {
|
426 |
-
position: fixed;
|
427 |
-
top: 0;
|
428 |
-
bottom: 0;
|
429 |
-
left: 0;
|
430 |
-
right: 0;
|
431 |
-
background: rgba(0, 0, 0, 0.7);
|
432 |
-
transition: opacity 500ms;
|
433 |
-
}
|
434 |
-
.popup-modal.overlay:target {
|
435 |
-
visibility: visible;
|
436 |
-
opacity: 1;
|
437 |
-
}
|
438 |
-
.popup-modal .modal-dialog .modal-content{
|
439 |
-
margin: 20px auto;
|
440 |
-
}
|
441 |
-
.popup-modal .modal-dialog .modal-content .btn-close{
|
442 |
-
position: absolute;
|
443 |
-
top: 0px;
|
444 |
-
right: 10px;
|
445 |
-
transition: all 200ms;
|
446 |
-
font-size: 30px;
|
447 |
-
background:none;
|
448 |
-
text-decoration: none;
|
449 |
-
}
|
450 |
-
.popup-modal .tvc-text{
|
451 |
-
min-height: 30px;
|
452 |
-
max-width: 25rem;
|
453 |
-
width: 100%;
|
454 |
-
font-size: 14px;
|
455 |
-
border-radius: 15px;
|
456 |
-
}
|
457 |
-
#feed-spinner img{width: 60px;}
|
458 |
-
/* Popup box BEGIN */
|
459 |
-
@-webkit-keyframes tvc_popup_box_open {
|
460 |
-
0%{opacity: 0; margin-top: -20%;}
|
461 |
-
75%{margin-top: 5%;}
|
462 |
-
100%{opacity: 1;}
|
463 |
-
}
|
464 |
-
@keyframes tvc_popup_box_open {
|
465 |
-
0%{opacity: 0; margin-top: -20%;}
|
466 |
-
75%{margin-top: 5%;}
|
467 |
-
100%{opacity: 1;}
|
468 |
-
}
|
469 |
-
@-webkit-keyframes tvc_popup_box_close {
|
470 |
-
0%{opacity: 1;}
|
471 |
-
75%{opacity: 1; margin-top: -20%;}
|
472 |
-
100%{opacity: 0;margin-top: 40%;}
|
473 |
-
}
|
474 |
-
@keyframes tvc_popup_box_close {
|
475 |
-
0%{opacity: 1;}
|
476 |
-
75%{opacity: 1; margin-top: -20%;}
|
477 |
-
100%{opacity: 0;margin-top: 40%;}
|
478 |
-
}
|
479 |
-
#tvc_popup_box{
|
480 |
-
width: 500px;
|
481 |
-
overflow: hidden;
|
482 |
-
background: #EEEEEE;
|
483 |
-
box-shadow: 0 0 10px black;
|
484 |
-
border-radius: 10px;
|
485 |
-
position: absolute;
|
486 |
-
top: 30%;
|
487 |
-
left: 40%;
|
488 |
-
display: none;
|
489 |
-
}
|
490 |
-
#tvc_popup_box.tvc_popup_box{
|
491 |
-
width: 500px;
|
492 |
-
overflow: hidden;
|
493 |
-
background: #EEEEEE;
|
494 |
-
box-shadow: 0 0 10px black;
|
495 |
-
border-radius: 10px;
|
496 |
-
position: fixed;
|
497 |
-
top: 30%;
|
498 |
-
left: 50%;
|
499 |
-
margin-top: 100px;
|
500 |
-
transform: translate(-50%, -50%);
|
501 |
-
z-index: 9999;
|
502 |
-
padding: 10px;
|
503 |
-
text-align: center;
|
504 |
-
display: block;
|
505 |
-
animation: tvc_popup_box_open 0.5s;
|
506 |
-
-webkit-animation: tvc_popup_box_open 0.5s;
|
507 |
-
|
508 |
-
}
|
509 |
-
#tvc_popup_box.tvc_popup_box_close{
|
510 |
-
display: none;
|
511 |
-
animation: tvc_popup_box_close 0.5s;
|
512 |
-
-webkit-animation: tvc_popup_box_close 0.5s;
|
513 |
-
-webkit-animation-fill-mode: forwards;
|
514 |
-
animation-fill-mode: forwards;
|
515 |
-
}
|
516 |
-
|
517 |
-
#tvc_popup_box #tvc_msg_content{ color: #000000;
|
518 |
-
font-size: 16px; padding: 0 20px;line-height: 20px;}
|
519 |
-
#tvc_popup_box .close {
|
520 |
-
position: absolute;
|
521 |
-
top: 0px;
|
522 |
-
right: 10px;
|
523 |
-
transition: all 200ms;
|
524 |
-
font-size: 30px;
|
525 |
-
font-weight: bold;
|
526 |
-
text-decoration: none;
|
527 |
-
cursor: pointer;
|
528 |
-
}
|
529 |
-
|
530 |
-
/* Popup box BEGIN */
|
531 |
-
.tvc-notice-error{position: relative;}
|
532 |
-
.tvc-notice-error .call_both_verification-spinner{
|
533 |
-
right: 5px;top: 10px;margin-left: 0;
|
534 |
-
}
|
535 |
-
|
536 |
-
.tvc-table table, .product-auto-sync-details table { border-collapse: collapse;
|
537 |
-
border-spacing: 0;
|
538 |
-
width: 100%; border-color: grey; margin-top: 5px;}
|
539 |
-
|
540 |
-
.tvc-table table tr, .product-auto-sync-details table tr {
|
541 |
-
display: table-row;
|
542 |
-
vertical-align: inherit;
|
543 |
-
border-color: inherit;
|
544 |
-
}
|
545 |
-
.tvc-table table tr th, .product-auto-sync-details table tr th {
|
546 |
-
padding-top: 11px;
|
547 |
-
padding-bottom: 11px;
|
548 |
-
background-color: #000338;
|
549 |
-
color: white;
|
550 |
-
border: 1px solid #ddd;
|
551 |
-
text-align: left;
|
552 |
-
padding: 8px;
|
553 |
-
display: table-cell;
|
554 |
-
vertical-align: inherit;
|
555 |
-
font-weight: bold;
|
556 |
-
text-align: center;
|
557 |
-
}
|
558 |
-
.tvc-table table tr td, .product-auto-sync-details table tr td {
|
559 |
-
display: table-cell;
|
560 |
-
vertical-align: inherit;
|
561 |
-
border: 1px solid #ddd;
|
562 |
-
text-align: left;
|
563 |
-
padding: 8px 3px;
|
564 |
-
text-align: center;
|
565 |
-
}
|
566 |
-
#tvc-account-page .tvc-table table tr th{padding: 14px; width: 25%;
|
567 |
-
text-align: left;
|
568 |
-
}
|
569 |
-
#tvc-account-page .tvc-table{margin-top:30px; }
|
570 |
-
#productSync .shop-category{text-align: right;}
|
571 |
-
/*#productSync .card-wrapper .row .col-6 h6{display: inline-block;}*/
|
572 |
-
#productSync .card-wrapper .row .col-6 .gmc-image-heading{padding: 5px 0;}
|
573 |
-
|
574 |
-
.tvc_plugin_container .notice, div.error, div.updated {margin: 0;}
|
575 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow b{top: 35%;}
|
576 |
-
.select2-container--default .select2-selection--single .select2-selection__rendered{line-height: 30px;}
|
577 |
-
.tvc-notification{position: relative;}
|
578 |
-
.tvc-notification-dropdown-menu{
|
579 |
-
width: 420px;
|
580 |
-
right: 0;
|
581 |
-
left: auto;
|
582 |
-
}
|
583 |
-
.tvc-msg_wrapper .tvc-msg_date{float: right; padding: 6px;}
|
584 |
-
.tvc-notification .tvc-msg.plain{ position: relative;
|
585 |
-
color: #757575;
|
586 |
-
background: #F1F1F1;
|
587 |
-
border-radius: 2px;
|
588 |
-
font-size: 13px;
|
589 |
-
font-size: .8125rem;
|
590 |
-
margin: 7px; padding: 0px 10px;
|
591 |
-
border-radius: 10px;}
|
592 |
-
/*.tvc-notification li:last-child .tvc-msg.plain,*/
|
593 |
-
.tvc-notification li:last-child{margin-bottom: 0;}
|
594 |
-
.tvc-notification .tvc-msg_title{color: #1e1e1e;
|
595 |
-
font-size: 16px;
|
596 |
-
font-size: 1rem;
|
597 |
-
font-style: normal;
|
598 |
-
line-height: 1.5;
|
599 |
-
font-weight: 700;
|
600 |
-
margin: 3px 0;}
|
601 |
-
.tvc-notification .tvc-dropdown{display: inline;}
|
602 |
-
.tvc-notification .tvc-msg_content {padding: 10px 0;}
|
603 |
-
.tvc-notification .tvc-msg_actions{border-top: 1px solid #e0e0e0; padding: 10px 0;}
|
604 |
-
.tvc-notification .tvc-notification-button{display: inline-flex; border-radius: 15px; text-decoration: none; align-items: center; border: 0; padding: 6px 12px;}
|
605 |
-
.tvc-notification .tvc-notification-button.is-tertiary{ white-space: nowrap; color: #007cba; background: transparent; outline: 1px solid transparent;}
|
606 |
-
.tvc-notification .tvc-notification-button.is-secondary{
|
607 |
-
box-shadow: inset 0 0 0 1px #007cba;
|
608 |
-
outline: 1px solid transparent;}
|
609 |
-
.tvc-notification .dropdown-menu{padding: 0; margin-top: 10px; border: 0.5px solid #A9A9A9; border-radius: 15px;}
|
610 |
-
.tvc-notification .dropdown-menu:before {
|
611 |
-
content: "";
|
612 |
-
position: absolute;
|
613 |
-
top: 0;
|
614 |
-
right: 0;
|
615 |
-
width: 0;
|
616 |
-
height: 0;
|
617 |
-
transform: translate(-1rem, -100%);
|
618 |
-
border-left: 0.75rem solid transparent;
|
619 |
-
border-right: 0.75rem solid transparent;
|
620 |
-
border-bottom: 0.75rem solid #A9A9A9;
|
621 |
-
}
|
622 |
-
#sync-product #tvc-sync-product-list_wrapper{padding: 10px 0;}
|
623 |
-
#sync-product table.dataTable{margin-top: 0px !important;}
|
624 |
-
#tvc-sync-product-list_paginate{ margin-top: 10px;}
|
625 |
-
/*#sync-product table tbody{display: table-caption;}*/
|
626 |
-
.tvc-help-slider .slick-slide::-webkit-scrollbar-track, .tvc-b-value-slider .slick-slide::-webkit-scrollbar-track, #sync-product .dataTables_scrollBody::-webkit-scrollbar-track {
|
627 |
-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
628 |
-
background-color: #F5F5F5;
|
629 |
-
border-radius: 10px;
|
630 |
-
}
|
631 |
-
|
632 |
-
.tvc-help-slider .slick-slide::-webkit-scrollbar, .tvc-b-value-slider .slick-slide::-webkit-scrollbar, #sync-product .dataTables_scrollBody::-webkit-scrollbar {
|
633 |
-
width: 8px;
|
634 |
-
background-color: #F5F5F5;
|
635 |
-
}
|
636 |
-
|
637 |
-
.tvc-help-slider .slick-slide::-webkit-scrollbar-thumb, .tvc-b-value-slider .slick-slide::-webkit-scrollbar-thumb, #sync-product .dataTables_scrollBody::-webkit-scrollbar-thumb {
|
638 |
-
background-color: #777;
|
639 |
-
border-radius: 10px;
|
640 |
-
}
|
641 |
-
#sync-product .dataTables_length label{margin: 0;}
|
642 |
-
#sync-product div.dataTables_filter input{border-radius: 15px;}
|
643 |
-
.tvc-licence .input-group .form-control{height: 40px; letter-spacing: 8px; font-size: 18px;}
|
644 |
-
|
645 |
-
button#ee_submit_plugin, button#google-add{ min-width: 80px;}
|
646 |
-
button#google-add{margin-top: 20px;}
|
647 |
-
.ga-text span{font-weight:normal;}
|
648 |
-
.tvc-help-slider, .tvc-b-value-slider{
|
649 |
-
height: 120px;
|
650 |
-
padding: 0;
|
651 |
-
}
|
652 |
-
.slick-slide{
|
653 |
-
overflow-y: auto;
|
654 |
-
height: 120px;
|
655 |
-
}
|
656 |
-
.tvc-footer-links{text-align: center;}
|
657 |
-
.tvc-footer-links a{text-decoration: underline; margin-left: 5px; margin-right: 5px;}
|
658 |
-
.right-content .content-section .slick-slide img{display: inline-block;
|
659 |
-
margin: 0 3px;}
|
660 |
-
ul.nav.nav-pills.nav-justified{position: relative;}
|
661 |
-
.tvc-help-need{position: absolute; right: 15px; bottom: 15px;}
|
662 |
-
.tvc_plugin_container .container{ padding-left: 2px;}
|
663 |
-
.tvc_plugin_container{margin-top: 10px;}
|
664 |
-
|
665 |
-
img{
|
666 |
-
image-rendering: -moz-crisp-edges;
|
667 |
-
image-rendering: -o-crisp-edges;
|
668 |
-
image-rendering: -webkit-optimize-contrast;
|
669 |
-
image-rendering: crisp-edges;
|
670 |
-
-ms-interpolation-mode: nearest-neighbor;
|
671 |
-
}
|
672 |
-
.progress{background-color: #ffff; border-radius: 8px;}
|
673 |
-
/*.tvc-sync-progress-db{display: none; margin-top: 5px;}*/
|
674 |
-
.tvc-sync-progress-gmc{display: none; margin-top: 5px;}
|
675 |
-
/*.tvc-progress-info{display: none;}*/
|
676 |
-
.progress-bar-wapper{display:none;}
|
677 |
-
.tvc-sync-count{display: inline-block; text-align: left; float: left;}
|
678 |
-
.tvc-total-count{display: inline-block; text-align: right; float: right;}
|
679 |
-
.tvc-sync-message{
|
680 |
-
display: block;
|
681 |
-
font-weight: 700;
|
682 |
-
text-align: left;
|
683 |
-
margin: 0 0 10px 0;
|
684 |
-
}
|
685 |
-
.tvc-progress-info{padding: 0 5px;}
|
686 |
-
.progress-bar-wapper.open{
|
687 |
-
height: 100px;
|
688 |
-
width: 500px;
|
689 |
-
overflow: hidden;
|
690 |
-
background: #EEEEEE;
|
691 |
-
box-shadow: 0 0 10px black;
|
692 |
-
border-radius: 10px;
|
693 |
-
position: fixed;
|
694 |
-
top: 30%;
|
695 |
-
left: 50%;
|
696 |
-
margin-top: 100px;
|
697 |
-
transform: translate(-50%, -50%);
|
698 |
-
z-index: 9999;
|
699 |
-
padding: 20px;
|
700 |
-
text-align: center;
|
701 |
-
display: block;
|
702 |
-
animation: tvc_popup_box_open 0.5s;
|
703 |
-
-webkit-animation: tvc_popup_box_open 0.5s;
|
704 |
-
}
|
705 |
-
|
706 |
-
.google_conversion_label_message{
|
707 |
-
margin-top: 20px;
|
708 |
-
}
|
709 |
-
|
710 |
-
.auto_product_sync_save_button{
|
711 |
-
text-align: center;
|
712 |
-
margin-left: 80px;
|
713 |
}
|
1 |
+
/**
|
2 |
+
* All of the CSS for your admin-specific functionality should be
|
3 |
+
* included in this file.
|
4 |
+
*/
|
5 |
+
*{
|
6 |
+
box-sizing: border-box;
|
7 |
+
margin:0px;
|
8 |
+
padding:0px;
|
9 |
+
}
|
10 |
+
body{
|
11 |
+
background: #f1f1f1 !important;
|
12 |
+
}
|
13 |
+
.update-nag, .updated, .error, .is-dismissible, .notice { display: none!important; }
|
14 |
+
.tvc-notice-error{display: block!important;}
|
15 |
+
.popover{
|
16 |
+
max-width:500px !important;
|
17 |
+
}
|
18 |
+
.popover-body{
|
19 |
+
text-align: justify;
|
20 |
+
text-justify: inter-word;
|
21 |
+
}
|
22 |
+
input[type=text],input[type=email],input[type=number],textarea{
|
23 |
+
border:1.3px solid #b4b9be;
|
24 |
+
}
|
25 |
+
input[type=checkbox]{
|
26 |
+
border:1.2px solid #b4b9be;
|
27 |
+
background:#fff;
|
28 |
+
-webkit-transition: all 1.5s ease;
|
29 |
+
-moz-transition: all 1.5s ease;
|
30 |
+
-o-transition: all 1.5s ease;
|
31 |
+
-ms-transition: all 1.5s ease;
|
32 |
+
transition: all 1.5s ease;
|
33 |
+
}
|
34 |
+
|
35 |
+
input[type=checkbox]:checked::before {
|
36 |
+
height:16px;
|
37 |
+
width:16px;
|
38 |
+
background:#2D73C5;
|
39 |
+
color:white;
|
40 |
+
font:100 16px/1 dashicons !important;
|
41 |
+
margin:-1px;
|
42 |
+
}
|
43 |
+
h5{
|
44 |
+
margin-top: 5px;
|
45 |
+
}
|
46 |
+
|
47 |
+
.try-btn{
|
48 |
+
width: auto;
|
49 |
+
border: black;
|
50 |
+
text-align: center;
|
51 |
+
padding: 8px 10px 10px 10px;
|
52 |
+
font-size: 18px;
|
53 |
+
background-color: #00a32a;
|
54 |
+
float: right;
|
55 |
+
top: 60px;
|
56 |
+
height: 38px;
|
57 |
+
color: antiquewhite;
|
58 |
+
font-weight: bold;
|
59 |
+
border-radius: 4px;
|
60 |
+
-moz-box-shadow: 3px 3px 5px 6px #ccc;
|
61 |
+
-webkit-box-shadow: 3px 3px 5px 6px #ccc;
|
62 |
+
box-shadow: 0px 0px 7px 7px #ccc;
|
63 |
+
}
|
64 |
+
.top-btn{
|
65 |
+
float: right;
|
66 |
+
}
|
67 |
+
.new-img-blink{
|
68 |
+
width: 40px;
|
69 |
+
height: 25px;
|
70 |
+
}
|
71 |
+
.new-img-blink-side{
|
72 |
+
width: 40px;
|
73 |
+
height: 25px;
|
74 |
+
}
|
75 |
+
.banner-blink{width: 60px;
|
76 |
+
height: 35px;}
|
77 |
+
.rating {
|
78 |
+
unicode-bidi: bidi-override;
|
79 |
+
direction: rtl;
|
80 |
+
}
|
81 |
+
.rating > span {
|
82 |
+
display: inline-block;
|
83 |
+
position: relative;
|
84 |
+
width: 1.1em;
|
85 |
+
color: #2D73C5;
|
86 |
+
}
|
87 |
+
.rating > span:hover:before,
|
88 |
+
.rating > span:hover ~ span:before {
|
89 |
+
content: "\2605";
|
90 |
+
position: absolute;
|
91 |
+
}
|
92 |
+
.oauth-container{
|
93 |
+
display: inline-block;
|
94 |
+
width: 100%;
|
95 |
+
max-width: 100%;
|
96 |
+
padding: 5px;
|
97 |
+
border: 1px solid #bfbfbf;
|
98 |
+
height: 45px;
|
99 |
+
border-radius: 5px;
|
100 |
+
background-color: #fff;
|
101 |
+
}
|
102 |
+
.ee-oauth-container{
|
103 |
+
display: inline-block;
|
104 |
+
width: 200px;
|
105 |
+
max-width: 100%;
|
106 |
+
padding: 5px;
|
107 |
+
border: 1px solid #bfbfbf;
|
108 |
+
height: 40px;
|
109 |
+
border-radius: 30px;
|
110 |
+
background-color: #fff;
|
111 |
+
}
|
112 |
+
.left {
|
113 |
+
float: left;
|
114 |
+
}
|
115 |
+
/* checkbox admin*/
|
116 |
+
|
117 |
+
.tvc_ee_plugin_form .align-middle{margin: 0 auto;}
|
118 |
+
/*.tvc_ee_plugin_form .align-middle label, label.tvc-custom-control-input{margin: 0 auto; font-size: 15px;} */
|
119 |
+
.tvc_ee_plugin_form [type="checkbox"]:not(:checked),
|
120 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked {
|
121 |
+
position: absolute;
|
122 |
+
left: 1px;
|
123 |
+
top: 7px;
|
124 |
+
opacity: 0;
|
125 |
+
}
|
126 |
+
#ee_plugin_form #ga_PrivacyPolicy{
|
127 |
+
left: 1px;
|
128 |
+
top: 7px;
|
129 |
+
opacity: 0;
|
130 |
+
}
|
131 |
+
|
132 |
+
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label,
|
133 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked+label {
|
134 |
+
position: relative;
|
135 |
+
padding-left: 22px;
|
136 |
+
cursor: pointer;
|
137 |
+
color: #5E5E5E;
|
138 |
+
font-size: 14px;
|
139 |
+
}
|
140 |
+
|
141 |
+
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:before,
|
142 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked+label:before {
|
143 |
+
content: '';
|
144 |
+
position: absolute;
|
145 |
+
left: 0;
|
146 |
+
top: 2px;
|
147 |
+
width: 15px;
|
148 |
+
height: 15px;
|
149 |
+
background: #fff;
|
150 |
+
border-radius: 3px;
|
151 |
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1);
|
152 |
+
background-color: #eee;
|
153 |
+
outline: none;
|
154 |
+
}
|
155 |
+
|
156 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked+label:before {
|
157 |
+
background-color: #2D73C5;
|
158 |
+
}
|
159 |
+
|
160 |
+
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:after,
|
161 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked+label:after {
|
162 |
+
content: '\2713';
|
163 |
+
position: absolute;
|
164 |
+
top: 4px;
|
165 |
+
left: 2px;
|
166 |
+
font-size: 13px;
|
167 |
+
font-weight: bold;
|
168 |
+
line-height: 0.8;
|
169 |
+
color: #fff;
|
170 |
+
transition: all .2s;
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
.tvc_ee_plugin_form [type="checkbox"]:not(:checked)+label:after {
|
175 |
+
opacity: 0;
|
176 |
+
transform: scale(0);
|
177 |
+
}
|
178 |
+
|
179 |
+
.tvc_ee_plugin_form [type="checkbox"]:checked+label:after {
|
180 |
+
opacity: 1;
|
181 |
+
transform: scale(1);
|
182 |
+
}
|
183 |
+
#ee_plugin_form table th{padding: .75em 0; }
|
184 |
+
|
185 |
+
img.config-success, .nav-tabs li img.config-success, img.config-fail ,.nav-tabs li img.config-fail{
|
186 |
+
width: 14px; margin-right: 2px;
|
187 |
+
}
|
188 |
+
.configuration-section img.config-success, .configuration-section img.config-fail {
|
189 |
+
width: 16px;
|
190 |
+
margin-left: 3px;
|
191 |
+
margin-top: 1px;
|
192 |
+
}
|
193 |
+
.tvc-tooltip {
|
194 |
+
position: relative;
|
195 |
+
display: inline-block;
|
196 |
+
width: 100%;
|
197 |
+
/*margin-top: 3px;*/
|
198 |
+
}
|
199 |
+
.tvc-tooltip:hover .tvc-tooltiptext {
|
200 |
+
visibility: visible;
|
201 |
+
opacity: 1;
|
202 |
+
z-index: 999;
|
203 |
+
}
|
204 |
+
.tvc-tooltip .tvc-tooltiptext {
|
205 |
+
font-weight: normal;
|
206 |
+
font-size: 14px;
|
207 |
+
visibility: hidden;
|
208 |
+
position: absolute;
|
209 |
+
min-width: 400px;
|
210 |
+
background-color: #000338;
|
211 |
+
color: #fff;
|
212 |
+
text-align: left;
|
213 |
+
padding: 5px 6px;
|
214 |
+
border-radius: 15px 50px 30px 5px;
|
215 |
+
z-index: 999;
|
216 |
+
transition: opacity .6s;
|
217 |
+
cursor: auto;
|
218 |
+
|
219 |
+
}
|
220 |
+
.tvc-tooltip .tvc-tooltiptext a{
|
221 |
+
color: #fff;
|
222 |
+
opacity: 0.8;
|
223 |
+
}
|
224 |
+
.tvc-tooltip-top {
|
225 |
+
bottom: 115%;
|
226 |
+
left: 50%;
|
227 |
+
margin-left: -60px;
|
228 |
+
}
|
229 |
+
.tvc-tooltip-right{
|
230 |
+
top: -2px;
|
231 |
+
left: 98%;
|
232 |
+
}
|
233 |
+
.configuration-section .tvc-tooltip-right{
|
234 |
+
top: -32px;
|
235 |
+
left: 102%;
|
236 |
+
}
|
237 |
+
.tvc-tooltip.active .tvc-tooltip-right {
|
238 |
+
top: -32px;
|
239 |
+
left: 103%;
|
240 |
+
}
|
241 |
+
.edit-tabs li:last-child .tvc-tooltip-right {
|
242 |
+
top: -32px;
|
243 |
+
left: 100%;
|
244 |
+
}
|
245 |
+
.tvc-tooltip-right::after {
|
246 |
+
content: "";
|
247 |
+
position: absolute;
|
248 |
+
top: 83%;
|
249 |
+
right: 100%;
|
250 |
+
|
251 |
+
margin-top: -5px;
|
252 |
+
border-width: 5px;
|
253 |
+
border-style: solid;
|
254 |
+
border-color: transparent #000338 transparent transparent;
|
255 |
+
}
|
256 |
+
#syncProduct.popup-modal .tvc-tooltip{ position: absolute;
|
257 |
+
display: inline-block;
|
258 |
+
width: auto; top: -5px; margin-left: 2px;
|
259 |
+
}
|
260 |
+
#syncProduct.popup-modal .tvc-tooltip .tvc-tooltip-right{ bottom: 6px;
|
261 |
+
left: 125%; min-width: 285px; top: auto;}
|
262 |
+
|
263 |
+
#ee_plugin_form .align-middle{position: relative;}
|
264 |
+
|
265 |
+
|
266 |
+
/* animate button effect */
|
267 |
+
.tvc_animate_btn_wrap {
|
268 |
+
height: 100%;
|
269 |
+
display: flex;
|
270 |
+
/*align-items: center;
|
271 |
+
justify-content: center;*/
|
272 |
+
}
|
273 |
+
.btn.tvc_animate_btn {
|
274 |
+
min-width: 114px;
|
275 |
+
min-height: 30px;
|
276 |
+
letter-spacing: 1.3px;
|
277 |
+
color: #fff;
|
278 |
+
background: linear-gradient(90deg, rgba(45,105,197,1) 0%, rgba(0,105,217,1) 100%);
|
279 |
+
border: none;
|
280 |
+
border-radius: 1000px;
|
281 |
+
box-shadow: 12px 12px 24px rgba(45,105,197,.64);
|
282 |
+
transition: all 0.3s ease-in-out 0s;
|
283 |
+
cursor: pointer;
|
284 |
+
outline: none;
|
285 |
+
position: relative;
|
286 |
+
padding: 6px;
|
287 |
+
padding-right: 25px;
|
288 |
+
}
|
289 |
+
|
290 |
+
button.tvc_animate_btn::before {
|
291 |
+
content: '';
|
292 |
+
border-radius: 1000px;
|
293 |
+
min-width: calc(112px + 12px);
|
294 |
+
min-height: calc(32px + 12px);
|
295 |
+
border: 2px solid #2D73C5;
|
296 |
+
box-shadow: 0 0 30px rgba(45,105,197,.64);
|
297 |
+
position: absolute;
|
298 |
+
top: 50%;
|
299 |
+
left: 50%;
|
300 |
+
transform: translate(-50%, -50%);
|
301 |
+
opacity: 0;
|
302 |
+
transition: all .3s ease-in-out 0s;
|
303 |
+
}
|
304 |
+
|
305 |
+
.btn.tvc_animate_btn:hover, .btn.tvc_animate_btn:focus {
|
306 |
+
color: #fff;
|
307 |
+
transform: translateX(4px);
|
308 |
+
padding-right: 6px;
|
309 |
+
}
|
310 |
+
|
311 |
+
button.tvc_animate_btn:hover::before, button.tvc_animate_btn:focus::before {
|
312 |
+
opacity: 1;
|
313 |
+
}
|
314 |
+
|
315 |
+
button.tvc_animate_btn::after {
|
316 |
+
content: '';
|
317 |
+
width: 30px; height: 30px;
|
318 |
+
border-radius: 100%;
|
319 |
+
border: 2px solid #fff;
|
320 |
+
position: absolute;
|
321 |
+
z-index: 1;
|
322 |
+
top: 50%;
|
323 |
+
left: 85%;
|
324 |
+
transform: translate(-50%, -50%);
|
325 |
+
animation: tvc_ring 1.5s infinite;
|
326 |
+
}
|
327 |
+
|
328 |
+
button.tvc_animate_btn:hover::after, button.tvc_animate_btn:focus::after {
|
329 |
+
animation: none;
|
330 |
+
display: none;
|
331 |
+
}
|
332 |
+
|
333 |
+
@keyframes tvc_ring {
|
334 |
+
0% {
|
335 |
+
width: 1px;
|
336 |
+
height: 1px;
|
337 |
+
opacity: 1;
|
338 |
+
}
|
339 |
+
100% {
|
340 |
+
width: 35px;
|
341 |
+
height: 35px;
|
342 |
+
opacity: 0;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
.tvc_title_val{
|
346 |
+
width: 144px;
|
347 |
+
display: inline-block;
|
348 |
+
background-color: #eee;
|
349 |
+
padding: 8px 8px;
|
350 |
+
line-height: 22px;
|
351 |
+
min-height: 30px;
|
352 |
+
}
|
353 |
+
|
354 |
+
.wp-core-ui .notice.is-dismissible {
|
355 |
+
padding: 0 1.4rem 0 1rem;
|
356 |
+
margin: 10px 14px 0 2px;
|
357 |
+
}
|
358 |
+
.conversios-body-part .modal-dialog{ max-width: 700px;}
|
359 |
+
.change_prodct_feed_cat {text-decoration: underline; transition: all ease 0.5s; color: #03a2b7; margin-left: 10px; cursor: pointer;}
|
360 |
+
.config-head-active a{ color: #fff !important;}
|
361 |
+
#staticBackdrop .modal-body, #tvc_google_connect .modal-body{padding: 2rem;}
|
362 |
+
.tvc-nb-spinner {
|
363 |
+
display: inline-block;
|
364 |
+
top: 3px;
|
365 |
+
right: 10px;
|
366 |
+
margin-left: 10px;
|
367 |
+
width: 20px;
|
368 |
+
height: 20px;
|
369 |
+
|
370 |
+
background: transparent;
|
371 |
+
border-top: 2px solid #0769D7;
|
372 |
+
border-right: 2px solid transparent;
|
373 |
+
border-radius: 50%;
|
374 |
+
-webkit-animation: 1s spin linear infinite;
|
375 |
+
animation: 1s tvc-spin linear infinite;
|
376 |
+
}
|
377 |
+
.domain-claim-spinner.tvc-nb-spinner{
|
378 |
+
top: 5px;
|
379 |
+
right: 38px;
|
380 |
+
margin-left: 0px;
|
381 |
+
width: 15px;
|
382 |
+
height: 15px;
|
383 |
+
}
|
384 |
+
#refresh_api{height: 25px;}
|
385 |
+
.btn.tvc_api_sync_btn{
|
386 |
+
min-width: 114px;
|
387 |
+
min-height: 30px;
|
388 |
+
letter-spacing: 1.3px;
|
389 |
+
color: #fff;
|
390 |
+
background: linear-gradient(90deg, rgba(45,105,197,1) 0%, rgba(0,105,217,1) 100%);
|
391 |
+
border: none;
|
392 |
+
border-radius: 1000px;
|
393 |
+
box-shadow: 6px 6px 12px rgb(45 105 197 / 64%);
|
394 |
+
transition: all 0.3s ease-in-out 0s;
|
395 |
+
cursor: pointer;
|
396 |
+
outline: none;
|
397 |
+
position: relative;
|
398 |
+
padding: 6px;
|
399 |
+
}
|
400 |
+
#tvc_msg{
|
401 |
+
margin-left: 20px;
|
402 |
+
display: block;
|
403 |
+
display: inline-block;
|
404 |
+
color: #1e7e34;
|
405 |
+
}
|
406 |
+
.tvc-api-sunc{
|
407 |
+
text-align: right;
|
408 |
+
}
|
409 |
+
#googleShoppingFeed .tvc-api-sunc{
|
410 |
+
margin-bottom: 5px;
|
411 |
+
}
|
412 |
+
#googleShoppingFeed input[type=text], #googleShoppingFeed input[type=number]{margin-bottom: 10px;}
|
413 |
+
#googleShoppingFeed input[type=radio]{margin-right: 4px;}
|
414 |
+
.tvc-api-sunc span{
|
415 |
+
color: #03a2b7;
|
416 |
+
font-weight: 700;
|
417 |
+
font-size: 14px;
|
418 |
+
margin: 7px 5px;}
|
419 |
+
@keyframes tvc-spin {
|
420 |
+
0% { transform: rotate(0deg); }
|
421 |
+
100% { transform: rotate(360deg); }
|
422 |
+
}
|
423 |
+
|
424 |
+
/* popup */
|
425 |
+
.popup-modal.overlay {
|
426 |
+
position: fixed;
|
427 |
+
top: 0;
|
428 |
+
bottom: 0;
|
429 |
+
left: 0;
|
430 |
+
right: 0;
|
431 |
+
background: rgba(0, 0, 0, 0.7);
|
432 |
+
transition: opacity 500ms;
|
433 |
+
}
|
434 |
+
.popup-modal.overlay:target {
|
435 |
+
visibility: visible;
|
436 |
+
opacity: 1;
|
437 |
+
}
|
438 |
+
.popup-modal .modal-dialog .modal-content{
|
439 |
+
margin: 20px auto;
|
440 |
+
}
|
441 |
+
.popup-modal .modal-dialog .modal-content .btn-close{
|
442 |
+
position: absolute;
|
443 |
+
top: 0px;
|
444 |
+
right: 10px;
|
445 |
+
transition: all 200ms;
|
446 |
+
font-size: 30px;
|
447 |
+
background:none;
|
448 |
+
text-decoration: none;
|
449 |
+
}
|
450 |
+
.popup-modal .tvc-text{
|
451 |
+
min-height: 30px;
|
452 |
+
max-width: 25rem;
|
453 |
+
width: 100%;
|
454 |
+
font-size: 14px;
|
455 |
+
border-radius: 15px;
|
456 |
+
}
|
457 |
+
#feed-spinner img{width: 60px;}
|
458 |
+
/* Popup box BEGIN */
|
459 |
+
@-webkit-keyframes tvc_popup_box_open {
|
460 |
+
0%{opacity: 0; margin-top: -20%;}
|
461 |
+
75%{margin-top: 5%;}
|
462 |
+
100%{opacity: 1;}
|
463 |
+
}
|
464 |
+
@keyframes tvc_popup_box_open {
|
465 |
+
0%{opacity: 0; margin-top: -20%;}
|
466 |
+
75%{margin-top: 5%;}
|
467 |
+
100%{opacity: 1;}
|
468 |
+
}
|
469 |
+
@-webkit-keyframes tvc_popup_box_close {
|
470 |
+
0%{opacity: 1;}
|
471 |
+
75%{opacity: 1; margin-top: -20%;}
|
472 |
+
100%{opacity: 0;margin-top: 40%;}
|
473 |
+
}
|
474 |
+
@keyframes tvc_popup_box_close {
|
475 |
+
0%{opacity: 1;}
|
476 |
+
75%{opacity: 1; margin-top: -20%;}
|
477 |
+
100%{opacity: 0;margin-top: 40%;}
|
478 |
+
}
|
479 |
+
#tvc_popup_box{
|
480 |
+
width: 500px;
|
481 |
+
overflow: hidden;
|
482 |
+
background: #EEEEEE;
|
483 |
+
box-shadow: 0 0 10px black;
|
484 |
+
border-radius: 10px;
|
485 |
+
position: absolute;
|
486 |
+
top: 30%;
|
487 |
+
left: 40%;
|
488 |
+
display: none;
|
489 |
+
}
|
490 |
+
#tvc_popup_box.tvc_popup_box{
|
491 |
+
width: 500px;
|
492 |
+
overflow: hidden;
|
493 |
+
background: #EEEEEE;
|
494 |
+
box-shadow: 0 0 10px black;
|
495 |
+
border-radius: 10px;
|
496 |
+
position: fixed;
|
497 |
+
top: 30%;
|
498 |
+
left: 50%;
|
499 |
+
margin-top: 100px;
|
500 |
+
transform: translate(-50%, -50%);
|
501 |
+
z-index: 9999;
|
502 |
+
padding: 10px;
|
503 |
+
text-align: center;
|
504 |
+
display: block;
|
505 |
+
animation: tvc_popup_box_open 0.5s;
|
506 |
+
-webkit-animation: tvc_popup_box_open 0.5s;
|
507 |
+
|
508 |
+
}
|
509 |
+
#tvc_popup_box.tvc_popup_box_close{
|
510 |
+
display: none;
|
511 |
+
animation: tvc_popup_box_close 0.5s;
|
512 |
+
-webkit-animation: tvc_popup_box_close 0.5s;
|
513 |
+
-webkit-animation-fill-mode: forwards;
|
514 |
+
animation-fill-mode: forwards;
|
515 |
+
}
|
516 |
+
|
517 |
+
#tvc_popup_box #tvc_msg_content{ color: #000000;
|
518 |
+
font-size: 16px; padding: 0 20px;line-height: 20px;}
|
519 |
+
#tvc_popup_box .close {
|
520 |
+
position: absolute;
|
521 |
+
top: 0px;
|
522 |
+
right: 10px;
|
523 |
+
transition: all 200ms;
|
524 |
+
font-size: 30px;
|
525 |
+
font-weight: bold;
|
526 |
+
text-decoration: none;
|
527 |
+
cursor: pointer;
|
528 |
+
}
|
529 |
+
|
530 |
+
/* Popup box BEGIN */
|
531 |
+
.tvc-notice-error{position: relative;}
|
532 |
+
.tvc-notice-error .call_both_verification-spinner{
|
533 |
+
right: 5px;top: 10px;margin-left: 0;
|
534 |
+
}
|
535 |
+
|
536 |
+
.tvc-table table, .product-auto-sync-details table { border-collapse: collapse;
|
537 |
+
border-spacing: 0;
|
538 |
+
width: 100%; border-color: grey; margin-top: 5px;}
|
539 |
+
|
540 |
+
.tvc-table table tr, .product-auto-sync-details table tr {
|
541 |
+
display: table-row;
|
542 |
+
vertical-align: inherit;
|
543 |
+
border-color: inherit;
|
544 |
+
}
|
545 |
+
.tvc-table table tr th, .product-auto-sync-details table tr th {
|
546 |
+
padding-top: 11px;
|
547 |
+
padding-bottom: 11px;
|
548 |
+
background-color: #000338;
|
549 |
+
color: white;
|
550 |
+
border: 1px solid #ddd;
|
551 |
+
text-align: left;
|
552 |
+
padding: 8px;
|
553 |
+
display: table-cell;
|
554 |
+
vertical-align: inherit;
|
555 |
+
font-weight: bold;
|
556 |
+
text-align: center;
|
557 |
+
}
|
558 |
+
.tvc-table table tr td, .product-auto-sync-details table tr td {
|
559 |
+
display: table-cell;
|
560 |
+
vertical-align: inherit;
|
561 |
+
border: 1px solid #ddd;
|
562 |
+
text-align: left;
|
563 |
+
padding: 8px 3px;
|
564 |
+
text-align: center;
|
565 |
+
}
|
566 |
+
#tvc-account-page .tvc-table table tr th{padding: 14px; width: 25%;
|
567 |
+
text-align: left;
|
568 |
+
}
|
569 |
+
#tvc-account-page .tvc-table{margin-top:30px; }
|
570 |
+
#productSync .shop-category{text-align: right;}
|
571 |
+
/*#productSync .card-wrapper .row .col-6 h6{display: inline-block;}*/
|
572 |
+
#productSync .card-wrapper .row .col-6 .gmc-image-heading{padding: 5px 0;}
|
573 |
+
|
574 |
+
.tvc_plugin_container .notice, div.error, div.updated {margin: 0;}
|
575 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b{top: 35%;}
|
576 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered{line-height: 30px;}
|
577 |
+
.tvc-notification{position: relative;}
|
578 |
+
.tvc-notification-dropdown-menu{
|
579 |
+
width: 420px;
|
580 |
+
right: 0;
|
581 |
+
left: auto;
|
582 |
+
}
|
583 |
+
.tvc-msg_wrapper .tvc-msg_date{float: right; padding: 6px;}
|
584 |
+
.tvc-notification .tvc-msg.plain{ position: relative;
|
585 |
+
color: #757575;
|
586 |
+
background: #F1F1F1;
|
587 |
+
border-radius: 2px;
|
588 |
+
font-size: 13px;
|
589 |
+
font-size: .8125rem;
|
590 |
+
margin: 7px; padding: 0px 10px;
|
591 |
+
border-radius: 10px;}
|
592 |
+
/*.tvc-notification li:last-child .tvc-msg.plain,*/
|
593 |
+
.tvc-notification li:last-child{margin-bottom: 0;}
|
594 |
+
.tvc-notification .tvc-msg_title{color: #1e1e1e;
|
595 |
+
font-size: 16px;
|
596 |
+
font-size: 1rem;
|
597 |
+
font-style: normal;
|
598 |
+
line-height: 1.5;
|
599 |
+
font-weight: 700;
|
600 |
+
margin: 3px 0;}
|
601 |
+
.tvc-notification .tvc-dropdown{display: inline;}
|
602 |
+
.tvc-notification .tvc-msg_content {padding: 10px 0;}
|
603 |
+
.tvc-notification .tvc-msg_actions{border-top: 1px solid #e0e0e0; padding: 10px 0;}
|
604 |
+
.tvc-notification .tvc-notification-button{display: inline-flex; border-radius: 15px; text-decoration: none; align-items: center; border: 0; padding: 6px 12px;}
|
605 |
+
.tvc-notification .tvc-notification-button.is-tertiary{ white-space: nowrap; color: #007cba; background: transparent; outline: 1px solid transparent;}
|
606 |
+
.tvc-notification .tvc-notification-button.is-secondary{
|
607 |
+
box-shadow: inset 0 0 0 1px #007cba;
|
608 |
+
outline: 1px solid transparent;}
|
609 |
+
.tvc-notification .dropdown-menu{padding: 0; margin-top: 10px; border: 0.5px solid #A9A9A9; border-radius: 15px;}
|
610 |
+
.tvc-notification .dropdown-menu:before {
|
611 |
+
content: "";
|
612 |
+
position: absolute;
|
613 |
+
top: 0;
|
614 |
+
right: 0;
|
615 |
+
width: 0;
|
616 |
+
height: 0;
|
617 |
+
transform: translate(-1rem, -100%);
|
618 |
+
border-left: 0.75rem solid transparent;
|
619 |
+
border-right: 0.75rem solid transparent;
|
620 |
+
border-bottom: 0.75rem solid #A9A9A9;
|
621 |
+
}
|
622 |
+
#sync-product #tvc-sync-product-list_wrapper{padding: 10px 0;}
|
623 |
+
#sync-product table.dataTable{margin-top: 0px !important;}
|
624 |
+
#tvc-sync-product-list_paginate{ margin-top: 10px;}
|
625 |
+
/*#sync-product table tbody{display: table-caption;}*/
|
626 |
+
.tvc-help-slider .slick-slide::-webkit-scrollbar-track, .tvc-b-value-slider .slick-slide::-webkit-scrollbar-track, #sync-product .dataTables_scrollBody::-webkit-scrollbar-track {
|
627 |
+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
628 |
+
background-color: #F5F5F5;
|
629 |
+
border-radius: 10px;
|
630 |
+
}
|
631 |
+
|
632 |
+
.tvc-help-slider .slick-slide::-webkit-scrollbar, .tvc-b-value-slider .slick-slide::-webkit-scrollbar, #sync-product .dataTables_scrollBody::-webkit-scrollbar {
|
633 |
+
width: 8px;
|
634 |
+
background-color: #F5F5F5;
|
635 |
+
}
|
636 |
+
|
637 |
+
.tvc-help-slider .slick-slide::-webkit-scrollbar-thumb, .tvc-b-value-slider .slick-slide::-webkit-scrollbar-thumb, #sync-product .dataTables_scrollBody::-webkit-scrollbar-thumb {
|
638 |
+
background-color: #777;
|
639 |
+
border-radius: 10px;
|
640 |
+
}
|
641 |
+
#sync-product .dataTables_length label{margin: 0;}
|
642 |
+
#sync-product div.dataTables_filter input{border-radius: 15px;}
|
643 |
+
.tvc-licence .input-group .form-control{height: 40px; letter-spacing: 8px; font-size: 18px;}
|
644 |
+
|
645 |
+
button#ee_submit_plugin, button#google-add{ min-width: 80px;}
|
646 |
+
button#google-add{margin-top: 20px;}
|
647 |
+
.ga-text span{font-weight:normal;}
|
648 |
+
.tvc-help-slider, .tvc-b-value-slider{
|
649 |
+
height: 120px;
|
650 |
+
padding: 0;
|
651 |
+
}
|
652 |
+
.slick-slide{
|
653 |
+
overflow-y: auto;
|
654 |
+
height: 120px;
|
655 |
+
}
|
656 |
+
.tvc-footer-links{text-align: center;}
|
657 |
+
.tvc-footer-links a{text-decoration: underline; margin-left: 5px; margin-right: 5px;}
|
658 |
+
.right-content .content-section .slick-slide img{display: inline-block;
|
659 |
+
margin: 0 3px;}
|
660 |
+
ul.nav.nav-pills.nav-justified{position: relative;}
|
661 |
+
.tvc-help-need{position: absolute; right: 15px; bottom: 15px;}
|
662 |
+
.tvc_plugin_container .container{ padding-left: 2px;}
|
663 |
+
.tvc_plugin_container{margin-top: 10px;}
|
664 |
+
|
665 |
+
img{
|
666 |
+
image-rendering: -moz-crisp-edges;
|
667 |
+
image-rendering: -o-crisp-edges;
|
668 |
+
image-rendering: -webkit-optimize-contrast;
|
669 |
+
image-rendering: crisp-edges;
|
670 |
+
-ms-interpolation-mode: nearest-neighbor;
|
671 |
+
}
|
672 |
+
.progress{background-color: #ffff; border-radius: 8px;}
|
673 |
+
/*.tvc-sync-progress-db{display: none; margin-top: 5px;}*/
|
674 |
+
.tvc-sync-progress-gmc{display: none; margin-top: 5px;}
|
675 |
+
/*.tvc-progress-info{display: none;}*/
|
676 |
+
.progress-bar-wapper{display:none;}
|
677 |
+
.tvc-sync-count{display: inline-block; text-align: left; float: left;}
|
678 |
+
.tvc-total-count{display: inline-block; text-align: right; float: right;}
|
679 |
+
.tvc-sync-message{
|
680 |
+
display: block;
|
681 |
+
font-weight: 700;
|
682 |
+
text-align: left;
|
683 |
+
margin: 0 0 10px 0;
|
684 |
+
}
|
685 |
+
.tvc-progress-info{padding: 0 5px;}
|
686 |
+
.progress-bar-wapper.open{
|
687 |
+
height: 100px;
|
688 |
+
width: 500px;
|
689 |
+
overflow: hidden;
|
690 |
+
background: #EEEEEE;
|
691 |
+
box-shadow: 0 0 10px black;
|
692 |
+
border-radius: 10px;
|
693 |
+
position: fixed;
|
694 |
+
top: 30%;
|
695 |
+
left: 50%;
|
696 |
+
margin-top: 100px;
|
697 |
+
transform: translate(-50%, -50%);
|
698 |
+
z-index: 9999;
|
699 |
+
padding: 20px;
|
700 |
+
text-align: center;
|
701 |
+
display: block;
|
702 |
+
animation: tvc_popup_box_open 0.5s;
|
703 |
+
-webkit-animation: tvc_popup_box_open 0.5s;
|
704 |
+
}
|
705 |
+
|
706 |
+
.google_conversion_label_message{
|
707 |
+
margin-top: 20px;
|
708 |
+
}
|
709 |
+
|
710 |
+
.auto_product_sync_save_button{
|
711 |
+
text-align: center;
|
712 |
+
margin-left: 80px;
|
713 |
}
|
admin/css/select2.css
CHANGED
@@ -1,109 +1,109 @@
|
|
1 |
-
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;}
|
2 |
-
.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:42px;user-select:none;-webkit-user-select:none;}
|
3 |
-
.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:15px;padding-right:35px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
4 |
-
.select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
|
5 |
-
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px;}
|
6 |
-
.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none;}
|
7 |
-
.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0;}
|
8 |
-
.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
|
9 |
-
.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all;}
|
10 |
-
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
|
11 |
-
.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051;}
|
12 |
-
.select2-results{display:block;}
|
13 |
-
.select2-results__options{list-style:none;margin:0;padding:0;}
|
14 |
-
.select2-results__option{padding:6px 14px;user-select:none;-webkit-user-select:none;}
|
15 |
-
|
16 |
-
.select2-results__option--selectable{cursor:pointer;}
|
17 |
-
.select2-container--open .select2-dropdown{left:0;}
|
18 |
-
.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
19 |
-
.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0;
|
20 |
-
box-shadow:0px 3px 6px rgba(0, 0, 0, 0.12); overflow: hidden;}
|
21 |
-
.select2-search--dropdown{display:block;padding:4px;}
|
22 |
-
.select2-search--dropdown .select2-search__field{padding:6px 9px;width:100%;background-color: #F3F3F3; border-radius: 6px; box-sizing:border-box; line-height: 18px;}
|
23 |
-
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
|
24 |
-
.select2-search--dropdown.select2-search--hide{display:none;}
|
25 |
-
.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0);}
|
26 |
-
.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important;}
|
27 |
-
.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #C6C6C6;border-radius:6px;}
|
28 |
-
.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:42px;}
|
29 |
-
.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px;}
|
30 |
-
.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;}
|
31 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;position:absolute;top:1px;right:15px;width:20px;}
|
32 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow b{border:none;height:0;left:50%;margin-left:-4px;margin-top:-4px;position:absolute;top:50%;width:0;
|
33 |
-
background-image: url(../images/select-arrow.png); width: 12px; height: 8px; background-size: 100%;}
|
34 |
-
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
|
35 |
-
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto;}
|
36 |
-
.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default;}
|
37 |
-
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none;}
|
38 |
-
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
|
39 |
-
.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative;}
|
40 |
-
.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px;}
|
41 |
-
.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px;}
|
42 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap;}
|
43 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
|
44 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0;}
|
45 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none;}
|
46 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
|
47 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
|
48 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
|
49 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto;}
|
50 |
-
.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0;}
|
51 |
-
.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default;}
|
52 |
-
.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none;}
|
53 |
-
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0;}
|
54 |
-
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
55 |
-
.select2-container--default .select2-search--dropdown .select2-search__field{border:0px solid #aaa; }
|
56 |
-
.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield;}
|
57 |
-
.select2-container--default .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
|
58 |
-
.select2-container--default .select2-results__option .select2-results__option{padding-left:1em;}
|
59 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0;}
|
60 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em;}
|
61 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em;}
|
62 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em;}
|
63 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em;}
|
64 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em;}
|
65 |
-
.select2-container--default .select2-results__option--group{padding:0;}
|
66 |
-
.select2-container--default .select2-results__option--disabled{color:#999;}
|
67 |
-
.select2-container--default .select2-results__option--selected{background-color:#E6F1FB;}
|
68 |
-
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#E6F1FB;color:#000000;}
|
69 |
-
.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;}
|
70 |
-
.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, white 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, white 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
|
71 |
-
.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;}
|
72 |
-
.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}
|
73 |
-
.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;}
|
74 |
-
.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999;}
|
75 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0);}
|
76 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}
|
77 |
-
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
|
78 |
-
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto;}
|
79 |
-
.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb;}
|
80 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none;}
|
81 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
|
82 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, white 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, white 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, white 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
|
83 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, white 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, white 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, white 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0);}
|
84 |
-
.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px;}
|
85 |
-
.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}
|
86 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}
|
87 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0;}
|
88 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
|
89 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;}
|
90 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none;}
|
91 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
|
92 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
|
93 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
|
94 |
-
.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}
|
95 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}
|
96 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
97 |
-
.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}
|
98 |
-
.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none;}
|
99 |
-
.select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}
|
100 |
-
.select2-container--classic .select2-dropdown--above{border-bottom:none;}
|
101 |
-
.select2-container--classic .select2-dropdown--below{border-top:none;}
|
102 |
-
.select2-container--classic .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
|
103 |
-
.select2-container--classic .select2-results__option--group{padding:0;}
|
104 |
-
.select2-container--classic .select2-results__option--disabled{color:grey;}
|
105 |
-
.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:white;}
|
106 |
-
.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}
|
107 |
-
.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;}
|
108 |
-
.select2-search--dropdown{position: relative;}
|
109 |
.select2-search--dropdown:before{content: ""; width: 14px; height: 14px; background-image: url(../images/search-icon.png); background-size: 100%; background-repeat: no-repeat; position: absolute; top: 50%; margin-top: -7px; right: 15px;}
|
1 |
+
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;}
|
2 |
+
.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:42px;user-select:none;-webkit-user-select:none;}
|
3 |
+
.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:15px;padding-right:35px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
4 |
+
.select2-container .select2-selection--single .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
|
5 |
+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px;}
|
6 |
+
.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none;}
|
7 |
+
.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline;list-style:none;padding:0;}
|
8 |
+
.select2-container .select2-selection--multiple .select2-selection__clear{background-color:transparent;border:none;font-size:1em;}
|
9 |
+
.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;margin-left:5px;padding:0;max-width:100%;resize:none;height:18px;vertical-align:bottom;font-family:sans-serif;overflow:hidden;word-break:keep-all;}
|
10 |
+
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
|
11 |
+
.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051;}
|
12 |
+
.select2-results{display:block;}
|
13 |
+
.select2-results__options{list-style:none;margin:0;padding:0;}
|
14 |
+
.select2-results__option{padding:6px 14px;user-select:none;-webkit-user-select:none;}
|
15 |
+
|
16 |
+
.select2-results__option--selectable{cursor:pointer;}
|
17 |
+
.select2-container--open .select2-dropdown{left:0;}
|
18 |
+
.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
19 |
+
.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0;
|
20 |
+
box-shadow:0px 3px 6px rgba(0, 0, 0, 0.12); overflow: hidden;}
|
21 |
+
.select2-search--dropdown{display:block;padding:4px;}
|
22 |
+
.select2-search--dropdown .select2-search__field{padding:6px 9px;width:100%;background-color: #F3F3F3; border-radius: 6px; box-sizing:border-box; line-height: 18px;}
|
23 |
+
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none;}
|
24 |
+
.select2-search--dropdown.select2-search--hide{display:none;}
|
25 |
+
.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0);}
|
26 |
+
.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important;}
|
27 |
+
.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #C6C6C6;border-radius:6px;}
|
28 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:42px;}
|
29 |
+
.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;padding-right:0px;}
|
30 |
+
.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999;}
|
31 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow{height:42px;position:absolute;top:1px;right:15px;width:20px;}
|
32 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b{border:none;height:0;left:50%;margin-left:-4px;margin-top:-4px;position:absolute;top:50%;width:0;
|
33 |
+
background-image: url(../images/select-arrow.png); width: 12px; height: 8px; background-size: 100%;}
|
34 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
|
35 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto;}
|
36 |
+
.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default;}
|
37 |
+
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none;}
|
38 |
+
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
|
39 |
+
.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;padding-bottom:5px;padding-right:5px;position:relative;}
|
40 |
+
.select2-container--default .select2-selection--multiple.select2-selection--clearable{padding-right:25px;}
|
41 |
+
.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;font-weight:bold;height:20px;margin-right:10px;margin-top:5px;position:absolute;right:0;padding:1px;}
|
42 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:inline-block;margin-left:5px;margin-top:5px;padding:0;padding-left:20px;position:relative;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap;}
|
43 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
|
44 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-right:1px solid #aaa;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#999;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;position:absolute;left:0;top:0;}
|
45 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus{background-color:#f1f1f1;color:#333;outline:none;}
|
46 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
|
47 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
|
48 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-left:1px solid #aaa;border-right:none;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
|
49 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__clear{float:left;margin-left:10px;margin-right:auto;}
|
50 |
+
.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0;}
|
51 |
+
.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default;}
|
52 |
+
.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none;}
|
53 |
+
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0;}
|
54 |
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
55 |
+
.select2-container--default .select2-search--dropdown .select2-search__field{border:0px solid #aaa; }
|
56 |
+
.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield;}
|
57 |
+
.select2-container--default .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
|
58 |
+
.select2-container--default .select2-results__option .select2-results__option{padding-left:1em;}
|
59 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0;}
|
60 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em;}
|
61 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em;}
|
62 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em;}
|
63 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em;}
|
64 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em;}
|
65 |
+
.select2-container--default .select2-results__option--group{padding:0;}
|
66 |
+
.select2-container--default .select2-results__option--disabled{color:#999;}
|
67 |
+
.select2-container--default .select2-results__option--selected{background-color:#E6F1FB;}
|
68 |
+
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable{background-color:#E6F1FB;color:#000000;}
|
69 |
+
.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;}
|
70 |
+
.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, white 50%, #eeeeee 100%);background-image:-o-linear-gradient(top, white 50%, #eeeeee 100%);background-image:linear-gradient(to bottom, white 50%, #eeeeee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
|
71 |
+
.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb;}
|
72 |
+
.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px;}
|
73 |
+
.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;height:26px;margin-right:20px;}
|
74 |
+
.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999;}
|
75 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0);}
|
76 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0;}
|
77 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left;}
|
78 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto;}
|
79 |
+
.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb;}
|
80 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none;}
|
81 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px;}
|
82 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, white 0%, #eeeeee 50%);background-image:-o-linear-gradient(top, white 0%, #eeeeee 50%);background-image:linear-gradient(to bottom, white 0%, #eeeeee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0);}
|
83 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eeeeee 50%, white 100%);background-image:-o-linear-gradient(top, #eeeeee 50%, white 100%);background-image:linear-gradient(to bottom, #eeeeee 50%, white 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0);}
|
84 |
+
.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0;padding-bottom:5px;padding-right:5px;}
|
85 |
+
.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb;}
|
86 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none;}
|
87 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;display:inline-block;margin-left:5px;margin-top:5px;padding:0;}
|
88 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__display{cursor:default;padding-left:2px;padding-right:5px;}
|
89 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{background-color:transparent;border:none;border-top-left-radius:4px;border-bottom-left-radius:4px;color:#888;cursor:pointer;font-size:1em;font-weight:bold;padding:0 4px;}
|
90 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555;outline:none;}
|
91 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto;}
|
92 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__display{padding-left:5px;padding-right:2px;}
|
93 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px;}
|
94 |
+
.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb;}
|
95 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0;}
|
96 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;}
|
97 |
+
.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0;}
|
98 |
+
.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none;}
|
99 |
+
.select2-container--classic .select2-dropdown{background-color:white;border:1px solid transparent;}
|
100 |
+
.select2-container--classic .select2-dropdown--above{border-bottom:none;}
|
101 |
+
.select2-container--classic .select2-dropdown--below{border-top:none;}
|
102 |
+
.select2-container--classic .select2-results > .select2-results__options{max-height:200px;overflow-y:auto;}
|
103 |
+
.select2-container--classic .select2-results__option--group{padding:0;}
|
104 |
+
.select2-container--classic .select2-results__option--disabled{color:grey;}
|
105 |
+
.select2-container--classic .select2-results__option--highlighted.select2-results__option--selectable{background-color:#3875d7;color:white;}
|
106 |
+
.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px;}
|
107 |
+
.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb;}
|
108 |
+
.select2-search--dropdown{position: relative;}
|
109 |
.select2-search--dropdown:before{content: ""; width: 14px; height: 14px; background-image: url(../images/search-icon.png); background-size: 100%; background-repeat: no-repeat; position: absolute; top: 50%; margin-top: -7px; right: 15px;}
|
admin/css/slick.css
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
-
@charset 'UTF-8';
|
2 |
-
/* Slider */
|
3 |
-
.slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
|
4 |
-
.slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0;}
|
5 |
-
.slick-list:focus{outline:none;}
|
6 |
-
.slick-list.dragging{cursor:pointer;cursor:hand;}
|
7 |
-
.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);}
|
8 |
-
.slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto;}
|
9 |
-
.slick-track:before,.slick-track:after{display:table;content:'';}
|
10 |
-
.slick-track:after{clear:both;}
|
11 |
-
.slick-loading .slick-track{visibility:hidden;}
|
12 |
-
.slick-slide{display:none;float:left;height:100%;min-height:1px;}
|
13 |
-
[dir='rtl'] .slick-slide{float:right;}
|
14 |
-
.slick-slide img{display:block;}
|
15 |
-
.slick-slide.slick-loading img{display:none;}
|
16 |
-
.slick-slide.dragging img{pointer-events:none;}
|
17 |
-
.slick-initialized .slick-slide{display:block;}
|
18 |
-
.slick-loading .slick-slide{visibility:hidden;}
|
19 |
-
.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent;}
|
20 |
-
.slick-arrow.slick-hidden{display:none;}
|
21 |
-
|
22 |
-
.slick-loading .slick-list{background:#fff url('./ajax-loader.gif') center center no-repeat; width: 42px; height: 42px; background-size: 100%;}
|
23 |
-
|
24 |
-
.slick-prev,.slick-next{font-size:0;line-height:0;position:absolute;top:50%;display:block;width:20px;height:20px;padding:0;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%);cursor:pointer;color:transparent;border:none;outline:none;background:#F1F6FA;}
|
25 |
-
.slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{color:transparent;outline:none;}
|
26 |
-
.slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1;}
|
27 |
-
.slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:.25;}
|
28 |
-
.slick-prev:before,.slick-next:before{content: ""; display: inline-block; width: 8px; height: 12px; background-size: 100%; background-repeat: no-repeat;
|
29 |
-
}
|
30 |
-
.slick-prev{left:0px;}
|
31 |
-
[dir='rtl'] .slick-prev{right:-25px;left:auto;}
|
32 |
-
.slick-prev:before{content:'←';}
|
33 |
-
[dir='rtl'] .slick-prev:before{background-image: url(../images/prev.png)}
|
34 |
-
.slick-next{right:-24px;}
|
35 |
-
[dir='rtl'] .slick-next{right:auto;left:-25px;}
|
36 |
-
.slick-next:before{background-image: url(../images/next.png)}
|
37 |
-
[dir='rtl'] .slick-next:before{content:'←';}
|
38 |
-
/* Dots */
|
39 |
-
.slick-dotted.slick-slider{margin-bottom:30px;}
|
40 |
-
.slick-dots{position:absolute;bottom:-25px;display:block;width:100%;padding:0;margin:0;list-style:none;text-align:center;}
|
41 |
-
.slick-dots li{position:relative;display:inline-block;width:20px;height:20px;margin:0 5px;padding:0;cursor:pointer;}
|
42 |
-
.slick-dots li button{font-size:0;line-height:0;display:block;width:20px;height:20px;padding:5px;cursor:pointer;color:transparent;border:0;outline:none;background:transparent;}
|
43 |
-
.slick-dots li button:hover,.slick-dots li button:focus{outline:none;}
|
44 |
-
.slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1;}
|
45 |
-
.slick-dots li button:before{font-family:'slick';font-size:6px;line-height:20px;position:absolute;top:0;left:0;width:20px;height:20px;content:'•';text-align:center;opacity:.25;color:black;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
|
46 |
-
.slick-dots li.slick-active button:before{opacity:.75;color:black;}
|
1 |
+
@charset 'UTF-8';
|
2 |
+
/* Slider */
|
3 |
+
.slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
|
4 |
+
.slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0;}
|
5 |
+
.slick-list:focus{outline:none;}
|
6 |
+
.slick-list.dragging{cursor:pointer;cursor:hand;}
|
7 |
+
.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);}
|
8 |
+
.slick-track{position:relative;top:0;left:0;display:block;margin-left:auto;margin-right:auto;}
|
9 |
+
.slick-track:before,.slick-track:after{display:table;content:'';}
|
10 |
+
.slick-track:after{clear:both;}
|
11 |
+
.slick-loading .slick-track{visibility:hidden;}
|
12 |
+
.slick-slide{display:none;float:left;height:100%;min-height:1px;}
|
13 |
+
[dir='rtl'] .slick-slide{float:right;}
|
14 |
+
.slick-slide img{display:block;}
|
15 |
+
.slick-slide.slick-loading img{display:none;}
|
16 |
+
.slick-slide.dragging img{pointer-events:none;}
|
17 |
+
.slick-initialized .slick-slide{display:block;}
|
18 |
+
.slick-loading .slick-slide{visibility:hidden;}
|
19 |
+
.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent;}
|
20 |
+
.slick-arrow.slick-hidden{display:none;}
|
21 |
+
|
22 |
+
.slick-loading .slick-list{background:#fff url('./ajax-loader.gif') center center no-repeat; width: 42px; height: 42px; background-size: 100%;}
|
23 |
+
|
24 |
+
.slick-prev,.slick-next{font-size:0;line-height:0;position:absolute;top:50%;display:block;width:20px;height:20px;padding:0;-webkit-transform:translate(0, -50%);-ms-transform:translate(0, -50%);transform:translate(0, -50%);cursor:pointer;color:transparent;border:none;outline:none;background:#F1F6FA;}
|
25 |
+
.slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{color:transparent;outline:none;}
|
26 |
+
.slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1;}
|
27 |
+
.slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:.25;}
|
28 |
+
.slick-prev:before,.slick-next:before{content: ""; display: inline-block; width: 8px; height: 12px; background-size: 100%; background-repeat: no-repeat;
|
29 |
+
}
|
30 |
+
.slick-prev{left:0px;}
|
31 |
+
[dir='rtl'] .slick-prev{right:-25px;left:auto;}
|
32 |
+
.slick-prev:before{content:'←';}
|
33 |
+
[dir='rtl'] .slick-prev:before{background-image: url(../images/prev.png)}
|
34 |
+
.slick-next{right:-24px;}
|
35 |
+
[dir='rtl'] .slick-next{right:auto;left:-25px;}
|
36 |
+
.slick-next:before{background-image: url(../images/next.png)}
|
37 |
+
[dir='rtl'] .slick-next:before{content:'←';}
|
38 |
+
/* Dots */
|
39 |
+
.slick-dotted.slick-slider{margin-bottom:30px;}
|
40 |
+
.slick-dots{position:absolute;bottom:-25px;display:block;width:100%;padding:0;margin:0;list-style:none;text-align:center;}
|
41 |
+
.slick-dots li{position:relative;display:inline-block;width:20px;height:20px;margin:0 5px;padding:0;cursor:pointer;}
|
42 |
+
.slick-dots li button{font-size:0;line-height:0;display:block;width:20px;height:20px;padding:5px;cursor:pointer;color:transparent;border:0;outline:none;background:transparent;}
|
43 |
+
.slick-dots li button:hover,.slick-dots li button:focus{outline:none;}
|
44 |
+
.slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1;}
|
45 |
+
.slick-dots li button:before{font-family:'slick';font-size:6px;line-height:20px;position:absolute;top:0;left:0;width:20px;height:20px;content:'•';text-align:center;opacity:.25;color:black;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
|
46 |
+
.slick-dots li.slick-active button:before{opacity:.75;color:black;}
|
admin/css/style.css
CHANGED
@@ -1,1382 +1,1387 @@
|
|
1 |
-
@charset "utf-8";
|
2 |
-
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
|
3 |
-
/*rc */
|
4 |
-
.tvc-pro{color: #002BFC; font-weight: 500;}
|
5 |
-
/* 11 */
|
6 |
-
/*dasboard*/
|
7 |
-
.ga_swatch{
|
8 |
-
flex: 1;
|
9 |
-
display: flex;
|
10 |
-
justify-content: flex-start;
|
11 |
-
align-items: center;
|
12 |
-
}
|
13 |
-
.ga_swatch span{
|
14 |
-
margin: 0 10px 0px 0px;
|
15 |
-
line-height: 24px;
|
16 |
-
font-size: 14px;
|
17 |
-
font-weight: 500;
|
18 |
-
color: #515151;
|
19 |
-
cursor: pointer;
|
20 |
-
}
|
21 |
-
.ga_swatch span.active{
|
22 |
-
color: #002BFC;
|
23 |
-
border-bottom: 1px solid;
|
24 |
-
}
|
25 |
-
.tvc_footer_links{display: block;}
|
26 |
-
.tvc-youtube-video{display: inline-block;}
|
27 |
-
.tvc-youtube-video span{display: block; margin-top: 22px; font-weight: 600;}
|
28 |
-
.tvc-youtube-video a{display: block; margin: 3px 5px 3px 10px;}
|
29 |
-
.rate_us{margin-right: 15px; margin-top: 3px; display: inline-block; float: right;}
|
30 |
-
.rate_us span{margin-right: 3px; /*vertical-align: bottom;*/}
|
31 |
-
.rate_us img{max-width: 120px;}
|
32 |
-
/*dasboard*/
|
33 |
-
select#tvc_conversion_tracking_type{
|
34 |
-
border: 1px solid #C6C6C6;
|
35 |
-
border-radius: 6px;
|
36 |
-
box-sizing: border-box;
|
37 |
-
cursor: pointer;
|
38 |
-
-webkit-user-select: none;
|
39 |
-
padding-right: 30px;
|
40 |
-
}
|
41 |
-
.btn-11 {
|
42 |
-
overflow: hidden;
|
43 |
-
}
|
44 |
-
.btn-11:hover{-webkit-animation: 0;}
|
45 |
-
.btn-11:before {
|
46 |
-
position: absolute;
|
47 |
-
content: '';
|
48 |
-
display: inline-block;
|
49 |
-
top: -180px;
|
50 |
-
left: 0;
|
51 |
-
width: 30px;
|
52 |
-
height: 100%;
|
53 |
-
background-color: #fff;
|
54 |
-
}
|
55 |
-
|
56 |
-
/*@-webkit-keyframes shiny-btn1 {
|
57 |
-
0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
|
58 |
-
40% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
|
59 |
-
70% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
|
60 |
-
100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
|
61 |
-
}
|
62 |
-
@-webkit-keyframes shiny-btn2 {
|
63 |
-
0% { top:74%; }
|
64 |
-
25% { top:73%; }
|
65 |
-
50% { top:72%; }
|
66 |
-
75% { top:73%; }
|
67 |
-
100% { top:74%; }
|
68 |
-
0% { right:0%; }
|
69 |
-
25% { right:-1%; }
|
70 |
-
50% { right:-3%; }
|
71 |
-
75% { right:-1%; }
|
72 |
-
100% { right:0%; }
|
73 |
-
|
74 |
-
}*/
|
75 |
-
.product_batch_size{position: relative; margin-top: 10px; float: right;}
|
76 |
-
.product_batch_size label{ margin-right: 23px;}
|
77 |
-
.update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
|
78 |
-
.tvc-notice-error {
|
79 |
-
display: block!important;
|
80 |
-
}
|
81 |
-
.configuration-section .text-right{text-align: right;}
|
82 |
-
#create_merchant_account{
|
83 |
-
background-color: #002BFC;
|
84 |
-
border-radius: 6px;
|
85 |
-
border: none;
|
86 |
-
padding: 9px 15px;
|
87 |
-
color: #ffffff;
|
88 |
-
font-size: 16px;
|
89 |
-
font-weight: 700;
|
90 |
-
min-width: 154px;
|
91 |
-
text-align: center;
|
92 |
-
height: 42px;
|
93 |
-
display: inline-flex;
|
94 |
-
align-items: center;
|
95 |
-
justify-content: center;
|
96 |
-
line-height: 24px;
|
97 |
-
}
|
98 |
-
@-webkit-keyframes tvc_popup_box_open {
|
99 |
-
0%{opacity: 0; margin-top:-20%;}
|
100 |
-
75%{margin-top: 5%;}
|
101 |
-
100%{opacity: 1;}
|
102 |
-
}
|
103 |
-
@keyframes tvc_popup_box_open {
|
104 |
-
0%{opacity: 0; margin-top:-20%;}
|
105 |
-
75%{margin-top: 5%;}
|
106 |
-
100%{opacity: 1;}
|
107 |
-
}
|
108 |
-
@-webkit-keyframes tvc_popup_box_close {
|
109 |
-
0%{opacity: 1;}
|
110 |
-
75%{opacity: 1; margin-top: : -20%;}
|
111 |
-
100%{opacity: 0;margin-top: 40%;}
|
112 |
-
}
|
113 |
-
@keyframes tvc_popup_box_close {
|
114 |
-
0%{opacity: 1;}
|
115 |
-
75%{opacity: 1; margin-top: -20%;}
|
116 |
-
100%{opacity: 0;margin-top: 40%;}
|
117 |
-
}
|
118 |
-
#tvc_onboarding_popup_box.tvc_popup_box_close, .tvc_popup_box_close{
|
119 |
-
display: none;
|
120 |
-
animation: tvc_popup_box_close 0.5s;
|
121 |
-
-webkit-animation: tvc_popup_box_close 0.5s;
|
122 |
-
-webkit-animation-fill-mode: forwards;
|
123 |
-
animation-fill-mode: forwards;
|
124 |
-
}
|
125 |
-
#tvc_onboarding_popup_box.tvc_popup_box{
|
126 |
-
overflow: hidden;
|
127 |
-
/*transform: translate(-50%, -50%);*/
|
128 |
-
z-index: 9999;
|
129 |
-
display: block;
|
130 |
-
animation: tvc_popup_box_open 0.5s;
|
131 |
-
-webkit-animation: tvc_popup_box_open 0.5s;
|
132 |
-
position: fixed;
|
133 |
-
left: 500px;
|
134 |
-
top: 10px;
|
135 |
-
}
|
136 |
-
#tvc_popup_box.tvc_popup_box {
|
137 |
-
width: 500px;
|
138 |
-
overflow: hidden;
|
139 |
-
background: #EEEEEE;
|
140 |
-
box-shadow: 0 0 10px black;
|
141 |
-
border-radius: 10px;
|
142 |
-
position: fixed;
|
143 |
-
top: 30%;
|
144 |
-
left: 50%;
|
145 |
-
margin-top: 100px;
|
146 |
-
transform: translate(-50%, -50%);
|
147 |
-
z-index: 9999;
|
148 |
-
padding: 10px;
|
149 |
-
text-align: center;
|
150 |
-
display: block;
|
151 |
-
animation: tvc_popup_box_open 0.5s;
|
152 |
-
-webkit-animation: tvc_popup_box_open 0.5s;
|
153 |
-
}
|
154 |
-
.alert-message {
|
155 |
-
text-align: right;
|
156 |
-
}
|
157 |
-
.alert {
|
158 |
-
position: relative;
|
159 |
-
padding: .75rem 1.25rem;
|
160 |
-
margin-bottom: 1rem;
|
161 |
-
border: 1px solid transparent;
|
162 |
-
border-radius: .25rem;
|
163 |
-
}
|
164 |
-
.alert-message .tvc-alert-success{display: inline-block;
|
165 |
-
border-radius: 500px;
|
166 |
-
border: 0;
|
167 |
-
padding-top: 0.5rem;
|
168 |
-
padding-bottom: 0.5rem;
|
169 |
-
color: #FFFFFF;
|
170 |
-
background-color: #66BB6A;
|
171 |
-
padding-left: 30px;
|
172 |
-
}
|
173 |
-
.alert-message .tvc-alert-error{display: inline-block;
|
174 |
-
border-radius: 500px;
|
175 |
-
border: 0;
|
176 |
-
padding-top: 0.5rem;
|
177 |
-
padding-bottom: 0.5rem;
|
178 |
-
color: #721c24;
|
179 |
-
background-color: #f8d7da;
|
180 |
-
padding-left: 30px;
|
181 |
-
}
|
182 |
-
.alert-message .tvc-alert-warning{display: inline-block;
|
183 |
-
border-radius: 500px;
|
184 |
-
border: 0;
|
185 |
-
padding-top: 0.5rem;
|
186 |
-
padding-bottom: 0.5rem;
|
187 |
-
color: #856404;
|
188 |
-
background-color: #fff3cd;
|
189 |
-
padding-left: 30px;
|
190 |
-
}
|
191 |
-
.alert-message .tvc-alert-success:after {
|
192 |
-
content: '\2713';
|
193 |
-
position: absolute;
|
194 |
-
left: 12px;
|
195 |
-
}
|
196 |
-
.alert-primary{
|
197 |
-
padding: 10px;
|
198 |
-
color: #004085;
|
199 |
-
background-color: #cce5ff;
|
200 |
-
border-color: #b8daff;
|
201 |
-
}
|
202 |
-
.update-nag, .updated, .error, .is-dismissible { display: none; }
|
203 |
-
.loader-section {
|
204 |
-
position: fixed;
|
205 |
-
top: 0;
|
206 |
-
bottom: 0;
|
207 |
-
left: 0;
|
208 |
-
right: 0;
|
209 |
-
height: 100%;
|
210 |
-
background-color: rgba(255,255,255,0.85);
|
211 |
-
display: flex;
|
212 |
-
justify-content: center;
|
213 |
-
align-items: center;
|
214 |
-
z-index: 999;
|
215 |
-
}
|
216 |
-
.loader-section img {
|
217 |
-
max-width: 50px;
|
218 |
-
}
|
219 |
-
.site-header{left: 160px !important;}
|
220 |
-
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
221 |
-
#tvc_merchant_section{display: flex; align-items: center;}
|
222 |
-
/*google button*/
|
223 |
-
.google-btn {
|
224 |
-
margin: 0 auto;
|
225 |
-
width: 184px;
|
226 |
-
height: 42px;
|
227 |
-
background-color: #4285f4;
|
228 |
-
border-radius: 2px;
|
229 |
-
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
|
230 |
-
margin-bottom: 15px;
|
231 |
-
}
|
232 |
-
.google-btn .google-icon-wrapper {
|
233 |
-
position: absolute;
|
234 |
-
margin-top: 1px;
|
235 |
-
margin-left: 1px;
|
236 |
-
width: 40px;
|
237 |
-
height: 40px;
|
238 |
-
border-radius: 2px;
|
239 |
-
background-color: #fff;
|
240 |
-
}
|
241 |
-
.google-btn .google-icon {
|
242 |
-
position: absolute;
|
243 |
-
margin-top: 11px;
|
244 |
-
margin-left: 11px;
|
245 |
-
width: 18px;
|
246 |
-
height: 18px;
|
247 |
-
}
|
248 |
-
.google-btn .btn-text {
|
249 |
-
float: right;
|
250 |
-
margin: 11px 11px 0 0;
|
251 |
-
color: #fff;
|
252 |
-
font-size: 14px;
|
253 |
-
letter-spacing: 0.2px;
|
254 |
-
font-family: "Roboto";
|
255 |
-
}
|
256 |
-
.google-btn:hover {
|
257 |
-
box-shadow: 0 0 6px #4285f4;
|
258 |
-
cursor: pointer;
|
259 |
-
}
|
260 |
-
.google-btn:active {
|
261 |
-
background: #1669f2;
|
262 |
-
}
|
263 |
-
.google-btn .btn-text.mr-35{margin-right: 35px;}
|
264 |
-
|
265 |
-
/*google button*/
|
266 |
-
#tvc_popup_box span.google_connect_url{
|
267 |
-
cursor: pointer;
|
268 |
-
color: #7B5DFC;
|
269 |
-
}
|
270 |
-
/*.google_connect_url{
|
271 |
-
display: block;
|
272 |
-
background: white;
|
273 |
-
color: #444;
|
274 |
-
width: 200px;
|
275 |
-
border-radius: 5px;
|
276 |
-
border: thin solid #888;
|
277 |
-
box-shadow: 1px 1px 1px grey;
|
278 |
-
white-space: nowrap;
|
279 |
-
margin: 0 auto;
|
280 |
-
margin-bottom: 8px;
|
281 |
-
}
|
282 |
-
.google_connect_url:hover {
|
283 |
-
cursor: pointer;
|
284 |
-
}
|
285 |
-
.google_connect_url img {width: 30px;
|
286 |
-
height: 30px;
|
287 |
-
margin: 8px; display: inline-block;
|
288 |
-
vertical-align: middle;}
|
289 |
-
.google_connect_url span {
|
290 |
-
display: inline-block;
|
291 |
-
vertical-align: middle;
|
292 |
-
padding-left: 5px;
|
293 |
-
padding-right: 5px;
|
294 |
-
font-size: 14px;
|
295 |
-
font-weight: bold;
|
296 |
-
|
297 |
-
}
|
298 |
-
*/
|
299 |
-
#tvc_ads_skip_confirm ul{ padding: 0;
|
300 |
-
margin: 0;
|
301 |
-
list-style: auto;
|
302 |
-
margin-left: 20px;}
|
303 |
-
#tvc_ads_skip_confirm ul li{font-size: 15px;
|
304 |
-
line-height: 22px;
|
305 |
-
margin-bottom: 5px;}
|
306 |
-
.cstmcheck-item-pro img{position: absolute;
|
307 |
-
left: -2px;
|
308 |
-
top: 0;}
|
309 |
-
.cstmcheck-item-pro label{padding-left: 13px !important;}
|
310 |
-
|
311 |
-
/*dashboad*/
|
312 |
-
.dashbrdpage-wrap .loading-bg-effect{
|
313 |
-
font-size: 0;
|
314 |
-
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
|
315 |
-
background-size: 400% 400%;
|
316 |
-
animation: gradient 15s ease infinite;
|
317 |
-
min-width: 30px;
|
318 |
-
}
|
319 |
-
#add_loading{height: 50px;}
|
320 |
-
.dashbrdpage-wrap .is_loading, .pmax-campaign .is_loading{
|
321 |
-
background: rgba(255,255,255,0.65) url('../images/ajax-loader.gif') no-repeat 50% 50%;
|
322 |
-
-webkit-transition: background-color 0;
|
323 |
-
transition: background-color 0;
|
324 |
-
background-size: 50px;
|
325 |
-
}
|
326 |
-
.pp-modal .is_loading{
|
327 |
-
background: rgba(255,255,255,0.65) url('../images/ajax-loader.gif') no-repeat 50% 50%;
|
328 |
-
-webkit-transition: background-color 0;
|
329 |
-
transition: background-color 0;
|
330 |
-
background-size: 50px;
|
331 |
-
opacity: 0.5;
|
332 |
-
cursor: not-allowed;
|
333 |
-
}
|
334 |
-
.dashbrdpage-wrap .loading-bg-effect img{display: none;}
|
335 |
-
@keyframes gradient {
|
336 |
-
0% {
|
337 |
-
background-position: 0% 50%;
|
338 |
-
}
|
339 |
-
50% {
|
340 |
-
background-position: 100% 50%;
|
341 |
-
}
|
342 |
-
100% {
|
343 |
-
background-position: 0% 50%;
|
344 |
-
}
|
345 |
-
}
|
346 |
-
.product_performance_report table, .medium_performance_report table, .campaign_performance_report table{min-height: 200px;}
|
347 |
-
|
348 |
-
.errmscntbx .tvc-nb-spinner {
|
349 |
-
display: inline-block;
|
350 |
-
position: absolute;
|
351 |
-
top: 32px;
|
352 |
-
right: 22px;
|
353 |
-
margin-left: 10px;
|
354 |
-
width: 30px;
|
355 |
-
height: 30px;
|
356 |
-
background: transparent;
|
357 |
-
border-top: 3px solid #0769D7;
|
358 |
-
border-right: 3px solid transparent;
|
359 |
-
border-radius: 50%;
|
360 |
-
-webkit-animation: 1s spin linear infinite;
|
361 |
-
animation: 1s tvc-spin linear infinite;
|
362 |
-
}
|
363 |
-
/*onboarding page*/
|
364 |
-
.tvc-dropdown{
|
365 |
-
max-width: 400px;
|
366 |
-
display: block;
|
367 |
-
position: relative;
|
368 |
-
}
|
369 |
-
|
370 |
-
.tvc-dropdown-content{
|
371 |
-
display: none;
|
372 |
-
border-top: none;
|
373 |
-
border-top-left-radius: 0;
|
374 |
-
border-top-right-radius: 0;
|
375 |
-
box-shadow: 0px 3px 6px rgb(0 0 0 / 12%);
|
376 |
-
overflow: hidden;
|
377 |
-
}
|
378 |
-
.tvc-select-items {
|
379 |
-
height: 150px;
|
380 |
-
overflow-y: auto;
|
381 |
-
|
382 |
-
left: 0;
|
383 |
-
right: 0;
|
384 |
-
z-index: 99;
|
385 |
-
}
|
386 |
-
.tvc-dropdown-content .tvc-select-items .option, .tvc-dropdown-content .option, .tvc-dropdown-content .tvc-select-items option{
|
387 |
-
padding: 6px 14px;
|
388 |
-
user-select: none;
|
389 |
-
-webkit-user-select: none;
|
390 |
-
cursor: pointer;
|
391 |
-
margin-bottom: 6px;
|
392 |
-
white-space: normal; /* collapse WS, wrap as necessary, collapse LB */
|
393 |
-
white-space: nowrap; /* collapse WS, no wrapping, collapse LB */
|
394 |
-
white-space: pre; /* preserve WS, no wrapping, preserve LB */
|
395 |
-
white-space: pre-wrap; /* preserve WS, wrap as necessary, preserve LB */
|
396 |
-
white-space: inherit; /* all as parent element */
|
397 |
-
}
|
398 |
-
|
399 |
-
.tvc-dropdown-content .tvc-select-items .option:hover, .tvc-dropdown-content .tvc-select-items option:hover, .tvc-dropdown-content .option:hover{
|
400 |
-
background-color: lightgray;
|
401 |
-
}
|
402 |
-
|
403 |
-
.tvc-dropdown-header{
|
404 |
-
padding: 2px 10px;
|
405 |
-
background-color: #fff;
|
406 |
-
border: 1px solid #C6C6C6;
|
407 |
-
border-radius: 6px;
|
408 |
-
box-sizing: border-box;
|
409 |
-
cursor: pointer;
|
410 |
-
display: block;
|
411 |
-
height: 42px;
|
412 |
-
user-select: none;
|
413 |
-
-webkit-user-select: none;
|
414 |
-
top: 50%;
|
415 |
-
width: 400px;
|
416 |
-
vertical-align: middle;
|
417 |
-
display: table-cell;
|
418 |
-
}
|
419 |
-
.tvc-dropdown-content .tvc-ga4-option-more, .tvc-dropdown-content .tvc-ua-option-more{
|
420 |
-
text-decoration: none;
|
421 |
-
color: #002BFC;
|
422 |
-
margin-bottom: 0;
|
423 |
-
}
|
424 |
-
.tvc-dropdown .tvc-dropdown-header:before, .tvc-dropdown .tvc-dropdown-header:before {
|
425 |
-
content: "";
|
426 |
-
background-image: url(../images/step-down-arrow.png);
|
427 |
-
width: 24px;
|
428 |
-
height: 24px;
|
429 |
-
background-repeat: no-repeat;
|
430 |
-
background-size: 100%;
|
431 |
-
position: absolute;
|
432 |
-
right: 10px;
|
433 |
-
top: 22px;
|
434 |
-
transform: translateY(-50%);
|
435 |
-
}
|
436 |
-
/*end onboarding page*/
|
437 |
-
.fa-check-circle:before{content:"";background-image:url(../images/icon/tick-round.svg);width:24px;height:24px;background-repeat:no-repeat;background-size:100%; display: block; margin: 0 auto;}
|
438 |
-
.fa-exclamation-circle:before{content:"";background-image:url(../images/exclaimation.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;display: block; margin: 0 auto;}
|
439 |
-
.fa-question-circle:before{content:"";background-image:url(../images/help-icon.png);width:16px;height:16px;background-repeat:no-repeat;background-size:100%;position:absolute;}
|
440 |
-
|
441 |
-
.form-check .form-check-input{
|
442 |
-
height: 1em;
|
443 |
-
margin-top: 0.25em;
|
444 |
-
vertical-align: top;
|
445 |
-
background-color: #fff;
|
446 |
-
background-repeat: no-repeat;
|
447 |
-
background-size: contain;
|
448 |
-
border: 1px solid rgba(0,0,0,.25);
|
449 |
-
-webkit-appearance: none;
|
450 |
-
-moz-appearance: none;
|
451 |
-
appearance: none;
|
452 |
-
-webkit-print-color-adjust: exact;
|
453 |
-
}
|
454 |
-
.form-check-input:checked {
|
455 |
-
background-color: #0d6efd;
|
456 |
-
border-color: #0d6efd;
|
457 |
-
}
|
458 |
-
.form-switch .form-check-input:checked::before{
|
459 |
-
content: none;
|
460 |
-
}
|
461 |
-
.select2-container--open{
|
462 |
-
z-index: 9999;
|
463 |
-
}
|
464 |
-
/*rc */
|
465 |
-
|
466 |
-
/* comman style----------------------*/
|
467 |
-
body{margin:0;padding:0;font-family:'Roboto', sans-serif;font-size:14px;color:#515151;scroll-behavior:smooth;overflow-x:hidden;font-weight:normal;}
|
468 |
-
a{text-decoration:none;color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
469 |
-
a:hover{color:#1E1E1E;text-decoration:none;}
|
470 |
-
a:focus{outline:none;text-decoration:none;}
|
471 |
-
:focus{outline:none;}
|
472 |
-
h1,h2,h3,h4,h5,h6{margin:0 0 10px 0;color:#1E1E1E;padding:0;line-height:1.2;font-family:'Roboto', sans-serif;text-transform:none;font-weight:700;}
|
473 |
-
h1{font-size:36px;}
|
474 |
-
h2{font-size:30px; line-height: 42px;}
|
475 |
-
h3{font-size:24px;}
|
476 |
-
h4{font-size:18px;line-height:24px;}
|
477 |
-
h5{font-size:16px; line-height: 24px;}
|
478 |
-
h6{font-size:14px;line-height:22px;}
|
479 |
-
h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:inherit;text-decoration:none;font-size:inherit;}
|
480 |
-
h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{text-decoration:none;}
|
481 |
-
small{display:block;margin-top:4px;}
|
482 |
-
p{margin:0 0 20px 0;line-height:22px;}
|
483 |
-
ul, ol{margin:0;}
|
484 |
-
button{font-family:'Roboto', sans-serif;cursor:pointer;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;line-height:1; box-shadow:none;}
|
485 |
-
strong, b{font-weight:600;}
|
486 |
-
*,::after,::before{box-sizing:border-box;}
|
487 |
-
select{-moz-appearance:none;-webkit-appearance:none;background-image:url(../images/selectarrow-new.png);background-repeat:no-repeat;background-position:right center;border:1px solid #C6C6C6;border-radius:6px;}
|
488 |
-
img{image-rendering: -moz-crisp-edges;image-rendering: -o-crisp-edges;image-rendering: -webkit-optimize-contrast;
|
489 |
-
image-rendering: crisp-edges;-ms-interpolation-mode: nearest-neighbor;
|
490 |
-
}
|
491 |
-
.container{max-width:1170px;margin:0 auto;padding:0 15px;}
|
492 |
-
.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
|
493 |
-
.primary-c{color:#002BFC;}
|
494 |
-
.primary-bg{background-color:#002BFC;}
|
495 |
-
/*------ onboarding page ------*/
|
496 |
-
.onbordingbody{padding-top: 54px;}
|
497 |
-
/*----- onboarding header ------*/
|
498 |
-
.site-header{padding:12px 0;background-color:#ffffff;position:fixed;z-index:10;top:0;left:0;width:100%;height:54px;box-shadow:0px 1px 6px rgba(0, 0, 0, 0.12);}
|
499 |
-
.brand{max-width:138px;}
|
500 |
-
.brand img{max-width:138px;}
|
501 |
-
/*---- onborading style ------*/
|
502 |
-
.onbording-wrapper{padding:30px 0;}
|
503 |
-
.smallcontainer{max-width:881px;margin:0 0 0 auto;}
|
504 |
-
.onbordingtop{max-width:622px;padding:0 35px;text-align:center;margin-bottom:24px;}
|
505 |
-
.onbordingtop h2{line-height:35px;margin-bottom:10px;}
|
506 |
-
.onbordingtop p{font-size:16px;line-height:24px;margin-bottom:0px;}
|
507 |
-
.onboardingstepwrap{max-width:622px;width:100%;flex:1;padding:0 15px}
|
508 |
-
.onbordording-step{border:1px solid #E9E9E9;border-radius:6px;margin-bottom:15px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
509 |
-
.selectedactivestep{border:2px solid #2FBB0E;}
|
510 |
-
.stepleftround{max-width:42px;height:42px;display:flex;justify-content:center;align-items:center;border:1px dashed #C6C6C6;border-radius:100%;flex:0 0 42px;margin-right:24px;}
|
511 |
-
.stepleftround img{opacity:0;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
512 |
-
.selectedactivestep .stepleftround{background-color:#2FBB0E;border:1px solid #2FBB0E;}
|
513 |
-
.selectedactivestep .stepleftround img{opacity:1;}
|
514 |
-
.helpicon{margin-left:8px;display:inline-block;margin-top:-1px;vertical-align:top;}
|
515 |
-
.helpicon img{vertical-align:middle;}
|
516 |
-
.stepdtltop{display:flex;cursor:pointer;align-items:center;padding:24px 60px 24px 24px;position:relative;}
|
517 |
-
.stepdtltop:before{content:"";background-image:url(../images/step-down-arrow.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;position:absolute;right:30px;top:50%;transform:translateY(-50%);}
|
518 |
-
.stepdetwrap p{margin-bottom:0px;}
|
519 |
-
.stepdtltop h4{line-height:24px;font-weight:500;margin-bottom:8px;}
|
520 |
-
.stepmoredtlwrp{height:0;opacity:0;overflow:hidden;visibility:hidden;padding-left:90px;padding-right:60px;transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
|
521 |
-
.stepmoredtl{padding-top:24px;padding-bottom:24px;border-top:1px solid #E9E9E9;}
|
522 |
-
.activestep .stepmoredtlwrp{height:auto;opacity:1;visibility:visible;}
|
523 |
-
.activestep .stepdtltop:before{background-image:url(../images/step-up-arrow.png);}
|
524 |
-
.stepmoredtl h5{font-weight:500;margin-bottom:12px;}
|
525 |
-
input[type="radio"], input[type="checkbox"]{margin:0;}
|
526 |
-
/*----custom radio -----*/
|
527 |
-
.cstmrdobtn-item{margin-bottom:10px;}
|
528 |
-
.cstmrdobtn-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
529 |
-
.cstmrdobtn-item input[type="radio"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
530 |
-
.cstmrdobtn-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:100%;background-color:transparent;}
|
531 |
-
.cstmrdobtn-item .checkmark:after{content:"";position:absolute;opacity:0;left:2px;top:5px;width:12px;height:12px;background:#002BFC;border-radius:100%;-webkit-transform:scale(0);transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
532 |
-
.cstmrdobtn-item input[type="radio"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);}
|
533 |
-
/*----custom checkbox -----*/
|
534 |
-
.cstmcheck-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none; min-height:20px;}
|
535 |
-
.cstmcheck-item input[type="checkbox"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
536 |
-
.cstmcheck-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:3px;background-color:#ffffff;border-color:#C6C6C6;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
537 |
-
.cstmcheck-item .checkmark:after{content:"";position:absolute;opacity:1;left:2px;top:5px;width:12px;height:10px;background-image:url(../images/check-active.png);background-repeat:no-repeat;background-size:100%;-webkit-transform:scale(0);transform:scale(0);-ms-transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
538 |
-
.cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:before{background-color:#002BFC;border-color:#002BFC;}
|
539 |
-
.cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);-ms-transform:scale(1);}
|
540 |
-
|
541 |
-
.form-row{margin-bottom:24px;}
|
542 |
-
.chckbxbgbx{background-color:#F1F6FA;padding:13px 15px;border-radius:6px;display:flex;}
|
543 |
-
.chckbxbgbx .cstmcheck-item{margin-right:30px;}
|
544 |
-
.chckbxbgbx .cstmcheck-item:last-child{margin-right:0px;}
|
545 |
-
.stepnextbtn{display:inline-block;width:154px;height:42px;background-color:#2FBB0E;text-align:center;padding:10px;border-radius:6px;color:#ffffff;font-size:16px;font-weight:700;box-shadow:none;border:none;cursor:pointer;}
|
546 |
-
.stepnextbtn:hover{background-color:#28d000;color:#ffffff;}
|
547 |
-
|
548 |
-
.slctunivr-filed{padding-left:25px;margin-top:12px;}
|
549 |
-
.slect2bx{border:1px solid #C6C6C6;width:258px;height:42px;}
|
550 |
-
.botslectbxitem{margin-bottom:9px;}
|
551 |
-
.botslectbxitem:last-child{margin-bottom:0px;}
|
552 |
-
.selcttopwrap{display:flex;align-items:center;margin-bottom:24px;}
|
553 |
-
.orwrp{padding:0 18px;font-size:16px;line-height:24px;color:#515151;}
|
554 |
-
.cretnewbtn{background-color:transparent;cursor:pointer;padding:0;border:none;box-shadow:none;color:#002BFC;font-size:16px;line-height:24px;}
|
555 |
-
.cretnewbtn:hover{color:#000000;}
|
556 |
-
.cretnewbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
557 |
-
.dsplcolmview{flex-direction:column;}
|
558 |
-
.dsplcolmview .cstmcheck-item{margin-bottom:9px;}
|
559 |
-
.dsplcolmview .cstmcheck-item:last-child{margin-bottom:0px;}
|
560 |
-
.stepnotewrp{margin-bottom:24px;color:#515151;margin-left:-65px;margin-right:-32px;padding-top:15px;border-top:1px solid #E9E9E9;font-size:10px;line-height:16px;}
|
561 |
-
.onbording-right{max-width:289px;flex:1;padding:0 15px;}
|
562 |
-
.sidebrcontainer{position:sticky;top:84px;}
|
563 |
-
.onbrd-rdmbx{background-color:#FBF7EE;padding:22px 24px;border-radius:6px;margin-bottom:24px;}
|
564 |
-
.rdm-amnt{font-size:42px;line-height:50px;letter-spacing:-0.06em;color:#002BFC;font-weight:700;margin-bottom:18px;}
|
565 |
-
.rdm-amnt small{color:#1E1E1E;font-size:14px;line-height:22px;letter-spacing:0;font-weight:400;}
|
566 |
-
.lrnmorbtn{text-align:right;display:inherit;}
|
567 |
-
.lrnmorbtn img{vertical-align:middle;}
|
568 |
-
.lrnmorbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
569 |
-
.onbrdrgt-nav ul{margin:0;padding:0;list-style:none;}
|
570 |
-
.onbrdrgt-nav ul li{padding:0 24px;margin-bottom:9px;}
|
571 |
-
.onbrdrgt-nav ul li a{display:inline-block;line-height:22px;text-decoration:none;color:#1E1E1E;text-decoration:underline;}
|
572 |
-
.onbrdrgt-nav ul li a:hover{color:#000000;text-decoration:none}
|
573 |
-
/*--- popoup style -----*/
|
574 |
-
.onbrd-popupwrp{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
575 |
-
.onbrdppmain{display:flex;width:100%;height:100%;padding:30px 15px;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.6);}
|
576 |
-
.onbrdnpp-cntner{background-color:#ffffff;border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);max-height:100%;overflow:auto;}
|
577 |
-
.onbrdnpp-hdr{padding:15px 40px 15px 15px;border-bottom:1px solid #E9E9E9;position:relative;}
|
578 |
-
.onbrdnpp-hdr h4{margin-bottom:0px;font-weight:500;}
|
579 |
-
.onbrdpp-body{padding:15px;font-size:
|
580 |
-
.onbrdpp-body p{line-height:24px;}
|
581 |
-
.onbrdpp-body p:last-child{margin-bottom:0px; padding-left:1rem; }
|
582 |
-
.onbrdpp-body p strong{color:#1e1e1e;}
|
583 |
-
.onbrdpp-body h5{margin-bottom:15px;}
|
584 |
-
.onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
|
585 |
-
.onbrdpp-body ul li, .onbrdpp-body ol li{font-size:16px;line-height:24px;margin-bottom:12px;}
|
586 |
-
.onbrdpp-body ul li:last-child, .onbrdpp-body ol li:last-child{margin-bottom:0px;}
|
587 |
-
.onbrdpp-body ol{padding-left:20px;}
|
588 |
-
.onbrdpp-body ol li{padding-left:5px;}
|
589 |
-
.onbrdpp-body em{font-weight:500;font-style:italic;color:#1e1e1e;}
|
590 |
-
.ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
|
591 |
-
.ggladsppcntnr{width:100%;max-width:390px;}
|
592 |
-
.ppfooterbtn{padding:15px 15px 24px;}
|
593 |
-
.ppblubtn{background-color:#002BFC;border-radius:6px;border:none;padding:9px 15px;color:#ffffff;font-size:16px;font-weight:700;min-width:154px;text-align:center;height:42px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
|
594 |
-
.ppblubtn:hover{background-color:#0022c7;}
|
595 |
-
.showpopup{opacity:1;visibility:visible;}
|
596 |
-
.scrlnone{overflow:hidden;}
|
597 |
-
.acccretppcntnr{width:100%;max-width:592px;}
|
598 |
-
.congratppcntnr{width:100%;max-width:592px;}
|
599 |
-
.cngrtppdtl-item{display:flex;justify-content:space-between;margin-bottom:9px;color:#515151;font-size:14px;line-height:22px;}
|
600 |
-
.congratppbody{max-width:454px;margin:0 auto;text-align:center;}
|
601 |
-
.cngtrpplft{position:relative;padding-left:22px;}
|
602 |
-
.cngrtchckicon{position:absolute;left:0;top:3px;}
|
603 |
-
.cngtrpprgt{text-align:right;font-weight:700; flex: 1 1 0px;}
|
604 |
-
.congratppcntnr .ppfooterbtn{text-align:center;}
|
605 |
-
.congratppcntnr .onbrdnpp-hdr{padding-top:30px;padding-left:40px;text-align:center;border-bottom:none;}
|
606 |
-
.congratppcntnr .onbrdnpp-hdr h2{font-size:42px;margin-bottom:0px;line-height:48px;background-color:#002BFC;background-image:linear-gradient(45deg, #002BFC, #00D2F6);background-size:100%;background-repeat:repeat;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-moz-background-clip:text;-moz-text-fill-color:transparent;}
|
607 |
-
/*--- create merchnat popup -----*/
|
608 |
-
.crtemrchntpp .onbrdppmain{background-color:#ffffff;display:inherit;}
|
609 |
-
.crtemrchntppcntnr{width:100%;padding:0px 20px;box-shadow:none;}
|
610 |
-
.crtemrchntpp .onbrdpp-body{max-width:780px;margin:0 auto;padding:0 15px;font-size:14px;line-height:22px;}
|
611 |
-
.crtemrchntpp .onbrdpp-body h4{margin-bottom:9px;color:#1e1e1e}
|
612 |
-
.crtemrchnpp-lft{padding-right:15px;max-width:506px;border-right:1px solid #E9E9E9;}
|
613 |
-
.crtemrchnpp-right{padding-left:15px;max-width:273px;}
|
614 |
-
.crtemrchnpp-lft .ppfooterbtn{padding:0;}
|
615 |
-
.crtemrchpplft-top p{line-height:22px;color:#515151;margin-bottom:0px;}
|
616 |
-
.claimedbx{padding:10px 15px;border-radius:6px;background-color:#F3F0E4;color:#1E1E1E;font-weight:500;margin-top:24px;}
|
617 |
-
.mrchntformwrp{margin-top:15px;}
|
618 |
-
.fromfiled{border:1px solid #C6C6C6;border-radius:6px;width:100%; max-width:258px;line-height:22px;font-size:14px;height:42px;padding:10px 15px;color:#1E1E1E;font-family:'Roboto', sans-serif;}
|
619 |
-
.fromfiled::-webkit-input-placeholder{color:#B6B6B6;opacity:1;}
|
620 |
-
.fromfiled::-moz-placeholder{color:#B6B6B6;opacity:1;}
|
621 |
-
.fromfiled:-ms-input-placeholder{color:#B6B6B6;opacity:1;}
|
622 |
-
.fromfiled:-moz-placeholder{color:#B6B6B6;opacity:1;}
|
623 |
-
.mt15{margin-top:15px;}
|
624 |
-
.crtemrchnpp-lft .cstmcheck-item{font-size:12px;}
|
625 |
-
.crtemrchnpp-lft .cstmcheck-item label{font-size:12px;line-height:22px;}
|
626 |
-
.cstmcheck-item strong{color:#1e1e1e;font-weight:500;}
|
627 |
-
.inputinfotxt{margin-top:6px;font-size:12px;line-height:18px;color:#515151}
|
628 |
-
.crtemrchnpp-right h6{font-weight:500;margin-bottom:0;}
|
629 |
-
.crtemrchnpp-right ul{margin:18px 0 0 0;padding:0;list-style:none}
|
630 |
-
.crtemrchnpp-right ul li{margin-bottom:9px;font-size:14px;line-height:22px;}
|
631 |
-
.congratppdtlwrp{text-align:left;}
|
632 |
-
/*---- alert bx ----*/
|
633 |
-
.alertbx{padding:15px 42px 15px 15px;opacity:0;width:90%;visibility:hidden;z-index:11;position:fixed;max-width:592px;font-size:16px;border-radius:6px;line-height:24px;box-shadow:0px 3px 6px rgba(0, 0, 0, 0.18);top:0;left:50%;transform:translateX(-50%);-ms-transform:translateX(-50%);-webkit-transform:translateX(-50%);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
634 |
-
.alertbx.show{top:35px;opacity:1;visibility:visible;}
|
635 |
-
.bluealertbx{background-color:#002BFC;color:#ffffff;}
|
636 |
-
.alertclsbtn{cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);}
|
637 |
-
|
638 |
-
/* --- all other pages cooman style ------*/
|
639 |
-
.trnseffect{transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
640 |
-
.container-fluid{width:100%;margin:0 auto;padding:0 15px;}
|
641 |
-
.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
|
642 |
-
.cvrs-btn{border-radius:100px;border:none;box-shadow:none;padding:9px 24px;font-weight:500;}
|
643 |
-
.greenbtn{background-color:#CAF8BF;color:#2FBB0E;}
|
644 |
-
.greenbtn:hover{background-color:#2FBB0E;color:#ffffff;}
|
645 |
-
.upgradebtn{background-color:#FBC53B;border-radius:6px;color:#1E1E1E;padding:9px 24px;border:none;line-height:24px;height:42px;font-size:16px;font-weight:500;text-align:center;}
|
646 |
-
.upgradebtn:hover{background-color:#1E1E1E;color:#ffffff;}
|
647 |
-
.bodyrightpart{padding:20px;background-color:#f1f1f1;}
|
648 |
-
|
649 |
-
/*----- promotion band -----*/
|
650 |
-
.promobandtop{padding:6px 0px;margin-bottom:24px;background:#002bfc;background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);}
|
651 |
-
.promobandtop .row{align-items:center;}
|
652 |
-
.promoleft{padding:0 15px;flex:1;}
|
653 |
-
.promobandmsg{font-size:14px;color:#ffffff;line-height:22px;}
|
654 |
-
.promoright{display:flex;padding:0 20px 0 15px;align-items:center;max-width:171px}
|
655 |
-
.prmoupgrdbtn .upgradebtn{font-size:14px;height:30px;padding-top:5px;padding-bottom:5px;line-height:22px;}
|
656 |
-
.prmoclsbtn{margin-left:20px;cursor:pointer;line-height:0;}
|
657 |
-
/*----- error msg top -----*/
|
658 |
-
.errormsgtopbx{margin-bottom:24px}
|
659 |
-
.errmscntbx{border-radius:300px;display:inline-flex;flex-wrap:wrap;align-items:center;padding:6px 15px;box-shadow:0px 1px 12px rgba(0, 0, 0, 0.06);background-color:#ffffff;font-size:14px;line-height:22px;}
|
660 |
-
.errmsgicon{margin-right:6px;line-height:0px;min-width:20px;vertical-align:middle;}
|
661 |
-
.errmsglft{color:#FA424D;display:flex;align-items:center;}
|
662 |
-
.errmsgright{border-left:1px solid #C6C6C6;padding-left:15px;margin-left:45px;}
|
663 |
-
.errmsgright a{color:#0083FC;}
|
664 |
-
.errmsgright a:hover{color:#1e1e1e;}
|
665 |
-
|
666 |
-
/*---- header ----*/
|
667 |
-
.header{padding:24px 20px 20px 20px;background-color:#ffffff;border-radius:6px;position:relative;}
|
668 |
-
.hdrtpleft{display:flex;padding:0 15px;align-items:center;max-width:66.6666%;flex:0 0 66.66666%;}
|
669 |
-
.brandlogo{line-height:0}
|
670 |
-
.brandlogo img{max-width:138px;}
|
671 |
-
.hdrcntcbx{padding-left:15px;margin-left:15px;border-left:1px solid #C6C6C6;font-size:14px;line-height:22px;}
|
672 |
-
.hdrcntcbx span{color:#0083FC;display:inline-block;}
|
673 |
-
.hdrtpright{display:flex;padding:0 15px;max-width:33.333333%;flex:0 0 33.33333%;justify-content:flex-end;}
|
674 |
-
.hustleplanbtn .cvrs-btn{font-size:12px;padding:6px 12px;}
|
675 |
-
.hdrnotiwrp{display:flex;margin-left:22px;align-items:flex-start;}
|
676 |
-
.notialrt{background-color:#FA424D;color:#ffffff;font-size:10px;line-height:12px;border-radius:30px;padding:2px 4px 2px;margin-left:-10px;}
|
677 |
-
|
678 |
-
.mblhdrcntcbx{display: none; flex: 0 0 100%; max-width: 100%;}
|
679 |
-
|
680 |
-
/*------ sync product style start -----*/
|
681 |
-
|
682 |
-
/*---- navinfo section ------*/
|
683 |
-
.navinfowrap{margin-top:20px;}
|
684 |
-
.navinfotopnav{padding:16px 0px 0;background-color: #ffffff; border-bottom:1px solid #E9E9E9; position: sticky; top: 0; z-index: 2;
|
685 |
-
overflow: hidden; border-radius:6px 6px 0 0;
|
686 |
-
}
|
687 |
-
.navinfotopnav ul{margin:0;padding:0;list-style:none;display:inline-flex;flex-wrap:wrap}
|
688 |
-
.navinfotopnav ul li a{padding:0 15px 16px;display:flex;align-items:center;position:relative;font-size:16px;font-weight:500;line-height:1;color:#515151;}
|
689 |
-
.navinfotopnav ul li a:before{content:"";opacity:0;position:absolute;left:0;bottom:-1px;width:100%;height:2px;background-color:#515151;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
690 |
-
.navinfoicon{margin-right:8px;line-height:0;}
|
691 |
-
.navinfotopnav ul li a:hover:before{opacity:1;}
|
692 |
-
.navinfotopnav ul li.active a{color: #002BFC}
|
693 |
-
.navinfotopnav ul li.active a:before{opacity:1;background-color:#002BFC;}
|
694 |
-
.navifosummary{padding:20px; background-color: #ffffff; border-radius: 0 0 6px 6px;}
|
695 |
-
.navifosummary .row{margin-left:-10px;margin-right:-10px;}
|
696 |
-
.navsmryitem{max-width:20%;flex:0 0 20%;padding:0 10px;}
|
697 |
-
.navsmrybx{background-color:#ffffff;border-radius:6px;box-shadow:0px 1px 9px rgba(0, 0, 0, 0.15);padding:24px;min-height:124px}
|
698 |
-
.navsmrysmalltxt{color:#515151;margin-bottom:6px;}
|
699 |
-
.navsmrybigtxt{font-size:42px;color:#1e1e1e;font-weight:500;line-height:48px;}
|
700 |
-
|
701 |
-
/*---- scalability banner ------*/
|
702 |
-
.scalability-wrp{margin-top:24px;}
|
703 |
-
.scalabilitybx{background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);padding:30px 25px;}
|
704 |
-
.col-padd{padding:0 15px;}
|
705 |
-
.scalabilitybx .row{align-items:center;}
|
706 |
-
.w750container{max-width:780px;margin:0 auto;}
|
707 |
-
.sclabilityleft{max-width:465px;}
|
708 |
-
.sclabilityright{max-width:331px;padding-left:41px}
|
709 |
-
.sclabilityleft h2{color:#ffffff;line-height:38px;margin-bottom:12px;}
|
710 |
-
.sclabilityleft p{font-size:16px;line-height:24px;color:#ffffff;}
|
711 |
-
.sclabilitybtnarea .upgradebtn{min-width:200px;}
|
712 |
-
|
713 |
-
/*------ syncproduct section -------*/
|
714 |
-
.syncprodt-wrap{margin-top:30px;background-color:#ffffff;border-radius:6px;}
|
715 |
-
.syncprodtheader{padding:20px 20px;}
|
716 |
-
.syncprodthdrleft h5{margin-bottom:0px;font-weight:400;}
|
717 |
-
.syncprodthdrright{display:flex;flex:1;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
|
718 |
-
.align-items-center{align-items:center;}
|
719 |
-
.prctfltrhover{position:absolute;right:10px;top:100%;min-width:240px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.18);border-radius:6px;margin-top:15px;opacity:0;visibility:hidden;background-color:#ffffff;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
720 |
-
.prctfltrhovershow{opacity:1;visibility:visible;margin-top:0px;}
|
721 |
-
.prdcfltrtrgr{cursor:pointer;}
|
722 |
-
.prdchdrsrch, .prdcfilter{padding:0 8px;position:relative;}
|
723 |
-
.syncprdcbtnwrp{display:flex;flex:1;max-width:270px;justify-content:flex-end;}
|
724 |
-
.syncprdcbtn{border-radius:6px;background-color:#2FBB0E;min-width:240px;text-align:center;height:48px;font-size:16px;line-height:24px;color:#ffffff;border:none;}
|
725 |
-
.syncprdcbtn:hover{background-color:#1e1e1e;}
|
726 |
-
.prctfltritem{border-bottom:1px solid #E9E9E9;}
|
727 |
-
.prctfltrtrgr{color:#B6B6B6;cursor:pointer;padding:16px 30px 15px 15px;position:relative;font-weight:400;text-transform:uppercase;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
728 |
-
.prctfltritemdtl{display:none;color:#1e1e1e;}
|
729 |
-
.prctfltritemdtl ul{margin:0;padding:0 15px 15px;list-style:none;max-height:280px;overflow:auto;}
|
730 |
-
.prctfltritemdtl ul li{margin-bottom:9px;}
|
731 |
-
.prctfltritemdtl ul li:last-child{margin-bottom:0px;}
|
732 |
-
.plusminus{position:absolute;left:15px;top:10px;}
|
733 |
-
.prctfltritemdtl p:last-child{margin-bottom:0px;}
|
734 |
-
.prctfltrtrgr:after{content:"";position:absolute;right:21px;top:18px;height:14px;width:2px;background-color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
735 |
-
.prctfltrtrgr:before{content:"";position:absolute;right:15px;top:24px;height:2px;width:14px;background-color:#002BFC;}
|
736 |
-
.prctfltrtrgr.active:after{opacity:0;visibility:hidden;}
|
737 |
-
|
738 |
-
/*--- sync product popoup style -----*/
|
739 |
-
.scrlnone{overflow:hidden;}
|
740 |
-
.whitepopup{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
741 |
-
.sycnprdct-ppcnt{display:flex;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center; position: relative;}
|
742 |
-
.sycnprdctpp-cntr{max-height:100%;overflow:auto;padding:30px;}
|
743 |
-
.ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
|
744 |
-
.ggladsppcntnr{width:100%;max-width:390px;}
|
745 |
-
.sycnprdpp-ftr{margin-top:30px;}
|
746 |
-
.sycnprdppbtmbtn{background-color:transparent;border:1px solid #e6e6e6;border-radius:6px;padding:7px 23px;color:#ffffff;font-size:14px;font-weight:normal;min-width:90px;text-align:center;height:36px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
|
747 |
-
.ppblubtn:hover{background-color:#0022c7;}
|
748 |
-
.showpopup{opacity:1;visibility:visible;}
|
749 |
-
.sycnprdppcnclbtn{border-color:#FA414D;color:#FA414D}
|
750 |
-
.sycnprdbtnrgt{text-align:right;}
|
751 |
-
.progressinfo{text-align:right;font-size:12px;line-height:16px;color:#515151;margin-top:9px;}
|
752 |
-
.progress{display:-ms-flexbox;display:flex;height:30px;overflow:hidden;line-height:0;background-color:#F3F3F3;border-radius:100px;}
|
753 |
-
.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:left;padding-left:24px;white-space:nowrap;background:linear-gradient(90deg, #0032FC 0%, #00D2F6 100%);transition:width 0.6s ease;border-radius:100px;}
|
754 |
-
|
755 |
-
/*--- table structure -----*/
|
756 |
-
.syncprodtblheader{padding:0 20px;}
|
757 |
-
.syncpro-thead{background-color:#F1F6FA;display:flex;align-items:center;}
|
758 |
-
.syncpro-thead .syncprotblcell{color:#1e1e1e;}
|
759 |
-
.syncprotblcell{padding:10px;color:#1e1e1e;}
|
760 |
-
.thedprodetl-cell{display:flex;align-items:center;}
|
761 |
-
.thedprodetl-cell .cstmcheck-item{line-height:0;}
|
762 |
-
.prodetlcell{max-width:40%;flex:0 0 40%;}
|
763 |
-
.stsdetlcell{max-width:18%;flex:0 0 18%;text-align:center;}
|
764 |
-
.actndetlcell{max-width:17%;flex:0 0 17%;text-align:center;}
|
765 |
-
.issuedetlcell{max-width:25%;flex:0 0 30%;}
|
766 |
-
.tbodyprodetl-cell{display:flex;}
|
767 |
-
.syncprodtlinfo{padding-left:15px;}
|
768 |
-
.syncproimage{width:90px;height:90px;overflow:hidden; background-color: #e9e9e9;}
|
769 |
-
.syncproimage img{width:100%;height:100%;object-fit:cover;}
|
770 |
-
.sycnproimgwrp{position:relative;}
|
771 |
-
.sycnproimgwrp .cstmcheck-item{position:absolute;left:8px;top:4px;}
|
772 |
-
.ststbx{min-width:120px;display:inline-block;text-align:center;font-size:12px;padding:3px 10px;line-height:18px;height:24px;border-radius:100px;}
|
773 |
-
.disaprvsts{background-color:#FFDEE0;color:#CC0E0E;}
|
774 |
-
.aprvsts{background-color:#CEF6CD;color:#169601;}
|
775 |
-
.syncprotbody-item{display:flex;padding:15px 10px;border-bottom:1px solid #E9E9E9}
|
776 |
-
.proinfotrgr{cursor:pointer}
|
777 |
-
.proinfoicon{margin-left:8px;}
|
778 |
-
.proinfoicon img{max-width:20px;vertical-align:middle;}
|
779 |
-
.pro-price{margin-top:6px;font-size:16px;font-weight:500;color:#1e1e1e;}
|
780 |
-
.tbodyissuedetl-cell{color:#515151;line-height:22px;}
|
781 |
-
.tbodyissuedetl-cell p{margin-bottom:0px;}
|
782 |
-
.syncprofooter{padding:40px 20px;display:flex;align-items:center;flex-wrap:wrap;}
|
783 |
-
.properpage{padding-right:15px}
|
784 |
-
|
785 |
-
/*----- pagination -----*/
|
786 |
-
.syncpropagination{display:flex;padding-left:15px;justify-content:flex-end;flex:1;}
|
787 |
-
.syncpropagination ul{margin:0;padding:0;list-style:none;display:flex;}
|
788 |
-
.syncpropagination ul li{margin:0 4px;}
|
789 |
-
.paginitem{border-radius:4px;display:inline-block;text-align:center;height:36px;min-width:36px;padding:6px 10px;font-size:14px;line-height:22px;font-weight:normal;color:#515151;border:1px solid transparent;}
|
790 |
-
a.paginitem:hover{color:#002BFC;}
|
791 |
-
span.pagecurrent{background-color:#002BFC;color:#ffffff;font-weight:700;}
|
792 |
-
.pgprevbtn, .pgnextbtn{border:1px solid #1e1e1e;padding-left:16px;padding-right:16px;}
|
793 |
-
.pgprevbtn{margin-right:15px;}
|
794 |
-
.pgnextbtn{margin-left:15px;}
|
795 |
-
.disblebtn{border-color:#cccccc;color:#CCCCCC;}
|
796 |
-
a.disblebtn:hover{color:#cccccc;}
|
797 |
-
select.properselect{min-width:64px;height:36px;margin-left:10px;padding-left:6px;}
|
798 |
-
|
799 |
-
.mbl-allitemchek{display:none;margin:0 20px;padding:10px;background-color:#F1F6FA;align-items:center;}
|
800 |
-
.data-th{display:none;}
|
801 |
-
.syncprotblcntn{display:flex;}
|
802 |
-
|
803 |
-
/*--- product info popup ------*/
|
804 |
-
.ppoverlay{display:flex;padding:15px 0;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center;}
|
805 |
-
.ppwhitebg{background-color:#ffffff; position: relative; border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
806 |
-
.pp-content{width:94%;max-width:500px;max-height:100%;overflow:auto;padding:30px;}
|
807 |
-
.width650{max-width:650px;}
|
808 |
-
.prdctinfopp-cntn{padding:13px 20px;}
|
809 |
-
.prdcinfobody{display:flex;flex-wrap:wrap}
|
810 |
-
.prdcinfopp-left{max-width:288px;flex:0 0 288px;}
|
811 |
-
.prdtpplrg-imgwrp{border-radius:6px;width:288px;height:288px;text-align:center;display:flex;align-items:center;justify-content:center;}
|
812 |
-
.prdtpplrg-imgwrp img{width:100%;height:100%;object-fit:contain}
|
813 |
-
.prdcinfopp-right{padding-left:20px;max-width:305px;flex:0 0 305px; word-wrap: break-word;}
|
814 |
-
.prdcinfopp-right h4{line-height:28px;margin-bottom:4px;}
|
815 |
-
.prdcinfopp-right p{margin-bottom:0px;}
|
816 |
-
.prdcinfopp-right p a{color:#0083FC}
|
817 |
-
.prdcinfopp-right p a:hover{color:#000000}
|
818 |
-
.prdinfodtlitem{margin-top:12px;color:#1e1e1e;line-height:22px;font-weight:500;}
|
819 |
-
.prdinfodtlitem span{display:block;color:#B6B6B6;font-weight:500;line-height:22px;}
|
820 |
-
.prdtpp-thumb{margin-top:6px;padding-right:24px}
|
821 |
-
.thumbimgppttem{margin-right:15px;width:76px !important;height:76px;overflow:hidden;border:1px solid #E9E9E9;border-radius:6px;}
|
822 |
-
.thumbimgppttem img{width:100%;height:100%;object-fit:cover;}
|
823 |
-
.absltpsclsbtn{position: absolute; right: 10px; top: 10px;}
|
824 |
-
|
825 |
-
.show-less{line-height:22px;}
|
826 |
-
.prdtpp-thumb .slick-prev, .prdtpp-thumb .slick-next{height:100%;border-radius:6px;}
|
827 |
-
.prdtpp-thumb .slick-prev:hover, .prdtpp-thumb .slick-next:hover{background:#e0e8ef;}
|
828 |
-
span.show-more-less-handler{color:#0083FC;padding-left:5px;}
|
829 |
-
|
830 |
-
/*---- account settings -------*/
|
831 |
-
.accstng-cntwrap{display: flex;}
|
832 |
-
.accsetting-wrap{background-color: #ffffff;}
|
833 |
-
.accsrng-left{padding: 10px 4px 10px 5px; width: 209px; min-width: 209px; transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
834 |
-
.accsrng-left ul{margin: 0; padding: 0; list-style: none; position: sticky; top: 62px;}
|
835 |
-
.accsrng-left ul li a{padding: 10px 15px; display: block; color: #B6B6B6; line-height: 22px;}
|
836 |
-
.accsrng-left ul li a:hover{color: #1e1e1e;}
|
837 |
-
.accsrng-left ul li.active a{color: #1e1e1e; font-weight: 500; background-color: #F1F6FA;}
|
838 |
-
.accsrng-right{border-left: 1px solid #E9E9E9; flex: 1;}
|
839 |
-
.accstngdtl-top{padding: 18px 21px 18px 30px; background-color: #ffffff; display: flex; align-items: center;
|
840 |
-
position: sticky; top: 57px; z-index: 1;
|
841 |
-
}
|
842 |
-
.accstngdtltp-shdw{box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06);}
|
843 |
-
.accstngdtl-top h2{flex: 1; margin-bottom: 0px; font-weight: 500;}
|
844 |
-
|
845 |
-
.savebtn{display:inline-block;width:91px;height:36px;background-color:#2FBB0E;text-align:center;padding:10px;border-radius:6px;color:#ffffff;font-size:14px;font-weight:500; line-height: 20px; box-shadow:none;border:none;cursor:pointer;}
|
846 |
-
.savebtn:hover{background-color:#28d000;color:#ffffff;}
|
847 |
-
.accstng-dtlarea{padding: 24px 30px; border-bottom: 1px solid #E9E9E9; margin-bottom: 24px;}
|
848 |
-
.accstng-item:last-child .accstng-dtlarea{margin-bottom: 0px;}
|
849 |
-
.acnttype-ttl strong{font-weight: 500; color: #1e1e1e}
|
850 |
-
.acnttype-bx{ background-color: #F1F6FA; padding: 20px 5px; margin: 12px 0 0; border-radius: 6px; display: flex; flex-wrap: wrap;}
|
851 |
-
.accstngdtl-item{margin-bottom: 40px;}
|
852 |
-
.accstngdtl-item:last-child{margin-bottom: 30px;}
|
853 |
-
.acnttypebx-item{max-width: 33.3333%; flex: 0 0 33.3333%; padding: 0 15px;}
|
854 |
-
.acnttypebx-item h6{font-weight: 500; margin-bottom: 6px;}
|
855 |
-
.acnttypebx-item p{margin-bottom: 3px;}
|
856 |
-
.changelink{line-height: 20px; font-size: 12px; color: #0083FC;}
|
857 |
-
.changelink:hover{color: #1E1E1E;}
|
858 |
-
.accstngdtl-item h5{margin-bottom: 12px; font-weight: 500;}
|
859 |
-
.accnthlpiocn{vertical-align: middle;}
|
860 |
-
|
861 |
-
.accstngdtl-item .cstmcheck-item .checkmark::before{top: 2px;}
|
862 |
-
.accstngdtl-checkbx .cstmcheck-item {margin-bottom: 9px;}
|
863 |
-
.accstngdtl-checkbx .cstmcheck-item:last-child {margin-bottom: 0px;}
|
864 |
-
.inputinfotxt strong{font-weight: 500;}
|
865 |
-
.impthsld-formrow .inputinfotxt{max-width: 258px;}
|
866 |
-
.acnpolyinfo{font-size: 12px; padding-left: 25px; line-height:18px; max-width: 283px; line-height: 18px;}
|
867 |
-
.acnpolyinfo a{color: #0083FC; }
|
868 |
-
.acnpolyinfo a:hover{color: #1e1e1e; }
|
869 |
-
|
870 |
-
.acntmrchnt-item{display: flex; align-items: center; margin-bottom: 24px;}
|
871 |
-
.accmrchntitem-left{flex: 1; max-width: 230px; font-size: 16px; font-weight: 500; line-height: 24px; color: #515151;}
|
872 |
-
.accmrchntitem-btn{min-width: 160px; max-width: 160px; border: 1px solid #c6c6c6; font-size: 14px; line-height: 22px; color: #515151; background-color: transparent; box-shadow: none; border-radius: 6px; padding: 6px 10px; text-align: center;}
|
873 |
-
.erraccbtn{border-color: #F51321; color: #F51321;}
|
874 |
-
.accbluebtn{border-color: #002BFC; color:#002BFC; max-width: 160px;}
|
875 |
-
.accmrchntitem-btn img{vertical-align: middle; margin-right: 8px; line-height: 0;}
|
876 |
-
button.accmrchntitem-btn:hover{border-color: #1e1e1e;}
|
877 |
-
.gglmrchnt-item .accstng-dtlarea{padding-bottom: 30px;}
|
878 |
-
.accprdcsyncsettng-list{margin-bottom: 54px;}
|
879 |
-
.accprdcsyncsettng-list:last-child{margin-bottom: 28px;}
|
880 |
-
.accprdcsyncstng-item h5{font-weight: 500; margin-bottom: 6px;}
|
881 |
-
.accprdcsyncstng-item{margin-bottom: 54px;}
|
882 |
-
.accprdcsyncstng-item:last-child{margin-bottom: 0px;}
|
883 |
-
.accprdcsyncitem-cnt{display: flex; flex-wrap: wrap;}
|
884 |
-
.accprdcsync-left{flex: 1; padding-right: 15px;}
|
885 |
-
.accprdcsync-right{max-width: 175px; padding-left: 15px; display: flex; flex-direction: column; align-items: flex-end;}
|
886 |
-
.justbrdrbtn{min-width: 160px; border: 1px solid #c6c6c6; font-size: 14px; line-height: 22px; color: #515151; background-color: transparent; box-shadow: none; border-radius: 6px; padding: 6px 10px; text-align: center;}
|
887 |
-
.justbrdrbtn:hover{color: #1e1e1e; border-color: #1e1e1e;}
|
888 |
-
.mappedcnt-info{font-size: 12px; line-height: 20px; margin-top: 6px; color:#1e1e1e;}
|
889 |
-
.accprdcsync-left p{margin-bottom: 0px;}
|
890 |
-
.accprdcsync-left p a{color: #0083FC; }
|
891 |
-
.accprdcsync-left p a:hover{color: #1e1e1e; }
|
892 |
-
.blnginfo-table{border-radius: 5px; overflow: hidden;}
|
893 |
-
.cnvs-table{width: 100%; border:1px solid #E9E9E9; border-radius: 5px;border-collapse: collapse;}
|
894 |
-
.cnvs-table th{background-color: #F1F6FA; width: 33%; font-size: 16px; line-height: 24px; color: #1e1e1e; font-weight: 500; text-align: center; padding: 9px 10px;}
|
895 |
-
.cnvs-table td{padding: 10px; text-align: center; font-size: 14px; line-height: 22px; color: #515151;}
|
896 |
-
.cnvs-table th, .cnvs-table td{border-right:1px solid #e9e9e9;}
|
897 |
-
.cnvs-table th:last-child, .cnvs-table td:last-child{border-right:0px solid #e9e9e9;}
|
898 |
-
.bilnginfo-scalability .scalabilitybx{padding: 38px 30px;}
|
899 |
-
.bilnginfo-scalability .sclabilityright{flex: 1; width: 100%; padding-left: 15px;}
|
900 |
-
.stickylitem .accstngdtl-top{box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06);}
|
901 |
-
.dslbbtn, .dslbbtn:hover{background-color:#CCCCCC;color:#ffffff;}
|
902 |
-
.mblacntstng-lefttrgr{display: none; position: fixed; right: 0; top: 15%; background-color: #ffffff; padding:6px 8px; border-radius: 6px 0 0 6px; cursor: pointer; z-index: 2;
|
903 |
-
transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;
|
904 |
-
box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06)}
|
905 |
-
.showmblacntstng{right:208px; }
|
906 |
-
.showaccsrngleft{position: fixed; right: -230px; top:15%; background-color: #ffffff; z-index: 2; box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06)}
|
907 |
-
.mblacngstngleft{display: none;}
|
908 |
-
|
909 |
-
/*------- dashboard ----------*/
|
910 |
-
.dflex{display: flex; flex-wrap: wrap; }
|
911 |
-
.mt24{margin-top: 24px;}
|
912 |
-
.mb24{margin-bottom: 24px;}
|
913 |
-
.dashtpleft-btn{background-color: #ffffff; box-shadow: none; border-radius: 6px; border:1px solid #0083FC; padding: 4px 9px 3px; font-size: 14px; line-height: 24px; color: #0083FC; margin-right: 12px;}
|
914 |
-
.dashtpleft-btn:last-child{margin-right: 0px;}
|
915 |
-
.dashtpleft-btn img{vertical-align: top; margin-right: 5px; display: inline-block; margin-top: 2px;}
|
916 |
-
.dashtpleft-btn:hover{background-color: #f4f4f4;}
|
917 |
-
.dashtp-right{flex: 1;}
|
918 |
-
.dashtp-right{flex: 1; display: flex; justify-content: flex-end; align-items: center;}
|
919 |
-
.dshtprightselect{min-width: 150px;}
|
920 |
-
.dshtprightselect select{width: 100%; padding: 4px 26px 4px 10px; line-height: 22px;}
|
921 |
-
.dshtpdaterange{margin-left: 24px; position: relative; padding: 5px 20px 5px 24px; line-height: 24px; font-size: 14px; font-weight: 500; color: #515151; cursor: pointer}
|
922 |
-
.dateclndicn{position: absolute; left: 0; top: 7px; line-height: 0;}
|
923 |
-
.careticn{position: absolute; right: 0; top: 7px; line-height: 0;}
|
924 |
-
.claimalert .errmscntbx{width: 100%; padding: 0; align-items: inherit; overflow: hidden;}
|
925 |
-
.erralertrigt {padding: 5px 15px 5px 0; overflow: hidden;}
|
926 |
-
.claimalert .errmsglft{background-color: #FA424D; min-width: 54px; padding: 15px 0 15px 15px; }
|
927 |
-
.erralertrigt{padding-left:15px; }
|
928 |
-
.erralertrigt h6{margin-bottom: 0px; color: #1e1e1e;}
|
929 |
-
.erralertrigt p{margin-bottom: 0px; color: #515151}
|
930 |
-
.erralertrigt p a{color:#0083FC;}
|
931 |
-
.erralertrigt p a:hover{color:#1e1e1e;}
|
932 |
-
.wht-rnd-shdwbx{background-color: #ffffff; box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12); border-radius: 6px;}
|
933 |
-
.dashsmry-wrap{display: flex; flex-wrap: wrap;}
|
934 |
-
.dashsmry-item{display: flex; flex-wrap: wrap; width: 100%; border-bottom: 1px solid #e9e9e9; }
|
935 |
-
.dashsmry-item:last-child{border-bottom: none;}
|
936 |
-
.dashsmrybx{flex:1; border-right: 1px solid #E9E9E9; padding: 14px 9px; text-align: center;}
|
937 |
-
.dshsmrycattxt{line-height: 22px; font-size: 14px; color: #515151;}
|
938 |
-
.dshsmrylrgtxt{margin-top: 3px; font-size: 42px; line-height: 48px; color: #1e1e1e; font-weight: 300; }
|
939 |
-
.updownsmry{margin-top: 9px;display: inline-flex; align-items: center; font-size: 16px; line-height: 24px;}
|
940 |
-
.updownsmry img{margin-right: 4px;}
|
941 |
-
.dshsmryprdtxt{line-height: 20px; font-size: 12px; color: #B6B6B6; margin-top: 3px;}
|
942 |
-
|
943 |
-
/*---- ecoomerce chart ------*/
|
944 |
-
.chartbx{background-color: #ffffff; border-radius: 6px; position: relative;}
|
945 |
-
.ecomfunnchrtbx{padding: 24px; height: 100%;}
|
946 |
-
.col50{flex: 0 0 50%; max-width: 50%; padding: 0 15px;}
|
947 |
-
.prochrtftr{position: relative; filter: blur(12px); -webkit-filter:blur(12px);}
|
948 |
-
.prochrtovrbox{position: absolute; left: 0; top: 0; width: 100%; height: 100%; justify-content: center; align-items: center; display: flex;
|
949 |
-
background: linear-gradient(360deg, #F8F8F8 0%, rgba(248, 248, 248, 0.8) 41.15%, rgba(248, 248, 248, 0.6) 71.35%, rgba(248, 248, 248, 0) 100%);}
|
950 |
-
.prochrtcntn{max-width: 300px; text-align: center;}
|
951 |
-
.prochrttop{display: inline-flex; align-items: center; color: #F6B028; font-weight: 500; line-height: 24px; margin-bottom: 13px;}
|
952 |
-
.prochrttop img{margin-right: 3px;}
|
953 |
-
.prochrtcntn h5{font-weight: 500; margin-bottom: 3px; color: #515151;}
|
954 |
-
.prochrtcntn p{margin-bottom: 0;}
|
955 |
-
.blueupgrdbtn{margin-top: 12px; border:none; box-shadow: none; background-color: #002BFC; color: #ffffff; font-weight: 700; font-size: 16px; line-height: 24px; padding: 9px 28px; border-radius: 6px; min-width: 154px; text-align: center;}
|
956 |
-
.blueupgrdbtn:hover{background-color: #1e1e1e;}
|
957 |
-
.chartarea img{width: 100%;}
|
958 |
-
.whiteroundedbx{background-color: #ffffff; border-radius: 6px;}
|
959 |
-
.dshreport-sec{padding: 30px 20px 5px; overflow: hidden;}
|
960 |
-
.dsh-reprttop{display: flex; flex-wrap: wrap;}
|
961 |
-
.dshrprttp-left, .dshrprttp-right{flex: 1; padding: 0 15px;}
|
962 |
-
.dshrprttp-left{display: flex; align-items: center; flex-wrap: wrap;}
|
963 |
-
.dshrprttp-left h4{font-weight:400; margin-bottom: 0px; margin-right: 24px;}
|
964 |
-
.dshrprttp-right{display: flex; justify-content: flex-end;}
|
965 |
-
.dshrprttp-right .prdchdrsrchicon{margin-right: 24px;}
|
966 |
-
.viewallbtn{display: inline-flex; align-items: center; color: #0083FC;}
|
967 |
-
.dashtablewrp{margin-top: 30px;}
|
968 |
-
.dshreporttble{width: 100%; border-collapse: collapse;}
|
969 |
-
.dshreporttble thead{background-color: #F1F6FA;}
|
970 |
-
.dshreporttble th, .dshreporttble td{border-right: none; text-align: center; color: #1e1e1e; font-size: 14px;}
|
971 |
-
.dshreporttble th{padding: 13px 15px; font-size: 14px; font-weight: 400; line-height: 22px; }
|
972 |
-
.dshreporttble td{padding: 16px 15px; border-bottom: 1px solid #E9E9E9;}
|
973 |
-
.dshreporttble tr:last-child td{border-bottom: 0px solid #E9E9E9;}
|
974 |
-
th.prdnm-cell, td.prdnm-cell{text-align:left; max-width: 150px; }
|
975 |
-
th.hide{font-size: 0 !important;}
|
976 |
-
th.tddot-cell,td.tddot-cell{text-align: right;}
|
977 |
-
td.prdnm-cell a{color: #0083FC; width: 100%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: inline-block;}
|
978 |
-
td.prdnm-cell a:hover{color: #1e1e1e}
|
979 |
-
|
980 |
-
.chartbx h5{ font-weight: 500; color: #515151; margin-bottom: 24px;}
|
981 |
-
.ggladsperfom-sec{padding: 30px 20px 10px;}
|
982 |
-
.ggladsperfom-sec h4{font-weight: 400; margin-bottom: 18px;}
|
983 |
-
.ggladschrtbx{filter: drop-shadow(0px 0px 6px rgba(0, 0, 0, 0.18)); padding: 24px 0 6px 6px;}
|
984 |
-
.ggladschrtbx h5{padding-left: 18px;}
|
985 |
-
.ggladsperfom-sec .col50{margin-bottom: 20px;}
|
986 |
-
.tddshpertg{font-size: 14px; font-weight: 700; color: #b6b6b6;}
|
987 |
-
.chartcntainer{width: 100%; height: 540px;}
|
988 |
-
.ecomchartinfo{margin-top: 24px}
|
989 |
-
.ecomchrtinfoflex{display: flex; padding:0 0 0 40px; margin: 0 -15px; }
|
990 |
-
.ecomchartinfoitem{padding: 0 15px 0 15px; flex: 0 0 20%; max-width: 20%; position: relative;}
|
991 |
-
.chartpercarrow{display: inline-block; background-image: url(../images/percentage-arrow-bg.png); background-position: 6px; background-repeat: repeat-x; position: relative; height: 38px; padding:9px 0px 9px 10px; font-size: 12px; font-weight: 500; line-height: 20px; position: absolute; right:14px; top: -5px;}
|
992 |
-
.chartpercarrow:after{content: ""; position: absolute; right: -25px; top: 0; width: 25px; height: 38px; background-image: url(../images/percentage-arrow.png); background-repeat: no-repeat; background-size: 100%;}
|
993 |
-
.chartpercarrow:before{content: ""; position: absolute; left: -1px; top: 6px; width: 1px; height: 26px; background-color: #1e1e1e; }
|
994 |
-
.ecomchartinfolabel{font-size: 11px;min-height: 28px; display: flex; align-items: center; font-weight: 400; color: #1e1e1e; max-width:55px; }
|
995 |
-
|
996 |
-
/*---- daterange -----*/
|
997 |
-
.daterangearea{min-height: 22px; min-width: 162px;}
|
998 |
-
.daterangepickerflex{display: flex;}
|
999 |
-
.daterangepicker-left{box-shadow: 1px 0px 9px rgba(0, 0, 0, 0.08); flex: 0 0 150px; max-width: 150px;}
|
1000 |
-
.daterangepicker-right{display: flex; flex-wrap: wrap; padding: 15px 24px;}
|
1001 |
-
.drp-calendar{padding: 0 11px; flex: 0 0 50%; max-width: 50%;}
|
1002 |
-
.drp-buttons{flex: 0 0 100%; max-width: 100%; padding: 0 24px;}
|
1003 |
-
.drp-calendar{position: relative;}
|
1004 |
-
.drp-calendar.left{padding-left: 0px}
|
1005 |
-
.drp-calendar.right{padding-right: 0px}
|
1006 |
-
.drp-calendar.left:before{content: ""; position: absolute; top: 55px; right: -5px; height: 76%; width: 1px; background-color: #E9E9E9;}
|
1007 |
-
.daterangepicker .calendar-table .next, .daterangepicker .calendar-table .prev{vertical-align: top; }
|
1008 |
-
.daterangepicker .calendar-table .next:hover, .daterangepicker .calendar-table .prev:hover{background-color: inherit;}
|
1009 |
-
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span{width: 24px; height: 24px; border-radius: 6px; border: 1px solid #e9e9e9; position: relative;}
|
1010 |
-
.daterangepicker .calendar-table .next span:before, .daterangepicker .calendar-table .prev span:before{content: ""; position: absolute; width: 7px; height: 11px; background-size: 100%; background-repeat: no-repeat; left: 50%; top: 50%; margin-left: -3px; margin-top: -5px;}
|
1011 |
-
.daterangepicker .calendar-table .next span:before{background-image: url(../images/next.png)}
|
1012 |
-
.daterangepicker .calendar-table .prev span:before{background-image: url(../images/prev.png)}
|
1013 |
-
.daterangepicker th.month{padding-bottom: 16px; min-height: 24px; line-height: 26px;}
|
1014 |
-
.daterangepicker .calendar-table .next span:hover, .daterangepicker .calendar-table .prev span:hover{background-color: #e9e9e9;}
|
1015 |
-
.drpbtmbuttonflex{display: flex; align-items: flex-end;}
|
1016 |
-
.drpbtmbuttonflex-left, .drpbtmbuttonflex-right{max-width: 50%; flex: 1;}
|
1017 |
-
.drpbtmbuttonflex-right{display: flex; justify-content: flex-end;}
|
1018 |
-
.btmslectdatetitle{font-size: 12px; font-weight: 500; color: #1e1e1e; margin-bottom: 9px;}
|
1019 |
-
.applyBtn{min-width: 90px; background-color: #002BFC; color: #ffffff; text-align: center; line-height: 20px; border-radius: 6px;}
|
1020 |
-
.applyBtn:hover{background-color: #1e1e1e;}
|
1021 |
-
.daterangepicker .drp-buttons .btn.cancelBtn{color:#002BFC; background-color: transparent; padding: 5px 0;}
|
1022 |
-
.daterangepicker .drp-buttons .btn.cancelBtn:hover{color:#1e1e1e;}
|
1023 |
-
.daterangepicker.show-calendar .ranges{height: 100%;}
|
1024 |
-
.daterangepicker .ranges ul{position: relative; height: 100%;}
|
1025 |
-
.daterangepicker .ranges li.cstmrang-li{position: absolute; bottom: 0; left: 0; width: 100%; border-right:4px solid #002BFC; background-color: #F1F6FA; color: #002BFC; font-weight: 500; font-size: 12px; line-height: 20px;}
|
1026 |
-
.daterangepicker .ranges li.cstmrang-li.active{background-color:#002BFC; color: #ffffff; }
|
1027 |
-
|
1028 |
-
/*------- Dashboard upgrade popup -------*/
|
1029 |
-
.upgradsbscrptnpp-hdr{background:linear-gradient(90deg, #0032FC 0%, #00D2F6 100%); padding: 12px 30px; text-align: center;}
|
1030 |
-
.upgradsbscrptnpp-hdr h5{color: #ffffff; margin-bottom: 0px; color: #ffffff; text-transform: uppercase; font-weight: 700;}
|
1031 |
-
.upgradsbscrptnpp-cntr{padding: 0; max-width: 420px; box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.12);}
|
1032 |
-
.upgradsbscrptnpp-cntr .ppmodal-body{padding: 18px 30px; text-align: center; color: #515151; }
|
1033 |
-
.upgradsbscrptnpp-cntr .ppmodal-body p{font-size: 14px; line-height: 22px; margin-bottom: 18px;}
|
1034 |
-
.ppupgrdbtn{display: inline-block; background-color: #FBC53B; border-radius: 6px; padding: 9px 29px; line-height: 24px; font-size: 16px; color: #1E1E1E; font-weight: 500;}
|
1035 |
-
.ppupgrdbtn:hover{background-color: #1e1e1e; color: #ffffff;}
|
1036 |
-
.upgradsbscrptnpp-cntr .absltpsclsbtn{top: 17px; right: 17px;}
|
1037 |
-
|
1038 |
-
/*------ map product category ------*/
|
1039 |
-
.backlnkbtn{margin-right: 17px;}
|
1040 |
-
.accstng-item:last-child .accstng-dtlarea{border-bottom: none;}
|
1041 |
-
.cmnalert{padding: 10px 10px 8px 40px; position: relative; background-color: #F1F6FA; line-height: 22px; min-height: 42px; display: flex; align-items: center;}
|
1042 |
-
.alerticon{position: absolute; left: 10px; top: 10px; }
|
1043 |
-
.blualert{color: #002BFC;}
|
1044 |
-
.msppageinfowrap{margin-top: 29px; display: flex; align-items: center; flex-wrap: wrap; padding-left: 24px;}
|
1045 |
-
.msppageinfotxt{color:#515151;}
|
1046 |
-
.msppageinfotxt:after{content:""; display: inline-block; vertical-align: middle; height: 24px; width: 1px; background-color: #515151; margin: 0 99px 0 98px;}
|
1047 |
-
.msppageinfotxt:last-child:after{content: none;}
|
1048 |
-
.mapprocat-accordion{margin-top: 24px;}
|
1049 |
-
.mapcataccr-item{padding: 18px 24px; border-radius: 6px; background-color: #ffffff; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.18);margin-bottom: 18px;}
|
1050 |
-
.mapcataccr-select{width: 235px; padding-left: 2px;}
|
1051 |
-
.mapcataccr-select select{border:1px solid #c6c6c6; background-color: #ffffff; width: 100%; padding: 6px 30px 6px 12px; margin-bottom: 9px; line-height: 22px; }
|
1052 |
-
.mapcataccr-select select:last-child{margin-bottom: 0px;}
|
1053 |
-
.mapcataccr-top{ display: flex; position: relative; padding-right: 24px; flex-wrap: wrap;
|
1054 |
-
transition: all 0.3s ease-in-out 0s; -moz-transition: all 0.3s ease-in-out 0s; -webkit-transition: all 0.3s ease-in-out 0s; -o-transition: all 0.3s ease-in-out 0s;}
|
1055 |
-
.mapcataccr-title{font-size: 16px; padding: 6px 0; color: #1e1e1e; font-weight: 500; line-height: 24px; min-width: 298px; position: relative;}
|
1056 |
-
.mapcataccr-title:before{content: ""; position: absolute; right: 0px; top: 16px; width: 100%; height: 2px; border-top: 2px dashed #c6c6c6}
|
1057 |
-
.mapcataccr-title:after{content: ""; position: absolute; right: 0px; top:13px;width:6px; height: 9px; background-size: 100%; background-repeat: no-repeat; background-position: right center; background-image: url(../images/line-arrow.png); background-color: #ffffff;}
|
1058 |
-
.mapcataccr-title span{background-color: #ffffff; padding-right: 4px; position: relative;}
|
1059 |
-
.mapcataccr-plusminus{position: absolute; right: 0px; top: 12px; width: 24px; height: 24px; cursor: pointer}
|
1060 |
-
.mapcataccr-plusminus:after{content:"";position:absolute;right:6px;top:0px;height:14px;width:2px;background-color:#0083FC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
1061 |
-
.mapcataccr-plusminus:before{content:"";position:absolute;right:0px;top:6px;height:2px;width:14px;background-color:#0083FC;}
|
1062 |
-
.mapcataccr-plusminus.active:after{opacity:0;visibility:hidden;}
|
1063 |
-
.mapcataccr-detail{display: none; padding: 0px 15px 0px 0; color: #364167; position: relative;}
|
1064 |
-
.mapcataccr-detail .mapcataccr-title{font-weight: 400; font-size: 14px; line-height: 22px; color: #515151}
|
1065 |
-
.sbmaincat{padding: 18px 15px 0px 25px; position: relative;}
|
1066 |
-
.sbmaincat .mapcataccr-top{position: relative;}
|
1067 |
-
.sbmaincat .mapcataccr-top:before{content: ""; position: absolute; left: -20px; top: 15px; width:13px; height: 2px; border-top: 2px dashed #c6c6c6;}
|
1068 |
-
.sbmaincat .mapcataccr-top:after{content: ""; border-left: 2px dashed #c6c6c6; position: absolute; left: 4px; top: 25px; width: 2px; height:calc(100% + 10px);}
|
1069 |
-
.sbmaincat:before{content: ""; position: absolute; left: 4px; top: -6px; width:2px; height: 100%; border-left: 2px dashed #c6c6c6;}
|
1070 |
-
.sbmaincat:after{content: ""; position: absolute; left: 16px; top: 20px; margin-top: 10px; width:6px; height: 9px; background-size: 100%; background-repeat: no-repeat; background-position: right center; background-image: url(../images/line-arrow.png); background-color: #ffffff;}
|
1071 |
-
.sbmaininnerlevel:before{content: none;}
|
1072 |
-
.sbmainsblevel:before{height: 100%;}
|
1073 |
-
.sbmaincat .sbmainsblevel:before{content: none;}
|
1074 |
-
.sbmaincat .mapcataccr-top:last-child:after{content: none;}
|
1075 |
-
.sbmaincat:last-child{padding-bottom: 0px;}
|
1076 |
-
.sbmainlevel:last-child:before{height: 40px}
|
1077 |
-
.topactive{position: relative;}
|
1078 |
-
.topactive:before{content: ""; position: absolute; top: 24px; left: 4px; width: 2px; height: 80%; border-left: 2px dashed #c6c6c6}
|
1079 |
-
.mapprocat-dtl{padding-top: 24px !important}
|
1080 |
-
/*.mapdtlflex{display: flex !important; flex-wrap: wrap;}*/
|
1081 |
-
|
1082 |
-
/*------ Map Product Attributes page -----*/
|
1083 |
-
.mapproattr-dtl{padding-top: 24px !important}
|
1084 |
-
.mapproattr-dtlwrap{padding-top: 30px;}
|
1085 |
-
.mapproattr-left{padding: 0 15px; flex: 1;}
|
1086 |
-
.mapproattr-right{padding: 0 15px; min-width: 263px; max-width: 263px; flex: 0 0 263px;}
|
1087 |
-
.mapproattr-left .msppageinfowrap{padding-left: 0px; margin-top: 0px;}
|
1088 |
-
.mapproattr-left .msppageinfotxt::after{margin: -4px 24px 0;}
|
1089 |
-
.attrinfoicon{vertical-align: middle;margin-left: 7px; line-height: 1; display: inline-block; max-width: 20px;}
|
1090 |
-
.infoicontrgr{cursor: pointer}
|
1091 |
-
.proattrformlist{margin-top: 36px}
|
1092 |
-
.proattrfrm-item{display: flex; flex-wrap: wrap; margin: 0px -15px 18px;}
|
1093 |
-
.attrfrmleft{flex: 1; padding: 0 15px; display: flex; align-items: center;}
|
1094 |
-
.attrfrmleft label{font-size: 16px; line-height: 24px; font-weight: 500; color:#1e1e1e; flex: 1;}
|
1095 |
-
.attrfrmleft .attrinfoicon{flex: 0 0 20px;}
|
1096 |
-
.attrfrmright{flex:0 0 265px; max-width: 265px; padding: 0 15px;}
|
1097 |
-
.attrfrmright select{width: 100%; padding:6px 30px 6px 12px; font-size: 14px; line-height: 22px;}
|
1098 |
-
.addatrrrightbx{border-radius: 6px; background-color: #ffffff; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.12);}
|
1099 |
-
.attrrighttop{padding: 18px 15px 16px 15px; border-bottom: 1px solid #E9E9E9; font-size: 16px; line-height: 24px; color: #1e1e1e; font-weight: 500;}
|
1100 |
-
.attroptinlistbx{padding: 21px 15px; max-height: 330px; overflow: auto }
|
1101 |
-
.attroptcheck-item{margin-bottom: 18px;}
|
1102 |
-
.attroptcheck-item:last-child{margin-bottom:0px;}
|
1103 |
-
.addattrbtn{width: 100%; border-radius:0 0 6px 6px; background-color: #2FBB0E; color: #ffffff; font-size: 16px; line-height: 24px; font-weight: 500; text-align: center; border:none; padding: 9px 15px;}
|
1104 |
-
.addattlistbx{border-top:1px solid #e9e9e9; padding-top: 18px;}
|
1105 |
-
.infoicontrgr {position: relative;}
|
1106 |
-
.infoicontrgr:after{visibility: hidden; width: 160px;background-color: #ffffff; color: #1e1e1e;
|
1107 |
-
text-align: center; border-radius: 6px; padding: 6px 9px; content: attr(title);
|
1108 |
-
position: absolute; z-index: 1; bottom: 100%; margin-bottom: 10px; left: 50%;
|
1109 |
-
margin-left: -80px; font-size: 12px; font-weight: 400; line-height: 20px; border:1px solid #E9E9E9; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.12);
|
1110 |
-
}
|
1111 |
-
.infoicontrgr:hover:after {visibility: visible;}
|
1112 |
-
.infoicontrgr:hover:before {content: " ";position: absolute;top: -10px; left: 50%;margin-left: -5px;border-width: 5px; border-style: solid; border-color: #cccccc transparent transparent transparent;}
|
1113 |
-
|
1114 |
-
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
1115 |
-
|
1116 |
-
/* RC*/
|
1117 |
-
.onbordingbody{padding-top: 10px;}
|
1118 |
-
.onbordording-step .click_here{font-weight: 600; cursor: pointer;}
|
1119 |
-
.dashboard_page_conversios_onboarding, .index_page_conversios_onboarding, .onbordingbody-wapper{background: #fff;}
|
1120 |
-
.bodyrightpart{padding: 20px 10px 10px 0;}
|
1121 |
-
.blueupgrdbtn{display: inline-block;}
|
1122 |
-
.blueupgrdbtn:hover {color:#fff;}
|
1123 |
-
.shop-category .form-label-control small{display: inline-block;}
|
1124 |
-
.tvc-sync-progress-gmc{display: none;}
|
1125 |
-
.ecomchartinfoitem:first-child {padding-left: 0;}
|
1126 |
-
.chartpercarrow{ padding: 9px 0px 9px 2px; right: 12px;}
|
1127 |
-
.navinfotopnav .navinfonavtext{line-height: 24px;}
|
1128 |
-
.container-fluid{padding: 5px 15px;}
|
1129 |
-
.prmoupgrdbtn .upgradebtn{padding-top: 7px; padding-bottom: 7px;}
|
1130 |
-
.chartpercarrowt:after{content: ""; position: absolute; right: -25px; top: 0; width: 25px; height: 38px; background-image: url(../images/next.png); background-repeat: no-repeat; background-size: 100%;}
|
1131 |
-
.prochrtcntn{max-width: 55%;}
|
1132 |
-
.temp_note{
|
1133 |
-
background-color: #ffffff;
|
1134 |
-
box-shadow: 0px 0px 6px rgb(0 0 0 / 12%);
|
1135 |
-
border-radius: 6px;
|
1136 |
-
padding: 5px 6px 0px 4px;
|
1137 |
-
margin: 10px 0 0 0;
|
1138 |
-
|
1139 |
-
}
|
1140 |
-
.temp_note p{
|
1141 |
-
margin: 0 0 20px 0;
|
1142 |
-
line-height: 22px;
|
1143 |
-
/* padding-bottom: 5px; */
|
1144 |
-
padding: 5px 9px;
|
1145 |
-
font-weight: 400;
|
1146 |
-
text-align: center;
|
1147 |
-
}
|
1148 |
-
.ecomcheckoutfunchartinfo .ecomchartinfoitem{
|
1149 |
-
padding: 0 15px 0 15px;
|
1150 |
-
flex: 0 0 24%;
|
1151 |
-
max-width: 24%;
|
1152 |
-
position: relative;
|
1153 |
-
}
|
1154 |
-
.ecomcheckoutfunchartinfo .chartpercarrow{
|
1155 |
-
right: 14px;
|
1156 |
-
}
|
1157 |
-
/* feedback-form */
|
1158 |
-
#feedback-form-wrapper #feedback_record_btn > button { position: fixed;right: 0;bottom: 7%;transform: rotate(-90deg) translate(50%, -50%);transform-origin: right;z-index: 999;width: 110px;font-size: 19px; }
|
1159 |
-
#feedback-form-wrapper .rating-input-wrapper input[type="radio"] { display: none; }
|
1160 |
-
.rating-input-wrapper input[type="radio"] ~ span { cursor: pointer; }
|
1161 |
-
.rating-input-wrapper{ display: flex;flex-direction: row;justify-content: flex-start; }
|
1162 |
-
#feedback-form-wrapper .rating-input-wrapper input[type="radio"]:checked ~ span { background-color: #4261dc;color: #fff; }
|
1163 |
-
#feedback-form-wrapper .rating-labels > label{ font-size: 14px;color: #777; }
|
1164 |
-
.feedback-form-group label{ cursor: default; }
|
1165 |
-
.feedback_label{ margin: 18px 8px 18px 8px; }
|
1166 |
-
.feedback_options{ border: 1px solid #515151 !important;border-radius: 0.25rem !important;padding: 7px 15px; }
|
1167 |
-
.feedback_que_label{ text-align: left;padding: 6px; }
|
1168 |
-
.feedback_txtarea_div{ display: flex;flex-direction: column;justify-content: flex-start; }
|
1169 |
-
.feedback_txtarea{ margin: 0px 2px; }
|
1170 |
-
#charcount{ text-align: end;padding: 1px 0px;font-size: smaller;}
|
1171 |
-
.feedback_btn{ margin: 0;text-transform: none;-webkit-appearance: button;transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;border: 1px solid transparent; text-align: center;text-decoration: none;vertical-align: middle;display: inline-block; font-weight: 400; line-height: 1.5; color: #fff;border-radius: 0!important; padding: 0.1rem 0rem; background-color: #2D62ED;border-color: #2D62ED; }
|
1172 |
-
.feedback_btn:hover{ color: #fff; }
|
1173 |
-
/* end feedback-form */
|
1174 |
-
|
1175 |
-
#ee_plugin_form select{
|
1176 |
-
min-width: 330px;
|
1177 |
-
}
|
1178 |
-
table .tracking-trigger td{ padding: 0 0 0.5rem 1rem;}
|
1179 |
-
#ee_plugin_form input[type="text"], #ee_plugin_form input[type="number"]{ min-width: 285px; height: 32px; margin-bottom: 5px;}
|
1180 |
-
/**********PMax CSS ************/
|
1181 |
-
.search-box { background: url('../images/search-icon.png');
|
1182 |
-
background-repeat: no-repeat;
|
1183 |
-
background-position: 13px center;
|
1184 |
-
padding: 5px 4px 5px 40px !important;}
|
1185 |
-
button.btn-search {
|
1186 |
-
border: 2px solid #0137FC;
|
1187 |
-
padding: 12px;
|
1188 |
-
text-transform: uppercase;
|
1189 |
-
background: #fff;
|
1190 |
-
}
|
1191 |
-
.date-range { background: url('../images/calendar-icon.png');
|
1192 |
-
background-repeat: no-repeat;
|
1193 |
-
background-position: 13px center;
|
1194 |
-
padding: 9px 4px 9px 40px !important;}
|
1195 |
-
|
1196 |
-
.btn-campaign {
|
1197 |
-
padding: 10px;
|
1198 |
-
}
|
1199 |
-
.campaign-list-tbl {
|
1200 |
-
border: 1px solid #E9E9E9;
|
1201 |
-
}
|
1202 |
-
/* Pmax add campaign */
|
1203 |
-
.section-addcampaign h3, .section-Campaignlisting {
|
1204 |
-
margin-top: 10px;
|
1205 |
-
}
|
1206 |
-
.tabs{
|
1207 |
-
width:100%;
|
1208 |
-
height:auto;
|
1209 |
-
margin:0 auto;
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
/* tab list item */
|
1213 |
-
.tabs .tabs-list{
|
1214 |
-
list-style:none;
|
1215 |
-
margin:0px;
|
1216 |
-
padding:0px;
|
1217 |
-
}
|
1218 |
-
.tabs .tabs-list li{
|
1219 |
-
float: left;
|
1220 |
-
margin: 0px;
|
1221 |
-
margin-right: 0px;
|
1222 |
-
padding: 15px 38px;
|
1223 |
-
text-align: center;
|
1224 |
-
background-color: #fff;
|
1225 |
-
border-radius: 0px;
|
1226 |
-
border-bottom: 2px solid #ddd;
|
1227 |
-
border-right: 0px;
|
1228 |
-
border-top: 0px;
|
1229 |
-
border-left: 0px;
|
1230 |
-
box-shadow: 0px 1px 12px rgb(0 0 0 / 6%);
|
1231 |
-
}
|
1232 |
-
.tabs .tabs-list li:hover{
|
1233 |
-
cursor:pointer;
|
1234 |
-
}
|
1235 |
-
.tabs .tabs-list li a{
|
1236 |
-
text-decoration: none;
|
1237 |
-
color: #515151;
|
1238 |
-
font-weight: 500;
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
/* Tab content section */
|
1242 |
-
.tabs .tab{
|
1243 |
-
display:none;
|
1244 |
-
width:96%;
|
1245 |
-
min-height:250px;
|
1246 |
-
height:auto;
|
1247 |
-
border-radius:3px;
|
1248 |
-
padding:20px 15px;
|
1249 |
-
background-color:#FFF;
|
1250 |
-
color:darkslategray;
|
1251 |
-
clear:both;
|
1252 |
-
}
|
1253 |
-
.tabs .tab h3{
|
1254 |
-
letter-spacing:1px;
|
1255 |
-
font-weight:normal;
|
1256 |
-
padding:5px;
|
1257 |
-
}
|
1258 |
-
.tabs .tab p{
|
1259 |
-
line-height:20px;
|
1260 |
-
letter-spacing: 1px;
|
1261 |
-
}
|
1262 |
-
|
1263 |
-
/* When active state */
|
1264 |
-
.active{
|
1265 |
-
display:block !important;
|
1266 |
-
}
|
1267 |
-
.tabs .tabs-list li.active{
|
1268 |
-
background-color: #002BFC;
|
1269 |
-
border-bottom: 2px solid #002BFC;
|
1270 |
-
}
|
1271 |
-
.tabs .tabs-list li.active a{
|
1272 |
-
color:#fff;
|
1273 |
-
}
|
1274 |
-
/* Campaign Form stylem */
|
1275 |
-
.campform-row label {
|
1276 |
-
margin-bottom: 0.5rem;
|
1277 |
-
font-weight: bold;
|
1278 |
-
}
|
1279 |
-
.add-pmax-campaign .campform-row input.fromfiled, .add-pmax-campaign select, .add-pmax-campaign form img {
|
1280 |
-
display: block;
|
1281 |
-
}
|
1282 |
-
.form-row-grp.campform-row {
|
1283 |
-
display: flex;
|
1284 |
-
flex-wrap: wrap;
|
1285 |
-
}
|
1286 |
-
.form-col-8 {
|
1287 |
-
width: 27%;
|
1288 |
-
}
|
1289 |
-
.form-col-4 {
|
1290 |
-
width: 10.666667%;
|
1291 |
-
margin-right: 15px;
|
1292 |
-
}
|
1293 |
-
button.btn-fade-blue {
|
1294 |
-
background-color: #F1F4FB;
|
1295 |
-
border-radius: 6px;
|
1296 |
-
border: none;
|
1297 |
-
padding: 9px 15px;
|
1298 |
-
color: #002BFC;
|
1299 |
-
font-size: 13px;
|
1300 |
-
min-width: 154px;
|
1301 |
-
text-align: center;
|
1302 |
-
height: 40px;
|
1303 |
-
display: inline-flex;
|
1304 |
-
align-items: center;
|
1305 |
-
justify-content: center;
|
1306 |
-
line-height: 24px;
|
1307 |
-
}
|
1308 |
-
.btn-fade-blue img {
|
1309 |
-
margin-right: 10px;
|
1310 |
-
}
|
1311 |
-
p.label {
|
1312 |
-
margin-bottom: 5px;
|
1313 |
-
}
|
1314 |
-
.score-line {width: 258px;position: absolute;left: 21%;font-size: 10px;}
|
1315 |
-
.form-row .radio {
|
1316 |
-
margin-right: 10px;
|
1317 |
-
}
|
1318 |
-
.radio-label {
|
1319 |
-
margin-right: 10px;
|
1320 |
-
}
|
1321 |
-
.campform-row .slect2bx {
|
1322 |
-
border-radius: 4px;
|
1323 |
-
border-color: #b4b9be;
|
1324 |
-
}
|
1325 |
-
button.btn-withborder {
|
1326 |
-
border: 1px solid #757575;
|
1327 |
-
background: #fff;
|
1328 |
-
border-radius: 6px;
|
1329 |
-
padding: 9px 15px;
|
1330 |
-
font-size: 16px;
|
1331 |
-
font-weight: 400;
|
1332 |
-
min-width: 154px;
|
1333 |
-
text-align: center;
|
1334 |
-
height: 42px;
|
1335 |
-
display: inline-flex;
|
1336 |
-
align-items: center;
|
1337 |
-
justify-content: center;
|
1338 |
-
line-height: 24px;
|
1339 |
-
color: #757575;
|
1340 |
-
}
|
1341 |
-
.campfooterbtn {padding: 0 0px 10px;}
|
1342 |
-
.assetformwrp {width: 70%; float: left;}t
|
1343 |
-
.assetsection {width: 30%; float: left;}
|
1344 |
-
img.img-upload {
|
1345 |
-
display: inline-block;
|
1346 |
-
margin-right: 10px;
|
1347 |
-
}
|
1348 |
-
.note {font-size: 10px;margin-bottom: 5px;}
|
1349 |
-
.img-icon {display: inline-block;position: absolute;margin-left: 10px;}
|
1350 |
-
|
1351 |
-
/* Pmax Edit */
|
1352 |
-
.campaign-edit .assetformwrp, .campaign-edit .assetsection {
|
1353 |
-
margin-top: 40px;
|
1354 |
-
}
|
1355 |
-
.form-edit input.fromfiled {display: inline;}
|
1356 |
-
.edit-icon {width: 35px;}
|
1357 |
-
.page_no_sec{margin: 10px;}
|
1358 |
-
#tvc_pmax_popup_box.tvc_popup_box {
|
1359 |
-
overflow: hidden;
|
1360 |
-
z-index: 9999;
|
1361 |
-
display: block;
|
1362 |
-
position: relative;
|
1363 |
-
float: left;
|
1364 |
-
}
|
1365 |
-
.add-pmax-campaign .mb1{margin-bottom: 5px;}
|
1366 |
-
.add-pmax-campaign .remove-row{margin: 14px; cursor: pointer;}
|
1367 |
-
.pmax-campaign .fromfiled{max-width: 350px;}
|
1368 |
-
.pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
|
1369 |
-
.pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
|
1370 |
-
/*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
|
1371 |
-
|
1372 |
-
.tvc-auto-product-sync-form .ga-title{position: relative;}
|
1373 |
-
.tvc-product-sync-toolip{ position: absolute; display: inline-block; width: auto; top: -5px; margin-left: 2px;}
|
1374 |
-
.tvc-product-sync-toolip .tvc-tooltip-right{ line-height: 1.2; bottom: 6px; left: 125%; top: auto;}
|
1375 |
-
.tvc-auto-product-sync-form .tvc-pro {margin-left: 20px;}
|
1376 |
-
.dshbrdbtn{
|
1377 |
-
color:white;
|
1378 |
-
}
|
1379 |
-
.editbtn{
|
1380 |
-
width:20px;
|
1381 |
-
height:20px;
|
|
|
|
|
|
|
|
|
|
|
1382 |
}
|
1 |
+
@charset "utf-8";
|
2 |
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
|
3 |
+
/*rc */
|
4 |
+
.tvc-pro{color: #002BFC; font-weight: 500;}
|
5 |
+
/* 11 */
|
6 |
+
/*dasboard*/
|
7 |
+
.ga_swatch{
|
8 |
+
flex: 1;
|
9 |
+
display: flex;
|
10 |
+
justify-content: flex-start;
|
11 |
+
align-items: center;
|
12 |
+
}
|
13 |
+
.ga_swatch span{
|
14 |
+
margin: 0 10px 0px 0px;
|
15 |
+
line-height: 24px;
|
16 |
+
font-size: 14px;
|
17 |
+
font-weight: 500;
|
18 |
+
color: #515151;
|
19 |
+
cursor: pointer;
|
20 |
+
}
|
21 |
+
.ga_swatch span.active{
|
22 |
+
color: #002BFC;
|
23 |
+
border-bottom: 1px solid;
|
24 |
+
}
|
25 |
+
.tvc_footer_links{display: block;}
|
26 |
+
.tvc-youtube-video{display: inline-block;}
|
27 |
+
.tvc-youtube-video span{display: block; margin-top: 22px; font-weight: 600;}
|
28 |
+
.tvc-youtube-video a{display: block; margin: 3px 5px 3px 10px;}
|
29 |
+
.rate_us{margin-right: 15px; margin-top: 3px; display: inline-block; float: right;}
|
30 |
+
.rate_us span{margin-right: 3px; /*vertical-align: bottom;*/}
|
31 |
+
.rate_us img{max-width: 120px;}
|
32 |
+
/*dasboard*/
|
33 |
+
select#tvc_conversion_tracking_type{
|
34 |
+
border: 1px solid #C6C6C6;
|
35 |
+
border-radius: 6px;
|
36 |
+
box-sizing: border-box;
|
37 |
+
cursor: pointer;
|
38 |
+
-webkit-user-select: none;
|
39 |
+
padding-right: 30px;
|
40 |
+
}
|
41 |
+
.btn-11 {
|
42 |
+
overflow: hidden;
|
43 |
+
}
|
44 |
+
.btn-11:hover{-webkit-animation: 0;}
|
45 |
+
.btn-11:before {
|
46 |
+
position: absolute;
|
47 |
+
content: '';
|
48 |
+
display: inline-block;
|
49 |
+
top: -180px;
|
50 |
+
left: 0;
|
51 |
+
width: 30px;
|
52 |
+
height: 100%;
|
53 |
+
background-color: #fff;
|
54 |
+
}
|
55 |
+
|
56 |
+
/*@-webkit-keyframes shiny-btn1 {
|
57 |
+
0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
|
58 |
+
40% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
|
59 |
+
70% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
|
60 |
+
100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
|
61 |
+
}
|
62 |
+
@-webkit-keyframes shiny-btn2 {
|
63 |
+
0% { top:74%; }
|
64 |
+
25% { top:73%; }
|
65 |
+
50% { top:72%; }
|
66 |
+
75% { top:73%; }
|
67 |
+
100% { top:74%; }
|
68 |
+
0% { right:0%; }
|
69 |
+
25% { right:-1%; }
|
70 |
+
50% { right:-3%; }
|
71 |
+
75% { right:-1%; }
|
72 |
+
100% { right:0%; }
|
73 |
+
|
74 |
+
}*/
|
75 |
+
.product_batch_size{position: relative; margin-top: 10px; float: right;}
|
76 |
+
.product_batch_size label{ margin-right: 23px;}
|
77 |
+
.update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
|
78 |
+
.tvc-notice-error {
|
79 |
+
display: block!important;
|
80 |
+
}
|
81 |
+
.configuration-section .text-right{text-align: right;}
|
82 |
+
#create_merchant_account{
|
83 |
+
background-color: #002BFC;
|
84 |
+
border-radius: 6px;
|
85 |
+
border: none;
|
86 |
+
padding: 9px 15px;
|
87 |
+
color: #ffffff;
|
88 |
+
font-size: 16px;
|
89 |
+
font-weight: 700;
|
90 |
+
min-width: 154px;
|
91 |
+
text-align: center;
|
92 |
+
height: 42px;
|
93 |
+
display: inline-flex;
|
94 |
+
align-items: center;
|
95 |
+
justify-content: center;
|
96 |
+
line-height: 24px;
|
97 |
+
}
|
98 |
+
@-webkit-keyframes tvc_popup_box_open {
|
99 |
+
0%{opacity: 0; margin-top:-20%;}
|
100 |
+
75%{margin-top: 5%;}
|
101 |
+
100%{opacity: 1;}
|
102 |
+
}
|
103 |
+
@keyframes tvc_popup_box_open {
|
104 |
+
0%{opacity: 0; margin-top:-20%;}
|
105 |
+
75%{margin-top: 5%;}
|
106 |
+
100%{opacity: 1;}
|
107 |
+
}
|
108 |
+
@-webkit-keyframes tvc_popup_box_close {
|
109 |
+
0%{opacity: 1;}
|
110 |
+
75%{opacity: 1; margin-top: : -20%;}
|
111 |
+
100%{opacity: 0;margin-top: 40%;}
|
112 |
+
}
|
113 |
+
@keyframes tvc_popup_box_close {
|
114 |
+
0%{opacity: 1;}
|
115 |
+
75%{opacity: 1; margin-top: -20%;}
|
116 |
+
100%{opacity: 0;margin-top: 40%;}
|
117 |
+
}
|
118 |
+
#tvc_onboarding_popup_box.tvc_popup_box_close, .tvc_popup_box_close{
|
119 |
+
display: none;
|
120 |
+
animation: tvc_popup_box_close 0.5s;
|
121 |
+
-webkit-animation: tvc_popup_box_close 0.5s;
|
122 |
+
-webkit-animation-fill-mode: forwards;
|
123 |
+
animation-fill-mode: forwards;
|
124 |
+
}
|
125 |
+
#tvc_onboarding_popup_box.tvc_popup_box{
|
126 |
+
overflow: hidden;
|
127 |
+
/*transform: translate(-50%, -50%);*/
|
128 |
+
z-index: 9999;
|
129 |
+
display: block;
|
130 |
+
animation: tvc_popup_box_open 0.5s;
|
131 |
+
-webkit-animation: tvc_popup_box_open 0.5s;
|
132 |
+
position: fixed;
|
133 |
+
left: 500px;
|
134 |
+
top: 10px;
|
135 |
+
}
|
136 |
+
#tvc_popup_box.tvc_popup_box {
|
137 |
+
width: 500px;
|
138 |
+
overflow: hidden;
|
139 |
+
background: #EEEEEE;
|
140 |
+
box-shadow: 0 0 10px black;
|
141 |
+
border-radius: 10px;
|
142 |
+
position: fixed;
|
143 |
+
top: 30%;
|
144 |
+
left: 50%;
|
145 |
+
margin-top: 100px;
|
146 |
+
transform: translate(-50%, -50%);
|
147 |
+
z-index: 9999;
|
148 |
+
padding: 10px;
|
149 |
+
text-align: center;
|
150 |
+
display: block;
|
151 |
+
animation: tvc_popup_box_open 0.5s;
|
152 |
+
-webkit-animation: tvc_popup_box_open 0.5s;
|
153 |
+
}
|
154 |
+
.alert-message {
|
155 |
+
text-align: right;
|
156 |
+
}
|
157 |
+
.alert {
|
158 |
+
position: relative;
|
159 |
+
padding: .75rem 1.25rem;
|
160 |
+
margin-bottom: 1rem;
|
161 |
+
border: 1px solid transparent;
|
162 |
+
border-radius: .25rem;
|
163 |
+
}
|
164 |
+
.alert-message .tvc-alert-success{display: inline-block;
|
165 |
+
border-radius: 500px;
|
166 |
+
border: 0;
|
167 |
+
padding-top: 0.5rem;
|
168 |
+
padding-bottom: 0.5rem;
|
169 |
+
color: #FFFFFF;
|
170 |
+
background-color: #66BB6A;
|
171 |
+
padding-left: 30px;
|
172 |
+
}
|
173 |
+
.alert-message .tvc-alert-error{display: inline-block;
|
174 |
+
border-radius: 500px;
|
175 |
+
border: 0;
|
176 |
+
padding-top: 0.5rem;
|
177 |
+
padding-bottom: 0.5rem;
|
178 |
+
color: #721c24;
|
179 |
+
background-color: #f8d7da;
|
180 |
+
padding-left: 30px;
|
181 |
+
}
|
182 |
+
.alert-message .tvc-alert-warning{display: inline-block;
|
183 |
+
border-radius: 500px;
|
184 |
+
border: 0;
|
185 |
+
padding-top: 0.5rem;
|
186 |
+
padding-bottom: 0.5rem;
|
187 |
+
color: #856404;
|
188 |
+
background-color: #fff3cd;
|
189 |
+
padding-left: 30px;
|
190 |
+
}
|
191 |
+
.alert-message .tvc-alert-success:after {
|
192 |
+
content: '\2713';
|
193 |
+
position: absolute;
|
194 |
+
left: 12px;
|
195 |
+
}
|
196 |
+
.alert-primary{
|
197 |
+
padding: 10px;
|
198 |
+
color: #004085;
|
199 |
+
background-color: #cce5ff;
|
200 |
+
border-color: #b8daff;
|
201 |
+
}
|
202 |
+
.update-nag, .updated, .error, .is-dismissible { display: none; }
|
203 |
+
.loader-section {
|
204 |
+
position: fixed;
|
205 |
+
top: 0;
|
206 |
+
bottom: 0;
|
207 |
+
left: 0;
|
208 |
+
right: 0;
|
209 |
+
height: 100%;
|
210 |
+
background-color: rgba(255,255,255,0.85);
|
211 |
+
display: flex;
|
212 |
+
justify-content: center;
|
213 |
+
align-items: center;
|
214 |
+
z-index: 999;
|
215 |
+
}
|
216 |
+
.loader-section img {
|
217 |
+
max-width: 50px;
|
218 |
+
}
|
219 |
+
.site-header{left: 160px !important;}
|
220 |
+
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
221 |
+
#tvc_merchant_section{display: flex; align-items: center;}
|
222 |
+
/*google button*/
|
223 |
+
.google-btn {
|
224 |
+
margin: 0 auto;
|
225 |
+
width: 184px;
|
226 |
+
height: 42px;
|
227 |
+
background-color: #4285f4;
|
228 |
+
border-radius: 2px;
|
229 |
+
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
|
230 |
+
margin-bottom: 15px;
|
231 |
+
}
|
232 |
+
.google-btn .google-icon-wrapper {
|
233 |
+
position: absolute;
|
234 |
+
margin-top: 1px;
|
235 |
+
margin-left: 1px;
|
236 |
+
width: 40px;
|
237 |
+
height: 40px;
|
238 |
+
border-radius: 2px;
|
239 |
+
background-color: #fff;
|
240 |
+
}
|
241 |
+
.google-btn .google-icon {
|
242 |
+
position: absolute;
|
243 |
+
margin-top: 11px;
|
244 |
+
margin-left: 11px;
|
245 |
+
width: 18px;
|
246 |
+
height: 18px;
|
247 |
+
}
|
248 |
+
.google-btn .btn-text {
|
249 |
+
float: right;
|
250 |
+
margin: 11px 11px 0 0;
|
251 |
+
color: #fff;
|
252 |
+
font-size: 14px;
|
253 |
+
letter-spacing: 0.2px;
|
254 |
+
font-family: "Roboto";
|
255 |
+
}
|
256 |
+
.google-btn:hover {
|
257 |
+
box-shadow: 0 0 6px #4285f4;
|
258 |
+
cursor: pointer;
|
259 |
+
}
|
260 |
+
.google-btn:active {
|
261 |
+
background: #1669f2;
|
262 |
+
}
|
263 |
+
.google-btn .btn-text.mr-35{margin-right: 35px;}
|
264 |
+
|
265 |
+
/*google button*/
|
266 |
+
#tvc_popup_box span.google_connect_url{
|
267 |
+
cursor: pointer;
|
268 |
+
color: #7B5DFC;
|
269 |
+
}
|
270 |
+
/*.google_connect_url{
|
271 |
+
display: block;
|
272 |
+
background: white;
|
273 |
+
color: #444;
|
274 |
+
width: 200px;
|
275 |
+
border-radius: 5px;
|
276 |
+
border: thin solid #888;
|
277 |
+
box-shadow: 1px 1px 1px grey;
|
278 |
+
white-space: nowrap;
|
279 |
+
margin: 0 auto;
|
280 |
+
margin-bottom: 8px;
|
281 |
+
}
|
282 |
+
.google_connect_url:hover {
|
283 |
+
cursor: pointer;
|
284 |
+
}
|
285 |
+
.google_connect_url img {width: 30px;
|
286 |
+
height: 30px;
|
287 |
+
margin: 8px; display: inline-block;
|
288 |
+
vertical-align: middle;}
|
289 |
+
.google_connect_url span {
|
290 |
+
display: inline-block;
|
291 |
+
vertical-align: middle;
|
292 |
+
padding-left: 5px;
|
293 |
+
padding-right: 5px;
|
294 |
+
font-size: 14px;
|
295 |
+
font-weight: bold;
|
296 |
+
|
297 |
+
}
|
298 |
+
*/
|
299 |
+
#tvc_ads_skip_confirm ul{ padding: 0;
|
300 |
+
margin: 0;
|
301 |
+
list-style: auto;
|
302 |
+
margin-left: 20px;}
|
303 |
+
#tvc_ads_skip_confirm ul li{font-size: 15px;
|
304 |
+
line-height: 22px;
|
305 |
+
margin-bottom: 5px;}
|
306 |
+
.cstmcheck-item-pro img{position: absolute;
|
307 |
+
left: -2px;
|
308 |
+
top: 0;}
|
309 |
+
.cstmcheck-item-pro label{padding-left: 13px !important;}
|
310 |
+
|
311 |
+
/*dashboad*/
|
312 |
+
.dashbrdpage-wrap .loading-bg-effect{
|
313 |
+
font-size: 0;
|
314 |
+
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
|
315 |
+
background-size: 400% 400%;
|
316 |
+
animation: gradient 15s ease infinite;
|
317 |
+
min-width: 30px;
|
318 |
+
}
|
319 |
+
#add_loading{height: 50px;}
|
320 |
+
.dashbrdpage-wrap .is_loading, .pmax-campaign .is_loading{
|
321 |
+
background: rgba(255,255,255,0.65) url('../images/ajax-loader.gif') no-repeat 50% 50%;
|
322 |
+
-webkit-transition: background-color 0;
|
323 |
+
transition: background-color 0;
|
324 |
+
background-size: 50px;
|
325 |
+
}
|
326 |
+
.pp-modal .is_loading{
|
327 |
+
background: rgba(255,255,255,0.65) url('../images/ajax-loader.gif') no-repeat 50% 50%;
|
328 |
+
-webkit-transition: background-color 0;
|
329 |
+
transition: background-color 0;
|
330 |
+
background-size: 50px;
|
331 |
+
opacity: 0.5;
|
332 |
+
cursor: not-allowed;
|
333 |
+
}
|
334 |
+
.dashbrdpage-wrap .loading-bg-effect img{display: none;}
|
335 |
+
@keyframes gradient {
|
336 |
+
0% {
|
337 |
+
background-position: 0% 50%;
|
338 |
+
}
|
339 |
+
50% {
|
340 |
+
background-position: 100% 50%;
|
341 |
+
}
|
342 |
+
100% {
|
343 |
+
background-position: 0% 50%;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
.product_performance_report table, .medium_performance_report table, .campaign_performance_report table{min-height: 200px;}
|
347 |
+
|
348 |
+
.errmscntbx .tvc-nb-spinner {
|
349 |
+
display: inline-block;
|
350 |
+
position: absolute;
|
351 |
+
top: 32px;
|
352 |
+
right: 22px;
|
353 |
+
margin-left: 10px;
|
354 |
+
width: 30px;
|
355 |
+
height: 30px;
|
356 |
+
background: transparent;
|
357 |
+
border-top: 3px solid #0769D7;
|
358 |
+
border-right: 3px solid transparent;
|
359 |
+
border-radius: 50%;
|
360 |
+
-webkit-animation: 1s spin linear infinite;
|
361 |
+
animation: 1s tvc-spin linear infinite;
|
362 |
+
}
|
363 |
+
/*onboarding page*/
|
364 |
+
.tvc-dropdown{
|
365 |
+
max-width: 400px;
|
366 |
+
display: block;
|
367 |
+
position: relative;
|
368 |
+
}
|
369 |
+
|
370 |
+
.tvc-dropdown-content{
|
371 |
+
display: none;
|
372 |
+
border-top: none;
|
373 |
+
border-top-left-radius: 0;
|
374 |
+
border-top-right-radius: 0;
|
375 |
+
box-shadow: 0px 3px 6px rgb(0 0 0 / 12%);
|
376 |
+
overflow: hidden;
|
377 |
+
}
|
378 |
+
.tvc-select-items {
|
379 |
+
height: 150px;
|
380 |
+
overflow-y: auto;
|
381 |
+
|
382 |
+
left: 0;
|
383 |
+
right: 0;
|
384 |
+
z-index: 99;
|
385 |
+
}
|
386 |
+
.tvc-dropdown-content .tvc-select-items .option, .tvc-dropdown-content .option, .tvc-dropdown-content .tvc-select-items option{
|
387 |
+
padding: 6px 14px;
|
388 |
+
user-select: none;
|
389 |
+
-webkit-user-select: none;
|
390 |
+
cursor: pointer;
|
391 |
+
margin-bottom: 6px;
|
392 |
+
white-space: normal; /* collapse WS, wrap as necessary, collapse LB */
|
393 |
+
white-space: nowrap; /* collapse WS, no wrapping, collapse LB */
|
394 |
+
white-space: pre; /* preserve WS, no wrapping, preserve LB */
|
395 |
+
white-space: pre-wrap; /* preserve WS, wrap as necessary, preserve LB */
|
396 |
+
white-space: inherit; /* all as parent element */
|
397 |
+
}
|
398 |
+
|
399 |
+
.tvc-dropdown-content .tvc-select-items .option:hover, .tvc-dropdown-content .tvc-select-items option:hover, .tvc-dropdown-content .option:hover{
|
400 |
+
background-color: lightgray;
|
401 |
+
}
|
402 |
+
|
403 |
+
.tvc-dropdown-header{
|
404 |
+
padding: 2px 10px;
|
405 |
+
background-color: #fff;
|
406 |
+
border: 1px solid #C6C6C6;
|
407 |
+
border-radius: 6px;
|
408 |
+
box-sizing: border-box;
|
409 |
+
cursor: pointer;
|
410 |
+
display: block;
|
411 |
+
height: 42px;
|
412 |
+
user-select: none;
|
413 |
+
-webkit-user-select: none;
|
414 |
+
top: 50%;
|
415 |
+
width: 400px;
|
416 |
+
vertical-align: middle;
|
417 |
+
display: table-cell;
|
418 |
+
}
|
419 |
+
.tvc-dropdown-content .tvc-ga4-option-more, .tvc-dropdown-content .tvc-ua-option-more{
|
420 |
+
text-decoration: none;
|
421 |
+
color: #002BFC;
|
422 |
+
margin-bottom: 0;
|
423 |
+
}
|
424 |
+
.tvc-dropdown .tvc-dropdown-header:before, .tvc-dropdown .tvc-dropdown-header:before {
|
425 |
+
content: "";
|
426 |
+
background-image: url(../images/step-down-arrow.png);
|
427 |
+
width: 24px;
|
428 |
+
height: 24px;
|
429 |
+
background-repeat: no-repeat;
|
430 |
+
background-size: 100%;
|
431 |
+
position: absolute;
|
432 |
+
right: 10px;
|
433 |
+
top: 22px;
|
434 |
+
transform: translateY(-50%);
|
435 |
+
}
|
436 |
+
/*end onboarding page*/
|
437 |
+
.fa-check-circle:before{content:"";background-image:url(../images/icon/tick-round.svg);width:24px;height:24px;background-repeat:no-repeat;background-size:100%; display: block; margin: 0 auto;}
|
438 |
+
.fa-exclamation-circle:before{content:"";background-image:url(../images/exclaimation.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;display: block; margin: 0 auto;}
|
439 |
+
.fa-question-circle:before{content:"";background-image:url(../images/help-icon.png);width:16px;height:16px;background-repeat:no-repeat;background-size:100%;position:absolute;}
|
440 |
+
|
441 |
+
.form-check .form-check-input{
|
442 |
+
height: 1em;
|
443 |
+
margin-top: 0.25em;
|
444 |
+
vertical-align: top;
|
445 |
+
background-color: #fff;
|
446 |
+
background-repeat: no-repeat;
|
447 |
+
background-size: contain;
|
448 |
+
border: 1px solid rgba(0,0,0,.25);
|
449 |
+
-webkit-appearance: none;
|
450 |
+
-moz-appearance: none;
|
451 |
+
appearance: none;
|
452 |
+
-webkit-print-color-adjust: exact;
|
453 |
+
}
|
454 |
+
.form-check-input:checked {
|
455 |
+
background-color: #0d6efd;
|
456 |
+
border-color: #0d6efd;
|
457 |
+
}
|
458 |
+
.form-switch .form-check-input:checked::before{
|
459 |
+
content: none;
|
460 |
+
}
|
461 |
+
.select2-container--open{
|
462 |
+
z-index: 9999;
|
463 |
+
}
|
464 |
+
/*rc */
|
465 |
+
|
466 |
+
/* comman style----------------------*/
|
467 |
+
body{margin:0;padding:0;font-family:'Roboto', sans-serif;font-size:14px;color:#515151;scroll-behavior:smooth;overflow-x:hidden;font-weight:normal;}
|
468 |
+
a{text-decoration:none;color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
469 |
+
a:hover{color:#1E1E1E;text-decoration:none;}
|
470 |
+
a:focus{outline:none;text-decoration:none;}
|
471 |
+
:focus{outline:none;}
|
472 |
+
h1,h2,h3,h4,h5,h6{margin:0 0 10px 0;color:#1E1E1E;padding:0;line-height:1.2;font-family:'Roboto', sans-serif;text-transform:none;font-weight:700;}
|
473 |
+
h1{font-size:36px;}
|
474 |
+
h2{font-size:30px; line-height: 42px;}
|
475 |
+
h3{font-size:24px;}
|
476 |
+
h4{font-size:18px;line-height:24px;}
|
477 |
+
h5{font-size:16px; line-height: 24px;}
|
478 |
+
h6{font-size:14px;line-height:22px;}
|
479 |
+
h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:inherit;text-decoration:none;font-size:inherit;}
|
480 |
+
h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{text-decoration:none;}
|
481 |
+
small{display:block;margin-top:4px;}
|
482 |
+
p{margin:0 0 20px 0;line-height:22px;}
|
483 |
+
ul, ol{margin:0;}
|
484 |
+
button{font-family:'Roboto', sans-serif;cursor:pointer;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;line-height:1; box-shadow:none;}
|
485 |
+
strong, b{font-weight:600;}
|
486 |
+
*,::after,::before{box-sizing:border-box;}
|
487 |
+
select{-moz-appearance:none;-webkit-appearance:none;background-image:url(../images/selectarrow-new.png);background-repeat:no-repeat;background-position:right center;border:1px solid #C6C6C6;border-radius:6px;}
|
488 |
+
img{image-rendering: -moz-crisp-edges;image-rendering: -o-crisp-edges;image-rendering: -webkit-optimize-contrast;
|
489 |
+
image-rendering: crisp-edges;-ms-interpolation-mode: nearest-neighbor;
|
490 |
+
}
|
491 |
+
.container{max-width:1170px;margin:0 auto;padding:0 15px;}
|
492 |
+
.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
|
493 |
+
.primary-c{color:#002BFC;}
|
494 |
+
.primary-bg{background-color:#002BFC;}
|
495 |
+
/*------ onboarding page ------*/
|
496 |
+
.onbordingbody{padding-top: 54px;}
|
497 |
+
/*----- onboarding header ------*/
|
498 |
+
.site-header{padding:12px 0;background-color:#ffffff;position:fixed;z-index:10;top:0;left:0;width:100%;height:54px;box-shadow:0px 1px 6px rgba(0, 0, 0, 0.12);}
|
499 |
+
.brand{max-width:138px;}
|
500 |
+
.brand img{max-width:138px;}
|
501 |
+
/*---- onborading style ------*/
|
502 |
+
.onbording-wrapper{padding:30px 0;}
|
503 |
+
.smallcontainer{max-width:881px;margin:0 0 0 auto;}
|
504 |
+
.onbordingtop{max-width:622px;padding:0 35px;text-align:center;margin-bottom:24px;}
|
505 |
+
.onbordingtop h2{line-height:35px;margin-bottom:10px;}
|
506 |
+
.onbordingtop p{font-size:16px;line-height:24px;margin-bottom:0px;}
|
507 |
+
.onboardingstepwrap{max-width:622px;width:100%;flex:1;padding:0 15px}
|
508 |
+
.onbordording-step{border:1px solid #E9E9E9;border-radius:6px;margin-bottom:15px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
509 |
+
.selectedactivestep{border:2px solid #2FBB0E;}
|
510 |
+
.stepleftround{max-width:42px;height:42px;display:flex;justify-content:center;align-items:center;border:1px dashed #C6C6C6;border-radius:100%;flex:0 0 42px;margin-right:24px;}
|
511 |
+
.stepleftround img{opacity:0;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
512 |
+
.selectedactivestep .stepleftround{background-color:#2FBB0E;border:1px solid #2FBB0E;}
|
513 |
+
.selectedactivestep .stepleftround img{opacity:1;}
|
514 |
+
.helpicon{margin-left:8px;display:inline-block;margin-top:-1px;vertical-align:top;}
|
515 |
+
.helpicon img{vertical-align:middle;}
|
516 |
+
.stepdtltop{display:flex;cursor:pointer;align-items:center;padding:24px 60px 24px 24px;position:relative;}
|
517 |
+
.stepdtltop:before{content:"";background-image:url(../images/step-down-arrow.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;position:absolute;right:30px;top:50%;transform:translateY(-50%);}
|
518 |
+
.stepdetwrap p{margin-bottom:0px;}
|
519 |
+
.stepdtltop h4{line-height:24px;font-weight:500;margin-bottom:8px;}
|
520 |
+
.stepmoredtlwrp{height:0;opacity:0;overflow:hidden;visibility:hidden;padding-left:90px;padding-right:60px;transition:all 0.5s ease-in-out 0s;-moz-transition:all 0.5s ease-in-out 0s;-webkit-transition:all 0.5s ease-in-out 0s;-o-transition:all 0.5s ease-in-out 0s;}
|
521 |
+
.stepmoredtl{padding-top:24px;padding-bottom:24px;border-top:1px solid #E9E9E9;}
|
522 |
+
.activestep .stepmoredtlwrp{height:auto;opacity:1;visibility:visible;}
|
523 |
+
.activestep .stepdtltop:before{background-image:url(../images/step-up-arrow.png);}
|
524 |
+
.stepmoredtl h5{font-weight:500;margin-bottom:12px;}
|
525 |
+
input[type="radio"], input[type="checkbox"]{margin:0;}
|
526 |
+
/*----custom radio -----*/
|
527 |
+
.cstmrdobtn-item{margin-bottom:10px;}
|
528 |
+
.cstmrdobtn-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
529 |
+
.cstmrdobtn-item input[type="radio"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
530 |
+
.cstmrdobtn-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:100%;background-color:transparent;}
|
531 |
+
.cstmrdobtn-item .checkmark:after{content:"";position:absolute;opacity:0;left:2px;top:5px;width:12px;height:12px;background:#002BFC;border-radius:100%;-webkit-transform:scale(0);transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
532 |
+
.cstmrdobtn-item input[type="radio"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);}
|
533 |
+
/*----custom checkbox -----*/
|
534 |
+
.cstmcheck-item label{display:inline-block;position:relative;padding-left:25px;margin-bottom:0px;cursor:pointer;font-size:14px;line-height:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none; min-height:20px;}
|
535 |
+
.cstmcheck-item input[type="checkbox"]{position:absolute;opacity:0;cursor:pointer;height:0;width:0;}
|
536 |
+
.cstmcheck-item .checkmark:before{content:"";position:absolute;top:3px;left:0;height:16px;width:16px;border:1px solid #C6C6C6;border-radius:3px;background-color:#ffffff;border-color:#C6C6C6;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
537 |
+
.cstmcheck-item .checkmark:after{content:"";position:absolute;opacity:1;left:2px;top:5px;width:12px;height:10px;background-image:url(../images/check-active.png);background-repeat:no-repeat;background-size:100%;-webkit-transform:scale(0);transform:scale(0);-ms-transform:scale(0);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
538 |
+
.cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:before{background-color:#002BFC;border-color:#002BFC;}
|
539 |
+
.cstmcheck-item input[type="checkbox"]:checked ~ .checkmark:after{opacity:1;-webkit-transform:scale(1);transform:scale(1);-ms-transform:scale(1);}
|
540 |
+
|
541 |
+
.form-row{margin-bottom:24px;}
|
542 |
+
.chckbxbgbx{background-color:#F1F6FA;padding:13px 15px;border-radius:6px;display:flex;}
|
543 |
+
.chckbxbgbx .cstmcheck-item{margin-right:30px;}
|
544 |
+
.chckbxbgbx .cstmcheck-item:last-child{margin-right:0px;}
|
545 |
+
.stepnextbtn{display:inline-block;width:154px;height:42px;background-color:#2FBB0E;text-align:center;padding:10px;border-radius:6px;color:#ffffff;font-size:16px;font-weight:700;box-shadow:none;border:none;cursor:pointer;}
|
546 |
+
.stepnextbtn:hover{background-color:#28d000;color:#ffffff;}
|
547 |
+
|
548 |
+
.slctunivr-filed{padding-left:25px;margin-top:12px;}
|
549 |
+
.slect2bx{border:1px solid #C6C6C6;width:258px;height:42px;}
|
550 |
+
.botslectbxitem{margin-bottom:9px;}
|
551 |
+
.botslectbxitem:last-child{margin-bottom:0px;}
|
552 |
+
.selcttopwrap{display:flex;align-items:center;margin-bottom:24px;}
|
553 |
+
.orwrp{padding:0 18px;font-size:16px;line-height:24px;color:#515151;}
|
554 |
+
.cretnewbtn{background-color:transparent;cursor:pointer;padding:0;border:none;box-shadow:none;color:#002BFC;font-size:16px;line-height:24px;}
|
555 |
+
.cretnewbtn:hover{color:#000000;}
|
556 |
+
.cretnewbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
557 |
+
.dsplcolmview{flex-direction:column;}
|
558 |
+
.dsplcolmview .cstmcheck-item{margin-bottom:9px;}
|
559 |
+
.dsplcolmview .cstmcheck-item:last-child{margin-bottom:0px;}
|
560 |
+
.stepnotewrp{margin-bottom:24px;color:#515151;margin-left:-65px;margin-right:-32px;padding-top:15px;border-top:1px solid #E9E9E9;font-size:10px;line-height:16px;}
|
561 |
+
.onbording-right{max-width:289px;flex:1;padding:0 15px;}
|
562 |
+
.sidebrcontainer{position:sticky;top:84px;}
|
563 |
+
.onbrd-rdmbx{background-color:#FBF7EE;padding:22px 24px;border-radius:6px;margin-bottom:24px;}
|
564 |
+
.rdm-amnt{font-size:42px;line-height:50px;letter-spacing:-0.06em;color:#002BFC;font-weight:700;margin-bottom:18px;}
|
565 |
+
.rdm-amnt small{color:#1E1E1E;font-size:14px;line-height:22px;letter-spacing:0;font-weight:400;}
|
566 |
+
.lrnmorbtn{text-align:right;display:inherit;}
|
567 |
+
.lrnmorbtn img{vertical-align:middle;}
|
568 |
+
.lrnmorbtn:hover img{filter:grayscale(1);-webkit-filter:grayscale(1);}
|
569 |
+
.onbrdrgt-nav ul{margin:0;padding:0;list-style:none;}
|
570 |
+
.onbrdrgt-nav ul li{padding:0 24px;margin-bottom:9px;}
|
571 |
+
.onbrdrgt-nav ul li a{display:inline-block;line-height:22px;text-decoration:none;color:#1E1E1E;text-decoration:underline;}
|
572 |
+
.onbrdrgt-nav ul li a:hover{color:#000000;text-decoration:none}
|
573 |
+
/*--- popoup style -----*/
|
574 |
+
.onbrd-popupwrp{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
575 |
+
.onbrdppmain{display:flex;width:100%;height:100%;padding:30px 15px;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.6);}
|
576 |
+
.onbrdnpp-cntner{background-color:#ffffff;border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);max-height:100%;overflow:auto;}
|
577 |
+
.onbrdnpp-hdr{padding:15px 40px 15px 15px;border-bottom:1px solid #E9E9E9;position:relative;}
|
578 |
+
.onbrdnpp-hdr h4{margin-bottom:0px;font-weight:500;}
|
579 |
+
.onbrdpp-body{padding:15px;font-size:14px;line-height:24px;color:#515151;}
|
580 |
+
.onbrdpp-body p{line-height:24px;}
|
581 |
+
.onbrdpp-body p:last-child{margin-bottom:0px; padding-left:1rem; }
|
582 |
+
.onbrdpp-body p strong{color:#1e1e1e;}
|
583 |
+
.onbrdpp-body h5{margin-bottom:15px;}
|
584 |
+
.onbrdpp-body ul,.onbrdpp-body ol{padding:0;margin:0;}
|
585 |
+
.onbrdpp-body ul li, .onbrdpp-body ol li{font-size:16px;line-height:24px;margin-bottom:12px;}
|
586 |
+
.onbrdpp-body ul li:last-child, .onbrdpp-body ol li:last-child{margin-bottom:0px;}
|
587 |
+
.onbrdpp-body ol{padding-left:20px;}
|
588 |
+
.onbrdpp-body ol li{padding-left:5px;}
|
589 |
+
.onbrdpp-body em{font-weight:500;font-style:italic;color:#1e1e1e;}
|
590 |
+
.ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
|
591 |
+
.ggladsppcntnr{width:100%;max-width:390px;}
|
592 |
+
.ppfooterbtn{padding:15px 15px 24px;}
|
593 |
+
.ppblubtn{background-color:#002BFC;border-radius:6px;border:none;padding:9px 15px;color:#ffffff;font-size:16px;font-weight:700;min-width:154px;text-align:center;height:42px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
|
594 |
+
.ppblubtn:hover{background-color:#0022c7;}
|
595 |
+
.showpopup{opacity:1;visibility:visible;}
|
596 |
+
.scrlnone{overflow:hidden;}
|
597 |
+
.acccretppcntnr{width:100%;max-width:592px;}
|
598 |
+
.congratppcntnr{width:100%;max-width:592px;}
|
599 |
+
.cngrtppdtl-item{display:flex;justify-content:space-between;margin-bottom:9px;color:#515151;font-size:14px;line-height:22px;}
|
600 |
+
.congratppbody{max-width:454px;margin:0 auto;text-align:center;}
|
601 |
+
.cngtrpplft{position:relative;padding-left:22px;}
|
602 |
+
.cngrtchckicon{position:absolute;left:0;top:3px;}
|
603 |
+
.cngtrpprgt{text-align:right;font-weight:700; flex: 1 1 0px;}
|
604 |
+
.congratppcntnr .ppfooterbtn{text-align:center;}
|
605 |
+
.congratppcntnr .onbrdnpp-hdr{padding-top:30px;padding-left:40px;text-align:center;border-bottom:none;}
|
606 |
+
.congratppcntnr .onbrdnpp-hdr h2{font-size:42px;margin-bottom:0px;line-height:48px;background-color:#002BFC;background-image:linear-gradient(45deg, #002BFC, #00D2F6);background-size:100%;background-repeat:repeat;-webkit-background-clip:text;-webkit-text-fill-color:transparent;-moz-background-clip:text;-moz-text-fill-color:transparent;}
|
607 |
+
/*--- create merchnat popup -----*/
|
608 |
+
.crtemrchntpp .onbrdppmain{background-color:#ffffff;display:inherit;}
|
609 |
+
.crtemrchntppcntnr{width:100%;padding:0px 20px;box-shadow:none;}
|
610 |
+
.crtemrchntpp .onbrdpp-body{max-width:780px;margin:0 auto;padding:0 15px;font-size:14px;line-height:22px;}
|
611 |
+
.crtemrchntpp .onbrdpp-body h4{margin-bottom:9px;color:#1e1e1e}
|
612 |
+
.crtemrchnpp-lft{padding-right:15px;max-width:506px;border-right:1px solid #E9E9E9;}
|
613 |
+
.crtemrchnpp-right{padding-left:15px;max-width:273px;}
|
614 |
+
.crtemrchnpp-lft .ppfooterbtn{padding:0;}
|
615 |
+
.crtemrchpplft-top p{line-height:22px;color:#515151;margin-bottom:0px;}
|
616 |
+
.claimedbx{padding:10px 15px;border-radius:6px;background-color:#F3F0E4;color:#1E1E1E;font-weight:500;margin-top:24px;}
|
617 |
+
.mrchntformwrp{margin-top:15px;}
|
618 |
+
.fromfiled{border:1px solid #C6C6C6;border-radius:6px;width:100%; max-width:258px;line-height:22px;font-size:14px;height:42px;padding:10px 15px;color:#1E1E1E;font-family:'Roboto', sans-serif;}
|
619 |
+
.fromfiled::-webkit-input-placeholder{color:#B6B6B6;opacity:1;}
|
620 |
+
.fromfiled::-moz-placeholder{color:#B6B6B6;opacity:1;}
|
621 |
+
.fromfiled:-ms-input-placeholder{color:#B6B6B6;opacity:1;}
|
622 |
+
.fromfiled:-moz-placeholder{color:#B6B6B6;opacity:1;}
|
623 |
+
.mt15{margin-top:15px;}
|
624 |
+
.crtemrchnpp-lft .cstmcheck-item{font-size:12px;}
|
625 |
+
.crtemrchnpp-lft .cstmcheck-item label{font-size:12px;line-height:22px;}
|
626 |
+
.cstmcheck-item strong{color:#1e1e1e;font-weight:500;}
|
627 |
+
.inputinfotxt{margin-top:6px;font-size:12px;line-height:18px;color:#515151}
|
628 |
+
.crtemrchnpp-right h6{font-weight:500;margin-bottom:0;}
|
629 |
+
.crtemrchnpp-right ul{margin:18px 0 0 0;padding:0;list-style:none}
|
630 |
+
.crtemrchnpp-right ul li{margin-bottom:9px;font-size:14px;line-height:22px;}
|
631 |
+
.congratppdtlwrp{text-align:left;}
|
632 |
+
/*---- alert bx ----*/
|
633 |
+
.alertbx{padding:15px 42px 15px 15px;opacity:0;width:90%;visibility:hidden;z-index:11;position:fixed;max-width:592px;font-size:16px;border-radius:6px;line-height:24px;box-shadow:0px 3px 6px rgba(0, 0, 0, 0.18);top:0;left:50%;transform:translateX(-50%);-ms-transform:translateX(-50%);-webkit-transform:translateX(-50%);transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
634 |
+
.alertbx.show{top:35px;opacity:1;visibility:visible;}
|
635 |
+
.bluealertbx{background-color:#002BFC;color:#ffffff;}
|
636 |
+
.alertclsbtn{cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);}
|
637 |
+
|
638 |
+
/* --- all other pages cooman style ------*/
|
639 |
+
.trnseffect{transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
640 |
+
.container-fluid{width:100%;margin:0 auto;padding:0 15px;}
|
641 |
+
.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}
|
642 |
+
.cvrs-btn{border-radius:100px;border:none;box-shadow:none;padding:9px 24px;font-weight:500;}
|
643 |
+
.greenbtn{background-color:#CAF8BF;color:#2FBB0E;}
|
644 |
+
.greenbtn:hover{background-color:#2FBB0E;color:#ffffff;}
|
645 |
+
.upgradebtn{background-color:#FBC53B;border-radius:6px;color:#1E1E1E;padding:9px 24px;border:none;line-height:24px;height:42px;font-size:16px;font-weight:500;text-align:center;}
|
646 |
+
.upgradebtn:hover{background-color:#1E1E1E;color:#ffffff;}
|
647 |
+
.bodyrightpart{padding:20px;background-color:#f1f1f1;}
|
648 |
+
|
649 |
+
/*----- promotion band -----*/
|
650 |
+
.promobandtop{padding:6px 0px;margin-bottom:24px;background:#002bfc;background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);}
|
651 |
+
.promobandtop .row{align-items:center;}
|
652 |
+
.promoleft{padding:0 15px;flex:1;}
|
653 |
+
.promobandmsg{font-size:14px;color:#ffffff;line-height:22px;}
|
654 |
+
.promoright{display:flex;padding:0 20px 0 15px;align-items:center;max-width:171px}
|
655 |
+
.prmoupgrdbtn .upgradebtn{font-size:14px;height:30px;padding-top:5px;padding-bottom:5px;line-height:22px;}
|
656 |
+
.prmoclsbtn{margin-left:20px;cursor:pointer;line-height:0;}
|
657 |
+
/*----- error msg top -----*/
|
658 |
+
.errormsgtopbx{margin-bottom:24px}
|
659 |
+
.errmscntbx{border-radius:300px;display:inline-flex;flex-wrap:wrap;align-items:center;padding:6px 15px;box-shadow:0px 1px 12px rgba(0, 0, 0, 0.06);background-color:#ffffff;font-size:14px;line-height:22px;}
|
660 |
+
.errmsgicon{margin-right:6px;line-height:0px;min-width:20px;vertical-align:middle;}
|
661 |
+
.errmsglft{color:#FA424D;display:flex;align-items:center;}
|
662 |
+
.errmsgright{border-left:1px solid #C6C6C6;padding-left:15px;margin-left:45px;}
|
663 |
+
.errmsgright a{color:#0083FC;}
|
664 |
+
.errmsgright a:hover{color:#1e1e1e;}
|
665 |
+
|
666 |
+
/*---- header ----*/
|
667 |
+
.header{padding:24px 20px 20px 20px;background-color:#ffffff;border-radius:6px;position:relative;}
|
668 |
+
.hdrtpleft{display:flex;padding:0 15px;align-items:center;max-width:66.6666%;flex:0 0 66.66666%;}
|
669 |
+
.brandlogo{line-height:0}
|
670 |
+
.brandlogo img{max-width:138px;}
|
671 |
+
.hdrcntcbx{padding-left:15px;margin-left:15px;border-left:1px solid #C6C6C6;font-size:14px;line-height:22px;}
|
672 |
+
.hdrcntcbx span{color:#0083FC;display:inline-block;}
|
673 |
+
.hdrtpright{display:flex;padding:0 15px;max-width:33.333333%;flex:0 0 33.33333%;justify-content:flex-end;}
|
674 |
+
.hustleplanbtn .cvrs-btn{font-size:12px;padding:6px 12px;}
|
675 |
+
.hdrnotiwrp{display:flex;margin-left:22px;align-items:flex-start;}
|
676 |
+
.notialrt{background-color:#FA424D;color:#ffffff;font-size:10px;line-height:12px;border-radius:30px;padding:2px 4px 2px;margin-left:-10px;}
|
677 |
+
|
678 |
+
.mblhdrcntcbx{display: none; flex: 0 0 100%; max-width: 100%;}
|
679 |
+
|
680 |
+
/*------ sync product style start -----*/
|
681 |
+
|
682 |
+
/*---- navinfo section ------*/
|
683 |
+
.navinfowrap{margin-top:20px;}
|
684 |
+
.navinfotopnav{padding:16px 0px 0;background-color: #ffffff; border-bottom:1px solid #E9E9E9; position: sticky; top: 0; z-index: 2;
|
685 |
+
overflow: hidden; border-radius:6px 6px 0 0;
|
686 |
+
}
|
687 |
+
.navinfotopnav ul{margin:0;padding:0;list-style:none;display:inline-flex;flex-wrap:wrap}
|
688 |
+
.navinfotopnav ul li a{padding:0 15px 16px;display:flex;align-items:center;position:relative;font-size:16px;font-weight:500;line-height:1;color:#515151;}
|
689 |
+
.navinfotopnav ul li a:before{content:"";opacity:0;position:absolute;left:0;bottom:-1px;width:100%;height:2px;background-color:#515151;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
690 |
+
.navinfoicon{margin-right:8px;line-height:0;}
|
691 |
+
.navinfotopnav ul li a:hover:before{opacity:1;}
|
692 |
+
.navinfotopnav ul li.active a{color: #002BFC}
|
693 |
+
.navinfotopnav ul li.active a:before{opacity:1;background-color:#002BFC;}
|
694 |
+
.navifosummary{padding:20px; background-color: #ffffff; border-radius: 0 0 6px 6px;}
|
695 |
+
.navifosummary .row{margin-left:-10px;margin-right:-10px;}
|
696 |
+
.navsmryitem{max-width:20%;flex:0 0 20%;padding:0 10px;}
|
697 |
+
.navsmrybx{background-color:#ffffff;border-radius:6px;box-shadow:0px 1px 9px rgba(0, 0, 0, 0.15);padding:24px;min-height:124px}
|
698 |
+
.navsmrysmalltxt{color:#515151;margin-bottom:6px;}
|
699 |
+
.navsmrybigtxt{font-size:42px;color:#1e1e1e;font-weight:500;line-height:48px;}
|
700 |
+
|
701 |
+
/*---- scalability banner ------*/
|
702 |
+
.scalability-wrp{margin-top:24px;}
|
703 |
+
.scalabilitybx{background:linear-gradient(90deg, #002BFC -12.5%, #00CFF6 103.95%);padding:30px 25px;}
|
704 |
+
.col-padd{padding:0 15px;}
|
705 |
+
.scalabilitybx .row{align-items:center;}
|
706 |
+
.w750container{max-width:780px;margin:0 auto;}
|
707 |
+
.sclabilityleft{max-width:465px;}
|
708 |
+
.sclabilityright{max-width:331px;padding-left:41px}
|
709 |
+
.sclabilityleft h2{color:#ffffff;line-height:38px;margin-bottom:12px;}
|
710 |
+
.sclabilityleft p{font-size:16px;line-height:24px;color:#ffffff;}
|
711 |
+
.sclabilitybtnarea .upgradebtn{min-width:200px;}
|
712 |
+
|
713 |
+
/*------ syncproduct section -------*/
|
714 |
+
.syncprodt-wrap{margin-top:30px;background-color:#ffffff;border-radius:6px;}
|
715 |
+
.syncprodtheader{padding:20px 20px;}
|
716 |
+
.syncprodthdrleft h5{margin-bottom:0px;font-weight:400;}
|
717 |
+
.syncprodthdrright{display:flex;flex:1;align-items:center;justify-content:flex-end;flex-wrap:wrap;}
|
718 |
+
.align-items-center{align-items:center;}
|
719 |
+
.prctfltrhover{position:absolute;right:10px;top:100%;min-width:240px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.18);border-radius:6px;margin-top:15px;opacity:0;visibility:hidden;background-color:#ffffff;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
720 |
+
.prctfltrhovershow{opacity:1;visibility:visible;margin-top:0px;}
|
721 |
+
.prdcfltrtrgr{cursor:pointer;}
|
722 |
+
.prdchdrsrch, .prdcfilter{padding:0 8px;position:relative;}
|
723 |
+
.syncprdcbtnwrp{display:flex;flex:1;max-width:270px;justify-content:flex-end;}
|
724 |
+
.syncprdcbtn{border-radius:6px;background-color:#2FBB0E;min-width:240px;text-align:center;height:48px;font-size:16px;line-height:24px;color:#ffffff;border:none;}
|
725 |
+
.syncprdcbtn:hover{background-color:#1e1e1e;}
|
726 |
+
.prctfltritem{border-bottom:1px solid #E9E9E9;}
|
727 |
+
.prctfltrtrgr{color:#B6B6B6;cursor:pointer;padding:16px 30px 15px 15px;position:relative;font-weight:400;text-transform:uppercase;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
728 |
+
.prctfltritemdtl{display:none;color:#1e1e1e;}
|
729 |
+
.prctfltritemdtl ul{margin:0;padding:0 15px 15px;list-style:none;max-height:280px;overflow:auto;}
|
730 |
+
.prctfltritemdtl ul li{margin-bottom:9px;}
|
731 |
+
.prctfltritemdtl ul li:last-child{margin-bottom:0px;}
|
732 |
+
.plusminus{position:absolute;left:15px;top:10px;}
|
733 |
+
.prctfltritemdtl p:last-child{margin-bottom:0px;}
|
734 |
+
.prctfltrtrgr:after{content:"";position:absolute;right:21px;top:18px;height:14px;width:2px;background-color:#002BFC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
735 |
+
.prctfltrtrgr:before{content:"";position:absolute;right:15px;top:24px;height:2px;width:14px;background-color:#002BFC;}
|
736 |
+
.prctfltrtrgr.active:after{opacity:0;visibility:hidden;}
|
737 |
+
|
738 |
+
/*--- sync product popoup style -----*/
|
739 |
+
.scrlnone{overflow:hidden;}
|
740 |
+
.whitepopup{position:fixed;opacity:0;left:0;visibility:hidden;top:0;width:100%;height:100%;z-index:12;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
741 |
+
.sycnprdct-ppcnt{display:flex;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center; position: relative;}
|
742 |
+
.sycnprdctpp-cntr{max-height:100%;overflow:auto;padding:30px;}
|
743 |
+
.ppclsbtn{position:absolute;right:20px;top:18px;cursor:pointer}
|
744 |
+
.ggladsppcntnr{width:100%;max-width:390px;}
|
745 |
+
.sycnprdpp-ftr{margin-top:30px;}
|
746 |
+
.sycnprdppbtmbtn{background-color:transparent;border:1px solid #e6e6e6;border-radius:6px;padding:7px 23px;color:#ffffff;font-size:14px;font-weight:normal;min-width:90px;text-align:center;height:36px;display:inline-flex;align-items:center;justify-content:center;line-height:24px;}
|
747 |
+
.ppblubtn:hover{background-color:#0022c7;}
|
748 |
+
.showpopup{opacity:1;visibility:visible;}
|
749 |
+
.sycnprdppcnclbtn{border-color:#FA414D;color:#FA414D}
|
750 |
+
.sycnprdbtnrgt{text-align:right;}
|
751 |
+
.progressinfo{text-align:right;font-size:12px;line-height:16px;color:#515151;margin-top:9px;}
|
752 |
+
.progress{display:-ms-flexbox;display:flex;height:30px;overflow:hidden;line-height:0;background-color:#F3F3F3;border-radius:100px;}
|
753 |
+
.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:left;padding-left:24px;white-space:nowrap;background:linear-gradient(90deg, #0032FC 0%, #00D2F6 100%);transition:width 0.6s ease;border-radius:100px;}
|
754 |
+
|
755 |
+
/*--- table structure -----*/
|
756 |
+
.syncprodtblheader{padding:0 20px;}
|
757 |
+
.syncpro-thead{background-color:#F1F6FA;display:flex;align-items:center;}
|
758 |
+
.syncpro-thead .syncprotblcell{color:#1e1e1e;}
|
759 |
+
.syncprotblcell{padding:10px;color:#1e1e1e;}
|
760 |
+
.thedprodetl-cell{display:flex;align-items:center;}
|
761 |
+
.thedprodetl-cell .cstmcheck-item{line-height:0;}
|
762 |
+
.prodetlcell{max-width:40%;flex:0 0 40%;}
|
763 |
+
.stsdetlcell{max-width:18%;flex:0 0 18%;text-align:center;}
|
764 |
+
.actndetlcell{max-width:17%;flex:0 0 17%;text-align:center;}
|
765 |
+
.issuedetlcell{max-width:25%;flex:0 0 30%;}
|
766 |
+
.tbodyprodetl-cell{display:flex;}
|
767 |
+
.syncprodtlinfo{padding-left:15px;}
|
768 |
+
.syncproimage{width:90px;height:90px;overflow:hidden; background-color: #e9e9e9;}
|
769 |
+
.syncproimage img{width:100%;height:100%;object-fit:cover;}
|
770 |
+
.sycnproimgwrp{position:relative;}
|
771 |
+
.sycnproimgwrp .cstmcheck-item{position:absolute;left:8px;top:4px;}
|
772 |
+
.ststbx{min-width:120px;display:inline-block;text-align:center;font-size:12px;padding:3px 10px;line-height:18px;height:24px;border-radius:100px;}
|
773 |
+
.disaprvsts{background-color:#FFDEE0;color:#CC0E0E;}
|
774 |
+
.aprvsts{background-color:#CEF6CD;color:#169601;}
|
775 |
+
.syncprotbody-item{display:flex;padding:15px 10px;border-bottom:1px solid #E9E9E9}
|
776 |
+
.proinfotrgr{cursor:pointer}
|
777 |
+
.proinfoicon{margin-left:8px;}
|
778 |
+
.proinfoicon img{max-width:20px;vertical-align:middle;}
|
779 |
+
.pro-price{margin-top:6px;font-size:16px;font-weight:500;color:#1e1e1e;}
|
780 |
+
.tbodyissuedetl-cell{color:#515151;line-height:22px;}
|
781 |
+
.tbodyissuedetl-cell p{margin-bottom:0px;}
|
782 |
+
.syncprofooter{padding:40px 20px;display:flex;align-items:center;flex-wrap:wrap;}
|
783 |
+
.properpage{padding-right:15px}
|
784 |
+
|
785 |
+
/*----- pagination -----*/
|
786 |
+
.syncpropagination{display:flex;padding-left:15px;justify-content:flex-end;flex:1;}
|
787 |
+
.syncpropagination ul{margin:0;padding:0;list-style:none;display:flex;}
|
788 |
+
.syncpropagination ul li{margin:0 4px;}
|
789 |
+
.paginitem{border-radius:4px;display:inline-block;text-align:center;height:36px;min-width:36px;padding:6px 10px;font-size:14px;line-height:22px;font-weight:normal;color:#515151;border:1px solid transparent;}
|
790 |
+
a.paginitem:hover{color:#002BFC;}
|
791 |
+
span.pagecurrent{background-color:#002BFC;color:#ffffff;font-weight:700;}
|
792 |
+
.pgprevbtn, .pgnextbtn{border:1px solid #1e1e1e;padding-left:16px;padding-right:16px;}
|
793 |
+
.pgprevbtn{margin-right:15px;}
|
794 |
+
.pgnextbtn{margin-left:15px;}
|
795 |
+
.disblebtn{border-color:#cccccc;color:#CCCCCC;}
|
796 |
+
a.disblebtn:hover{color:#cccccc;}
|
797 |
+
select.properselect{min-width:64px;height:36px;margin-left:10px;padding-left:6px;}
|
798 |
+
|
799 |
+
.mbl-allitemchek{display:none;margin:0 20px;padding:10px;background-color:#F1F6FA;align-items:center;}
|
800 |
+
.data-th{display:none;}
|
801 |
+
.syncprotblcntn{display:flex;}
|
802 |
+
|
803 |
+
/*--- product info popup ------*/
|
804 |
+
.ppoverlay{display:flex;padding:15px 0;background-color:rgba(0,0,0,0.7);width:100%;height:100%;justify-content:center;align-items:center;}
|
805 |
+
.ppwhitebg{background-color:#ffffff; position: relative; border-radius:6px;box-shadow:0px 3px 9px rgba(0, 0, 0, 0.06);}
|
806 |
+
.pp-content{width:94%;max-width:500px;max-height:100%;overflow:auto;padding:30px;}
|
807 |
+
.width650{max-width:650px;}
|
808 |
+
.prdctinfopp-cntn{padding:13px 20px;}
|
809 |
+
.prdcinfobody{display:flex;flex-wrap:wrap}
|
810 |
+
.prdcinfopp-left{max-width:288px;flex:0 0 288px;}
|
811 |
+
.prdtpplrg-imgwrp{border-radius:6px;width:288px;height:288px;text-align:center;display:flex;align-items:center;justify-content:center;}
|
812 |
+
.prdtpplrg-imgwrp img{width:100%;height:100%;object-fit:contain}
|
813 |
+
.prdcinfopp-right{padding-left:20px;max-width:305px;flex:0 0 305px; word-wrap: break-word;}
|
814 |
+
.prdcinfopp-right h4{line-height:28px;margin-bottom:4px;}
|
815 |
+
.prdcinfopp-right p{margin-bottom:0px;}
|
816 |
+
.prdcinfopp-right p a{color:#0083FC}
|
817 |
+
.prdcinfopp-right p a:hover{color:#000000}
|
818 |
+
.prdinfodtlitem{margin-top:12px;color:#1e1e1e;line-height:22px;font-weight:500;}
|
819 |
+
.prdinfodtlitem span{display:block;color:#B6B6B6;font-weight:500;line-height:22px;}
|
820 |
+
.prdtpp-thumb{margin-top:6px;padding-right:24px}
|
821 |
+
.thumbimgppttem{margin-right:15px;width:76px !important;height:76px;overflow:hidden;border:1px solid #E9E9E9;border-radius:6px;}
|
822 |
+
.thumbimgppttem img{width:100%;height:100%;object-fit:cover;}
|
823 |
+
.absltpsclsbtn{position: absolute; right: 10px; top: 10px;}
|
824 |
+
|
825 |
+
.show-less{line-height:22px;}
|
826 |
+
.prdtpp-thumb .slick-prev, .prdtpp-thumb .slick-next{height:100%;border-radius:6px;}
|
827 |
+
.prdtpp-thumb .slick-prev:hover, .prdtpp-thumb .slick-next:hover{background:#e0e8ef;}
|
828 |
+
span.show-more-less-handler{color:#0083FC;padding-left:5px;}
|
829 |
+
|
830 |
+
/*---- account settings -------*/
|
831 |
+
.accstng-cntwrap{display: flex;}
|
832 |
+
.accsetting-wrap{background-color: #ffffff;}
|
833 |
+
.accsrng-left{padding: 10px 4px 10px 5px; width: 209px; min-width: 209px; transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
834 |
+
.accsrng-left ul{margin: 0; padding: 0; list-style: none; position: sticky; top: 62px;}
|
835 |
+
.accsrng-left ul li a{padding: 10px 15px; display: block; color: #B6B6B6; line-height: 22px;}
|
836 |
+
.accsrng-left ul li a:hover{color: #1e1e1e;}
|
837 |
+
.accsrng-left ul li.active a{color: #1e1e1e; font-weight: 500; background-color: #F1F6FA;}
|
838 |
+
.accsrng-right{border-left: 1px solid #E9E9E9; flex: 1;}
|
839 |
+
.accstngdtl-top{padding: 18px 21px 18px 30px; background-color: #ffffff; display: flex; align-items: center;
|
840 |
+
position: sticky; top: 57px; z-index: 1;
|
841 |
+
}
|
842 |
+
.accstngdtltp-shdw{box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06);}
|
843 |
+
.accstngdtl-top h2{flex: 1; margin-bottom: 0px; font-weight: 500;}
|
844 |
+
|
845 |
+
.savebtn{display:inline-block;width:91px;height:36px;background-color:#2FBB0E;text-align:center;padding:10px;border-radius:6px;color:#ffffff;font-size:14px;font-weight:500; line-height: 20px; box-shadow:none;border:none;cursor:pointer;}
|
846 |
+
.savebtn:hover{background-color:#28d000;color:#ffffff;}
|
847 |
+
.accstng-dtlarea{padding: 24px 30px; border-bottom: 1px solid #E9E9E9; margin-bottom: 24px;}
|
848 |
+
.accstng-item:last-child .accstng-dtlarea{margin-bottom: 0px;}
|
849 |
+
.acnttype-ttl strong{font-weight: 500; color: #1e1e1e}
|
850 |
+
.acnttype-bx{ background-color: #F1F6FA; padding: 20px 5px; margin: 12px 0 0; border-radius: 6px; display: flex; flex-wrap: wrap;}
|
851 |
+
.accstngdtl-item{margin-bottom: 40px;}
|
852 |
+
.accstngdtl-item:last-child{margin-bottom: 30px;}
|
853 |
+
.acnttypebx-item{max-width: 33.3333%; flex: 0 0 33.3333%; padding: 0 15px;}
|
854 |
+
.acnttypebx-item h6{font-weight: 500; margin-bottom: 6px;}
|
855 |
+
.acnttypebx-item p{margin-bottom: 3px;}
|
856 |
+
.changelink{line-height: 20px; font-size: 12px; color: #0083FC;}
|
857 |
+
.changelink:hover{color: #1E1E1E;}
|
858 |
+
.accstngdtl-item h5{margin-bottom: 12px; font-weight: 500;}
|
859 |
+
.accnthlpiocn{vertical-align: middle;}
|
860 |
+
|
861 |
+
.accstngdtl-item .cstmcheck-item .checkmark::before{top: 2px;}
|
862 |
+
.accstngdtl-checkbx .cstmcheck-item {margin-bottom: 9px;}
|
863 |
+
.accstngdtl-checkbx .cstmcheck-item:last-child {margin-bottom: 0px;}
|
864 |
+
.inputinfotxt strong{font-weight: 500;}
|
865 |
+
.impthsld-formrow .inputinfotxt{max-width: 258px;}
|
866 |
+
.acnpolyinfo{font-size: 12px; padding-left: 25px; line-height:18px; max-width: 283px; line-height: 18px;}
|
867 |
+
.acnpolyinfo a{color: #0083FC; }
|
868 |
+
.acnpolyinfo a:hover{color: #1e1e1e; }
|
869 |
+
|
870 |
+
.acntmrchnt-item{display: flex; align-items: center; margin-bottom: 24px;}
|
871 |
+
.accmrchntitem-left{flex: 1; max-width: 230px; font-size: 16px; font-weight: 500; line-height: 24px; color: #515151;}
|
872 |
+
.accmrchntitem-btn{min-width: 160px; max-width: 160px; border: 1px solid #c6c6c6; font-size: 14px; line-height: 22px; color: #515151; background-color: transparent; box-shadow: none; border-radius: 6px; padding: 6px 10px; text-align: center;}
|
873 |
+
.erraccbtn{border-color: #F51321; color: #F51321;}
|
874 |
+
.accbluebtn{border-color: #002BFC; color:#002BFC; max-width: 160px;}
|
875 |
+
.accmrchntitem-btn img{vertical-align: middle; margin-right: 8px; line-height: 0;}
|
876 |
+
button.accmrchntitem-btn:hover{border-color: #1e1e1e;}
|
877 |
+
.gglmrchnt-item .accstng-dtlarea{padding-bottom: 30px;}
|
878 |
+
.accprdcsyncsettng-list{margin-bottom: 54px;}
|
879 |
+
.accprdcsyncsettng-list:last-child{margin-bottom: 28px;}
|
880 |
+
.accprdcsyncstng-item h5{font-weight: 500; margin-bottom: 6px;}
|
881 |
+
.accprdcsyncstng-item{margin-bottom: 54px;}
|
882 |
+
.accprdcsyncstng-item:last-child{margin-bottom: 0px;}
|
883 |
+
.accprdcsyncitem-cnt{display: flex; flex-wrap: wrap;}
|
884 |
+
.accprdcsync-left{flex: 1; padding-right: 15px;}
|
885 |
+
.accprdcsync-right{max-width: 175px; padding-left: 15px; display: flex; flex-direction: column; align-items: flex-end;}
|
886 |
+
.justbrdrbtn{min-width: 160px; border: 1px solid #c6c6c6; font-size: 14px; line-height: 22px; color: #515151; background-color: transparent; box-shadow: none; border-radius: 6px; padding: 6px 10px; text-align: center;}
|
887 |
+
.justbrdrbtn:hover{color: #1e1e1e; border-color: #1e1e1e;}
|
888 |
+
.mappedcnt-info{font-size: 12px; line-height: 20px; margin-top: 6px; color:#1e1e1e;}
|
889 |
+
.accprdcsync-left p{margin-bottom: 0px;}
|
890 |
+
.accprdcsync-left p a{color: #0083FC; }
|
891 |
+
.accprdcsync-left p a:hover{color: #1e1e1e; }
|
892 |
+
.blnginfo-table{border-radius: 5px; overflow: hidden;}
|
893 |
+
.cnvs-table{width: 100%; border:1px solid #E9E9E9; border-radius: 5px;border-collapse: collapse;}
|
894 |
+
.cnvs-table th{background-color: #F1F6FA; width: 33%; font-size: 16px; line-height: 24px; color: #1e1e1e; font-weight: 500; text-align: center; padding: 9px 10px;}
|
895 |
+
.cnvs-table td{padding: 10px; text-align: center; font-size: 14px; line-height: 22px; color: #515151;}
|
896 |
+
.cnvs-table th, .cnvs-table td{border-right:1px solid #e9e9e9;}
|
897 |
+
.cnvs-table th:last-child, .cnvs-table td:last-child{border-right:0px solid #e9e9e9;}
|
898 |
+
.bilnginfo-scalability .scalabilitybx{padding: 38px 30px;}
|
899 |
+
.bilnginfo-scalability .sclabilityright{flex: 1; width: 100%; padding-left: 15px;}
|
900 |
+
.stickylitem .accstngdtl-top{box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06);}
|
901 |
+
.dslbbtn, .dslbbtn:hover{background-color:#CCCCCC;color:#ffffff;}
|
902 |
+
.mblacntstng-lefttrgr{display: none; position: fixed; right: 0; top: 15%; background-color: #ffffff; padding:6px 8px; border-radius: 6px 0 0 6px; cursor: pointer; z-index: 2;
|
903 |
+
transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;
|
904 |
+
box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06)}
|
905 |
+
.showmblacntstng{right:208px; }
|
906 |
+
.showaccsrngleft{position: fixed; right: -230px; top:15%; background-color: #ffffff; z-index: 2; box-shadow: 0px 4px 18px rgba(0, 0, 0, 0.06)}
|
907 |
+
.mblacngstngleft{display: none;}
|
908 |
+
|
909 |
+
/*------- dashboard ----------*/
|
910 |
+
.dflex{display: flex; flex-wrap: wrap; }
|
911 |
+
.mt24{margin-top: 24px;}
|
912 |
+
.mb24{margin-bottom: 24px;}
|
913 |
+
.dashtpleft-btn{background-color: #ffffff; box-shadow: none; border-radius: 6px; border:1px solid #0083FC; padding: 4px 9px 3px; font-size: 14px; line-height: 24px; color: #0083FC; margin-right: 12px;}
|
914 |
+
.dashtpleft-btn:last-child{margin-right: 0px;}
|
915 |
+
.dashtpleft-btn img{vertical-align: top; margin-right: 5px; display: inline-block; margin-top: 2px;}
|
916 |
+
.dashtpleft-btn:hover{background-color: #f4f4f4;}
|
917 |
+
.dashtp-right{flex: 1;}
|
918 |
+
.dashtp-right{flex: 1; display: flex; justify-content: flex-end; align-items: center;}
|
919 |
+
.dshtprightselect{min-width: 150px;}
|
920 |
+
.dshtprightselect select{width: 100%; padding: 4px 26px 4px 10px; line-height: 22px;}
|
921 |
+
.dshtpdaterange{margin-left: 24px; position: relative; padding: 5px 20px 5px 24px; line-height: 24px; font-size: 14px; font-weight: 500; color: #515151; cursor: pointer}
|
922 |
+
.dateclndicn{position: absolute; left: 0; top: 7px; line-height: 0;}
|
923 |
+
.careticn{position: absolute; right: 0; top: 7px; line-height: 0;}
|
924 |
+
.claimalert .errmscntbx{width: 100%; padding: 0; align-items: inherit; overflow: hidden;}
|
925 |
+
.erralertrigt {padding: 5px 15px 5px 0; overflow: hidden;}
|
926 |
+
.claimalert .errmsglft{background-color: #FA424D; min-width: 54px; padding: 15px 0 15px 15px; }
|
927 |
+
.erralertrigt{padding-left:15px; }
|
928 |
+
.erralertrigt h6{margin-bottom: 0px; color: #1e1e1e;}
|
929 |
+
.erralertrigt p{margin-bottom: 0px; color: #515151}
|
930 |
+
.erralertrigt p a{color:#0083FC;}
|
931 |
+
.erralertrigt p a:hover{color:#1e1e1e;}
|
932 |
+
.wht-rnd-shdwbx{background-color: #ffffff; box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12); border-radius: 6px;}
|
933 |
+
.dashsmry-wrap{display: flex; flex-wrap: wrap;}
|
934 |
+
.dashsmry-item{display: flex; flex-wrap: wrap; width: 100%; border-bottom: 1px solid #e9e9e9; }
|
935 |
+
.dashsmry-item:last-child{border-bottom: none;}
|
936 |
+
.dashsmrybx{flex:1; border-right: 1px solid #E9E9E9; padding: 14px 9px; text-align: center;}
|
937 |
+
.dshsmrycattxt{line-height: 22px; font-size: 14px; color: #515151;}
|
938 |
+
.dshsmrylrgtxt{margin-top: 3px; font-size: 42px; line-height: 48px; color: #1e1e1e; font-weight: 300; }
|
939 |
+
.updownsmry{margin-top: 9px;display: inline-flex; align-items: center; font-size: 16px; line-height: 24px;}
|
940 |
+
.updownsmry img{margin-right: 4px;}
|
941 |
+
.dshsmryprdtxt{line-height: 20px; font-size: 12px; color: #B6B6B6; margin-top: 3px;}
|
942 |
+
|
943 |
+
/*---- ecoomerce chart ------*/
|
944 |
+
.chartbx{background-color: #ffffff; border-radius: 6px; position: relative;}
|
945 |
+
.ecomfunnchrtbx{padding: 24px; height: 100%;}
|
946 |
+
.col50{flex: 0 0 50%; max-width: 50%; padding: 0 15px;}
|
947 |
+
.prochrtftr{position: relative; filter: blur(12px); -webkit-filter:blur(12px);}
|
948 |
+
.prochrtovrbox{position: absolute; left: 0; top: 0; width: 100%; height: 100%; justify-content: center; align-items: center; display: flex;
|
949 |
+
background: linear-gradient(360deg, #F8F8F8 0%, rgba(248, 248, 248, 0.8) 41.15%, rgba(248, 248, 248, 0.6) 71.35%, rgba(248, 248, 248, 0) 100%);}
|
950 |
+
.prochrtcntn{max-width: 300px; text-align: center;}
|
951 |
+
.prochrttop{display: inline-flex; align-items: center; color: #F6B028; font-weight: 500; line-height: 24px; margin-bottom: 13px;}
|
952 |
+
.prochrttop img{margin-right: 3px;}
|
953 |
+
.prochrtcntn h5{font-weight: 500; margin-bottom: 3px; color: #515151;}
|
954 |
+
.prochrtcntn p{margin-bottom: 0;}
|
955 |
+
.blueupgrdbtn{margin-top: 12px; border:none; box-shadow: none; background-color: #002BFC; color: #ffffff; font-weight: 700; font-size: 16px; line-height: 24px; padding: 9px 28px; border-radius: 6px; min-width: 154px; text-align: center;}
|
956 |
+
.blueupgrdbtn:hover{background-color: #1e1e1e;}
|
957 |
+
.chartarea img{width: 100%;}
|
958 |
+
.whiteroundedbx{background-color: #ffffff; border-radius: 6px;}
|
959 |
+
.dshreport-sec{padding: 30px 20px 5px; overflow: hidden;}
|
960 |
+
.dsh-reprttop{display: flex; flex-wrap: wrap;}
|
961 |
+
.dshrprttp-left, .dshrprttp-right{flex: 1; padding: 0 15px;}
|
962 |
+
.dshrprttp-left{display: flex; align-items: center; flex-wrap: wrap;}
|
963 |
+
.dshrprttp-left h4{font-weight:400; margin-bottom: 0px; margin-right: 24px;}
|
964 |
+
.dshrprttp-right{display: flex; justify-content: flex-end;}
|
965 |
+
.dshrprttp-right .prdchdrsrchicon{margin-right: 24px;}
|
966 |
+
.viewallbtn{display: inline-flex; align-items: center; color: #0083FC;}
|
967 |
+
.dashtablewrp{margin-top: 30px;}
|
968 |
+
.dshreporttble{width: 100%; border-collapse: collapse;}
|
969 |
+
.dshreporttble thead{background-color: #F1F6FA;}
|
970 |
+
.dshreporttble th, .dshreporttble td{border-right: none; text-align: center; color: #1e1e1e; font-size: 14px;}
|
971 |
+
.dshreporttble th{padding: 13px 15px; font-size: 14px; font-weight: 400; line-height: 22px; }
|
972 |
+
.dshreporttble td{padding: 16px 15px; border-bottom: 1px solid #E9E9E9;}
|
973 |
+
.dshreporttble tr:last-child td{border-bottom: 0px solid #E9E9E9;}
|
974 |
+
th.prdnm-cell, td.prdnm-cell{text-align:left; max-width: 150px; }
|
975 |
+
th.hide{font-size: 0 !important;}
|
976 |
+
th.tddot-cell,td.tddot-cell{text-align: right;}
|
977 |
+
td.prdnm-cell a{color: #0083FC; width: 100%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: inline-block;}
|
978 |
+
td.prdnm-cell a:hover{color: #1e1e1e}
|
979 |
+
|
980 |
+
.chartbx h5{ font-weight: 500; color: #515151; margin-bottom: 24px;}
|
981 |
+
.ggladsperfom-sec{padding: 30px 20px 10px;}
|
982 |
+
.ggladsperfom-sec h4{font-weight: 400; margin-bottom: 18px;}
|
983 |
+
.ggladschrtbx{filter: drop-shadow(0px 0px 6px rgba(0, 0, 0, 0.18)); padding: 24px 0 6px 6px;}
|
984 |
+
.ggladschrtbx h5{padding-left: 18px;}
|
985 |
+
.ggladsperfom-sec .col50{margin-bottom: 20px;}
|
986 |
+
.tddshpertg{font-size: 14px; font-weight: 700; color: #b6b6b6;}
|
987 |
+
.chartcntainer{width: 100%; height: 540px;}
|
988 |
+
.ecomchartinfo{margin-top: 24px}
|
989 |
+
.ecomchrtinfoflex{display: flex; padding:0 0 0 40px; margin: 0 -15px; }
|
990 |
+
.ecomchartinfoitem{padding: 0 15px 0 15px; flex: 0 0 20%; max-width: 20%; position: relative;}
|
991 |
+
.chartpercarrow{display: inline-block; background-image: url(../images/percentage-arrow-bg.png); background-position: 6px; background-repeat: repeat-x; position: relative; height: 38px; padding:9px 0px 9px 10px; font-size: 12px; font-weight: 500; line-height: 20px; position: absolute; right:14px; top: -5px;}
|
992 |
+
.chartpercarrow:after{content: ""; position: absolute; right: -25px; top: 0; width: 25px; height: 38px; background-image: url(../images/percentage-arrow.png); background-repeat: no-repeat; background-size: 100%;}
|
993 |
+
.chartpercarrow:before{content: ""; position: absolute; left: -1px; top: 6px; width: 1px; height: 26px; background-color: #1e1e1e; }
|
994 |
+
.ecomchartinfolabel{font-size: 11px;min-height: 28px; display: flex; align-items: center; font-weight: 400; color: #1e1e1e; max-width:55px; }
|
995 |
+
|
996 |
+
/*---- daterange -----*/
|
997 |
+
.daterangearea{min-height: 22px; min-width: 162px;}
|
998 |
+
.daterangepickerflex{display: flex;}
|
999 |
+
.daterangepicker-left{box-shadow: 1px 0px 9px rgba(0, 0, 0, 0.08); flex: 0 0 150px; max-width: 150px;}
|
1000 |
+
.daterangepicker-right{display: flex; flex-wrap: wrap; padding: 15px 24px;}
|
1001 |
+
.drp-calendar{padding: 0 11px; flex: 0 0 50%; max-width: 50%;}
|
1002 |
+
.drp-buttons{flex: 0 0 100%; max-width: 100%; padding: 0 24px;}
|
1003 |
+
.drp-calendar{position: relative;}
|
1004 |
+
.drp-calendar.left{padding-left: 0px}
|
1005 |
+
.drp-calendar.right{padding-right: 0px}
|
1006 |
+
.drp-calendar.left:before{content: ""; position: absolute; top: 55px; right: -5px; height: 76%; width: 1px; background-color: #E9E9E9;}
|
1007 |
+
.daterangepicker .calendar-table .next, .daterangepicker .calendar-table .prev{vertical-align: top; }
|
1008 |
+
.daterangepicker .calendar-table .next:hover, .daterangepicker .calendar-table .prev:hover{background-color: inherit;}
|
1009 |
+
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span{width: 24px; height: 24px; border-radius: 6px; border: 1px solid #e9e9e9; position: relative;}
|
1010 |
+
.daterangepicker .calendar-table .next span:before, .daterangepicker .calendar-table .prev span:before{content: ""; position: absolute; width: 7px; height: 11px; background-size: 100%; background-repeat: no-repeat; left: 50%; top: 50%; margin-left: -3px; margin-top: -5px;}
|
1011 |
+
.daterangepicker .calendar-table .next span:before{background-image: url(../images/next.png)}
|
1012 |
+
.daterangepicker .calendar-table .prev span:before{background-image: url(../images/prev.png)}
|
1013 |
+
.daterangepicker th.month{padding-bottom: 16px; min-height: 24px; line-height: 26px;}
|
1014 |
+
.daterangepicker .calendar-table .next span:hover, .daterangepicker .calendar-table .prev span:hover{background-color: #e9e9e9;}
|
1015 |
+
.drpbtmbuttonflex{display: flex; align-items: flex-end;}
|
1016 |
+
.drpbtmbuttonflex-left, .drpbtmbuttonflex-right{max-width: 50%; flex: 1;}
|
1017 |
+
.drpbtmbuttonflex-right{display: flex; justify-content: flex-end;}
|
1018 |
+
.btmslectdatetitle{font-size: 12px; font-weight: 500; color: #1e1e1e; margin-bottom: 9px;}
|
1019 |
+
.applyBtn{min-width: 90px; background-color: #002BFC; color: #ffffff; text-align: center; line-height: 20px; border-radius: 6px;}
|
1020 |
+
.applyBtn:hover{background-color: #1e1e1e;}
|
1021 |
+
.daterangepicker .drp-buttons .btn.cancelBtn{color:#002BFC; background-color: transparent; padding: 5px 0;}
|
1022 |
+
.daterangepicker .drp-buttons .btn.cancelBtn:hover{color:#1e1e1e;}
|
1023 |
+
.daterangepicker.show-calendar .ranges{height: 100%;}
|
1024 |
+
.daterangepicker .ranges ul{position: relative; height: 100%;}
|
1025 |
+
.daterangepicker .ranges li.cstmrang-li{position: absolute; bottom: 0; left: 0; width: 100%; border-right:4px solid #002BFC; background-color: #F1F6FA; color: #002BFC; font-weight: 500; font-size: 12px; line-height: 20px;}
|
1026 |
+
.daterangepicker .ranges li.cstmrang-li.active{background-color:#002BFC; color: #ffffff; }
|
1027 |
+
|
1028 |
+
/*------- Dashboard upgrade popup -------*/
|
1029 |
+
.upgradsbscrptnpp-hdr{background:linear-gradient(90deg, #0032FC 0%, #00D2F6 100%); padding: 12px 30px; text-align: center;}
|
1030 |
+
.upgradsbscrptnpp-hdr h5{color: #ffffff; margin-bottom: 0px; color: #ffffff; text-transform: uppercase; font-weight: 700;}
|
1031 |
+
.upgradsbscrptnpp-cntr{padding: 0; max-width: 420px; box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.12);}
|
1032 |
+
.upgradsbscrptnpp-cntr .ppmodal-body{padding: 18px 30px; text-align: center; color: #515151; }
|
1033 |
+
.upgradsbscrptnpp-cntr .ppmodal-body p{font-size: 14px; line-height: 22px; margin-bottom: 18px;}
|
1034 |
+
.ppupgrdbtn{display: inline-block; background-color: #FBC53B; border-radius: 6px; padding: 9px 29px; line-height: 24px; font-size: 16px; color: #1E1E1E; font-weight: 500;}
|
1035 |
+
.ppupgrdbtn:hover{background-color: #1e1e1e; color: #ffffff;}
|
1036 |
+
.upgradsbscrptnpp-cntr .absltpsclsbtn{top: 17px; right: 17px;}
|
1037 |
+
|
1038 |
+
/*------ map product category ------*/
|
1039 |
+
.backlnkbtn{margin-right: 17px;}
|
1040 |
+
.accstng-item:last-child .accstng-dtlarea{border-bottom: none;}
|
1041 |
+
.cmnalert{padding: 10px 10px 8px 40px; position: relative; background-color: #F1F6FA; line-height: 22px; min-height: 42px; display: flex; align-items: center;}
|
1042 |
+
.alerticon{position: absolute; left: 10px; top: 10px; }
|
1043 |
+
.blualert{color: #002BFC;}
|
1044 |
+
.msppageinfowrap{margin-top: 29px; display: flex; align-items: center; flex-wrap: wrap; padding-left: 24px;}
|
1045 |
+
.msppageinfotxt{color:#515151;}
|
1046 |
+
.msppageinfotxt:after{content:""; display: inline-block; vertical-align: middle; height: 24px; width: 1px; background-color: #515151; margin: 0 99px 0 98px;}
|
1047 |
+
.msppageinfotxt:last-child:after{content: none;}
|
1048 |
+
.mapprocat-accordion{margin-top: 24px;}
|
1049 |
+
.mapcataccr-item{padding: 18px 24px; border-radius: 6px; background-color: #ffffff; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.18);margin-bottom: 18px;}
|
1050 |
+
.mapcataccr-select{width: 235px; padding-left: 2px;}
|
1051 |
+
.mapcataccr-select select{border:1px solid #c6c6c6; background-color: #ffffff; width: 100%; padding: 6px 30px 6px 12px; margin-bottom: 9px; line-height: 22px; }
|
1052 |
+
.mapcataccr-select select:last-child{margin-bottom: 0px;}
|
1053 |
+
.mapcataccr-top{ display: flex; position: relative; padding-right: 24px; flex-wrap: wrap;
|
1054 |
+
transition: all 0.3s ease-in-out 0s; -moz-transition: all 0.3s ease-in-out 0s; -webkit-transition: all 0.3s ease-in-out 0s; -o-transition: all 0.3s ease-in-out 0s;}
|
1055 |
+
.mapcataccr-title{font-size: 16px; padding: 6px 0; color: #1e1e1e; font-weight: 500; line-height: 24px; min-width: 298px; position: relative;}
|
1056 |
+
.mapcataccr-title:before{content: ""; position: absolute; right: 0px; top: 16px; width: 100%; height: 2px; border-top: 2px dashed #c6c6c6}
|
1057 |
+
.mapcataccr-title:after{content: ""; position: absolute; right: 0px; top:13px;width:6px; height: 9px; background-size: 100%; background-repeat: no-repeat; background-position: right center; background-image: url(../images/line-arrow.png); background-color: #ffffff;}
|
1058 |
+
.mapcataccr-title span{background-color: #ffffff; padding-right: 4px; position: relative;}
|
1059 |
+
.mapcataccr-plusminus{position: absolute; right: 0px; top: 12px; width: 24px; height: 24px; cursor: pointer}
|
1060 |
+
.mapcataccr-plusminus:after{content:"";position:absolute;right:6px;top:0px;height:14px;width:2px;background-color:#0083FC;transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;}
|
1061 |
+
.mapcataccr-plusminus:before{content:"";position:absolute;right:0px;top:6px;height:2px;width:14px;background-color:#0083FC;}
|
1062 |
+
.mapcataccr-plusminus.active:after{opacity:0;visibility:hidden;}
|
1063 |
+
.mapcataccr-detail{display: none; padding: 0px 15px 0px 0; color: #364167; position: relative;}
|
1064 |
+
.mapcataccr-detail .mapcataccr-title{font-weight: 400; font-size: 14px; line-height: 22px; color: #515151}
|
1065 |
+
.sbmaincat{padding: 18px 15px 0px 25px; position: relative;}
|
1066 |
+
.sbmaincat .mapcataccr-top{position: relative;}
|
1067 |
+
.sbmaincat .mapcataccr-top:before{content: ""; position: absolute; left: -20px; top: 15px; width:13px; height: 2px; border-top: 2px dashed #c6c6c6;}
|
1068 |
+
.sbmaincat .mapcataccr-top:after{content: ""; border-left: 2px dashed #c6c6c6; position: absolute; left: 4px; top: 25px; width: 2px; height:calc(100% + 10px);}
|
1069 |
+
.sbmaincat:before{content: ""; position: absolute; left: 4px; top: -6px; width:2px; height: 100%; border-left: 2px dashed #c6c6c6;}
|
1070 |
+
.sbmaincat:after{content: ""; position: absolute; left: 16px; top: 20px; margin-top: 10px; width:6px; height: 9px; background-size: 100%; background-repeat: no-repeat; background-position: right center; background-image: url(../images/line-arrow.png); background-color: #ffffff;}
|
1071 |
+
.sbmaininnerlevel:before{content: none;}
|
1072 |
+
.sbmainsblevel:before{height: 100%;}
|
1073 |
+
.sbmaincat .sbmainsblevel:before{content: none;}
|
1074 |
+
.sbmaincat .mapcataccr-top:last-child:after{content: none;}
|
1075 |
+
.sbmaincat:last-child{padding-bottom: 0px;}
|
1076 |
+
.sbmainlevel:last-child:before{height: 40px}
|
1077 |
+
.topactive{position: relative;}
|
1078 |
+
.topactive:before{content: ""; position: absolute; top: 24px; left: 4px; width: 2px; height: 80%; border-left: 2px dashed #c6c6c6}
|
1079 |
+
.mapprocat-dtl{padding-top: 24px !important}
|
1080 |
+
/*.mapdtlflex{display: flex !important; flex-wrap: wrap;}*/
|
1081 |
+
|
1082 |
+
/*------ Map Product Attributes page -----*/
|
1083 |
+
.mapproattr-dtl{padding-top: 24px !important}
|
1084 |
+
.mapproattr-dtlwrap{padding-top: 30px;}
|
1085 |
+
.mapproattr-left{padding: 0 15px; flex: 1;}
|
1086 |
+
.mapproattr-right{padding: 0 15px; min-width: 263px; max-width: 263px; flex: 0 0 263px;}
|
1087 |
+
.mapproattr-left .msppageinfowrap{padding-left: 0px; margin-top: 0px;}
|
1088 |
+
.mapproattr-left .msppageinfotxt::after{margin: -4px 24px 0;}
|
1089 |
+
.attrinfoicon{vertical-align: middle;margin-left: 7px; line-height: 1; display: inline-block; max-width: 20px;}
|
1090 |
+
.infoicontrgr{cursor: pointer}
|
1091 |
+
.proattrformlist{margin-top: 36px}
|
1092 |
+
.proattrfrm-item{display: flex; flex-wrap: wrap; margin: 0px -15px 18px;}
|
1093 |
+
.attrfrmleft{flex: 1; padding: 0 15px; display: flex; align-items: center;}
|
1094 |
+
.attrfrmleft label{font-size: 16px; line-height: 24px; font-weight: 500; color:#1e1e1e; flex: 1;}
|
1095 |
+
.attrfrmleft .attrinfoicon{flex: 0 0 20px;}
|
1096 |
+
.attrfrmright{flex:0 0 265px; max-width: 265px; padding: 0 15px;}
|
1097 |
+
.attrfrmright select{width: 100%; padding:6px 30px 6px 12px; font-size: 14px; line-height: 22px;}
|
1098 |
+
.addatrrrightbx{border-radius: 6px; background-color: #ffffff; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.12);}
|
1099 |
+
.attrrighttop{padding: 18px 15px 16px 15px; border-bottom: 1px solid #E9E9E9; font-size: 16px; line-height: 24px; color: #1e1e1e; font-weight: 500;}
|
1100 |
+
.attroptinlistbx{padding: 21px 15px; max-height: 330px; overflow: auto }
|
1101 |
+
.attroptcheck-item{margin-bottom: 18px;}
|
1102 |
+
.attroptcheck-item:last-child{margin-bottom:0px;}
|
1103 |
+
.addattrbtn{width: 100%; border-radius:0 0 6px 6px; background-color: #2FBB0E; color: #ffffff; font-size: 16px; line-height: 24px; font-weight: 500; text-align: center; border:none; padding: 9px 15px;}
|
1104 |
+
.addattlistbx{border-top:1px solid #e9e9e9; padding-top: 18px;}
|
1105 |
+
.infoicontrgr {position: relative;}
|
1106 |
+
.infoicontrgr:after{visibility: hidden; width: 160px;background-color: #ffffff; color: #1e1e1e;
|
1107 |
+
text-align: center; border-radius: 6px; padding: 6px 9px; content: attr(title);
|
1108 |
+
position: absolute; z-index: 1; bottom: 100%; margin-bottom: 10px; left: 50%;
|
1109 |
+
margin-left: -80px; font-size: 12px; font-weight: 400; line-height: 20px; border:1px solid #E9E9E9; box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.12);
|
1110 |
+
}
|
1111 |
+
.infoicontrgr:hover:after {visibility: visible;}
|
1112 |
+
.infoicontrgr:hover:before {content: " ";position: absolute;top: -10px; left: 50%;margin-left: -5px;border-width: 5px; border-style: solid; border-color: #cccccc transparent transparent transparent;}
|
1113 |
+
|
1114 |
+
button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{background-color:#CCCCCC;color:#ffffff;}
|
1115 |
+
|
1116 |
+
/* RC*/
|
1117 |
+
.onbordingbody{padding-top: 10px;}
|
1118 |
+
.onbordording-step .click_here{font-weight: 600; cursor: pointer;}
|
1119 |
+
.dashboard_page_conversios_onboarding, .index_page_conversios_onboarding, .onbordingbody-wapper{background: #fff;}
|
1120 |
+
.bodyrightpart{padding: 20px 10px 10px 0;}
|
1121 |
+
.blueupgrdbtn{display: inline-block;}
|
1122 |
+
.blueupgrdbtn:hover {color:#fff;}
|
1123 |
+
.shop-category .form-label-control small{display: inline-block;}
|
1124 |
+
.tvc-sync-progress-gmc{display: none;}
|
1125 |
+
.ecomchartinfoitem:first-child {padding-left: 0;}
|
1126 |
+
.chartpercarrow{ padding: 9px 0px 9px 2px; right: 12px;}
|
1127 |
+
.navinfotopnav .navinfonavtext{line-height: 24px;}
|
1128 |
+
.container-fluid{padding: 5px 15px;}
|
1129 |
+
.prmoupgrdbtn .upgradebtn{padding-top: 7px; padding-bottom: 7px;}
|
1130 |
+
.chartpercarrowt:after{content: ""; position: absolute; right: -25px; top: 0; width: 25px; height: 38px; background-image: url(../images/next.png); background-repeat: no-repeat; background-size: 100%;}
|
1131 |
+
.prochrtcntn{max-width: 55%;}
|
1132 |
+
.temp_note{
|
1133 |
+
background-color: #ffffff;
|
1134 |
+
box-shadow: 0px 0px 6px rgb(0 0 0 / 12%);
|
1135 |
+
border-radius: 6px;
|
1136 |
+
padding: 5px 6px 0px 4px;
|
1137 |
+
margin: 10px 0 0 0;
|
1138 |
+
|
1139 |
+
}
|
1140 |
+
.temp_note p{
|
1141 |
+
margin: 0 0 20px 0;
|
1142 |
+
line-height: 22px;
|
1143 |
+
/* padding-bottom: 5px; */
|
1144 |
+
padding: 5px 9px;
|
1145 |
+
font-weight: 400;
|
1146 |
+
text-align: center;
|
1147 |
+
}
|
1148 |
+
.ecomcheckoutfunchartinfo .ecomchartinfoitem{
|
1149 |
+
padding: 0 15px 0 15px;
|
1150 |
+
flex: 0 0 24%;
|
1151 |
+
max-width: 24%;
|
1152 |
+
position: relative;
|
1153 |
+
}
|
1154 |
+
.ecomcheckoutfunchartinfo .chartpercarrow{
|
1155 |
+
right: 14px;
|
1156 |
+
}
|
1157 |
+
/* feedback-form */
|
1158 |
+
#feedback-form-wrapper #feedback_record_btn > button { position: fixed;right: 0;bottom: 7%;transform: rotate(-90deg) translate(50%, -50%);transform-origin: right;z-index: 999;width: 110px;font-size: 19px; }
|
1159 |
+
#feedback-form-wrapper .rating-input-wrapper input[type="radio"] { display: none; }
|
1160 |
+
.rating-input-wrapper input[type="radio"] ~ span { cursor: pointer; }
|
1161 |
+
.rating-input-wrapper{ display: flex;flex-direction: row;justify-content: flex-start; }
|
1162 |
+
#feedback-form-wrapper .rating-input-wrapper input[type="radio"]:checked ~ span { background-color: #4261dc;color: #fff; }
|
1163 |
+
#feedback-form-wrapper .rating-labels > label{ font-size: 14px;color: #777; }
|
1164 |
+
.feedback-form-group label{ cursor: default; }
|
1165 |
+
.feedback_label{ margin: 18px 8px 18px 8px; }
|
1166 |
+
.feedback_options{ border: 1px solid #515151 !important;border-radius: 0.25rem !important;padding: 7px 15px; }
|
1167 |
+
.feedback_que_label{ text-align: left;padding: 6px; }
|
1168 |
+
.feedback_txtarea_div{ display: flex;flex-direction: column;justify-content: flex-start; }
|
1169 |
+
.feedback_txtarea{ margin: 0px 2px; }
|
1170 |
+
#charcount{ text-align: end;padding: 1px 0px;font-size: smaller;}
|
1171 |
+
.feedback_btn{ margin: 0;text-transform: none;-webkit-appearance: button;transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;border: 1px solid transparent; text-align: center;text-decoration: none;vertical-align: middle;display: inline-block; font-weight: 400; line-height: 1.5; color: #fff;border-radius: 0!important; padding: 0.1rem 0rem; background-color: #2D62ED;border-color: #2D62ED; }
|
1172 |
+
.feedback_btn:hover{ color: #fff; }
|
1173 |
+
/* end feedback-form */
|
1174 |
+
|
1175 |
+
#ee_plugin_form select{
|
1176 |
+
min-width: 330px;
|
1177 |
+
}
|
1178 |
+
table .tracking-trigger td{ padding: 0 0 0.5rem 1rem;}
|
1179 |
+
#ee_plugin_form input[type="text"], #ee_plugin_form input[type="number"]{ min-width: 285px; height: 32px; margin-bottom: 5px;}
|
1180 |
+
/**********PMax CSS ************/
|
1181 |
+
.search-box { background: url('../images/search-icon.png');
|
1182 |
+
background-repeat: no-repeat;
|
1183 |
+
background-position: 13px center;
|
1184 |
+
padding: 5px 4px 5px 40px !important;}
|
1185 |
+
button.btn-search {
|
1186 |
+
border: 2px solid #0137FC;
|
1187 |
+
padding: 12px;
|
1188 |
+
text-transform: uppercase;
|
1189 |
+
background: #fff;
|
1190 |
+
}
|
1191 |
+
.date-range { background: url('../images/calendar-icon.png');
|
1192 |
+
background-repeat: no-repeat;
|
1193 |
+
background-position: 13px center;
|
1194 |
+
padding: 9px 4px 9px 40px !important;}
|
1195 |
+
|
1196 |
+
.btn-campaign {
|
1197 |
+
padding: 10px;
|
1198 |
+
}
|
1199 |
+
.campaign-list-tbl {
|
1200 |
+
border: 1px solid #E9E9E9;
|
1201 |
+
}
|
1202 |
+
/* Pmax add campaign */
|
1203 |
+
.section-addcampaign h3, .section-Campaignlisting {
|
1204 |
+
margin-top: 10px;
|
1205 |
+
}
|
1206 |
+
.tabs{
|
1207 |
+
width:100%;
|
1208 |
+
height:auto;
|
1209 |
+
margin:0 auto;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
/* tab list item */
|
1213 |
+
.tabs .tabs-list{
|
1214 |
+
list-style:none;
|
1215 |
+
margin:0px;
|
1216 |
+
padding:0px;
|
1217 |
+
}
|
1218 |
+
.tabs .tabs-list li{
|
1219 |
+
float: left;
|
1220 |
+
margin: 0px;
|
1221 |
+
margin-right: 0px;
|
1222 |
+
padding: 15px 38px;
|
1223 |
+
text-align: center;
|
1224 |
+
background-color: #fff;
|
1225 |
+
border-radius: 0px;
|
1226 |
+
border-bottom: 2px solid #ddd;
|
1227 |
+
border-right: 0px;
|
1228 |
+
border-top: 0px;
|
1229 |
+
border-left: 0px;
|
1230 |
+
box-shadow: 0px 1px 12px rgb(0 0 0 / 6%);
|
1231 |
+
}
|
1232 |
+
.tabs .tabs-list li:hover{
|
1233 |
+
cursor:pointer;
|
1234 |
+
}
|
1235 |
+
.tabs .tabs-list li a{
|
1236 |
+
text-decoration: none;
|
1237 |
+
color: #515151;
|
1238 |
+
font-weight: 500;
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
/* Tab content section */
|
1242 |
+
.tabs .tab{
|
1243 |
+
display:none;
|
1244 |
+
width:96%;
|
1245 |
+
min-height:250px;
|
1246 |
+
height:auto;
|
1247 |
+
border-radius:3px;
|
1248 |
+
padding:20px 15px;
|
1249 |
+
background-color:#FFF;
|
1250 |
+
color:darkslategray;
|
1251 |
+
clear:both;
|
1252 |
+
}
|
1253 |
+
.tabs .tab h3{
|
1254 |
+
letter-spacing:1px;
|
1255 |
+
font-weight:normal;
|
1256 |
+
padding:5px;
|
1257 |
+
}
|
1258 |
+
.tabs .tab p{
|
1259 |
+
line-height:20px;
|
1260 |
+
letter-spacing: 1px;
|
1261 |
+
}
|
1262 |
+
|
1263 |
+
/* When active state */
|
1264 |
+
.active{
|
1265 |
+
display:block !important;
|
1266 |
+
}
|
1267 |
+
.tabs .tabs-list li.active{
|
1268 |
+
background-color: #002BFC;
|
1269 |
+
border-bottom: 2px solid #002BFC;
|
1270 |
+
}
|
1271 |
+
.tabs .tabs-list li.active a{
|
1272 |
+
color:#fff;
|
1273 |
+
}
|
1274 |
+
/* Campaign Form stylem */
|
1275 |
+
.campform-row label {
|
1276 |
+
margin-bottom: 0.5rem;
|
1277 |
+
font-weight: bold;
|
1278 |
+
}
|
1279 |
+
.add-pmax-campaign .campform-row input.fromfiled, .add-pmax-campaign select, .add-pmax-campaign form img {
|
1280 |
+
display: block;
|
1281 |
+
}
|
1282 |
+
.form-row-grp.campform-row {
|
1283 |
+
display: flex;
|
1284 |
+
flex-wrap: wrap;
|
1285 |
+
}
|
1286 |
+
.form-col-8 {
|
1287 |
+
width: 27%;
|
1288 |
+
}
|
1289 |
+
.form-col-4 {
|
1290 |
+
width: 10.666667%;
|
1291 |
+
margin-right: 15px;
|
1292 |
+
}
|
1293 |
+
button.btn-fade-blue {
|
1294 |
+
background-color: #F1F4FB;
|
1295 |
+
border-radius: 6px;
|
1296 |
+
border: none;
|
1297 |
+
padding: 9px 15px;
|
1298 |
+
color: #002BFC;
|
1299 |
+
font-size: 13px;
|
1300 |
+
min-width: 154px;
|
1301 |
+
text-align: center;
|
1302 |
+
height: 40px;
|
1303 |
+
display: inline-flex;
|
1304 |
+
align-items: center;
|
1305 |
+
justify-content: center;
|
1306 |
+
line-height: 24px;
|
1307 |
+
}
|
1308 |
+
.btn-fade-blue img {
|
1309 |
+
margin-right: 10px;
|
1310 |
+
}
|
1311 |
+
p.label {
|
1312 |
+
margin-bottom: 5px;
|
1313 |
+
}
|
1314 |
+
.score-line {width: 258px;position: absolute;left: 21%;font-size: 10px;}
|
1315 |
+
.form-row .radio {
|
1316 |
+
margin-right: 10px;
|
1317 |
+
}
|
1318 |
+
.radio-label {
|
1319 |
+
margin-right: 10px;
|
1320 |
+
}
|
1321 |
+
.campform-row .slect2bx {
|
1322 |
+
border-radius: 4px;
|
1323 |
+
border-color: #b4b9be;
|
1324 |
+
}
|
1325 |
+
button.btn-withborder {
|
1326 |
+
border: 1px solid #757575;
|
1327 |
+
background: #fff;
|
1328 |
+
border-radius: 6px;
|
1329 |
+
padding: 9px 15px;
|
1330 |
+
font-size: 16px;
|
1331 |
+
font-weight: 400;
|
1332 |
+
min-width: 154px;
|
1333 |
+
text-align: center;
|
1334 |
+
height: 42px;
|
1335 |
+
display: inline-flex;
|
1336 |
+
align-items: center;
|
1337 |
+
justify-content: center;
|
1338 |
+
line-height: 24px;
|
1339 |
+
color: #757575;
|
1340 |
+
}
|
1341 |
+
.campfooterbtn {padding: 0 0px 10px;}
|
1342 |
+
.assetformwrp {width: 70%; float: left;}t
|
1343 |
+
.assetsection {width: 30%; float: left;}
|
1344 |
+
img.img-upload {
|
1345 |
+
display: inline-block;
|
1346 |
+
margin-right: 10px;
|
1347 |
+
}
|
1348 |
+
.note {font-size: 10px;margin-bottom: 5px;}
|
1349 |
+
.img-icon {display: inline-block;position: absolute;margin-left: 10px;}
|
1350 |
+
|
1351 |
+
/* Pmax Edit */
|
1352 |
+
.campaign-edit .assetformwrp, .campaign-edit .assetsection {
|
1353 |
+
margin-top: 40px;
|
1354 |
+
}
|
1355 |
+
.form-edit input.fromfiled {display: inline;}
|
1356 |
+
.edit-icon {width: 35px;}
|
1357 |
+
.page_no_sec{margin: 10px;}
|
1358 |
+
#tvc_pmax_popup_box.tvc_popup_box {
|
1359 |
+
overflow: hidden;
|
1360 |
+
z-index: 9999;
|
1361 |
+
display: block;
|
1362 |
+
position: relative;
|
1363 |
+
float: left;
|
1364 |
+
}
|
1365 |
+
.add-pmax-campaign .mb1{margin-bottom: 5px;}
|
1366 |
+
.add-pmax-campaign .remove-row{margin: 14px; cursor: pointer;}
|
1367 |
+
.pmax-campaign .fromfiled{max-width: 350px;}
|
1368 |
+
.pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
|
1369 |
+
.pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
|
1370 |
+
/*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
|
1371 |
+
|
1372 |
+
.tvc-auto-product-sync-form .ga-title{position: relative;}
|
1373 |
+
.tvc-product-sync-toolip{ position: absolute; display: inline-block; width: auto; top: -5px; margin-left: 2px;}
|
1374 |
+
.tvc-product-sync-toolip .tvc-tooltip-right{ line-height: 1.2; bottom: 6px; left: 125%; top: auto;}
|
1375 |
+
.tvc-auto-product-sync-form .tvc-pro {margin-left: 20px;}
|
1376 |
+
.dshbrdbtn{
|
1377 |
+
color:white;
|
1378 |
+
}
|
1379 |
+
.editbtn{
|
1380 |
+
width:20px;
|
1381 |
+
height:20px;
|
1382 |
+
}
|
1383 |
+
.onbrdr-msg{ background-color: #FBF7EE; font-weight: bold; border: 0.5px solid #A9A9A9; border-radius: 15px; padding: 15px; }
|
1384 |
+
.contct-lnk{ color: blue; }
|
1385 |
+
#wpfooter {
|
1386 |
+
position: relative;
|
1387 |
}
|
admin/helper/class-onboarding-helper.php
CHANGED
@@ -36,11 +36,34 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
36 |
//get subscription details
|
37 |
add_action('wp_ajax_get_subscription_details', array($this,'get_subscription_details') );
|
38 |
add_action('wp_ajax_update_setup_time_to_subscription', array($this,'update_setup_time_to_subscription') );
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
public function req_int(){
|
45 |
if (!class_exists('CustomApi.php')) {
|
46 |
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
|
@@ -81,8 +104,9 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
81 |
if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
|
82 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
83 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
84 |
-
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
85 |
echo json_encode($api_obj->saveAnalyticsData($_POST));
|
|
|
86 |
wp_die();
|
87 |
}else{
|
88 |
echo esc_html__("Admin security nonce is not verified.","conversios");
|
@@ -99,7 +123,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
|
|
99 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
100 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
101 |
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
102 |
-
echo json_encode($api_obj->getGoogleAdsAccountList($_POST));
|
103 |
wp_die();
|
104 |
}else{
|
105 |
echo esc_html__("Admin security nonce is not verified.","conversios");
|
@@ -552,6 +576,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
552 |
$return->error = true;
|
553 |
$return->data = $response->data;
|
554 |
$return->status = $response_code;
|
|
|
555 |
return $return;
|
556 |
}
|
557 |
} catch (Exception $e) {
|
@@ -589,6 +614,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
589 |
$return->error = true;
|
590 |
$return->data = $response->data;
|
591 |
$return->status = $response_code;
|
|
|
592 |
return $return;
|
593 |
}
|
594 |
}else{
|
@@ -623,6 +649,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
623 |
$return->error = true;
|
624 |
$return->data = $result->data;
|
625 |
$return->status = $result->status;
|
|
|
626 |
return $return;
|
627 |
}
|
628 |
} catch (Exception $e) {
|
@@ -632,7 +659,6 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
632 |
|
633 |
public function createGoogleAdsAccount($postData) {
|
634 |
try {
|
635 |
-
//$tvc_data = (object)$postData['tvc_data'];
|
636 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
637 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
638 |
$url = $this->apiDomain . '/adwords/create-ads-account';
|
@@ -659,6 +685,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
659 |
}else{
|
660 |
$return->error = true;
|
661 |
$return->error = $result->errors;
|
|
|
662 |
//$return->data = $result->data;
|
663 |
$return->status = $result->status;
|
664 |
return $return;
|
@@ -711,6 +738,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
711 |
} else {
|
712 |
$return = new \stdClass();
|
713 |
$return->error = true;
|
|
|
714 |
//$return->data = $result->data;
|
715 |
$return->status = $response_code;
|
716 |
return $return;
|
@@ -755,6 +783,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
755 |
$return->error = true;
|
756 |
$return->data = $result->data;
|
757 |
$return->status = $result->status;
|
|
|
758 |
return $return;
|
759 |
}
|
760 |
} catch (Exception $e) {
|
@@ -791,6 +820,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
791 |
$return->error = true;
|
792 |
$return->data = $result->data;
|
793 |
$return->status = $result->status;
|
|
|
794 |
return $return;
|
795 |
}
|
796 |
} catch (Exception $e) {
|
@@ -825,6 +855,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
825 |
$return->error = true;
|
826 |
$return->data = $result->data;
|
827 |
$return->status = $result->status;
|
|
|
828 |
return $return;
|
829 |
}
|
830 |
} catch (Exception $e) {
|
@@ -882,7 +913,6 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
882 |
}else{
|
883 |
$return->error = true;
|
884 |
$return->errors = $result->errors;
|
885 |
-
//$return->data = $result->data;
|
886 |
$return->status = $response_code;
|
887 |
return $return;
|
888 |
}
|
@@ -926,7 +956,6 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
926 |
}else{
|
927 |
$return->error = true;
|
928 |
$return->errors = $result->errors;
|
929 |
-
//$return->data = $result->data;
|
930 |
$return->status = $response_code;
|
931 |
return $return;
|
932 |
}
|
@@ -967,9 +996,10 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
967 |
return $return;
|
968 |
}else{
|
969 |
$return->error = true;
|
970 |
-
$return->errors = $result->errors;
|
971 |
-
//$return->data = $result->data;
|
972 |
$return->status = $response_code;
|
|
|
|
|
973 |
return $return;
|
974 |
}
|
975 |
|
@@ -1104,5 +1134,41 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
|
|
1104 |
}
|
1105 |
}//generateAccessToken
|
1106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1107 |
}
|
1108 |
}
|
36 |
//get subscription details
|
37 |
add_action('wp_ajax_get_subscription_details', array($this,'get_subscription_details') );
|
38 |
add_action('wp_ajax_update_setup_time_to_subscription', array($this,'update_setup_time_to_subscription') );
|
39 |
+
|
40 |
+
add_action('admin_init',array($this,'add_schedule_ut'));
|
41 |
+
add_action('ee_ut_cron',array($this,'ee_ut_crons'));
|
42 |
}
|
43 |
|
44 |
+
public function add_schedule_ut(){
|
45 |
+
$options_val = get_option('ee_ut');
|
46 |
+
if(!empty($options_val)){
|
47 |
+
if (false === as_next_scheduled_action( 'ee_ut_cron' ) ) {
|
48 |
+
// 86400
|
49 |
+
as_schedule_recurring_action(time(), 259200, 'ee_ut_cron');
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
public function ee_ut_crons() {
|
55 |
+
$google_detail = unserialize(get_option('ee_api_data'));
|
56 |
+
if(isset($google_detail['setting']->refresh_token)){
|
57 |
+
$refresh_token = sanitize_text_field(base64_decode($google_detail['setting']->refresh_token));
|
58 |
+
}
|
59 |
+
if((isset($google_detail['setting']->access_token))){
|
60 |
+
$access_token = sanitize_text_field(base64_decode($google_detail['setting']->access_token));
|
61 |
+
}
|
62 |
+
$api_obj = new Conversios_Onboarding_ApiCall($access_token,$refresh_token);
|
63 |
+
echo json_encode($api_obj->createUserTracking());
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
public function req_int(){
|
68 |
if (!class_exists('CustomApi.php')) {
|
69 |
require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
|
104 |
if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
|
105 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
106 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
107 |
+
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
108 |
echo json_encode($api_obj->saveAnalyticsData($_POST));
|
109 |
+
|
110 |
wp_die();
|
111 |
}else{
|
112 |
echo esc_html__("Admin security nonce is not verified.","conversios");
|
123 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
124 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
125 |
$api_obj = new Conversios_Onboarding_ApiCall(sanitize_text_field($tvc_data->access_token), sanitize_text_field($tvc_data->refresh_token));
|
126 |
+
echo json_encode($api_obj->getGoogleAdsAccountList($_POST));
|
127 |
wp_die();
|
128 |
}else{
|
129 |
echo esc_html__("Admin security nonce is not verified.","conversios");
|
576 |
$return->error = true;
|
577 |
$return->data = $response->data;
|
578 |
$return->status = $response_code;
|
579 |
+
$return->errors = json_encode($response->errors);
|
580 |
return $return;
|
581 |
}
|
582 |
} catch (Exception $e) {
|
614 |
$return->error = true;
|
615 |
$return->data = $response->data;
|
616 |
$return->status = $response_code;
|
617 |
+
$return->errors = json_encode($response->errors);
|
618 |
return $return;
|
619 |
}
|
620 |
}else{
|
649 |
$return->error = true;
|
650 |
$return->data = $result->data;
|
651 |
$return->status = $result->status;
|
652 |
+
$return->errors = json_encode($result->errors);
|
653 |
return $return;
|
654 |
}
|
655 |
} catch (Exception $e) {
|
659 |
|
660 |
public function createGoogleAdsAccount($postData) {
|
661 |
try {
|
|
|
662 |
$data = isset($_POST['tvc_data'])?sanitize_text_field($_POST['tvc_data']):"";
|
663 |
$tvc_data = json_decode(str_replace(""", "\"", $data));
|
664 |
$url = $this->apiDomain . '/adwords/create-ads-account';
|
685 |
}else{
|
686 |
$return->error = true;
|
687 |
$return->error = $result->errors;
|
688 |
+
$return->errors = json_encode($result->errors);
|
689 |
//$return->data = $result->data;
|
690 |
$return->status = $result->status;
|
691 |
return $return;
|
738 |
} else {
|
739 |
$return = new \stdClass();
|
740 |
$return->error = true;
|
741 |
+
$return->errors = json_encode($response_code->errors);
|
742 |
//$return->data = $result->data;
|
743 |
$return->status = $response_code;
|
744 |
return $return;
|
783 |
$return->error = true;
|
784 |
$return->data = $result->data;
|
785 |
$return->status = $result->status;
|
786 |
+
$return->errors = json_encode($result->errors);
|
787 |
return $return;
|
788 |
}
|
789 |
} catch (Exception $e) {
|
820 |
$return->error = true;
|
821 |
$return->data = $result->data;
|
822 |
$return->status = $result->status;
|
823 |
+
$return->errors = json_encode($result->errors);
|
824 |
return $return;
|
825 |
}
|
826 |
} catch (Exception $e) {
|
855 |
$return->error = true;
|
856 |
$return->data = $result->data;
|
857 |
$return->status = $result->status;
|
858 |
+
$return->errors = json_encode($result->errors);
|
859 |
return $return;
|
860 |
}
|
861 |
} catch (Exception $e) {
|
913 |
}else{
|
914 |
$return->error = true;
|
915 |
$return->errors = $result->errors;
|
|
|
916 |
$return->status = $response_code;
|
917 |
return $return;
|
918 |
}
|
956 |
}else{
|
957 |
$return->error = true;
|
958 |
$return->errors = $result->errors;
|
|
|
959 |
$return->status = $response_code;
|
960 |
return $return;
|
961 |
}
|
996 |
return $return;
|
997 |
}else{
|
998 |
$return->error = true;
|
999 |
+
// $return->errors = $result->errors;
|
|
|
1000 |
$return->status = $response_code;
|
1001 |
+
$return->errors = json_decode($result->errors[0]);
|
1002 |
+
$return->errors = json_decode($response->errors[0]);
|
1003 |
return $return;
|
1004 |
}
|
1005 |
|
1134 |
}
|
1135 |
}//generateAccessToken
|
1136 |
|
1137 |
+
public function createUserTracking() {
|
1138 |
+
try {
|
1139 |
+
$url = $this->apiDomain . '/usertracking';
|
1140 |
+
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
1141 |
+
$subscriptionId = $TVC_Admin_Helper->get_subscriptionId();
|
1142 |
+
$options_val = get_option('ee_ut');
|
1143 |
+
$header = array("Authorization: Bearer MTIzNA==", "Content-Type" => "application/json");
|
1144 |
+
$data = [
|
1145 |
+
'subscription_id' => sanitize_text_field((isset($subscriptionId))?$subscriptionId : ''),
|
1146 |
+
'site_url' => esc_url_raw(get_site_url()),
|
1147 |
+
'ee_ut' => $options_val
|
1148 |
+
];
|
1149 |
+
$args = array(
|
1150 |
+
'headers' =>$header,
|
1151 |
+
'method' => 'POST',
|
1152 |
+
'body' => wp_json_encode($data)
|
1153 |
+
);
|
1154 |
+
$result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
|
1155 |
+
$return = new \stdClass();
|
1156 |
+
if($result->status == 200){
|
1157 |
+
update_option("ee_ut",'' );
|
1158 |
+
$return->status = $result->status;
|
1159 |
+
$return->data = $result->data;
|
1160 |
+
$return->error = false;
|
1161 |
+
return $return;
|
1162 |
+
}else{
|
1163 |
+
$return->error = true;
|
1164 |
+
$return->data = $result->data;
|
1165 |
+
$return->status = $result->status;
|
1166 |
+
return $return;
|
1167 |
+
}
|
1168 |
+
} catch (Exception $e) {
|
1169 |
+
return $e->getMessage();
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
|
1173 |
}
|
1174 |
}
|
admin/images/icon/add.svg
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="14.907" height="14.907" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g transform="matrix(1,0,0,1,0,0)">
|
3 |
-
<linearGradient xmlns="http://www.w3.org/2000/svg" id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="258" x2="512" y2="512" gradientTransform="matrix(1 0 0 -1 0 514)"><stop stop-opacity="1" stop-color="#42445a" offset="0"/><stop stop-opacity="1" stop-color="#0872fc" offset="1"/></linearGradient>
|
4 |
-
<path xmlns="http://www.w3.org/2000/svg" style="fill:url(#SVGID_1_);" d="M512,256c0,141.503-114.517,256-256,256C114.497,512,0,397.483,0,256c0-11.046,8.954-20,20-20 s20,8.954,20,20c0,119.392,96.622,216,216,216c119.392,0,216-96.622,216-216c0-119.392-96.622-216-216-216c-11.046,0-20-8.954-20-20 s8.954-20,20-20C397.503,0,512,114.517,512,256z M160.406,61.8l25.869-10.716c10.204-4.228,15.051-15.927,10.823-26.132 s-15.926-15.054-26.132-10.823l-25.869,10.716c-10.204,4.228-15.051,15.927-10.823,26.132 C138.488,61.148,150.168,66.038,160.406,61.8z M93.366,113.165l19.799-19.799c7.811-7.811,7.811-20.475,0-28.285 s-20.475-7.811-28.285,0L65.081,84.88c-7.811,7.811-7.811,20.475,0,28.285C72.89,120.974,85.555,120.976,93.366,113.165z M24.952,197.099c10.227,4.236,21.914-0.642,26.132-10.823l10.716-25.87c4.228-10.205-0.619-21.904-10.823-26.132 c-10.207-4.227-21.904,0.619-26.132,10.823l-10.716,25.869C9.901,181.172,14.748,192.871,24.952,197.099z M256,156 c-11.046,0-20,8.954-20,20v60h-60c-11.046,0-20,8.954-20,20c0,11.046,8.954,20,20,20h60v60c0,11.046,8.954,20,20,20 c11.046,0,20-8.954,20-20v-60h60c11.046,0,20-8.954,20-20s-8.954-20-20-20h-60v-60C276,164.954,267.046,156,256,156z" fill=""/>
|
5 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
6 |
-
</g>
|
7 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
8 |
-
</g>
|
9 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
10 |
-
</g>
|
11 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
12 |
-
</g>
|
13 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
14 |
-
</g>
|
15 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
16 |
-
</g>
|
17 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
18 |
-
</g>
|
19 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
20 |
-
</g>
|
21 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
22 |
-
</g>
|
23 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
24 |
-
</g>
|
25 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
26 |
-
</g>
|
27 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
28 |
-
</g>
|
29 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
30 |
-
</g>
|
31 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
32 |
-
</g>
|
33 |
-
<g xmlns="http://www.w3.org/2000/svg">
|
34 |
-
</g>
|
35 |
-
</g></svg>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="14.907" height="14.907" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g transform="matrix(1,0,0,1,0,0)">
|
3 |
+
<linearGradient xmlns="http://www.w3.org/2000/svg" id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="0" y1="258" x2="512" y2="512" gradientTransform="matrix(1 0 0 -1 0 514)"><stop stop-opacity="1" stop-color="#42445a" offset="0"/><stop stop-opacity="1" stop-color="#0872fc" offset="1"/></linearGradient>
|
4 |
+
<path xmlns="http://www.w3.org/2000/svg" style="fill:url(#SVGID_1_);" d="M512,256c0,141.503-114.517,256-256,256C114.497,512,0,397.483,0,256c0-11.046,8.954-20,20-20 s20,8.954,20,20c0,119.392,96.622,216,216,216c119.392,0,216-96.622,216-216c0-119.392-96.622-216-216-216c-11.046,0-20-8.954-20-20 s8.954-20,20-20C397.503,0,512,114.517,512,256z M160.406,61.8l25.869-10.716c10.204-4.228,15.051-15.927,10.823-26.132 s-15.926-15.054-26.132-10.823l-25.869,10.716c-10.204,4.228-15.051,15.927-10.823,26.132 C138.488,61.148,150.168,66.038,160.406,61.8z M93.366,113.165l19.799-19.799c7.811-7.811,7.811-20.475,0-28.285 s-20.475-7.811-28.285,0L65.081,84.88c-7.811,7.811-7.811,20.475,0,28.285C72.89,120.974,85.555,120.976,93.366,113.165z M24.952,197.099c10.227,4.236,21.914-0.642,26.132-10.823l10.716-25.87c4.228-10.205-0.619-21.904-10.823-26.132 c-10.207-4.227-21.904,0.619-26.132,10.823l-10.716,25.869C9.901,181.172,14.748,192.871,24.952,197.099z M256,156 c-11.046,0-20,8.954-20,20v60h-60c-11.046,0-20,8.954-20,20c0,11.046,8.954,20,20,20h60v60c0,11.046,8.954,20,20,20 c11.046,0,20-8.954,20-20v-60h60c11.046,0,20-8.954,20-20s-8.954-20-20-20h-60v-60C276,164.954,267.046,156,256,156z" fill=""/>
|
5 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
6 |
+
</g>
|
7 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
8 |
+
</g>
|
9 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
10 |
+
</g>
|
11 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
12 |
+
</g>
|
13 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
14 |
+
</g>
|
15 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
16 |
+
</g>
|
17 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
18 |
+
</g>
|
19 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
20 |
+
</g>
|
21 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
22 |
+
</g>
|
23 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
24 |
+
</g>
|
25 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
26 |
+
</g>
|
27 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
28 |
+
</g>
|
29 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
30 |
+
</g>
|
31 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
32 |
+
</g>
|
33 |
+
<g xmlns="http://www.w3.org/2000/svg">
|
34 |
+
</g>
|
35 |
+
</g></svg>
|
admin/js/chart.js
CHANGED
@@ -1,13190 +1,13190 @@
|
|
1 |
-
/*!
|
2 |
-
* Chart.js v3.6.2
|
3 |
-
* https://www.chartjs.org
|
4 |
-
* (c) 2021 Chart.js Contributors
|
5 |
-
* Released under the MIT License
|
6 |
-
*/
|
7 |
-
(function (global, factory) {
|
8 |
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
9 |
-
typeof define === 'function' && define.amd ? define(factory) :
|
10 |
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chart = factory());
|
11 |
-
}(this, (function () { 'use strict';
|
12 |
-
|
13 |
-
function fontString(pixelSize, fontStyle, fontFamily) {
|
14 |
-
return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;
|
15 |
-
}
|
16 |
-
const requestAnimFrame = (function() {
|
17 |
-
if (typeof window === 'undefined') {
|
18 |
-
return function(callback) {
|
19 |
-
return callback();
|
20 |
-
};
|
21 |
-
}
|
22 |
-
return window.requestAnimationFrame;
|
23 |
-
}());
|
24 |
-
function throttled(fn, thisArg, updateFn) {
|
25 |
-
const updateArgs = updateFn || ((args) => Array.prototype.slice.call(args));
|
26 |
-
let ticking = false;
|
27 |
-
let args = [];
|
28 |
-
return function(...rest) {
|
29 |
-
args = updateArgs(rest);
|
30 |
-
if (!ticking) {
|
31 |
-
ticking = true;
|
32 |
-
requestAnimFrame.call(window, () => {
|
33 |
-
ticking = false;
|
34 |
-
fn.apply(thisArg, args);
|
35 |
-
});
|
36 |
-
}
|
37 |
-
};
|
38 |
-
}
|
39 |
-
function debounce(fn, delay) {
|
40 |
-
let timeout;
|
41 |
-
return function(...args) {
|
42 |
-
if (delay) {
|
43 |
-
clearTimeout(timeout);
|
44 |
-
timeout = setTimeout(fn, delay, args);
|
45 |
-
} else {
|
46 |
-
fn.apply(this, args);
|
47 |
-
}
|
48 |
-
return delay;
|
49 |
-
};
|
50 |
-
}
|
51 |
-
const _toLeftRightCenter = (align) => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';
|
52 |
-
const _alignStartEnd = (align, start, end) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;
|
53 |
-
const _textX = (align, left, right, rtl) => {
|
54 |
-
const check = rtl ? 'left' : 'right';
|
55 |
-
return align === check ? right : align === 'center' ? (left + right) / 2 : left;
|
56 |
-
};
|
57 |
-
|
58 |
-
class Animator {
|
59 |
-
constructor() {
|
60 |
-
this._request = null;
|
61 |
-
this._charts = new Map();
|
62 |
-
this._running = false;
|
63 |
-
this._lastDate = undefined;
|
64 |
-
}
|
65 |
-
_notify(chart, anims, date, type) {
|
66 |
-
const callbacks = anims.listeners[type];
|
67 |
-
const numSteps = anims.duration;
|
68 |
-
callbacks.forEach(fn => fn({
|
69 |
-
chart,
|
70 |
-
initial: anims.initial,
|
71 |
-
numSteps,
|
72 |
-
currentStep: Math.min(date - anims.start, numSteps)
|
73 |
-
}));
|
74 |
-
}
|
75 |
-
_refresh() {
|
76 |
-
if (this._request) {
|
77 |
-
return;
|
78 |
-
}
|
79 |
-
this._running = true;
|
80 |
-
this._request = requestAnimFrame.call(window, () => {
|
81 |
-
this._update();
|
82 |
-
this._request = null;
|
83 |
-
if (this._running) {
|
84 |
-
this._refresh();
|
85 |
-
}
|
86 |
-
});
|
87 |
-
}
|
88 |
-
_update(date = Date.now()) {
|
89 |
-
let remaining = 0;
|
90 |
-
this._charts.forEach((anims, chart) => {
|
91 |
-
if (!anims.running || !anims.items.length) {
|
92 |
-
return;
|
93 |
-
}
|
94 |
-
const items = anims.items;
|
95 |
-
let i = items.length - 1;
|
96 |
-
let draw = false;
|
97 |
-
let item;
|
98 |
-
for (; i >= 0; --i) {
|
99 |
-
item = items[i];
|
100 |
-
if (item._active) {
|
101 |
-
if (item._total > anims.duration) {
|
102 |
-
anims.duration = item._total;
|
103 |
-
}
|
104 |
-
item.tick(date);
|
105 |
-
draw = true;
|
106 |
-
} else {
|
107 |
-
items[i] = items[items.length - 1];
|
108 |
-
items.pop();
|
109 |
-
}
|
110 |
-
}
|
111 |
-
if (draw) {
|
112 |
-
chart.draw();
|
113 |
-
this._notify(chart, anims, date, 'progress');
|
114 |
-
}
|
115 |
-
if (!items.length) {
|
116 |
-
anims.running = false;
|
117 |
-
this._notify(chart, anims, date, 'complete');
|
118 |
-
anims.initial = false;
|
119 |
-
}
|
120 |
-
remaining += items.length;
|
121 |
-
});
|
122 |
-
this._lastDate = date;
|
123 |
-
if (remaining === 0) {
|
124 |
-
this._running = false;
|
125 |
-
}
|
126 |
-
}
|
127 |
-
_getAnims(chart) {
|
128 |
-
const charts = this._charts;
|
129 |
-
let anims = charts.get(chart);
|
130 |
-
if (!anims) {
|
131 |
-
anims = {
|
132 |
-
running: false,
|
133 |
-
initial: true,
|
134 |
-
items: [],
|
135 |
-
listeners: {
|
136 |
-
complete: [],
|
137 |
-
progress: []
|
138 |
-
}
|
139 |
-
};
|
140 |
-
charts.set(chart, anims);
|
141 |
-
}
|
142 |
-
return anims;
|
143 |
-
}
|
144 |
-
listen(chart, event, cb) {
|
145 |
-
this._getAnims(chart).listeners[event].push(cb);
|
146 |
-
}
|
147 |
-
add(chart, items) {
|
148 |
-
if (!items || !items.length) {
|
149 |
-
return;
|
150 |
-
}
|
151 |
-
this._getAnims(chart).items.push(...items);
|
152 |
-
}
|
153 |
-
has(chart) {
|
154 |
-
return this._getAnims(chart).items.length > 0;
|
155 |
-
}
|
156 |
-
start(chart) {
|
157 |
-
const anims = this._charts.get(chart);
|
158 |
-
if (!anims) {
|
159 |
-
return;
|
160 |
-
}
|
161 |
-
anims.running = true;
|
162 |
-
anims.start = Date.now();
|
163 |
-
anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);
|
164 |
-
this._refresh();
|
165 |
-
}
|
166 |
-
running(chart) {
|
167 |
-
if (!this._running) {
|
168 |
-
return false;
|
169 |
-
}
|
170 |
-
const anims = this._charts.get(chart);
|
171 |
-
if (!anims || !anims.running || !anims.items.length) {
|
172 |
-
return false;
|
173 |
-
}
|
174 |
-
return true;
|
175 |
-
}
|
176 |
-
stop(chart) {
|
177 |
-
const anims = this._charts.get(chart);
|
178 |
-
if (!anims || !anims.items.length) {
|
179 |
-
return;
|
180 |
-
}
|
181 |
-
const items = anims.items;
|
182 |
-
let i = items.length - 1;
|
183 |
-
for (; i >= 0; --i) {
|
184 |
-
items[i].cancel();
|
185 |
-
}
|
186 |
-
anims.items = [];
|
187 |
-
this._notify(chart, anims, Date.now(), 'complete');
|
188 |
-
}
|
189 |
-
remove(chart) {
|
190 |
-
return this._charts.delete(chart);
|
191 |
-
}
|
192 |
-
}
|
193 |
-
var animator = new Animator();
|
194 |
-
|
195 |
-
/*!
|
196 |
-
* @kurkle/color v0.1.9
|
197 |
-
* https://github.com/kurkle/color#readme
|
198 |
-
* (c) 2020 Jukka Kurkela
|
199 |
-
* Released under the MIT License
|
200 |
-
*/
|
201 |
-
const map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};
|
202 |
-
const hex = '0123456789ABCDEF';
|
203 |
-
const h1 = (b) => hex[b & 0xF];
|
204 |
-
const h2 = (b) => hex[(b & 0xF0) >> 4] + hex[b & 0xF];
|
205 |
-
const eq = (b) => (((b & 0xF0) >> 4) === (b & 0xF));
|
206 |
-
function isShort(v) {
|
207 |
-
return eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);
|
208 |
-
}
|
209 |
-
function hexParse(str) {
|
210 |
-
var len = str.length;
|
211 |
-
var ret;
|
212 |
-
if (str[0] === '#') {
|
213 |
-
if (len === 4 || len === 5) {
|
214 |
-
ret = {
|
215 |
-
r: 255 & map$1[str[1]] * 17,
|
216 |
-
g: 255 & map$1[str[2]] * 17,
|
217 |
-
b: 255 & map$1[str[3]] * 17,
|
218 |
-
a: len === 5 ? map$1[str[4]] * 17 : 255
|
219 |
-
};
|
220 |
-
} else if (len === 7 || len === 9) {
|
221 |
-
ret = {
|
222 |
-
r: map$1[str[1]] << 4 | map$1[str[2]],
|
223 |
-
g: map$1[str[3]] << 4 | map$1[str[4]],
|
224 |
-
b: map$1[str[5]] << 4 | map$1[str[6]],
|
225 |
-
a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255
|
226 |
-
};
|
227 |
-
}
|
228 |
-
}
|
229 |
-
return ret;
|
230 |
-
}
|
231 |
-
function hexString(v) {
|
232 |
-
var f = isShort(v) ? h1 : h2;
|
233 |
-
return v
|
234 |
-
? '#' + f(v.r) + f(v.g) + f(v.b) + (v.a < 255 ? f(v.a) : '')
|
235 |
-
: v;
|
236 |
-
}
|
237 |
-
function round(v) {
|
238 |
-
return v + 0.5 | 0;
|
239 |
-
}
|
240 |
-
const lim = (v, l, h) => Math.max(Math.min(v, h), l);
|
241 |
-
function p2b(v) {
|
242 |
-
return lim(round(v * 2.55), 0, 255);
|
243 |
-
}
|
244 |
-
function n2b(v) {
|
245 |
-
return lim(round(v * 255), 0, 255);
|
246 |
-
}
|
247 |
-
function b2n(v) {
|
248 |
-
return lim(round(v / 2.55) / 100, 0, 1);
|
249 |
-
}
|
250 |
-
function n2p(v) {
|
251 |
-
return lim(round(v * 100), 0, 100);
|
252 |
-
}
|
253 |
-
const RGB_RE = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
254 |
-
function rgbParse(str) {
|
255 |
-
const m = RGB_RE.exec(str);
|
256 |
-
let a = 255;
|
257 |
-
let r, g, b;
|
258 |
-
if (!m) {
|
259 |
-
return;
|
260 |
-
}
|
261 |
-
if (m[7] !== r) {
|
262 |
-
const v = +m[7];
|
263 |
-
a = 255 & (m[8] ? p2b(v) : v * 255);
|
264 |
-
}
|
265 |
-
r = +m[1];
|
266 |
-
g = +m[3];
|
267 |
-
b = +m[5];
|
268 |
-
r = 255 & (m[2] ? p2b(r) : r);
|
269 |
-
g = 255 & (m[4] ? p2b(g) : g);
|
270 |
-
b = 255 & (m[6] ? p2b(b) : b);
|
271 |
-
return {
|
272 |
-
r: r,
|
273 |
-
g: g,
|
274 |
-
b: b,
|
275 |
-
a: a
|
276 |
-
};
|
277 |
-
}
|
278 |
-
function rgbString(v) {
|
279 |
-
return v && (
|
280 |
-
v.a < 255
|
281 |
-
? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`
|
282 |
-
: `rgb(${v.r}, ${v.g}, ${v.b})`
|
283 |
-
);
|
284 |
-
}
|
285 |
-
const HUE_RE = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
286 |
-
function hsl2rgbn(h, s, l) {
|
287 |
-
const a = s * Math.min(l, 1 - l);
|
288 |
-
const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
289 |
-
return [f(0), f(8), f(4)];
|
290 |
-
}
|
291 |
-
function hsv2rgbn(h, s, v) {
|
292 |
-
const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
|
293 |
-
return [f(5), f(3), f(1)];
|
294 |
-
}
|
295 |
-
function hwb2rgbn(h, w, b) {
|
296 |
-
const rgb = hsl2rgbn(h, 1, 0.5);
|
297 |
-
let i;
|
298 |
-
if (w + b > 1) {
|
299 |
-
i = 1 / (w + b);
|
300 |
-
w *= i;
|
301 |
-
b *= i;
|
302 |
-
}
|
303 |
-
for (i = 0; i < 3; i++) {
|
304 |
-
rgb[i] *= 1 - w - b;
|
305 |
-
rgb[i] += w;
|
306 |
-
}
|
307 |
-
return rgb;
|
308 |
-
}
|
309 |
-
function rgb2hsl(v) {
|
310 |
-
const range = 255;
|
311 |
-
const r = v.r / range;
|
312 |
-
const g = v.g / range;
|
313 |
-
const b = v.b / range;
|
314 |
-
const max = Math.max(r, g, b);
|
315 |
-
const min = Math.min(r, g, b);
|
316 |
-
const l = (max + min) / 2;
|
317 |
-
let h, s, d;
|
318 |
-
if (max !== min) {
|
319 |
-
d = max - min;
|
320 |
-
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
321 |
-
h = max === r
|
322 |
-
? ((g - b) / d) + (g < b ? 6 : 0)
|
323 |
-
: max === g
|
324 |
-
? (b - r) / d + 2
|
325 |
-
: (r - g) / d + 4;
|
326 |
-
h = h * 60 + 0.5;
|
327 |
-
}
|
328 |
-
return [h | 0, s || 0, l];
|
329 |
-
}
|
330 |
-
function calln(f, a, b, c) {
|
331 |
-
return (
|
332 |
-
Array.isArray(a)
|
333 |
-
? f(a[0], a[1], a[2])
|
334 |
-
: f(a, b, c)
|
335 |
-
).map(n2b);
|
336 |
-
}
|
337 |
-
function hsl2rgb(h, s, l) {
|
338 |
-
return calln(hsl2rgbn, h, s, l);
|
339 |
-
}
|
340 |
-
function hwb2rgb(h, w, b) {
|
341 |
-
return calln(hwb2rgbn, h, w, b);
|
342 |
-
}
|
343 |
-
function hsv2rgb(h, s, v) {
|
344 |
-
return calln(hsv2rgbn, h, s, v);
|
345 |
-
}
|
346 |
-
function hue(h) {
|
347 |
-
return (h % 360 + 360) % 360;
|
348 |
-
}
|
349 |
-
function hueParse(str) {
|
350 |
-
const m = HUE_RE.exec(str);
|
351 |
-
let a = 255;
|
352 |
-
let v;
|
353 |
-
if (!m) {
|
354 |
-
return;
|
355 |
-
}
|
356 |
-
if (m[5] !== v) {
|
357 |
-
a = m[6] ? p2b(+m[5]) : n2b(+m[5]);
|
358 |
-
}
|
359 |
-
const h = hue(+m[2]);
|
360 |
-
const p1 = +m[3] / 100;
|
361 |
-
const p2 = +m[4] / 100;
|
362 |
-
if (m[1] === 'hwb') {
|
363 |
-
v = hwb2rgb(h, p1, p2);
|
364 |
-
} else if (m[1] === 'hsv') {
|
365 |
-
v = hsv2rgb(h, p1, p2);
|
366 |
-
} else {
|
367 |
-
v = hsl2rgb(h, p1, p2);
|
368 |
-
}
|
369 |
-
return {
|
370 |
-
r: v[0],
|
371 |
-
g: v[1],
|
372 |
-
b: v[2],
|
373 |
-
a: a
|
374 |
-
};
|
375 |
-
}
|
376 |
-
function rotate(v, deg) {
|
377 |
-
var h = rgb2hsl(v);
|
378 |
-
h[0] = hue(h[0] + deg);
|
379 |
-
h = hsl2rgb(h);
|
380 |
-
v.r = h[0];
|
381 |
-
v.g = h[1];
|
382 |
-
v.b = h[2];
|
383 |
-
}
|
384 |
-
function hslString(v) {
|
385 |
-
if (!v) {
|
386 |
-
return;
|
387 |
-
}
|
388 |
-
const a = rgb2hsl(v);
|
389 |
-
const h = a[0];
|
390 |
-
const s = n2p(a[1]);
|
391 |
-
const l = n2p(a[2]);
|
392 |
-
return v.a < 255
|
393 |
-
? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`
|
394 |
-
: `hsl(${h}, ${s}%, ${l}%)`;
|
395 |
-
}
|
396 |
-
const map$1$1 = {
|
397 |
-
x: 'dark',
|
398 |
-
Z: 'light',
|
399 |
-
Y: 're',
|
400 |
-
X: 'blu',
|
401 |
-
W: 'gr',
|
402 |
-
V: 'medium',
|
403 |
-
U: 'slate',
|
404 |
-
A: 'ee',
|
405 |
-
T: 'ol',
|
406 |
-
S: 'or',
|
407 |
-
B: 'ra',
|
408 |
-
C: 'lateg',
|
409 |
-
D: 'ights',
|
410 |
-
R: 'in',
|
411 |
-
Q: 'turquois',
|
412 |
-
E: 'hi',
|
413 |
-
P: 'ro',
|
414 |
-
O: 'al',
|
415 |
-
N: 'le',
|
416 |
-
M: 'de',
|
417 |
-
L: 'yello',
|
418 |
-
F: 'en',
|
419 |
-
K: 'ch',
|
420 |
-
G: 'arks',
|
421 |
-
H: 'ea',
|
422 |
-
I: 'ightg',
|
423 |
-
J: 'wh'
|
424 |
-
};
|
425 |
-
const names = {
|
426 |
-
OiceXe: 'f0f8ff',
|
427 |
-
antiquewEte: 'faebd7',
|
428 |
-
aqua: 'ffff',
|
429 |
-
aquamarRe: '7fffd4',
|
430 |
-
azuY: 'f0ffff',
|
431 |
-
beige: 'f5f5dc',
|
432 |
-
bisque: 'ffe4c4',
|
433 |
-
black: '0',
|
434 |
-
blanKedOmond: 'ffebcd',
|
435 |
-
Xe: 'ff',
|
436 |
-
XeviTet: '8a2be2',
|
437 |
-
bPwn: 'a52a2a',
|
438 |
-
burlywood: 'deb887',
|
439 |
-
caMtXe: '5f9ea0',
|
440 |
-
KartYuse: '7fff00',
|
441 |
-
KocTate: 'd2691e',
|
442 |
-
cSO: 'ff7f50',
|
443 |
-
cSnflowerXe: '6495ed',
|
444 |
-
cSnsilk: 'fff8dc',
|
445 |
-
crimson: 'dc143c',
|
446 |
-
cyan: 'ffff',
|
447 |
-
xXe: '8b',
|
448 |
-
xcyan: '8b8b',
|
449 |
-
xgTMnPd: 'b8860b',
|
450 |
-
xWay: 'a9a9a9',
|
451 |
-
xgYF: '6400',
|
452 |
-
xgYy: 'a9a9a9',
|
453 |
-
xkhaki: 'bdb76b',
|
454 |
-
xmagFta: '8b008b',
|
455 |
-
xTivegYF: '556b2f',
|
456 |
-
xSange: 'ff8c00',
|
457 |
-
xScEd: '9932cc',
|
458 |
-
xYd: '8b0000',
|
459 |
-
xsOmon: 'e9967a',
|
460 |
-
xsHgYF: '8fbc8f',
|
461 |
-
xUXe: '483d8b',
|
462 |
-
xUWay: '2f4f4f',
|
463 |
-
xUgYy: '2f4f4f',
|
464 |
-
xQe: 'ced1',
|
465 |
-
xviTet: '9400d3',
|
466 |
-
dAppRk: 'ff1493',
|
467 |
-
dApskyXe: 'bfff',
|
468 |
-
dimWay: '696969',
|
469 |
-
dimgYy: '696969',
|
470 |
-
dodgerXe: '1e90ff',
|
471 |
-
fiYbrick: 'b22222',
|
472 |
-
flSOwEte: 'fffaf0',
|
473 |
-
foYstWAn: '228b22',
|
474 |
-
fuKsia: 'ff00ff',
|
475 |
-
gaRsbSo: 'dcdcdc',
|
476 |
-
ghostwEte: 'f8f8ff',
|
477 |
-
gTd: 'ffd700',
|
478 |
-
gTMnPd: 'daa520',
|
479 |
-
Way: '808080',
|
480 |
-
gYF: '8000',
|
481 |
-
gYFLw: 'adff2f',
|
482 |
-
gYy: '808080',
|
483 |
-
honeyMw: 'f0fff0',
|
484 |
-
hotpRk: 'ff69b4',
|
485 |
-
RdianYd: 'cd5c5c',
|
486 |
-
Rdigo: '4b0082',
|
487 |
-
ivSy: 'fffff0',
|
488 |
-
khaki: 'f0e68c',
|
489 |
-
lavFMr: 'e6e6fa',
|
490 |
-
lavFMrXsh: 'fff0f5',
|
491 |
-
lawngYF: '7cfc00',
|
492 |
-
NmoncEffon: 'fffacd',
|
493 |
-
ZXe: 'add8e6',
|
494 |
-
ZcSO: 'f08080',
|
495 |
-
Zcyan: 'e0ffff',
|
496 |
-
ZgTMnPdLw: 'fafad2',
|
497 |
-
ZWay: 'd3d3d3',
|
498 |
-
ZgYF: '90ee90',
|
499 |
-
ZgYy: 'd3d3d3',
|
500 |
-
ZpRk: 'ffb6c1',
|
501 |
-
ZsOmon: 'ffa07a',
|
502 |
-
ZsHgYF: '20b2aa',
|
503 |
-
ZskyXe: '87cefa',
|
504 |
-
ZUWay: '778899',
|
505 |
-
ZUgYy: '778899',
|
506 |
-
ZstAlXe: 'b0c4de',
|
507 |
-
ZLw: 'ffffe0',
|
508 |
-
lime: 'ff00',
|
509 |
-
limegYF: '32cd32',
|
510 |
-
lRF: 'faf0e6',
|
511 |
-
magFta: 'ff00ff',
|
512 |
-
maPon: '800000',
|
513 |
-
VaquamarRe: '66cdaa',
|
514 |
-
VXe: 'cd',
|
515 |
-
VScEd: 'ba55d3',
|
516 |
-
VpurpN: '9370db',
|
517 |
-
VsHgYF: '3cb371',
|
518 |
-
VUXe: '7b68ee',
|
519 |
-
VsprRggYF: 'fa9a',
|
520 |
-
VQe: '48d1cc',
|
521 |
-
VviTetYd: 'c71585',
|
522 |
-
midnightXe: '191970',
|
523 |
-
mRtcYam: 'f5fffa',
|
524 |
-
mistyPse: 'ffe4e1',
|
525 |
-
moccasR: 'ffe4b5',
|
526 |
-
navajowEte: 'ffdead',
|
527 |
-
navy: '80',
|
528 |
-
Tdlace: 'fdf5e6',
|
529 |
-
Tive: '808000',
|
530 |
-
TivedBb: '6b8e23',
|
531 |
-
Sange: 'ffa500',
|
532 |
-
SangeYd: 'ff4500',
|
533 |
-
ScEd: 'da70d6',
|
534 |
-
pOegTMnPd: 'eee8aa',
|
535 |
-
pOegYF: '98fb98',
|
536 |
-
pOeQe: 'afeeee',
|
537 |
-
pOeviTetYd: 'db7093',
|
538 |
-
papayawEp: 'ffefd5',
|
539 |
-
pHKpuff: 'ffdab9',
|
540 |
-
peru: 'cd853f',
|
541 |
-
pRk: 'ffc0cb',
|
542 |
-
plum: 'dda0dd',
|
543 |
-
powMrXe: 'b0e0e6',
|
544 |
-
purpN: '800080',
|
545 |
-
YbeccapurpN: '663399',
|
546 |
-
Yd: 'ff0000',
|
547 |
-
Psybrown: 'bc8f8f',
|
548 |
-
PyOXe: '4169e1',
|
549 |
-
saddNbPwn: '8b4513',
|
550 |
-
sOmon: 'fa8072',
|
551 |
-
sandybPwn: 'f4a460',
|
552 |
-
sHgYF: '2e8b57',
|
553 |
-
sHshell: 'fff5ee',
|
554 |
-
siFna: 'a0522d',
|
555 |
-
silver: 'c0c0c0',
|
556 |
-
skyXe: '87ceeb',
|
557 |
-
UXe: '6a5acd',
|
558 |
-
UWay: '708090',
|
559 |
-
UgYy: '708090',
|
560 |
-
snow: 'fffafa',
|
561 |
-
sprRggYF: 'ff7f',
|
562 |
-
stAlXe: '4682b4',
|
563 |
-
tan: 'd2b48c',
|
564 |
-
teO: '8080',
|
565 |
-
tEstN: 'd8bfd8',
|
566 |
-
tomato: 'ff6347',
|
567 |
-
Qe: '40e0d0',
|
568 |
-
viTet: 'ee82ee',
|
569 |
-
JHt: 'f5deb3',
|
570 |
-
wEte: 'ffffff',
|
571 |
-
wEtesmoke: 'f5f5f5',
|
572 |
-
Lw: 'ffff00',
|
573 |
-
LwgYF: '9acd32'
|
574 |
-
};
|
575 |
-
function unpack() {
|
576 |
-
const unpacked = {};
|
577 |
-
const keys = Object.keys(names);
|
578 |
-
const tkeys = Object.keys(map$1$1);
|
579 |
-
let i, j, k, ok, nk;
|
580 |
-
for (i = 0; i < keys.length; i++) {
|
581 |
-
ok = nk = keys[i];
|
582 |
-
for (j = 0; j < tkeys.length; j++) {
|
583 |
-
k = tkeys[j];
|
584 |
-
nk = nk.replace(k, map$1$1[k]);
|
585 |
-
}
|
586 |
-
k = parseInt(names[ok], 16);
|
587 |
-
unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];
|
588 |
-
}
|
589 |
-
return unpacked;
|
590 |
-
}
|
591 |
-
let names$1;
|
592 |
-
function nameParse(str) {
|
593 |
-
if (!names$1) {
|
594 |
-
names$1 = unpack();
|
595 |
-
names$1.transparent = [0, 0, 0, 0];
|
596 |
-
}
|
597 |
-
const a = names$1[str.toLowerCase()];
|
598 |
-
return a && {
|
599 |
-
r: a[0],
|
600 |
-
g: a[1],
|
601 |
-
b: a[2],
|
602 |
-
a: a.length === 4 ? a[3] : 255
|
603 |
-
};
|
604 |
-
}
|
605 |
-
function modHSL(v, i, ratio) {
|
606 |
-
if (v) {
|
607 |
-
let tmp = rgb2hsl(v);
|
608 |
-
tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));
|
609 |
-
tmp = hsl2rgb(tmp);
|
610 |
-
v.r = tmp[0];
|
611 |
-
v.g = tmp[1];
|
612 |
-
v.b = tmp[2];
|
613 |
-
}
|
614 |
-
}
|
615 |
-
function clone$1(v, proto) {
|
616 |
-
return v ? Object.assign(proto || {}, v) : v;
|
617 |
-
}
|
618 |
-
function fromObject(input) {
|
619 |
-
var v = {r: 0, g: 0, b: 0, a: 255};
|
620 |
-
if (Array.isArray(input)) {
|
621 |
-
if (input.length >= 3) {
|
622 |
-
v = {r: input[0], g: input[1], b: input[2], a: 255};
|
623 |
-
if (input.length > 3) {
|
624 |
-
v.a = n2b(input[3]);
|
625 |
-
}
|
626 |
-
}
|
627 |
-
} else {
|
628 |
-
v = clone$1(input, {r: 0, g: 0, b: 0, a: 1});
|
629 |
-
v.a = n2b(v.a);
|
630 |
-
}
|
631 |
-
return v;
|
632 |
-
}
|
633 |
-
function functionParse(str) {
|
634 |
-
if (str.charAt(0) === 'r') {
|
635 |
-
return rgbParse(str);
|
636 |
-
}
|
637 |
-
return hueParse(str);
|
638 |
-
}
|
639 |
-
class Color {
|
640 |
-
constructor(input) {
|
641 |
-
if (input instanceof Color) {
|
642 |
-
return input;
|
643 |
-
}
|
644 |
-
const type = typeof input;
|
645 |
-
let v;
|
646 |
-
if (type === 'object') {
|
647 |
-
v = fromObject(input);
|
648 |
-
} else if (type === 'string') {
|
649 |
-
v = hexParse(input) || nameParse(input) || functionParse(input);
|
650 |
-
}
|
651 |
-
this._rgb = v;
|
652 |
-
this._valid = !!v;
|
653 |
-
}
|
654 |
-
get valid() {
|
655 |
-
return this._valid;
|
656 |
-
}
|
657 |
-
get rgb() {
|
658 |
-
var v = clone$1(this._rgb);
|
659 |
-
if (v) {
|
660 |
-
v.a = b2n(v.a);
|
661 |
-
}
|
662 |
-
return v;
|
663 |
-
}
|
664 |
-
set rgb(obj) {
|
665 |
-
this._rgb = fromObject(obj);
|
666 |
-
}
|
667 |
-
rgbString() {
|
668 |
-
return this._valid ? rgbString(this._rgb) : this._rgb;
|
669 |
-
}
|
670 |
-
hexString() {
|
671 |
-
return this._valid ? hexString(this._rgb) : this._rgb;
|
672 |
-
}
|
673 |
-
hslString() {
|
674 |
-
return this._valid ? hslString(this._rgb) : this._rgb;
|
675 |
-
}
|
676 |
-
mix(color, weight) {
|
677 |
-
const me = this;
|
678 |
-
if (color) {
|
679 |
-
const c1 = me.rgb;
|
680 |
-
const c2 = color.rgb;
|
681 |
-
let w2;
|
682 |
-
const p = weight === w2 ? 0.5 : weight;
|
683 |
-
const w = 2 * p - 1;
|
684 |
-
const a = c1.a - c2.a;
|
685 |
-
const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
|
686 |
-
w2 = 1 - w1;
|
687 |
-
c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;
|
688 |
-
c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;
|
689 |
-
c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;
|
690 |
-
c1.a = p * c1.a + (1 - p) * c2.a;
|
691 |
-
me.rgb = c1;
|
692 |
-
}
|
693 |
-
return me;
|
694 |
-
}
|
695 |
-
clone() {
|
696 |
-
return new Color(this.rgb);
|
697 |
-
}
|
698 |
-
alpha(a) {
|
699 |
-
this._rgb.a = n2b(a);
|
700 |
-
return this;
|
701 |
-
}
|
702 |
-
clearer(ratio) {
|
703 |
-
const rgb = this._rgb;
|
704 |
-
rgb.a *= 1 - ratio;
|
705 |
-
return this;
|
706 |
-
}
|
707 |
-
greyscale() {
|
708 |
-
const rgb = this._rgb;
|
709 |
-
const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);
|
710 |
-
rgb.r = rgb.g = rgb.b = val;
|
711 |
-
return this;
|
712 |
-
}
|
713 |
-
opaquer(ratio) {
|
714 |
-
const rgb = this._rgb;
|
715 |
-
rgb.a *= 1 + ratio;
|
716 |
-
return this;
|
717 |
-
}
|
718 |
-
negate() {
|
719 |
-
const v = this._rgb;
|
720 |
-
v.r = 255 - v.r;
|
721 |
-
v.g = 255 - v.g;
|
722 |
-
v.b = 255 - v.b;
|
723 |
-
return this;
|
724 |
-
}
|
725 |
-
lighten(ratio) {
|
726 |
-
modHSL(this._rgb, 2, ratio);
|
727 |
-
return this;
|
728 |
-
}
|
729 |
-
darken(ratio) {
|
730 |
-
modHSL(this._rgb, 2, -ratio);
|
731 |
-
return this;
|
732 |
-
}
|
733 |
-
saturate(ratio) {
|
734 |
-
modHSL(this._rgb, 1, ratio);
|
735 |
-
return this;
|
736 |
-
}
|
737 |
-
desaturate(ratio) {
|
738 |
-
modHSL(this._rgb, 1, -ratio);
|
739 |
-
return this;
|
740 |
-
}
|
741 |
-
rotate(deg) {
|
742 |
-
rotate(this._rgb, deg);
|
743 |
-
return this;
|
744 |
-
}
|
745 |
-
}
|
746 |
-
function index_esm(input) {
|
747 |
-
return new Color(input);
|
748 |
-
}
|
749 |
-
|
750 |
-
const isPatternOrGradient = (value) => value instanceof CanvasGradient || value instanceof CanvasPattern;
|
751 |
-
function color(value) {
|
752 |
-
return isPatternOrGradient(value) ? value : index_esm(value);
|
753 |
-
}
|
754 |
-
function getHoverColor(value) {
|
755 |
-
return isPatternOrGradient(value)
|
756 |
-
? value
|
757 |
-
: index_esm(value).saturate(0.5).darken(0.1).hexString();
|
758 |
-
}
|
759 |
-
|
760 |
-
function noop() {}
|
761 |
-
const uid = (function() {
|
762 |
-
let id = 0;
|
763 |
-
return function() {
|
764 |
-
return id++;
|
765 |
-
};
|
766 |
-
}());
|
767 |
-
function isNullOrUndef(value) {
|
768 |
-
return value === null || typeof value === 'undefined';
|
769 |
-
}
|
770 |
-
function isArray(value) {
|
771 |
-
if (Array.isArray && Array.isArray(value)) {
|
772 |
-
return true;
|
773 |
-
}
|
774 |
-
const type = Object.prototype.toString.call(value);
|
775 |
-
if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
|
776 |
-
return true;
|
777 |
-
}
|
778 |
-
return false;
|
779 |
-
}
|
780 |
-
function isObject(value) {
|
781 |
-
return value !== null && Object.prototype.toString.call(value) === '[object Object]';
|
782 |
-
}
|
783 |
-
const isNumberFinite = (value) => (typeof value === 'number' || value instanceof Number) && isFinite(+value);
|
784 |
-
function finiteOrDefault(value, defaultValue) {
|
785 |
-
return isNumberFinite(value) ? value : defaultValue;
|
786 |
-
}
|
787 |
-
function valueOrDefault(value, defaultValue) {
|
788 |
-
return typeof value === 'undefined' ? defaultValue : value;
|
789 |
-
}
|
790 |
-
const toPercentage = (value, dimension) =>
|
791 |
-
typeof value === 'string' && value.endsWith('%') ?
|
792 |
-
parseFloat(value) / 100
|
793 |
-
: value / dimension;
|
794 |
-
const toDimension = (value, dimension) =>
|
795 |
-
typeof value === 'string' && value.endsWith('%') ?
|
796 |
-
parseFloat(value) / 100 * dimension
|
797 |
-
: +value;
|
798 |
-
function callback(fn, args, thisArg) {
|
799 |
-
if (fn && typeof fn.call === 'function') {
|
800 |
-
return fn.apply(thisArg, args);
|
801 |
-
}
|
802 |
-
}
|
803 |
-
function each(loopable, fn, thisArg, reverse) {
|
804 |
-
let i, len, keys;
|
805 |
-
if (isArray(loopable)) {
|
806 |
-
len = loopable.length;
|
807 |
-
if (reverse) {
|
808 |
-
for (i = len - 1; i >= 0; i--) {
|
809 |
-
fn.call(thisArg, loopable[i], i);
|
810 |
-
}
|
811 |
-
} else {
|
812 |
-
for (i = 0; i < len; i++) {
|
813 |
-
fn.call(thisArg, loopable[i], i);
|
814 |
-
}
|
815 |
-
}
|
816 |
-
} else if (isObject(loopable)) {
|
817 |
-
keys = Object.keys(loopable);
|
818 |
-
len = keys.length;
|
819 |
-
for (i = 0; i < len; i++) {
|
820 |
-
fn.call(thisArg, loopable[keys[i]], keys[i]);
|
821 |
-
}
|
822 |
-
}
|
823 |
-
}
|
824 |
-
function _elementsEqual(a0, a1) {
|
825 |
-
let i, ilen, v0, v1;
|
826 |
-
if (!a0 || !a1 || a0.length !== a1.length) {
|
827 |
-
return false;
|
828 |
-
}
|
829 |
-
for (i = 0, ilen = a0.length; i < ilen; ++i) {
|
830 |
-
v0 = a0[i];
|
831 |
-
v1 = a1[i];
|
832 |
-
if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
|
833 |
-
return false;
|
834 |
-
}
|
835 |
-
}
|
836 |
-
return true;
|
837 |
-
}
|
838 |
-
function clone(source) {
|
839 |
-
if (isArray(source)) {
|
840 |
-
return source.map(clone);
|
841 |
-
}
|
842 |
-
if (isObject(source)) {
|
843 |
-
const target = Object.create(null);
|
844 |
-
const keys = Object.keys(source);
|
845 |
-
const klen = keys.length;
|
846 |
-
let k = 0;
|
847 |
-
for (; k < klen; ++k) {
|
848 |
-
target[keys[k]] = clone(source[keys[k]]);
|
849 |
-
}
|
850 |
-
return target;
|
851 |
-
}
|
852 |
-
return source;
|
853 |
-
}
|
854 |
-
function isValidKey(key) {
|
855 |
-
return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;
|
856 |
-
}
|
857 |
-
function _merger(key, target, source, options) {
|
858 |
-
if (!isValidKey(key)) {
|
859 |
-
return;
|
860 |
-
}
|
861 |
-
const tval = target[key];
|
862 |
-
const sval = source[key];
|
863 |
-
if (isObject(tval) && isObject(sval)) {
|
864 |
-
merge(tval, sval, options);
|
865 |
-
} else {
|
866 |
-
target[key] = clone(sval);
|
867 |
-
}
|
868 |
-
}
|
869 |
-
function merge(target, source, options) {
|
870 |
-
const sources = isArray(source) ? source : [source];
|
871 |
-
const ilen = sources.length;
|
872 |
-
if (!isObject(target)) {
|
873 |
-
return target;
|
874 |
-
}
|
875 |
-
options = options || {};
|
876 |
-
const merger = options.merger || _merger;
|
877 |
-
for (let i = 0; i < ilen; ++i) {
|
878 |
-
source = sources[i];
|
879 |
-
if (!isObject(source)) {
|
880 |
-
continue;
|
881 |
-
}
|
882 |
-
const keys = Object.keys(source);
|
883 |
-
for (let k = 0, klen = keys.length; k < klen; ++k) {
|
884 |
-
merger(keys[k], target, source, options);
|
885 |
-
}
|
886 |
-
}
|
887 |
-
return target;
|
888 |
-
}
|
889 |
-
function mergeIf(target, source) {
|
890 |
-
return merge(target, source, {merger: _mergerIf});
|
891 |
-
}
|
892 |
-
function _mergerIf(key, target, source) {
|
893 |
-
if (!isValidKey(key)) {
|
894 |
-
return;
|
895 |
-
}
|
896 |
-
const tval = target[key];
|
897 |
-
const sval = source[key];
|
898 |
-
if (isObject(tval) && isObject(sval)) {
|
899 |
-
mergeIf(tval, sval);
|
900 |
-
} else if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
901 |
-
target[key] = clone(sval);
|
902 |
-
}
|
903 |
-
}
|
904 |
-
function _deprecated(scope, value, previous, current) {
|
905 |
-
if (value !== undefined) {
|
906 |
-
console.warn(scope + ': "' + previous +
|
907 |
-
'" is deprecated. Please use "' + current + '" instead');
|
908 |
-
}
|
909 |
-
}
|
910 |
-
const emptyString = '';
|
911 |
-
const dot = '.';
|
912 |
-
function indexOfDotOrLength(key, start) {
|
913 |
-
const idx = key.indexOf(dot, start);
|
914 |
-
return idx === -1 ? key.length : idx;
|
915 |
-
}
|
916 |
-
function resolveObjectKey(obj, key) {
|
917 |
-
if (key === emptyString) {
|
918 |
-
return obj;
|
919 |
-
}
|
920 |
-
let pos = 0;
|
921 |
-
let idx = indexOfDotOrLength(key, pos);
|
922 |
-
while (obj && idx > pos) {
|
923 |
-
obj = obj[key.substr(pos, idx - pos)];
|
924 |
-
pos = idx + 1;
|
925 |
-
idx = indexOfDotOrLength(key, pos);
|
926 |
-
}
|
927 |
-
return obj;
|
928 |
-
}
|
929 |
-
function _capitalize(str) {
|
930 |
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
931 |
-
}
|
932 |
-
const defined = (value) => typeof value !== 'undefined';
|
933 |
-
const isFunction = (value) => typeof value === 'function';
|
934 |
-
const setsEqual = (a, b) => {
|
935 |
-
if (a.size !== b.size) {
|
936 |
-
return false;
|
937 |
-
}
|
938 |
-
for (const item of a) {
|
939 |
-
if (!b.has(item)) {
|
940 |
-
return false;
|
941 |
-
}
|
942 |
-
}
|
943 |
-
return true;
|
944 |
-
};
|
945 |
-
|
946 |
-
const overrides = Object.create(null);
|
947 |
-
const descriptors = Object.create(null);
|
948 |
-
function getScope$1(node, key) {
|
949 |
-
if (!key) {
|
950 |
-
return node;
|
951 |
-
}
|
952 |
-
const keys = key.split('.');
|
953 |
-
for (let i = 0, n = keys.length; i < n; ++i) {
|
954 |
-
const k = keys[i];
|
955 |
-
node = node[k] || (node[k] = Object.create(null));
|
956 |
-
}
|
957 |
-
return node;
|
958 |
-
}
|
959 |
-
function set(root, scope, values) {
|
960 |
-
if (typeof scope === 'string') {
|
961 |
-
return merge(getScope$1(root, scope), values);
|
962 |
-
}
|
963 |
-
return merge(getScope$1(root, ''), scope);
|
964 |
-
}
|
965 |
-
class Defaults {
|
966 |
-
constructor(_descriptors) {
|
967 |
-
this.animation = undefined;
|
968 |
-
this.backgroundColor = 'rgba(0,0,0,0.1)';
|
969 |
-
this.borderColor = 'rgba(0,0,0,0.1)';
|
970 |
-
this.color = '#666';
|
971 |
-
this.datasets = {};
|
972 |
-
this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio();
|
973 |
-
this.elements = {};
|
974 |
-
this.events = [
|
975 |
-
'mousemove',
|
976 |
-
'mouseout',
|
977 |
-
'click',
|
978 |
-
'touchstart',
|
979 |
-
'touchmove'
|
980 |
-
];
|
981 |
-
this.font = {
|
982 |
-
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
|
983 |
-
size: 12,
|
984 |
-
style: 'normal',
|
985 |
-
lineHeight: 1.2,
|
986 |
-
weight: null
|
987 |
-
};
|
988 |
-
this.hover = {};
|
989 |
-
this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);
|
990 |
-
this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);
|
991 |
-
this.hoverColor = (ctx, options) => getHoverColor(options.color);
|
992 |
-
this.indexAxis = 'x';
|
993 |
-
this.interaction = {
|
994 |
-
mode: 'nearest',
|
995 |
-
intersect: true
|
996 |
-
};
|
997 |
-
this.maintainAspectRatio = true;
|
998 |
-
this.onHover = null;
|
999 |
-
this.onClick = null;
|
1000 |
-
this.parsing = true;
|
1001 |
-
this.plugins = {};
|
1002 |
-
this.responsive = true;
|
1003 |
-
this.scale = undefined;
|
1004 |
-
this.scales = {};
|
1005 |
-
this.showLine = true;
|
1006 |
-
this.describe(_descriptors);
|
1007 |
-
}
|
1008 |
-
set(scope, values) {
|
1009 |
-
return set(this, scope, values);
|
1010 |
-
}
|
1011 |
-
get(scope) {
|
1012 |
-
return getScope$1(this, scope);
|
1013 |
-
}
|
1014 |
-
describe(scope, values) {
|
1015 |
-
return set(descriptors, scope, values);
|
1016 |
-
}
|
1017 |
-
override(scope, values) {
|
1018 |
-
return set(overrides, scope, values);
|
1019 |
-
}
|
1020 |
-
route(scope, name, targetScope, targetName) {
|
1021 |
-
const scopeObject = getScope$1(this, scope);
|
1022 |
-
const targetScopeObject = getScope$1(this, targetScope);
|
1023 |
-
const privateName = '_' + name;
|
1024 |
-
Object.defineProperties(scopeObject, {
|
1025 |
-
[privateName]: {
|
1026 |
-
value: scopeObject[name],
|
1027 |
-
writable: true
|
1028 |
-
},
|
1029 |
-
[name]: {
|
1030 |
-
enumerable: true,
|
1031 |
-
get() {
|
1032 |
-
const local = this[privateName];
|
1033 |
-
const target = targetScopeObject[targetName];
|
1034 |
-
if (isObject(local)) {
|
1035 |
-
return Object.assign({}, target, local);
|
1036 |
-
}
|
1037 |
-
return valueOrDefault(local, target);
|
1038 |
-
},
|
1039 |
-
set(value) {
|
1040 |
-
this[privateName] = value;
|
1041 |
-
}
|
1042 |
-
}
|
1043 |
-
});
|
1044 |
-
}
|
1045 |
-
}
|
1046 |
-
var defaults = new Defaults({
|
1047 |
-
_scriptable: (name) => !name.startsWith('on'),
|
1048 |
-
_indexable: (name) => name !== 'events',
|
1049 |
-
hover: {
|
1050 |
-
_fallback: 'interaction'
|
1051 |
-
},
|
1052 |
-
interaction: {
|
1053 |
-
_scriptable: false,
|
1054 |
-
_indexable: false,
|
1055 |
-
}
|
1056 |
-
});
|
1057 |
-
|
1058 |
-
const PI = Math.PI;
|
1059 |
-
const TAU = 2 * PI;
|
1060 |
-
const PITAU = TAU + PI;
|
1061 |
-
const INFINITY = Number.POSITIVE_INFINITY;
|
1062 |
-
const RAD_PER_DEG = PI / 180;
|
1063 |
-
const HALF_PI = PI / 2;
|
1064 |
-
const QUARTER_PI = PI / 4;
|
1065 |
-
const TWO_THIRDS_PI = PI * 2 / 3;
|
1066 |
-
const log10 = Math.log10;
|
1067 |
-
const sign = Math.sign;
|
1068 |
-
function niceNum(range) {
|
1069 |
-
const roundedRange = Math.round(range);
|
1070 |
-
range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;
|
1071 |
-
const niceRange = Math.pow(10, Math.floor(log10(range)));
|
1072 |
-
const fraction = range / niceRange;
|
1073 |
-
const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;
|
1074 |
-
return niceFraction * niceRange;
|
1075 |
-
}
|
1076 |
-
function _factorize(value) {
|
1077 |
-
const result = [];
|
1078 |
-
const sqrt = Math.sqrt(value);
|
1079 |
-
let i;
|
1080 |
-
for (i = 1; i < sqrt; i++) {
|
1081 |
-
if (value % i === 0) {
|
1082 |
-
result.push(i);
|
1083 |
-
result.push(value / i);
|
1084 |
-
}
|
1085 |
-
}
|
1086 |
-
if (sqrt === (sqrt | 0)) {
|
1087 |
-
result.push(sqrt);
|
1088 |
-
}
|
1089 |
-
result.sort((a, b) => a - b).pop();
|
1090 |
-
return result;
|
1091 |
-
}
|
1092 |
-
function isNumber(n) {
|
1093 |
-
return !isNaN(parseFloat(n)) && isFinite(n);
|
1094 |
-
}
|
1095 |
-
function almostEquals(x, y, epsilon) {
|
1096 |
-
return Math.abs(x - y) < epsilon;
|
1097 |
-
}
|
1098 |
-
function almostWhole(x, epsilon) {
|
1099 |
-
const rounded = Math.round(x);
|
1100 |
-
return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);
|
1101 |
-
}
|
1102 |
-
function _setMinAndMaxByKey(array, target, property) {
|
1103 |
-
let i, ilen, value;
|
1104 |
-
for (i = 0, ilen = array.length; i < ilen; i++) {
|
1105 |
-
value = array[i][property];
|
1106 |
-
if (!isNaN(value)) {
|
1107 |
-
target.min = Math.min(target.min, value);
|
1108 |
-
target.max = Math.max(target.max, value);
|
1109 |
-
}
|
1110 |
-
}
|
1111 |
-
}
|
1112 |
-
function toRadians(degrees) {
|
1113 |
-
return degrees * (PI / 180);
|
1114 |
-
}
|
1115 |
-
function toDegrees(radians) {
|
1116 |
-
return radians * (180 / PI);
|
1117 |
-
}
|
1118 |
-
function _decimalPlaces(x) {
|
1119 |
-
if (!isNumberFinite(x)) {
|
1120 |
-
return;
|
1121 |
-
}
|
1122 |
-
let e = 1;
|
1123 |
-
let p = 0;
|
1124 |
-
while (Math.round(x * e) / e !== x) {
|
1125 |
-
e *= 10;
|
1126 |
-
p++;
|
1127 |
-
}
|
1128 |
-
return p;
|
1129 |
-
}
|
1130 |
-
function getAngleFromPoint(centrePoint, anglePoint) {
|
1131 |
-
const distanceFromXCenter = anglePoint.x - centrePoint.x;
|
1132 |
-
const distanceFromYCenter = anglePoint.y - centrePoint.y;
|
1133 |
-
const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
|
1134 |
-
let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);
|
1135 |
-
if (angle < (-0.5 * PI)) {
|
1136 |
-
angle += TAU;
|
1137 |
-
}
|
1138 |
-
return {
|
1139 |
-
angle,
|
1140 |
-
distance: radialDistanceFromCenter
|
1141 |
-
};
|
1142 |
-
}
|
1143 |
-
function distanceBetweenPoints(pt1, pt2) {
|
1144 |
-
return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
|
1145 |
-
}
|
1146 |
-
function _angleDiff(a, b) {
|
1147 |
-
return (a - b + PITAU) % TAU - PI;
|
1148 |
-
}
|
1149 |
-
function _normalizeAngle(a) {
|
1150 |
-
return (a % TAU + TAU) % TAU;
|
1151 |
-
}
|
1152 |
-
function _angleBetween(angle, start, end, sameAngleIsFullCircle) {
|
1153 |
-
const a = _normalizeAngle(angle);
|
1154 |
-
const s = _normalizeAngle(start);
|
1155 |
-
const e = _normalizeAngle(end);
|
1156 |
-
const angleToStart = _normalizeAngle(s - a);
|
1157 |
-
const angleToEnd = _normalizeAngle(e - a);
|
1158 |
-
const startToAngle = _normalizeAngle(a - s);
|
1159 |
-
const endToAngle = _normalizeAngle(a - e);
|
1160 |
-
return a === s || a === e || (sameAngleIsFullCircle && s === e)
|
1161 |
-
|| (angleToStart > angleToEnd && startToAngle < endToAngle);
|
1162 |
-
}
|
1163 |
-
function _limitValue(value, min, max) {
|
1164 |
-
return Math.max(min, Math.min(max, value));
|
1165 |
-
}
|
1166 |
-
function _int16Range(value) {
|
1167 |
-
return _limitValue(value, -32768, 32767);
|
1168 |
-
}
|
1169 |
-
function _isBetween(value, start, end, epsilon = 1e-6) {
|
1170 |
-
return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
function toFontString(font) {
|
1174 |
-
if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {
|
1175 |
-
return null;
|
1176 |
-
}
|
1177 |
-
return (font.style ? font.style + ' ' : '')
|
1178 |
-
+ (font.weight ? font.weight + ' ' : '')
|
1179 |
-
+ font.size + 'px '
|
1180 |
-
+ font.family;
|
1181 |
-
}
|
1182 |
-
function _measureText(ctx, data, gc, longest, string) {
|
1183 |
-
let textWidth = data[string];
|
1184 |
-
if (!textWidth) {
|
1185 |
-
textWidth = data[string] = ctx.measureText(string).width;
|
1186 |
-
gc.push(string);
|
1187 |
-
}
|
1188 |
-
if (textWidth > longest) {
|
1189 |
-
longest = textWidth;
|
1190 |
-
}
|
1191 |
-
return longest;
|
1192 |
-
}
|
1193 |
-
function _longestText(ctx, font, arrayOfThings, cache) {
|
1194 |
-
cache = cache || {};
|
1195 |
-
let data = cache.data = cache.data || {};
|
1196 |
-
let gc = cache.garbageCollect = cache.garbageCollect || [];
|
1197 |
-
if (cache.font !== font) {
|
1198 |
-
data = cache.data = {};
|
1199 |
-
gc = cache.garbageCollect = [];
|
1200 |
-
cache.font = font;
|
1201 |
-
}
|
1202 |
-
ctx.save();
|
1203 |
-
ctx.font = font;
|
1204 |
-
let longest = 0;
|
1205 |
-
const ilen = arrayOfThings.length;
|
1206 |
-
let i, j, jlen, thing, nestedThing;
|
1207 |
-
for (i = 0; i < ilen; i++) {
|
1208 |
-
thing = arrayOfThings[i];
|
1209 |
-
if (thing !== undefined && thing !== null && isArray(thing) !== true) {
|
1210 |
-
longest = _measureText(ctx, data, gc, longest, thing);
|
1211 |
-
} else if (isArray(thing)) {
|
1212 |
-
for (j = 0, jlen = thing.length; j < jlen; j++) {
|
1213 |
-
nestedThing = thing[j];
|
1214 |
-
if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {
|
1215 |
-
longest = _measureText(ctx, data, gc, longest, nestedThing);
|
1216 |
-
}
|
1217 |
-
}
|
1218 |
-
}
|
1219 |
-
}
|
1220 |
-
ctx.restore();
|
1221 |
-
const gcLen = gc.length / 2;
|
1222 |
-
if (gcLen > arrayOfThings.length) {
|
1223 |
-
for (i = 0; i < gcLen; i++) {
|
1224 |
-
delete data[gc[i]];
|
1225 |
-
}
|
1226 |
-
gc.splice(0, gcLen);
|
1227 |
-
}
|
1228 |
-
return longest;
|
1229 |
-
}
|
1230 |
-
function _alignPixel(chart, pixel, width) {
|
1231 |
-
const devicePixelRatio = chart.currentDevicePixelRatio;
|
1232 |
-
const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;
|
1233 |
-
return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;
|
1234 |
-
}
|
1235 |
-
function clearCanvas(canvas, ctx) {
|
1236 |
-
ctx = ctx || canvas.getContext('2d');
|
1237 |
-
ctx.save();
|
1238 |
-
ctx.resetTransform();
|
1239 |
-
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
1240 |
-
ctx.restore();
|
1241 |
-
}
|
1242 |
-
function drawPoint(ctx, options, x, y) {
|
1243 |
-
let type, xOffset, yOffset, size, cornerRadius;
|
1244 |
-
const style = options.pointStyle;
|
1245 |
-
const rotation = options.rotation;
|
1246 |
-
const radius = options.radius;
|
1247 |
-
let rad = (rotation || 0) * RAD_PER_DEG;
|
1248 |
-
if (style && typeof style === 'object') {
|
1249 |
-
type = style.toString();
|
1250 |
-
if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {
|
1251 |
-
ctx.save();
|
1252 |
-
ctx.translate(x, y);
|
1253 |
-
ctx.rotate(rad);
|
1254 |
-
ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);
|
1255 |
-
ctx.restore();
|
1256 |
-
return;
|
1257 |
-
}
|
1258 |
-
}
|
1259 |
-
if (isNaN(radius) || radius <= 0) {
|
1260 |
-
return;
|
1261 |
-
}
|
1262 |
-
ctx.beginPath();
|
1263 |
-
switch (style) {
|
1264 |
-
default:
|
1265 |
-
ctx.arc(x, y, radius, 0, TAU);
|
1266 |
-
ctx.closePath();
|
1267 |
-
break;
|
1268 |
-
case 'triangle':
|
1269 |
-
ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1270 |
-
rad += TWO_THIRDS_PI;
|
1271 |
-
ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1272 |
-
rad += TWO_THIRDS_PI;
|
1273 |
-
ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1274 |
-
ctx.closePath();
|
1275 |
-
break;
|
1276 |
-
case 'rectRounded':
|
1277 |
-
cornerRadius = radius * 0.516;
|
1278 |
-
size = radius - cornerRadius;
|
1279 |
-
xOffset = Math.cos(rad + QUARTER_PI) * size;
|
1280 |
-
yOffset = Math.sin(rad + QUARTER_PI) * size;
|
1281 |
-
ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);
|
1282 |
-
ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);
|
1283 |
-
ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);
|
1284 |
-
ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);
|
1285 |
-
ctx.closePath();
|
1286 |
-
break;
|
1287 |
-
case 'rect':
|
1288 |
-
if (!rotation) {
|
1289 |
-
size = Math.SQRT1_2 * radius;
|
1290 |
-
ctx.rect(x - size, y - size, 2 * size, 2 * size);
|
1291 |
-
break;
|
1292 |
-
}
|
1293 |
-
rad += QUARTER_PI;
|
1294 |
-
case 'rectRot':
|
1295 |
-
xOffset = Math.cos(rad) * radius;
|
1296 |
-
yOffset = Math.sin(rad) * radius;
|
1297 |
-
ctx.moveTo(x - xOffset, y - yOffset);
|
1298 |
-
ctx.lineTo(x + yOffset, y - xOffset);
|
1299 |
-
ctx.lineTo(x + xOffset, y + yOffset);
|
1300 |
-
ctx.lineTo(x - yOffset, y + xOffset);
|
1301 |
-
ctx.closePath();
|
1302 |
-
break;
|
1303 |
-
case 'crossRot':
|
1304 |
-
rad += QUARTER_PI;
|
1305 |
-
case 'cross':
|
1306 |
-
xOffset = Math.cos(rad) * radius;
|
1307 |
-
yOffset = Math.sin(rad) * radius;
|
1308 |
-
ctx.moveTo(x - xOffset, y - yOffset);
|
1309 |
-
ctx.lineTo(x + xOffset, y + yOffset);
|
1310 |
-
ctx.moveTo(x + yOffset, y - xOffset);
|
1311 |
-
ctx.lineTo(x - yOffset, y + xOffset);
|
1312 |
-
break;
|
1313 |
-
case 'star':
|
1314 |
-
xOffset = Math.cos(rad) * radius;
|
1315 |
-
yOffset = Math.sin(rad) * radius;
|
1316 |
-
ctx.moveTo(x - xOffset, y - yOffset);
|
1317 |
-
ctx.lineTo(x + xOffset, y + yOffset);
|
1318 |
-
ctx.moveTo(x + yOffset, y - xOffset);
|
1319 |
-
ctx.lineTo(x - yOffset, y + xOffset);
|
1320 |
-
rad += QUARTER_PI;
|
1321 |
-
xOffset = Math.cos(rad) * radius;
|
1322 |
-
yOffset = Math.sin(rad) * radius;
|
1323 |
-
ctx.moveTo(x - xOffset, y - yOffset);
|
1324 |
-
ctx.lineTo(x + xOffset, y + yOffset);
|
1325 |
-
ctx.moveTo(x + yOffset, y - xOffset);
|
1326 |
-
ctx.lineTo(x - yOffset, y + xOffset);
|
1327 |
-
break;
|
1328 |
-
case 'line':
|
1329 |
-
xOffset = Math.cos(rad) * radius;
|
1330 |
-
yOffset = Math.sin(rad) * radius;
|
1331 |
-
ctx.moveTo(x - xOffset, y - yOffset);
|
1332 |
-
ctx.lineTo(x + xOffset, y + yOffset);
|
1333 |
-
break;
|
1334 |
-
case 'dash':
|
1335 |
-
ctx.moveTo(x, y);
|
1336 |
-
ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);
|
1337 |
-
break;
|
1338 |
-
}
|
1339 |
-
ctx.fill();
|
1340 |
-
if (options.borderWidth > 0) {
|
1341 |
-
ctx.stroke();
|
1342 |
-
}
|
1343 |
-
}
|
1344 |
-
function _isPointInArea(point, area, margin) {
|
1345 |
-
margin = margin || 0.5;
|
1346 |
-
return !area || (point && point.x > area.left - margin && point.x < area.right + margin &&
|
1347 |
-
point.y > area.top - margin && point.y < area.bottom + margin);
|
1348 |
-
}
|
1349 |
-
function clipArea(ctx, area) {
|
1350 |
-
ctx.save();
|
1351 |
-
ctx.beginPath();
|
1352 |
-
ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
|
1353 |
-
ctx.clip();
|
1354 |
-
}
|
1355 |
-
function unclipArea(ctx) {
|
1356 |
-
ctx.restore();
|
1357 |
-
}
|
1358 |
-
function _steppedLineTo(ctx, previous, target, flip, mode) {
|
1359 |
-
if (!previous) {
|
1360 |
-
return ctx.lineTo(target.x, target.y);
|
1361 |
-
}
|
1362 |
-
if (mode === 'middle') {
|
1363 |
-
const midpoint = (previous.x + target.x) / 2.0;
|
1364 |
-
ctx.lineTo(midpoint, previous.y);
|
1365 |
-
ctx.lineTo(midpoint, target.y);
|
1366 |
-
} else if (mode === 'after' !== !!flip) {
|
1367 |
-
ctx.lineTo(previous.x, target.y);
|
1368 |
-
} else {
|
1369 |
-
ctx.lineTo(target.x, previous.y);
|
1370 |
-
}
|
1371 |
-
ctx.lineTo(target.x, target.y);
|
1372 |
-
}
|
1373 |
-
function _bezierCurveTo(ctx, previous, target, flip) {
|
1374 |
-
if (!previous) {
|
1375 |
-
return ctx.lineTo(target.x, target.y);
|
1376 |
-
}
|
1377 |
-
ctx.bezierCurveTo(
|
1378 |
-
flip ? previous.cp1x : previous.cp2x,
|
1379 |
-
flip ? previous.cp1y : previous.cp2y,
|
1380 |
-
flip ? target.cp2x : target.cp1x,
|
1381 |
-
flip ? target.cp2y : target.cp1y,
|
1382 |
-
target.x,
|
1383 |
-
target.y);
|
1384 |
-
}
|
1385 |
-
function renderText(ctx, text, x, y, font, opts = {}) {
|
1386 |
-
const lines = isArray(text) ? text : [text];
|
1387 |
-
const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';
|
1388 |
-
let i, line;
|
1389 |
-
ctx.save();
|
1390 |
-
ctx.font = font.string;
|
1391 |
-
setRenderOpts(ctx, opts);
|
1392 |
-
for (i = 0; i < lines.length; ++i) {
|
1393 |
-
line = lines[i];
|
1394 |
-
if (stroke) {
|
1395 |
-
if (opts.strokeColor) {
|
1396 |
-
ctx.strokeStyle = opts.strokeColor;
|
1397 |
-
}
|
1398 |
-
if (!isNullOrUndef(opts.strokeWidth)) {
|
1399 |
-
ctx.lineWidth = opts.strokeWidth;
|
1400 |
-
}
|
1401 |
-
ctx.strokeText(line, x, y, opts.maxWidth);
|
1402 |
-
}
|
1403 |
-
ctx.fillText(line, x, y, opts.maxWidth);
|
1404 |
-
decorateText(ctx, x, y, line, opts);
|
1405 |
-
y += font.lineHeight;
|
1406 |
-
}
|
1407 |
-
ctx.restore();
|
1408 |
-
}
|
1409 |
-
function setRenderOpts(ctx, opts) {
|
1410 |
-
if (opts.translation) {
|
1411 |
-
ctx.translate(opts.translation[0], opts.translation[1]);
|
1412 |
-
}
|
1413 |
-
if (!isNullOrUndef(opts.rotation)) {
|
1414 |
-
ctx.rotate(opts.rotation);
|
1415 |
-
}
|
1416 |
-
if (opts.color) {
|
1417 |
-
ctx.fillStyle = opts.color;
|
1418 |
-
}
|
1419 |
-
if (opts.textAlign) {
|
1420 |
-
ctx.textAlign = opts.textAlign;
|
1421 |
-
}
|
1422 |
-
if (opts.textBaseline) {
|
1423 |
-
ctx.textBaseline = opts.textBaseline;
|
1424 |
-
}
|
1425 |
-
}
|
1426 |
-
function decorateText(ctx, x, y, line, opts) {
|
1427 |
-
if (opts.strikethrough || opts.underline) {
|
1428 |
-
const metrics = ctx.measureText(line);
|
1429 |
-
const left = x - metrics.actualBoundingBoxLeft;
|
1430 |
-
const right = x + metrics.actualBoundingBoxRight;
|
1431 |
-
const top = y - metrics.actualBoundingBoxAscent;
|
1432 |
-
const bottom = y + metrics.actualBoundingBoxDescent;
|
1433 |
-
const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;
|
1434 |
-
ctx.strokeStyle = ctx.fillStyle;
|
1435 |
-
ctx.beginPath();
|
1436 |
-
ctx.lineWidth = opts.decorationWidth || 2;
|
1437 |
-
ctx.moveTo(left, yDecoration);
|
1438 |
-
ctx.lineTo(right, yDecoration);
|
1439 |
-
ctx.stroke();
|
1440 |
-
}
|
1441 |
-
}
|
1442 |
-
function addRoundedRectPath(ctx, rect) {
|
1443 |
-
const {x, y, w, h, radius} = rect;
|
1444 |
-
ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);
|
1445 |
-
ctx.lineTo(x, y + h - radius.bottomLeft);
|
1446 |
-
ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);
|
1447 |
-
ctx.lineTo(x + w - radius.bottomRight, y + h);
|
1448 |
-
ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);
|
1449 |
-
ctx.lineTo(x + w, y + radius.topRight);
|
1450 |
-
ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);
|
1451 |
-
ctx.lineTo(x + radius.topLeft, y);
|
1452 |
-
}
|
1453 |
-
|
1454 |
-
function _lookup(table, value, cmp) {
|
1455 |
-
cmp = cmp || ((index) => table[index] < value);
|
1456 |
-
let hi = table.length - 1;
|
1457 |
-
let lo = 0;
|
1458 |
-
let mid;
|
1459 |
-
while (hi - lo > 1) {
|
1460 |
-
mid = (lo + hi) >> 1;
|
1461 |
-
if (cmp(mid)) {
|
1462 |
-
lo = mid;
|
1463 |
-
} else {
|
1464 |
-
hi = mid;
|
1465 |
-
}
|
1466 |
-
}
|
1467 |
-
return {lo, hi};
|
1468 |
-
}
|
1469 |
-
const _lookupByKey = (table, key, value) =>
|
1470 |
-
_lookup(table, value, index => table[index][key] < value);
|
1471 |
-
const _rlookupByKey = (table, key, value) =>
|
1472 |
-
_lookup(table, value, index => table[index][key] >= value);
|
1473 |
-
function _filterBetween(values, min, max) {
|
1474 |
-
let start = 0;
|
1475 |
-
let end = values.length;
|
1476 |
-
while (start < end && values[start] < min) {
|
1477 |
-
start++;
|
1478 |
-
}
|
1479 |
-
while (end > start && values[end - 1] > max) {
|
1480 |
-
end--;
|
1481 |
-
}
|
1482 |
-
return start > 0 || end < values.length
|
1483 |
-
? values.slice(start, end)
|
1484 |
-
: values;
|
1485 |
-
}
|
1486 |
-
const arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
|
1487 |
-
function listenArrayEvents(array, listener) {
|
1488 |
-
if (array._chartjs) {
|
1489 |
-
array._chartjs.listeners.push(listener);
|
1490 |
-
return;
|
1491 |
-
}
|
1492 |
-
Object.defineProperty(array, '_chartjs', {
|
1493 |
-
configurable: true,
|
1494 |
-
enumerable: false,
|
1495 |
-
value: {
|
1496 |
-
listeners: [listener]
|
1497 |
-
}
|
1498 |
-
});
|
1499 |
-
arrayEvents.forEach((key) => {
|
1500 |
-
const method = '_onData' + _capitalize(key);
|
1501 |
-
const base = array[key];
|
1502 |
-
Object.defineProperty(array, key, {
|
1503 |
-
configurable: true,
|
1504 |
-
enumerable: false,
|
1505 |
-
value(...args) {
|
1506 |
-
const res = base.apply(this, args);
|
1507 |
-
array._chartjs.listeners.forEach((object) => {
|
1508 |
-
if (typeof object[method] === 'function') {
|
1509 |
-
object[method](...args);
|
1510 |
-
}
|
1511 |
-
});
|
1512 |
-
return res;
|
1513 |
-
}
|
1514 |
-
});
|
1515 |
-
});
|
1516 |
-
}
|
1517 |
-
function unlistenArrayEvents(array, listener) {
|
1518 |
-
const stub = array._chartjs;
|
1519 |
-
if (!stub) {
|
1520 |
-
return;
|
1521 |
-
}
|
1522 |
-
const listeners = stub.listeners;
|
1523 |
-
const index = listeners.indexOf(listener);
|
1524 |
-
if (index !== -1) {
|
1525 |
-
listeners.splice(index, 1);
|
1526 |
-
}
|
1527 |
-
if (listeners.length > 0) {
|
1528 |
-
return;
|
1529 |
-
}
|
1530 |
-
arrayEvents.forEach((key) => {
|
1531 |
-
delete array[key];
|
1532 |
-
});
|
1533 |
-
delete array._chartjs;
|
1534 |
-
}
|
1535 |
-
function _arrayUnique(items) {
|
1536 |
-
const set = new Set();
|
1537 |
-
let i, ilen;
|
1538 |
-
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
1539 |
-
set.add(items[i]);
|
1540 |
-
}
|
1541 |
-
if (set.size === ilen) {
|
1542 |
-
return items;
|
1543 |
-
}
|
1544 |
-
return Array.from(set);
|
1545 |
-
}
|
1546 |
-
|
1547 |
-
function _isDomSupported() {
|
1548 |
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
1549 |
-
}
|
1550 |
-
function _getParentNode(domNode) {
|
1551 |
-
let parent = domNode.parentNode;
|
1552 |
-
if (parent && parent.toString() === '[object ShadowRoot]') {
|
1553 |
-
parent = parent.host;
|
1554 |
-
}
|
1555 |
-
return parent;
|
1556 |
-
}
|
1557 |
-
function parseMaxStyle(styleValue, node, parentProperty) {
|
1558 |
-
let valueInPixels;
|
1559 |
-
if (typeof styleValue === 'string') {
|
1560 |
-
valueInPixels = parseInt(styleValue, 10);
|
1561 |
-
if (styleValue.indexOf('%') !== -1) {
|
1562 |
-
valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];
|
1563 |
-
}
|
1564 |
-
} else {
|
1565 |
-
valueInPixels = styleValue;
|
1566 |
-
}
|
1567 |
-
return valueInPixels;
|
1568 |
-
}
|
1569 |
-
const getComputedStyle = (element) => window.getComputedStyle(element, null);
|
1570 |
-
function getStyle(el, property) {
|
1571 |
-
return getComputedStyle(el).getPropertyValue(property);
|
1572 |
-
}
|
1573 |
-
const positions = ['top', 'right', 'bottom', 'left'];
|
1574 |
-
function getPositionedStyle(styles, style, suffix) {
|
1575 |
-
const result = {};
|
1576 |
-
suffix = suffix ? '-' + suffix : '';
|
1577 |
-
for (let i = 0; i < 4; i++) {
|
1578 |
-
const pos = positions[i];
|
1579 |
-
result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;
|
1580 |
-
}
|
1581 |
-
result.width = result.left + result.right;
|
1582 |
-
result.height = result.top + result.bottom;
|
1583 |
-
return result;
|
1584 |
-
}
|
1585 |
-
const useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);
|
1586 |
-
function getCanvasPosition(evt, canvas) {
|
1587 |
-
const e = evt.native || evt;
|
1588 |
-
const touches = e.touches;
|
1589 |
-
const source = touches && touches.length ? touches[0] : e;
|
1590 |
-
const {offsetX, offsetY} = source;
|
1591 |
-
let box = false;
|
1592 |
-
let x, y;
|
1593 |
-
if (useOffsetPos(offsetX, offsetY, e.target)) {
|
1594 |
-
x = offsetX;
|
1595 |
-
y = offsetY;
|
1596 |
-
} else {
|
1597 |
-
const rect = canvas.getBoundingClientRect();
|
1598 |
-
x = source.clientX - rect.left;
|
1599 |
-
y = source.clientY - rect.top;
|
1600 |
-
box = true;
|
1601 |
-
}
|
1602 |
-
return {x, y, box};
|
1603 |
-
}
|
1604 |
-
function getRelativePosition$1(evt, chart) {
|
1605 |
-
const {canvas, currentDevicePixelRatio} = chart;
|
1606 |
-
const style = getComputedStyle(canvas);
|
1607 |
-
const borderBox = style.boxSizing === 'border-box';
|
1608 |
-
const paddings = getPositionedStyle(style, 'padding');
|
1609 |
-
const borders = getPositionedStyle(style, 'border', 'width');
|
1610 |
-
const {x, y, box} = getCanvasPosition(evt, canvas);
|
1611 |
-
const xOffset = paddings.left + (box && borders.left);
|
1612 |
-
const yOffset = paddings.top + (box && borders.top);
|
1613 |
-
let {width, height} = chart;
|
1614 |
-
if (borderBox) {
|
1615 |
-
width -= paddings.width + borders.width;
|
1616 |
-
height -= paddings.height + borders.height;
|
1617 |
-
}
|
1618 |
-
return {
|
1619 |
-
x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),
|
1620 |
-
y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)
|
1621 |
-
};
|
1622 |
-
}
|
1623 |
-
function getContainerSize(canvas, width, height) {
|
1624 |
-
let maxWidth, maxHeight;
|
1625 |
-
if (width === undefined || height === undefined) {
|
1626 |
-
const container = _getParentNode(canvas);
|
1627 |
-
if (!container) {
|
1628 |
-
width = canvas.clientWidth;
|
1629 |
-
height = canvas.clientHeight;
|
1630 |
-
} else {
|
1631 |
-
const rect = container.getBoundingClientRect();
|
1632 |
-
const containerStyle = getComputedStyle(container);
|
1633 |
-
const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');
|
1634 |
-
const containerPadding = getPositionedStyle(containerStyle, 'padding');
|
1635 |
-
width = rect.width - containerPadding.width - containerBorder.width;
|
1636 |
-
height = rect.height - containerPadding.height - containerBorder.height;
|
1637 |
-
maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');
|
1638 |
-
maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');
|
1639 |
-
}
|
1640 |
-
}
|
1641 |
-
return {
|
1642 |
-
width,
|
1643 |
-
height,
|
1644 |
-
maxWidth: maxWidth || INFINITY,
|
1645 |
-
maxHeight: maxHeight || INFINITY
|
1646 |
-
};
|
1647 |
-
}
|
1648 |
-
const round1 = v => Math.round(v * 10) / 10;
|
1649 |
-
function getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {
|
1650 |
-
const style = getComputedStyle(canvas);
|
1651 |
-
const margins = getPositionedStyle(style, 'margin');
|
1652 |
-
const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;
|
1653 |
-
const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;
|
1654 |
-
const containerSize = getContainerSize(canvas, bbWidth, bbHeight);
|
1655 |
-
let {width, height} = containerSize;
|
1656 |
-
if (style.boxSizing === 'content-box') {
|
1657 |
-
const borders = getPositionedStyle(style, 'border', 'width');
|
1658 |
-
const paddings = getPositionedStyle(style, 'padding');
|
1659 |
-
width -= paddings.width + borders.width;
|
1660 |
-
height -= paddings.height + borders.height;
|
1661 |
-
}
|
1662 |
-
width = Math.max(0, width - margins.width);
|
1663 |
-
height = Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height - margins.height);
|
1664 |
-
width = round1(Math.min(width, maxWidth, containerSize.maxWidth));
|
1665 |
-
height = round1(Math.min(height, maxHeight, containerSize.maxHeight));
|
1666 |
-
if (width && !height) {
|
1667 |
-
height = round1(width / 2);
|
1668 |
-
}
|
1669 |
-
return {
|
1670 |
-
width,
|
1671 |
-
height
|
1672 |
-
};
|
1673 |
-
}
|
1674 |
-
function retinaScale(chart, forceRatio, forceStyle) {
|
1675 |
-
const pixelRatio = forceRatio || 1;
|
1676 |
-
const deviceHeight = Math.floor(chart.height * pixelRatio);
|
1677 |
-
const deviceWidth = Math.floor(chart.width * pixelRatio);
|
1678 |
-
chart.height = deviceHeight / pixelRatio;
|
1679 |
-
chart.width = deviceWidth / pixelRatio;
|
1680 |
-
const canvas = chart.canvas;
|
1681 |
-
if (canvas.style && (forceStyle || (!canvas.style.height && !canvas.style.width))) {
|
1682 |
-
canvas.style.height = `${chart.height}px`;
|
1683 |
-
canvas.style.width = `${chart.width}px`;
|
1684 |
-
}
|
1685 |
-
if (chart.currentDevicePixelRatio !== pixelRatio
|
1686 |
-
|| canvas.height !== deviceHeight
|
1687 |
-
|| canvas.width !== deviceWidth) {
|
1688 |
-
chart.currentDevicePixelRatio = pixelRatio;
|
1689 |
-
canvas.height = deviceHeight;
|
1690 |
-
canvas.width = deviceWidth;
|
1691 |
-
chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
|
1692 |
-
return true;
|
1693 |
-
}
|
1694 |
-
return false;
|
1695 |
-
}
|
1696 |
-
const supportsEventListenerOptions = (function() {
|
1697 |
-
let passiveSupported = false;
|
1698 |
-
try {
|
1699 |
-
const options = {
|
1700 |
-
get passive() {
|
1701 |
-
passiveSupported = true;
|
1702 |
-
return false;
|
1703 |
-
}
|
1704 |
-
};
|
1705 |
-
window.addEventListener('test', null, options);
|
1706 |
-
window.removeEventListener('test', null, options);
|
1707 |
-
} catch (e) {
|
1708 |
-
}
|
1709 |
-
return passiveSupported;
|
1710 |
-
}());
|
1711 |
-
function readUsedSize(element, property) {
|
1712 |
-
const value = getStyle(element, property);
|
1713 |
-
const matches = value && value.match(/^(\d+)(\.\d+)?px$/);
|
1714 |
-
return matches ? +matches[1] : undefined;
|
1715 |
-
}
|
1716 |
-
|
1717 |
-
function getRelativePosition(e, chart) {
|
1718 |
-
if ('native' in e) {
|
1719 |
-
return {
|
1720 |
-
x: e.x,
|
1721 |
-
y: e.y
|
1722 |
-
};
|
1723 |
-
}
|
1724 |
-
return getRelativePosition$1(e, chart);
|
1725 |
-
}
|
1726 |
-
function evaluateAllVisibleItems(chart, handler) {
|
1727 |
-
const metasets = chart.getSortedVisibleDatasetMetas();
|
1728 |
-
let index, data, element;
|
1729 |
-
for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
|
1730 |
-
({index, data} = metasets[i]);
|
1731 |
-
for (let j = 0, jlen = data.length; j < jlen; ++j) {
|
1732 |
-
element = data[j];
|
1733 |
-
if (!element.skip) {
|
1734 |
-
handler(element, index, j);
|
1735 |
-
}
|
1736 |
-
}
|
1737 |
-
}
|
1738 |
-
}
|
1739 |
-
function binarySearch(metaset, axis, value, intersect) {
|
1740 |
-
const {controller, data, _sorted} = metaset;
|
1741 |
-
const iScale = controller._cachedMeta.iScale;
|
1742 |
-
if (iScale && axis === iScale.axis && _sorted && data.length) {
|
1743 |
-
const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;
|
1744 |
-
if (!intersect) {
|
1745 |
-
return lookupMethod(data, axis, value);
|
1746 |
-
} else if (controller._sharedOptions) {
|
1747 |
-
const el = data[0];
|
1748 |
-
const range = typeof el.getRange === 'function' && el.getRange(axis);
|
1749 |
-
if (range) {
|
1750 |
-
const start = lookupMethod(data, axis, value - range);
|
1751 |
-
const end = lookupMethod(data, axis, value + range);
|
1752 |
-
return {lo: start.lo, hi: end.hi};
|
1753 |
-
}
|
1754 |
-
}
|
1755 |
-
}
|
1756 |
-
return {lo: 0, hi: data.length - 1};
|
1757 |
-
}
|
1758 |
-
function optimizedEvaluateItems(chart, axis, position, handler, intersect) {
|
1759 |
-
const metasets = chart.getSortedVisibleDatasetMetas();
|
1760 |
-
const value = position[axis];
|
1761 |
-
for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
|
1762 |
-
const {index, data} = metasets[i];
|
1763 |
-
const {lo, hi} = binarySearch(metasets[i], axis, value, intersect);
|
1764 |
-
for (let j = lo; j <= hi; ++j) {
|
1765 |
-
const element = data[j];
|
1766 |
-
if (!element.skip) {
|
1767 |
-
handler(element, index, j);
|
1768 |
-
}
|
1769 |
-
}
|
1770 |
-
}
|
1771 |
-
}
|
1772 |
-
function getDistanceMetricForAxis(axis) {
|
1773 |
-
const useX = axis.indexOf('x') !== -1;
|
1774 |
-
const useY = axis.indexOf('y') !== -1;
|
1775 |
-
return function(pt1, pt2) {
|
1776 |
-
const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;
|
1777 |
-
const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;
|
1778 |
-
return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
|
1779 |
-
};
|
1780 |
-
}
|
1781 |
-
function getIntersectItems(chart, position, axis, useFinalPosition) {
|
1782 |
-
const items = [];
|
1783 |
-
if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
|
1784 |
-
return items;
|
1785 |
-
}
|
1786 |
-
const evaluationFunc = function(element, datasetIndex, index) {
|
1787 |
-
if (element.inRange(position.x, position.y, useFinalPosition)) {
|
1788 |
-
items.push({element, datasetIndex, index});
|
1789 |
-
}
|
1790 |
-
};
|
1791 |
-
optimizedEvaluateItems(chart, axis, position, evaluationFunc, true);
|
1792 |
-
return items;
|
1793 |
-
}
|
1794 |
-
function getNearestItems(chart, position, axis, intersect, useFinalPosition) {
|
1795 |
-
const distanceMetric = getDistanceMetricForAxis(axis);
|
1796 |
-
let minDistance = Number.POSITIVE_INFINITY;
|
1797 |
-
let items = [];
|
1798 |
-
if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
|
1799 |
-
return items;
|
1800 |
-
}
|
1801 |
-
const evaluationFunc = function(element, datasetIndex, index) {
|
1802 |
-
if (intersect && !element.inRange(position.x, position.y, useFinalPosition)) {
|
1803 |
-
return;
|
1804 |
-
}
|
1805 |
-
const center = element.getCenterPoint(useFinalPosition);
|
1806 |
-
if (!_isPointInArea(center, chart.chartArea, chart._minPadding) && !element.inRange(position.x, position.y, useFinalPosition)) {
|
1807 |
-
return;
|
1808 |
-
}
|
1809 |
-
const distance = distanceMetric(position, center);
|
1810 |
-
if (distance < minDistance) {
|
1811 |
-
items = [{element, datasetIndex, index}];
|
1812 |
-
minDistance = distance;
|
1813 |
-
} else if (distance === minDistance) {
|
1814 |
-
items.push({element, datasetIndex, index});
|
1815 |
-
}
|
1816 |
-
};
|
1817 |
-
optimizedEvaluateItems(chart, axis, position, evaluationFunc);
|
1818 |
-
return items;
|
1819 |
-
}
|
1820 |
-
function getAxisItems(chart, e, options, useFinalPosition) {
|
1821 |
-
const position = getRelativePosition(e, chart);
|
1822 |
-
const items = [];
|
1823 |
-
const axis = options.axis;
|
1824 |
-
const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';
|
1825 |
-
let intersectsItem = false;
|
1826 |
-
evaluateAllVisibleItems(chart, (element, datasetIndex, index) => {
|
1827 |
-
if (element[rangeMethod](position[axis], useFinalPosition)) {
|
1828 |
-
items.push({element, datasetIndex, index});
|
1829 |
-
}
|
1830 |
-
if (element.inRange(position.x, position.y, useFinalPosition)) {
|
1831 |
-
intersectsItem = true;
|
1832 |
-
}
|
1833 |
-
});
|
1834 |
-
if (options.intersect && !intersectsItem) {
|
1835 |
-
return [];
|
1836 |
-
}
|
1837 |
-
return items;
|
1838 |
-
}
|
1839 |
-
var Interaction = {
|
1840 |
-
modes: {
|
1841 |
-
index(chart, e, options, useFinalPosition) {
|
1842 |
-
const position = getRelativePosition(e, chart);
|
1843 |
-
const axis = options.axis || 'x';
|
1844 |
-
const items = options.intersect
|
1845 |
-
? getIntersectItems(chart, position, axis, useFinalPosition)
|
1846 |
-
: getNearestItems(chart, position, axis, false, useFinalPosition);
|
1847 |
-
const elements = [];
|
1848 |
-
if (!items.length) {
|
1849 |
-
return [];
|
1850 |
-
}
|
1851 |
-
chart.getSortedVisibleDatasetMetas().forEach((meta) => {
|
1852 |
-
const index = items[0].index;
|
1853 |
-
const element = meta.data[index];
|
1854 |
-
if (element && !element.skip) {
|
1855 |
-
elements.push({element, datasetIndex: meta.index, index});
|
1856 |
-
}
|
1857 |
-
});
|
1858 |
-
return elements;
|
1859 |
-
},
|
1860 |
-
dataset(chart, e, options, useFinalPosition) {
|
1861 |
-
const position = getRelativePosition(e, chart);
|
1862 |
-
const axis = options.axis || 'xy';
|
1863 |
-
let items = options.intersect
|
1864 |
-
? getIntersectItems(chart, position, axis, useFinalPosition) :
|
1865 |
-
getNearestItems(chart, position, axis, false, useFinalPosition);
|
1866 |
-
if (items.length > 0) {
|
1867 |
-
const datasetIndex = items[0].datasetIndex;
|
1868 |
-
const data = chart.getDatasetMeta(datasetIndex).data;
|
1869 |
-
items = [];
|
1870 |
-
for (let i = 0; i < data.length; ++i) {
|
1871 |
-
items.push({element: data[i], datasetIndex, index: i});
|
1872 |
-
}
|
1873 |
-
}
|
1874 |
-
return items;
|
1875 |
-
},
|
1876 |
-
point(chart, e, options, useFinalPosition) {
|
1877 |
-
const position = getRelativePosition(e, chart);
|
1878 |
-
const axis = options.axis || 'xy';
|
1879 |
-
return getIntersectItems(chart, position, axis, useFinalPosition);
|
1880 |
-
},
|
1881 |
-
nearest(chart, e, options, useFinalPosition) {
|
1882 |
-
const position = getRelativePosition(e, chart);
|
1883 |
-
const axis = options.axis || 'xy';
|
1884 |
-
return getNearestItems(chart, position, axis, options.intersect, useFinalPosition);
|
1885 |
-
},
|
1886 |
-
x(chart, e, options, useFinalPosition) {
|
1887 |
-
return getAxisItems(chart, e, {axis: 'x', intersect: options.intersect}, useFinalPosition);
|
1888 |
-
},
|
1889 |
-
y(chart, e, options, useFinalPosition) {
|
1890 |
-
return getAxisItems(chart, e, {axis: 'y', intersect: options.intersect}, useFinalPosition);
|
1891 |
-
}
|
1892 |
-
}
|
1893 |
-
};
|
1894 |
-
|
1895 |
-
const LINE_HEIGHT = new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);
|
1896 |
-
const FONT_STYLE = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);
|
1897 |
-
function toLineHeight(value, size) {
|
1898 |
-
const matches = ('' + value).match(LINE_HEIGHT);
|
1899 |
-
if (!matches || matches[1] === 'normal') {
|
1900 |
-
return size * 1.2;
|
1901 |
-
}
|
1902 |
-
value = +matches[2];
|
1903 |
-
switch (matches[3]) {
|
1904 |
-
case 'px':
|
1905 |
-
return value;
|
1906 |
-
case '%':
|
1907 |
-
value /= 100;
|
1908 |
-
break;
|
1909 |
-
}
|
1910 |
-
return size * value;
|
1911 |
-
}
|
1912 |
-
const numberOrZero$1 = v => +v || 0;
|
1913 |
-
function _readValueToProps(value, props) {
|
1914 |
-
const ret = {};
|
1915 |
-
const objProps = isObject(props);
|
1916 |
-
const keys = objProps ? Object.keys(props) : props;
|
1917 |
-
const read = isObject(value)
|
1918 |
-
? objProps
|
1919 |
-
? prop => valueOrDefault(value[prop], value[props[prop]])
|
1920 |
-
: prop => value[prop]
|
1921 |
-
: () => value;
|
1922 |
-
for (const prop of keys) {
|
1923 |
-
ret[prop] = numberOrZero$1(read(prop));
|
1924 |
-
}
|
1925 |
-
return ret;
|
1926 |
-
}
|
1927 |
-
function toTRBL(value) {
|
1928 |
-
return _readValueToProps(value, {top: 'y', right: 'x', bottom: 'y', left: 'x'});
|
1929 |
-
}
|
1930 |
-
function toTRBLCorners(value) {
|
1931 |
-
return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);
|
1932 |
-
}
|
1933 |
-
function toPadding(value) {
|
1934 |
-
const obj = toTRBL(value);
|
1935 |
-
obj.width = obj.left + obj.right;
|
1936 |
-
obj.height = obj.top + obj.bottom;
|
1937 |
-
return obj;
|
1938 |
-
}
|
1939 |
-
function toFont(options, fallback) {
|
1940 |
-
options = options || {};
|
1941 |
-
fallback = fallback || defaults.font;
|
1942 |
-
let size = valueOrDefault(options.size, fallback.size);
|
1943 |
-
if (typeof size === 'string') {
|
1944 |
-
size = parseInt(size, 10);
|
1945 |
-
}
|
1946 |
-
let style = valueOrDefault(options.style, fallback.style);
|
1947 |
-
if (style && !('' + style).match(FONT_STYLE)) {
|
1948 |
-
console.warn('Invalid font style specified: "' + style + '"');
|
1949 |
-
style = '';
|
1950 |
-
}
|
1951 |
-
const font = {
|
1952 |
-
family: valueOrDefault(options.family, fallback.family),
|
1953 |
-
lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),
|
1954 |
-
size,
|
1955 |
-
style,
|
1956 |
-
weight: valueOrDefault(options.weight, fallback.weight),
|
1957 |
-
string: ''
|
1958 |
-
};
|
1959 |
-
font.string = toFontString(font);
|
1960 |
-
return font;
|
1961 |
-
}
|
1962 |
-
function resolve(inputs, context, index, info) {
|
1963 |
-
let cacheable = true;
|
1964 |
-
let i, ilen, value;
|
1965 |
-
for (i = 0, ilen = inputs.length; i < ilen; ++i) {
|
1966 |
-
value = inputs[i];
|
1967 |
-
if (value === undefined) {
|
1968 |
-
continue;
|
1969 |
-
}
|
1970 |
-
if (context !== undefined && typeof value === 'function') {
|
1971 |
-
value = value(context);
|
1972 |
-
cacheable = false;
|
1973 |
-
}
|
1974 |
-
if (index !== undefined && isArray(value)) {
|
1975 |
-
value = value[index % value.length];
|
1976 |
-
cacheable = false;
|
1977 |
-
}
|
1978 |
-
if (value !== undefined) {
|
1979 |
-
if (info && !cacheable) {
|
1980 |
-
info.cacheable = false;
|
1981 |
-
}
|
1982 |
-
return value;
|
1983 |
-
}
|
1984 |
-
}
|
1985 |
-
}
|
1986 |
-
function _addGrace(minmax, grace, beginAtZero) {
|
1987 |
-
const {min, max} = minmax;
|
1988 |
-
const change = toDimension(grace, (max - min) / 2);
|
1989 |
-
const keepZero = (value, add) => beginAtZero && value === 0 ? 0 : value + add;
|
1990 |
-
return {
|
1991 |
-
min: keepZero(min, -Math.abs(change)),
|
1992 |
-
max: keepZero(max, change)
|
1993 |
-
};
|
1994 |
-
}
|
1995 |
-
function createContext(parentContext, context) {
|
1996 |
-
return Object.assign(Object.create(parentContext), context);
|
1997 |
-
}
|
1998 |
-
|
1999 |
-
const STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];
|
2000 |
-
function filterByPosition(array, position) {
|
2001 |
-
return array.filter(v => v.pos === position);
|
2002 |
-
}
|
2003 |
-
function filterDynamicPositionByAxis(array, axis) {
|
2004 |
-
return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);
|
2005 |
-
}
|
2006 |
-
function sortByWeight(array, reverse) {
|
2007 |
-
return array.sort((a, b) => {
|
2008 |
-
const v0 = reverse ? b : a;
|
2009 |
-
const v1 = reverse ? a : b;
|
2010 |
-
return v0.weight === v1.weight ?
|
2011 |
-
v0.index - v1.index :
|
2012 |
-
v0.weight - v1.weight;
|
2013 |
-
});
|
2014 |
-
}
|
2015 |
-
function wrapBoxes(boxes) {
|
2016 |
-
const layoutBoxes = [];
|
2017 |
-
let i, ilen, box, pos, stack, stackWeight;
|
2018 |
-
for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {
|
2019 |
-
box = boxes[i];
|
2020 |
-
({position: pos, options: {stack, stackWeight = 1}} = box);
|
2021 |
-
layoutBoxes.push({
|
2022 |
-
index: i,
|
2023 |
-
box,
|
2024 |
-
pos,
|
2025 |
-
horizontal: box.isHorizontal(),
|
2026 |
-
weight: box.weight,
|
2027 |
-
stack: stack && (pos + stack),
|
2028 |
-
stackWeight
|
2029 |
-
});
|
2030 |
-
}
|
2031 |
-
return layoutBoxes;
|
2032 |
-
}
|
2033 |
-
function buildStacks(layouts) {
|
2034 |
-
const stacks = {};
|
2035 |
-
for (const wrap of layouts) {
|
2036 |
-
const {stack, pos, stackWeight} = wrap;
|
2037 |
-
if (!stack || !STATIC_POSITIONS.includes(pos)) {
|
2038 |
-
continue;
|
2039 |
-
}
|
2040 |
-
const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});
|
2041 |
-
_stack.count++;
|
2042 |
-
_stack.weight += stackWeight;
|
2043 |
-
}
|
2044 |
-
return stacks;
|
2045 |
-
}
|
2046 |
-
function setLayoutDims(layouts, params) {
|
2047 |
-
const stacks = buildStacks(layouts);
|
2048 |
-
const {vBoxMaxWidth, hBoxMaxHeight} = params;
|
2049 |
-
let i, ilen, layout;
|
2050 |
-
for (i = 0, ilen = layouts.length; i < ilen; ++i) {
|
2051 |
-
layout = layouts[i];
|
2052 |
-
const {fullSize} = layout.box;
|
2053 |
-
const stack = stacks[layout.stack];
|
2054 |
-
const factor = stack && layout.stackWeight / stack.weight;
|
2055 |
-
if (layout.horizontal) {
|
2056 |
-
layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;
|
2057 |
-
layout.height = hBoxMaxHeight;
|
2058 |
-
} else {
|
2059 |
-
layout.width = vBoxMaxWidth;
|
2060 |
-
layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;
|
2061 |
-
}
|
2062 |
-
}
|
2063 |
-
return stacks;
|
2064 |
-
}
|
2065 |
-
function buildLayoutBoxes(boxes) {
|
2066 |
-
const layoutBoxes = wrapBoxes(boxes);
|
2067 |
-
const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);
|
2068 |
-
const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);
|
2069 |
-
const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));
|
2070 |
-
const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);
|
2071 |
-
const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));
|
2072 |
-
const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');
|
2073 |
-
const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');
|
2074 |
-
return {
|
2075 |
-
fullSize,
|
2076 |
-
leftAndTop: left.concat(top),
|
2077 |
-
rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),
|
2078 |
-
chartArea: filterByPosition(layoutBoxes, 'chartArea'),
|
2079 |
-
vertical: left.concat(right).concat(centerVertical),
|
2080 |
-
horizontal: top.concat(bottom).concat(centerHorizontal)
|
2081 |
-
};
|
2082 |
-
}
|
2083 |
-
function getCombinedMax(maxPadding, chartArea, a, b) {
|
2084 |
-
return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);
|
2085 |
-
}
|
2086 |
-
function updateMaxPadding(maxPadding, boxPadding) {
|
2087 |
-
maxPadding.top = Math.max(maxPadding.top, boxPadding.top);
|
2088 |
-
maxPadding.left = Math.max(maxPadding.left, boxPadding.left);
|
2089 |
-
maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);
|
2090 |
-
maxPadding.right = Math.max(maxPadding.right, boxPadding.right);
|
2091 |
-
}
|
2092 |
-
function updateDims(chartArea, params, layout, stacks) {
|
2093 |
-
const {pos, box} = layout;
|
2094 |
-
const maxPadding = chartArea.maxPadding;
|
2095 |
-
if (!isObject(pos)) {
|
2096 |
-
if (layout.size) {
|
2097 |
-
chartArea[pos] -= layout.size;
|
2098 |
-
}
|
2099 |
-
const stack = stacks[layout.stack] || {size: 0, count: 1};
|
2100 |
-
stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);
|
2101 |
-
layout.size = stack.size / stack.count;
|
2102 |
-
chartArea[pos] += layout.size;
|
2103 |
-
}
|
2104 |
-
if (box.getPadding) {
|
2105 |
-
updateMaxPadding(maxPadding, box.getPadding());
|
2106 |
-
}
|
2107 |
-
const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));
|
2108 |
-
const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));
|
2109 |
-
const widthChanged = newWidth !== chartArea.w;
|
2110 |
-
const heightChanged = newHeight !== chartArea.h;
|
2111 |
-
chartArea.w = newWidth;
|
2112 |
-
chartArea.h = newHeight;
|
2113 |
-
return layout.horizontal
|
2114 |
-
? {same: widthChanged, other: heightChanged}
|
2115 |
-
: {same: heightChanged, other: widthChanged};
|
2116 |
-
}
|
2117 |
-
function handleMaxPadding(chartArea) {
|
2118 |
-
const maxPadding = chartArea.maxPadding;
|
2119 |
-
function updatePos(pos) {
|
2120 |
-
const change = Math.max(maxPadding[pos] - chartArea[pos], 0);
|
2121 |
-
chartArea[pos] += change;
|
2122 |
-
return change;
|
2123 |
-
}
|
2124 |
-
chartArea.y += updatePos('top');
|
2125 |
-
chartArea.x += updatePos('left');
|
2126 |
-
updatePos('right');
|
2127 |
-
updatePos('bottom');
|
2128 |
-
}
|
2129 |
-
function getMargins(horizontal, chartArea) {
|
2130 |
-
const maxPadding = chartArea.maxPadding;
|
2131 |
-
function marginForPositions(positions) {
|
2132 |
-
const margin = {left: 0, top: 0, right: 0, bottom: 0};
|
2133 |
-
positions.forEach((pos) => {
|
2134 |
-
margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);
|
2135 |
-
});
|
2136 |
-
return margin;
|
2137 |
-
}
|
2138 |
-
return horizontal
|
2139 |
-
? marginForPositions(['left', 'right'])
|
2140 |
-
: marginForPositions(['top', 'bottom']);
|
2141 |
-
}
|
2142 |
-
function fitBoxes(boxes, chartArea, params, stacks) {
|
2143 |
-
const refitBoxes = [];
|
2144 |
-
let i, ilen, layout, box, refit, changed;
|
2145 |
-
for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {
|
2146 |
-
layout = boxes[i];
|
2147 |
-
box = layout.box;
|
2148 |
-
box.update(
|
2149 |
-
layout.width || chartArea.w,
|
2150 |
-
layout.height || chartArea.h,
|
2151 |
-
getMargins(layout.horizontal, chartArea)
|
2152 |
-
);
|
2153 |
-
const {same, other} = updateDims(chartArea, params, layout, stacks);
|
2154 |
-
refit |= same && refitBoxes.length;
|
2155 |
-
changed = changed || other;
|
2156 |
-
if (!box.fullSize) {
|
2157 |
-
refitBoxes.push(layout);
|
2158 |
-
}
|
2159 |
-
}
|
2160 |
-
return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;
|
2161 |
-
}
|
2162 |
-
function setBoxDims(box, left, top, width, height) {
|
2163 |
-
box.top = top;
|
2164 |
-
box.left = left;
|
2165 |
-
box.right = left + width;
|
2166 |
-
box.bottom = top + height;
|
2167 |
-
box.width = width;
|
2168 |
-
box.height = height;
|
2169 |
-
}
|
2170 |
-
function placeBoxes(boxes, chartArea, params, stacks) {
|
2171 |
-
const userPadding = params.padding;
|
2172 |
-
let {x, y} = chartArea;
|
2173 |
-
for (const layout of boxes) {
|
2174 |
-
const box = layout.box;
|
2175 |
-
const stack = stacks[layout.stack] || {count: 1, placed: 0, weight: 1};
|
2176 |
-
const weight = (layout.stackWeight / stack.weight) || 1;
|
2177 |
-
if (layout.horizontal) {
|
2178 |
-
const width = chartArea.w * weight;
|
2179 |
-
const height = stack.size || box.height;
|
2180 |
-
if (defined(stack.start)) {
|
2181 |
-
y = stack.start;
|
2182 |
-
}
|
2183 |
-
if (box.fullSize) {
|
2184 |
-
setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);
|
2185 |
-
} else {
|
2186 |
-
setBoxDims(box, chartArea.left + stack.placed, y, width, height);
|
2187 |
-
}
|
2188 |
-
stack.start = y;
|
2189 |
-
stack.placed += width;
|
2190 |
-
y = box.bottom;
|
2191 |
-
} else {
|
2192 |
-
const height = chartArea.h * weight;
|
2193 |
-
const width = stack.size || box.width;
|
2194 |
-
if (defined(stack.start)) {
|
2195 |
-
x = stack.start;
|
2196 |
-
}
|
2197 |
-
if (box.fullSize) {
|
2198 |
-
setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);
|
2199 |
-
} else {
|
2200 |
-
setBoxDims(box, x, chartArea.top + stack.placed, width, height);
|
2201 |
-
}
|
2202 |
-
stack.start = x;
|
2203 |
-
stack.placed += height;
|
2204 |
-
x = box.right;
|
2205 |
-
}
|
2206 |
-
}
|
2207 |
-
chartArea.x = x;
|
2208 |
-
chartArea.y = y;
|
2209 |
-
}
|
2210 |
-
defaults.set('layout', {
|
2211 |
-
autoPadding: true,
|
2212 |
-
padding: {
|
2213 |
-
top: 0,
|
2214 |
-
right: 0,
|
2215 |
-
bottom: 0,
|
2216 |
-
left: 0
|
2217 |
-
}
|
2218 |
-
});
|
2219 |
-
var layouts = {
|
2220 |
-
addBox(chart, item) {
|
2221 |
-
if (!chart.boxes) {
|
2222 |
-
chart.boxes = [];
|
2223 |
-
}
|
2224 |
-
item.fullSize = item.fullSize || false;
|
2225 |
-
item.position = item.position || 'top';
|
2226 |
-
item.weight = item.weight || 0;
|
2227 |
-
item._layers = item._layers || function() {
|
2228 |
-
return [{
|
2229 |
-
z: 0,
|
2230 |
-
draw(chartArea) {
|
2231 |
-
item.draw(chartArea);
|
2232 |
-
}
|
2233 |
-
}];
|
2234 |
-
};
|
2235 |
-
chart.boxes.push(item);
|
2236 |
-
},
|
2237 |
-
removeBox(chart, layoutItem) {
|
2238 |
-
const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
|
2239 |
-
if (index !== -1) {
|
2240 |
-
chart.boxes.splice(index, 1);
|
2241 |
-
}
|
2242 |
-
},
|
2243 |
-
configure(chart, item, options) {
|
2244 |
-
item.fullSize = options.fullSize;
|
2245 |
-
item.position = options.position;
|
2246 |
-
item.weight = options.weight;
|
2247 |
-
},
|
2248 |
-
update(chart, width, height, minPadding) {
|
2249 |
-
if (!chart) {
|
2250 |
-
return;
|
2251 |
-
}
|
2252 |
-
const padding = toPadding(chart.options.layout.padding);
|
2253 |
-
const availableWidth = Math.max(width - padding.width, 0);
|
2254 |
-
const availableHeight = Math.max(height - padding.height, 0);
|
2255 |
-
const boxes = buildLayoutBoxes(chart.boxes);
|
2256 |
-
const verticalBoxes = boxes.vertical;
|
2257 |
-
const horizontalBoxes = boxes.horizontal;
|
2258 |
-
each(chart.boxes, box => {
|
2259 |
-
if (typeof box.beforeLayout === 'function') {
|
2260 |
-
box.beforeLayout();
|
2261 |
-
}
|
2262 |
-
});
|
2263 |
-
const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) =>
|
2264 |
-
wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;
|
2265 |
-
const params = Object.freeze({
|
2266 |
-
outerWidth: width,
|
2267 |
-
outerHeight: height,
|
2268 |
-
padding,
|
2269 |
-
availableWidth,
|
2270 |
-
availableHeight,
|
2271 |
-
vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,
|
2272 |
-
hBoxMaxHeight: availableHeight / 2
|
2273 |
-
});
|
2274 |
-
const maxPadding = Object.assign({}, padding);
|
2275 |
-
updateMaxPadding(maxPadding, toPadding(minPadding));
|
2276 |
-
const chartArea = Object.assign({
|
2277 |
-
maxPadding,
|
2278 |
-
w: availableWidth,
|
2279 |
-
h: availableHeight,
|
2280 |
-
x: padding.left,
|
2281 |
-
y: padding.top
|
2282 |
-
}, padding);
|
2283 |
-
const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);
|
2284 |
-
fitBoxes(boxes.fullSize, chartArea, params, stacks);
|
2285 |
-
fitBoxes(verticalBoxes, chartArea, params, stacks);
|
2286 |
-
if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {
|
2287 |
-
fitBoxes(verticalBoxes, chartArea, params, stacks);
|
2288 |
-
}
|
2289 |
-
handleMaxPadding(chartArea);
|
2290 |
-
placeBoxes(boxes.leftAndTop, chartArea, params, stacks);
|
2291 |
-
chartArea.x += chartArea.w;
|
2292 |
-
chartArea.y += chartArea.h;
|
2293 |
-
placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);
|
2294 |
-
chart.chartArea = {
|
2295 |
-
left: chartArea.left,
|
2296 |
-
top: chartArea.top,
|
2297 |
-
right: chartArea.left + chartArea.w,
|
2298 |
-
bottom: chartArea.top + chartArea.h,
|
2299 |
-
height: chartArea.h,
|
2300 |
-
width: chartArea.w,
|
2301 |
-
};
|
2302 |
-
each(boxes.chartArea, (layout) => {
|
2303 |
-
const box = layout.box;
|
2304 |
-
Object.assign(box, chart.chartArea);
|
2305 |
-
box.update(chartArea.w, chartArea.h, {left: 0, top: 0, right: 0, bottom: 0});
|
2306 |
-
});
|
2307 |
-
}
|
2308 |
-
};
|
2309 |
-
|
2310 |
-
function _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {
|
2311 |
-
if (!defined(fallback)) {
|
2312 |
-
fallback = _resolve('_fallback', scopes);
|
2313 |
-
}
|
2314 |
-
const cache = {
|
2315 |
-
[Symbol.toStringTag]: 'Object',
|
2316 |
-
_cacheable: true,
|
2317 |
-
_scopes: scopes,
|
2318 |
-
_rootScopes: rootScopes,
|
2319 |
-
_fallback: fallback,
|
2320 |
-
_getTarget: getTarget,
|
2321 |
-
override: (scope) => _createResolver([scope, ...scopes], prefixes, rootScopes, fallback),
|
2322 |
-
};
|
2323 |
-
return new Proxy(cache, {
|
2324 |
-
deleteProperty(target, prop) {
|
2325 |
-
delete target[prop];
|
2326 |
-
delete target._keys;
|
2327 |
-
delete scopes[0][prop];
|
2328 |
-
return true;
|
2329 |
-
},
|
2330 |
-
get(target, prop) {
|
2331 |
-
return _cached(target, prop,
|
2332 |
-
() => _resolveWithPrefixes(prop, prefixes, scopes, target));
|
2333 |
-
},
|
2334 |
-
getOwnPropertyDescriptor(target, prop) {
|
2335 |
-
return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);
|
2336 |
-
},
|
2337 |
-
getPrototypeOf() {
|
2338 |
-
return Reflect.getPrototypeOf(scopes[0]);
|
2339 |
-
},
|
2340 |
-
has(target, prop) {
|
2341 |
-
return getKeysFromAllScopes(target).includes(prop);
|
2342 |
-
},
|
2343 |
-
ownKeys(target) {
|
2344 |
-
return getKeysFromAllScopes(target);
|
2345 |
-
},
|
2346 |
-
set(target, prop, value) {
|
2347 |
-
const storage = target._storage || (target._storage = getTarget());
|
2348 |
-
target[prop] = storage[prop] = value;
|
2349 |
-
delete target._keys;
|
2350 |
-
return true;
|
2351 |
-
}
|
2352 |
-
});
|
2353 |
-
}
|
2354 |
-
function _attachContext(proxy, context, subProxy, descriptorDefaults) {
|
2355 |
-
const cache = {
|
2356 |
-
_cacheable: false,
|
2357 |
-
_proxy: proxy,
|
2358 |
-
_context: context,
|
2359 |
-
_subProxy: subProxy,
|
2360 |
-
_stack: new Set(),
|
2361 |
-
_descriptors: _descriptors(proxy, descriptorDefaults),
|
2362 |
-
setContext: (ctx) => _attachContext(proxy, ctx, subProxy, descriptorDefaults),
|
2363 |
-
override: (scope) => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)
|
2364 |
-
};
|
2365 |
-
return new Proxy(cache, {
|
2366 |
-
deleteProperty(target, prop) {
|
2367 |
-
delete target[prop];
|
2368 |
-
delete proxy[prop];
|
2369 |
-
return true;
|
2370 |
-
},
|
2371 |
-
get(target, prop, receiver) {
|
2372 |
-
return _cached(target, prop,
|
2373 |
-
() => _resolveWithContext(target, prop, receiver));
|
2374 |
-
},
|
2375 |
-
getOwnPropertyDescriptor(target, prop) {
|
2376 |
-
return target._descriptors.allKeys
|
2377 |
-
? Reflect.has(proxy, prop) ? {enumerable: true, configurable: true} : undefined
|
2378 |
-
: Reflect.getOwnPropertyDescriptor(proxy, prop);
|
2379 |
-
},
|
2380 |
-
getPrototypeOf() {
|
2381 |
-
return Reflect.getPrototypeOf(proxy);
|
2382 |
-
},
|
2383 |
-
has(target, prop) {
|
2384 |
-
return Reflect.has(proxy, prop);
|
2385 |
-
},
|
2386 |
-
ownKeys() {
|
2387 |
-
return Reflect.ownKeys(proxy);
|
2388 |
-
},
|
2389 |
-
set(target, prop, value) {
|
2390 |
-
proxy[prop] = value;
|
2391 |
-
delete target[prop];
|
2392 |
-
return true;
|
2393 |
-
}
|
2394 |
-
});
|
2395 |
-
}
|
2396 |
-
function _descriptors(proxy, defaults = {scriptable: true, indexable: true}) {
|
2397 |
-
const {_scriptable = defaults.scriptable, _indexable = defaults.indexable, _allKeys = defaults.allKeys} = proxy;
|
2398 |
-
return {
|
2399 |
-
allKeys: _allKeys,
|
2400 |
-
scriptable: _scriptable,
|
2401 |
-
indexable: _indexable,
|
2402 |
-
isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,
|
2403 |
-
isIndexable: isFunction(_indexable) ? _indexable : () => _indexable
|
2404 |
-
};
|
2405 |
-
}
|
2406 |
-
const readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name;
|
2407 |
-
const needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters' &&
|
2408 |
-
(Object.getPrototypeOf(value) === null || value.constructor === Object);
|
2409 |
-
function _cached(target, prop, resolve) {
|
2410 |
-
if (Object.prototype.hasOwnProperty.call(target, prop)) {
|
2411 |
-
return target[prop];
|
2412 |
-
}
|
2413 |
-
const value = resolve();
|
2414 |
-
target[prop] = value;
|
2415 |
-
return value;
|
2416 |
-
}
|
2417 |
-
function _resolveWithContext(target, prop, receiver) {
|
2418 |
-
const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
|
2419 |
-
let value = _proxy[prop];
|
2420 |
-
if (isFunction(value) && descriptors.isScriptable(prop)) {
|
2421 |
-
value = _resolveScriptable(prop, value, target, receiver);
|
2422 |
-
}
|
2423 |
-
if (isArray(value) && value.length) {
|
2424 |
-
value = _resolveArray(prop, value, target, descriptors.isIndexable);
|
2425 |
-
}
|
2426 |
-
if (needsSubResolver(prop, value)) {
|
2427 |
-
value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);
|
2428 |
-
}
|
2429 |
-
return value;
|
2430 |
-
}
|
2431 |
-
function _resolveScriptable(prop, value, target, receiver) {
|
2432 |
-
const {_proxy, _context, _subProxy, _stack} = target;
|
2433 |
-
if (_stack.has(prop)) {
|
2434 |
-
throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);
|
2435 |
-
}
|
2436 |
-
_stack.add(prop);
|
2437 |
-
value = value(_context, _subProxy || receiver);
|
2438 |
-
_stack.delete(prop);
|
2439 |
-
if (needsSubResolver(prop, value)) {
|
2440 |
-
value = createSubResolver(_proxy._scopes, _proxy, prop, value);
|
2441 |
-
}
|
2442 |
-
return value;
|
2443 |
-
}
|
2444 |
-
function _resolveArray(prop, value, target, isIndexable) {
|
2445 |
-
const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
|
2446 |
-
if (defined(_context.index) && isIndexable(prop)) {
|
2447 |
-
value = value[_context.index % value.length];
|
2448 |
-
} else if (isObject(value[0])) {
|
2449 |
-
const arr = value;
|
2450 |
-
const scopes = _proxy._scopes.filter(s => s !== arr);
|
2451 |
-
value = [];
|
2452 |
-
for (const item of arr) {
|
2453 |
-
const resolver = createSubResolver(scopes, _proxy, prop, item);
|
2454 |
-
value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));
|
2455 |
-
}
|
2456 |
-
}
|
2457 |
-
return value;
|
2458 |
-
}
|
2459 |
-
function resolveFallback(fallback, prop, value) {
|
2460 |
-
return isFunction(fallback) ? fallback(prop, value) : fallback;
|
2461 |
-
}
|
2462 |
-
const getScope = (key, parent) => key === true ? parent
|
2463 |
-
: typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;
|
2464 |
-
function addScopes(set, parentScopes, key, parentFallback) {
|
2465 |
-
for (const parent of parentScopes) {
|
2466 |
-
const scope = getScope(key, parent);
|
2467 |
-
if (scope) {
|
2468 |
-
set.add(scope);
|
2469 |
-
const fallback = resolveFallback(scope._fallback, key, scope);
|
2470 |
-
if (defined(fallback) && fallback !== key && fallback !== parentFallback) {
|
2471 |
-
return fallback;
|
2472 |
-
}
|
2473 |
-
} else if (scope === false && defined(parentFallback) && key !== parentFallback) {
|
2474 |
-
return null;
|
2475 |
-
}
|
2476 |
-
}
|
2477 |
-
return false;
|
2478 |
-
}
|
2479 |
-
function createSubResolver(parentScopes, resolver, prop, value) {
|
2480 |
-
const rootScopes = resolver._rootScopes;
|
2481 |
-
const fallback = resolveFallback(resolver._fallback, prop, value);
|
2482 |
-
const allScopes = [...parentScopes, ...rootScopes];
|
2483 |
-
const set = new Set();
|
2484 |
-
set.add(value);
|
2485 |
-
let key = addScopesFromKey(set, allScopes, prop, fallback || prop);
|
2486 |
-
if (key === null) {
|
2487 |
-
return false;
|
2488 |
-
}
|
2489 |
-
if (defined(fallback) && fallback !== prop) {
|
2490 |
-
key = addScopesFromKey(set, allScopes, fallback, key);
|
2491 |
-
if (key === null) {
|
2492 |
-
return false;
|
2493 |
-
}
|
2494 |
-
}
|
2495 |
-
return _createResolver(Array.from(set), [''], rootScopes, fallback,
|
2496 |
-
() => subGetTarget(resolver, prop, value));
|
2497 |
-
}
|
2498 |
-
function addScopesFromKey(set, allScopes, key, fallback) {
|
2499 |
-
while (key) {
|
2500 |
-
key = addScopes(set, allScopes, key, fallback);
|
2501 |
-
}
|
2502 |
-
return key;
|
2503 |
-
}
|
2504 |
-
function subGetTarget(resolver, prop, value) {
|
2505 |
-
const parent = resolver._getTarget();
|
2506 |
-
if (!(prop in parent)) {
|
2507 |
-
parent[prop] = {};
|
2508 |
-
}
|
2509 |
-
const target = parent[prop];
|
2510 |
-
if (isArray(target) && isObject(value)) {
|
2511 |
-
return value;
|
2512 |
-
}
|
2513 |
-
return target;
|
2514 |
-
}
|
2515 |
-
function _resolveWithPrefixes(prop, prefixes, scopes, proxy) {
|
2516 |
-
let value;
|
2517 |
-
for (const prefix of prefixes) {
|
2518 |
-
value = _resolve(readKey(prefix, prop), scopes);
|
2519 |
-
if (defined(value)) {
|
2520 |
-
return needsSubResolver(prop, value)
|
2521 |
-
? createSubResolver(scopes, proxy, prop, value)
|
2522 |
-
: value;
|
2523 |
-
}
|
2524 |
-
}
|
2525 |
-
}
|
2526 |
-
function _resolve(key, scopes) {
|
2527 |
-
for (const scope of scopes) {
|
2528 |
-
if (!scope) {
|
2529 |
-
continue;
|
2530 |
-
}
|
2531 |
-
const value = scope[key];
|
2532 |
-
if (defined(value)) {
|
2533 |
-
return value;
|
2534 |
-
}
|
2535 |
-
}
|
2536 |
-
}
|
2537 |
-
function getKeysFromAllScopes(target) {
|
2538 |
-
let keys = target._keys;
|
2539 |
-
if (!keys) {
|
2540 |
-
keys = target._keys = resolveKeysFromAllScopes(target._scopes);
|
2541 |
-
}
|
2542 |
-
return keys;
|
2543 |
-
}
|
2544 |
-
function resolveKeysFromAllScopes(scopes) {
|
2545 |
-
const set = new Set();
|
2546 |
-
for (const scope of scopes) {
|
2547 |
-
for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {
|
2548 |
-
set.add(key);
|
2549 |
-
}
|
2550 |
-
}
|
2551 |
-
return Array.from(set);
|
2552 |
-
}
|
2553 |
-
|
2554 |
-
const EPSILON = Number.EPSILON || 1e-14;
|
2555 |
-
const getPoint = (points, i) => i < points.length && !points[i].skip && points[i];
|
2556 |
-
const getValueAxis = (indexAxis) => indexAxis === 'x' ? 'y' : 'x';
|
2557 |
-
function splineCurve(firstPoint, middlePoint, afterPoint, t) {
|
2558 |
-
const previous = firstPoint.skip ? middlePoint : firstPoint;
|
2559 |
-
const current = middlePoint;
|
2560 |
-
const next = afterPoint.skip ? middlePoint : afterPoint;
|
2561 |
-
const d01 = distanceBetweenPoints(current, previous);
|
2562 |
-
const d12 = distanceBetweenPoints(next, current);
|
2563 |
-
let s01 = d01 / (d01 + d12);
|
2564 |
-
let s12 = d12 / (d01 + d12);
|
2565 |
-
s01 = isNaN(s01) ? 0 : s01;
|
2566 |
-
s12 = isNaN(s12) ? 0 : s12;
|
2567 |
-
const fa = t * s01;
|
2568 |
-
const fb = t * s12;
|
2569 |
-
return {
|
2570 |
-
previous: {
|
2571 |
-
x: current.x - fa * (next.x - previous.x),
|
2572 |
-
y: current.y - fa * (next.y - previous.y)
|
2573 |
-
},
|
2574 |
-
next: {
|
2575 |
-
x: current.x + fb * (next.x - previous.x),
|
2576 |
-
y: current.y + fb * (next.y - previous.y)
|
2577 |
-
}
|
2578 |
-
};
|
2579 |
-
}
|
2580 |
-
function monotoneAdjust(points, deltaK, mK) {
|
2581 |
-
const pointsLen = points.length;
|
2582 |
-
let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;
|
2583 |
-
let pointAfter = getPoint(points, 0);
|
2584 |
-
for (let i = 0; i < pointsLen - 1; ++i) {
|
2585 |
-
pointCurrent = pointAfter;
|
2586 |
-
pointAfter = getPoint(points, i + 1);
|
2587 |
-
if (!pointCurrent || !pointAfter) {
|
2588 |
-
continue;
|
2589 |
-
}
|
2590 |
-
if (almostEquals(deltaK[i], 0, EPSILON)) {
|
2591 |
-
mK[i] = mK[i + 1] = 0;
|
2592 |
-
continue;
|
2593 |
-
}
|
2594 |
-
alphaK = mK[i] / deltaK[i];
|
2595 |
-
betaK = mK[i + 1] / deltaK[i];
|
2596 |
-
squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);
|
2597 |
-
if (squaredMagnitude <= 9) {
|
2598 |
-
continue;
|
2599 |
-
}
|
2600 |
-
tauK = 3 / Math.sqrt(squaredMagnitude);
|
2601 |
-
mK[i] = alphaK * tauK * deltaK[i];
|
2602 |
-
mK[i + 1] = betaK * tauK * deltaK[i];
|
2603 |
-
}
|
2604 |
-
}
|
2605 |
-
function monotoneCompute(points, mK, indexAxis = 'x') {
|
2606 |
-
const valueAxis = getValueAxis(indexAxis);
|
2607 |
-
const pointsLen = points.length;
|
2608 |
-
let delta, pointBefore, pointCurrent;
|
2609 |
-
let pointAfter = getPoint(points, 0);
|
2610 |
-
for (let i = 0; i < pointsLen; ++i) {
|
2611 |
-
pointBefore = pointCurrent;
|
2612 |
-
pointCurrent = pointAfter;
|
2613 |
-
pointAfter = getPoint(points, i + 1);
|
2614 |
-
if (!pointCurrent) {
|
2615 |
-
continue;
|
2616 |
-
}
|
2617 |
-
const iPixel = pointCurrent[indexAxis];
|
2618 |
-
const vPixel = pointCurrent[valueAxis];
|
2619 |
-
if (pointBefore) {
|
2620 |
-
delta = (iPixel - pointBefore[indexAxis]) / 3;
|
2621 |
-
pointCurrent[`cp1${indexAxis}`] = iPixel - delta;
|
2622 |
-
pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];
|
2623 |
-
}
|
2624 |
-
if (pointAfter) {
|
2625 |
-
delta = (pointAfter[indexAxis] - iPixel) / 3;
|
2626 |
-
pointCurrent[`cp2${indexAxis}`] = iPixel + delta;
|
2627 |
-
pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];
|
2628 |
-
}
|
2629 |
-
}
|
2630 |
-
}
|
2631 |
-
function splineCurveMonotone(points, indexAxis = 'x') {
|
2632 |
-
const valueAxis = getValueAxis(indexAxis);
|
2633 |
-
const pointsLen = points.length;
|
2634 |
-
const deltaK = Array(pointsLen).fill(0);
|
2635 |
-
const mK = Array(pointsLen);
|
2636 |
-
let i, pointBefore, pointCurrent;
|
2637 |
-
let pointAfter = getPoint(points, 0);
|
2638 |
-
for (i = 0; i < pointsLen; ++i) {
|
2639 |
-
pointBefore = pointCurrent;
|
2640 |
-
pointCurrent = pointAfter;
|
2641 |
-
pointAfter = getPoint(points, i + 1);
|
2642 |
-
if (!pointCurrent) {
|
2643 |
-
continue;
|
2644 |
-
}
|
2645 |
-
if (pointAfter) {
|
2646 |
-
const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];
|
2647 |
-
deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;
|
2648 |
-
}
|
2649 |
-
mK[i] = !pointBefore ? deltaK[i]
|
2650 |
-
: !pointAfter ? deltaK[i - 1]
|
2651 |
-
: (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0
|
2652 |
-
: (deltaK[i - 1] + deltaK[i]) / 2;
|
2653 |
-
}
|
2654 |
-
monotoneAdjust(points, deltaK, mK);
|
2655 |
-
monotoneCompute(points, mK, indexAxis);
|
2656 |
-
}
|
2657 |
-
function capControlPoint(pt, min, max) {
|
2658 |
-
return Math.max(Math.min(pt, max), min);
|
2659 |
-
}
|
2660 |
-
function capBezierPoints(points, area) {
|
2661 |
-
let i, ilen, point, inArea, inAreaPrev;
|
2662 |
-
let inAreaNext = _isPointInArea(points[0], area);
|
2663 |
-
for (i = 0, ilen = points.length; i < ilen; ++i) {
|
2664 |
-
inAreaPrev = inArea;
|
2665 |
-
inArea = inAreaNext;
|
2666 |
-
inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);
|
2667 |
-
if (!inArea) {
|
2668 |
-
continue;
|
2669 |
-
}
|
2670 |
-
point = points[i];
|
2671 |
-
if (inAreaPrev) {
|
2672 |
-
point.cp1x = capControlPoint(point.cp1x, area.left, area.right);
|
2673 |
-
point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);
|
2674 |
-
}
|
2675 |
-
if (inAreaNext) {
|
2676 |
-
point.cp2x = capControlPoint(point.cp2x, area.left, area.right);
|
2677 |
-
point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);
|
2678 |
-
}
|
2679 |
-
}
|
2680 |
-
}
|
2681 |
-
function _updateBezierControlPoints(points, options, area, loop, indexAxis) {
|
2682 |
-
let i, ilen, point, controlPoints;
|
2683 |
-
if (options.spanGaps) {
|
2684 |
-
points = points.filter((pt) => !pt.skip);
|
2685 |
-
}
|
2686 |
-
if (options.cubicInterpolationMode === 'monotone') {
|
2687 |
-
splineCurveMonotone(points, indexAxis);
|
2688 |
-
} else {
|
2689 |
-
let prev = loop ? points[points.length - 1] : points[0];
|
2690 |
-
for (i = 0, ilen = points.length; i < ilen; ++i) {
|
2691 |
-
point = points[i];
|
2692 |
-
controlPoints = splineCurve(
|
2693 |
-
prev,
|
2694 |
-
point,
|
2695 |
-
points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen],
|
2696 |
-
options.tension
|
2697 |
-
);
|
2698 |
-
point.cp1x = controlPoints.previous.x;
|
2699 |
-
point.cp1y = controlPoints.previous.y;
|
2700 |
-
point.cp2x = controlPoints.next.x;
|
2701 |
-
point.cp2y = controlPoints.next.y;
|
2702 |
-
prev = point;
|
2703 |
-
}
|
2704 |
-
}
|
2705 |
-
if (options.capBezierPoints) {
|
2706 |
-
capBezierPoints(points, area);
|
2707 |
-
}
|
2708 |
-
}
|
2709 |
-
|
2710 |
-
const atEdge = (t) => t === 0 || t === 1;
|
2711 |
-
const elasticIn = (t, s, p) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));
|
2712 |
-
const elasticOut = (t, s, p) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;
|
2713 |
-
const effects = {
|
2714 |
-
linear: t => t,
|
2715 |
-
easeInQuad: t => t * t,
|
2716 |
-
easeOutQuad: t => -t * (t - 2),
|
2717 |
-
easeInOutQuad: t => ((t /= 0.5) < 1)
|
2718 |
-
? 0.5 * t * t
|
2719 |
-
: -0.5 * ((--t) * (t - 2) - 1),
|
2720 |
-
easeInCubic: t => t * t * t,
|
2721 |
-
easeOutCubic: t => (t -= 1) * t * t + 1,
|
2722 |
-
easeInOutCubic: t => ((t /= 0.5) < 1)
|
2723 |
-
? 0.5 * t * t * t
|
2724 |
-
: 0.5 * ((t -= 2) * t * t + 2),
|
2725 |
-
easeInQuart: t => t * t * t * t,
|
2726 |
-
easeOutQuart: t => -((t -= 1) * t * t * t - 1),
|
2727 |
-
easeInOutQuart: t => ((t /= 0.5) < 1)
|
2728 |
-
? 0.5 * t * t * t * t
|
2729 |
-
: -0.5 * ((t -= 2) * t * t * t - 2),
|
2730 |
-
easeInQuint: t => t * t * t * t * t,
|
2731 |
-
easeOutQuint: t => (t -= 1) * t * t * t * t + 1,
|
2732 |
-
easeInOutQuint: t => ((t /= 0.5) < 1)
|
2733 |
-
? 0.5 * t * t * t * t * t
|
2734 |
-
: 0.5 * ((t -= 2) * t * t * t * t + 2),
|
2735 |
-
easeInSine: t => -Math.cos(t * HALF_PI) + 1,
|
2736 |
-
easeOutSine: t => Math.sin(t * HALF_PI),
|
2737 |
-
easeInOutSine: t => -0.5 * (Math.cos(PI * t) - 1),
|
2738 |
-
easeInExpo: t => (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)),
|
2739 |
-
easeOutExpo: t => (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1,
|
2740 |
-
easeInOutExpo: t => atEdge(t) ? t : t < 0.5
|
2741 |
-
? 0.5 * Math.pow(2, 10 * (t * 2 - 1))
|
2742 |
-
: 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),
|
2743 |
-
easeInCirc: t => (t >= 1) ? t : -(Math.sqrt(1 - t * t) - 1),
|
2744 |
-
easeOutCirc: t => Math.sqrt(1 - (t -= 1) * t),
|
2745 |
-
easeInOutCirc: t => ((t /= 0.5) < 1)
|
2746 |
-
? -0.5 * (Math.sqrt(1 - t * t) - 1)
|
2747 |
-
: 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),
|
2748 |
-
easeInElastic: t => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),
|
2749 |
-
easeOutElastic: t => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),
|
2750 |
-
easeInOutElastic(t) {
|
2751 |
-
const s = 0.1125;
|
2752 |
-
const p = 0.45;
|
2753 |
-
return atEdge(t) ? t :
|
2754 |
-
t < 0.5
|
2755 |
-
? 0.5 * elasticIn(t * 2, s, p)
|
2756 |
-
: 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);
|
2757 |
-
},
|
2758 |
-
easeInBack(t) {
|
2759 |
-
const s = 1.70158;
|
2760 |
-
return t * t * ((s + 1) * t - s);
|
2761 |
-
},
|
2762 |
-
easeOutBack(t) {
|
2763 |
-
const s = 1.70158;
|
2764 |
-
return (t -= 1) * t * ((s + 1) * t + s) + 1;
|
2765 |
-
},
|
2766 |
-
easeInOutBack(t) {
|
2767 |
-
let s = 1.70158;
|
2768 |
-
if ((t /= 0.5) < 1) {
|
2769 |
-
return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));
|
2770 |
-
}
|
2771 |
-
return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
|
2772 |
-
},
|
2773 |
-
easeInBounce: t => 1 - effects.easeOutBounce(1 - t),
|
2774 |
-
easeOutBounce(t) {
|
2775 |
-
const m = 7.5625;
|
2776 |
-
const d = 2.75;
|
2777 |
-
if (t < (1 / d)) {
|
2778 |
-
return m * t * t;
|
2779 |
-
}
|
2780 |
-
if (t < (2 / d)) {
|
2781 |
-
return m * (t -= (1.5 / d)) * t + 0.75;
|
2782 |
-
}
|
2783 |
-
if (t < (2.5 / d)) {
|
2784 |
-
return m * (t -= (2.25 / d)) * t + 0.9375;
|
2785 |
-
}
|
2786 |
-
return m * (t -= (2.625 / d)) * t + 0.984375;
|
2787 |
-
},
|
2788 |
-
easeInOutBounce: t => (t < 0.5)
|
2789 |
-
? effects.easeInBounce(t * 2) * 0.5
|
2790 |
-
: effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5,
|
2791 |
-
};
|
2792 |
-
|
2793 |
-
function _pointInLine(p1, p2, t, mode) {
|
2794 |
-
return {
|
2795 |
-
x: p1.x + t * (p2.x - p1.x),
|
2796 |
-
y: p1.y + t * (p2.y - p1.y)
|
2797 |
-
};
|
2798 |
-
}
|
2799 |
-
function _steppedInterpolation(p1, p2, t, mode) {
|
2800 |
-
return {
|
2801 |
-
x: p1.x + t * (p2.x - p1.x),
|
2802 |
-
y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y
|
2803 |
-
: mode === 'after' ? t < 1 ? p1.y : p2.y
|
2804 |
-
: t > 0 ? p2.y : p1.y
|
2805 |
-
};
|
2806 |
-
}
|
2807 |
-
function _bezierInterpolation(p1, p2, t, mode) {
|
2808 |
-
const cp1 = {x: p1.cp2x, y: p1.cp2y};
|
2809 |
-
const cp2 = {x: p2.cp1x, y: p2.cp1y};
|
2810 |
-
const a = _pointInLine(p1, cp1, t);
|
2811 |
-
const b = _pointInLine(cp1, cp2, t);
|
2812 |
-
const c = _pointInLine(cp2, p2, t);
|
2813 |
-
const d = _pointInLine(a, b, t);
|
2814 |
-
const e = _pointInLine(b, c, t);
|
2815 |
-
return _pointInLine(d, e, t);
|
2816 |
-
}
|
2817 |
-
|
2818 |
-
const intlCache = new Map();
|
2819 |
-
function getNumberFormat(locale, options) {
|
2820 |
-
options = options || {};
|
2821 |
-
const cacheKey = locale + JSON.stringify(options);
|
2822 |
-
let formatter = intlCache.get(cacheKey);
|
2823 |
-
if (!formatter) {
|
2824 |
-
formatter = new Intl.NumberFormat(locale, options);
|
2825 |
-
intlCache.set(cacheKey, formatter);
|
2826 |
-
}
|
2827 |
-
return formatter;
|
2828 |
-
}
|
2829 |
-
function formatNumber(num, locale, options) {
|
2830 |
-
return getNumberFormat(locale, options).format(num);
|
2831 |
-
}
|
2832 |
-
|
2833 |
-
const getRightToLeftAdapter = function(rectX, width) {
|
2834 |
-
return {
|
2835 |
-
x(x) {
|
2836 |
-
return rectX + rectX + width - x;
|
2837 |
-
},
|
2838 |
-
setWidth(w) {
|
2839 |
-
width = w;
|
2840 |
-
},
|
2841 |
-
textAlign(align) {
|
2842 |
-
if (align === 'center') {
|
2843 |
-
return align;
|
2844 |
-
}
|
2845 |
-
return align === 'right' ? 'left' : 'right';
|
2846 |
-
},
|
2847 |
-
xPlus(x, value) {
|
2848 |
-
return x - value;
|
2849 |
-
},
|
2850 |
-
leftForLtr(x, itemWidth) {
|
2851 |
-
return x - itemWidth;
|
2852 |
-
},
|
2853 |
-
};
|
2854 |
-
};
|
2855 |
-
const getLeftToRightAdapter = function() {
|
2856 |
-
return {
|
2857 |
-
x(x) {
|
2858 |
-
return x;
|
2859 |
-
},
|
2860 |
-
setWidth(w) {
|
2861 |
-
},
|
2862 |
-
textAlign(align) {
|
2863 |
-
return align;
|
2864 |
-
},
|
2865 |
-
xPlus(x, value) {
|
2866 |
-
return x + value;
|
2867 |
-
},
|
2868 |
-
leftForLtr(x, _itemWidth) {
|
2869 |
-
return x;
|
2870 |
-
},
|
2871 |
-
};
|
2872 |
-
};
|
2873 |
-
function getRtlAdapter(rtl, rectX, width) {
|
2874 |
-
return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();
|
2875 |
-
}
|
2876 |
-
function overrideTextDirection(ctx, direction) {
|
2877 |
-
let style, original;
|
2878 |
-
if (direction === 'ltr' || direction === 'rtl') {
|
2879 |
-
style = ctx.canvas.style;
|
2880 |
-
original = [
|
2881 |
-
style.getPropertyValue('direction'),
|
2882 |
-
style.getPropertyPriority('direction'),
|
2883 |
-
];
|
2884 |
-
style.setProperty('direction', direction, 'important');
|
2885 |
-
ctx.prevTextDirection = original;
|
2886 |
-
}
|
2887 |
-
}
|
2888 |
-
function restoreTextDirection(ctx, original) {
|
2889 |
-
if (original !== undefined) {
|
2890 |
-
delete ctx.prevTextDirection;
|
2891 |
-
ctx.canvas.style.setProperty('direction', original[0], original[1]);
|
2892 |
-
}
|
2893 |
-
}
|
2894 |
-
|
2895 |
-
function propertyFn(property) {
|
2896 |
-
if (property === 'angle') {
|
2897 |
-
return {
|
2898 |
-
between: _angleBetween,
|
2899 |
-
compare: _angleDiff,
|
2900 |
-
normalize: _normalizeAngle,
|
2901 |
-
};
|
2902 |
-
}
|
2903 |
-
return {
|
2904 |
-
between: _isBetween,
|
2905 |
-
compare: (a, b) => a - b,
|
2906 |
-
normalize: x => x
|
2907 |
-
};
|
2908 |
-
}
|
2909 |
-
function normalizeSegment({start, end, count, loop, style}) {
|
2910 |
-
return {
|
2911 |
-
start: start % count,
|
2912 |
-
end: end % count,
|
2913 |
-
loop: loop && (end - start + 1) % count === 0,
|
2914 |
-
style
|
2915 |
-
};
|
2916 |
-
}
|
2917 |
-
function getSegment(segment, points, bounds) {
|
2918 |
-
const {property, start: startBound, end: endBound} = bounds;
|
2919 |
-
const {between, normalize} = propertyFn(property);
|
2920 |
-
const count = points.length;
|
2921 |
-
let {start, end, loop} = segment;
|
2922 |
-
let i, ilen;
|
2923 |
-
if (loop) {
|
2924 |
-
start += count;
|
2925 |
-
end += count;
|
2926 |
-
for (i = 0, ilen = count; i < ilen; ++i) {
|
2927 |
-
if (!between(normalize(points[start % count][property]), startBound, endBound)) {
|
2928 |
-
break;
|
2929 |
-
}
|
2930 |
-
start--;
|
2931 |
-
end--;
|
2932 |
-
}
|
2933 |
-
start %= count;
|
2934 |
-
end %= count;
|
2935 |
-
}
|
2936 |
-
if (end < start) {
|
2937 |
-
end += count;
|
2938 |
-
}
|
2939 |
-
return {start, end, loop, style: segment.style};
|
2940 |
-
}
|
2941 |
-
function _boundSegment(segment, points, bounds) {
|
2942 |
-
if (!bounds) {
|
2943 |
-
return [segment];
|
2944 |
-
}
|
2945 |
-
const {property, start: startBound, end: endBound} = bounds;
|
2946 |
-
const count = points.length;
|
2947 |
-
const {compare, between, normalize} = propertyFn(property);
|
2948 |
-
const {start, end, loop, style} = getSegment(segment, points, bounds);
|
2949 |
-
const result = [];
|
2950 |
-
let inside = false;
|
2951 |
-
let subStart = null;
|
2952 |
-
let value, point, prevValue;
|
2953 |
-
const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;
|
2954 |
-
const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);
|
2955 |
-
const shouldStart = () => inside || startIsBefore();
|
2956 |
-
const shouldStop = () => !inside || endIsBefore();
|
2957 |
-
for (let i = start, prev = start; i <= end; ++i) {
|
2958 |
-
point = points[i % count];
|
2959 |
-
if (point.skip) {
|
2960 |
-
continue;
|
2961 |
-
}
|
2962 |
-
value = normalize(point[property]);
|
2963 |
-
if (value === prevValue) {
|
2964 |
-
continue;
|
2965 |
-
}
|
2966 |
-
inside = between(value, startBound, endBound);
|
2967 |
-
if (subStart === null && shouldStart()) {
|
2968 |
-
subStart = compare(value, startBound) === 0 ? i : prev;
|
2969 |
-
}
|
2970 |
-
if (subStart !== null && shouldStop()) {
|
2971 |
-
result.push(normalizeSegment({start: subStart, end: i, loop, count, style}));
|
2972 |
-
subStart = null;
|
2973 |
-
}
|
2974 |
-
prev = i;
|
2975 |
-
prevValue = value;
|
2976 |
-
}
|
2977 |
-
if (subStart !== null) {
|
2978 |
-
result.push(normalizeSegment({start: subStart, end, loop, count, style}));
|
2979 |
-
}
|
2980 |
-
return result;
|
2981 |
-
}
|
2982 |
-
function _boundSegments(line, bounds) {
|
2983 |
-
const result = [];
|
2984 |
-
const segments = line.segments;
|
2985 |
-
for (let i = 0; i < segments.length; i++) {
|
2986 |
-
const sub = _boundSegment(segments[i], line.points, bounds);
|
2987 |
-
if (sub.length) {
|
2988 |
-
result.push(...sub);
|
2989 |
-
}
|
2990 |
-
}
|
2991 |
-
return result;
|
2992 |
-
}
|
2993 |
-
function findStartAndEnd(points, count, loop, spanGaps) {
|
2994 |
-
let start = 0;
|
2995 |
-
let end = count - 1;
|
2996 |
-
if (loop && !spanGaps) {
|
2997 |
-
while (start < count && !points[start].skip) {
|
2998 |
-
start++;
|
2999 |
-
}
|
3000 |
-
}
|
3001 |
-
while (start < count && points[start].skip) {
|
3002 |
-
start++;
|
3003 |
-
}
|
3004 |
-
start %= count;
|
3005 |
-
if (loop) {
|
3006 |
-
end += start;
|
3007 |
-
}
|
3008 |
-
while (end > start && points[end % count].skip) {
|
3009 |
-
end--;
|
3010 |
-
}
|
3011 |
-
end %= count;
|
3012 |
-
return {start, end};
|
3013 |
-
}
|
3014 |
-
function solidSegments(points, start, max, loop) {
|
3015 |
-
const count = points.length;
|
3016 |
-
const result = [];
|
3017 |
-
let last = start;
|
3018 |
-
let prev = points[start];
|
3019 |
-
let end;
|
3020 |
-
for (end = start + 1; end <= max; ++end) {
|
3021 |
-
const cur = points[end % count];
|
3022 |
-
if (cur.skip || cur.stop) {
|
3023 |
-
if (!prev.skip) {
|
3024 |
-
loop = false;
|
3025 |
-
result.push({start: start % count, end: (end - 1) % count, loop});
|
3026 |
-
start = last = cur.stop ? end : null;
|
3027 |
-
}
|
3028 |
-
} else {
|
3029 |
-
last = end;
|
3030 |
-
if (prev.skip) {
|
3031 |
-
start = end;
|
3032 |
-
}
|
3033 |
-
}
|
3034 |
-
prev = cur;
|
3035 |
-
}
|
3036 |
-
if (last !== null) {
|
3037 |
-
result.push({start: start % count, end: last % count, loop});
|
3038 |
-
}
|
3039 |
-
return result;
|
3040 |
-
}
|
3041 |
-
function _computeSegments(line, segmentOptions) {
|
3042 |
-
const points = line.points;
|
3043 |
-
const spanGaps = line.options.spanGaps;
|
3044 |
-
const count = points.length;
|
3045 |
-
if (!count) {
|
3046 |
-
return [];
|
3047 |
-
}
|
3048 |
-
const loop = !!line._loop;
|
3049 |
-
const {start, end} = findStartAndEnd(points, count, loop, spanGaps);
|
3050 |
-
if (spanGaps === true) {
|
3051 |
-
return splitByStyles(line, [{start, end, loop}], points, segmentOptions);
|
3052 |
-
}
|
3053 |
-
const max = end < start ? end + count : end;
|
3054 |
-
const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;
|
3055 |
-
return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);
|
3056 |
-
}
|
3057 |
-
function splitByStyles(line, segments, points, segmentOptions) {
|
3058 |
-
if (!segmentOptions || !segmentOptions.setContext || !points) {
|
3059 |
-
return segments;
|
3060 |
-
}
|
3061 |
-
return doSplitByStyles(line, segments, points, segmentOptions);
|
3062 |
-
}
|
3063 |
-
function doSplitByStyles(line, segments, points, segmentOptions) {
|
3064 |
-
const chartContext = line._chart.getContext();
|
3065 |
-
const baseStyle = readStyle(line.options);
|
3066 |
-
const {_datasetIndex: datasetIndex, options: {spanGaps}} = line;
|
3067 |
-
const count = points.length;
|
3068 |
-
const result = [];
|
3069 |
-
let prevStyle = baseStyle;
|
3070 |
-
let start = segments[0].start;
|
3071 |
-
let i = start;
|
3072 |
-
function addStyle(s, e, l, st) {
|
3073 |
-
const dir = spanGaps ? -1 : 1;
|
3074 |
-
if (s === e) {
|
3075 |
-
return;
|
3076 |
-
}
|
3077 |
-
s += count;
|
3078 |
-
while (points[s % count].skip) {
|
3079 |
-
s -= dir;
|
3080 |
-
}
|
3081 |
-
while (points[e % count].skip) {
|
3082 |
-
e += dir;
|
3083 |
-
}
|
3084 |
-
if (s % count !== e % count) {
|
3085 |
-
result.push({start: s % count, end: e % count, loop: l, style: st});
|
3086 |
-
prevStyle = st;
|
3087 |
-
start = e % count;
|
3088 |
-
}
|
3089 |
-
}
|
3090 |
-
for (const segment of segments) {
|
3091 |
-
start = spanGaps ? start : segment.start;
|
3092 |
-
let prev = points[start % count];
|
3093 |
-
let style;
|
3094 |
-
for (i = start + 1; i <= segment.end; i++) {
|
3095 |
-
const pt = points[i % count];
|
3096 |
-
style = readStyle(segmentOptions.setContext(createContext(chartContext, {
|
3097 |
-
type: 'segment',
|
3098 |
-
p0: prev,
|
3099 |
-
p1: pt,
|
3100 |
-
p0DataIndex: (i - 1) % count,
|
3101 |
-
p1DataIndex: i % count,
|
3102 |
-
datasetIndex
|
3103 |
-
})));
|
3104 |
-
if (styleChanged(style, prevStyle)) {
|
3105 |
-
addStyle(start, i - 1, segment.loop, prevStyle);
|
3106 |
-
}
|
3107 |
-
prev = pt;
|
3108 |
-
prevStyle = style;
|
3109 |
-
}
|
3110 |
-
if (start < i - 1) {
|
3111 |
-
addStyle(start, i - 1, segment.loop, prevStyle);
|
3112 |
-
}
|
3113 |
-
}
|
3114 |
-
return result;
|
3115 |
-
}
|
3116 |
-
function readStyle(options) {
|
3117 |
-
return {
|
3118 |
-
backgroundColor: options.backgroundColor,
|
3119 |
-
borderCapStyle: options.borderCapStyle,
|
3120 |
-
borderDash: options.borderDash,
|
3121 |
-
borderDashOffset: options.borderDashOffset,
|
3122 |
-
borderJoinStyle: options.borderJoinStyle,
|
3123 |
-
borderWidth: options.borderWidth,
|
3124 |
-
borderColor: options.borderColor
|
3125 |
-
};
|
3126 |
-
}
|
3127 |
-
function styleChanged(style, prevStyle) {
|
3128 |
-
return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);
|
3129 |
-
}
|
3130 |
-
|
3131 |
-
var helpers = /*#__PURE__*/Object.freeze({
|
3132 |
-
__proto__: null,
|
3133 |
-
easingEffects: effects,
|
3134 |
-
color: color,
|
3135 |
-
getHoverColor: getHoverColor,
|
3136 |
-
noop: noop,
|
3137 |
-
uid: uid,
|
3138 |
-
isNullOrUndef: isNullOrUndef,
|
3139 |
-
isArray: isArray,
|
3140 |
-
isObject: isObject,
|
3141 |
-
isFinite: isNumberFinite,
|
3142 |
-
finiteOrDefault: finiteOrDefault,
|
3143 |
-
valueOrDefault: valueOrDefault,
|
3144 |
-
toPercentage: toPercentage,
|
3145 |
-
toDimension: toDimension,
|
3146 |
-
callback: callback,
|
3147 |
-
each: each,
|
3148 |
-
_elementsEqual: _elementsEqual,
|
3149 |
-
clone: clone,
|
3150 |
-
_merger: _merger,
|
3151 |
-
merge: merge,
|
3152 |
-
mergeIf: mergeIf,
|
3153 |
-
_mergerIf: _mergerIf,
|
3154 |
-
_deprecated: _deprecated,
|
3155 |
-
resolveObjectKey: resolveObjectKey,
|
3156 |
-
_capitalize: _capitalize,
|
3157 |
-
defined: defined,
|
3158 |
-
isFunction: isFunction,
|
3159 |
-
setsEqual: setsEqual,
|
3160 |
-
toFontString: toFontString,
|
3161 |
-
_measureText: _measureText,
|
3162 |
-
_longestText: _longestText,
|
3163 |
-
_alignPixel: _alignPixel,
|
3164 |
-
clearCanvas: clearCanvas,
|
3165 |
-
drawPoint: drawPoint,
|
3166 |
-
_isPointInArea: _isPointInArea,
|
3167 |
-
clipArea: clipArea,
|
3168 |
-
unclipArea: unclipArea,
|
3169 |
-
_steppedLineTo: _steppedLineTo,
|
3170 |
-
_bezierCurveTo: _bezierCurveTo,
|
3171 |
-
renderText: renderText,
|
3172 |
-
addRoundedRectPath: addRoundedRectPath,
|
3173 |
-
_lookup: _lookup,
|
3174 |
-
_lookupByKey: _lookupByKey,
|
3175 |
-
_rlookupByKey: _rlookupByKey,
|
3176 |
-
_filterBetween: _filterBetween,
|
3177 |
-
listenArrayEvents: listenArrayEvents,
|
3178 |
-
unlistenArrayEvents: unlistenArrayEvents,
|
3179 |
-
_arrayUnique: _arrayUnique,
|
3180 |
-
_createResolver: _createResolver,
|
3181 |
-
_attachContext: _attachContext,
|
3182 |
-
_descriptors: _descriptors,
|
3183 |
-
splineCurve: splineCurve,
|
3184 |
-
splineCurveMonotone: splineCurveMonotone,
|
3185 |
-
_updateBezierControlPoints: _updateBezierControlPoints,
|
3186 |
-
_isDomSupported: _isDomSupported,
|
3187 |
-
_getParentNode: _getParentNode,
|
3188 |
-
getStyle: getStyle,
|
3189 |
-
getRelativePosition: getRelativePosition$1,
|
3190 |
-
getMaximumSize: getMaximumSize,
|
3191 |
-
retinaScale: retinaScale,
|
3192 |
-
supportsEventListenerOptions: supportsEventListenerOptions,
|
3193 |
-
readUsedSize: readUsedSize,
|
3194 |
-
fontString: fontString,
|
3195 |
-
requestAnimFrame: requestAnimFrame,
|
3196 |
-
throttled: throttled,
|
3197 |
-
debounce: debounce,
|
3198 |
-
_toLeftRightCenter: _toLeftRightCenter,
|
3199 |
-
_alignStartEnd: _alignStartEnd,
|
3200 |
-
_textX: _textX,
|
3201 |
-
_pointInLine: _pointInLine,
|
3202 |
-
_steppedInterpolation: _steppedInterpolation,
|
3203 |
-
_bezierInterpolation: _bezierInterpolation,
|
3204 |
-
formatNumber: formatNumber,
|
3205 |
-
toLineHeight: toLineHeight,
|
3206 |
-
_readValueToProps: _readValueToProps,
|
3207 |
-
toTRBL: toTRBL,
|
3208 |
-
toTRBLCorners: toTRBLCorners,
|
3209 |
-
toPadding: toPadding,
|
3210 |
-
toFont: toFont,
|
3211 |
-
resolve: resolve,
|
3212 |
-
_addGrace: _addGrace,
|
3213 |
-
createContext: createContext,
|
3214 |
-
PI: PI,
|
3215 |
-
TAU: TAU,
|
3216 |
-
PITAU: PITAU,
|
3217 |
-
INFINITY: INFINITY,
|
3218 |
-
RAD_PER_DEG: RAD_PER_DEG,
|
3219 |
-
HALF_PI: HALF_PI,
|
3220 |
-
QUARTER_PI: QUARTER_PI,
|
3221 |
-
TWO_THIRDS_PI: TWO_THIRDS_PI,
|
3222 |
-
log10: log10,
|
3223 |
-
sign: sign,
|
3224 |
-
niceNum: niceNum,
|
3225 |
-
_factorize: _factorize,
|
3226 |
-
isNumber: isNumber,
|
3227 |
-
almostEquals: almostEquals,
|
3228 |
-
almostWhole: almostWhole,
|
3229 |
-
_setMinAndMaxByKey: _setMinAndMaxByKey,
|
3230 |
-
toRadians: toRadians,
|
3231 |
-
toDegrees: toDegrees,
|
3232 |
-
_decimalPlaces: _decimalPlaces,
|
3233 |
-
getAngleFromPoint: getAngleFromPoint,
|
3234 |
-
distanceBetweenPoints: distanceBetweenPoints,
|
3235 |
-
_angleDiff: _angleDiff,
|
3236 |
-
_normalizeAngle: _normalizeAngle,
|
3237 |
-
_angleBetween: _angleBetween,
|
3238 |
-
_limitValue: _limitValue,
|
3239 |
-
_int16Range: _int16Range,
|
3240 |
-
_isBetween: _isBetween,
|
3241 |
-
getRtlAdapter: getRtlAdapter,
|
3242 |
-
overrideTextDirection: overrideTextDirection,
|
3243 |
-
restoreTextDirection: restoreTextDirection,
|
3244 |
-
_boundSegment: _boundSegment,
|
3245 |
-
_boundSegments: _boundSegments,
|
3246 |
-
_computeSegments: _computeSegments
|
3247 |
-
});
|
3248 |
-
|
3249 |
-
class BasePlatform {
|
3250 |
-
acquireContext(canvas, aspectRatio) {}
|
3251 |
-
releaseContext(context) {
|
3252 |
-
return false;
|
3253 |
-
}
|
3254 |
-
addEventListener(chart, type, listener) {}
|
3255 |
-
removeEventListener(chart, type, listener) {}
|
3256 |
-
getDevicePixelRatio() {
|
3257 |
-
return 1;
|
3258 |
-
}
|
3259 |
-
getMaximumSize(element, width, height, aspectRatio) {
|
3260 |
-
width = Math.max(0, width || element.width);
|
3261 |
-
height = height || element.height;
|
3262 |
-
return {
|
3263 |
-
width,
|
3264 |
-
height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)
|
3265 |
-
};
|
3266 |
-
}
|
3267 |
-
isAttached(canvas) {
|
3268 |
-
return true;
|
3269 |
-
}
|
3270 |
-
updateConfig(config) {
|
3271 |
-
}
|
3272 |
-
}
|
3273 |
-
|
3274 |
-
class BasicPlatform extends BasePlatform {
|
3275 |
-
acquireContext(item) {
|
3276 |
-
return item && item.getContext && item.getContext('2d') || null;
|
3277 |
-
}
|
3278 |
-
updateConfig(config) {
|
3279 |
-
config.options.animation = false;
|
3280 |
-
}
|
3281 |
-
}
|
3282 |
-
|
3283 |
-
const EXPANDO_KEY = '$chartjs';
|
3284 |
-
const EVENT_TYPES = {
|
3285 |
-
touchstart: 'mousedown',
|
3286 |
-
touchmove: 'mousemove',
|
3287 |
-
touchend: 'mouseup',
|
3288 |
-
pointerenter: 'mouseenter',
|
3289 |
-
pointerdown: 'mousedown',
|
3290 |
-
pointermove: 'mousemove',
|
3291 |
-
pointerup: 'mouseup',
|
3292 |
-
pointerleave: 'mouseout',
|
3293 |
-
pointerout: 'mouseout'
|
3294 |
-
};
|
3295 |
-
const isNullOrEmpty = value => value === null || value === '';
|
3296 |
-
function initCanvas(canvas, aspectRatio) {
|
3297 |
-
const style = canvas.style;
|
3298 |
-
const renderHeight = canvas.getAttribute('height');
|
3299 |
-
const renderWidth = canvas.getAttribute('width');
|
3300 |
-
canvas[EXPANDO_KEY] = {
|
3301 |
-
initial: {
|
3302 |
-
height: renderHeight,
|
3303 |
-
width: renderWidth,
|
3304 |
-
style: {
|
3305 |
-
display: style.display,
|
3306 |
-
height: style.height,
|
3307 |
-
width: style.width
|
3308 |
-
}
|
3309 |
-
}
|
3310 |
-
};
|
3311 |
-
style.display = style.display || 'block';
|
3312 |
-
style.boxSizing = style.boxSizing || 'border-box';
|
3313 |
-
if (isNullOrEmpty(renderWidth)) {
|
3314 |
-
const displayWidth = readUsedSize(canvas, 'width');
|
3315 |
-
if (displayWidth !== undefined) {
|
3316 |
-
canvas.width = displayWidth;
|
3317 |
-
}
|
3318 |
-
}
|
3319 |
-
if (isNullOrEmpty(renderHeight)) {
|
3320 |
-
if (canvas.style.height === '') {
|
3321 |
-
canvas.height = canvas.width / (aspectRatio || 2);
|
3322 |
-
} else {
|
3323 |
-
const displayHeight = readUsedSize(canvas, 'height');
|
3324 |
-
if (displayHeight !== undefined) {
|
3325 |
-
canvas.height = displayHeight;
|
3326 |
-
}
|
3327 |
-
}
|
3328 |
-
}
|
3329 |
-
return canvas;
|
3330 |
-
}
|
3331 |
-
const eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;
|
3332 |
-
function addListener(node, type, listener) {
|
3333 |
-
node.addEventListener(type, listener, eventListenerOptions);
|
3334 |
-
}
|
3335 |
-
function removeListener(chart, type, listener) {
|
3336 |
-
chart.canvas.removeEventListener(type, listener, eventListenerOptions);
|
3337 |
-
}
|
3338 |
-
function fromNativeEvent(event, chart) {
|
3339 |
-
const type = EVENT_TYPES[event.type] || event.type;
|
3340 |
-
const {x, y} = getRelativePosition$1(event, chart);
|
3341 |
-
return {
|
3342 |
-
type,
|
3343 |
-
chart,
|
3344 |
-
native: event,
|
3345 |
-
x: x !== undefined ? x : null,
|
3346 |
-
y: y !== undefined ? y : null,
|
3347 |
-
};
|
3348 |
-
}
|
3349 |
-
function nodeListContains(nodeList, canvas) {
|
3350 |
-
for (const node of nodeList) {
|
3351 |
-
if (node === canvas || node.contains(canvas)) {
|
3352 |
-
return true;
|
3353 |
-
}
|
3354 |
-
}
|
3355 |
-
}
|
3356 |
-
function createAttachObserver(chart, type, listener) {
|
3357 |
-
const canvas = chart.canvas;
|
3358 |
-
const observer = new MutationObserver(entries => {
|
3359 |
-
let trigger = false;
|
3360 |
-
for (const entry of entries) {
|
3361 |
-
trigger = trigger || nodeListContains(entry.addedNodes, canvas);
|
3362 |
-
trigger = trigger && !nodeListContains(entry.removedNodes, canvas);
|
3363 |
-
}
|
3364 |
-
if (trigger) {
|
3365 |
-
listener();
|
3366 |
-
}
|
3367 |
-
});
|
3368 |
-
observer.observe(document, {childList: true, subtree: true});
|
3369 |
-
return observer;
|
3370 |
-
}
|
3371 |
-
function createDetachObserver(chart, type, listener) {
|
3372 |
-
const canvas = chart.canvas;
|
3373 |
-
const observer = new MutationObserver(entries => {
|
3374 |
-
let trigger = false;
|
3375 |
-
for (const entry of entries) {
|
3376 |
-
trigger = trigger || nodeListContains(entry.removedNodes, canvas);
|
3377 |
-
trigger = trigger && !nodeListContains(entry.addedNodes, canvas);
|
3378 |
-
}
|
3379 |
-
if (trigger) {
|
3380 |
-
listener();
|
3381 |
-
}
|
3382 |
-
});
|
3383 |
-
observer.observe(document, {childList: true, subtree: true});
|
3384 |
-
return observer;
|
3385 |
-
}
|
3386 |
-
const drpListeningCharts = new Map();
|
3387 |
-
let oldDevicePixelRatio = 0;
|
3388 |
-
function onWindowResize() {
|
3389 |
-
const dpr = window.devicePixelRatio;
|
3390 |
-
if (dpr === oldDevicePixelRatio) {
|
3391 |
-
return;
|
3392 |
-
}
|
3393 |
-
oldDevicePixelRatio = dpr;
|
3394 |
-
drpListeningCharts.forEach((resize, chart) => {
|
3395 |
-
if (chart.currentDevicePixelRatio !== dpr) {
|
3396 |
-
resize();
|
3397 |
-
}
|
3398 |
-
});
|
3399 |
-
}
|
3400 |
-
function listenDevicePixelRatioChanges(chart, resize) {
|
3401 |
-
if (!drpListeningCharts.size) {
|
3402 |
-
window.addEventListener('resize', onWindowResize);
|
3403 |
-
}
|
3404 |
-
drpListeningCharts.set(chart, resize);
|
3405 |
-
}
|
3406 |
-
function unlistenDevicePixelRatioChanges(chart) {
|
3407 |
-
drpListeningCharts.delete(chart);
|
3408 |
-
if (!drpListeningCharts.size) {
|
3409 |
-
window.removeEventListener('resize', onWindowResize);
|
3410 |
-
}
|
3411 |
-
}
|
3412 |
-
function createResizeObserver(chart, type, listener) {
|
3413 |
-
const canvas = chart.canvas;
|
3414 |
-
const container = canvas && _getParentNode(canvas);
|
3415 |
-
if (!container) {
|
3416 |
-
return;
|
3417 |
-
}
|
3418 |
-
const resize = throttled((width, height) => {
|
3419 |
-
const w = container.clientWidth;
|
3420 |
-
listener(width, height);
|
3421 |
-
if (w < container.clientWidth) {
|
3422 |
-
listener();
|
3423 |
-
}
|
3424 |
-
}, window);
|
3425 |
-
const observer = new ResizeObserver(entries => {
|
3426 |
-
const entry = entries[0];
|
3427 |
-
const width = entry.contentRect.width;
|
3428 |
-
const height = entry.contentRect.height;
|
3429 |
-
if (width === 0 && height === 0) {
|
3430 |
-
return;
|
3431 |
-
}
|
3432 |
-
resize(width, height);
|
3433 |
-
});
|
3434 |
-
observer.observe(container);
|
3435 |
-
listenDevicePixelRatioChanges(chart, resize);
|
3436 |
-
return observer;
|
3437 |
-
}
|
3438 |
-
function releaseObserver(chart, type, observer) {
|
3439 |
-
if (observer) {
|
3440 |
-
observer.disconnect();
|
3441 |
-
}
|
3442 |
-
if (type === 'resize') {
|
3443 |
-
unlistenDevicePixelRatioChanges(chart);
|
3444 |
-
}
|
3445 |
-
}
|
3446 |
-
function createProxyAndListen(chart, type, listener) {
|
3447 |
-
const canvas = chart.canvas;
|
3448 |
-
const proxy = throttled((event) => {
|
3449 |
-
if (chart.ctx !== null) {
|
3450 |
-
listener(fromNativeEvent(event, chart));
|
3451 |
-
}
|
3452 |
-
}, chart, (args) => {
|
3453 |
-
const event = args[0];
|
3454 |
-
return [event, event.offsetX, event.offsetY];
|
3455 |
-
});
|
3456 |
-
addListener(canvas, type, proxy);
|
3457 |
-
return proxy;
|
3458 |
-
}
|
3459 |
-
class DomPlatform extends BasePlatform {
|
3460 |
-
acquireContext(canvas, aspectRatio) {
|
3461 |
-
const context = canvas && canvas.getContext && canvas.getContext('2d');
|
3462 |
-
if (context && context.canvas === canvas) {
|
3463 |
-
initCanvas(canvas, aspectRatio);
|
3464 |
-
return context;
|
3465 |
-
}
|
3466 |
-
return null;
|
3467 |
-
}
|
3468 |
-
releaseContext(context) {
|
3469 |
-
const canvas = context.canvas;
|
3470 |
-
if (!canvas[EXPANDO_KEY]) {
|
3471 |
-
return false;
|
3472 |
-
}
|
3473 |
-
const initial = canvas[EXPANDO_KEY].initial;
|
3474 |
-
['height', 'width'].forEach((prop) => {
|
3475 |
-
const value = initial[prop];
|
3476 |
-
if (isNullOrUndef(value)) {
|
3477 |
-
canvas.removeAttribute(prop);
|
3478 |
-
} else {
|
3479 |
-
canvas.setAttribute(prop, value);
|
3480 |
-
}
|
3481 |
-
});
|
3482 |
-
const style = initial.style || {};
|
3483 |
-
Object.keys(style).forEach((key) => {
|
3484 |
-
canvas.style[key] = style[key];
|
3485 |
-
});
|
3486 |
-
canvas.width = canvas.width;
|
3487 |
-
delete canvas[EXPANDO_KEY];
|
3488 |
-
return true;
|
3489 |
-
}
|
3490 |
-
addEventListener(chart, type, listener) {
|
3491 |
-
this.removeEventListener(chart, type);
|
3492 |
-
const proxies = chart.$proxies || (chart.$proxies = {});
|
3493 |
-
const handlers = {
|
3494 |
-
attach: createAttachObserver,
|
3495 |
-
detach: createDetachObserver,
|
3496 |
-
resize: createResizeObserver
|
3497 |
-
};
|
3498 |
-
const handler = handlers[type] || createProxyAndListen;
|
3499 |
-
proxies[type] = handler(chart, type, listener);
|
3500 |
-
}
|
3501 |
-
removeEventListener(chart, type) {
|
3502 |
-
const proxies = chart.$proxies || (chart.$proxies = {});
|
3503 |
-
const proxy = proxies[type];
|
3504 |
-
if (!proxy) {
|
3505 |
-
return;
|
3506 |
-
}
|
3507 |
-
const handlers = {
|
3508 |
-
attach: releaseObserver,
|
3509 |
-
detach: releaseObserver,
|
3510 |
-
resize: releaseObserver
|
3511 |
-
};
|
3512 |
-
const handler = handlers[type] || removeListener;
|
3513 |
-
handler(chart, type, proxy);
|
3514 |
-
proxies[type] = undefined;
|
3515 |
-
}
|
3516 |
-
getDevicePixelRatio() {
|
3517 |
-
return window.devicePixelRatio;
|
3518 |
-
}
|
3519 |
-
getMaximumSize(canvas, width, height, aspectRatio) {
|
3520 |
-
return getMaximumSize(canvas, width, height, aspectRatio);
|
3521 |
-
}
|
3522 |
-
isAttached(canvas) {
|
3523 |
-
const container = _getParentNode(canvas);
|
3524 |
-
return !!(container && container.isConnected);
|
3525 |
-
}
|
3526 |
-
}
|
3527 |
-
|
3528 |
-
function _detectPlatform(canvas) {
|
3529 |
-
if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) {
|
3530 |
-
return BasicPlatform;
|
3531 |
-
}
|
3532 |
-
return DomPlatform;
|
3533 |
-
}
|
3534 |
-
|
3535 |
-
var platforms = /*#__PURE__*/Object.freeze({
|
3536 |
-
__proto__: null,
|
3537 |
-
_detectPlatform: _detectPlatform,
|
3538 |
-
BasePlatform: BasePlatform,
|
3539 |
-
BasicPlatform: BasicPlatform,
|
3540 |
-
DomPlatform: DomPlatform
|
3541 |
-
});
|
3542 |
-
|
3543 |
-
const transparent = 'transparent';
|
3544 |
-
const interpolators = {
|
3545 |
-
boolean(from, to, factor) {
|
3546 |
-
return factor > 0.5 ? to : from;
|
3547 |
-
},
|
3548 |
-
color(from, to, factor) {
|
3549 |
-
const c0 = color(from || transparent);
|
3550 |
-
const c1 = c0.valid && color(to || transparent);
|
3551 |
-
return c1 && c1.valid
|
3552 |
-
? c1.mix(c0, factor).hexString()
|
3553 |
-
: to;
|
3554 |
-
},
|
3555 |
-
number(from, to, factor) {
|
3556 |
-
return from + (to - from) * factor;
|
3557 |
-
}
|
3558 |
-
};
|
3559 |
-
class Animation {
|
3560 |
-
constructor(cfg, target, prop, to) {
|
3561 |
-
const currentValue = target[prop];
|
3562 |
-
to = resolve([cfg.to, to, currentValue, cfg.from]);
|
3563 |
-
const from = resolve([cfg.from, currentValue, to]);
|
3564 |
-
this._active = true;
|
3565 |
-
this._fn = cfg.fn || interpolators[cfg.type || typeof from];
|
3566 |
-
this._easing = effects[cfg.easing] || effects.linear;
|
3567 |
-
this._start = Math.floor(Date.now() + (cfg.delay || 0));
|
3568 |
-
this._duration = this._total = Math.floor(cfg.duration);
|
3569 |
-
this._loop = !!cfg.loop;
|
3570 |
-
this._target = target;
|
3571 |
-
this._prop = prop;
|
3572 |
-
this._from = from;
|
3573 |
-
this._to = to;
|
3574 |
-
this._promises = undefined;
|
3575 |
-
}
|
3576 |
-
active() {
|
3577 |
-
return this._active;
|
3578 |
-
}
|
3579 |
-
update(cfg, to, date) {
|
3580 |
-
if (this._active) {
|
3581 |
-
this._notify(false);
|
3582 |
-
const currentValue = this._target[this._prop];
|
3583 |
-
const elapsed = date - this._start;
|
3584 |
-
const remain = this._duration - elapsed;
|
3585 |
-
this._start = date;
|
3586 |
-
this._duration = Math.floor(Math.max(remain, cfg.duration));
|
3587 |
-
this._total += elapsed;
|
3588 |
-
this._loop = !!cfg.loop;
|
3589 |
-
this._to = resolve([cfg.to, to, currentValue, cfg.from]);
|
3590 |
-
this._from = resolve([cfg.from, currentValue, to]);
|
3591 |
-
}
|
3592 |
-
}
|
3593 |
-
cancel() {
|
3594 |
-
if (this._active) {
|
3595 |
-
this.tick(Date.now());
|
3596 |
-
this._active = false;
|
3597 |
-
this._notify(false);
|
3598 |
-
}
|
3599 |
-
}
|
3600 |
-
tick(date) {
|
3601 |
-
const elapsed = date - this._start;
|
3602 |
-
const duration = this._duration;
|
3603 |
-
const prop = this._prop;
|
3604 |
-
const from = this._from;
|
3605 |
-
const loop = this._loop;
|
3606 |
-
const to = this._to;
|
3607 |
-
let factor;
|
3608 |
-
this._active = from !== to && (loop || (elapsed < duration));
|
3609 |
-
if (!this._active) {
|
3610 |
-
this._target[prop] = to;
|
3611 |
-
this._notify(true);
|
3612 |
-
return;
|
3613 |
-
}
|
3614 |
-
if (elapsed < 0) {
|
3615 |
-
this._target[prop] = from;
|
3616 |
-
return;
|
3617 |
-
}
|
3618 |
-
factor = (elapsed / duration) % 2;
|
3619 |
-
factor = loop && factor > 1 ? 2 - factor : factor;
|
3620 |
-
factor = this._easing(Math.min(1, Math.max(0, factor)));
|
3621 |
-
this._target[prop] = this._fn(from, to, factor);
|
3622 |
-
}
|
3623 |
-
wait() {
|
3624 |
-
const promises = this._promises || (this._promises = []);
|
3625 |
-
return new Promise((res, rej) => {
|
3626 |
-
promises.push({res, rej});
|
3627 |
-
});
|
3628 |
-
}
|
3629 |
-
_notify(resolved) {
|
3630 |
-
const method = resolved ? 'res' : 'rej';
|
3631 |
-
const promises = this._promises || [];
|
3632 |
-
for (let i = 0; i < promises.length; i++) {
|
3633 |
-
promises[i][method]();
|
3634 |
-
}
|
3635 |
-
}
|
3636 |
-
}
|
3637 |
-
|
3638 |
-
const numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];
|
3639 |
-
const colors = ['color', 'borderColor', 'backgroundColor'];
|
3640 |
-
defaults.set('animation', {
|
3641 |
-
delay: undefined,
|
3642 |
-
duration: 1000,
|
3643 |
-
easing: 'easeOutQuart',
|
3644 |
-
fn: undefined,
|
3645 |
-
from: undefined,
|
3646 |
-
loop: undefined,
|
3647 |
-
to: undefined,
|
3648 |
-
type: undefined,
|
3649 |
-
});
|
3650 |
-
const animationOptions = Object.keys(defaults.animation);
|
3651 |
-
defaults.describe('animation', {
|
3652 |
-
_fallback: false,
|
3653 |
-
_indexable: false,
|
3654 |
-
_scriptable: (name) => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn',
|
3655 |
-
});
|
3656 |
-
defaults.set('animations', {
|
3657 |
-
colors: {
|
3658 |
-
type: 'color',
|
3659 |
-
properties: colors
|
3660 |
-
},
|
3661 |
-
numbers: {
|
3662 |
-
type: 'number',
|
3663 |
-
properties: numbers
|
3664 |
-
},
|
3665 |
-
});
|
3666 |
-
defaults.describe('animations', {
|
3667 |
-
_fallback: 'animation',
|
3668 |
-
});
|
3669 |
-
defaults.set('transitions', {
|
3670 |
-
active: {
|
3671 |
-
animation: {
|
3672 |
-
duration: 400
|
3673 |
-
}
|
3674 |
-
},
|
3675 |
-
resize: {
|
3676 |
-
animation: {
|
3677 |
-
duration: 0
|
3678 |
-
}
|
3679 |
-
},
|
3680 |
-
show: {
|
3681 |
-
animations: {
|
3682 |
-
colors: {
|
3683 |
-
from: 'transparent'
|
3684 |
-
},
|
3685 |
-
visible: {
|
3686 |
-
type: 'boolean',
|
3687 |
-
duration: 0
|
3688 |
-
},
|
3689 |
-
}
|
3690 |
-
},
|
3691 |
-
hide: {
|
3692 |
-
animations: {
|
3693 |
-
colors: {
|
3694 |
-
to: 'transparent'
|
3695 |
-
},
|
3696 |
-
visible: {
|
3697 |
-
type: 'boolean',
|
3698 |
-
easing: 'linear',
|
3699 |
-
fn: v => v | 0
|
3700 |
-
},
|
3701 |
-
}
|
3702 |
-
}
|
3703 |
-
});
|
3704 |
-
class Animations {
|
3705 |
-
constructor(chart, config) {
|
3706 |
-
this._chart = chart;
|
3707 |
-
this._properties = new Map();
|
3708 |
-
this.configure(config);
|
3709 |
-
}
|
3710 |
-
configure(config) {
|
3711 |
-
if (!isObject(config)) {
|
3712 |
-
return;
|
3713 |
-
}
|
3714 |
-
const animatedProps = this._properties;
|
3715 |
-
Object.getOwnPropertyNames(config).forEach(key => {
|
3716 |
-
const cfg = config[key];
|
3717 |
-
if (!isObject(cfg)) {
|
3718 |
-
return;
|
3719 |
-
}
|
3720 |
-
const resolved = {};
|
3721 |
-
for (const option of animationOptions) {
|
3722 |
-
resolved[option] = cfg[option];
|
3723 |
-
}
|
3724 |
-
(isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => {
|
3725 |
-
if (prop === key || !animatedProps.has(prop)) {
|
3726 |
-
animatedProps.set(prop, resolved);
|
3727 |
-
}
|
3728 |
-
});
|
3729 |
-
});
|
3730 |
-
}
|
3731 |
-
_animateOptions(target, values) {
|
3732 |
-
const newOptions = values.options;
|
3733 |
-
const options = resolveTargetOptions(target, newOptions);
|
3734 |
-
if (!options) {
|
3735 |
-
return [];
|
3736 |
-
}
|
3737 |
-
const animations = this._createAnimations(options, newOptions);
|
3738 |
-
if (newOptions.$shared) {
|
3739 |
-
awaitAll(target.options.$animations, newOptions).then(() => {
|
3740 |
-
target.options = newOptions;
|
3741 |
-
}, () => {
|
3742 |
-
});
|
3743 |
-
}
|
3744 |
-
return animations;
|
3745 |
-
}
|
3746 |
-
_createAnimations(target, values) {
|
3747 |
-
const animatedProps = this._properties;
|
3748 |
-
const animations = [];
|
3749 |
-
const running = target.$animations || (target.$animations = {});
|
3750 |
-
const props = Object.keys(values);
|
3751 |
-
const date = Date.now();
|
3752 |
-
let i;
|
3753 |
-
for (i = props.length - 1; i >= 0; --i) {
|
3754 |
-
const prop = props[i];
|
3755 |
-
if (prop.charAt(0) === '$') {
|
3756 |
-
continue;
|
3757 |
-
}
|
3758 |
-
if (prop === 'options') {
|
3759 |
-
animations.push(...this._animateOptions(target, values));
|
3760 |
-
continue;
|
3761 |
-
}
|
3762 |
-
const value = values[prop];
|
3763 |
-
let animation = running[prop];
|
3764 |
-
const cfg = animatedProps.get(prop);
|
3765 |
-
if (animation) {
|
3766 |
-
if (cfg && animation.active()) {
|
3767 |
-
animation.update(cfg, value, date);
|
3768 |
-
continue;
|
3769 |
-
} else {
|
3770 |
-
animation.cancel();
|
3771 |
-
}
|
3772 |
-
}
|
3773 |
-
if (!cfg || !cfg.duration) {
|
3774 |
-
target[prop] = value;
|
3775 |
-
continue;
|
3776 |
-
}
|
3777 |
-
running[prop] = animation = new Animation(cfg, target, prop, value);
|
3778 |
-
animations.push(animation);
|
3779 |
-
}
|
3780 |
-
return animations;
|
3781 |
-
}
|
3782 |
-
update(target, values) {
|
3783 |
-
if (this._properties.size === 0) {
|
3784 |
-
Object.assign(target, values);
|
3785 |
-
return;
|
3786 |
-
}
|
3787 |
-
const animations = this._createAnimations(target, values);
|
3788 |
-
if (animations.length) {
|
3789 |
-
animator.add(this._chart, animations);
|
3790 |
-
return true;
|
3791 |
-
}
|
3792 |
-
}
|
3793 |
-
}
|
3794 |
-
function awaitAll(animations, properties) {
|
3795 |
-
const running = [];
|
3796 |
-
const keys = Object.keys(properties);
|
3797 |
-
for (let i = 0; i < keys.length; i++) {
|
3798 |
-
const anim = animations[keys[i]];
|
3799 |
-
if (anim && anim.active()) {
|
3800 |
-
running.push(anim.wait());
|
3801 |
-
}
|
3802 |
-
}
|
3803 |
-
return Promise.all(running);
|
3804 |
-
}
|
3805 |
-
function resolveTargetOptions(target, newOptions) {
|
3806 |
-
if (!newOptions) {
|
3807 |
-
return;
|
3808 |
-
}
|
3809 |
-
let options = target.options;
|
3810 |
-
if (!options) {
|
3811 |
-
target.options = newOptions;
|
3812 |
-
return;
|
3813 |
-
}
|
3814 |
-
if (options.$shared) {
|
3815 |
-
target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});
|
3816 |
-
}
|
3817 |
-
return options;
|
3818 |
-
}
|
3819 |
-
|
3820 |
-
function scaleClip(scale, allowedOverflow) {
|
3821 |
-
const opts = scale && scale.options || {};
|
3822 |
-
const reverse = opts.reverse;
|
3823 |
-
const min = opts.min === undefined ? allowedOverflow : 0;
|
3824 |
-
const max = opts.max === undefined ? allowedOverflow : 0;
|
3825 |
-
return {
|
3826 |
-
start: reverse ? max : min,
|
3827 |
-
end: reverse ? min : max
|
3828 |
-
};
|
3829 |
-
}
|
3830 |
-
function defaultClip(xScale, yScale, allowedOverflow) {
|
3831 |
-
if (allowedOverflow === false) {
|
3832 |
-
return false;
|
3833 |
-
}
|
3834 |
-
const x = scaleClip(xScale, allowedOverflow);
|
3835 |
-
const y = scaleClip(yScale, allowedOverflow);
|
3836 |
-
return {
|
3837 |
-
top: y.end,
|
3838 |
-
right: x.end,
|
3839 |
-
bottom: y.start,
|
3840 |
-
left: x.start
|
3841 |
-
};
|
3842 |
-
}
|
3843 |
-
function toClip(value) {
|
3844 |
-
let t, r, b, l;
|
3845 |
-
if (isObject(value)) {
|
3846 |
-
t = value.top;
|
3847 |
-
r = value.right;
|
3848 |
-
b = value.bottom;
|
3849 |
-
l = value.left;
|
3850 |
-
} else {
|
3851 |
-
t = r = b = l = value;
|
3852 |
-
}
|
3853 |
-
return {
|
3854 |
-
top: t,
|
3855 |
-
right: r,
|
3856 |
-
bottom: b,
|
3857 |
-
left: l,
|
3858 |
-
disabled: value === false
|
3859 |
-
};
|
3860 |
-
}
|
3861 |
-
function getSortedDatasetIndices(chart, filterVisible) {
|
3862 |
-
const keys = [];
|
3863 |
-
const metasets = chart._getSortedDatasetMetas(filterVisible);
|
3864 |
-
let i, ilen;
|
3865 |
-
for (i = 0, ilen = metasets.length; i < ilen; ++i) {
|
3866 |
-
keys.push(metasets[i].index);
|
3867 |
-
}
|
3868 |
-
return keys;
|
3869 |
-
}
|
3870 |
-
function applyStack(stack, value, dsIndex, options = {}) {
|
3871 |
-
const keys = stack.keys;
|
3872 |
-
const singleMode = options.mode === 'single';
|
3873 |
-
let i, ilen, datasetIndex, otherValue;
|
3874 |
-
if (value === null) {
|
3875 |
-
return;
|
3876 |
-
}
|
3877 |
-
for (i = 0, ilen = keys.length; i < ilen; ++i) {
|
3878 |
-
datasetIndex = +keys[i];
|
3879 |
-
if (datasetIndex === dsIndex) {
|
3880 |
-
if (options.all) {
|
3881 |
-
continue;
|
3882 |
-
}
|
3883 |
-
break;
|
3884 |
-
}
|
3885 |
-
otherValue = stack.values[datasetIndex];
|
3886 |
-
if (isNumberFinite(otherValue) && (singleMode || (value === 0 || sign(value) === sign(otherValue)))) {
|
3887 |
-
value += otherValue;
|
3888 |
-
}
|
3889 |
-
}
|
3890 |
-
return value;
|
3891 |
-
}
|
3892 |
-
function convertObjectDataToArray(data) {
|
3893 |
-
const keys = Object.keys(data);
|
3894 |
-
const adata = new Array(keys.length);
|
3895 |
-
let i, ilen, key;
|
3896 |
-
for (i = 0, ilen = keys.length; i < ilen; ++i) {
|
3897 |
-
key = keys[i];
|
3898 |
-
adata[i] = {
|
3899 |
-
x: key,
|
3900 |
-
y: data[key]
|
3901 |
-
};
|
3902 |
-
}
|
3903 |
-
return adata;
|
3904 |
-
}
|
3905 |
-
function isStacked(scale, meta) {
|
3906 |
-
const stacked = scale && scale.options.stacked;
|
3907 |
-
return stacked || (stacked === undefined && meta.stack !== undefined);
|
3908 |
-
}
|
3909 |
-
function getStackKey(indexScale, valueScale, meta) {
|
3910 |
-
return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;
|
3911 |
-
}
|
3912 |
-
function getUserBounds(scale) {
|
3913 |
-
const {min, max, minDefined, maxDefined} = scale.getUserBounds();
|
3914 |
-
return {
|
3915 |
-
min: minDefined ? min : Number.NEGATIVE_INFINITY,
|
3916 |
-
max: maxDefined ? max : Number.POSITIVE_INFINITY
|
3917 |
-
};
|
3918 |
-
}
|
3919 |
-
function getOrCreateStack(stacks, stackKey, indexValue) {
|
3920 |
-
const subStack = stacks[stackKey] || (stacks[stackKey] = {});
|
3921 |
-
return subStack[indexValue] || (subStack[indexValue] = {});
|
3922 |
-
}
|
3923 |
-
function getLastIndexInStack(stack, vScale, positive, type) {
|
3924 |
-
for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {
|
3925 |
-
const value = stack[meta.index];
|
3926 |
-
if ((positive && value > 0) || (!positive && value < 0)) {
|
3927 |
-
return meta.index;
|
3928 |
-
}
|
3929 |
-
}
|
3930 |
-
return null;
|
3931 |
-
}
|
3932 |
-
function updateStacks(controller, parsed) {
|
3933 |
-
const {chart, _cachedMeta: meta} = controller;
|
3934 |
-
const stacks = chart._stacks || (chart._stacks = {});
|
3935 |
-
const {iScale, vScale, index: datasetIndex} = meta;
|
3936 |
-
const iAxis = iScale.axis;
|
3937 |
-
const vAxis = vScale.axis;
|
3938 |
-
const key = getStackKey(iScale, vScale, meta);
|
3939 |
-
const ilen = parsed.length;
|
3940 |
-
let stack;
|
3941 |
-
for (let i = 0; i < ilen; ++i) {
|
3942 |
-
const item = parsed[i];
|
3943 |
-
const {[iAxis]: index, [vAxis]: value} = item;
|
3944 |
-
const itemStacks = item._stacks || (item._stacks = {});
|
3945 |
-
stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);
|
3946 |
-
stack[datasetIndex] = value;
|
3947 |
-
stack._top = getLastIndexInStack(stack, vScale, true, meta.type);
|
3948 |
-
stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);
|
3949 |
-
}
|
3950 |
-
}
|
3951 |
-
function getFirstScaleId(chart, axis) {
|
3952 |
-
const scales = chart.scales;
|
3953 |
-
return Object.keys(scales).filter(key => scales[key].axis === axis).shift();
|
3954 |
-
}
|
3955 |
-
function createDatasetContext(parent, index) {
|
3956 |
-
return createContext(parent,
|
3957 |
-
{
|
3958 |
-
active: false,
|
3959 |
-
dataset: undefined,
|
3960 |
-
datasetIndex: index,
|
3961 |
-
index,
|
3962 |
-
mode: 'default',
|
3963 |
-
type: 'dataset'
|
3964 |
-
}
|
3965 |
-
);
|
3966 |
-
}
|
3967 |
-
function createDataContext(parent, index, element) {
|
3968 |
-
return createContext(parent, {
|
3969 |
-
active: false,
|
3970 |
-
dataIndex: index,
|
3971 |
-
parsed: undefined,
|
3972 |
-
raw: undefined,
|
3973 |
-
element,
|
3974 |
-
index,
|
3975 |
-
mode: 'default',
|
3976 |
-
type: 'data'
|
3977 |
-
});
|
3978 |
-
}
|
3979 |
-
function clearStacks(meta, items) {
|
3980 |
-
const datasetIndex = meta.controller.index;
|
3981 |
-
const axis = meta.vScale && meta.vScale.axis;
|
3982 |
-
if (!axis) {
|
3983 |
-
return;
|
3984 |
-
}
|
3985 |
-
items = items || meta._parsed;
|
3986 |
-
for (const parsed of items) {
|
3987 |
-
const stacks = parsed._stacks;
|
3988 |
-
if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {
|
3989 |
-
return;
|
3990 |
-
}
|
3991 |
-
delete stacks[axis][datasetIndex];
|
3992 |
-
}
|
3993 |
-
}
|
3994 |
-
const isDirectUpdateMode = (mode) => mode === 'reset' || mode === 'none';
|
3995 |
-
const cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);
|
3996 |
-
const createStack = (canStack, meta, chart) => canStack && !meta.hidden && meta._stacked
|
3997 |
-
&& {keys: getSortedDatasetIndices(chart, true), values: null};
|
3998 |
-
class DatasetController {
|
3999 |
-
constructor(chart, datasetIndex) {
|
4000 |
-
this.chart = chart;
|
4001 |
-
this._ctx = chart.ctx;
|
4002 |
-
this.index = datasetIndex;
|
4003 |
-
this._cachedDataOpts = {};
|
4004 |
-
this._cachedMeta = this.getMeta();
|
4005 |
-
this._type = this._cachedMeta.type;
|
4006 |
-
this.options = undefined;
|
4007 |
-
this._parsing = false;
|
4008 |
-
this._data = undefined;
|
4009 |
-
this._objectData = undefined;
|
4010 |
-
this._sharedOptions = undefined;
|
4011 |
-
this._drawStart = undefined;
|
4012 |
-
this._drawCount = undefined;
|
4013 |
-
this.enableOptionSharing = false;
|
4014 |
-
this.$context = undefined;
|
4015 |
-
this._syncList = [];
|
4016 |
-
this.initialize();
|
4017 |
-
}
|
4018 |
-
initialize() {
|
4019 |
-
const meta = this._cachedMeta;
|
4020 |
-
this.configure();
|
4021 |
-
this.linkScales();
|
4022 |
-
meta._stacked = isStacked(meta.vScale, meta);
|
4023 |
-
this.addElements();
|
4024 |
-
}
|
4025 |
-
updateIndex(datasetIndex) {
|
4026 |
-
if (this.index !== datasetIndex) {
|
4027 |
-
clearStacks(this._cachedMeta);
|
4028 |
-
}
|
4029 |
-
this.index = datasetIndex;
|
4030 |
-
}
|
4031 |
-
linkScales() {
|
4032 |
-
const chart = this.chart;
|
4033 |
-
const meta = this._cachedMeta;
|
4034 |
-
const dataset = this.getDataset();
|
4035 |
-
const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;
|
4036 |
-
const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));
|
4037 |
-
const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));
|
4038 |
-
const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));
|
4039 |
-
const indexAxis = meta.indexAxis;
|
4040 |
-
const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);
|
4041 |
-
const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);
|
4042 |
-
meta.xScale = this.getScaleForId(xid);
|
4043 |
-
meta.yScale = this.getScaleForId(yid);
|
4044 |
-
meta.rScale = this.getScaleForId(rid);
|
4045 |
-
meta.iScale = this.getScaleForId(iid);
|
4046 |
-
meta.vScale = this.getScaleForId(vid);
|
4047 |
-
}
|
4048 |
-
getDataset() {
|
4049 |
-
return this.chart.data.datasets[this.index];
|
4050 |
-
}
|
4051 |
-
getMeta() {
|
4052 |
-
return this.chart.getDatasetMeta(this.index);
|
4053 |
-
}
|
4054 |
-
getScaleForId(scaleID) {
|
4055 |
-
return this.chart.scales[scaleID];
|
4056 |
-
}
|
4057 |
-
_getOtherScale(scale) {
|
4058 |
-
const meta = this._cachedMeta;
|
4059 |
-
return scale === meta.iScale
|
4060 |
-
? meta.vScale
|
4061 |
-
: meta.iScale;
|
4062 |
-
}
|
4063 |
-
reset() {
|
4064 |
-
this._update('reset');
|
4065 |
-
}
|
4066 |
-
_destroy() {
|
4067 |
-
const meta = this._cachedMeta;
|
4068 |
-
if (this._data) {
|
4069 |
-
unlistenArrayEvents(this._data, this);
|
4070 |
-
}
|
4071 |
-
if (meta._stacked) {
|
4072 |
-
clearStacks(meta);
|
4073 |
-
}
|
4074 |
-
}
|
4075 |
-
_dataCheck() {
|
4076 |
-
const dataset = this.getDataset();
|
4077 |
-
const data = dataset.data || (dataset.data = []);
|
4078 |
-
const _data = this._data;
|
4079 |
-
if (isObject(data)) {
|
4080 |
-
this._data = convertObjectDataToArray(data);
|
4081 |
-
} else if (_data !== data) {
|
4082 |
-
if (_data) {
|
4083 |
-
unlistenArrayEvents(_data, this);
|
4084 |
-
const meta = this._cachedMeta;
|
4085 |
-
clearStacks(meta);
|
4086 |
-
meta._parsed = [];
|
4087 |
-
}
|
4088 |
-
if (data && Object.isExtensible(data)) {
|
4089 |
-
listenArrayEvents(data, this);
|
4090 |
-
}
|
4091 |
-
this._syncList = [];
|
4092 |
-
this._data = data;
|
4093 |
-
}
|
4094 |
-
}
|
4095 |
-
addElements() {
|
4096 |
-
const meta = this._cachedMeta;
|
4097 |
-
this._dataCheck();
|
4098 |
-
if (this.datasetElementType) {
|
4099 |
-
meta.dataset = new this.datasetElementType();
|
4100 |
-
}
|
4101 |
-
}
|
4102 |
-
buildOrUpdateElements(resetNewElements) {
|
4103 |
-
const meta = this._cachedMeta;
|
4104 |
-
const dataset = this.getDataset();
|
4105 |
-
let stackChanged = false;
|
4106 |
-
this._dataCheck();
|
4107 |
-
const oldStacked = meta._stacked;
|
4108 |
-
meta._stacked = isStacked(meta.vScale, meta);
|
4109 |
-
if (meta.stack !== dataset.stack) {
|
4110 |
-
stackChanged = true;
|
4111 |
-
clearStacks(meta);
|
4112 |
-
meta.stack = dataset.stack;
|
4113 |
-
}
|
4114 |
-
this._resyncElements(resetNewElements);
|
4115 |
-
if (stackChanged || oldStacked !== meta._stacked) {
|
4116 |
-
updateStacks(this, meta._parsed);
|
4117 |
-
}
|
4118 |
-
}
|
4119 |
-
configure() {
|
4120 |
-
const config = this.chart.config;
|
4121 |
-
const scopeKeys = config.datasetScopeKeys(this._type);
|
4122 |
-
const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);
|
4123 |
-
this.options = config.createResolver(scopes, this.getContext());
|
4124 |
-
this._parsing = this.options.parsing;
|
4125 |
-
this._cachedDataOpts = {};
|
4126 |
-
}
|
4127 |
-
parse(start, count) {
|
4128 |
-
const {_cachedMeta: meta, _data: data} = this;
|
4129 |
-
const {iScale, _stacked} = meta;
|
4130 |
-
const iAxis = iScale.axis;
|
4131 |
-
let sorted = start === 0 && count === data.length ? true : meta._sorted;
|
4132 |
-
let prev = start > 0 && meta._parsed[start - 1];
|
4133 |
-
let i, cur, parsed;
|
4134 |
-
if (this._parsing === false) {
|
4135 |
-
meta._parsed = data;
|
4136 |
-
meta._sorted = true;
|
4137 |
-
parsed = data;
|
4138 |
-
} else {
|
4139 |
-
if (isArray(data[start])) {
|
4140 |
-
parsed = this.parseArrayData(meta, data, start, count);
|
4141 |
-
} else if (isObject(data[start])) {
|
4142 |
-
parsed = this.parseObjectData(meta, data, start, count);
|
4143 |
-
} else {
|
4144 |
-
parsed = this.parsePrimitiveData(meta, data, start, count);
|
4145 |
-
}
|
4146 |
-
const isNotInOrderComparedToPrev = () => cur[iAxis] === null || (prev && cur[iAxis] < prev[iAxis]);
|
4147 |
-
for (i = 0; i < count; ++i) {
|
4148 |
-
meta._parsed[i + start] = cur = parsed[i];
|
4149 |
-
if (sorted) {
|
4150 |
-
if (isNotInOrderComparedToPrev()) {
|
4151 |
-
sorted = false;
|
4152 |
-
}
|
4153 |
-
prev = cur;
|
4154 |
-
}
|
4155 |
-
}
|
4156 |
-
meta._sorted = sorted;
|
4157 |
-
}
|
4158 |
-
if (_stacked) {
|
4159 |
-
updateStacks(this, parsed);
|
4160 |
-
}
|
4161 |
-
}
|
4162 |
-
parsePrimitiveData(meta, data, start, count) {
|
4163 |
-
const {iScale, vScale} = meta;
|
4164 |
-
const iAxis = iScale.axis;
|
4165 |
-
const vAxis = vScale.axis;
|
4166 |
-
const labels = iScale.getLabels();
|
4167 |
-
const singleScale = iScale === vScale;
|
4168 |
-
const parsed = new Array(count);
|
4169 |
-
let i, ilen, index;
|
4170 |
-
for (i = 0, ilen = count; i < ilen; ++i) {
|
4171 |
-
index = i + start;
|
4172 |
-
parsed[i] = {
|
4173 |
-
[iAxis]: singleScale || iScale.parse(labels[index], index),
|
4174 |
-
[vAxis]: vScale.parse(data[index], index)
|
4175 |
-
};
|
4176 |
-
}
|
4177 |
-
return parsed;
|
4178 |
-
}
|
4179 |
-
parseArrayData(meta, data, start, count) {
|
4180 |
-
const {xScale, yScale} = meta;
|
4181 |
-
const parsed = new Array(count);
|
4182 |
-
let i, ilen, index, item;
|
4183 |
-
for (i = 0, ilen = count; i < ilen; ++i) {
|
4184 |
-
index = i + start;
|
4185 |
-
item = data[index];
|
4186 |
-
parsed[i] = {
|
4187 |
-
x: xScale.parse(item[0], index),
|
4188 |
-
y: yScale.parse(item[1], index)
|
4189 |
-
};
|
4190 |
-
}
|
4191 |
-
return parsed;
|
4192 |
-
}
|
4193 |
-
parseObjectData(meta, data, start, count) {
|
4194 |
-
const {xScale, yScale} = meta;
|
4195 |
-
const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
|
4196 |
-
const parsed = new Array(count);
|
4197 |
-
let i, ilen, index, item;
|
4198 |
-
for (i = 0, ilen = count; i < ilen; ++i) {
|
4199 |
-
index = i + start;
|
4200 |
-
item = data[index];
|
4201 |
-
parsed[i] = {
|
4202 |
-
x: xScale.parse(resolveObjectKey(item, xAxisKey), index),
|
4203 |
-
y: yScale.parse(resolveObjectKey(item, yAxisKey), index)
|
4204 |
-
};
|
4205 |
-
}
|
4206 |
-
return parsed;
|
4207 |
-
}
|
4208 |
-
getParsed(index) {
|
4209 |
-
return this._cachedMeta._parsed[index];
|
4210 |
-
}
|
4211 |
-
getDataElement(index) {
|
4212 |
-
return this._cachedMeta.data[index];
|
4213 |
-
}
|
4214 |
-
applyStack(scale, parsed, mode) {
|
4215 |
-
const chart = this.chart;
|
4216 |
-
const meta = this._cachedMeta;
|
4217 |
-
const value = parsed[scale.axis];
|
4218 |
-
const stack = {
|
4219 |
-
keys: getSortedDatasetIndices(chart, true),
|
4220 |
-
values: parsed._stacks[scale.axis]
|
4221 |
-
};
|
4222 |
-
return applyStack(stack, value, meta.index, {mode});
|
4223 |
-
}
|
4224 |
-
updateRangeFromParsed(range, scale, parsed, stack) {
|
4225 |
-
const parsedValue = parsed[scale.axis];
|
4226 |
-
let value = parsedValue === null ? NaN : parsedValue;
|
4227 |
-
const values = stack && parsed._stacks[scale.axis];
|
4228 |
-
if (stack && values) {
|
4229 |
-
stack.values = values;
|
4230 |
-
value = applyStack(stack, parsedValue, this._cachedMeta.index);
|
4231 |
-
}
|
4232 |
-
range.min = Math.min(range.min, value);
|
4233 |
-
range.max = Math.max(range.max, value);
|
4234 |
-
}
|
4235 |
-
getMinMax(scale, canStack) {
|
4236 |
-
const meta = this._cachedMeta;
|
4237 |
-
const _parsed = meta._parsed;
|
4238 |
-
const sorted = meta._sorted && scale === meta.iScale;
|
4239 |
-
const ilen = _parsed.length;
|
4240 |
-
const otherScale = this._getOtherScale(scale);
|
4241 |
-
const stack = createStack(canStack, meta, this.chart);
|
4242 |
-
const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};
|
4243 |
-
const {min: otherMin, max: otherMax} = getUserBounds(otherScale);
|
4244 |
-
let i, parsed;
|
4245 |
-
function _skip() {
|
4246 |
-
parsed = _parsed[i];
|
4247 |
-
const otherValue = parsed[otherScale.axis];
|
4248 |
-
return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;
|
4249 |
-
}
|
4250 |
-
for (i = 0; i < ilen
|
4251 |
-
if (_skip()) {
|
4252 |
-
continue;
|
4253 |
-
}
|
4254 |
-
this.updateRangeFromParsed(range, scale, parsed, stack);
|
4255 |
-
if (sorted) {
|
4256 |
-
break;
|
4257 |
-
}
|
4258 |
-
}
|
4259 |
-
if (sorted) {
|
4260 |
-
for (i = ilen - 1; i >= 0; --i) {
|
4261 |
-
if (_skip()) {
|
4262 |
-
continue;
|
4263 |
-
}
|
4264 |
-
this.updateRangeFromParsed(range, scale, parsed, stack);
|
4265 |
-
break;
|
4266 |
-
}
|
4267 |
-
}
|
4268 |
-
return range;
|
4269 |
-
}
|
4270 |
-
getAllParsedValues(scale) {
|
4271 |
-
const parsed = this._cachedMeta._parsed;
|
4272 |
-
const values = [];
|
4273 |
-
let i, ilen, value;
|
4274 |
-
for (i = 0, ilen = parsed.length; i < ilen; ++i) {
|
4275 |
-
value = parsed[i][scale.axis];
|
4276 |
-
if (isNumberFinite(value)) {
|
4277 |
-
values.push(value);
|
4278 |
-
}
|
4279 |
-
}
|
4280 |
-
return values;
|
4281 |
-
}
|
4282 |
-
getMaxOverflow() {
|
4283 |
-
return false;
|
4284 |
-
}
|
4285 |
-
getLabelAndValue(index) {
|
4286 |
-
const meta = this._cachedMeta;
|
4287 |
-
const iScale = meta.iScale;
|
4288 |
-
const vScale = meta.vScale;
|
4289 |
-
const parsed = this.getParsed(index);
|
4290 |
-
return {
|
4291 |
-
label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',
|
4292 |
-
value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''
|
4293 |
-
};
|
4294 |
-
}
|
4295 |
-
_update(mode) {
|
4296 |
-
const meta = this._cachedMeta;
|
4297 |
-
this.update(mode || 'default');
|
4298 |
-
meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));
|
4299 |
-
}
|
4300 |
-
update(mode) {}
|
4301 |
-
draw() {
|
4302 |
-
const ctx = this._ctx;
|
4303 |
-
const chart = this.chart;
|
4304 |
-
const meta = this._cachedMeta;
|
4305 |
-
const elements = meta.data || [];
|
4306 |
-
const area = chart.chartArea;
|
4307 |
-
const active = [];
|
4308 |
-
const start = this._drawStart || 0;
|
4309 |
-
const count = this._drawCount || (elements.length - start);
|
4310 |
-
let i;
|
4311 |
-
if (meta.dataset) {
|
4312 |
-
meta.dataset.draw(ctx, area, start, count);
|
4313 |
-
}
|
4314 |
-
for (i = start; i < start + count; ++i) {
|
4315 |
-
const element = elements[i];
|
4316 |
-
if (element.hidden) {
|
4317 |
-
continue;
|
4318 |
-
}
|
4319 |
-
if (element.active) {
|
4320 |
-
active.push(element);
|
4321 |
-
} else {
|
4322 |
-
element.draw(ctx, area);
|
4323 |
-
}
|
4324 |
-
}
|
4325 |
-
for (i = 0; i < active.length; ++i) {
|
4326 |
-
active[i].draw(ctx, area);
|
4327 |
-
}
|
4328 |
-
}
|
4329 |
-
getStyle(index, active) {
|
4330 |
-
const mode = active ? 'active' : 'default';
|
4331 |
-
return index === undefined && this._cachedMeta.dataset
|
4332 |
-
? this.resolveDatasetElementOptions(mode)
|
4333 |
-
: this.resolveDataElementOptions(index || 0, mode);
|
4334 |
-
}
|
4335 |
-
getContext(index, active, mode) {
|
4336 |
-
const dataset = this.getDataset();
|
4337 |
-
let context;
|
4338 |
-
if (index >= 0 && index < this._cachedMeta.data.length) {
|
4339 |
-
const element = this._cachedMeta.data[index];
|
4340 |
-
context = element.$context ||
|
4341 |
-
(element.$context = createDataContext(this.getContext(), index, element));
|
4342 |
-
context.parsed = this.getParsed(index);
|
4343 |
-
context.raw = dataset.data[index];
|
4344 |
-
context.index = context.dataIndex = index;
|
4345 |
-
} else {
|
4346 |
-
context = this.$context ||
|
4347 |
-
(this.$context = createDatasetContext(this.chart.getContext(), this.index));
|
4348 |
-
context.dataset = dataset;
|
4349 |
-
context.index = context.datasetIndex = this.index;
|
4350 |
-
}
|
4351 |
-
context.active = !!active;
|
4352 |
-
context.mode = mode;
|
4353 |
-
return context;
|
4354 |
-
}
|
4355 |
-
resolveDatasetElementOptions(mode) {
|
4356 |
-
return this._resolveElementOptions(this.datasetElementType.id, mode);
|
4357 |
-
}
|
4358 |
-
resolveDataElementOptions(index, mode) {
|
4359 |
-
return this._resolveElementOptions(this.dataElementType.id, mode, index);
|
4360 |
-
}
|
4361 |
-
_resolveElementOptions(elementType, mode = 'default', index) {
|
4362 |
-
const active = mode === 'active';
|
4363 |
-
const cache = this._cachedDataOpts;
|
4364 |
-
const cacheKey = elementType + '-' + mode;
|
4365 |
-
const cached = cache[cacheKey];
|
4366 |
-
const sharing = this.enableOptionSharing && defined(index);
|
4367 |
-
if (cached) {
|
4368 |
-
return cloneIfNotShared(cached, sharing);
|
4369 |
-
}
|
4370 |
-
const config = this.chart.config;
|
4371 |
-
const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);
|
4372 |
-
const prefixes = active ? [`${elementType}Hover`, 'hover', elementType, ''] : [elementType, ''];
|
4373 |
-
const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);
|
4374 |
-
const names = Object.keys(defaults.elements[elementType]);
|
4375 |
-
const context = () => this.getContext(index, active);
|
4376 |
-
const values = config.resolveNamedOptions(scopes, names, context, prefixes);
|
4377 |
-
if (values.$shared) {
|
4378 |
-
values.$shared = sharing;
|
4379 |
-
cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));
|
4380 |
-
}
|
4381 |
-
return values;
|
4382 |
-
}
|
4383 |
-
_resolveAnimations(index, transition, active) {
|
4384 |
-
const chart = this.chart;
|
4385 |
-
const cache = this._cachedDataOpts;
|
4386 |
-
const cacheKey = `animation-${transition}`;
|
4387 |
-
const cached = cache[cacheKey];
|
4388 |
-
if (cached) {
|
4389 |
-
return cached;
|
4390 |
-
}
|
4391 |
-
let options;
|
4392 |
-
if (chart.options.animation !== false) {
|
4393 |
-
const config = this.chart.config;
|
4394 |
-
const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);
|
4395 |
-
const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);
|
4396 |
-
options = config.createResolver(scopes, this.getContext(index, active, transition));
|
4397 |
-
}
|
4398 |
-
const animations = new Animations(chart, options && options.animations);
|
4399 |
-
if (options && options._cacheable) {
|
4400 |
-
cache[cacheKey] = Object.freeze(animations);
|
4401 |
-
}
|
4402 |
-
return animations;
|
4403 |
-
}
|
4404 |
-
getSharedOptions(options) {
|
4405 |
-
if (!options.$shared) {
|
4406 |
-
return;
|
4407 |
-
}
|
4408 |
-
return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));
|
4409 |
-
}
|
4410 |
-
includeOptions(mode, sharedOptions) {
|
4411 |
-
return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;
|
4412 |
-
}
|
4413 |
-
updateElement(element, index, properties, mode) {
|
4414 |
-
if (isDirectUpdateMode(mode)) {
|
4415 |
-
Object.assign(element, properties);
|
4416 |
-
} else {
|
4417 |
-
this._resolveAnimations(index, mode).update(element, properties);
|
4418 |
-
}
|
4419 |
-
}
|
4420 |
-
updateSharedOptions(sharedOptions, mode, newOptions) {
|
4421 |
-
if (sharedOptions && !isDirectUpdateMode(mode)) {
|
4422 |
-
this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);
|
4423 |
-
}
|
4424 |
-
}
|
4425 |
-
_setStyle(element, index, mode, active) {
|
4426 |
-
element.active = active;
|
4427 |
-
const options = this.getStyle(index, active);
|
4428 |
-
this._resolveAnimations(index, mode, active).update(element, {
|
4429 |
-
options: (!active && this.getSharedOptions(options)) || options
|
4430 |
-
});
|
4431 |
-
}
|
4432 |
-
removeHoverStyle(element, datasetIndex, index) {
|
4433 |
-
this._setStyle(element, index, 'active', false);
|
4434 |
-
}
|
4435 |
-
setHoverStyle(element, datasetIndex, index) {
|
4436 |
-
this._setStyle(element, index, 'active', true);
|
4437 |
-
}
|
4438 |
-
_removeDatasetHoverStyle() {
|
4439 |
-
const element = this._cachedMeta.dataset;
|
4440 |
-
if (element) {
|
4441 |
-
this._setStyle(element, undefined, 'active', false);
|
4442 |
-
}
|
4443 |
-
}
|
4444 |
-
_setDatasetHoverStyle() {
|
4445 |
-
const element = this._cachedMeta.dataset;
|
4446 |
-
if (element) {
|
4447 |
-
this._setStyle(element, undefined, 'active', true);
|
4448 |
-
}
|
4449 |
-
}
|
4450 |
-
_resyncElements(resetNewElements) {
|
4451 |
-
const data = this._data;
|
4452 |
-
const elements = this._cachedMeta.data;
|
4453 |
-
for (const [method, arg1, arg2] of this._syncList) {
|
4454 |
-
this[method](arg1, arg2);
|
4455 |
-
}
|
4456 |
-
this._syncList = [];
|
4457 |
-
const numMeta = elements.length;
|
4458 |
-
const numData = data.length;
|
4459 |
-
const count = Math.min(numData, numMeta);
|
4460 |
-
if (count) {
|
4461 |
-
this.parse(0, count);
|
4462 |
-
}
|
4463 |
-
if (numData > numMeta) {
|
4464 |
-
this._insertElements(numMeta, numData - numMeta, resetNewElements);
|
4465 |
-
} else if (numData < numMeta) {
|
4466 |
-
this._removeElements(numData, numMeta - numData);
|
4467 |
-
}
|
4468 |
-
}
|
4469 |
-
_insertElements(start, count, resetNewElements = true) {
|
4470 |
-
const meta = this._cachedMeta;
|
4471 |
-
const data = meta.data;
|
4472 |
-
const end = start + count;
|
4473 |
-
let i;
|
4474 |
-
const move = (arr) => {
|
4475 |
-
arr.length += count;
|
4476 |
-
for (i = arr.length - 1; i >= end; i--) {
|
4477 |
-
arr[i] = arr[i - count];
|
4478 |
-
}
|
4479 |
-
};
|
4480 |
-
move(data);
|
4481 |
-
for (i = start; i < end; ++i) {
|
4482 |
-
data[i] = new this.dataElementType();
|
4483 |
-
}
|
4484 |
-
if (this._parsing) {
|
4485 |
-
move(meta._parsed);
|
4486 |
-
}
|
4487 |
-
this.parse(start, count);
|
4488 |
-
if (resetNewElements) {
|
4489 |
-
this.updateElements(data, start, count, 'reset');
|
4490 |
-
}
|
4491 |
-
}
|
4492 |
-
updateElements(element, start, count, mode) {}
|
4493 |
-
_removeElements(start, count) {
|
4494 |
-
const meta = this._cachedMeta;
|
4495 |
-
if (this._parsing) {
|
4496 |
-
const removed = meta._parsed.splice(start, count);
|
4497 |
-
if (meta._stacked) {
|
4498 |
-
clearStacks(meta, removed);
|
4499 |
-
}
|
4500 |
-
}
|
4501 |
-
meta.data.splice(start, count);
|
4502 |
-
}
|
4503 |
-
_sync(args) {
|
4504 |
-
if (this._parsing) {
|
4505 |
-
this._syncList.push(args);
|
4506 |
-
} else {
|
4507 |
-
const [method, arg1, arg2] = args;
|
4508 |
-
this[method](arg1, arg2);
|
4509 |
-
}
|
4510 |
-
this.chart._dataChanges.push([this.index, ...args]);
|
4511 |
-
}
|
4512 |
-
_onDataPush() {
|
4513 |
-
const count = arguments.length;
|
4514 |
-
this._sync(['_insertElements', this.getDataset().data.length - count, count]);
|
4515 |
-
}
|
4516 |
-
_onDataPop() {
|
4517 |
-
this._sync(['_removeElements', this._cachedMeta.data.length - 1, 1]);
|
4518 |
-
}
|
4519 |
-
_onDataShift() {
|
4520 |
-
this._sync(['_removeElements', 0, 1]);
|
4521 |
-
}
|
4522 |
-
_onDataSplice(start, count) {
|
4523 |
-
if (count) {
|
4524 |
-
this._sync(['_removeElements', start, count]);
|
4525 |
-
}
|
4526 |
-
const newCount = arguments.length - 2;
|
4527 |
-
if (newCount) {
|
4528 |
-
this._sync(['_insertElements', start, newCount]);
|
4529 |
-
}
|
4530 |
-
}
|
4531 |
-
_onDataUnshift() {
|
4532 |
-
this._sync(['_insertElements', 0, arguments.length]);
|
4533 |
-
}
|
4534 |
-
}
|
4535 |
-
DatasetController.defaults = {};
|
4536 |
-
DatasetController.prototype.datasetElementType = null;
|
4537 |
-
DatasetController.prototype.dataElementType = null;
|
4538 |
-
|
4539 |
-
class Element {
|
4540 |
-
constructor() {
|
4541 |
-
this.x = undefined;
|
4542 |
-
this.y = undefined;
|
4543 |
-
this.active = false;
|
4544 |
-
this.options = undefined;
|
4545 |
-
this.$animations = undefined;
|
4546 |
-
}
|
4547 |
-
tooltipPosition(useFinalPosition) {
|
4548 |
-
const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
|
4549 |
-
return {x, y};
|
4550 |
-
}
|
4551 |
-
hasValue() {
|
4552 |
-
return isNumber(this.x) && isNumber(this.y);
|
4553 |
-
}
|
4554 |
-
getProps(props, final) {
|
4555 |
-
const anims = this.$animations;
|
4556 |
-
if (!final || !anims) {
|
4557 |
-
return this;
|
4558 |
-
}
|
4559 |
-
const ret = {};
|
4560 |
-
props.forEach(prop => {
|
4561 |
-
ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];
|
4562 |
-
});
|
4563 |
-
return ret;
|
4564 |
-
}
|
4565 |
-
}
|
4566 |
-
Element.defaults = {};
|
4567 |
-
Element.defaultRoutes = undefined;
|
4568 |
-
|
4569 |
-
const formatters = {
|
4570 |
-
values(value) {
|
4571 |
-
return isArray(value) ? value : '' + value;
|
4572 |
-
},
|
4573 |
-
numeric(tickValue, index, ticks) {
|
4574 |
-
if (tickValue === 0) {
|
4575 |
-
return '0';
|
4576 |
-
}
|
4577 |
-
const locale = this.chart.options.locale;
|
4578 |
-
let notation;
|
4579 |
-
let delta = tickValue;
|
4580 |
-
if (ticks.length > 1) {
|
4581 |
-
const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));
|
4582 |
-
if (maxTick < 1e-4 || maxTick > 1e+15) {
|
4583 |
-
notation = 'scientific';
|
4584 |
-
}
|
4585 |
-
delta = calculateDelta(tickValue, ticks);
|
4586 |
-
}
|
4587 |
-
const logDelta = log10(Math.abs(delta));
|
4588 |
-
const numDecimal = Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);
|
4589 |
-
const options = {notation, minimumFractionDigits: numDecimal, maximumFractionDigits: numDecimal};
|
4590 |
-
Object.assign(options, this.options.ticks.format);
|
4591 |
-
return formatNumber(tickValue, locale, options);
|
4592 |
-
},
|
4593 |
-
logarithmic(tickValue, index, ticks) {
|
4594 |
-
if (tickValue === 0) {
|
4595 |
-
return '0';
|
4596 |
-
}
|
4597 |
-
const remain = tickValue / (Math.pow(10, Math.floor(log10(tickValue))));
|
4598 |
-
if (remain === 1 || remain === 2 || remain === 5) {
|
4599 |
-
return formatters.numeric.call(this, tickValue, index, ticks);
|
4600 |
-
}
|
4601 |
-
return '';
|
4602 |
-
}
|
4603 |
-
};
|
4604 |
-
function calculateDelta(tickValue, ticks) {
|
4605 |
-
let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;
|
4606 |
-
if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {
|
4607 |
-
delta = tickValue - Math.floor(tickValue);
|
4608 |
-
}
|
4609 |
-
return delta;
|
4610 |
-
}
|
4611 |
-
var Ticks = {formatters};
|
4612 |
-
|
4613 |
-
defaults.set('scale', {
|
4614 |
-
display: true,
|
4615 |
-
offset: false,
|
4616 |
-
reverse: false,
|
4617 |
-
beginAtZero: false,
|
4618 |
-
bounds: 'ticks',
|
4619 |
-
grace: 0,
|
4620 |
-
grid: {
|
4621 |
-
display: true,
|
4622 |
-
lineWidth: 1,
|
4623 |
-
drawBorder: true,
|
4624 |
-
drawOnChartArea: true,
|
4625 |
-
drawTicks: true,
|
4626 |
-
tickLength: 8,
|
4627 |
-
tickWidth: (_ctx, options) => options.lineWidth,
|
4628 |
-
tickColor: (_ctx, options) => options.color,
|
4629 |
-
offset: false,
|
4630 |
-
borderDash: [],
|
4631 |
-
borderDashOffset: 0.0,
|
4632 |
-
borderWidth: 1
|
4633 |
-
},
|
4634 |
-
title: {
|
4635 |
-
display: false,
|
4636 |
-
text: '',
|
4637 |
-
padding: {
|
4638 |
-
top: 4,
|
4639 |
-
bottom: 4
|
4640 |
-
}
|
4641 |
-
},
|
4642 |
-
ticks: {
|
4643 |
-
minRotation: 0,
|
4644 |
-
maxRotation: 50,
|
4645 |
-
mirror: false,
|
4646 |
-
textStrokeWidth: 0,
|
4647 |
-
textStrokeColor: '',
|
4648 |
-
padding: 3,
|
4649 |
-
display: true,
|
4650 |
-
autoSkip: true,
|
4651 |
-
autoSkipPadding: 3,
|
4652 |
-
labelOffset: 0,
|
4653 |
-
callback: Ticks.formatters.values,
|
4654 |
-
minor: {},
|
4655 |
-
major: {},
|
4656 |
-
align: 'center',
|
4657 |
-
crossAlign: 'near',
|
4658 |
-
showLabelBackdrop: false,
|
4659 |
-
backdropColor: 'rgba(255, 255, 255, 0.75)',
|
4660 |
-
backdropPadding: 2,
|
4661 |
-
}
|
4662 |
-
});
|
4663 |
-
defaults.route('scale.ticks', 'color', '', 'color');
|
4664 |
-
defaults.route('scale.grid', 'color', '', 'borderColor');
|
4665 |
-
defaults.route('scale.grid', 'borderColor', '', 'borderColor');
|
4666 |
-
defaults.route('scale.title', 'color', '', 'color');
|
4667 |
-
defaults.describe('scale', {
|
4668 |
-
_fallback: false,
|
4669 |
-
_scriptable: (name) => !name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',
|
4670 |
-
_indexable: (name) => name !== 'borderDash' && name !== 'tickBorderDash',
|
4671 |
-
});
|
4672 |
-
defaults.describe('scales', {
|
4673 |
-
_fallback: 'scale',
|
4674 |
-
});
|
4675 |
-
defaults.describe('scale.ticks', {
|
4676 |
-
_scriptable: (name) => name !== 'backdropPadding' && name !== 'callback',
|
4677 |
-
_indexable: (name) => name !== 'backdropPadding',
|
4678 |
-
});
|
4679 |
-
|
4680 |
-
function autoSkip(scale, ticks) {
|
4681 |
-
const tickOpts = scale.options.ticks;
|
4682 |
-
const ticksLimit = tickOpts.maxTicksLimit || determineMaxTicks(scale);
|
4683 |
-
const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];
|
4684 |
-
const numMajorIndices = majorIndices.length;
|
4685 |
-
const first = majorIndices[0];
|
4686 |
-
const last = majorIndices[numMajorIndices - 1];
|
4687 |
-
const newTicks = [];
|
4688 |
-
if (numMajorIndices > ticksLimit) {
|
4689 |
-
skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);
|
4690 |
-
return newTicks;
|
4691 |
-
}
|
4692 |
-
const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);
|
4693 |
-
if (numMajorIndices > 0) {
|
4694 |
-
let i, ilen;
|
4695 |
-
const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;
|
4696 |
-
skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);
|
4697 |
-
for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {
|
4698 |
-
skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);
|
4699 |
-
}
|
4700 |
-
skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);
|
4701 |
-
return newTicks;
|
4702 |
-
}
|
4703 |
-
skip(ticks, newTicks, spacing);
|
4704 |
-
return newTicks;
|
4705 |
-
}
|
4706 |
-
function determineMaxTicks(scale) {
|
4707 |
-
const offset = scale.options.offset;
|
4708 |
-
const tickLength = scale._tickSize();
|
4709 |
-
const maxScale = scale._length / tickLength + (offset ? 0 : 1);
|
4710 |
-
const maxChart = scale._maxLength / tickLength;
|
4711 |
-
return Math.floor(Math.min(maxScale, maxChart));
|
4712 |
-
}
|
4713 |
-
function calculateSpacing(majorIndices, ticks, ticksLimit) {
|
4714 |
-
const evenMajorSpacing = getEvenSpacing(majorIndices);
|
4715 |
-
const spacing = ticks.length / ticksLimit;
|
4716 |
-
if (!evenMajorSpacing) {
|
4717 |
-
return Math.max(spacing, 1);
|
4718 |
-
}
|
4719 |
-
const factors = _factorize(evenMajorSpacing);
|
4720 |
-
for (let i = 0, ilen = factors.length - 1; i < ilen; i++) {
|
4721 |
-
const factor = factors[i];
|
4722 |
-
if (factor > spacing) {
|
4723 |
-
return factor;
|
4724 |
-
}
|
4725 |
-
}
|
4726 |
-
return Math.max(spacing, 1);
|
4727 |
-
}
|
4728 |
-
function getMajorIndices(ticks) {
|
4729 |
-
const result = [];
|
4730 |
-
let i, ilen;
|
4731 |
-
for (i = 0, ilen = ticks.length; i < ilen; i++) {
|
4732 |
-
if (ticks[i].major) {
|
4733 |
-
result.push(i);
|
4734 |
-
}
|
4735 |
-
}
|
4736 |
-
return result;
|
4737 |
-
}
|
4738 |
-
function skipMajors(ticks, newTicks, majorIndices, spacing) {
|
4739 |
-
let count = 0;
|
4740 |
-
let next = majorIndices[0];
|
4741 |
-
let i;
|
4742 |
-
spacing = Math.ceil(spacing);
|
4743 |
-
for (i = 0; i < ticks.length; i++) {
|
4744 |
-
if (i === next) {
|
4745 |
-
newTicks.push(ticks[i]);
|
4746 |
-
count++;
|
4747 |
-
next = majorIndices[count * spacing];
|
4748 |
-
}
|
4749 |
-
}
|
4750 |
-
}
|
4751 |
-
function skip(ticks, newTicks, spacing, majorStart, majorEnd) {
|
4752 |
-
const start = valueOrDefault(majorStart, 0);
|
4753 |
-
const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);
|
4754 |
-
let count = 0;
|
4755 |
-
let length, i, next;
|
4756 |
-
spacing = Math.ceil(spacing);
|
4757 |
-
if (majorEnd) {
|
4758 |
-
length = majorEnd - majorStart;
|
4759 |
-
spacing = length / Math.floor(length / spacing);
|
4760 |
-
}
|
4761 |
-
next = start;
|
4762 |
-
while (next < 0) {
|
4763 |
-
count++;
|
4764 |
-
next = Math.round(start + count * spacing);
|
4765 |
-
}
|
4766 |
-
for (i = Math.max(start, 0); i < end; i++) {
|
4767 |
-
if (i === next) {
|
4768 |
-
newTicks.push(ticks[i]);
|
4769 |
-
count++;
|
4770 |
-
next = Math.round(start + count * spacing);
|
4771 |
-
}
|
4772 |
-
}
|
4773 |
-
}
|
4774 |
-
function getEvenSpacing(arr) {
|
4775 |
-
const len = arr.length;
|
4776 |
-
let i, diff;
|
4777 |
-
if (len < 2) {
|
4778 |
-
return false;
|
4779 |
-
}
|
4780 |
-
for (diff = arr[0], i = 1; i < len; ++i) {
|
4781 |
-
if (arr[i] - arr[i - 1] !== diff) {
|
4782 |
-
return false;
|
4783 |
-
}
|
4784 |
-
}
|
4785 |
-
return diff;
|
4786 |
-
}
|
4787 |
-
|
4788 |
-
const reverseAlign = (align) => align === 'left' ? 'right' : align === 'right' ? 'left' : align;
|
4789 |
-
const offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;
|
4790 |
-
function sample(arr, numItems) {
|
4791 |
-
const result = [];
|
4792 |
-
const increment = arr.length / numItems;
|
4793 |
-
const len = arr.length;
|
4794 |
-
let i = 0;
|
4795 |
-
for (; i < len; i += increment) {
|
4796 |
-
result.push(arr[Math.floor(i)]);
|
4797 |
-
}
|
4798 |
-
return result;
|
4799 |
-
}
|
4800 |
-
function getPixelForGridLine(scale, index, offsetGridLines) {
|
4801 |
-
const length = scale.ticks.length;
|
4802 |
-
const validIndex = Math.min(index, length - 1);
|
4803 |
-
const start = scale._startPixel;
|
4804 |
-
const end = scale._endPixel;
|
4805 |
-
const epsilon = 1e-6;
|
4806 |
-
let lineValue = scale.getPixelForTick(validIndex);
|
4807 |
-
let offset;
|
4808 |
-
if (offsetGridLines) {
|
4809 |
-
if (length === 1) {
|
4810 |
-
offset = Math.max(lineValue - start, end - lineValue);
|
4811 |
-
} else if (index === 0) {
|
4812 |
-
offset = (scale.getPixelForTick(1) - lineValue) / 2;
|
4813 |
-
} else {
|
4814 |
-
offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;
|
4815 |
-
}
|
4816 |
-
lineValue += validIndex < index ? offset : -offset;
|
4817 |
-
if (lineValue < start - epsilon || lineValue > end + epsilon) {
|
4818 |
-
return;
|
4819 |
-
}
|
4820 |
-
}
|
4821 |
-
return lineValue;
|
4822 |
-
}
|
4823 |
-
function garbageCollect(caches, length) {
|
4824 |
-
each(caches, (cache) => {
|
4825 |
-
const gc = cache.gc;
|
4826 |
-
const gcLen = gc.length / 2;
|
4827 |
-
let i;
|
4828 |
-
if (gcLen > length) {
|
4829 |
-
for (i = 0; i < gcLen; ++i) {
|
4830 |
-
delete cache.data[gc[i]];
|
4831 |
-
}
|
4832 |
-
gc.splice(0, gcLen);
|
4833 |
-
}
|
4834 |
-
});
|
4835 |
-
}
|
4836 |
-
function getTickMarkLength(options) {
|
4837 |
-
return options.drawTicks ? options.tickLength : 0;
|
4838 |
-
}
|
4839 |
-
function getTitleHeight(options, fallback) {
|
4840 |
-
if (!options.display) {
|
4841 |
-
return 0;
|
4842 |
-
}
|
4843 |
-
const font = toFont(options.font, fallback);
|
4844 |
-
const padding = toPadding(options.padding);
|
4845 |
-
const lines = isArray(options.text) ? options.text.length : 1;
|
4846 |
-
return (lines * font.lineHeight) + padding.height;
|
4847 |
-
}
|
4848 |
-
function createScaleContext(parent, scale) {
|
4849 |
-
return createContext(parent, {
|
4850 |
-
scale,
|
4851 |
-
type: 'scale'
|
4852 |
-
});
|
4853 |
-
}
|
4854 |
-
function createTickContext(parent, index, tick) {
|
4855 |
-
return createContext(parent, {
|
4856 |
-
tick,
|
4857 |
-
index,
|
4858 |
-
type: 'tick'
|
4859 |
-
});
|
4860 |
-
}
|
4861 |
-
function titleAlign(align, position, reverse) {
|
4862 |
-
let ret = _toLeftRightCenter(align);
|
4863 |
-
if ((reverse && position !== 'right') || (!reverse && position === 'right')) {
|
4864 |
-
ret = reverseAlign(ret);
|
4865 |
-
}
|
4866 |
-
return ret;
|
4867 |
-
}
|
4868 |
-
function titleArgs(scale, offset, position, align) {
|
4869 |
-
const {top, left, bottom, right, chart} = scale;
|
4870 |
-
const {chartArea, scales} = chart;
|
4871 |
-
let rotation = 0;
|
4872 |
-
let maxWidth, titleX, titleY;
|
4873 |
-
const height = bottom - top;
|
4874 |
-
const width = right - left;
|
4875 |
-
if (scale.isHorizontal()) {
|
4876 |
-
titleX = _alignStartEnd(align, left, right);
|
4877 |
-
if (isObject(position)) {
|
4878 |
-
const positionAxisID = Object.keys(position)[0];
|
4879 |
-
const value = position[positionAxisID];
|
4880 |
-
titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;
|
4881 |
-
} else if (position === 'center') {
|
4882 |
-
titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;
|
4883 |
-
} else {
|
4884 |
-
titleY = offsetFromEdge(scale, position, offset);
|
4885 |
-
}
|
4886 |
-
maxWidth = right - left;
|
4887 |
-
} else {
|
4888 |
-
if (isObject(position)) {
|
4889 |
-
const positionAxisID = Object.keys(position)[0];
|
4890 |
-
const value = position[positionAxisID];
|
4891 |
-
titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;
|
4892 |
-
} else if (position === 'center') {
|
4893 |
-
titleX = (chartArea.left + chartArea.right) / 2 - width + offset;
|
4894 |
-
} else {
|
4895 |
-
titleX = offsetFromEdge(scale, position, offset);
|
4896 |
-
}
|
4897 |
-
titleY = _alignStartEnd(align, bottom, top);
|
4898 |
-
rotation = position === 'left' ? -HALF_PI : HALF_PI;
|
4899 |
-
}
|
4900 |
-
return {titleX, titleY, maxWidth, rotation};
|
4901 |
-
}
|
4902 |
-
class Scale extends Element {
|
4903 |
-
constructor(cfg) {
|
4904 |
-
super();
|
4905 |
-
this.id = cfg.id;
|
4906 |
-
this.type = cfg.type;
|
4907 |
-
this.options = undefined;
|
4908 |
-
this.ctx = cfg.ctx;
|
4909 |
-
this.chart = cfg.chart;
|
4910 |
-
this.top = undefined;
|
4911 |
-
this.bottom = undefined;
|
4912 |
-
this.left = undefined;
|
4913 |
-
this.right = undefined;
|
4914 |
-
this.width = undefined;
|
4915 |
-
this.height = undefined;
|
4916 |
-
this._margins = {
|
4917 |
-
left: 0,
|
4918 |
-
right: 0,
|
4919 |
-
top: 0,
|
4920 |
-
bottom: 0
|
4921 |
-
};
|
4922 |
-
this.maxWidth = undefined;
|
4923 |
-
this.maxHeight = undefined;
|
4924 |
-
this.paddingTop = undefined;
|
4925 |
-
this.paddingBottom = undefined;
|
4926 |
-
this.paddingLeft = undefined;
|
4927 |
-
this.paddingRight = undefined;
|
4928 |
-
this.axis = undefined;
|
4929 |
-
this.labelRotation = undefined;
|
4930 |
-
this.min = undefined;
|
4931 |
-
this.max = undefined;
|
4932 |
-
this._range = undefined;
|
4933 |
-
this.ticks = [];
|
4934 |
-
this._gridLineItems = null;
|
4935 |
-
this._labelItems = null;
|
4936 |
-
this._labelSizes = null;
|
4937 |
-
this._length = 0;
|
4938 |
-
this._maxLength = 0;
|
4939 |
-
this._longestTextCache = {};
|
4940 |
-
this._startPixel = undefined;
|
4941 |
-
this._endPixel = undefined;
|
4942 |
-
this._reversePixels = false;
|
4943 |
-
this._userMax = undefined;
|
4944 |
-
this._userMin = undefined;
|
4945 |
-
this._suggestedMax = undefined;
|
4946 |
-
this._suggestedMin = undefined;
|
4947 |
-
this._ticksLength = 0;
|
4948 |
-
this._borderValue = 0;
|
4949 |
-
this._cache = {};
|
4950 |
-
this._dataLimitsCached = false;
|
4951 |
-
this.$context = undefined;
|
4952 |
-
}
|
4953 |
-
init(options) {
|
4954 |
-
this.options = options.setContext(this.getContext());
|
4955 |
-
this.axis = options.axis;
|
4956 |
-
this._userMin = this.parse(options.min);
|
4957 |
-
this._userMax = this.parse(options.max);
|
4958 |
-
this._suggestedMin = this.parse(options.suggestedMin);
|
4959 |
-
this._suggestedMax = this.parse(options.suggestedMax);
|
4960 |
-
}
|
4961 |
-
parse(raw, index) {
|
4962 |
-
return raw;
|
4963 |
-
}
|
4964 |
-
getUserBounds() {
|
4965 |
-
let {_userMin, _userMax, _suggestedMin, _suggestedMax} = this;
|
4966 |
-
_userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);
|
4967 |
-
_userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);
|
4968 |
-
_suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);
|
4969 |
-
_suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);
|
4970 |
-
return {
|
4971 |
-
min: finiteOrDefault(_userMin, _suggestedMin),
|
4972 |
-
max: finiteOrDefault(_userMax, _suggestedMax),
|
4973 |
-
minDefined: isNumberFinite(_userMin),
|
4974 |
-
maxDefined: isNumberFinite(_userMax)
|
4975 |
-
};
|
4976 |
-
}
|
4977 |
-
getMinMax(canStack) {
|
4978 |
-
let {min, max, minDefined, maxDefined} = this.getUserBounds();
|
4979 |
-
let range;
|
4980 |
-
if (minDefined && maxDefined) {
|
4981 |
-
return {min, max};
|
4982 |
-
}
|
4983 |
-
const metas = this.getMatchingVisibleMetas();
|
4984 |
-
for (let i = 0, ilen = metas.length; i < ilen; ++i) {
|
4985 |
-
range = metas[i].controller.getMinMax(this, canStack);
|
4986 |
-
if (!minDefined) {
|
4987 |
-
min = Math.min(min, range.min);
|
4988 |
-
}
|
4989 |
-
if (!maxDefined) {
|
4990 |
-
max = Math.max(max, range.max);
|
4991 |
-
}
|
4992 |
-
}
|
4993 |
-
min = maxDefined && min > max ? max : min;
|
4994 |
-
max = minDefined && min > max ? min : max;
|
4995 |
-
return {
|
4996 |
-
min: finiteOrDefault(min, finiteOrDefault(max, min)),
|
4997 |
-
max: finiteOrDefault(max, finiteOrDefault(min, max))
|
4998 |
-
};
|
4999 |
-
}
|
5000 |
-
getPadding() {
|
5001 |
-
return {
|
5002 |
-
left: this.paddingLeft || 0,
|
5003 |
-
top: this.paddingTop || 0,
|
5004 |
-
right: this.paddingRight || 0,
|
5005 |
-
bottom: this.paddingBottom || 0
|
5006 |
-
};
|
5007 |
-
}
|
5008 |
-
getTicks() {
|
5009 |
-
return this.ticks;
|
5010 |
-
}
|
5011 |
-
getLabels() {
|
5012 |
-
const data = this.chart.data;
|
5013 |
-
return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];
|
5014 |
-
}
|
5015 |
-
beforeLayout() {
|
5016 |
-
this._cache = {};
|
5017 |
-
this._dataLimitsCached = false;
|
5018 |
-
}
|
5019 |
-
beforeUpdate() {
|
5020 |
-
callback(this.options.beforeUpdate, [this]);
|
5021 |
-
}
|
5022 |
-
update(maxWidth, maxHeight, margins) {
|
5023 |
-
const {beginAtZero, grace, ticks: tickOpts} = this.options;
|
5024 |
-
const sampleSize = tickOpts.sampleSize;
|
5025 |
-
this.beforeUpdate();
|
5026 |
-
this.maxWidth = maxWidth;
|
5027 |
-
this.maxHeight = maxHeight;
|
5028 |
-
this._margins = margins = Object.assign({
|
5029 |
-
left: 0,
|
5030 |
-
right: 0,
|
5031 |
-
top: 0,
|
5032 |
-
bottom: 0
|
5033 |
-
}, margins);
|
5034 |
-
this.ticks = null;
|
5035 |
-
this._labelSizes = null;
|
5036 |
-
this._gridLineItems = null;
|
5037 |
-
this._labelItems = null;
|
5038 |
-
this.beforeSetDimensions();
|
5039 |
-
this.setDimensions();
|
5040 |
-
this.afterSetDimensions();
|
5041 |
-
this._maxLength = this.isHorizontal()
|
5042 |
-
? this.width + margins.left + margins.right
|
5043 |
-
: this.height + margins.top + margins.bottom;
|
5044 |
-
if (!this._dataLimitsCached) {
|
5045 |
-
this.beforeDataLimits();
|
5046 |
-
this.determineDataLimits();
|
5047 |
-
this.afterDataLimits();
|
5048 |
-
this._range = _addGrace(this, grace, beginAtZero);
|
5049 |
-
this._dataLimitsCached = true;
|
5050 |
-
}
|
5051 |
-
this.beforeBuildTicks();
|
5052 |
-
this.ticks = this.buildTicks() || [];
|
5053 |
-
this.afterBuildTicks();
|
5054 |
-
const samplingEnabled = sampleSize < this.ticks.length;
|
5055 |
-
this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);
|
5056 |
-
this.configure();
|
5057 |
-
this.beforeCalculateLabelRotation();
|
5058 |
-
this.calculateLabelRotation();
|
5059 |
-
this.afterCalculateLabelRotation();
|
5060 |
-
if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {
|
5061 |
-
this.ticks = autoSkip(this, this.ticks);
|
5062 |
-
this._labelSizes = null;
|
5063 |
-
}
|
5064 |
-
if (samplingEnabled) {
|
5065 |
-
this._convertTicksToLabels(this.ticks);
|
5066 |
-
}
|
5067 |
-
this.beforeFit();
|
5068 |
-
this.fit();
|
5069 |
-
this.afterFit();
|
5070 |
-
this.afterUpdate();
|
5071 |
-
}
|
5072 |
-
configure() {
|
5073 |
-
let reversePixels = this.options.reverse;
|
5074 |
-
let startPixel, endPixel;
|
5075 |
-
if (this.isHorizontal()) {
|
5076 |
-
startPixel = this.left;
|
5077 |
-
endPixel = this.right;
|
5078 |
-
} else {
|
5079 |
-
startPixel = this.top;
|
5080 |
-
endPixel = this.bottom;
|
5081 |
-
reversePixels = !reversePixels;
|
5082 |
-
}
|
5083 |
-
this._startPixel = startPixel;
|
5084 |
-
this._endPixel = endPixel;
|
5085 |
-
this._reversePixels = reversePixels;
|
5086 |
-
this._length = endPixel - startPixel;
|
5087 |
-
this._alignToPixels = this.options.alignToPixels;
|
5088 |
-
}
|
5089 |
-
afterUpdate() {
|
5090 |
-
callback(this.options.afterUpdate, [this]);
|
5091 |
-
}
|
5092 |
-
beforeSetDimensions() {
|
5093 |
-
callback(this.options.beforeSetDimensions, [this]);
|
5094 |
-
}
|
5095 |
-
setDimensions() {
|
5096 |
-
if (this.isHorizontal()) {
|
5097 |
-
this.width = this.maxWidth;
|
5098 |
-
this.left = 0;
|
5099 |
-
this.right = this.width;
|
5100 |
-
} else {
|
5101 |
-
this.height = this.maxHeight;
|
5102 |
-
this.top = 0;
|
5103 |
-
this.bottom = this.height;
|
5104 |
-
}
|
5105 |
-
this.paddingLeft = 0;
|
5106 |
-
this.paddingTop = 0;
|
5107 |
-
this.paddingRight = 0;
|
5108 |
-
this.paddingBottom = 0;
|
5109 |
-
}
|
5110 |
-
afterSetDimensions() {
|
5111 |
-
callback(this.options.afterSetDimensions, [this]);
|
5112 |
-
}
|
5113 |
-
_callHooks(name) {
|
5114 |
-
this.chart.notifyPlugins(name, this.getContext());
|
5115 |
-
callback(this.options[name], [this]);
|
5116 |
-
}
|
5117 |
-
beforeDataLimits() {
|
5118 |
-
this._callHooks('beforeDataLimits');
|
5119 |
-
}
|
5120 |
-
determineDataLimits() {}
|
5121 |
-
afterDataLimits() {
|
5122 |
-
this._callHooks('afterDataLimits');
|
5123 |
-
}
|
5124 |
-
beforeBuildTicks() {
|
5125 |
-
this._callHooks('beforeBuildTicks');
|
5126 |
-
}
|
5127 |
-
buildTicks() {
|
5128 |
-
return [];
|
5129 |
-
}
|
5130 |
-
afterBuildTicks() {
|
5131 |
-
this._callHooks('afterBuildTicks');
|
5132 |
-
}
|
5133 |
-
beforeTickToLabelConversion() {
|
5134 |
-
callback(this.options.beforeTickToLabelConversion, [this]);
|
5135 |
-
}
|
5136 |
-
generateTickLabels(ticks) {
|
5137 |
-
const tickOpts = this.options.ticks;
|
5138 |
-
let i, ilen, tick;
|
5139 |
-
for (i = 0, ilen = ticks.length; i < ilen; i++) {
|
5140 |
-
tick = ticks[i];
|
5141 |
-
tick.label = callback(tickOpts.callback, [tick.value, i, ticks], this);
|
5142 |
-
}
|
5143 |
-
}
|
5144 |
-
afterTickToLabelConversion() {
|
5145 |
-
callback(this.options.afterTickToLabelConversion, [this]);
|
5146 |
-
}
|
5147 |
-
beforeCalculateLabelRotation() {
|
5148 |
-
callback(this.options.beforeCalculateLabelRotation, [this]);
|
5149 |
-
}
|
5150 |
-
calculateLabelRotation() {
|
5151 |
-
const options = this.options;
|
5152 |
-
const tickOpts = options.ticks;
|
5153 |
-
const numTicks = this.ticks.length;
|
5154 |
-
const minRotation = tickOpts.minRotation || 0;
|
5155 |
-
const maxRotation = tickOpts.maxRotation;
|
5156 |
-
let labelRotation = minRotation;
|
5157 |
-
let tickWidth, maxHeight, maxLabelDiagonal;
|
5158 |
-
if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {
|
5159 |
-
this.labelRotation = minRotation;
|
5160 |
-
return;
|
5161 |
-
}
|
5162 |
-
const labelSizes = this._getLabelSizes();
|
5163 |
-
const maxLabelWidth = labelSizes.widest.width;
|
5164 |
-
const maxLabelHeight = labelSizes.highest.height;
|
5165 |
-
const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);
|
5166 |
-
tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);
|
5167 |
-
if (maxLabelWidth + 6 > tickWidth) {
|
5168 |
-
tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));
|
5169 |
-
maxHeight = this.maxHeight - getTickMarkLength(options.grid)
|
5170 |
-
- tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);
|
5171 |
-
maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);
|
5172 |
-
labelRotation = toDegrees(Math.min(
|
5173 |
-
Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)),
|
5174 |
-
Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))
|
5175 |
-
));
|
5176 |
-
labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));
|
5177 |
-
}
|
5178 |
-
this.labelRotation = labelRotation;
|
5179 |
-
}
|
5180 |
-
afterCalculateLabelRotation() {
|
5181 |
-
callback(this.options.afterCalculateLabelRotation, [this]);
|
5182 |
-
}
|
5183 |
-
beforeFit() {
|
5184 |
-
callback(this.options.beforeFit, [this]);
|
5185 |
-
}
|
5186 |
-
fit() {
|
5187 |
-
const minSize = {
|
5188 |
-
width: 0,
|
5189 |
-
height: 0
|
5190 |
-
};
|
5191 |
-
const {chart, options: {ticks: tickOpts, title: titleOpts, grid: gridOpts}} = this;
|
5192 |
-
const display = this._isVisible();
|
5193 |
-
const isHorizontal = this.isHorizontal();
|
5194 |
-
if (display) {
|
5195 |
-
const titleHeight = getTitleHeight(titleOpts, chart.options.font);
|
5196 |
-
if (isHorizontal) {
|
5197 |
-
minSize.width = this.maxWidth;
|
5198 |
-
minSize.height = getTickMarkLength(gridOpts) + titleHeight;
|
5199 |
-
} else {
|
5200 |
-
minSize.height = this.maxHeight;
|
5201 |
-
minSize.width = getTickMarkLength(gridOpts) + titleHeight;
|
5202 |
-
}
|
5203 |
-
if (tickOpts.display && this.ticks.length) {
|
5204 |
-
const {first, last, widest, highest} = this._getLabelSizes();
|
5205 |
-
const tickPadding = tickOpts.padding * 2;
|
5206 |
-
const angleRadians = toRadians(this.labelRotation);
|
5207 |
-
const cos = Math.cos(angleRadians);
|
5208 |
-
const sin = Math.sin(angleRadians);
|
5209 |
-
if (isHorizontal) {
|
5210 |
-
const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;
|
5211 |
-
minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);
|
5212 |
-
} else {
|
5213 |
-
const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;
|
5214 |
-
minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);
|
5215 |
-
}
|
5216 |
-
this._calculatePadding(first, last, sin, cos);
|
5217 |
-
}
|
5218 |
-
}
|
5219 |
-
this._handleMargins();
|
5220 |
-
if (isHorizontal) {
|
5221 |
-
this.width = this._length = chart.width - this._margins.left - this._margins.right;
|
5222 |
-
this.height = minSize.height;
|
5223 |
-
} else {
|
5224 |
-
this.width = minSize.width;
|
5225 |
-
this.height = this._length = chart.height - this._margins.top - this._margins.bottom;
|
5226 |
-
}
|
5227 |
-
}
|
5228 |
-
_calculatePadding(first, last, sin, cos) {
|
5229 |
-
const {ticks: {align, padding}, position} = this.options;
|
5230 |
-
const isRotated = this.labelRotation !== 0;
|
5231 |
-
const labelsBelowTicks = position !== 'top' && this.axis === 'x';
|
5232 |
-
if (this.isHorizontal()) {
|
5233 |
-
const offsetLeft = this.getPixelForTick(0) - this.left;
|
5234 |
-
const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);
|
5235 |
-
let paddingLeft = 0;
|
5236 |
-
let paddingRight = 0;
|
5237 |
-
if (isRotated) {
|
5238 |
-
if (labelsBelowTicks) {
|
5239 |
-
paddingLeft = cos * first.width;
|
5240 |
-
paddingRight = sin * last.height;
|
5241 |
-
} else {
|
5242 |
-
paddingLeft = sin * first.height;
|
5243 |
-
paddingRight = cos * last.width;
|
5244 |
-
}
|
5245 |
-
} else if (align === 'start') {
|
5246 |
-
paddingRight = last.width;
|
5247 |
-
} else if (align === 'end') {
|
5248 |
-
paddingLeft = first.width;
|
5249 |
-
} else {
|
5250 |
-
paddingLeft = first.width / 2;
|
5251 |
-
paddingRight = last.width / 2;
|
5252 |
-
}
|
5253 |
-
this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);
|
5254 |
-
this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);
|
5255 |
-
} else {
|
5256 |
-
let paddingTop = last.height / 2;
|
5257 |
-
let paddingBottom = first.height / 2;
|
5258 |
-
if (align === 'start') {
|
5259 |
-
paddingTop = 0;
|
5260 |
-
paddingBottom = first.height;
|
5261 |
-
} else if (align === 'end') {
|
5262 |
-
paddingTop = last.height;
|
5263 |
-
paddingBottom = 0;
|
5264 |
-
}
|
5265 |
-
this.paddingTop = paddingTop + padding;
|
5266 |
-
this.paddingBottom = paddingBottom + padding;
|
5267 |
-
}
|
5268 |
-
}
|
5269 |
-
_handleMargins() {
|
5270 |
-
if (this._margins) {
|
5271 |
-
this._margins.left = Math.max(this.paddingLeft, this._margins.left);
|
5272 |
-
this._margins.top = Math.max(this.paddingTop, this._margins.top);
|
5273 |
-
this._margins.right = Math.max(this.paddingRight, this._margins.right);
|
5274 |
-
this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);
|
5275 |
-
}
|
5276 |
-
}
|
5277 |
-
afterFit() {
|
5278 |
-
callback(this.options.afterFit, [this]);
|
5279 |
-
}
|
5280 |
-
isHorizontal() {
|
5281 |
-
const {axis, position} = this.options;
|
5282 |
-
return position === 'top' || position === 'bottom' || axis === 'x';
|
5283 |
-
}
|
5284 |
-
isFullSize() {
|
5285 |
-
return this.options.fullSize;
|
5286 |
-
}
|
5287 |
-
_convertTicksToLabels(ticks) {
|
5288 |
-
this.beforeTickToLabelConversion();
|
5289 |
-
this.generateTickLabels(ticks);
|
5290 |
-
let i, ilen;
|
5291 |
-
for (i = 0, ilen = ticks.length; i < ilen; i++) {
|
5292 |
-
if (isNullOrUndef(ticks[i].label)) {
|
5293 |
-
ticks.splice(i, 1);
|
5294 |
-
ilen--;
|
5295 |
-
i--;
|
5296 |
-
}
|
5297 |
-
}
|
5298 |
-
this.afterTickToLabelConversion();
|
5299 |
-
}
|
5300 |
-
_getLabelSizes() {
|
5301 |
-
let labelSizes = this._labelSizes;
|
5302 |
-
if (!labelSizes) {
|
5303 |
-
const sampleSize = this.options.ticks.sampleSize;
|
5304 |
-
let ticks = this.ticks;
|
5305 |
-
if (sampleSize < ticks.length) {
|
5306 |
-
ticks = sample(ticks, sampleSize);
|
5307 |
-
}
|
5308 |
-
this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length);
|
5309 |
-
}
|
5310 |
-
return labelSizes;
|
5311 |
-
}
|
5312 |
-
_computeLabelSizes(ticks, length) {
|
5313 |
-
const {ctx, _longestTextCache: caches} = this;
|
5314 |
-
const widths = [];
|
5315 |
-
const heights = [];
|
5316 |
-
let widestLabelSize = 0;
|
5317 |
-
let highestLabelSize = 0;
|
5318 |
-
let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;
|
5319 |
-
for (i = 0; i < length; ++i) {
|
5320 |
-
label = ticks[i].label;
|
5321 |
-
tickFont = this._resolveTickFontOptions(i);
|
5322 |
-
ctx.font = fontString = tickFont.string;
|
5323 |
-
cache = caches[fontString] = caches[fontString] || {data: {}, gc: []};
|
5324 |
-
lineHeight = tickFont.lineHeight;
|
5325 |
-
width = height = 0;
|
5326 |
-
if (!isNullOrUndef(label) && !isArray(label)) {
|
5327 |
-
width = _measureText(ctx, cache.data, cache.gc, width, label);
|
5328 |
-
height = lineHeight;
|
5329 |
-
} else if (isArray(label)) {
|
5330 |
-
for (j = 0, jlen = label.length; j < jlen; ++j) {
|
5331 |
-
nestedLabel = label[j];
|
5332 |
-
if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {
|
5333 |
-
width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);
|
5334 |
-
height += lineHeight;
|
5335 |
-
}
|
5336 |
-
}
|
5337 |
-
}
|
5338 |
-
widths.push(width);
|
5339 |
-
heights.push(height);
|
5340 |
-
widestLabelSize = Math.max(width, widestLabelSize);
|
5341 |
-
highestLabelSize = Math.max(height, highestLabelSize);
|
5342 |
-
}
|
5343 |
-
garbageCollect(caches, length);
|
5344 |
-
const widest = widths.indexOf(widestLabelSize);
|
5345 |
-
const highest = heights.indexOf(highestLabelSize);
|
5346 |
-
const valueAt = (idx) => ({width: widths[idx] || 0, height: heights[idx] || 0});
|
5347 |
-
return {
|
5348 |
-
first: valueAt(0),
|
5349 |
-
last: valueAt(length - 1),
|
5350 |
-
widest: valueAt(widest),
|
5351 |
-
highest: valueAt(highest),
|
5352 |
-
widths,
|
5353 |
-
heights,
|
5354 |
-
};
|
5355 |
-
}
|
5356 |
-
getLabelForValue(value) {
|
5357 |
-
return value;
|
5358 |
-
}
|
5359 |
-
getPixelForValue(value, index) {
|
5360 |
-
return NaN;
|
5361 |
-
}
|
5362 |
-
getValueForPixel(pixel) {}
|
5363 |
-
getPixelForTick(index) {
|
5364 |
-
const ticks = this.ticks;
|
5365 |
-
if (index < 0 || index > ticks.length - 1) {
|
5366 |
-
return null;
|
5367 |
-
}
|
5368 |
-
return this.getPixelForValue(ticks[index].value);
|
5369 |
-
}
|
5370 |
-
getPixelForDecimal(decimal) {
|
5371 |
-
if (this._reversePixels) {
|
5372 |
-
decimal = 1 - decimal;
|
5373 |
-
}
|
5374 |
-
const pixel = this._startPixel + decimal * this._length;
|
5375 |
-
return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);
|
5376 |
-
}
|
5377 |
-
getDecimalForPixel(pixel) {
|
5378 |
-
const decimal = (pixel - this._startPixel) / this._length;
|
5379 |
-
return this._reversePixels ? 1 - decimal : decimal;
|
5380 |
-
}
|
5381 |
-
getBasePixel() {
|
5382 |
-
return this.getPixelForValue(this.getBaseValue());
|
5383 |
-
}
|
5384 |
-
getBaseValue() {
|
5385 |
-
const {min, max} = this;
|
5386 |
-
return min < 0 && max < 0 ? max :
|
5387 |
-
min > 0 && max > 0 ? min :
|
5388 |
-
0;
|
5389 |
-
}
|
5390 |
-
getContext(index) {
|
5391 |
-
const ticks = this.ticks || [];
|
5392 |
-
if (index >= 0 && index < ticks.length) {
|
5393 |
-
const tick = ticks[index];
|
5394 |
-
return tick.$context ||
|
5395 |
-
(tick.$context = createTickContext(this.getContext(), index, tick));
|
5396 |
-
}
|
5397 |
-
return this.$context ||
|
5398 |
-
(this.$context = createScaleContext(this.chart.getContext(), this));
|
5399 |
-
}
|
5400 |
-
_tickSize() {
|
5401 |
-
const optionTicks = this.options.ticks;
|
5402 |
-
const rot = toRadians(this.labelRotation);
|
5403 |
-
const cos = Math.abs(Math.cos(rot));
|
5404 |
-
const sin = Math.abs(Math.sin(rot));
|
5405 |
-
const labelSizes = this._getLabelSizes();
|
5406 |
-
const padding = optionTicks.autoSkipPadding || 0;
|
5407 |
-
const w = labelSizes ? labelSizes.widest.width + padding : 0;
|
5408 |
-
const h = labelSizes ? labelSizes.highest.height + padding : 0;
|
5409 |
-
return this.isHorizontal()
|
5410 |
-
? h * cos > w * sin ? w / cos : h / sin
|
5411 |
-
: h * sin < w * cos ? h / cos : w / sin;
|
5412 |
-
}
|
5413 |
-
_isVisible() {
|
5414 |
-
const display = this.options.display;
|
5415 |
-
if (display !== 'auto') {
|
5416 |
-
return !!display;
|
5417 |
-
}
|
5418 |
-
return this.getMatchingVisibleMetas().length > 0;
|
5419 |
-
}
|
5420 |
-
_computeGridLineItems(chartArea) {
|
5421 |
-
const axis = this.axis;
|
5422 |
-
const chart = this.chart;
|
5423 |
-
const options = this.options;
|
5424 |
-
const {grid, position} = options;
|
5425 |
-
const offset = grid.offset;
|
5426 |
-
const isHorizontal = this.isHorizontal();
|
5427 |
-
const ticks = this.ticks;
|
5428 |
-
const ticksLength = ticks.length + (offset ? 1 : 0);
|
5429 |
-
const tl = getTickMarkLength(grid);
|
5430 |
-
const items = [];
|
5431 |
-
const borderOpts = grid.setContext(this.getContext());
|
5432 |
-
const axisWidth = borderOpts.drawBorder ? borderOpts.borderWidth : 0;
|
5433 |
-
const axisHalfWidth = axisWidth / 2;
|
5434 |
-
const alignBorderValue = function(pixel) {
|
5435 |
-
return _alignPixel(chart, pixel, axisWidth);
|
5436 |
-
};
|
5437 |
-
let borderValue, i, lineValue, alignedLineValue;
|
5438 |
-
let tx1, ty1, tx2, ty2, x1, y1, x2, y2;
|
5439 |
-
if (position === 'top') {
|
5440 |
-
borderValue = alignBorderValue(this.bottom);
|
5441 |
-
ty1 = this.bottom - tl;
|
5442 |
-
ty2 = borderValue - axisHalfWidth;
|
5443 |
-
y1 = alignBorderValue(chartArea.top) + axisHalfWidth;
|
5444 |
-
y2 = chartArea.bottom;
|
5445 |
-
} else if (position === 'bottom') {
|
5446 |
-
borderValue = alignBorderValue(this.top);
|
5447 |
-
y1 = chartArea.top;
|
5448 |
-
y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;
|
5449 |
-
ty1 = borderValue + axisHalfWidth;
|
5450 |
-
ty2 = this.top + tl;
|
5451 |
-
} else if (position === 'left') {
|
5452 |
-
borderValue = alignBorderValue(this.right);
|
5453 |
-
tx1 = this.right - tl;
|
5454 |
-
tx2 = borderValue - axisHalfWidth;
|
5455 |
-
x1 = alignBorderValue(chartArea.left) + axisHalfWidth;
|
5456 |
-
x2 = chartArea.right;
|
5457 |
-
} else if (position === 'right') {
|
5458 |
-
borderValue = alignBorderValue(this.left);
|
5459 |
-
x1 = chartArea.left;
|
5460 |
-
x2 = alignBorderValue(chartArea.right) - axisHalfWidth;
|
5461 |
-
tx1 = borderValue + axisHalfWidth;
|
5462 |
-
tx2 = this.left + tl;
|
5463 |
-
} else if (axis === 'x') {
|
5464 |
-
if (position === 'center') {
|
5465 |
-
borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);
|
5466 |
-
} else if (isObject(position)) {
|
5467 |
-
const positionAxisID = Object.keys(position)[0];
|
5468 |
-
const value = position[positionAxisID];
|
5469 |
-
borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));
|
5470 |
-
}
|
5471 |
-
y1 = chartArea.top;
|
5472 |
-
y2 = chartArea.bottom;
|
5473 |
-
ty1 = borderValue + axisHalfWidth;
|
5474 |
-
ty2 = ty1 + tl;
|
5475 |
-
} else if (axis === 'y') {
|
5476 |
-
if (position === 'center') {
|
5477 |
-
borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);
|
5478 |
-
} else if (isObject(position)) {
|
5479 |
-
const positionAxisID = Object.keys(position)[0];
|
5480 |
-
const value = position[positionAxisID];
|
5481 |
-
borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));
|
5482 |
-
}
|
5483 |
-
tx1 = borderValue - axisHalfWidth;
|
5484 |
-
tx2 = tx1 - tl;
|
5485 |
-
x1 = chartArea.left;
|
5486 |
-
x2 = chartArea.right;
|
5487 |
-
}
|
5488 |
-
const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);
|
5489 |
-
const step = Math.max(1, Math.ceil(ticksLength / limit));
|
5490 |
-
for (i = 0; i < ticksLength; i += step) {
|
5491 |
-
const optsAtIndex = grid.setContext(this.getContext(i));
|
5492 |
-
const lineWidth = optsAtIndex.lineWidth;
|
5493 |
-
const lineColor = optsAtIndex.color;
|
5494 |
-
const borderDash = grid.borderDash || [];
|
5495 |
-
const borderDashOffset = optsAtIndex.borderDashOffset;
|
5496 |
-
const tickWidth = optsAtIndex.tickWidth;
|
5497 |
-
const tickColor = optsAtIndex.tickColor;
|
5498 |
-
const tickBorderDash = optsAtIndex.tickBorderDash || [];
|
5499 |
-
const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;
|
5500 |
-
lineValue = getPixelForGridLine(this, i, offset);
|
5501 |
-
if (lineValue === undefined) {
|
5502 |
-
continue;
|
5503 |
-
}
|
5504 |
-
alignedLineValue = _alignPixel(chart, lineValue, lineWidth);
|
5505 |
-
if (isHorizontal) {
|
5506 |
-
tx1 = tx2 = x1 = x2 = alignedLineValue;
|
5507 |
-
} else {
|
5508 |
-
ty1 = ty2 = y1 = y2 = alignedLineValue;
|
5509 |
-
}
|
5510 |
-
items.push({
|
5511 |
-
tx1,
|
5512 |
-
ty1,
|
5513 |
-
tx2,
|
5514 |
-
ty2,
|
5515 |
-
x1,
|
5516 |
-
y1,
|
5517 |
-
x2,
|
5518 |
-
y2,
|
5519 |
-
width: lineWidth,
|
5520 |
-
color: lineColor,
|
5521 |
-
borderDash,
|
5522 |
-
borderDashOffset,
|
5523 |
-
tickWidth,
|
5524 |
-
tickColor,
|
5525 |
-
tickBorderDash,
|
5526 |
-
tickBorderDashOffset,
|
5527 |
-
});
|
5528 |
-
}
|
5529 |
-
this._ticksLength = ticksLength;
|
5530 |
-
this._borderValue = borderValue;
|
5531 |
-
return items;
|
5532 |
-
}
|
5533 |
-
_computeLabelItems(chartArea) {
|
5534 |
-
const axis = this.axis;
|
5535 |
-
const options = this.options;
|
5536 |
-
const {position, ticks: optionTicks} = options;
|
5537 |
-
const isHorizontal = this.isHorizontal();
|
5538 |
-
const ticks = this.ticks;
|
5539 |
-
const {align, crossAlign, padding, mirror} = optionTicks;
|
5540 |
-
const tl = getTickMarkLength(options.grid);
|
5541 |
-
const tickAndPadding = tl + padding;
|
5542 |
-
const hTickAndPadding = mirror ? -padding : tickAndPadding;
|
5543 |
-
const rotation = -toRadians(this.labelRotation);
|
5544 |
-
const items = [];
|
5545 |
-
let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;
|
5546 |
-
let textBaseline = 'middle';
|
5547 |
-
if (position === 'top') {
|
5548 |
-
y = this.bottom - hTickAndPadding;
|
5549 |
-
textAlign = this._getXAxisLabelAlignment();
|
5550 |
-
} else if (position === 'bottom') {
|
5551 |
-
y = this.top + hTickAndPadding;
|
5552 |
-
textAlign = this._getXAxisLabelAlignment();
|
5553 |
-
} else if (position === 'left') {
|
5554 |
-
const ret = this._getYAxisLabelAlignment(tl);
|
5555 |
-
textAlign = ret.textAlign;
|
5556 |
-
x = ret.x;
|
5557 |
-
} else if (position === 'right') {
|
5558 |
-
const ret = this._getYAxisLabelAlignment(tl);
|
5559 |
-
textAlign = ret.textAlign;
|
5560 |
-
x = ret.x;
|
5561 |
-
} else if (axis === 'x') {
|
5562 |
-
if (position === 'center') {
|
5563 |
-
y = ((chartArea.top + chartArea.bottom) / 2) + tickAndPadding;
|
5564 |
-
} else if (isObject(position)) {
|
5565 |
-
const positionAxisID = Object.keys(position)[0];
|
5566 |
-
const value = position[positionAxisID];
|
5567 |
-
y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;
|
5568 |
-
}
|
5569 |
-
textAlign = this._getXAxisLabelAlignment();
|
5570 |
-
} else if (axis === 'y') {
|
5571 |
-
if (position === 'center') {
|
5572 |
-
x = ((chartArea.left + chartArea.right) / 2) - tickAndPadding;
|
5573 |
-
} else if (isObject(position)) {
|
5574 |
-
const positionAxisID = Object.keys(position)[0];
|
5575 |
-
const value = position[positionAxisID];
|
5576 |
-
x = this.chart.scales[positionAxisID].getPixelForValue(value);
|
5577 |
-
}
|
5578 |
-
textAlign = this._getYAxisLabelAlignment(tl).textAlign;
|
5579 |
-
}
|
5580 |
-
if (axis === 'y') {
|
5581 |
-
if (align === 'start') {
|
5582 |
-
textBaseline = 'top';
|
5583 |
-
} else if (align === 'end') {
|
5584 |
-
textBaseline = 'bottom';
|
5585 |
-
}
|
5586 |
-
}
|
5587 |
-
const labelSizes = this._getLabelSizes();
|
5588 |
-
for (i = 0, ilen = ticks.length; i < ilen; ++i) {
|
5589 |
-
tick = ticks[i];
|
5590 |
-
label = tick.label;
|
5591 |
-
const optsAtIndex = optionTicks.setContext(this.getContext(i));
|
5592 |
-
pixel = this.getPixelForTick(i) + optionTicks.labelOffset;
|
5593 |
-
font = this._resolveTickFontOptions(i);
|
5594 |
-
lineHeight = font.lineHeight;
|
5595 |
-
lineCount = isArray(label) ? label.length : 1;
|
5596 |
-
const halfCount = lineCount / 2;
|
5597 |
-
const color = optsAtIndex.color;
|
5598 |
-
const strokeColor = optsAtIndex.textStrokeColor;
|
5599 |
-
const strokeWidth = optsAtIndex.textStrokeWidth;
|
5600 |
-
if (isHorizontal) {
|
5601 |
-
x = pixel;
|
5602 |
-
if (position === 'top') {
|
5603 |
-
if (crossAlign === 'near' || rotation !== 0) {
|
5604 |
-
textOffset = -lineCount * lineHeight + lineHeight / 2;
|
5605 |
-
} else if (crossAlign === 'center') {
|
5606 |
-
textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;
|
5607 |
-
} else {
|
5608 |
-
textOffset = -labelSizes.highest.height + lineHeight / 2;
|
5609 |
-
}
|
5610 |
-
} else {
|
5611 |
-
if (crossAlign === 'near' || rotation !== 0) {
|
5612 |
-
textOffset = lineHeight / 2;
|
5613 |
-
} else if (crossAlign === 'center') {
|
5614 |
-
textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;
|
5615 |
-
} else {
|
5616 |
-
textOffset = labelSizes.highest.height - lineCount * lineHeight;
|
5617 |
-
}
|
5618 |
-
}
|
5619 |
-
if (mirror) {
|
5620 |
-
textOffset *= -1;
|
5621 |
-
}
|
5622 |
-
} else {
|
5623 |
-
y = pixel;
|
5624 |
-
textOffset = (1 - lineCount) * lineHeight / 2;
|
5625 |
-
}
|
5626 |
-
let backdrop;
|
5627 |
-
if (optsAtIndex.showLabelBackdrop) {
|
5628 |
-
const labelPadding = toPadding(optsAtIndex.backdropPadding);
|
5629 |
-
const height = labelSizes.heights[i];
|
5630 |
-
const width = labelSizes.widths[i];
|
5631 |
-
let top = y + textOffset - labelPadding.top;
|
5632 |
-
let left = x - labelPadding.left;
|
5633 |
-
switch (textBaseline) {
|
5634 |
-
case 'middle':
|
5635 |
-
top -= height / 2;
|
5636 |
-
break;
|
5637 |
-
case 'bottom':
|
5638 |
-
top -= height;
|
5639 |
-
break;
|
5640 |
-
}
|
5641 |
-
switch (textAlign) {
|
5642 |
-
case 'center':
|
5643 |
-
left -= width / 2;
|
5644 |
-
break;
|
5645 |
-
case 'right':
|
5646 |
-
left -= width;
|
5647 |
-
break;
|
5648 |
-
}
|
5649 |
-
backdrop = {
|
5650 |
-
left,
|
5651 |
-
top,
|
5652 |
-
width: width + labelPadding.width,
|
5653 |
-
height: height + labelPadding.height,
|
5654 |
-
color: optsAtIndex.backdropColor,
|
5655 |
-
};
|
5656 |
-
}
|
5657 |
-
items.push({
|
5658 |
-
rotation,
|
5659 |
-
label,
|
5660 |
-
font,
|
5661 |
-
color,
|
5662 |
-
strokeColor,
|
5663 |
-
strokeWidth,
|
5664 |
-
textOffset,
|
5665 |
-
textAlign,
|
5666 |
-
textBaseline,
|
5667 |
-
translation: [x, y],
|
5668 |
-
backdrop,
|
5669 |
-
});
|
5670 |
-
}
|
5671 |
-
return items;
|
5672 |
-
}
|
5673 |
-
_getXAxisLabelAlignment() {
|
5674 |
-
const {position, ticks} = this.options;
|
5675 |
-
const rotation = -toRadians(this.labelRotation);
|
5676 |
-
if (rotation) {
|
5677 |
-
return position === 'top' ? 'left' : 'right';
|
5678 |
-
}
|
5679 |
-
let align = 'center';
|
5680 |
-
if (ticks.align === 'start') {
|
5681 |
-
align = 'left';
|
5682 |
-
} else if (ticks.align === 'end') {
|
5683 |
-
align = 'right';
|
5684 |
-
}
|
5685 |
-
return align;
|
5686 |
-
}
|
5687 |
-
_getYAxisLabelAlignment(tl) {
|
5688 |
-
const {position, ticks: {crossAlign, mirror, padding}} = this.options;
|
5689 |
-
const labelSizes = this._getLabelSizes();
|
5690 |
-
const tickAndPadding = tl + padding;
|
5691 |
-
const widest = labelSizes.widest.width;
|
5692 |
-
let textAlign;
|
5693 |
-
let x;
|
5694 |
-
if (position === 'left') {
|
5695 |
-
if (mirror) {
|
5696 |
-
x = this.right + padding;
|
5697 |
-
if (crossAlign === 'near') {
|
5698 |
-
textAlign = 'left';
|
5699 |
-
} else if (crossAlign === 'center') {
|
5700 |
-
textAlign = 'center';
|
5701 |
-
x += (widest / 2);
|
5702 |
-
} else {
|
5703 |
-
textAlign = 'right';
|
5704 |
-
x += widest;
|
5705 |
-
}
|
5706 |
-
} else {
|
5707 |
-
x = this.right - tickAndPadding;
|
5708 |
-
if (crossAlign === 'near') {
|
5709 |
-
textAlign = 'right';
|
5710 |
-
} else if (crossAlign === 'center') {
|
5711 |
-
textAlign = 'center';
|
5712 |
-
x -= (widest / 2);
|
5713 |
-
} else {
|
5714 |
-
textAlign = 'left';
|
5715 |
-
x = this.left;
|
5716 |
-
}
|
5717 |
-
}
|
5718 |
-
} else if (position === 'right') {
|
5719 |
-
if (mirror) {
|
5720 |
-
x = this.left + padding;
|
5721 |
-
if (crossAlign === 'near') {
|
5722 |
-
textAlign = 'right';
|
5723 |
-
} else if (crossAlign === 'center') {
|
5724 |
-
textAlign = 'center';
|
5725 |
-
x -= (widest / 2);
|
5726 |
-
} else {
|
5727 |
-
textAlign = 'left';
|
5728 |
-
x -= widest;
|
5729 |
-
}
|
5730 |
-
} else {
|
5731 |
-
x = this.left + tickAndPadding;
|
5732 |
-
if (crossAlign === 'near') {
|
5733 |
-
textAlign = 'left';
|
5734 |
-
} else if (crossAlign === 'center') {
|
5735 |
-
textAlign = 'center';
|
5736 |
-
x += widest / 2;
|
5737 |
-
} else {
|
5738 |
-
textAlign = 'right';
|
5739 |
-
x = this.right;
|
5740 |
-
}
|
5741 |
-
}
|
5742 |
-
} else {
|
5743 |
-
textAlign = 'right';
|
5744 |
-
}
|
5745 |
-
return {textAlign, x};
|
5746 |
-
}
|
5747 |
-
_computeLabelArea() {
|
5748 |
-
if (this.options.ticks.mirror) {
|
5749 |
-
return;
|
5750 |
-
}
|
5751 |
-
const chart = this.chart;
|
5752 |
-
const position = this.options.position;
|
5753 |
-
if (position === 'left' || position === 'right') {
|
5754 |
-
return {top: 0, left: this.left, bottom: chart.height, right: this.right};
|
5755 |
-
} if (position === 'top' || position === 'bottom') {
|
5756 |
-
return {top: this.top, left: 0, bottom: this.bottom, right: chart.width};
|
5757 |
-
}
|
5758 |
-
}
|
5759 |
-
drawBackground() {
|
5760 |
-
const {ctx, options: {backgroundColor}, left, top, width, height} = this;
|
5761 |
-
if (backgroundColor) {
|
5762 |
-
ctx.save();
|
5763 |
-
ctx.fillStyle = backgroundColor;
|
5764 |
-
ctx.fillRect(left, top, width, height);
|
5765 |
-
ctx.restore();
|
5766 |
-
}
|
5767 |
-
}
|
5768 |
-
getLineWidthForValue(value) {
|
5769 |
-
const grid = this.options.grid;
|
5770 |
-
if (!this._isVisible() || !grid.display) {
|
5771 |
-
return 0;
|
5772 |
-
}
|
5773 |
-
const ticks = this.ticks;
|
5774 |
-
const index = ticks.findIndex(t => t.value === value);
|
5775 |
-
if (index >= 0) {
|
5776 |
-
const opts = grid.setContext(this.getContext(index));
|
5777 |
-
return opts.lineWidth;
|
5778 |
-
}
|
5779 |
-
return 0;
|
5780 |
-
}
|
5781 |
-
drawGrid(chartArea) {
|
5782 |
-
const grid = this.options.grid;
|
5783 |
-
const ctx = this.ctx;
|
5784 |
-
const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));
|
5785 |
-
let i, ilen;
|
5786 |
-
const drawLine = (p1, p2, style) => {
|
5787 |
-
if (!style.width || !style.color) {
|
5788 |
-
return;
|
5789 |
-
}
|
5790 |
-
ctx.save();
|
5791 |
-
ctx.lineWidth = style.width;
|
5792 |
-
ctx.strokeStyle = style.color;
|
5793 |
-
ctx.setLineDash(style.borderDash || []);
|
5794 |
-
ctx.lineDashOffset = style.borderDashOffset;
|
5795 |
-
ctx.beginPath();
|
5796 |
-
ctx.moveTo(p1.x, p1.y);
|
5797 |
-
ctx.lineTo(p2.x, p2.y);
|
5798 |
-
ctx.stroke();
|
5799 |
-
ctx.restore();
|
5800 |
-
};
|
5801 |
-
if (grid.display) {
|
5802 |
-
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
5803 |
-
const item = items[i];
|
5804 |
-
if (grid.drawOnChartArea) {
|
5805 |
-
drawLine(
|
5806 |
-
{x: item.x1, y: item.y1},
|
5807 |
-
{x: item.x2, y: item.y2},
|
5808 |
-
item
|
5809 |
-
);
|
5810 |
-
}
|
5811 |
-
if (grid.drawTicks) {
|
5812 |
-
drawLine(
|
5813 |
-
{x: item.tx1, y: item.ty1},
|
5814 |
-
{x: item.tx2, y: item.ty2},
|
5815 |
-
{
|
5816 |
-
color: item.tickColor,
|
5817 |
-
width: item.tickWidth,
|
5818 |
-
borderDash: item.tickBorderDash,
|
5819 |
-
borderDashOffset: item.tickBorderDashOffset
|
5820 |
-
}
|
5821 |
-
);
|
5822 |
-
}
|
5823 |
-
}
|
5824 |
-
}
|
5825 |
-
}
|
5826 |
-
drawBorder() {
|
5827 |
-
const {chart, ctx, options: {grid}} = this;
|
5828 |
-
const borderOpts = grid.setContext(this.getContext());
|
5829 |
-
const axisWidth = grid.drawBorder ? borderOpts.borderWidth : 0;
|
5830 |
-
if (!axisWidth) {
|
5831 |
-
return;
|
5832 |
-
}
|
5833 |
-
const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;
|
5834 |
-
const borderValue = this._borderValue;
|
5835 |
-
let x1, x2, y1, y2;
|
5836 |
-
if (this.isHorizontal()) {
|
5837 |
-
x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;
|
5838 |
-
x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;
|
5839 |
-
y1 = y2 = borderValue;
|
5840 |
-
} else {
|
5841 |
-
y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;
|
5842 |
-
y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;
|
5843 |
-
x1 = x2 = borderValue;
|
5844 |
-
}
|
5845 |
-
ctx.save();
|
5846 |
-
ctx.lineWidth = borderOpts.borderWidth;
|
5847 |
-
ctx.strokeStyle = borderOpts.borderColor;
|
5848 |
-
ctx.beginPath();
|
5849 |
-
ctx.moveTo(x1, y1);
|
5850 |
-
ctx.lineTo(x2, y2);
|
5851 |
-
ctx.stroke();
|
5852 |
-
ctx.restore();
|
5853 |
-
}
|
5854 |
-
drawLabels(chartArea) {
|
5855 |
-
const optionTicks = this.options.ticks;
|
5856 |
-
if (!optionTicks.display) {
|
5857 |
-
return;
|
5858 |
-
}
|
5859 |
-
const ctx = this.ctx;
|
5860 |
-
const area = this._computeLabelArea();
|
5861 |
-
if (area) {
|
5862 |
-
clipArea(ctx, area);
|
5863 |
-
}
|
5864 |
-
const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));
|
5865 |
-
let i, ilen;
|
5866 |
-
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
5867 |
-
const item = items[i];
|
5868 |
-
const tickFont = item.font;
|
5869 |
-
const label = item.label;
|
5870 |
-
if (item.backdrop) {
|
5871 |
-
ctx.fillStyle = item.backdrop.color;
|
5872 |
-
ctx.fillRect(item.backdrop.left, item.backdrop.top, item.backdrop.width, item.backdrop.height);
|
5873 |
-
}
|
5874 |
-
let y = item.textOffset;
|
5875 |
-
renderText(ctx, label, 0, y, tickFont, item);
|
5876 |
-
}
|
5877 |
-
if (area) {
|
5878 |
-
unclipArea(ctx);
|
5879 |
-
}
|
5880 |
-
}
|
5881 |
-
drawTitle() {
|
5882 |
-
const {ctx, options: {position, title, reverse}} = this;
|
5883 |
-
if (!title.display) {
|
5884 |
-
return;
|
5885 |
-
}
|
5886 |
-
const font = toFont(title.font);
|
5887 |
-
const padding = toPadding(title.padding);
|
5888 |
-
const align = title.align;
|
5889 |
-
let offset = font.lineHeight / 2;
|
5890 |
-
if (position === 'bottom' || position === 'center' || isObject(position)) {
|
5891 |
-
offset += padding.bottom;
|
5892 |
-
if (isArray(title.text)) {
|
5893 |
-
offset += font.lineHeight * (title.text.length - 1);
|
5894 |
-
}
|
5895 |
-
} else {
|
5896 |
-
offset += padding.top;
|
5897 |
-
}
|
5898 |
-
const {titleX, titleY, maxWidth, rotation} = titleArgs(this, offset, position, align);
|
5899 |
-
renderText(ctx, title.text, 0, 0, font, {
|
5900 |
-
color: title.color,
|
5901 |
-
maxWidth,
|
5902 |
-
rotation,
|
5903 |
-
textAlign: titleAlign(align, position, reverse),
|
5904 |
-
textBaseline: 'middle',
|
5905 |
-
translation: [titleX, titleY],
|
5906 |
-
});
|
5907 |
-
}
|
5908 |
-
draw(chartArea) {
|
5909 |
-
if (!this._isVisible()) {
|
5910 |
-
return;
|
5911 |
-
}
|
5912 |
-
this.drawBackground();
|
5913 |
-
this.drawGrid(chartArea);
|
5914 |
-
this.drawBorder();
|
5915 |
-
this.drawTitle();
|
5916 |
-
this.drawLabels(chartArea);
|
5917 |
-
}
|
5918 |
-
_layers() {
|
5919 |
-
const opts = this.options;
|
5920 |
-
const tz = opts.ticks && opts.ticks.z || 0;
|
5921 |
-
const gz = valueOrDefault(opts.grid && opts.grid.z, -1);
|
5922 |
-
if (!this._isVisible() || this.draw !== Scale.prototype.draw) {
|
5923 |
-
return [{
|
5924 |
-
z: tz,
|
5925 |
-
draw: (chartArea) => {
|
5926 |
-
this.draw(chartArea);
|
5927 |
-
}
|
5928 |
-
}];
|
5929 |
-
}
|
5930 |
-
return [{
|
5931 |
-
z: gz,
|
5932 |
-
draw: (chartArea) => {
|
5933 |
-
this.drawBackground();
|
5934 |
-
this.drawGrid(chartArea);
|
5935 |
-
this.drawTitle();
|
5936 |
-
}
|
5937 |
-
}, {
|
5938 |
-
z: gz + 1,
|
5939 |
-
draw: () => {
|
5940 |
-
this.drawBorder();
|
5941 |
-
}
|
5942 |
-
}, {
|
5943 |
-
z: tz,
|
5944 |
-
draw: (chartArea) => {
|
5945 |
-
this.drawLabels(chartArea);
|
5946 |
-
}
|
5947 |
-
}];
|
5948 |
-
}
|
5949 |
-
getMatchingVisibleMetas(type) {
|
5950 |
-
const metas = this.chart.getSortedVisibleDatasetMetas();
|
5951 |
-
const axisID = this.axis + 'AxisID';
|
5952 |
-
const result = [];
|
5953 |
-
let i, ilen;
|
5954 |
-
for (i = 0, ilen = metas.length; i < ilen; ++i) {
|
5955 |
-
const meta = metas[i];
|
5956 |
-
if (meta[axisID] === this.id && (!type || meta.type === type)) {
|
5957 |
-
result.push(meta);
|
5958 |
-
}
|
5959 |
-
}
|
5960 |
-
return result;
|
5961 |
-
}
|
5962 |
-
_resolveTickFontOptions(index) {
|
5963 |
-
const opts = this.options.ticks.setContext(this.getContext(index));
|
5964 |
-
return toFont(opts.font);
|
5965 |
-
}
|
5966 |
-
_maxDigits() {
|
5967 |
-
const fontSize = this._resolveTickFontOptions(0).lineHeight;
|
5968 |
-
return (this.isHorizontal() ? this.width : this.height) / fontSize;
|
5969 |
-
}
|
5970 |
-
}
|
5971 |
-
|
5972 |
-
class TypedRegistry {
|
5973 |
-
constructor(type, scope, override) {
|
5974 |
-
this.type = type;
|
5975 |
-
this.scope = scope;
|
5976 |
-
this.override = override;
|
5977 |
-
this.items = Object.create(null);
|
5978 |
-
}
|
5979 |
-
isForType(type) {
|
5980 |
-
return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);
|
5981 |
-
}
|
5982 |
-
register(item) {
|
5983 |
-
const proto = Object.getPrototypeOf(item);
|
5984 |
-
let parentScope;
|
5985 |
-
if (isIChartComponent(proto)) {
|
5986 |
-
parentScope = this.register(proto);
|
5987 |
-
}
|
5988 |
-
const items = this.items;
|
5989 |
-
const id = item.id;
|
5990 |
-
const scope = this.scope + '.' + id;
|
5991 |
-
if (!id) {
|
5992 |
-
throw new Error('class does not have id: ' + item);
|
5993 |
-
}
|
5994 |
-
if (id in items) {
|
5995 |
-
return scope;
|
5996 |
-
}
|
5997 |
-
items[id] = item;
|
5998 |
-
registerDefaults(item, scope, parentScope);
|
5999 |
-
if (this.override) {
|
6000 |
-
defaults.override(item.id, item.overrides);
|
6001 |
-
}
|
6002 |
-
return scope;
|
6003 |
-
}
|
6004 |
-
get(id) {
|
6005 |
-
return this.items[id];
|
6006 |
-
}
|
6007 |
-
unregister(item) {
|
6008 |
-
const items = this.items;
|
6009 |
-
const id = item.id;
|
6010 |
-
const scope = this.scope;
|
6011 |
-
if (id in items) {
|
6012 |
-
delete items[id];
|
6013 |
-
}
|
6014 |
-
if (scope && id in defaults[scope]) {
|
6015 |
-
delete defaults[scope][id];
|
6016 |
-
if (this.override) {
|
6017 |
-
delete overrides[id];
|
6018 |
-
}
|
6019 |
-
}
|
6020 |
-
}
|
6021 |
-
}
|
6022 |
-
function registerDefaults(item, scope, parentScope) {
|
6023 |
-
const itemDefaults = merge(Object.create(null), [
|
6024 |
-
parentScope ? defaults.get(parentScope) : {},
|
6025 |
-
defaults.get(scope),
|
6026 |
-
item.defaults
|
6027 |
-
]);
|
6028 |
-
defaults.set(scope, itemDefaults);
|
6029 |
-
if (item.defaultRoutes) {
|
6030 |
-
routeDefaults(scope, item.defaultRoutes);
|
6031 |
-
}
|
6032 |
-
if (item.descriptors) {
|
6033 |
-
defaults.describe(scope, item.descriptors);
|
6034 |
-
}
|
6035 |
-
}
|
6036 |
-
function routeDefaults(scope, routes) {
|
6037 |
-
Object.keys(routes).forEach(property => {
|
6038 |
-
const propertyParts = property.split('.');
|
6039 |
-
const sourceName = propertyParts.pop();
|
6040 |
-
const sourceScope = [scope].concat(propertyParts).join('.');
|
6041 |
-
const parts = routes[property].split('.');
|
6042 |
-
const targetName = parts.pop();
|
6043 |
-
const targetScope = parts.join('.');
|
6044 |
-
defaults.route(sourceScope, sourceName, targetScope, targetName);
|
6045 |
-
});
|
6046 |
-
}
|
6047 |
-
function isIChartComponent(proto) {
|
6048 |
-
return 'id' in proto && 'defaults' in proto;
|
6049 |
-
}
|
6050 |
-
|
6051 |
-
class Registry {
|
6052 |
-
constructor() {
|
6053 |
-
this.controllers = new TypedRegistry(DatasetController, 'datasets', true);
|
6054 |
-
this.elements = new TypedRegistry(Element, 'elements');
|
6055 |
-
this.plugins = new TypedRegistry(Object, 'plugins');
|
6056 |
-
this.scales = new TypedRegistry(Scale, 'scales');
|
6057 |
-
this._typedRegistries = [this.controllers, this.scales, this.elements];
|
6058 |
-
}
|
6059 |
-
add(...args) {
|
6060 |
-
this._each('register', args);
|
6061 |
-
}
|
6062 |
-
remove(...args) {
|
6063 |
-
this._each('unregister', args);
|
6064 |
-
}
|
6065 |
-
addControllers(...args) {
|
6066 |
-
this._each('register', args, this.controllers);
|
6067 |
-
}
|
6068 |
-
addElements(...args) {
|
6069 |
-
this._each('register', args, this.elements);
|
6070 |
-
}
|
6071 |
-
addPlugins(...args) {
|
6072 |
-
this._each('register', args, this.plugins);
|
6073 |
-
}
|
6074 |
-
addScales(...args) {
|
6075 |
-
this._each('register', args, this.scales);
|
6076 |
-
}
|
6077 |
-
getController(id) {
|
6078 |
-
return this._get(id, this.controllers, 'controller');
|
6079 |
-
}
|
6080 |
-
getElement(id) {
|
6081 |
-
return this._get(id, this.elements, 'element');
|
6082 |
-
}
|
6083 |
-
getPlugin(id) {
|
6084 |
-
return this._get(id, this.plugins, 'plugin');
|
6085 |
-
}
|
6086 |
-
getScale(id) {
|
6087 |
-
return this._get(id, this.scales, 'scale');
|
6088 |
-
}
|
6089 |
-
removeControllers(...args) {
|
6090 |
-
this._each('unregister', args, this.controllers);
|
6091 |
-
}
|
6092 |
-
removeElements(...args) {
|
6093 |
-
this._each('unregister', args, this.elements);
|
6094 |
-
}
|
6095 |
-
removePlugins(...args) {
|
6096 |
-
this._each('unregister', args, this.plugins);
|
6097 |
-
}
|
6098 |
-
removeScales(...args) {
|
6099 |
-
this._each('unregister', args, this.scales);
|
6100 |
-
}
|
6101 |
-
_each(method, args, typedRegistry) {
|
6102 |
-
[...args].forEach(arg => {
|
6103 |
-
const reg = typedRegistry || this._getRegistryForType(arg);
|
6104 |
-
if (typedRegistry || reg.isForType(arg) || (reg === this.plugins && arg.id)) {
|
6105 |
-
this._exec(method, reg, arg);
|
6106 |
-
} else {
|
6107 |
-
each(arg, item => {
|
6108 |
-
const itemReg = typedRegistry || this._getRegistryForType(item);
|
6109 |
-
this._exec(method, itemReg, item);
|
6110 |
-
});
|
6111 |
-
}
|
6112 |
-
});
|
6113 |
-
}
|
6114 |
-
_exec(method, registry, component) {
|
6115 |
-
const camelMethod = _capitalize(method);
|
6116 |
-
callback(component['before' + camelMethod], [], component);
|
6117 |
-
registry[method](component);
|
6118 |
-
callback(component['after' + camelMethod], [], component);
|
6119 |
-
}
|
6120 |
-
_getRegistryForType(type) {
|
6121 |
-
for (let i = 0; i < this._typedRegistries.length; i++) {
|
6122 |
-
const reg = this._typedRegistries[i];
|
6123 |
-
if (reg.isForType(type)) {
|
6124 |
-
return reg;
|
6125 |
-
}
|
6126 |
-
}
|
6127 |
-
return this.plugins;
|
6128 |
-
}
|
6129 |
-
_get(id, typedRegistry, type) {
|
6130 |
-
const item = typedRegistry.get(id);
|
6131 |
-
if (item === undefined) {
|
6132 |
-
throw new Error('"' + id + '" is not a registered ' + type + '.');
|
6133 |
-
}
|
6134 |
-
return item;
|
6135 |
-
}
|
6136 |
-
}
|
6137 |
-
var registry = new Registry();
|
6138 |
-
|
6139 |
-
class PluginService {
|
6140 |
-
constructor() {
|
6141 |
-
this._init = [];
|
6142 |
-
}
|
6143 |
-
notify(chart, hook, args, filter) {
|
6144 |
-
if (hook === 'beforeInit') {
|
6145 |
-
this._init = this._createDescriptors(chart, true);
|
6146 |
-
this._notify(this._init, chart, 'install');
|
6147 |
-
}
|
6148 |
-
const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);
|
6149 |
-
const result = this._notify(descriptors, chart, hook, args);
|
6150 |
-
if (hook === 'destroy') {
|
6151 |
-
this._notify(descriptors, chart, 'stop');
|
6152 |
-
this._notify(this._init, chart, 'uninstall');
|
6153 |
-
}
|
6154 |
-
return result;
|
6155 |
-
}
|
6156 |
-
_notify(descriptors, chart, hook, args) {
|
6157 |
-
args = args || {};
|
6158 |
-
for (const descriptor of descriptors) {
|
6159 |
-
const plugin = descriptor.plugin;
|
6160 |
-
const method = plugin[hook];
|
6161 |
-
const params = [chart, args, descriptor.options];
|
6162 |
-
if (callback(method, params, plugin) === false && args.cancelable) {
|
6163 |
-
return false;
|
6164 |
-
}
|
6165 |
-
}
|
6166 |
-
return true;
|
6167 |
-
}
|
6168 |
-
invalidate() {
|
6169 |
-
if (!isNullOrUndef(this._cache)) {
|
6170 |
-
this._oldCache = this._cache;
|
6171 |
-
this._cache = undefined;
|
6172 |
-
}
|
6173 |
-
}
|
6174 |
-
_descriptors(chart) {
|
6175 |
-
if (this._cache) {
|
6176 |
-
return this._cache;
|
6177 |
-
}
|
6178 |
-
const descriptors = this._cache = this._createDescriptors(chart);
|
6179 |
-
this._notifyStateChanges(chart);
|
6180 |
-
return descriptors;
|
6181 |
-
}
|
6182 |
-
_createDescriptors(chart, all) {
|
6183 |
-
const config = chart && chart.config;
|
6184 |
-
const options = valueOrDefault(config.options && config.options.plugins, {});
|
6185 |
-
const plugins = allPlugins(config);
|
6186 |
-
return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);
|
6187 |
-
}
|
6188 |
-
_notifyStateChanges(chart) {
|
6189 |
-
const previousDescriptors = this._oldCache || [];
|
6190 |
-
const descriptors = this._cache;
|
6191 |
-
const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));
|
6192 |
-
this._notify(diff(previousDescriptors, descriptors), chart, 'stop');
|
6193 |
-
this._notify(diff(descriptors, previousDescriptors), chart, 'start');
|
6194 |
-
}
|
6195 |
-
}
|
6196 |
-
function allPlugins(config) {
|
6197 |
-
const plugins = [];
|
6198 |
-
const keys = Object.keys(registry.plugins.items);
|
6199 |
-
for (let i = 0; i < keys.length; i++) {
|
6200 |
-
plugins.push(registry.getPlugin(keys[i]));
|
6201 |
-
}
|
6202 |
-
const local = config.plugins || [];
|
6203 |
-
for (let i = 0; i < local.length; i++) {
|
6204 |
-
const plugin = local[i];
|
6205 |
-
if (plugins.indexOf(plugin) === -1) {
|
6206 |
-
plugins.push(plugin);
|
6207 |
-
}
|
6208 |
-
}
|
6209 |
-
return plugins;
|
6210 |
-
}
|
6211 |
-
function getOpts(options, all) {
|
6212 |
-
if (!all && options === false) {
|
6213 |
-
return null;
|
6214 |
-
}
|
6215 |
-
if (options === true) {
|
6216 |
-
return {};
|
6217 |
-
}
|
6218 |
-
return options;
|
6219 |
-
}
|
6220 |
-
function createDescriptors(chart, plugins, options, all) {
|
6221 |
-
const result = [];
|
6222 |
-
const context = chart.getContext();
|
6223 |
-
for (let i = 0; i < plugins.length; i++) {
|
6224 |
-
const plugin = plugins[i];
|
6225 |
-
const id = plugin.id;
|
6226 |
-
const opts = getOpts(options[id], all);
|
6227 |
-
if (opts === null) {
|
6228 |
-
continue;
|
6229 |
-
}
|
6230 |
-
result.push({
|
6231 |
-
plugin,
|
6232 |
-
options: pluginOpts(chart.config, plugin, opts, context)
|
6233 |
-
});
|
6234 |
-
}
|
6235 |
-
return result;
|
6236 |
-
}
|
6237 |
-
function pluginOpts(config, plugin, opts, context) {
|
6238 |
-
const keys = config.pluginScopeKeys(plugin);
|
6239 |
-
const scopes = config.getOptionScopes(opts, keys);
|
6240 |
-
return config.createResolver(scopes, context, [''], {scriptable: false, indexable: false, allKeys: true});
|
6241 |
-
}
|
6242 |
-
|
6243 |
-
function getIndexAxis(type, options) {
|
6244 |
-
const datasetDefaults = defaults.datasets[type] || {};
|
6245 |
-
const datasetOptions = (options.datasets || {})[type] || {};
|
6246 |
-
return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';
|
6247 |
-
}
|
6248 |
-
function getAxisFromDefaultScaleID(id, indexAxis) {
|
6249 |
-
let axis = id;
|
6250 |
-
if (id === '_index_') {
|
6251 |
-
axis = indexAxis;
|
6252 |
-
} else if (id === '_value_') {
|
6253 |
-
axis = indexAxis === 'x' ? 'y' : 'x';
|
6254 |
-
}
|
6255 |
-
return axis;
|
6256 |
-
}
|
6257 |
-
function getDefaultScaleIDFromAxis(axis, indexAxis) {
|
6258 |
-
return axis === indexAxis ? '_index_' : '_value_';
|
6259 |
-
}
|
6260 |
-
function axisFromPosition(position) {
|
6261 |
-
if (position === 'top' || position === 'bottom') {
|
6262 |
-
return 'x';
|
6263 |
-
}
|
6264 |
-
if (position === 'left' || position === 'right') {
|
6265 |
-
return 'y';
|
6266 |
-
}
|
6267 |
-
}
|
6268 |
-
function determineAxis(id, scaleOptions) {
|
6269 |
-
if (id === 'x' || id === 'y') {
|
6270 |
-
return id;
|
6271 |
-
}
|
6272 |
-
return scaleOptions.axis || axisFromPosition(scaleOptions.position) || id.charAt(0).toLowerCase();
|
6273 |
-
}
|
6274 |
-
function mergeScaleConfig(config, options) {
|
6275 |
-
const chartDefaults = overrides[config.type] || {scales: {}};
|
6276 |
-
const configScales = options.scales || {};
|
6277 |
-
const chartIndexAxis = getIndexAxis(config.type, options);
|
6278 |
-
const firstIDs = Object.create(null);
|
6279 |
-
const scales = Object.create(null);
|
6280 |
-
Object.keys(configScales).forEach(id => {
|
6281 |
-
const scaleConf = configScales[id];
|
6282 |
-
if (!isObject(scaleConf)) {
|
6283 |
-
return console.error(`Invalid scale configuration for scale: ${id}`);
|
6284 |
-
}
|
6285 |
-
if (scaleConf._proxy) {
|
6286 |
-
return console.warn(`Ignoring resolver passed as options for scale: ${id}`);
|
6287 |
-
}
|
6288 |
-
const axis = determineAxis(id, scaleConf);
|
6289 |
-
const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);
|
6290 |
-
const defaultScaleOptions = chartDefaults.scales || {};
|
6291 |
-
firstIDs[axis] = firstIDs[axis] || id;
|
6292 |
-
scales[id] = mergeIf(Object.create(null), [{axis}, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]);
|
6293 |
-
});
|
6294 |
-
config.data.datasets.forEach(dataset => {
|
6295 |
-
const type = dataset.type || config.type;
|
6296 |
-
const indexAxis = dataset.indexAxis || getIndexAxis(type, options);
|
6297 |
-
const datasetDefaults = overrides[type] || {};
|
6298 |
-
const defaultScaleOptions = datasetDefaults.scales || {};
|
6299 |
-
Object.keys(defaultScaleOptions).forEach(defaultID => {
|
6300 |
-
const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);
|
6301 |
-
const id = dataset[axis + 'AxisID'] || firstIDs[axis] || axis;
|
6302 |
-
scales[id] = scales[id] || Object.create(null);
|
6303 |
-
mergeIf(scales[id], [{axis}, configScales[id], defaultScaleOptions[defaultID]]);
|
6304 |
-
});
|
6305 |
-
});
|
6306 |
-
Object.keys(scales).forEach(key => {
|
6307 |
-
const scale = scales[key];
|
6308 |
-
mergeIf(scale, [defaults.scales[scale.type], defaults.scale]);
|
6309 |
-
});
|
6310 |
-
return scales;
|
6311 |
-
}
|
6312 |
-
function initOptions(config) {
|
6313 |
-
const options = config.options || (config.options = {});
|
6314 |
-
options.plugins = valueOrDefault(options.plugins, {});
|
6315 |
-
options.scales = mergeScaleConfig(config, options);
|
6316 |
-
}
|
6317 |
-
function initData(data) {
|
6318 |
-
data = data || {};
|
6319 |
-
data.datasets = data.datasets || [];
|
6320 |
-
data.labels = data.labels || [];
|
6321 |
-
return data;
|
6322 |
-
}
|
6323 |
-
function initConfig(config) {
|
6324 |
-
config = config || {};
|
6325 |
-
config.data = initData(config.data);
|
6326 |
-
initOptions(config);
|
6327 |
-
return config;
|
6328 |
-
}
|
6329 |
-
const keyCache = new Map();
|
6330 |
-
const keysCached = new Set();
|
6331 |
-
function cachedKeys(cacheKey, generate) {
|
6332 |
-
let keys = keyCache.get(cacheKey);
|
6333 |
-
if (!keys) {
|
6334 |
-
keys = generate();
|
6335 |
-
keyCache.set(cacheKey, keys);
|
6336 |
-
keysCached.add(keys);
|
6337 |
-
}
|
6338 |
-
return keys;
|
6339 |
-
}
|
6340 |
-
const addIfFound = (set, obj, key) => {
|
6341 |
-
const opts = resolveObjectKey(obj, key);
|
6342 |
-
if (opts !== undefined) {
|
6343 |
-
set.add(opts);
|
6344 |
-
}
|
6345 |
-
};
|
6346 |
-
class Config {
|
6347 |
-
constructor(config) {
|
6348 |
-
this._config = initConfig(config);
|
6349 |
-
this._scopeCache = new Map();
|
6350 |
-
this._resolverCache = new Map();
|
6351 |
-
}
|
6352 |
-
get platform() {
|
6353 |
-
return this._config.platform;
|
6354 |
-
}
|
6355 |
-
get type() {
|
6356 |
-
return this._config.type;
|
6357 |
-
}
|
6358 |
-
set type(type) {
|
6359 |
-
this._config.type = type;
|
6360 |
-
}
|
6361 |
-
get data() {
|
6362 |
-
return this._config.data;
|
6363 |
-
}
|
6364 |
-
set data(data) {
|
6365 |
-
this._config.data = initData(data);
|
6366 |
-
}
|
6367 |
-
get options() {
|
6368 |
-
return this._config.options;
|
6369 |
-
}
|
6370 |
-
set options(options) {
|
6371 |
-
this._config.options = options;
|
6372 |
-
}
|
6373 |
-
get plugins() {
|
6374 |
-
return this._config.plugins;
|
6375 |
-
}
|
6376 |
-
update() {
|
6377 |
-
const config = this._config;
|
6378 |
-
this.clearCache();
|
6379 |
-
initOptions(config);
|
6380 |
-
}
|
6381 |
-
clearCache() {
|
6382 |
-
this._scopeCache.clear();
|
6383 |
-
this._resolverCache.clear();
|
6384 |
-
}
|
6385 |
-
datasetScopeKeys(datasetType) {
|
6386 |
-
return cachedKeys(datasetType,
|
6387 |
-
() => [[
|
6388 |
-
`datasets.${datasetType}`,
|
6389 |
-
''
|
6390 |
-
]]);
|
6391 |
-
}
|
6392 |
-
datasetAnimationScopeKeys(datasetType, transition) {
|
6393 |
-
return cachedKeys(`${datasetType}.transition.${transition}`,
|
6394 |
-
() => [
|
6395 |
-
[
|
6396 |
-
`datasets.${datasetType}.transitions.${transition}`,
|
6397 |
-
`transitions.${transition}`,
|
6398 |
-
],
|
6399 |
-
[
|
6400 |
-
`datasets.${datasetType}`,
|
6401 |
-
''
|
6402 |
-
]
|
6403 |
-
]);
|
6404 |
-
}
|
6405 |
-
datasetElementScopeKeys(datasetType, elementType) {
|
6406 |
-
return cachedKeys(`${datasetType}-${elementType}`,
|
6407 |
-
() => [[
|
6408 |
-
`datasets.${datasetType}.elements.${elementType}`,
|
6409 |
-
`datasets.${datasetType}`,
|
6410 |
-
`elements.${elementType}`,
|
6411 |
-
''
|
6412 |
-
]]);
|
6413 |
-
}
|
6414 |
-
pluginScopeKeys(plugin) {
|
6415 |
-
const id = plugin.id;
|
6416 |
-
const type = this.type;
|
6417 |
-
return cachedKeys(`${type}-plugin-${id}`,
|
6418 |
-
() => [[
|
6419 |
-
`plugins.${id}`,
|
6420 |
-
...plugin.additionalOptionScopes || [],
|
6421 |
-
]]);
|
6422 |
-
}
|
6423 |
-
_cachedScopes(mainScope, resetCache) {
|
6424 |
-
const _scopeCache = this._scopeCache;
|
6425 |
-
let cache = _scopeCache.get(mainScope);
|
6426 |
-
if (!cache || resetCache) {
|
6427 |
-
cache = new Map();
|
6428 |
-
_scopeCache.set(mainScope, cache);
|
6429 |
-
}
|
6430 |
-
return cache;
|
6431 |
-
}
|
6432 |
-
getOptionScopes(mainScope, keyLists, resetCache) {
|
6433 |
-
const {options, type} = this;
|
6434 |
-
const cache = this._cachedScopes(mainScope, resetCache);
|
6435 |
-
const cached = cache.get(keyLists);
|
6436 |
-
if (cached) {
|
6437 |
-
return cached;
|
6438 |
-
}
|
6439 |
-
const scopes = new Set();
|
6440 |
-
keyLists.forEach(keys => {
|
6441 |
-
if (mainScope) {
|
6442 |
-
scopes.add(mainScope);
|
6443 |
-
keys.forEach(key => addIfFound(scopes, mainScope, key));
|
6444 |
-
}
|
6445 |
-
keys.forEach(key => addIfFound(scopes, options, key));
|
6446 |
-
keys.forEach(key => addIfFound(scopes, overrides[type] || {}, key));
|
6447 |
-
keys.forEach(key => addIfFound(scopes, defaults, key));
|
6448 |
-
keys.forEach(key => addIfFound(scopes, descriptors, key));
|
6449 |
-
});
|
6450 |
-
const array = Array.from(scopes);
|
6451 |
-
if (array.length === 0) {
|
6452 |
-
array.push(Object.create(null));
|
6453 |
-
}
|
6454 |
-
if (keysCached.has(keyLists)) {
|
6455 |
-
cache.set(keyLists, array);
|
6456 |
-
}
|
6457 |
-
return array;
|
6458 |
-
}
|
6459 |
-
chartOptionScopes() {
|
6460 |
-
const {options, type} = this;
|
6461 |
-
return [
|
6462 |
-
options,
|
6463 |
-
overrides[type] || {},
|
6464 |
-
defaults.datasets[type] || {},
|
6465 |
-
{type},
|
6466 |
-
defaults,
|
6467 |
-
descriptors
|
6468 |
-
];
|
6469 |
-
}
|
6470 |
-
resolveNamedOptions(scopes, names, context, prefixes = ['']) {
|
6471 |
-
const result = {$shared: true};
|
6472 |
-
const {resolver, subPrefixes} = getResolver(this._resolverCache, scopes, prefixes);
|
6473 |
-
let options = resolver;
|
6474 |
-
if (needContext(resolver, names)) {
|
6475 |
-
result.$shared = false;
|
6476 |
-
context = isFunction(context) ? context() : context;
|
6477 |
-
const subResolver = this.createResolver(scopes, context, subPrefixes);
|
6478 |
-
options = _attachContext(resolver, context, subResolver);
|
6479 |
-
}
|
6480 |
-
for (const prop of names) {
|
6481 |
-
result[prop] = options[prop];
|
6482 |
-
}
|
6483 |
-
return result;
|
6484 |
-
}
|
6485 |
-
createResolver(scopes, context, prefixes = [''], descriptorDefaults) {
|
6486 |
-
const {resolver} = getResolver(this._resolverCache, scopes, prefixes);
|
6487 |
-
return isObject(context)
|
6488 |
-
? _attachContext(resolver, context, undefined, descriptorDefaults)
|
6489 |
-
: resolver;
|
6490 |
-
}
|
6491 |
-
}
|
6492 |
-
function getResolver(resolverCache, scopes, prefixes) {
|
6493 |
-
let cache = resolverCache.get(scopes);
|
6494 |
-
if (!cache) {
|
6495 |
-
cache = new Map();
|
6496 |
-
resolverCache.set(scopes, cache);
|
6497 |
-
}
|
6498 |
-
const cacheKey = prefixes.join();
|
6499 |
-
let cached = cache.get(cacheKey);
|
6500 |
-
if (!cached) {
|
6501 |
-
const resolver = _createResolver(scopes, prefixes);
|
6502 |
-
cached = {
|
6503 |
-
resolver,
|
6504 |
-
subPrefixes: prefixes.filter(p => !p.toLowerCase().includes('hover'))
|
6505 |
-
};
|
6506 |
-
cache.set(cacheKey, cached);
|
6507 |
-
}
|
6508 |
-
return cached;
|
6509 |
-
}
|
6510 |
-
const hasFunction = value => isObject(value)
|
6511 |
-
&& Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false);
|
6512 |
-
function needContext(proxy, names) {
|
6513 |
-
const {isScriptable, isIndexable} = _descriptors(proxy);
|
6514 |
-
for (const prop of names) {
|
6515 |
-
const scriptable = isScriptable(prop);
|
6516 |
-
const indexable = isIndexable(prop);
|
6517 |
-
const value = (indexable || scriptable) && proxy[prop];
|
6518 |
-
if ((scriptable && (isFunction(value) || hasFunction(value)))
|
6519 |
-
|| (indexable && isArray(value))) {
|
6520 |
-
return true;
|
6521 |
-
}
|
6522 |
-
}
|
6523 |
-
return false;
|
6524 |
-
}
|
6525 |
-
|
6526 |
-
var version = "3.6.2";
|
6527 |
-
|
6528 |
-
const KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];
|
6529 |
-
function positionIsHorizontal(position, axis) {
|
6530 |
-
return position === 'top' || position === 'bottom' || (KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x');
|
6531 |
-
}
|
6532 |
-
function compare2Level(l1, l2) {
|
6533 |
-
return function(a, b) {
|
6534 |
-
return a[l1] === b[l1]
|
6535 |
-
? a[l2] - b[l2]
|
6536 |
-
: a[l1] - b[l1];
|
6537 |
-
};
|
6538 |
-
}
|
6539 |
-
function onAnimationsComplete(context) {
|
6540 |
-
const chart = context.chart;
|
6541 |
-
const animationOptions = chart.options.animation;
|
6542 |
-
chart.notifyPlugins('afterRender');
|
6543 |
-
callback(animationOptions && animationOptions.onComplete, [context], chart);
|
6544 |
-
}
|
6545 |
-
function onAnimationProgress(context) {
|
6546 |
-
const chart = context.chart;
|
6547 |
-
const animationOptions = chart.options.animation;
|
6548 |
-
callback(animationOptions && animationOptions.onProgress, [context], chart);
|
6549 |
-
}
|
6550 |
-
function getCanvas(item) {
|
6551 |
-
if (_isDomSupported() && typeof item === 'string') {
|
6552 |
-
item = document.getElementById(item);
|
6553 |
-
} else if (item && item.length) {
|
6554 |
-
item = item[0];
|
6555 |
-
}
|
6556 |
-
if (item && item.canvas) {
|
6557 |
-
item = item.canvas;
|
6558 |
-
}
|
6559 |
-
return item;
|
6560 |
-
}
|
6561 |
-
const instances = {};
|
6562 |
-
const getChart = (key) => {
|
6563 |
-
const canvas = getCanvas(key);
|
6564 |
-
return Object.values(instances).filter((c) => c.canvas === canvas).pop();
|
6565 |
-
};
|
6566 |
-
function moveNumericKeys(obj, start, move) {
|
6567 |
-
const keys = Object.keys(obj);
|
6568 |
-
for (const key of keys) {
|
6569 |
-
const intKey = +key;
|
6570 |
-
if (intKey >= start) {
|
6571 |
-
const value = obj[key];
|
6572 |
-
delete obj[key];
|
6573 |
-
if (move > 0 || intKey > start) {
|
6574 |
-
obj[intKey + move] = value;
|
6575 |
-
}
|
6576 |
-
}
|
6577 |
-
}
|
6578 |
-
}
|
6579 |
-
class Chart {
|
6580 |
-
constructor(item, userConfig) {
|
6581 |
-
const config = this.config = new Config(userConfig);
|
6582 |
-
const initialCanvas = getCanvas(item);
|
6583 |
-
const existingChart = getChart(initialCanvas);
|
6584 |
-
if (existingChart) {
|
6585 |
-
throw new Error(
|
6586 |
-
'Canvas is already in use. Chart with ID \'' + existingChart.id + '\'' +
|
6587 |
-
' must be destroyed before the canvas can be reused.'
|
6588 |
-
);
|
6589 |
-
}
|
6590 |
-
const options = config.createResolver(config.chartOptionScopes(), this.getContext());
|
6591 |
-
this.platform = new (config.platform || _detectPlatform(initialCanvas))();
|
6592 |
-
this.platform.updateConfig(config);
|
6593 |
-
const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);
|
6594 |
-
const canvas = context && context.canvas;
|
6595 |
-
const height = canvas && canvas.height;
|
6596 |
-
const width = canvas && canvas.width;
|
6597 |
-
this.id = uid();
|
6598 |
-
this.ctx = context;
|
6599 |
-
this.canvas = canvas;
|
6600 |
-
this.width = width;
|
6601 |
-
this.height = height;
|
6602 |
-
this._options = options;
|
6603 |
-
this._aspectRatio = this.aspectRatio;
|
6604 |
-
this._layers = [];
|
6605 |
-
this._metasets = [];
|
6606 |
-
this._stacks = undefined;
|
6607 |
-
this.boxes = [];
|
6608 |
-
this.currentDevicePixelRatio = undefined;
|
6609 |
-
this.chartArea = undefined;
|
6610 |
-
this._active = [];
|
6611 |
-
this._lastEvent = undefined;
|
6612 |
-
this._listeners = {};
|
6613 |
-
this._responsiveListeners = undefined;
|
6614 |
-
this._sortedMetasets = [];
|
6615 |
-
this.scales = {};
|
6616 |
-
this._plugins = new PluginService();
|
6617 |
-
this.$proxies = {};
|
6618 |
-
this._hiddenIndices = {};
|
6619 |
-
this.attached = false;
|
6620 |
-
this._animationsDisabled = undefined;
|
6621 |
-
this.$context = undefined;
|
6622 |
-
this._doResize = debounce(mode => this.update(mode), options.resizeDelay || 0);
|
6623 |
-
this._dataChanges = [];
|
6624 |
-
instances[this.id] = this;
|
6625 |
-
if (!context || !canvas) {
|
6626 |
-
console.error("Failed to create chart: can't acquire context from the given item");
|
6627 |
-
return;
|
6628 |
-
}
|
6629 |
-
animator.listen(this, 'complete', onAnimationsComplete);
|
6630 |
-
animator.listen(this, 'progress', onAnimationProgress);
|
6631 |
-
this._initialize();
|
6632 |
-
if (this.attached) {
|
6633 |
-
this.update();
|
6634 |
-
}
|
6635 |
-
}
|
6636 |
-
get aspectRatio() {
|
6637 |
-
const {options: {aspectRatio, maintainAspectRatio}, width, height, _aspectRatio} = this;
|
6638 |
-
if (!isNullOrUndef(aspectRatio)) {
|
6639 |
-
return aspectRatio;
|
6640 |
-
}
|
6641 |
-
if (maintainAspectRatio && _aspectRatio) {
|
6642 |
-
return _aspectRatio;
|
6643 |
-
}
|
6644 |
-
return height ? width / height : null;
|
6645 |
-
}
|
6646 |
-
get data() {
|
6647 |
-
return this.config.data;
|
6648 |
-
}
|
6649 |
-
set data(data) {
|
6650 |
-
this.config.data = data;
|
6651 |
-
}
|
6652 |
-
get options() {
|
6653 |
-
return this._options;
|
6654 |
-
}
|
6655 |
-
set options(options) {
|
6656 |
-
this.config.options = options;
|
6657 |
-
}
|
6658 |
-
_initialize() {
|
6659 |
-
this.notifyPlugins('beforeInit');
|
6660 |
-
if (this.options.responsive) {
|
6661 |
-
this.resize();
|
6662 |
-
} else {
|
6663 |
-
retinaScale(this, this.options.devicePixelRatio);
|
6664 |
-
}
|
6665 |
-
this.bindEvents();
|
6666 |
-
this.notifyPlugins('afterInit');
|
6667 |
-
return this;
|
6668 |
-
}
|
6669 |
-
clear() {
|
6670 |
-
clearCanvas(this.canvas, this.ctx);
|
6671 |
-
return this;
|
6672 |
-
}
|
6673 |
-
stop() {
|
6674 |
-
animator.stop(this);
|
6675 |
-
return this;
|
6676 |
-
}
|
6677 |
-
resize(width, height) {
|
6678 |
-
if (!animator.running(this)) {
|
6679 |
-
this._resize(width, height);
|
6680 |
-
} else {
|
6681 |
-
this._resizeBeforeDraw = {width, height};
|
6682 |
-
}
|
6683 |
-
}
|
6684 |
-
_resize(width, height) {
|
6685 |
-
const options = this.options;
|
6686 |
-
const canvas = this.canvas;
|
6687 |
-
const aspectRatio = options.maintainAspectRatio && this.aspectRatio;
|
6688 |
-
const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);
|
6689 |
-
const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();
|
6690 |
-
const mode = this.width ? 'resize' : 'attach';
|
6691 |
-
this.width = newSize.width;
|
6692 |
-
this.height = newSize.height;
|
6693 |
-
this._aspectRatio = this.aspectRatio;
|
6694 |
-
if (!retinaScale(this, newRatio, true)) {
|
6695 |
-
return;
|
6696 |
-
}
|
6697 |
-
this.notifyPlugins('resize', {size: newSize});
|
6698 |
-
callback(options.onResize, [this, newSize], this);
|
6699 |
-
if (this.attached) {
|
6700 |
-
if (this._doResize(mode)) {
|
6701 |
-
this.render();
|
6702 |
-
}
|
6703 |
-
}
|
6704 |
-
}
|
6705 |
-
ensureScalesHaveIDs() {
|
6706 |
-
const options = this.options;
|
6707 |
-
const scalesOptions = options.scales || {};
|
6708 |
-
each(scalesOptions, (axisOptions, axisID) => {
|
6709 |
-
axisOptions.id = axisID;
|
6710 |
-
});
|
6711 |
-
}
|
6712 |
-
buildOrUpdateScales() {
|
6713 |
-
const options = this.options;
|
6714 |
-
const scaleOpts = options.scales;
|
6715 |
-
const scales = this.scales;
|
6716 |
-
const updated = Object.keys(scales).reduce((obj, id) => {
|
6717 |
-
obj[id] = false;
|
6718 |
-
return obj;
|
6719 |
-
}, {});
|
6720 |
-
let items = [];
|
6721 |
-
if (scaleOpts) {
|
6722 |
-
items = items.concat(
|
6723 |
-
Object.keys(scaleOpts).map((id) => {
|
6724 |
-
const scaleOptions = scaleOpts[id];
|
6725 |
-
const axis = determineAxis(id, scaleOptions);
|
6726 |
-
const isRadial = axis === 'r';
|
6727 |
-
const isHorizontal = axis === 'x';
|
6728 |
-
return {
|
6729 |
-
options: scaleOptions,
|
6730 |
-
dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',
|
6731 |
-
dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'
|
6732 |
-
};
|
6733 |
-
})
|
6734 |
-
);
|
6735 |
-
}
|
6736 |
-
each(items, (item) => {
|
6737 |
-
const scaleOptions = item.options;
|
6738 |
-
const id = scaleOptions.id;
|
6739 |
-
const axis = determineAxis(id, scaleOptions);
|
6740 |
-
const scaleType = valueOrDefault(scaleOptions.type, item.dtype);
|
6741 |
-
if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {
|
6742 |
-
scaleOptions.position = item.dposition;
|
6743 |
-
}
|
6744 |
-
updated[id] = true;
|
6745 |
-
let scale = null;
|
6746 |
-
if (id in scales && scales[id].type === scaleType) {
|
6747 |
-
scale = scales[id];
|
6748 |
-
} else {
|
6749 |
-
const scaleClass = registry.getScale(scaleType);
|
6750 |
-
scale = new scaleClass({
|
6751 |
-
id,
|
6752 |
-
type: scaleType,
|
6753 |
-
ctx: this.ctx,
|
6754 |
-
chart: this
|
6755 |
-
});
|
6756 |
-
scales[scale.id] = scale;
|
6757 |
-
}
|
6758 |
-
scale.init(scaleOptions, options);
|
6759 |
-
});
|
6760 |
-
each(updated, (hasUpdated, id) => {
|
6761 |
-
if (!hasUpdated) {
|
6762 |
-
delete scales[id];
|
6763 |
-
}
|
6764 |
-
});
|
6765 |
-
each(scales, (scale) => {
|
6766 |
-
layouts.configure(this, scale, scale.options);
|
6767 |
-
layouts.addBox(this, scale);
|
6768 |
-
});
|
6769 |
-
}
|
6770 |
-
_updateMetasets() {
|
6771 |
-
const metasets = this._metasets;
|
6772 |
-
const numData = this.data.datasets.length;
|
6773 |
-
const numMeta = metasets.length;
|
6774 |
-
metasets.sort((a, b) => a.index - b.index);
|
6775 |
-
if (numMeta > numData) {
|
6776 |
-
for (let i = numData; i < numMeta; ++i) {
|
6777 |
-
this._destroyDatasetMeta(i);
|
6778 |
-
}
|
6779 |
-
metasets.splice(numData, numMeta - numData);
|
6780 |
-
}
|
6781 |
-
this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));
|
6782 |
-
}
|
6783 |
-
_removeUnreferencedMetasets() {
|
6784 |
-
const {_metasets: metasets, data: {datasets}} = this;
|
6785 |
-
if (metasets.length > datasets.length) {
|
6786 |
-
delete this._stacks;
|
6787 |
-
}
|
6788 |
-
metasets.forEach((meta, index) => {
|
6789 |
-
if (datasets.filter(x => x === meta._dataset).length === 0) {
|
6790 |
-
this._destroyDatasetMeta(index);
|
6791 |
-
}
|
6792 |
-
});
|
6793 |
-
}
|
6794 |
-
buildOrUpdateControllers() {
|
6795 |
-
const newControllers = [];
|
6796 |
-
const datasets = this.data.datasets;
|
6797 |
-
let i, ilen;
|
6798 |
-
this._removeUnreferencedMetasets();
|
6799 |
-
for (i = 0, ilen = datasets.length; i < ilen; i++) {
|
6800 |
-
const dataset = datasets[i];
|
6801 |
-
let meta = this.getDatasetMeta(i);
|
6802 |
-
const type = dataset.type || this.config.type;
|
6803 |
-
if (meta.type && meta.type !== type) {
|
6804 |
-
this._destroyDatasetMeta(i);
|
6805 |
-
meta = this.getDatasetMeta(i);
|
6806 |
-
}
|
6807 |
-
meta.type = type;
|
6808 |
-
meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);
|
6809 |
-
meta.order = dataset.order || 0;
|
6810 |
-
meta.index = i;
|
6811 |
-
meta.label = '' + dataset.label;
|
6812 |
-
meta.visible = this.isDatasetVisible(i);
|
6813 |
-
if (meta.controller) {
|
6814 |
-
meta.controller.updateIndex(i);
|
6815 |
-
meta.controller.linkScales();
|
6816 |
-
} else {
|
6817 |
-
const ControllerClass = registry.getController(type);
|
6818 |
-
const {datasetElementType, dataElementType} = defaults.datasets[type];
|
6819 |
-
Object.assign(ControllerClass.prototype, {
|
6820 |
-
dataElementType: registry.getElement(dataElementType),
|
6821 |
-
datasetElementType: datasetElementType && registry.getElement(datasetElementType)
|
6822 |
-
});
|
6823 |
-
meta.controller = new ControllerClass(this, i);
|
6824 |
-
newControllers.push(meta.controller);
|
6825 |
-
}
|
6826 |
-
}
|
6827 |
-
this._updateMetasets();
|
6828 |
-
return newControllers;
|
6829 |
-
}
|
6830 |
-
_resetElements() {
|
6831 |
-
each(this.data.datasets, (dataset, datasetIndex) => {
|
6832 |
-
this.getDatasetMeta(datasetIndex).controller.reset();
|
6833 |
-
}, this);
|
6834 |
-
}
|
6835 |
-
reset() {
|
6836 |
-
this._resetElements();
|
6837 |
-
this.notifyPlugins('reset');
|
6838 |
-
}
|
6839 |
-
update(mode) {
|
6840 |
-
const config = this.config;
|
6841 |
-
config.update();
|
6842 |
-
const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());
|
6843 |
-
const animsDisabled = this._animationsDisabled = !options.animation;
|
6844 |
-
this._updateScales();
|
6845 |
-
this._checkEventBindings();
|
6846 |
-
this._updateHiddenIndices();
|
6847 |
-
this._plugins.invalidate();
|
6848 |
-
if (this.notifyPlugins('beforeUpdate', {mode, cancelable: true}) === false) {
|
6849 |
-
return;
|
6850 |
-
}
|
6851 |
-
const newControllers = this.buildOrUpdateControllers();
|
6852 |
-
this.notifyPlugins('beforeElementsUpdate');
|
6853 |
-
let minPadding = 0;
|
6854 |
-
for (let i = 0, ilen = this.data.datasets.length; i < ilen; i++) {
|
6855 |
-
const {controller} = this.getDatasetMeta(i);
|
6856 |
-
const reset = !animsDisabled && newControllers.indexOf(controller) === -1;
|
6857 |
-
controller.buildOrUpdateElements(reset);
|
6858 |
-
minPadding = Math.max(+controller.getMaxOverflow(), minPadding);
|
6859 |
-
}
|
6860 |
-
minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;
|
6861 |
-
this._updateLayout(minPadding);
|
6862 |
-
if (!animsDisabled) {
|
6863 |
-
each(newControllers, (controller) => {
|
6864 |
-
controller.reset();
|
6865 |
-
});
|
6866 |
-
}
|
6867 |
-
this._updateDatasets(mode);
|
6868 |
-
this.notifyPlugins('afterUpdate', {mode});
|
6869 |
-
this._layers.sort(compare2Level('z', '_idx'));
|
6870 |
-
if (this._lastEvent) {
|
6871 |
-
this._eventHandler(this._lastEvent, true);
|
6872 |
-
}
|
6873 |
-
this.render();
|
6874 |
-
}
|
6875 |
-
_updateScales() {
|
6876 |
-
each(this.scales, (scale) => {
|
6877 |
-
layouts.removeBox(this, scale);
|
6878 |
-
});
|
6879 |
-
this.ensureScalesHaveIDs();
|
6880 |
-
this.buildOrUpdateScales();
|
6881 |
-
}
|
6882 |
-
_checkEventBindings() {
|
6883 |
-
const options = this.options;
|
6884 |
-
const existingEvents = new Set(Object.keys(this._listeners));
|
6885 |
-
const newEvents = new Set(options.events);
|
6886 |
-
if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {
|
6887 |
-
this.unbindEvents();
|
6888 |
-
this.bindEvents();
|
6889 |
-
}
|
6890 |
-
}
|
6891 |
-
_updateHiddenIndices() {
|
6892 |
-
const {_hiddenIndices} = this;
|
6893 |
-
const changes = this._getUniformDataChanges() || [];
|
6894 |
-
for (const {method, start, count} of changes) {
|
6895 |
-
const move = method === '_removeElements' ? -count : count;
|
6896 |
-
moveNumericKeys(_hiddenIndices, start, move);
|
6897 |
-
}
|
6898 |
-
}
|
6899 |
-
_getUniformDataChanges() {
|
6900 |
-
const _dataChanges = this._dataChanges;
|
6901 |
-
if (!_dataChanges || !_dataChanges.length) {
|
6902 |
-
return;
|
6903 |
-
}
|
6904 |
-
this._dataChanges = [];
|
6905 |
-
const datasetCount = this.data.datasets.length;
|
6906 |
-
const makeSet = (idx) => new Set(
|
6907 |
-
_dataChanges
|
6908 |
-
.filter(c => c[0] === idx)
|
6909 |
-
.map((c, i) => i + ',' + c.splice(1).join(','))
|
6910 |
-
);
|
6911 |
-
const changeSet = makeSet(0);
|
6912 |
-
for (let i = 1; i < datasetCount; i++) {
|
6913 |
-
if (!setsEqual(changeSet, makeSet(i))) {
|
6914 |
-
return;
|
6915 |
-
}
|
6916 |
-
}
|
6917 |
-
return Array.from(changeSet)
|
6918 |
-
.map(c => c.split(','))
|
6919 |
-
.map(a => ({method: a[1], start: +a[2], count: +a[3]}));
|
6920 |
-
}
|
6921 |
-
_updateLayout(minPadding) {
|
6922 |
-
if (this.notifyPlugins('beforeLayout', {cancelable: true}) === false) {
|
6923 |
-
return;
|
6924 |
-
}
|
6925 |
-
layouts.update(this, this.width, this.height, minPadding);
|
6926 |
-
const area = this.chartArea;
|
6927 |
-
const noArea = area.width <= 0 || area.height <= 0;
|
6928 |
-
this._layers = [];
|
6929 |
-
each(this.boxes, (box) => {
|
6930 |
-
if (noArea && box.position === 'chartArea') {
|
6931 |
-
return;
|
6932 |
-
}
|
6933 |
-
if (box.configure) {
|
6934 |
-
box.configure();
|
6935 |
-
}
|
6936 |
-
this._layers.push(...box._layers());
|
6937 |
-
}, this);
|
6938 |
-
this._layers.forEach((item, index) => {
|
6939 |
-
item._idx = index;
|
6940 |
-
});
|
6941 |
-
this.notifyPlugins('afterLayout');
|
6942 |
-
}
|
6943 |
-
_updateDatasets(mode) {
|
6944 |
-
if (this.notifyPlugins('beforeDatasetsUpdate', {mode, cancelable: true}) === false) {
|
6945 |
-
return;
|
6946 |
-
}
|
6947 |
-
for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {
|
6948 |
-
this.getDatasetMeta(i).controller.configure();
|
6949 |
-
}
|
6950 |
-
for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {
|
6951 |
-
this._updateDataset(i, isFunction(mode) ? mode({datasetIndex: i}) : mode);
|
6952 |
-
}
|
6953 |
-
this.notifyPlugins('afterDatasetsUpdate', {mode});
|
6954 |
-
}
|
6955 |
-
_updateDataset(index, mode) {
|
6956 |
-
const meta = this.getDatasetMeta(index);
|
6957 |
-
const args = {meta, index, mode, cancelable: true};
|
6958 |
-
if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {
|
6959 |
-
return;
|
6960 |
-
}
|
6961 |
-
meta.controller._update(mode);
|
6962 |
-
args.cancelable = false;
|
6963 |
-
this.notifyPlugins('afterDatasetUpdate', args);
|
6964 |
-
}
|
6965 |
-
render() {
|
6966 |
-
if (this.notifyPlugins('beforeRender', {cancelable: true}) === false) {
|
6967 |
-
return;
|
6968 |
-
}
|
6969 |
-
if (animator.has(this)) {
|
6970 |
-
if (this.attached && !animator.running(this)) {
|
6971 |
-
animator.start(this);
|
6972 |
-
}
|
6973 |
-
} else {
|
6974 |
-
this.draw();
|
6975 |
-
onAnimationsComplete({chart: this});
|
6976 |
-
}
|
6977 |
-
}
|
6978 |
-
draw() {
|
6979 |
-
let i;
|
6980 |
-
if (this._resizeBeforeDraw) {
|
6981 |
-
const {width, height} = this._resizeBeforeDraw;
|
6982 |
-
this._resize(width, height);
|
6983 |
-
this._resizeBeforeDraw = null;
|
6984 |
-
}
|
6985 |
-
this.clear();
|
6986 |
-
if (this.width <= 0 || this.height <= 0) {
|
6987 |
-
return;
|
6988 |
-
}
|
6989 |
-
if (this.notifyPlugins('beforeDraw', {cancelable: true}) === false) {
|
6990 |
-
return;
|
6991 |
-
}
|
6992 |
-
const layers = this._layers;
|
6993 |
-
for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {
|
6994 |
-
layers[i].draw(this.chartArea);
|
6995 |
-
}
|
6996 |
-
this._drawDatasets();
|
6997 |
-
for (; i < layers.length; ++i) {
|
6998 |
-
layers[i].draw(this.chartArea);
|
6999 |
-
}
|
7000 |
-
this.notifyPlugins('afterDraw');
|
7001 |
-
}
|
7002 |
-
_getSortedDatasetMetas(filterVisible) {
|
7003 |
-
const metasets = this._sortedMetasets;
|
7004 |
-
const result = [];
|
7005 |
-
let i, ilen;
|
7006 |
-
for (i = 0, ilen = metasets.length; i < ilen; ++i) {
|
7007 |
-
const meta = metasets[i];
|
7008 |
-
if (!filterVisible || meta.visible) {
|
7009 |
-
result.push(meta);
|
7010 |
-
}
|
7011 |
-
}
|
7012 |
-
return result;
|
7013 |
-
}
|
7014 |
-
getSortedVisibleDatasetMetas() {
|
7015 |
-
return this._getSortedDatasetMetas(true);
|
7016 |
-
}
|
7017 |
-
_drawDatasets() {
|
7018 |
-
if (this.notifyPlugins('beforeDatasetsDraw', {cancelable: true}) === false) {
|
7019 |
-
return;
|
7020 |
-
}
|
7021 |
-
const metasets = this.getSortedVisibleDatasetMetas();
|
7022 |
-
for (let i = metasets.length - 1; i >= 0; --i) {
|
7023 |
-
this._drawDataset(metasets[i]);
|
7024 |
-
}
|
7025 |
-
this.notifyPlugins('afterDatasetsDraw');
|
7026 |
-
}
|
7027 |
-
_drawDataset(meta) {
|
7028 |
-
const ctx = this.ctx;
|
7029 |
-
const clip = meta._clip;
|
7030 |
-
const useClip = !clip.disabled;
|
7031 |
-
const area = this.chartArea;
|
7032 |
-
const args = {
|
7033 |
-
meta,
|
7034 |
-
index: meta.index,
|
7035 |
-
cancelable: true
|
7036 |
-
};
|
7037 |
-
if (this.notifyPlugins('beforeDatasetDraw', args) === false) {
|
7038 |
-
return;
|
7039 |
-
}
|
7040 |
-
if (useClip) {
|
7041 |
-
clipArea(ctx, {
|
7042 |
-
left: clip.left === false ? 0 : area.left - clip.left,
|
7043 |
-
right: clip.right === false ? this.width : area.right + clip.right,
|
7044 |
-
top: clip.top === false ? 0 : area.top - clip.top,
|
7045 |
-
bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom
|
7046 |
-
});
|
7047 |
-
}
|
7048 |
-
meta.controller.draw();
|
7049 |
-
if (useClip) {
|
7050 |
-
unclipArea(ctx);
|
7051 |
-
}
|
7052 |
-
args.cancelable = false;
|
7053 |
-
this.notifyPlugins('afterDatasetDraw', args);
|
7054 |
-
}
|
7055 |
-
getElementsAtEventForMode(e, mode, options, useFinalPosition) {
|
7056 |
-
const method = Interaction.modes[mode];
|
7057 |
-
if (typeof method === 'function') {
|
7058 |
-
return method(this, e, options, useFinalPosition);
|
7059 |
-
}
|
7060 |
-
return [];
|
7061 |
-
}
|
7062 |
-
getDatasetMeta(datasetIndex) {
|
7063 |
-
const dataset = this.data.datasets[datasetIndex];
|
7064 |
-
const metasets = this._metasets;
|
7065 |
-
let meta = metasets.filter(x => x && x._dataset === dataset).pop();
|
7066 |
-
if (!meta) {
|
7067 |
-
meta = {
|
7068 |
-
type: null,
|
7069 |
-
data: [],
|
7070 |
-
dataset: null,
|
7071 |
-
controller: null,
|
7072 |
-
hidden: null,
|
7073 |
-
xAxisID: null,
|
7074 |
-
yAxisID: null,
|
7075 |
-
order: dataset && dataset.order || 0,
|
7076 |
-
index: datasetIndex,
|
7077 |
-
_dataset: dataset,
|
7078 |
-
_parsed: [],
|
7079 |
-
_sorted: false
|
7080 |
-
};
|
7081 |
-
metasets.push(meta);
|
7082 |
-
}
|
7083 |
-
return meta;
|
7084 |
-
}
|
7085 |
-
getContext() {
|
7086 |
-
return this.$context || (this.$context = createContext(null, {chart: this, type: 'chart'}));
|
7087 |
-
}
|
7088 |
-
getVisibleDatasetCount() {
|
7089 |
-
return this.getSortedVisibleDatasetMetas().length;
|
7090 |
-
}
|
7091 |
-
isDatasetVisible(datasetIndex) {
|
7092 |
-
const dataset = this.data.datasets[datasetIndex];
|
7093 |
-
if (!dataset) {
|
7094 |
-
return false;
|
7095 |
-
}
|
7096 |
-
const meta = this.getDatasetMeta(datasetIndex);
|
7097 |
-
return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;
|
7098 |
-
}
|
7099 |
-
setDatasetVisibility(datasetIndex, visible) {
|
7100 |
-
const meta = this.getDatasetMeta(datasetIndex);
|
7101 |
-
meta.hidden = !visible;
|
7102 |
-
}
|
7103 |
-
toggleDataVisibility(index) {
|
7104 |
-
this._hiddenIndices[index] = !this._hiddenIndices[index];
|
7105 |
-
}
|
7106 |
-
getDataVisibility(index) {
|
7107 |
-
return !this._hiddenIndices[index];
|
7108 |
-
}
|
7109 |
-
_updateVisibility(datasetIndex, dataIndex, visible) {
|
7110 |
-
const mode = visible ? 'show' : 'hide';
|
7111 |
-
const meta = this.getDatasetMeta(datasetIndex);
|
7112 |
-
const anims = meta.controller._resolveAnimations(undefined, mode);
|
7113 |
-
if (defined(dataIndex)) {
|
7114 |
-
meta.data[dataIndex].hidden = !visible;
|
7115 |
-
this.update();
|
7116 |
-
} else {
|
7117 |
-
this.setDatasetVisibility(datasetIndex, visible);
|
7118 |
-
anims.update(meta, {visible});
|
7119 |
-
this.update((ctx) => ctx.datasetIndex === datasetIndex ? mode : undefined);
|
7120 |
-
}
|
7121 |
-
}
|
7122 |
-
hide(datasetIndex, dataIndex) {
|
7123 |
-
this._updateVisibility(datasetIndex, dataIndex, false);
|
7124 |
-
}
|
7125 |
-
show(datasetIndex, dataIndex) {
|
7126 |
-
this._updateVisibility(datasetIndex, dataIndex, true);
|
7127 |
-
}
|
7128 |
-
_destroyDatasetMeta(datasetIndex) {
|
7129 |
-
const meta = this._metasets[datasetIndex];
|
7130 |
-
if (meta && meta.controller) {
|
7131 |
-
meta.controller._destroy();
|
7132 |
-
}
|
7133 |
-
delete this._metasets[datasetIndex];
|
7134 |
-
}
|
7135 |
-
_stop() {
|
7136 |
-
let i, ilen;
|
7137 |
-
this.stop();
|
7138 |
-
animator.remove(this);
|
7139 |
-
for (i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {
|
7140 |
-
this._destroyDatasetMeta(i);
|
7141 |
-
}
|
7142 |
-
}
|
7143 |
-
destroy() {
|
7144 |
-
const {canvas, ctx} = this;
|
7145 |
-
this._stop();
|
7146 |
-
this.config.clearCache();
|
7147 |
-
if (canvas) {
|
7148 |
-
this.unbindEvents();
|
7149 |
-
clearCanvas(canvas, ctx);
|
7150 |
-
this.platform.releaseContext(ctx);
|
7151 |
-
this.canvas = null;
|
7152 |
-
this.ctx = null;
|
7153 |
-
}
|
7154 |
-
this.notifyPlugins('destroy');
|
7155 |
-
delete instances[this.id];
|
7156 |
-
}
|
7157 |
-
toBase64Image(...args) {
|
7158 |
-
return this.canvas.toDataURL(...args);
|
7159 |
-
}
|
7160 |
-
bindEvents() {
|
7161 |
-
this.bindUserEvents();
|
7162 |
-
if (this.options.responsive) {
|
7163 |
-
this.bindResponsiveEvents();
|
7164 |
-
} else {
|
7165 |
-
this.attached = true;
|
7166 |
-
}
|
7167 |
-
}
|
7168 |
-
bindUserEvents() {
|
7169 |
-
const listeners = this._listeners;
|
7170 |
-
const platform = this.platform;
|
7171 |
-
const _add = (type, listener) => {
|
7172 |
-
platform.addEventListener(this, type, listener);
|
7173 |
-
listeners[type] = listener;
|
7174 |
-
};
|
7175 |
-
const listener = (e, x, y) => {
|
7176 |
-
e.offsetX = x;
|
7177 |
-
e.offsetY = y;
|
7178 |
-
this._eventHandler(e);
|
7179 |
-
};
|
7180 |
-
each(this.options.events, (type) => _add(type, listener));
|
7181 |
-
}
|
7182 |
-
bindResponsiveEvents() {
|
7183 |
-
if (!this._responsiveListeners) {
|
7184 |
-
this._responsiveListeners = {};
|
7185 |
-
}
|
7186 |
-
const listeners = this._responsiveListeners;
|
7187 |
-
const platform = this.platform;
|
7188 |
-
const _add = (type, listener) => {
|
7189 |
-
platform.addEventListener(this, type, listener);
|
7190 |
-
listeners[type] = listener;
|
7191 |
-
};
|
7192 |
-
const _remove = (type, listener) => {
|
7193 |
-
if (listeners[type]) {
|
7194 |
-
platform.removeEventListener(this, type, listener);
|
7195 |
-
delete listeners[type];
|
7196 |
-
}
|
7197 |
-
};
|
7198 |
-
const listener = (width, height) => {
|
7199 |
-
if (this.canvas) {
|
7200 |
-
this.resize(width, height);
|
7201 |
-
}
|
7202 |
-
};
|
7203 |
-
let detached;
|
7204 |
-
const attached = () => {
|
7205 |
-
_remove('attach', attached);
|
7206 |
-
this.attached = true;
|
7207 |
-
this.resize();
|
7208 |
-
_add('resize', listener);
|
7209 |
-
_add('detach', detached);
|
7210 |
-
};
|
7211 |
-
detached = () => {
|
7212 |
-
this.attached = false;
|
7213 |
-
_remove('resize', listener);
|
7214 |
-
this._stop();
|
7215 |
-
this._resize(0, 0);
|
7216 |
-
_add('attach', attached);
|
7217 |
-
};
|
7218 |
-
if (platform.isAttached(this.canvas)) {
|
7219 |
-
attached();
|
7220 |
-
} else {
|
7221 |
-
detached();
|
7222 |
-
}
|
7223 |
-
}
|
7224 |
-
unbindEvents() {
|
7225 |
-
each(this._listeners, (listener, type) => {
|
7226 |
-
this.platform.removeEventListener(this, type, listener);
|
7227 |
-
});
|
7228 |
-
this._listeners = {};
|
7229 |
-
each(this._responsiveListeners, (listener, type) => {
|
7230 |
-
this.platform.removeEventListener(this, type, listener);
|
7231 |
-
});
|
7232 |
-
this._responsiveListeners = undefined;
|
7233 |
-
}
|
7234 |
-
updateHoverStyle(items, mode, enabled) {
|
7235 |
-
const prefix = enabled ? 'set' : 'remove';
|
7236 |
-
let meta, item, i, ilen;
|
7237 |
-
if (mode === 'dataset') {
|
7238 |
-
meta = this.getDatasetMeta(items[0].datasetIndex);
|
7239 |
-
meta.controller['_' + prefix + 'DatasetHoverStyle']();
|
7240 |
-
}
|
7241 |
-
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
7242 |
-
item = items[i];
|
7243 |
-
const controller = item && this.getDatasetMeta(item.datasetIndex).controller;
|
7244 |
-
if (controller) {
|
7245 |
-
controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);
|
7246 |
-
}
|
7247 |
-
}
|
7248 |
-
}
|
7249 |
-
getActiveElements() {
|
7250 |
-
return this._active || [];
|
7251 |
-
}
|
7252 |
-
setActiveElements(activeElements) {
|
7253 |
-
const lastActive = this._active || [];
|
7254 |
-
const active = activeElements.map(({datasetIndex, index}) => {
|
7255 |
-
const meta = this.getDatasetMeta(datasetIndex);
|
7256 |
-
if (!meta) {
|
7257 |
-
throw new Error('No dataset found at index ' + datasetIndex);
|
7258 |
-
}
|
7259 |
-
return {
|
7260 |
-
datasetIndex,
|
7261 |
-
element: meta.data[index],
|
7262 |
-
index,
|
7263 |
-
};
|
7264 |
-
});
|
7265 |
-
const changed = !_elementsEqual(active, lastActive);
|
7266 |
-
if (changed) {
|
7267 |
-
this._active = active;
|
7268 |
-
this._updateHoverStyles(active, lastActive);
|
7269 |
-
}
|
7270 |
-
}
|
7271 |
-
notifyPlugins(hook, args, filter) {
|
7272 |
-
return this._plugins.notify(this, hook, args, filter);
|
7273 |
-
}
|
7274 |
-
_updateHoverStyles(active, lastActive, replay) {
|
7275 |
-
const hoverOptions = this.options.hover;
|
7276 |
-
const diff = (a, b) => a.filter(x => !b.some(y => x.datasetIndex === y.datasetIndex && x.index === y.index));
|
7277 |
-
const deactivated = diff(lastActive, active);
|
7278 |
-
const activated = replay ? active : diff(active, lastActive);
|
7279 |
-
if (deactivated.length) {
|
7280 |
-
this.updateHoverStyle(deactivated, hoverOptions.mode, false);
|
7281 |
-
}
|
7282 |
-
if (activated.length && hoverOptions.mode) {
|
7283 |
-
this.updateHoverStyle(activated, hoverOptions.mode, true);
|
7284 |
-
}
|
7285 |
-
}
|
7286 |
-
_eventHandler(e, replay) {
|
7287 |
-
const args = {event: e, replay, cancelable: true};
|
7288 |
-
const eventFilter = (plugin) => (plugin.options.events || this.options.events).includes(e.native.type);
|
7289 |
-
if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {
|
7290 |
-
return;
|
7291 |
-
}
|
7292 |
-
const changed = this._handleEvent(e, replay);
|
7293 |
-
args.cancelable = false;
|
7294 |
-
this.notifyPlugins('afterEvent', args, eventFilter);
|
7295 |
-
if (changed || args.changed) {
|
7296 |
-
this.render();
|
7297 |
-
}
|
7298 |
-
return this;
|
7299 |
-
}
|
7300 |
-
_handleEvent(e, replay) {
|
7301 |
-
const {_active: lastActive = [], options} = this;
|
7302 |
-
const hoverOptions = options.hover;
|
7303 |
-
const useFinalPosition = replay;
|
7304 |
-
let active = [];
|
7305 |
-
let changed = false;
|
7306 |
-
let lastEvent = null;
|
7307 |
-
if (e.type !== 'mouseout') {
|
7308 |
-
active = this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);
|
7309 |
-
lastEvent = e.type === 'click' ? this._lastEvent : e;
|
7310 |
-
}
|
7311 |
-
this._lastEvent = null;
|
7312 |
-
if (_isPointInArea(e, this.chartArea, this._minPadding)) {
|
7313 |
-
callback(options.onHover, [e, active, this], this);
|
7314 |
-
if (e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu') {
|
7315 |
-
callback(options.onClick, [e, active, this], this);
|
7316 |
-
}
|
7317 |
-
}
|
7318 |
-
changed = !_elementsEqual(active, lastActive);
|
7319 |
-
if (changed || replay) {
|
7320 |
-
this._active = active;
|
7321 |
-
this._updateHoverStyles(active, lastActive, replay);
|
7322 |
-
}
|
7323 |
-
this._lastEvent = lastEvent;
|
7324 |
-
return changed;
|
7325 |
-
}
|
7326 |
-
}
|
7327 |
-
const invalidatePlugins = () => each(Chart.instances, (chart) => chart._plugins.invalidate());
|
7328 |
-
const enumerable = true;
|
7329 |
-
Object.defineProperties(Chart, {
|
7330 |
-
defaults: {
|
7331 |
-
enumerable,
|
7332 |
-
value: defaults
|
7333 |
-
},
|
7334 |
-
instances: {
|
7335 |
-
enumerable,
|
7336 |
-
value: instances
|
7337 |
-
},
|
7338 |
-
overrides: {
|
7339 |
-
enumerable,
|
7340 |
-
value: overrides
|
7341 |
-
},
|
7342 |
-
registry: {
|
7343 |
-
enumerable,
|
7344 |
-
value: registry
|
7345 |
-
},
|
7346 |
-
version: {
|
7347 |
-
enumerable,
|
7348 |
-
value: version
|
7349 |
-
},
|
7350 |
-
getChart: {
|
7351 |
-
enumerable,
|
7352 |
-
value: getChart
|
7353 |
-
},
|
7354 |
-
register: {
|
7355 |
-
enumerable,
|
7356 |
-
value: (...items) => {
|
7357 |
-
registry.add(...items);
|
7358 |
-
invalidatePlugins();
|
7359 |
-
}
|
7360 |
-
},
|
7361 |
-
unregister: {
|
7362 |
-
enumerable,
|
7363 |
-
value: (...items) => {
|
7364 |
-
registry.remove(...items);
|
7365 |
-
invalidatePlugins();
|
7366 |
-
}
|
7367 |
-
}
|
7368 |
-
});
|
7369 |
-
|
7370 |
-
function abstract() {
|
7371 |
-
throw new Error('This method is not implemented: Check that a complete date adapter is provided.');
|
7372 |
-
}
|
7373 |
-
class DateAdapter {
|
7374 |
-
constructor(options) {
|
7375 |
-
this.options = options || {};
|
7376 |
-
}
|
7377 |
-
formats() {
|
7378 |
-
return abstract();
|
7379 |
-
}
|
7380 |
-
parse(value, format) {
|
7381 |
-
return abstract();
|
7382 |
-
}
|
7383 |
-
format(timestamp, format) {
|
7384 |
-
return abstract();
|
7385 |
-
}
|
7386 |
-
add(timestamp, amount, unit) {
|
7387 |
-
return abstract();
|
7388 |
-
}
|
7389 |
-
diff(a, b, unit) {
|
7390 |
-
return abstract();
|
7391 |
-
}
|
7392 |
-
startOf(timestamp, unit, weekday) {
|
7393 |
-
return abstract();
|
7394 |
-
}
|
7395 |
-
endOf(timestamp, unit) {
|
7396 |
-
return abstract();
|
7397 |
-
}
|
7398 |
-
}
|
7399 |
-
DateAdapter.override = function(members) {
|
7400 |
-
Object.assign(DateAdapter.prototype, members);
|
7401 |
-
};
|
7402 |
-
var _adapters = {
|
7403 |
-
_date: DateAdapter
|
7404 |
-
};
|
7405 |
-
|
7406 |
-
function getAllScaleValues(scale, type) {
|
7407 |
-
if (!scale._cache.$bar) {
|
7408 |
-
const visibleMetas = scale.getMatchingVisibleMetas(type);
|
7409 |
-
let values = [];
|
7410 |
-
for (let i = 0, ilen = visibleMetas.length; i < ilen; i++) {
|
7411 |
-
values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));
|
7412 |
-
}
|
7413 |
-
scale._cache.$bar = _arrayUnique(values.sort((a, b) => a - b));
|
7414 |
-
}
|
7415 |
-
return scale._cache.$bar;
|
7416 |
-
}
|
7417 |
-
function computeMinSampleSize(meta) {
|
7418 |
-
const scale = meta.iScale;
|
7419 |
-
const values = getAllScaleValues(scale, meta.type);
|
7420 |
-
let min = scale._length;
|
7421 |
-
let i, ilen, curr, prev;
|
7422 |
-
const updateMinAndPrev = () => {
|
7423 |
-
if (curr === 32767 || curr === -32768) {
|
7424 |
-
return;
|
7425 |
-
}
|
7426 |
-
if (defined(prev)) {
|
7427 |
-
min = Math.min(min, Math.abs(curr - prev) || min);
|
7428 |
-
}
|
7429 |
-
prev = curr;
|
7430 |
-
};
|
7431 |
-
for (i = 0, ilen = values.length; i < ilen; ++i) {
|
7432 |
-
curr = scale.getPixelForValue(values[i]);
|
7433 |
-
updateMinAndPrev();
|
7434 |
-
}
|
7435 |
-
prev = undefined;
|
7436 |
-
for (i = 0, ilen = scale.ticks.length; i < ilen; ++i) {
|
7437 |
-
curr = scale.getPixelForTick(i);
|
7438 |
-
updateMinAndPrev();
|
7439 |
-
}
|
7440 |
-
return min;
|
7441 |
-
}
|
7442 |
-
function computeFitCategoryTraits(index, ruler, options, stackCount) {
|
7443 |
-
const thickness = options.barThickness;
|
7444 |
-
let size, ratio;
|
7445 |
-
if (isNullOrUndef(thickness)) {
|
7446 |
-
size = ruler.min * options.categoryPercentage;
|
7447 |
-
ratio = options.barPercentage;
|
7448 |
-
} else {
|
7449 |
-
size = thickness * stackCount;
|
7450 |
-
ratio = 1;
|
7451 |
-
}
|
7452 |
-
return {
|
7453 |
-
chunk: size / stackCount,
|
7454 |
-
ratio,
|
7455 |
-
start: ruler.pixels[index] - (size / 2)
|
7456 |
-
};
|
7457 |
-
}
|
7458 |
-
function computeFlexCategoryTraits(index, ruler, options, stackCount) {
|
7459 |
-
const pixels = ruler.pixels;
|
7460 |
-
const curr = pixels[index];
|
7461 |
-
let prev = index > 0 ? pixels[index - 1] : null;
|
7462 |
-
let next = index < pixels.length - 1 ? pixels[index + 1] : null;
|
7463 |
-
const percent = options.categoryPercentage;
|
7464 |
-
if (prev === null) {
|
7465 |
-
prev = curr - (next === null ? ruler.end - ruler.start : next - curr);
|
7466 |
-
}
|
7467 |
-
if (next === null) {
|
7468 |
-
next = curr + curr - prev;
|
7469 |
-
}
|
7470 |
-
const start = curr - (curr - Math.min(prev, next)) / 2 * percent;
|
7471 |
-
const size = Math.abs(next - prev) / 2 * percent;
|
7472 |
-
return {
|
7473 |
-
chunk: size / stackCount,
|
7474 |
-
ratio: options.barPercentage,
|
7475 |
-
start
|
7476 |
-
};
|
7477 |
-
}
|
7478 |
-
function parseFloatBar(entry, item, vScale, i) {
|
7479 |
-
const startValue = vScale.parse(entry[0], i);
|
7480 |
-
const endValue = vScale.parse(entry[1], i);
|
7481 |
-
const min = Math.min(startValue, endValue);
|
7482 |
-
const max = Math.max(startValue, endValue);
|
7483 |
-
let barStart = min;
|
7484 |
-
let barEnd = max;
|
7485 |
-
if (Math.abs(min) > Math.abs(max)) {
|
7486 |
-
barStart = max;
|
7487 |
-
barEnd = min;
|
7488 |
-
}
|
7489 |
-
item[vScale.axis] = barEnd;
|
7490 |
-
item._custom = {
|
7491 |
-
barStart,
|
7492 |
-
barEnd,
|
7493 |
-
start: startValue,
|
7494 |
-
end: endValue,
|
7495 |
-
min,
|
7496 |
-
max
|
7497 |
-
};
|
7498 |
-
}
|
7499 |
-
function parseValue(entry, item, vScale, i) {
|
7500 |
-
if (isArray(entry)) {
|
7501 |
-
parseFloatBar(entry, item, vScale, i);
|
7502 |
-
} else {
|
7503 |
-
item[vScale.axis] = vScale.parse(entry, i);
|
7504 |
-
}
|
7505 |
-
return item;
|
7506 |
-
}
|
7507 |
-
function parseArrayOrPrimitive(meta, data, start, count) {
|
7508 |
-
const iScale = meta.iScale;
|
7509 |
-
const vScale = meta.vScale;
|
7510 |
-
const labels = iScale.getLabels();
|
7511 |
-
const singleScale = iScale === vScale;
|
7512 |
-
const parsed = [];
|
7513 |
-
let i, ilen, item, entry;
|
7514 |
-
for (i = start, ilen = start + count; i < ilen; ++i) {
|
7515 |
-
entry = data[i];
|
7516 |
-
item = {};
|
7517 |
-
item[iScale.axis] = singleScale || iScale.parse(labels[i], i);
|
7518 |
-
parsed.push(parseValue(entry, item, vScale, i));
|
7519 |
-
}
|
7520 |
-
return parsed;
|
7521 |
-
}
|
7522 |
-
function isFloatBar(custom) {
|
7523 |
-
return custom && custom.barStart !== undefined && custom.barEnd !== undefined;
|
7524 |
-
}
|
7525 |
-
function barSign(size, vScale, actualBase) {
|
7526 |
-
if (size !== 0) {
|
7527 |
-
return sign(size);
|
7528 |
-
}
|
7529 |
-
return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);
|
7530 |
-
}
|
7531 |
-
function borderProps(properties) {
|
7532 |
-
let reverse, start, end, top, bottom;
|
7533 |
-
if (properties.horizontal) {
|
7534 |
-
reverse = properties.base > properties.x;
|
7535 |
-
start = 'left';
|
7536 |
-
end = 'right';
|
7537 |
-
} else {
|
7538 |
-
reverse = properties.base < properties.y;
|
7539 |
-
start = 'bottom';
|
7540 |
-
end = 'top';
|
7541 |
-
}
|
7542 |
-
if (reverse) {
|
7543 |
-
top = 'end';
|
7544 |
-
bottom = 'start';
|
7545 |
-
} else {
|
7546 |
-
top = 'start';
|
7547 |
-
bottom = 'end';
|
7548 |
-
}
|
7549 |
-
return {start, end, reverse, top, bottom};
|
7550 |
-
}
|
7551 |
-
function setBorderSkipped(properties, options, stack, index) {
|
7552 |
-
let edge = options.borderSkipped;
|
7553 |
-
const res = {};
|
7554 |
-
if (!edge) {
|
7555 |
-
properties.borderSkipped = res;
|
7556 |
-
return;
|
7557 |
-
}
|
7558 |
-
const {start, end, reverse, top, bottom} = borderProps(properties);
|
7559 |
-
if (edge === 'middle' && stack) {
|
7560 |
-
properties.enableBorderRadius = true;
|
7561 |
-
if ((stack._top || 0) === index) {
|
7562 |
-
edge = top;
|
7563 |
-
} else if ((stack._bottom || 0) === index) {
|
7564 |
-
edge = bottom;
|
7565 |
-
} else {
|
7566 |
-
res[parseEdge(bottom, start, end, reverse)] = true;
|
7567 |
-
edge = top;
|
7568 |
-
}
|
7569 |
-
}
|
7570 |
-
res[parseEdge(edge, start, end, reverse)] = true;
|
7571 |
-
properties.borderSkipped = res;
|
7572 |
-
}
|
7573 |
-
function parseEdge(edge, a, b, reverse) {
|
7574 |
-
if (reverse) {
|
7575 |
-
edge = swap(edge, a, b);
|
7576 |
-
edge = startEnd(edge, b, a);
|
7577 |
-
} else {
|
7578 |
-
edge = startEnd(edge, a, b);
|
7579 |
-
}
|
7580 |
-
return edge;
|
7581 |
-
}
|
7582 |
-
function swap(orig, v1, v2) {
|
7583 |
-
return orig === v1 ? v2 : orig === v2 ? v1 : orig;
|
7584 |
-
}
|
7585 |
-
function startEnd(v, start, end) {
|
7586 |
-
return v === 'start' ? start : v === 'end' ? end : v;
|
7587 |
-
}
|
7588 |
-
function setInflateAmount(properties, {inflateAmount}, ratio) {
|
7589 |
-
properties.inflateAmount = inflateAmount === 'auto'
|
7590 |
-
? ratio === 1 ? 0.33 : 0
|
7591 |
-
: inflateAmount;
|
7592 |
-
}
|
7593 |
-
class BarController extends DatasetController {
|
7594 |
-
parsePrimitiveData(meta, data, start, count) {
|
7595 |
-
return parseArrayOrPrimitive(meta, data, start, count);
|
7596 |
-
}
|
7597 |
-
parseArrayData(meta, data, start, count) {
|
7598 |
-
return parseArrayOrPrimitive(meta, data, start, count);
|
7599 |
-
}
|
7600 |
-
parseObjectData(meta, data, start, count) {
|
7601 |
-
const {iScale, vScale} = meta;
|
7602 |
-
const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
|
7603 |
-
const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;
|
7604 |
-
const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;
|
7605 |
-
const parsed = [];
|
7606 |
-
let i, ilen, item, obj;
|
7607 |
-
for (i = start, ilen = start + count; i < ilen; ++i) {
|
7608 |
-
obj = data[i];
|
7609 |
-
item = {};
|
7610 |
-
item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);
|
7611 |
-
parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));
|
7612 |
-
}
|
7613 |
-
return parsed;
|
7614 |
-
}
|
7615 |
-
updateRangeFromParsed(range, scale, parsed, stack) {
|
7616 |
-
super.updateRangeFromParsed(range, scale, parsed, stack);
|
7617 |
-
const custom = parsed._custom;
|
7618 |
-
if (custom && scale === this._cachedMeta.vScale) {
|
7619 |
-
range.min = Math.min(range.min, custom.min);
|
7620 |
-
range.max = Math.max(range.max, custom.max);
|
7621 |
-
}
|
7622 |
-
}
|
7623 |
-
getMaxOverflow() {
|
7624 |
-
return 0;
|
7625 |
-
}
|
7626 |
-
getLabelAndValue(index) {
|
7627 |
-
const meta = this._cachedMeta;
|
7628 |
-
const {iScale, vScale} = meta;
|
7629 |
-
const parsed = this.getParsed(index);
|
7630 |
-
const custom = parsed._custom;
|
7631 |
-
const value = isFloatBar(custom)
|
7632 |
-
? '[' + custom.start + ', ' + custom.end + ']'
|
7633 |
-
: '' + vScale.getLabelForValue(parsed[vScale.axis]);
|
7634 |
-
return {
|
7635 |
-
label: '' + iScale.getLabelForValue(parsed[iScale.axis]),
|
7636 |
-
value
|
7637 |
-
};
|
7638 |
-
}
|
7639 |
-
initialize() {
|
7640 |
-
this.enableOptionSharing = true;
|
7641 |
-
super.initialize();
|
7642 |
-
const meta = this._cachedMeta;
|
7643 |
-
meta.stack = this.getDataset().stack;
|
7644 |
-
}
|
7645 |
-
update(mode) {
|
7646 |
-
const meta = this._cachedMeta;
|
7647 |
-
this.updateElements(meta.data, 0, meta.data.length, mode);
|
7648 |
-
}
|
7649 |
-
updateElements(bars, start, count, mode) {
|
7650 |
-
const reset = mode === 'reset';
|
7651 |
-
const {index, _cachedMeta: {vScale}} = this;
|
7652 |
-
const base = vScale.getBasePixel();
|
7653 |
-
const horizontal = vScale.isHorizontal();
|
7654 |
-
const ruler = this._getRuler();
|
7655 |
-
const firstOpts = this.resolveDataElementOptions(start, mode);
|
7656 |
-
const sharedOptions = this.getSharedOptions(firstOpts);
|
7657 |
-
const includeOptions = this.includeOptions(mode, sharedOptions);
|
7658 |
-
this.updateSharedOptions(sharedOptions, mode, firstOpts);
|
7659 |
-
for (let i = start; i < start + count; i++) {
|
7660 |
-
const parsed = this.getParsed(i);
|
7661 |
-
const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {base, head: base} : this._calculateBarValuePixels(i);
|
7662 |
-
const ipixels = this._calculateBarIndexPixels(i, ruler);
|
7663 |
-
const stack = (parsed._stacks || {})[vScale.axis];
|
7664 |
-
const properties = {
|
7665 |
-
horizontal,
|
7666 |
-
base: vpixels.base,
|
7667 |
-
enableBorderRadius: !stack || isFloatBar(parsed._custom) || (index === stack._top || index === stack._bottom),
|
7668 |
-
x: horizontal ? vpixels.head : ipixels.center,
|
7669 |
-
y: horizontal ? ipixels.center : vpixels.head,
|
7670 |
-
height: horizontal ? ipixels.size : Math.abs(vpixels.size),
|
7671 |
-
width: horizontal ? Math.abs(vpixels.size) : ipixels.size
|
7672 |
-
};
|
7673 |
-
if (includeOptions) {
|
7674 |
-
properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);
|
7675 |
-
}
|
7676 |
-
const options = properties.options || bars[i].options;
|
7677 |
-
setBorderSkipped(properties, options, stack, index);
|
7678 |
-
setInflateAmount(properties, options, ruler.ratio);
|
7679 |
-
this.updateElement(bars[i], i, properties, mode);
|
7680 |
-
}
|
7681 |
-
}
|
7682 |
-
_getStacks(last, dataIndex) {
|
7683 |
-
const meta = this._cachedMeta;
|
7684 |
-
const iScale = meta.iScale;
|
7685 |
-
const metasets = iScale.getMatchingVisibleMetas(this._type);
|
7686 |
-
const stacked = iScale.options.stacked;
|
7687 |
-
const ilen = metasets.length;
|
7688 |
-
const stacks = [];
|
7689 |
-
let i, item;
|
7690 |
-
for (i = 0; i < ilen; ++i) {
|
7691 |
-
item = metasets[i];
|
7692 |
-
if (!item.controller.options.grouped) {
|
7693 |
-
continue;
|
7694 |
-
}
|
7695 |
-
if (typeof dataIndex !== 'undefined') {
|
7696 |
-
const val = item.controller.getParsed(dataIndex)[
|
7697 |
-
item.controller._cachedMeta.vScale.axis
|
7698 |
-
];
|
7699 |
-
if (isNullOrUndef(val) || isNaN(val)) {
|
7700 |
-
continue;
|
7701 |
-
}
|
7702 |
-
}
|
7703 |
-
if (stacked === false || stacks.indexOf(item.stack) === -1 ||
|
7704 |
-
(stacked === undefined && item.stack === undefined)) {
|
7705 |
-
stacks.push(item.stack);
|
7706 |
-
}
|
7707 |
-
if (item.index === last) {
|
7708 |
-
break;
|
7709 |
-
}
|
7710 |
-
}
|
7711 |
-
if (!stacks.length) {
|
7712 |
-
stacks.push(undefined);
|
7713 |
-
}
|
7714 |
-
return stacks;
|
7715 |
-
}
|
7716 |
-
_getStackCount(index) {
|
7717 |
-
return this._getStacks(undefined, index).length;
|
7718 |
-
}
|
7719 |
-
_getStackIndex(datasetIndex, name, dataIndex) {
|
7720 |
-
const stacks = this._getStacks(datasetIndex, dataIndex);
|
7721 |
-
const index = (name !== undefined)
|
7722 |
-
? stacks.indexOf(name)
|
7723 |
-
: -1;
|
7724 |
-
return (index === -1)
|
7725 |
-
? stacks.length - 1
|
7726 |
-
: index;
|
7727 |
-
}
|
7728 |
-
_getRuler() {
|
7729 |
-
const opts = this.options;
|
7730 |
-
const meta = this._cachedMeta;
|
7731 |
-
const iScale = meta.iScale;
|
7732 |
-
const pixels = [];
|
7733 |
-
let i, ilen;
|
7734 |
-
for (i = 0, ilen = meta.data.length; i < ilen; ++i) {
|
7735 |
-
pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));
|
7736 |
-
}
|
7737 |
-
const barThickness = opts.barThickness;
|
7738 |
-
const min = barThickness || computeMinSampleSize(meta);
|
7739 |
-
return {
|
7740 |
-
min,
|
7741 |
-
pixels,
|
7742 |
-
start: iScale._startPixel,
|
7743 |
-
end: iScale._endPixel,
|
7744 |
-
stackCount: this._getStackCount(),
|
7745 |
-
scale: iScale,
|
7746 |
-
grouped: opts.grouped,
|
7747 |
-
ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage
|
7748 |
-
};
|
7749 |
-
}
|
7750 |
-
_calculateBarValuePixels(index) {
|
7751 |
-
const {_cachedMeta: {vScale, _stacked}, options: {base: baseValue, minBarLength}} = this;
|
7752 |
-
const actualBase = baseValue || 0;
|
7753 |
-
const parsed = this.getParsed(index);
|
7754 |
-
const custom = parsed._custom;
|
7755 |
-
const floating = isFloatBar(custom);
|
7756 |
-
let value = parsed[vScale.axis];
|
7757 |
-
let start = 0;
|
7758 |
-
let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;
|
7759 |
-
let head, size;
|
7760 |
-
if (length !== value) {
|
7761 |
-
start = length - value;
|
7762 |
-
length = value;
|
7763 |
-
}
|
7764 |
-
if (floating) {
|
7765 |
-
value = custom.barStart;
|
7766 |
-
length = custom.barEnd - custom.barStart;
|
7767 |
-
if (value !== 0 && sign(value) !== sign(custom.barEnd)) {
|
7768 |
-
start = 0;
|
7769 |
-
}
|
7770 |
-
start += value;
|
7771 |
-
}
|
7772 |
-
const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;
|
7773 |
-
let base = vScale.getPixelForValue(startValue);
|
7774 |
-
if (this.chart.getDataVisibility(index)) {
|
7775 |
-
head = vScale.getPixelForValue(start + length);
|
7776 |
-
} else {
|
7777 |
-
head = base;
|
7778 |
-
}
|
7779 |
-
size = head - base;
|
7780 |
-
if (Math.abs(size) < minBarLength) {
|
7781 |
-
size = barSign(size, vScale, actualBase) * minBarLength;
|
7782 |
-
if (value === actualBase) {
|
7783 |
-
base -= size / 2;
|
7784 |
-
}
|
7785 |
-
head = base + size;
|
7786 |
-
}
|
7787 |
-
if (base === vScale.getPixelForValue(actualBase)) {
|
7788 |
-
const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;
|
7789 |
-
base += halfGrid;
|
7790 |
-
size -= halfGrid;
|
7791 |
-
}
|
7792 |
-
return {
|
7793 |
-
size,
|
7794 |
-
base,
|
7795 |
-
head,
|
7796 |
-
center: head + size / 2
|
7797 |
-
};
|
7798 |
-
}
|
7799 |
-
_calculateBarIndexPixels(index, ruler) {
|
7800 |
-
const scale = ruler.scale;
|
7801 |
-
const options = this.options;
|
7802 |
-
const skipNull = options.skipNull;
|
7803 |
-
const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);
|
7804 |
-
let center, size;
|
7805 |
-
if (ruler.grouped) {
|
7806 |
-
const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;
|
7807 |
-
const range = options.barThickness === 'flex'
|
7808 |
-
? computeFlexCategoryTraits(index, ruler, options, stackCount)
|
7809 |
-
: computeFitCategoryTraits(index, ruler, options, stackCount);
|
7810 |
-
const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);
|
7811 |
-
center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);
|
7812 |
-
size = Math.min(maxBarThickness, range.chunk * range.ratio);
|
7813 |
-
} else {
|
7814 |
-
center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);
|
7815 |
-
size = Math.min(maxBarThickness, ruler.min * ruler.ratio);
|
7816 |
-
}
|
7817 |
-
return {
|
7818 |
-
base: center - size / 2,
|
7819 |
-
head: center + size / 2,
|
7820 |
-
center,
|
7821 |
-
size
|
7822 |
-
};
|
7823 |
-
}
|
7824 |
-
draw() {
|
7825 |
-
const meta = this._cachedMeta;
|
7826 |
-
const vScale = meta.vScale;
|
7827 |
-
const rects = meta.data;
|
7828 |
-
const ilen = rects.length;
|
7829 |
-
let i = 0;
|
7830 |
-
for (; i < ilen; ++i) {
|
7831 |
-
if (this.getParsed(i)[vScale.axis] !== null) {
|
7832 |
-
rects[i].draw(this._ctx);
|
7833 |
-
}
|
7834 |
-
}
|
7835 |
-
}
|
7836 |
-
}
|
7837 |
-
BarController.id = 'bar';
|
7838 |
-
BarController.defaults = {
|
7839 |
-
datasetElementType: false,
|
7840 |
-
dataElementType: 'bar',
|
7841 |
-
categoryPercentage: 0.8,
|
7842 |
-
barPercentage: 0.9,
|
7843 |
-
grouped: true,
|
7844 |
-
animations: {
|
7845 |
-
numbers: {
|
7846 |
-
type: 'number',
|
7847 |
-
properties: ['x', 'y', 'base', 'width', 'height']
|
7848 |
-
}
|
7849 |
-
}
|
7850 |
-
};
|
7851 |
-
BarController.overrides = {
|
7852 |
-
scales: {
|
7853 |
-
_index_: {
|
7854 |
-
type: 'category',
|
7855 |
-
offset: true,
|
7856 |
-
grid: {
|
7857 |
-
offset: true
|
7858 |
-
}
|
7859 |
-
},
|
7860 |
-
_value_: {
|
7861 |
-
type: 'linear',
|
7862 |
-
beginAtZero: true,
|
7863 |
-
}
|
7864 |
-
}
|
7865 |
-
};
|
7866 |
-
|
7867 |
-
class BubbleController extends DatasetController {
|
7868 |
-
initialize() {
|
7869 |
-
this.enableOptionSharing = true;
|
7870 |
-
super.initialize();
|
7871 |
-
}
|
7872 |
-
parsePrimitiveData(meta, data, start, count) {
|
7873 |
-
const parsed = super.parsePrimitiveData(meta, data, start, count);
|
7874 |
-
for (let i = 0; i < parsed.length; i++) {
|
7875 |
-
parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;
|
7876 |
-
}
|
7877 |
-
return parsed;
|
7878 |
-
}
|
7879 |
-
parseArrayData(meta, data, start, count) {
|
7880 |
-
const parsed = super.parseArrayData(meta, data, start, count);
|
7881 |
-
for (let i = 0; i < parsed.length; i++) {
|
7882 |
-
const item = data[start + i];
|
7883 |
-
parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);
|
7884 |
-
}
|
7885 |
-
return parsed;
|
7886 |
-
}
|
7887 |
-
parseObjectData(meta, data, start, count) {
|
7888 |
-
const parsed = super.parseObjectData(meta, data, start, count);
|
7889 |
-
for (let i = 0; i < parsed.length; i++) {
|
7890 |
-
const item = data[start + i];
|
7891 |
-
parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);
|
7892 |
-
}
|
7893 |
-
return parsed;
|
7894 |
-
}
|
7895 |
-
getMaxOverflow() {
|
7896 |
-
const data = this._cachedMeta.data;
|
7897 |
-
let max = 0;
|
7898 |
-
for (let i = data.length - 1; i >= 0; --i) {
|
7899 |
-
max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);
|
7900 |
-
}
|
7901 |
-
return max > 0 && max;
|
7902 |
-
}
|
7903 |
-
getLabelAndValue(index) {
|
7904 |
-
const meta = this._cachedMeta;
|
7905 |
-
const {xScale, yScale} = meta;
|
7906 |
-
const parsed = this.getParsed(index);
|
7907 |
-
const x = xScale.getLabelForValue(parsed.x);
|
7908 |
-
const y = yScale.getLabelForValue(parsed.y);
|
7909 |
-
const r = parsed._custom;
|
7910 |
-
return {
|
7911 |
-
label: meta.label,
|
7912 |
-
value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'
|
7913 |
-
};
|
7914 |
-
}
|
7915 |
-
update(mode) {
|
7916 |
-
const points = this._cachedMeta.data;
|
7917 |
-
this.updateElements(points, 0, points.length, mode);
|
7918 |
-
}
|
7919 |
-
updateElements(points, start, count, mode) {
|
7920 |
-
const reset = mode === 'reset';
|
7921 |
-
const {iScale, vScale} = this._cachedMeta;
|
7922 |
-
const firstOpts = this.resolveDataElementOptions(start, mode);
|
7923 |
-
const sharedOptions = this.getSharedOptions(firstOpts);
|
7924 |
-
const includeOptions = this.includeOptions(mode, sharedOptions);
|
7925 |
-
const iAxis = iScale.axis;
|
7926 |
-
const vAxis = vScale.axis;
|
7927 |
-
for (let i = start; i < start + count; i++) {
|
7928 |
-
const point = points[i];
|
7929 |
-
const parsed = !reset && this.getParsed(i);
|
7930 |
-
const properties = {};
|
7931 |
-
const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);
|
7932 |
-
const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);
|
7933 |
-
properties.skip = isNaN(iPixel) || isNaN(vPixel);
|
7934 |
-
if (includeOptions) {
|
7935 |
-
properties.options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);
|
7936 |
-
if (reset) {
|
7937 |
-
properties.options.radius = 0;
|
7938 |
-
}
|
7939 |
-
}
|
7940 |
-
this.updateElement(point, i, properties, mode);
|
7941 |
-
}
|
7942 |
-
this.updateSharedOptions(sharedOptions, mode, firstOpts);
|
7943 |
-
}
|
7944 |
-
resolveDataElementOptions(index, mode) {
|
7945 |
-
const parsed = this.getParsed(index);
|
7946 |
-
let values = super.resolveDataElementOptions(index, mode);
|
7947 |
-
if (values.$shared) {
|
7948 |
-
values = Object.assign({}, values, {$shared: false});
|
7949 |
-
}
|
7950 |
-
const radius = values.radius;
|
7951 |
-
if (mode !== 'active') {
|
7952 |
-
values.radius = 0;
|
7953 |
-
}
|
7954 |
-
values.radius += valueOrDefault(parsed && parsed._custom, radius);
|
7955 |
-
return values;
|
7956 |
-
}
|
7957 |
-
}
|
7958 |
-
BubbleController.id = 'bubble';
|
7959 |
-
BubbleController.defaults = {
|
7960 |
-
datasetElementType: false,
|
7961 |
-
dataElementType: 'point',
|
7962 |
-
animations: {
|
7963 |
-
numbers: {
|
7964 |
-
type: 'number',
|
7965 |
-
properties: ['x', 'y', 'borderWidth', 'radius']
|
7966 |
-
}
|
7967 |
-
}
|
7968 |
-
};
|
7969 |
-
BubbleController.overrides = {
|
7970 |
-
scales: {
|
7971 |
-
x: {
|
7972 |
-
type: 'linear'
|
7973 |
-
},
|
7974 |
-
y: {
|
7975 |
-
type: 'linear'
|
7976 |
-
}
|
7977 |
-
},
|
7978 |
-
plugins: {
|
7979 |
-
tooltip: {
|
7980 |
-
callbacks: {
|
7981 |
-
title() {
|
7982 |
-
return '';
|
7983 |
-
}
|
7984 |
-
}
|
7985 |
-
}
|
7986 |
-
}
|
7987 |
-
};
|
7988 |
-
|
7989 |
-
function getRatioAndOffset(rotation, circumference, cutout) {
|
7990 |
-
let ratioX = 1;
|
7991 |
-
let ratioY = 1;
|
7992 |
-
let offsetX = 0;
|
7993 |
-
let offsetY = 0;
|
7994 |
-
if (circumference < TAU) {
|
7995 |
-
const startAngle = rotation;
|
7996 |
-
const endAngle = startAngle + circumference;
|
7997 |
-
const startX = Math.cos(startAngle);
|
7998 |
-
const startY = Math.sin(startAngle);
|
7999 |
-
const endX = Math.cos(endAngle);
|
8000 |
-
const endY = Math.sin(endAngle);
|
8001 |
-
const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);
|
8002 |
-
const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);
|
8003 |
-
const maxX = calcMax(0, startX, endX);
|
8004 |
-
const maxY = calcMax(HALF_PI, startY, endY);
|
8005 |
-
const minX = calcMin(PI, startX, endX);
|
8006 |
-
const minY = calcMin(PI + HALF_PI, startY, endY);
|
8007 |
-
ratioX = (maxX - minX) / 2;
|
8008 |
-
ratioY = (maxY - minY) / 2;
|
8009 |
-
offsetX = -(maxX + minX) / 2;
|
8010 |
-
offsetY = -(maxY + minY) / 2;
|
8011 |
-
}
|
8012 |
-
return {ratioX, ratioY, offsetX, offsetY};
|
8013 |
-
}
|
8014 |
-
class DoughnutController extends DatasetController {
|
8015 |
-
constructor(chart, datasetIndex) {
|
8016 |
-
super(chart, datasetIndex);
|
8017 |
-
this.enableOptionSharing = true;
|
8018 |
-
this.innerRadius = undefined;
|
8019 |
-
this.outerRadius = undefined;
|
8020 |
-
this.offsetX = undefined;
|
8021 |
-
this.offsetY = undefined;
|
8022 |
-
}
|
8023 |
-
linkScales() {}
|
8024 |
-
parse(start, count) {
|
8025 |
-
const data = this.getDataset().data;
|
8026 |
-
const meta = this._cachedMeta;
|
8027 |
-
if (this._parsing === false) {
|
8028 |
-
meta._parsed = data;
|
8029 |
-
} else {
|
8030 |
-
let getter = (i) => +data[i];
|
8031 |
-
if (isObject(data[start])) {
|
8032 |
-
const {key = 'value'} = this._parsing;
|
8033 |
-
getter = (i) => +resolveObjectKey(data[i], key);
|
8034 |
-
}
|
8035 |
-
let i, ilen;
|
8036 |
-
for (i = start, ilen = start + count; i < ilen; ++i) {
|
8037 |
-
meta._parsed[i] = getter(i);
|
8038 |
-
}
|
8039 |
-
}
|
8040 |
-
}
|
8041 |
-
_getRotation() {
|
8042 |
-
return toRadians(this.options.rotation - 90);
|
8043 |
-
}
|
8044 |
-
_getCircumference() {
|
8045 |
-
return toRadians(this.options.circumference);
|
8046 |
-
}
|
8047 |
-
_getRotationExtents() {
|
8048 |
-
let min = TAU;
|
8049 |
-
let max = -TAU;
|
8050 |
-
for (let i = 0; i < this.chart.data.datasets.length; ++i) {
|
8051 |
-
if (this.chart.isDatasetVisible(i)) {
|
8052 |
-
const controller = this.chart.getDatasetMeta(i).controller;
|
8053 |
-
const rotation = controller._getRotation();
|
8054 |
-
const circumference = controller._getCircumference();
|
8055 |
-
min = Math.min(min, rotation);
|
8056 |
-
max = Math.max(max, rotation + circumference);
|
8057 |
-
}
|
8058 |
-
}
|
8059 |
-
return {
|
8060 |
-
rotation: min,
|
8061 |
-
circumference: max - min,
|
8062 |
-
};
|
8063 |
-
}
|
8064 |
-
update(mode) {
|
8065 |
-
const chart = this.chart;
|
8066 |
-
const {chartArea} = chart;
|
8067 |
-
const meta = this._cachedMeta;
|
8068 |
-
const arcs = meta.data;
|
8069 |
-
const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;
|
8070 |
-
const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);
|
8071 |
-
const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);
|
8072 |
-
const chartWeight = this._getRingWeight(this.index);
|
8073 |
-
const {circumference, rotation} = this._getRotationExtents();
|
8074 |
-
const {ratioX, ratioY, offsetX, offsetY} = getRatioAndOffset(rotation, circumference, cutout);
|
8075 |
-
const maxWidth = (chartArea.width - spacing) / ratioX;
|
8076 |
-
const maxHeight = (chartArea.height - spacing) / ratioY;
|
8077 |
-
const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);
|
8078 |
-
const outerRadius = toDimension(this.options.radius, maxRadius);
|
8079 |
-
const innerRadius = Math.max(outerRadius * cutout, 0);
|
8080 |
-
const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();
|
8081 |
-
this.offsetX = offsetX * outerRadius;
|
8082 |
-
this.offsetY = offsetY * outerRadius;
|
8083 |
-
meta.total = this.calculateTotal();
|
8084 |
-
this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);
|
8085 |
-
this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);
|
8086 |
-
this.updateElements(arcs, 0, arcs.length, mode);
|
8087 |
-
}
|
8088 |
-
_circumference(i, reset) {
|
8089 |
-
const opts = this.options;
|
8090 |
-
const meta = this._cachedMeta;
|
8091 |
-
const circumference = this._getCircumference();
|
8092 |
-
if ((reset && opts.animation.animateRotate) || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {
|
8093 |
-
return 0;
|
8094 |
-
}
|
8095 |
-
return this.calculateCircumference(meta._parsed[i] * circumference / TAU);
|
8096 |
-
}
|
8097 |
-
updateElements(arcs, start, count, mode) {
|
8098 |
-
const reset = mode === 'reset';
|
8099 |
-
const chart = this.chart;
|
8100 |
-
const chartArea = chart.chartArea;
|
8101 |
-
const opts = chart.options;
|
8102 |
-
const animationOpts = opts.animation;
|
8103 |
-
const centerX = (chartArea.left + chartArea.right) / 2;
|
8104 |
-
const centerY = (chartArea.top + chartArea.bottom) / 2;
|
8105 |
-
const animateScale = reset && animationOpts.animateScale;
|
8106 |
-
const innerRadius = animateScale ? 0 : this.innerRadius;
|
8107 |
-
const outerRadius = animateScale ? 0 : this.outerRadius;
|
8108 |
-
const firstOpts = this.resolveDataElementOptions(start, mode);
|
8109 |
-
const sharedOptions = this.getSharedOptions(firstOpts);
|
8110 |
-
const includeOptions = this.includeOptions(mode, sharedOptions);
|
8111 |
-
let startAngle = this._getRotation();
|
8112 |
-
let i;
|
8113 |
-
for (i = 0; i < start; ++i) {
|
8114 |
-
startAngle += this._circumference(i, reset);
|
8115 |
-
}
|
8116 |
-
for (i = start; i < start + count; ++i) {
|
8117 |
-
const circumference = this._circumference(i, reset);
|
8118 |
-
const arc = arcs[i];
|
8119 |
-
const properties = {
|
8120 |
-
x: centerX + this.offsetX,
|
8121 |
-
y: centerY + this.offsetY,
|
8122 |
-
startAngle,
|
8123 |
-
endAngle: startAngle + circumference,
|
8124 |
-
circumference,
|
8125 |
-
outerRadius,
|
8126 |
-
innerRadius
|
8127 |
-
};
|
8128 |
-
if (includeOptions) {
|
8129 |
-
properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);
|
8130 |
-
}
|
8131 |
-
startAngle += circumference;
|
8132 |
-
this.updateElement(arc, i, properties, mode);
|
8133 |
-
}
|
8134 |
-
this.updateSharedOptions(sharedOptions, mode, firstOpts);
|
8135 |
-
}
|
8136 |
-
calculateTotal() {
|
8137 |
-
const meta = this._cachedMeta;
|
8138 |
-
const metaData = meta.data;
|
8139 |
-
let total = 0;
|
8140 |
-
let i;
|
8141 |
-
for (i = 0; i < metaData.length; i++) {
|
8142 |
-
const value = meta._parsed[i];
|
8143 |
-
if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {
|
8144 |
-
total += Math.abs(value);
|
8145 |
-
}
|
8146 |
-
}
|
8147 |
-
return total;
|
8148 |
-
}
|
8149 |
-
calculateCircumference(value) {
|
8150 |
-
const total = this._cachedMeta.total;
|
8151 |
-
if (total > 0 && !isNaN(value)) {
|
8152 |
-
return TAU * (Math.abs(value) / total);
|
8153 |
-
}
|
8154 |
-
return 0;
|
8155 |
-
}
|
8156 |
-
getLabelAndValue(index) {
|
8157 |
-
const meta = this._cachedMeta;
|
8158 |
-
const chart = this.chart;
|
8159 |
-
const labels = chart.data.labels || [];
|
8160 |
-
const value = formatNumber(meta._parsed[index], chart.options.locale);
|
8161 |
-
return {
|
8162 |
-
label: labels[index] || '',
|
8163 |
-
value,
|
8164 |
-
};
|
8165 |
-
}
|
8166 |
-
getMaxBorderWidth(arcs) {
|
8167 |
-
let max = 0;
|
8168 |
-
const chart = this.chart;
|
8169 |
-
let i, ilen, meta, controller, options;
|
8170 |
-
if (!arcs) {
|
8171 |
-
for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {
|
8172 |
-
if (chart.isDatasetVisible(i)) {
|
8173 |
-
meta = chart.getDatasetMeta(i);
|
8174 |
-
arcs = meta.data;
|
8175 |
-
controller = meta.controller;
|
8176 |
-
break;
|
8177 |
-
}
|
8178 |
-
}
|
8179 |
-
}
|
8180 |
-
if (!arcs) {
|
8181 |
-
return 0;
|
8182 |
-
}
|
8183 |
-
for (i = 0, ilen = arcs.length; i < ilen; ++i) {
|
8184 |
-
options = controller.resolveDataElementOptions(i);
|
8185 |
-
if (options.borderAlign !== 'inner') {
|
8186 |
-
max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);
|
8187 |
-
}
|
8188 |
-
}
|
8189 |
-
return max;
|
8190 |
-
}
|
8191 |
-
getMaxOffset(arcs) {
|
8192 |
-
let max = 0;
|
8193 |
-
for (let i = 0, ilen = arcs.length; i < ilen; ++i) {
|
8194 |
-
const options = this.resolveDataElementOptions(i);
|
8195 |
-
max = Math.max(max, options.offset || 0, options.hoverOffset || 0);
|
8196 |
-
}
|
8197 |
-
return max;
|
8198 |
-
}
|
8199 |
-
_getRingWeightOffset(datasetIndex) {
|
8200 |
-
let ringWeightOffset = 0;
|
8201 |
-
for (let i = 0; i < datasetIndex; ++i) {
|
8202 |
-
if (this.chart.isDatasetVisible(i)) {
|
8203 |
-
ringWeightOffset += this._getRingWeight(i);
|
8204 |
-
}
|
8205 |
-
}
|
8206 |
-
return ringWeightOffset;
|
8207 |
-
}
|
8208 |
-
_getRingWeight(datasetIndex) {
|
8209 |
-
return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);
|
8210 |
-
}
|
8211 |
-
_getVisibleDatasetWeightTotal() {
|
8212 |
-
return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
|
8213 |
-
}
|
8214 |
-
}
|
8215 |
-
DoughnutController.id = 'doughnut';
|
8216 |
-
DoughnutController.defaults = {
|
8217 |
-
datasetElementType: false,
|
8218 |
-
dataElementType: 'arc',
|
8219 |
-
animation: {
|
8220 |
-
animateRotate: true,
|
8221 |
-
animateScale: false
|
8222 |
-
},
|
8223 |
-
animations: {
|
8224 |
-
numbers: {
|
8225 |
-
type: 'number',
|
8226 |
-
properties: ['circumference', 'endAngle', 'innerRadius', 'outerRadius', 'startAngle', 'x', 'y', 'offset', 'borderWidth', 'spacing']
|
8227 |
-
},
|
8228 |
-
},
|
8229 |
-
cutout: '50%',
|
8230 |
-
rotation: 0,
|
8231 |
-
circumference: 360,
|
8232 |
-
radius: '100%',
|
8233 |
-
spacing: 0,
|
8234 |
-
indexAxis: 'r',
|
8235 |
-
};
|
8236 |
-
DoughnutController.descriptors = {
|
8237 |
-
_scriptable: (name) => name !== 'spacing',
|
8238 |
-
_indexable: (name) => name !== 'spacing',
|
8239 |
-
};
|
8240 |
-
DoughnutController.overrides = {
|
8241 |
-
aspectRatio: 1,
|
8242 |
-
plugins: {
|
8243 |
-
legend: {
|
8244 |
-
labels: {
|
8245 |
-
generateLabels(chart) {
|
8246 |
-
const data = chart.data;
|
8247 |
-
if (data.labels.length && data.datasets.length) {
|
8248 |
-
const {labels: {pointStyle}} = chart.legend.options;
|
8249 |
-
return data.labels.map((label, i) => {
|
8250 |
-
const meta = chart.getDatasetMeta(0);
|
8251 |
-
const style = meta.controller.getStyle(i);
|
8252 |
-
return {
|
8253 |
-
text: label,
|
8254 |
-
fillStyle: style.backgroundColor,
|
8255 |
-
strokeStyle: style.borderColor,
|
8256 |
-
lineWidth: style.borderWidth,
|
8257 |
-
pointStyle: pointStyle,
|
8258 |
-
hidden: !chart.getDataVisibility(i),
|
8259 |
-
index: i
|
8260 |
-
};
|
8261 |
-
});
|
8262 |
-
}
|
8263 |
-
return [];
|
8264 |
-
}
|
8265 |
-
},
|
8266 |
-
onClick(e, legendItem, legend) {
|
8267 |
-
legend.chart.toggleDataVisibility(legendItem.index);
|
8268 |
-
legend.chart.update();
|
8269 |
-
}
|
8270 |
-
},
|
8271 |
-
tooltip: {
|
8272 |
-
callbacks: {
|
8273 |
-
title() {
|
8274 |
-
return '';
|
8275 |
-
},
|
8276 |
-
label(tooltipItem) {
|
8277 |
-
let dataLabel = tooltipItem.label;
|
8278 |
-
const value = ': ' + tooltipItem.formattedValue;
|
8279 |
-
if (isArray(dataLabel)) {
|
8280 |
-
dataLabel = dataLabel.slice();
|
8281 |
-
dataLabel[0] += value;
|
8282 |
-
} else {
|
8283 |
-
dataLabel += value;
|
8284 |
-
}
|
8285 |
-
return dataLabel;
|
8286 |
-
}
|
8287 |
-
}
|
8288 |
-
}
|
8289 |
-
}
|
8290 |
-
};
|
8291 |
-
|
8292 |
-
class LineController extends DatasetController {
|
8293 |
-
initialize() {
|
8294 |
-
this.enableOptionSharing = true;
|
8295 |
-
super.initialize();
|
8296 |
-
}
|
8297 |
-
update(mode) {
|
8298 |
-
const meta = this._cachedMeta;
|
8299 |
-
const {dataset: line, data: points = [], _dataset} = meta;
|
8300 |
-
const animationsDisabled = this.chart._animationsDisabled;
|
8301 |
-
let {start, count} = getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);
|
8302 |
-
this._drawStart = start;
|
8303 |
-
this._drawCount = count;
|
8304 |
-
if (scaleRangesChanged(meta)) {
|
8305 |
-
start = 0;
|
8306 |
-
count = points.length;
|
8307 |
-
}
|
8308 |
-
line._chart = this.chart;
|
8309 |
-
line._datasetIndex = this.index;
|
8310 |
-
line._decimated = !!_dataset._decimated;
|
8311 |
-
line.points = points;
|
8312 |
-
const options = this.resolveDatasetElementOptions(mode);
|
8313 |
-
if (!this.options.showLine) {
|
8314 |
-
options.borderWidth = 0;
|
8315 |
-
}
|
8316 |
-
options.segment = this.options.segment;
|
8317 |
-
this.updateElement(line, undefined, {
|
8318 |
-
animated: !animationsDisabled,
|
8319 |
-
options
|
8320 |
-
}, mode);
|
8321 |
-
this.updateElements(points, start, count, mode);
|
8322 |
-
}
|
8323 |
-
updateElements(points, start, count, mode) {
|
8324 |
-
const reset = mode === 'reset';
|
8325 |
-
const {iScale, vScale, _stacked, _dataset} = this._cachedMeta;
|
8326 |
-
const firstOpts = this.resolveDataElementOptions(start, mode);
|
8327 |
-
const sharedOptions = this.getSharedOptions(firstOpts);
|
8328 |
-
const includeOptions = this.includeOptions(mode, sharedOptions);
|
8329 |
-
const iAxis = iScale.axis;
|
8330 |
-
const vAxis = vScale.axis;
|
8331 |
-
const {spanGaps, segment} = this.options;
|
8332 |
-
const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;
|
8333 |
-
const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';
|
8334 |
-
let prevParsed = start > 0 && this.getParsed(start - 1);
|
8335 |
-
for (let i = start; i < start + count; ++i) {
|
8336 |
-
const point = points[i];
|
8337 |
-
const parsed = this.getParsed(i);
|
8338 |
-
const properties = directUpdate ? point : {};
|
8339 |
-
const nullData = isNullOrUndef(parsed[vAxis]);
|
8340 |
-
const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);
|
8341 |
-
const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);
|
8342 |
-
properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;
|
8343 |
-
properties.stop = i > 0 && (parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;
|
8344 |
-
if (segment) {
|
8345 |
-
properties.parsed = parsed;
|
8346 |
-
properties.raw = _dataset.data[i];
|
8347 |
-
}
|
8348 |
-
if (includeOptions) {
|
8349 |
-
properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);
|
8350 |
-
}
|
8351 |
-
if (!directUpdate) {
|
8352 |
-
this.updateElement(point, i, properties, mode);
|
8353 |
-
}
|
8354 |
-
prevParsed = parsed;
|
8355 |
-
}
|
8356 |
-
this.updateSharedOptions(sharedOptions, mode, firstOpts);
|
8357 |
-
}
|
8358 |
-
getMaxOverflow() {
|
8359 |
-
const meta = this._cachedMeta;
|
8360 |
-
const dataset = meta.dataset;
|
8361 |
-
const border = dataset.options && dataset.options.borderWidth || 0;
|
8362 |
-
const data = meta.data || [];
|
8363 |
-
if (!data.length) {
|
8364 |
-
return border;
|
8365 |
-
}
|
8366 |
-
const firstPoint = data[0].size(this.resolveDataElementOptions(0));
|
8367 |
-
const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));
|
8368 |
-
return Math.max(border, firstPoint, lastPoint) / 2;
|
8369 |
-
}
|
8370 |
-
draw() {
|
8371 |
-
const meta = this._cachedMeta;
|
8372 |
-
meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);
|
8373 |
-
super.draw();
|
8374 |
-
}
|
8375 |
-
}
|
8376 |
-
LineController.id = 'line';
|
8377 |
-
LineController.defaults = {
|
8378 |
-
datasetElementType: 'line',
|
8379 |
-
dataElementType: 'point',
|
8380 |
-
showLine: true,
|
8381 |
-
spanGaps: false,
|
8382 |
-
};
|
8383 |
-
LineController.overrides = {
|
8384 |
-
scales: {
|
8385 |
-
_index_: {
|
8386 |
-
type: 'category',
|
8387 |
-
},
|
8388 |
-
_value_: {
|
8389 |
-
type: 'linear',
|
8390 |
-
},
|
8391 |
-
}
|
8392 |
-
};
|
8393 |
-
function getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {
|
8394 |
-
const pointCount = points.length;
|
8395 |
-
let start = 0;
|
8396 |
-
let count = pointCount;
|
8397 |
-
if (meta._sorted) {
|
8398 |
-
const {iScale, _parsed} = meta;
|
8399 |
-
const axis = iScale.axis;
|
8400 |
-
const {min, max, minDefined, maxDefined} = iScale.getUserBounds();
|
8401 |
-
if (minDefined) {
|
8402 |
-
start = _limitValue(Math.min(
|
8403 |
-
_lookupByKey(_parsed, iScale.axis, min).lo,
|
8404 |
-
animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo),
|
8405 |
-
0, pointCount - 1);
|
8406 |
-
}
|
8407 |
-
if (maxDefined) {
|
8408 |
-
count = _limitValue(Math.max(
|
8409 |
-
_lookupByKey(_parsed, iScale.axis, max).hi + 1,
|
8410 |
-
animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max)).hi + 1),
|
8411 |
-
start, pointCount) - start;
|
8412 |
-
} else {
|
8413 |
-
count = pointCount - start;
|
8414 |
-
}
|
8415 |
-
}
|
8416 |
-
return {start, count};
|
8417 |
-
}
|
8418 |
-
function scaleRangesChanged(meta) {
|
8419 |
-
const {xScale, yScale, _scaleRanges} = meta;
|
8420 |
-
const newRanges = {
|
8421 |
-
xmin: xScale.min,
|
8422 |
-
xmax: xScale.max,
|
8423 |
-
ymin: yScale.min,
|
8424 |
-
ymax: yScale.max
|
8425 |
-
};
|
8426 |
-
if (!_scaleRanges) {
|
8427 |
-
meta._scaleRanges = newRanges;
|
8428 |
-
return true;
|
8429 |
-
}
|
8430 |
-
const changed = _scaleRanges.xmin !== xScale.min
|
8431 |
-
|| _scaleRanges.xmax !== xScale.max
|
8432 |
-
|| _scaleRanges.ymin !== yScale.min
|
8433 |
-
|| _scaleRanges.ymax !== yScale.max;
|
8434 |
-
Object.assign(_scaleRanges, newRanges);
|
8435 |
-
return changed;
|
8436 |
-
}
|
8437 |
-
|
8438 |
-
class PolarAreaController extends DatasetController {
|
8439 |
-
constructor(chart, datasetIndex) {
|
8440 |
-
super(chart, datasetIndex);
|
8441 |
-
this.innerRadius = undefined;
|
8442 |
-
this.outerRadius = undefined;
|
8443 |
-
}
|
8444 |
-
getLabelAndValue(index) {
|
8445 |
-
const meta = this._cachedMeta;
|
8446 |
-
const chart = this.chart;
|
8447 |
-
const labels = chart.data.labels || [];
|
8448 |
-
const value = formatNumber(meta._parsed[index].r, chart.options.locale);
|
8449 |
-
return {
|
8450 |
-
label: labels[index] || '',
|
8451 |
-
value,
|
8452 |
-
};
|
8453 |
-
}
|
8454 |
-
update(mode) {
|
8455 |
-
const arcs = this._cachedMeta.data;
|
8456 |
-
this._updateRadius();
|
8457 |
-
this.updateElements(arcs, 0, arcs.length, mode);
|
8458 |
-
}
|
8459 |
-
_updateRadius() {
|
8460 |
-
const chart = this.chart;
|
8461 |
-
const chartArea = chart.chartArea;
|
8462 |
-
const opts = chart.options;
|
8463 |
-
const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);
|
8464 |
-
const outerRadius = Math.max(minSize / 2, 0);
|
8465 |
-
const innerRadius = Math.max(opts.cutoutPercentage ? (outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);
|
8466 |
-
const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();
|
8467 |
-
this.outerRadius = outerRadius - (radiusLength * this.index);
|
8468 |
-
this.innerRadius = this.outerRadius - radiusLength;
|
8469 |
-
}
|
8470 |
-
updateElements(arcs, start, count, mode) {
|
8471 |
-
const reset = mode === 'reset';
|
8472 |
-
const chart = this.chart;
|
8473 |
-
const dataset = this.getDataset();
|
8474 |
-
const opts = chart.options;
|
8475 |
-
const animationOpts = opts.animation;
|
8476 |
-
const scale = this._cachedMeta.rScale;
|
8477 |
-
const centerX = scale.xCenter;
|
8478 |
-
const centerY = scale.yCenter;
|
8479 |
-
const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;
|
8480 |
-
let angle = datasetStartAngle;
|
8481 |
-
let i;
|
8482 |
-
const defaultAngle = 360 / this.countVisibleElements();
|
8483 |
-
for (i = 0; i < start; ++i) {
|
8484 |
-
angle += this._computeAngle(i, mode, defaultAngle);
|
8485 |
-
}
|
8486 |
-
for (i = start; i < start + count; i++) {
|
8487 |
-
const arc = arcs[i];
|
8488 |
-
let startAngle = angle;
|
8489 |
-
let endAngle = angle + this._computeAngle(i, mode, defaultAngle);
|
8490 |
-
let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(dataset.data[i]) : 0;
|
8491 |
-
angle = endAngle;
|
8492 |
-
if (reset) {
|
8493 |
-
if (animationOpts.animateScale) {
|
8494 |
-
outerRadius = 0;
|
8495 |
-
}
|
8496 |
-
if (animationOpts.animateRotate) {
|
8497 |
-
startAngle = endAngle = datasetStartAngle;
|
8498 |
-
}
|
8499 |
-
}
|
8500 |
-
const properties = {
|
8501 |
-
x: centerX,
|
8502 |
-
y: centerY,
|
8503 |
-
innerRadius: 0,
|
8504 |
-
outerRadius,
|
8505 |
-
startAngle,
|
8506 |
-
endAngle,
|
8507 |
-
options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)
|
8508 |
-
};
|
8509 |
-
this.updateElement(arc, i, properties, mode);
|
8510 |
-
}
|
8511 |
-
}
|
8512 |
-
countVisibleElements() {
|
8513 |
-
const dataset = this.getDataset();
|
8514 |
-
const meta = this._cachedMeta;
|
8515 |
-
let count = 0;
|
8516 |
-
meta.data.forEach((element, index) => {
|
8517 |
-
if (!isNaN(dataset.data[index]) && this.chart.getDataVisibility(index)) {
|
8518 |
-
count++;
|
8519 |
-
}
|
8520 |
-
});
|
8521 |
-
return count;
|
8522 |
-
}
|
8523 |
-
_computeAngle(index, mode, defaultAngle) {
|
8524 |
-
return this.chart.getDataVisibility(index)
|
8525 |
-
? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle)
|
8526 |
-
: 0;
|
8527 |
-
}
|
8528 |
-
}
|
8529 |
-
PolarAreaController.id = 'polarArea';
|
8530 |
-
PolarAreaController.defaults = {
|
8531 |
-
dataElementType: 'arc',
|
8532 |
-
animation: {
|
8533 |
-
animateRotate: true,
|
8534 |
-
animateScale: true
|
8535 |
-
},
|
8536 |
-
animations: {
|
8537 |
-
numbers: {
|
8538 |
-
type: 'number',
|
8539 |
-
properties: ['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius']
|
8540 |
-
},
|
8541 |
-
},
|
8542 |
-
indexAxis: 'r',
|
8543 |
-
startAngle: 0,
|
8544 |
-
};
|
8545 |
-
PolarAreaController.overrides = {
|
8546 |
-
aspectRatio: 1,
|
8547 |
-
plugins: {
|
8548 |
-
legend: {
|
8549 |
-
labels: {
|
8550 |
-
generateLabels(chart) {
|
8551 |
-
const data = chart.data;
|
8552 |
-
if (data.labels.length && data.datasets.length) {
|
8553 |
-
const {labels: {pointStyle}} = chart.legend.options;
|
8554 |
-
return data.labels.map((label, i) => {
|
8555 |
-
const meta = chart.getDatasetMeta(0);
|
8556 |
-
const style = meta.controller.getStyle(i);
|
8557 |
-
return {
|
8558 |
-
text: label,
|
8559 |
-
fillStyle: style.backgroundColor,
|
8560 |
-
strokeStyle: style.borderColor,
|
8561 |
-
lineWidth: style.borderWidth,
|
8562 |
-
pointStyle: pointStyle,
|
8563 |
-
hidden: !chart.getDataVisibility(i),
|
8564 |
-
index: i
|
8565 |
-
};
|
8566 |
-
});
|
8567 |
-
}
|
8568 |
-
return [];
|
8569 |
-
}
|
8570 |
-
},
|
8571 |
-
onClick(e, legendItem, legend) {
|
8572 |
-
legend.chart.toggleDataVisibility(legendItem.index);
|
8573 |
-
legend.chart.update();
|
8574 |
-
}
|
8575 |
-
},
|
8576 |
-
tooltip: {
|
8577 |
-
callbacks: {
|
8578 |
-
title() {
|
8579 |
-
return '';
|
8580 |
-
},
|
8581 |
-
label(context) {
|
8582 |
-
return context.chart.data.labels[context.dataIndex] + ': ' + context.formattedValue;
|
8583 |
-
}
|
8584 |
-
}
|
8585 |
-
}
|
8586 |
-
},
|
8587 |
-
scales: {
|
8588 |
-
r: {
|
8589 |
-
type: 'radialLinear',
|
8590 |
-
angleLines: {
|
8591 |
-
display: false
|
8592 |
-
},
|
8593 |
-
beginAtZero: true,
|
8594 |
-
grid: {
|
8595 |
-
circular: true
|
8596 |
-
},
|
8597 |
-
pointLabels: {
|
8598 |
-
display: false
|
8599 |
-
},
|
8600 |
-
startAngle: 0
|
8601 |
-
}
|
8602 |
-
}
|
8603 |
-
};
|
8604 |
-
|
8605 |
-
class PieController extends DoughnutController {
|
8606 |
-
}
|
8607 |
-
PieController.id = 'pie';
|
8608 |
-
PieController.defaults = {
|
8609 |
-
cutout: 0,
|
8610 |
-
rotation: 0,
|
8611 |
-
circumference: 360,
|
8612 |
-
radius: '100%'
|
8613 |
-
};
|
8614 |
-
|
8615 |
-
class RadarController extends DatasetController {
|
8616 |
-
getLabelAndValue(index) {
|
8617 |
-
const vScale = this._cachedMeta.vScale;
|
8618 |
-
const parsed = this.getParsed(index);
|
8619 |
-
return {
|
8620 |
-
label: vScale.getLabels()[index],
|
8621 |
-
value: '' + vScale.getLabelForValue(parsed[vScale.axis])
|
8622 |
-
};
|
8623 |
-
}
|
8624 |
-
update(mode) {
|
8625 |
-
const meta = this._cachedMeta;
|
8626 |
-
const line = meta.dataset;
|
8627 |
-
const points = meta.data || [];
|
8628 |
-
const labels = meta.iScale.getLabels();
|
8629 |
-
line.points = points;
|
8630 |
-
if (mode !== 'resize') {
|
8631 |
-
const options = this.resolveDatasetElementOptions(mode);
|
8632 |
-
if (!this.options.showLine) {
|
8633 |
-
options.borderWidth = 0;
|
8634 |
-
}
|
8635 |
-
const properties = {
|
8636 |
-
_loop: true,
|
8637 |
-
_fullLoop: labels.length === points.length,
|
8638 |
-
options
|
8639 |
-
};
|
8640 |
-
this.updateElement(line, undefined, properties, mode);
|
8641 |
-
}
|
8642 |
-
this.updateElements(points, 0, points.length, mode);
|
8643 |
-
}
|
8644 |
-
updateElements(points, start, count, mode) {
|
8645 |
-
const dataset = this.getDataset();
|
8646 |
-
const scale = this._cachedMeta.rScale;
|
8647 |
-
const reset = mode === 'reset';
|
8648 |
-
for (let i = start; i < start + count; i++) {
|
8649 |
-
const point = points[i];
|
8650 |
-
const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);
|
8651 |
-
const pointPosition = scale.getPointPositionForValue(i, dataset.data[i]);
|
8652 |
-
const x = reset ? scale.xCenter : pointPosition.x;
|
8653 |
-
const y = reset ? scale.yCenter : pointPosition.y;
|
8654 |
-
const properties = {
|
8655 |
-
x,
|
8656 |
-
y,
|
8657 |
-
angle: pointPosition.angle,
|
8658 |
-
skip: isNaN(x) || isNaN(y),
|
8659 |
-
options
|
8660 |
-
};
|
8661 |
-
this.updateElement(point, i, properties, mode);
|
8662 |
-
}
|
8663 |
-
}
|
8664 |
-
}
|
8665 |
-
RadarController.id = 'radar';
|
8666 |
-
RadarController.defaults = {
|
8667 |
-
datasetElementType: 'line',
|
8668 |
-
dataElementType: 'point',
|
8669 |
-
indexAxis: 'r',
|
8670 |
-
showLine: true,
|
8671 |
-
elements: {
|
8672 |
-
line: {
|
8673 |
-
fill: 'start'
|
8674 |
-
}
|
8675 |
-
},
|
8676 |
-
};
|
8677 |
-
RadarController.overrides = {
|
8678 |
-
aspectRatio: 1,
|
8679 |
-
scales: {
|
8680 |
-
r: {
|
8681 |
-
type: 'radialLinear',
|
8682 |
-
}
|
8683 |
-
}
|
8684 |
-
};
|
8685 |
-
|
8686 |
-
class ScatterController extends LineController {
|
8687 |
-
}
|
8688 |
-
ScatterController.id = 'scatter';
|
8689 |
-
ScatterController.defaults = {
|
8690 |
-
showLine: false,
|
8691 |
-
fill: false
|
8692 |
-
};
|
8693 |
-
ScatterController.overrides = {
|
8694 |
-
interaction: {
|
8695 |
-
mode: 'point'
|
8696 |
-
},
|
8697 |
-
plugins: {
|
8698 |
-
tooltip: {
|
8699 |
-
callbacks: {
|
8700 |
-
title() {
|
8701 |
-
return '';
|
8702 |
-
},
|
8703 |
-
label(item) {
|
8704 |
-
return '(' + item.label + ', ' + item.formattedValue + ')';
|
8705 |
-
}
|
8706 |
-
}
|
8707 |
-
}
|
8708 |
-
},
|
8709 |
-
scales: {
|
8710 |
-
x: {
|
8711 |
-
type: 'linear'
|
8712 |
-
},
|
8713 |
-
y: {
|
8714 |
-
type: 'linear'
|
8715 |
-
}
|
8716 |
-
}
|
8717 |
-
};
|
8718 |
-
|
8719 |
-
var controllers = /*#__PURE__*/Object.freeze({
|
8720 |
-
__proto__: null,
|
8721 |
-
BarController: BarController,
|
8722 |
-
BubbleController: BubbleController,
|
8723 |
-
DoughnutController: DoughnutController,
|
8724 |
-
LineController: LineController,
|
8725 |
-
PolarAreaController: PolarAreaController,
|
8726 |
-
PieController: PieController,
|
8727 |
-
RadarController: RadarController,
|
8728 |
-
ScatterController: ScatterController
|
8729 |
-
});
|
8730 |
-
|
8731 |
-
function clipArc(ctx, element, endAngle) {
|
8732 |
-
const {startAngle, pixelMargin, x, y, outerRadius, innerRadius} = element;
|
8733 |
-
let angleMargin = pixelMargin / outerRadius;
|
8734 |
-
ctx.beginPath();
|
8735 |
-
ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);
|
8736 |
-
if (innerRadius > pixelMargin) {
|
8737 |
-
angleMargin = pixelMargin / innerRadius;
|
8738 |
-
ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);
|
8739 |
-
} else {
|
8740 |
-
ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);
|
8741 |
-
}
|
8742 |
-
ctx.closePath();
|
8743 |
-
ctx.clip();
|
8744 |
-
}
|
8745 |
-
function toRadiusCorners(value) {
|
8746 |
-
return _readValueToProps(value, ['outerStart', 'outerEnd', 'innerStart', 'innerEnd']);
|
8747 |
-
}
|
8748 |
-
function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {
|
8749 |
-
const o = toRadiusCorners(arc.options.borderRadius);
|
8750 |
-
const halfThickness = (outerRadius - innerRadius) / 2;
|
8751 |
-
const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);
|
8752 |
-
const computeOuterLimit = (val) => {
|
8753 |
-
const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;
|
8754 |
-
return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));
|
8755 |
-
};
|
8756 |
-
return {
|
8757 |
-
outerStart: computeOuterLimit(o.outerStart),
|
8758 |
-
outerEnd: computeOuterLimit(o.outerEnd),
|
8759 |
-
innerStart: _limitValue(o.innerStart, 0, innerLimit),
|
8760 |
-
innerEnd: _limitValue(o.innerEnd, 0, innerLimit),
|
8761 |
-
};
|
8762 |
-
}
|
8763 |
-
function rThetaToXY(r, theta, x, y) {
|
8764 |
-
return {
|
8765 |
-
x: x + r * Math.cos(theta),
|
8766 |
-
y: y + r * Math.sin(theta),
|
8767 |
-
};
|
8768 |
-
}
|
8769 |
-
function pathArc(ctx, element, offset, spacing, end) {
|
8770 |
-
const {x, y, startAngle: start, pixelMargin, innerRadius: innerR} = element;
|
8771 |
-
const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);
|
8772 |
-
const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;
|
8773 |
-
let spacingOffset = 0;
|
8774 |
-
const alpha = end - start;
|
8775 |
-
if (spacing) {
|
8776 |
-
const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;
|
8777 |
-
const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;
|
8778 |
-
const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;
|
8779 |
-
const adjustedAngle = avNogSpacingRadius !== 0 ? (alpha * avNogSpacingRadius) / (avNogSpacingRadius + spacing) : alpha;
|
8780 |
-
spacingOffset = (alpha - adjustedAngle) / 2;
|
8781 |
-
}
|
8782 |
-
const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;
|
8783 |
-
const angleOffset = (alpha - beta) / 2;
|
8784 |
-
const startAngle = start + angleOffset + spacingOffset;
|
8785 |
-
const endAngle = end - angleOffset - spacingOffset;
|
8786 |
-
const {outerStart, outerEnd, innerStart, innerEnd} = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);
|
8787 |
-
const outerStartAdjustedRadius = outerRadius - outerStart;
|
8788 |
-
const outerEndAdjustedRadius = outerRadius - outerEnd;
|
8789 |
-
const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;
|
8790 |
-
const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;
|
8791 |
-
const innerStartAdjustedRadius = innerRadius + innerStart;
|
8792 |
-
const innerEndAdjustedRadius = innerRadius + innerEnd;
|
8793 |
-
const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;
|
8794 |
-
const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;
|
8795 |
-
ctx.beginPath();
|
8796 |
-
ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerEndAdjustedAngle);
|
8797 |
-
if (outerEnd > 0) {
|
8798 |
-
const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);
|
8799 |
-
ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);
|
8800 |
-
}
|
8801 |
-
const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);
|
8802 |
-
ctx.lineTo(p4.x, p4.y);
|
8803 |
-
if (innerEnd > 0) {
|
8804 |
-
const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);
|
8805 |
-
ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);
|
8806 |
-
}
|
8807 |
-
ctx.arc(x, y, innerRadius, endAngle - (innerEnd / innerRadius), startAngle + (innerStart / innerRadius), true);
|
8808 |
-
if (innerStart > 0) {
|
8809 |
-
const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);
|
8810 |
-
ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);
|
8811 |
-
}
|
8812 |
-
const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);
|
8813 |
-
ctx.lineTo(p8.x, p8.y);
|
8814 |
-
if (outerStart > 0) {
|
8815 |
-
const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);
|
8816 |
-
ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);
|
8817 |
-
}
|
8818 |
-
ctx.closePath();
|
8819 |
-
}
|
8820 |
-
function drawArc(ctx, element, offset, spacing) {
|
8821 |
-
const {fullCircles, startAngle, circumference} = element;
|
8822 |
-
let endAngle = element.endAngle;
|
8823 |
-
if (fullCircles) {
|
8824 |
-
pathArc(ctx, element, offset, spacing, startAngle + TAU);
|
8825 |
-
for (let i = 0; i < fullCircles; ++i) {
|
8826 |
-
ctx.fill();
|
8827 |
-
}
|
8828 |
-
if (!isNaN(circumference)) {
|
8829 |
-
endAngle = startAngle + circumference % TAU;
|
8830 |
-
if (circumference % TAU === 0) {
|
8831 |
-
endAngle += TAU;
|
8832 |
-
}
|
8833 |
-
}
|
8834 |
-
}
|
8835 |
-
pathArc(ctx, element, offset, spacing, endAngle);
|
8836 |
-
ctx.fill();
|
8837 |
-
return endAngle;
|
8838 |
-
}
|
8839 |
-
function drawFullCircleBorders(ctx, element, inner) {
|
8840 |
-
const {x, y, startAngle, pixelMargin, fullCircles} = element;
|
8841 |
-
const outerRadius = Math.max(element.outerRadius - pixelMargin, 0);
|
8842 |
-
const innerRadius = element.innerRadius + pixelMargin;
|
8843 |
-
let i;
|
8844 |
-
if (inner) {
|
8845 |
-
clipArc(ctx, element, startAngle + TAU);
|
8846 |
-
}
|
8847 |
-
ctx.beginPath();
|
8848 |
-
ctx.arc(x, y, innerRadius, startAngle + TAU, startAngle, true);
|
8849 |
-
for (i = 0; i < fullCircles; ++i) {
|
8850 |
-
ctx.stroke();
|
8851 |
-
}
|
8852 |
-
ctx.beginPath();
|
8853 |
-
ctx.arc(x, y, outerRadius, startAngle, startAngle + TAU);
|
8854 |
-
for (i = 0; i < fullCircles; ++i) {
|
8855 |
-
ctx.stroke();
|
8856 |
-
}
|
8857 |
-
}
|
8858 |
-
function drawBorder(ctx, element, offset, spacing, endAngle) {
|
8859 |
-
const {options} = element;
|
8860 |
-
const inner = options.borderAlign === 'inner';
|
8861 |
-
if (!options.borderWidth) {
|
8862 |
-
return;
|
8863 |
-
}
|
8864 |
-
if (inner) {
|
8865 |
-
ctx.lineWidth = options.borderWidth * 2;
|
8866 |
-
ctx.lineJoin = 'round';
|
8867 |
-
} else {
|
8868 |
-
ctx.lineWidth = options.borderWidth;
|
8869 |
-
ctx.lineJoin = 'bevel';
|
8870 |
-
}
|
8871 |
-
if (element.fullCircles) {
|
8872 |
-
drawFullCircleBorders(ctx, element, inner);
|
8873 |
-
}
|
8874 |
-
if (inner) {
|
8875 |
-
clipArc(ctx, element, endAngle);
|
8876 |
-
}
|
8877 |
-
pathArc(ctx, element, offset, spacing, endAngle);
|
8878 |
-
ctx.stroke();
|
8879 |
-
}
|
8880 |
-
class ArcElement extends Element {
|
8881 |
-
constructor(cfg) {
|
8882 |
-
super();
|
8883 |
-
this.options = undefined;
|
8884 |
-
this.circumference = undefined;
|
8885 |
-
this.startAngle = undefined;
|
8886 |
-
this.endAngle = undefined;
|
8887 |
-
this.innerRadius = undefined;
|
8888 |
-
this.outerRadius = undefined;
|
8889 |
-
this.pixelMargin = 0;
|
8890 |
-
this.fullCircles = 0;
|
8891 |
-
if (cfg) {
|
8892 |
-
Object.assign(this, cfg);
|
8893 |
-
}
|
8894 |
-
}
|
8895 |
-
inRange(chartX, chartY, useFinalPosition) {
|
8896 |
-
const point = this.getProps(['x', 'y'], useFinalPosition);
|
8897 |
-
const {angle, distance} = getAngleFromPoint(point, {x: chartX, y: chartY});
|
8898 |
-
const {startAngle, endAngle, innerRadius, outerRadius, circumference} = this.getProps([
|
8899 |
-
'startAngle',
|
8900 |
-
'endAngle',
|
8901 |
-
'innerRadius',
|
8902 |
-
'outerRadius',
|
8903 |
-
'circumference'
|
8904 |
-
], useFinalPosition);
|
8905 |
-
const rAdjust = this.options.spacing / 2;
|
8906 |
-
const _circumference = valueOrDefault(circumference, endAngle - startAngle);
|
8907 |
-
const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);
|
8908 |
-
const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);
|
8909 |
-
return (betweenAngles && withinRadius);
|
8910 |
-
}
|
8911 |
-
getCenterPoint(useFinalPosition) {
|
8912 |
-
const {x, y, startAngle, endAngle, innerRadius, outerRadius} = this.getProps([
|
8913 |
-
'x',
|
8914 |
-
'y',
|
8915 |
-
'startAngle',
|
8916 |
-
'endAngle',
|
8917 |
-
'innerRadius',
|
8918 |
-
'outerRadius',
|
8919 |
-
'circumference',
|
8920 |
-
], useFinalPosition);
|
8921 |
-
const {offset, spacing} = this.options;
|
8922 |
-
const halfAngle = (startAngle + endAngle) / 2;
|
8923 |
-
const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;
|
8924 |
-
return {
|
8925 |
-
x: x + Math.cos(halfAngle) * halfRadius,
|
8926 |
-
y: y + Math.sin(halfAngle) * halfRadius
|
8927 |
-
};
|
8928 |
-
}
|
8929 |
-
tooltipPosition(useFinalPosition) {
|
8930 |
-
return this.getCenterPoint(useFinalPosition);
|
8931 |
-
}
|
8932 |
-
draw(ctx) {
|
8933 |
-
const {options, circumference} = this;
|
8934 |
-
const offset = (options.offset || 0) / 2;
|
8935 |
-
const spacing = (options.spacing || 0) / 2;
|
8936 |
-
this.pixelMargin = (options.borderAlign === 'inner') ? 0.33 : 0;
|
8937 |
-
this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;
|
8938 |
-
if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {
|
8939 |
-
return;
|
8940 |
-
}
|
8941 |
-
ctx.save();
|
8942 |
-
let radiusOffset = 0;
|
8943 |
-
if (offset) {
|
8944 |
-
radiusOffset = offset / 2;
|
8945 |
-
const halfAngle = (this.startAngle + this.endAngle) / 2;
|
8946 |
-
ctx.translate(Math.cos(halfAngle) * radiusOffset, Math.sin(halfAngle) * radiusOffset);
|
8947 |
-
if (this.circumference >= PI) {
|
8948 |
-
radiusOffset = offset;
|
8949 |
-
}
|
8950 |
-
}
|
8951 |
-
ctx.fillStyle = options.backgroundColor;
|
8952 |
-
ctx.strokeStyle = options.borderColor;
|
8953 |
-
const endAngle = drawArc(ctx, this, radiusOffset, spacing);
|
8954 |
-
drawBorder(ctx, this, radiusOffset, spacing, endAngle);
|
8955 |
-
ctx.restore();
|
8956 |
-
}
|
8957 |
-
}
|
8958 |
-
ArcElement.id = 'arc';
|
8959 |
-
ArcElement.defaults = {
|
8960 |
-
borderAlign: 'center',
|
8961 |
-
borderColor: '#fff',
|
8962 |
-
borderRadius: 0,
|
8963 |
-
borderWidth: 2,
|
8964 |
-
offset: 0,
|
8965 |
-
spacing: 0,
|
8966 |
-
angle: undefined,
|
8967 |
-
};
|
8968 |
-
ArcElement.defaultRoutes = {
|
8969 |
-
backgroundColor: 'backgroundColor'
|
8970 |
-
};
|
8971 |
-
|
8972 |
-
function setStyle(ctx, options, style = options) {
|
8973 |
-
ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);
|
8974 |
-
ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));
|
8975 |
-
ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);
|
8976 |
-
ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);
|
8977 |
-
ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);
|
8978 |
-
ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);
|
8979 |
-
}
|
8980 |
-
function lineTo(ctx, previous, target) {
|
8981 |
-
ctx.lineTo(target.x, target.y);
|
8982 |
-
}
|
8983 |
-
function getLineMethod(options) {
|
8984 |
-
if (options.stepped) {
|
8985 |
-
return _steppedLineTo;
|
8986 |
-
}
|
8987 |
-
if (options.tension || options.cubicInterpolationMode === 'monotone') {
|
8988 |
-
return _bezierCurveTo;
|
8989 |
-
}
|
8990 |
-
return lineTo;
|
8991 |
-
}
|
8992 |
-
function pathVars(points, segment, params = {}) {
|
8993 |
-
const count = points.length;
|
8994 |
-
const {start: paramsStart = 0, end: paramsEnd = count - 1} = params;
|
8995 |
-
const {start: segmentStart, end: segmentEnd} = segment;
|
8996 |
-
const start = Math.max(paramsStart, segmentStart);
|
8997 |
-
const end = Math.min(paramsEnd, segmentEnd);
|
8998 |
-
const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;
|
8999 |
-
return {
|
9000 |
-
count,
|
9001 |
-
start,
|
9002 |
-
loop: segment.loop,
|
9003 |
-
ilen: end < start && !outside ? count + end - start : end - start
|
9004 |
-
};
|
9005 |
-
}
|
9006 |
-
function pathSegment(ctx, line, segment, params) {
|
9007 |
-
const {points, options} = line;
|
9008 |
-
const {count, start, loop, ilen} = pathVars(points, segment, params);
|
9009 |
-
const lineMethod = getLineMethod(options);
|
9010 |
-
let {move = true, reverse} = params || {};
|
9011 |
-
let i, point, prev;
|
9012 |
-
for (i = 0; i <= ilen; ++i) {
|
9013 |
-
point = points[(start + (reverse ? ilen - i : i)) % count];
|
9014 |
-
if (point.skip) {
|
9015 |
-
continue;
|
9016 |
-
} else if (move) {
|
9017 |
-
ctx.moveTo(point.x, point.y);
|
9018 |
-
move = false;
|
9019 |
-
} else {
|
9020 |
-
lineMethod(ctx, prev, point, reverse, options.stepped);
|
9021 |
-
}
|
9022 |
-
prev = point;
|
9023 |
-
}
|
9024 |
-
if (loop) {
|
9025 |
-
point = points[(start + (reverse ? ilen : 0)) % count];
|
9026 |
-
lineMethod(ctx, prev, point, reverse, options.stepped);
|
9027 |
-
}
|
9028 |
-
return !!loop;
|
9029 |
-
}
|
9030 |
-
function fastPathSegment(ctx, line, segment, params) {
|
9031 |
-
const points = line.points;
|
9032 |
-
const {count, start, ilen} = pathVars(points, segment, params);
|
9033 |
-
const {move = true, reverse} = params || {};
|
9034 |
-
let avgX = 0;
|
9035 |
-
let countX = 0;
|
9036 |
-
let i, point, prevX, minY, maxY, lastY;
|
9037 |
-
const pointIndex = (index) => (start + (reverse ? ilen - index : index)) % count;
|
9038 |
-
const drawX = () => {
|
9039 |
-
if (minY !== maxY) {
|
9040 |
-
ctx.lineTo(avgX, maxY);
|
9041 |
-
ctx.lineTo(avgX, minY);
|
9042 |
-
ctx.lineTo(avgX, lastY);
|
9043 |
-
}
|
9044 |
-
};
|
9045 |
-
if (move) {
|
9046 |
-
point = points[pointIndex(0)];
|
9047 |
-
ctx.moveTo(point.x, point.y);
|
9048 |
-
}
|
9049 |
-
for (i = 0; i <= ilen; ++i) {
|
9050 |
-
point = points[pointIndex(i)];
|
9051 |
-
if (point.skip) {
|
9052 |
-
continue;
|
9053 |
-
}
|
9054 |
-
const x = point.x;
|
9055 |
-
const y = point.y;
|
9056 |
-
const truncX = x | 0;
|
9057 |
-
if (truncX === prevX) {
|
9058 |
-
if (y < minY) {
|
9059 |
-
minY = y;
|
9060 |
-
} else if (y > maxY) {
|
9061 |
-
maxY = y;
|
9062 |
-
}
|
9063 |
-
avgX = (countX * avgX + x) / ++countX;
|
9064 |
-
} else {
|
9065 |
-
drawX();
|
9066 |
-
ctx.lineTo(x, y);
|
9067 |
-
prevX = truncX;
|
9068 |
-
countX = 0;
|
9069 |
-
minY = maxY = y;
|
9070 |
-
}
|
9071 |
-
lastY = y;
|
9072 |
-
}
|
9073 |
-
drawX();
|
9074 |
-
}
|
9075 |
-
function _getSegmentMethod(line) {
|
9076 |
-
const opts = line.options;
|
9077 |
-
const borderDash = opts.borderDash && opts.borderDash.length;
|
9078 |
-
const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;
|
9079 |
-
return useFastPath ? fastPathSegment : pathSegment;
|
9080 |
-
}
|
9081 |
-
function _getInterpolationMethod(options) {
|
9082 |
-
if (options.stepped) {
|
9083 |
-
return _steppedInterpolation;
|
9084 |
-
}
|
9085 |
-
if (options.tension || options.cubicInterpolationMode === 'monotone') {
|
9086 |
-
return _bezierInterpolation;
|
9087 |
-
}
|
9088 |
-
return _pointInLine;
|
9089 |
-
}
|
9090 |
-
function strokePathWithCache(ctx, line, start, count) {
|
9091 |
-
let path = line._path;
|
9092 |
-
if (!path) {
|
9093 |
-
path = line._path = new Path2D();
|
9094 |
-
if (line.path(path, start, count)) {
|
9095 |
-
path.closePath();
|
9096 |
-
}
|
9097 |
-
}
|
9098 |
-
setStyle(ctx, line.options);
|
9099 |
-
ctx.stroke(path);
|
9100 |
-
}
|
9101 |
-
function strokePathDirect(ctx, line, start, count) {
|
9102 |
-
const {segments, options} = line;
|
9103 |
-
const segmentMethod = _getSegmentMethod(line);
|
9104 |
-
for (const segment of segments) {
|
9105 |
-
setStyle(ctx, options, segment.style);
|
9106 |
-
ctx.beginPath();
|
9107 |
-
if (segmentMethod(ctx, line, segment, {start, end: start + count - 1})) {
|
9108 |
-
ctx.closePath();
|
9109 |
-
}
|
9110 |
-
ctx.stroke();
|
9111 |
-
}
|
9112 |
-
}
|
9113 |
-
const usePath2D = typeof Path2D === 'function';
|
9114 |
-
function draw(ctx, line, start, count) {
|
9115 |
-
if (usePath2D && !line.options.segment) {
|
9116 |
-
strokePathWithCache(ctx, line, start, count);
|
9117 |
-
} else {
|
9118 |
-
strokePathDirect(ctx, line, start, count);
|
9119 |
-
}
|
9120 |
-
}
|
9121 |
-
class LineElement extends Element {
|
9122 |
-
constructor(cfg) {
|
9123 |
-
super();
|
9124 |
-
this.animated = true;
|
9125 |
-
this.options = undefined;
|
9126 |
-
this._chart = undefined;
|
9127 |
-
this._loop = undefined;
|
9128 |
-
this._fullLoop = undefined;
|
9129 |
-
this._path = undefined;
|
9130 |
-
this._points = undefined;
|
9131 |
-
this._segments = undefined;
|
9132 |
-
this._decimated = false;
|
9133 |
-
this._pointsUpdated = false;
|
9134 |
-
this._datasetIndex = undefined;
|
9135 |
-
if (cfg) {
|
9136 |
-
Object.assign(this, cfg);
|
9137 |
-
}
|
9138 |
-
}
|
9139 |
-
updateControlPoints(chartArea, indexAxis) {
|
9140 |
-
const options = this.options;
|
9141 |
-
if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {
|
9142 |
-
const loop = options.spanGaps ? this._loop : this._fullLoop;
|
9143 |
-
_updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);
|
9144 |
-
this._pointsUpdated = true;
|
9145 |
-
}
|
9146 |
-
}
|
9147 |
-
set points(points) {
|
9148 |
-
this._points = points;
|
9149 |
-
delete this._segments;
|
9150 |
-
delete this._path;
|
9151 |
-
this._pointsUpdated = false;
|
9152 |
-
}
|
9153 |
-
get points() {
|
9154 |
-
return this._points;
|
9155 |
-
}
|
9156 |
-
get segments() {
|
9157 |
-
return this._segments || (this._segments = _computeSegments(this, this.options.segment));
|
9158 |
-
}
|
9159 |
-
first() {
|
9160 |
-
const segments = this.segments;
|
9161 |
-
const points = this.points;
|
9162 |
-
return segments.length && points[segments[0].start];
|
9163 |
-
}
|
9164 |
-
last() {
|
9165 |
-
const segments = this.segments;
|
9166 |
-
const points = this.points;
|
9167 |
-
const count = segments.length;
|
9168 |
-
return count && points[segments[count - 1].end];
|
9169 |
-
}
|
9170 |
-
interpolate(point, property) {
|
9171 |
-
const options = this.options;
|
9172 |
-
const value = point[property];
|
9173 |
-
const points = this.points;
|
9174 |
-
const segments = _boundSegments(this, {property, start: value, end: value});
|
9175 |
-
if (!segments.length) {
|
9176 |
-
return;
|
9177 |
-
}
|
9178 |
-
const result = [];
|
9179 |
-
const _interpolate = _getInterpolationMethod(options);
|
9180 |
-
let i, ilen;
|
9181 |
-
for (i = 0, ilen = segments.length; i < ilen; ++i) {
|
9182 |
-
const {start, end} = segments[i];
|
9183 |
-
const p1 = points[start];
|
9184 |
-
const p2 = points[end];
|
9185 |
-
if (p1 === p2) {
|
9186 |
-
result.push(p1);
|
9187 |
-
continue;
|
9188 |
-
}
|
9189 |
-
const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));
|
9190 |
-
const interpolated = _interpolate(p1, p2, t, options.stepped);
|
9191 |
-
interpolated[property] = point[property];
|
9192 |
-
result.push(interpolated);
|
9193 |
-
}
|
9194 |
-
return result.length === 1 ? result[0] : result;
|
9195 |
-
}
|
9196 |
-
pathSegment(ctx, segment, params) {
|
9197 |
-
const segmentMethod = _getSegmentMethod(this);
|
9198 |
-
return segmentMethod(ctx, this, segment, params);
|
9199 |
-
}
|
9200 |
-
path(ctx, start, count) {
|
9201 |
-
const segments = this.segments;
|
9202 |
-
const segmentMethod = _getSegmentMethod(this);
|
9203 |
-
let loop = this._loop;
|
9204 |
-
start = start || 0;
|
9205 |
-
count = count || (this.points.length - start);
|
9206 |
-
for (const segment of segments) {
|
9207 |
-
loop &= segmentMethod(ctx, this, segment, {start, end: start + count - 1});
|
9208 |
-
}
|
9209 |
-
return !!loop;
|
9210 |
-
}
|
9211 |
-
draw(ctx, chartArea, start, count) {
|
9212 |
-
const options = this.options || {};
|
9213 |
-
const points = this.points || [];
|
9214 |
-
if (points.length && options.borderWidth) {
|
9215 |
-
ctx.save();
|
9216 |
-
draw(ctx, this, start, count);
|
9217 |
-
ctx.restore();
|
9218 |
-
}
|
9219 |
-
if (this.animated) {
|
9220 |
-
this._pointsUpdated = false;
|
9221 |
-
this._path = undefined;
|
9222 |
-
}
|
9223 |
-
}
|
9224 |
-
}
|
9225 |
-
LineElement.id = 'line';
|
9226 |
-
LineElement.defaults = {
|
9227 |
-
borderCapStyle: 'butt',
|
9228 |
-
borderDash: [],
|
9229 |
-
borderDashOffset: 0,
|
9230 |
-
borderJoinStyle: 'miter',
|
9231 |
-
borderWidth: 3,
|
9232 |
-
capBezierPoints: true,
|
9233 |
-
cubicInterpolationMode: 'default',
|
9234 |
-
fill: false,
|
9235 |
-
spanGaps: false,
|
9236 |
-
stepped: false,
|
9237 |
-
tension: 0,
|
9238 |
-
};
|
9239 |
-
LineElement.defaultRoutes = {
|
9240 |
-
backgroundColor: 'backgroundColor',
|
9241 |
-
borderColor: 'borderColor'
|
9242 |
-
};
|
9243 |
-
LineElement.descriptors = {
|
9244 |
-
_scriptable: true,
|
9245 |
-
_indexable: (name) => name !== 'borderDash' && name !== 'fill',
|
9246 |
-
};
|
9247 |
-
|
9248 |
-
function inRange$1(el, pos, axis, useFinalPosition) {
|
9249 |
-
const options = el.options;
|
9250 |
-
const {[axis]: value} = el.getProps([axis], useFinalPosition);
|
9251 |
-
return (Math.abs(pos - value) < options.radius + options.hitRadius);
|
9252 |
-
}
|
9253 |
-
class PointElement extends Element {
|
9254 |
-
constructor(cfg) {
|
9255 |
-
super();
|
9256 |
-
this.options = undefined;
|
9257 |
-
this.parsed = undefined;
|
9258 |
-
this.skip = undefined;
|
9259 |
-
this.stop = undefined;
|
9260 |
-
if (cfg) {
|
9261 |
-
Object.assign(this, cfg);
|
9262 |
-
}
|
9263 |
-
}
|
9264 |
-
inRange(mouseX, mouseY, useFinalPosition) {
|
9265 |
-
const options = this.options;
|
9266 |
-
const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
|
9267 |
-
return ((Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2)) < Math.pow(options.hitRadius + options.radius, 2));
|
9268 |
-
}
|
9269 |
-
inXRange(mouseX, useFinalPosition) {
|
9270 |
-
return inRange$1(this, mouseX, 'x', useFinalPosition);
|
9271 |
-
}
|
9272 |
-
inYRange(mouseY, useFinalPosition) {
|
9273 |
-
return inRange$1(this, mouseY, 'y', useFinalPosition);
|
9274 |
-
}
|
9275 |
-
getCenterPoint(useFinalPosition) {
|
9276 |
-
const {x, y} = this.getProps(['x', 'y'], useFinalPosition);
|
9277 |
-
return {x, y};
|
9278 |
-
}
|
9279 |
-
size(options) {
|
9280 |
-
options = options || this.options || {};
|
9281 |
-
let radius = options.radius || 0;
|
9282 |
-
radius = Math.max(radius, radius && options.hoverRadius || 0);
|
9283 |
-
const borderWidth = radius && options.borderWidth || 0;
|
9284 |
-
return (radius + borderWidth) * 2;
|
9285 |
-
}
|
9286 |
-
draw(ctx, area) {
|
9287 |
-
const options = this.options;
|
9288 |
-
if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {
|
9289 |
-
return;
|
9290 |
-
}
|
9291 |
-
ctx.strokeStyle = options.borderColor;
|
9292 |
-
ctx.lineWidth = options.borderWidth;
|
9293 |
-
ctx.fillStyle = options.backgroundColor;
|
9294 |
-
drawPoint(ctx, options, this.x, this.y);
|
9295 |
-
}
|
9296 |
-
getRange() {
|
9297 |
-
const options = this.options || {};
|
9298 |
-
return options.radius + options.hitRadius;
|
9299 |
-
}
|
9300 |
-
}
|
9301 |
-
PointElement.id = 'point';
|
9302 |
-
PointElement.defaults = {
|
9303 |
-
borderWidth: 1,
|
9304 |
-
hitRadius: 1,
|
9305 |
-
hoverBorderWidth: 1,
|
9306 |
-
hoverRadius: 4,
|
9307 |
-
pointStyle: 'circle',
|
9308 |
-
radius: 3,
|
9309 |
-
rotation: 0
|
9310 |
-
};
|
9311 |
-
PointElement.defaultRoutes = {
|
9312 |
-
backgroundColor: 'backgroundColor',
|
9313 |
-
borderColor: 'borderColor'
|
9314 |
-
};
|
9315 |
-
|
9316 |
-
function getBarBounds(bar, useFinalPosition) {
|
9317 |
-
const {x, y, base, width, height} = bar.getProps(['x', 'y', 'base', 'width', 'height'], useFinalPosition);
|
9318 |
-
let left, right, top, bottom, half;
|
9319 |
-
if (bar.horizontal) {
|
9320 |
-
half = height / 2;
|
9321 |
-
left = Math.min(x, base);
|
9322 |
-
right = Math.max(x, base);
|
9323 |
-
top = y - half;
|
9324 |
-
bottom = y + half;
|
9325 |
-
} else {
|
9326 |
-
half = width / 2;
|
9327 |
-
left = x - half;
|
9328 |
-
right = x + half;
|
9329 |
-
top = Math.min(y, base);
|
9330 |
-
bottom = Math.max(y, base);
|
9331 |
-
}
|
9332 |
-
return {left, top, right, bottom};
|
9333 |
-
}
|
9334 |
-
function skipOrLimit(skip, value, min, max) {
|
9335 |
-
return skip ? 0 : _limitValue(value, min, max);
|
9336 |
-
}
|
9337 |
-
function parseBorderWidth(bar, maxW, maxH) {
|
9338 |
-
const value = bar.options.borderWidth;
|
9339 |
-
const skip = bar.borderSkipped;
|
9340 |
-
const o = toTRBL(value);
|
9341 |
-
return {
|
9342 |
-
t: skipOrLimit(skip.top, o.top, 0, maxH),
|
9343 |
-
r: skipOrLimit(skip.right, o.right, 0, maxW),
|
9344 |
-
b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),
|
9345 |
-
l: skipOrLimit(skip.left, o.left, 0, maxW)
|
9346 |
-
};
|
9347 |
-
}
|
9348 |
-
function parseBorderRadius(bar, maxW, maxH) {
|
9349 |
-
const {enableBorderRadius} = bar.getProps(['enableBorderRadius']);
|
9350 |
-
const value = bar.options.borderRadius;
|
9351 |
-
const o = toTRBLCorners(value);
|
9352 |
-
const maxR = Math.min(maxW, maxH);
|
9353 |
-
const skip = bar.borderSkipped;
|
9354 |
-
const enableBorder = enableBorderRadius || isObject(value);
|
9355 |
-
return {
|
9356 |
-
topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),
|
9357 |
-
topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),
|
9358 |
-
bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),
|
9359 |
-
bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)
|
9360 |
-
};
|
9361 |
-
}
|
9362 |
-
function boundingRects(bar) {
|
9363 |
-
const bounds = getBarBounds(bar);
|
9364 |
-
const width = bounds.right - bounds.left;
|
9365 |
-
const height = bounds.bottom - bounds.top;
|
9366 |
-
const border = parseBorderWidth(bar, width / 2, height / 2);
|
9367 |
-
const radius = parseBorderRadius(bar, width / 2, height / 2);
|
9368 |
-
return {
|
9369 |
-
outer: {
|
9370 |
-
x: bounds.left,
|
9371 |
-
y: bounds.top,
|
9372 |
-
w: width,
|
9373 |
-
h: height,
|
9374 |
-
radius
|
9375 |
-
},
|
9376 |
-
inner: {
|
9377 |
-
x: bounds.left + border.l,
|
9378 |
-
y: bounds.top + border.t,
|
9379 |
-
w: width - border.l - border.r,
|
9380 |
-
h: height - border.t - border.b,
|
9381 |
-
radius: {
|
9382 |
-
topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),
|
9383 |
-
topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),
|
9384 |
-
bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),
|
9385 |
-
bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r)),
|
9386 |
-
}
|
9387 |
-
}
|
9388 |
-
};
|
9389 |
-
}
|
9390 |
-
function inRange(bar, x, y, useFinalPosition) {
|
9391 |
-
const skipX = x === null;
|
9392 |
-
const skipY = y === null;
|
9393 |
-
const skipBoth = skipX && skipY;
|
9394 |
-
const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);
|
9395 |
-
return bounds
|
9396 |
-
&& (skipX || _isBetween(x, bounds.left, bounds.right))
|
9397 |
-
&& (skipY || _isBetween(y, bounds.top, bounds.bottom));
|
9398 |
-
}
|
9399 |
-
function hasRadius(radius) {
|
9400 |
-
return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;
|
9401 |
-
}
|
9402 |
-
function addNormalRectPath(ctx, rect) {
|
9403 |
-
ctx.rect(rect.x, rect.y, rect.w, rect.h);
|
9404 |
-
}
|
9405 |
-
function inflateRect(rect, amount, refRect = {}) {
|
9406 |
-
const x = rect.x !== refRect.x ? -amount : 0;
|
9407 |
-
const y = rect.y !== refRect.y ? -amount : 0;
|
9408 |
-
const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;
|
9409 |
-
const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;
|
9410 |
-
return {
|
9411 |
-
x: rect.x + x,
|
9412 |
-
y: rect.y + y,
|
9413 |
-
w: rect.w + w,
|
9414 |
-
h: rect.h + h,
|
9415 |
-
radius: rect.radius
|
9416 |
-
};
|
9417 |
-
}
|
9418 |
-
class BarElement extends Element {
|
9419 |
-
constructor(cfg) {
|
9420 |
-
super();
|
9421 |
-
this.options = undefined;
|
9422 |
-
this.horizontal = undefined;
|
9423 |
-
this.base = undefined;
|
9424 |
-
this.width = undefined;
|
9425 |
-
this.height = undefined;
|
9426 |
-
this.inflateAmount = undefined;
|
9427 |
-
if (cfg) {
|
9428 |
-
Object.assign(this, cfg);
|
9429 |
-
}
|
9430 |
-
}
|
9431 |
-
draw(ctx) {
|
9432 |
-
const {inflateAmount, options: {borderColor, backgroundColor}} = this;
|
9433 |
-
const {inner, outer} = boundingRects(this);
|
9434 |
-
const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;
|
9435 |
-
ctx.save();
|
9436 |
-
if (outer.w !== inner.w || outer.h !== inner.h) {
|
9437 |
-
ctx.beginPath();
|
9438 |
-
addRectPath(ctx, inflateRect(outer, inflateAmount, inner));
|
9439 |
-
ctx.clip();
|
9440 |
-
addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));
|
9441 |
-
ctx.fillStyle = borderColor;
|
9442 |
-
ctx.fill('evenodd');
|
9443 |
-
}
|
9444 |
-
ctx.beginPath();
|
9445 |
-
addRectPath(ctx, inflateRect(inner, inflateAmount));
|
9446 |
-
ctx.fillStyle = backgroundColor;
|
9447 |
-
ctx.fill();
|
9448 |
-
ctx.restore();
|
9449 |
-
}
|
9450 |
-
inRange(mouseX, mouseY, useFinalPosition) {
|
9451 |
-
return inRange(this, mouseX, mouseY, useFinalPosition);
|
9452 |
-
}
|
9453 |
-
inXRange(mouseX, useFinalPosition) {
|
9454 |
-
return inRange(this, mouseX, null, useFinalPosition);
|
9455 |
-
}
|
9456 |
-
inYRange(mouseY, useFinalPosition) {
|
9457 |
-
return inRange(this, null, mouseY, useFinalPosition);
|
9458 |
-
}
|
9459 |
-
getCenterPoint(useFinalPosition) {
|
9460 |
-
const {x, y, base, horizontal} = this.getProps(['x', 'y', 'base', 'horizontal'], useFinalPosition);
|
9461 |
-
return {
|
9462 |
-
x: horizontal ? (x + base) / 2 : x,
|
9463 |
-
y: horizontal ? y : (y + base) / 2
|
9464 |
-
};
|
9465 |
-
}
|
9466 |
-
getRange(axis) {
|
9467 |
-
return axis === 'x' ? this.width / 2 : this.height / 2;
|
9468 |
-
}
|
9469 |
-
}
|
9470 |
-
BarElement.id = 'bar';
|
9471 |
-
BarElement.defaults = {
|
9472 |
-
borderSkipped: 'start',
|
9473 |
-
borderWidth: 0,
|
9474 |
-
borderRadius: 0,
|
9475 |
-
inflateAmount: 'auto',
|
9476 |
-
pointStyle: undefined
|
9477 |
-
};
|
9478 |
-
BarElement.defaultRoutes = {
|
9479 |
-
backgroundColor: 'backgroundColor',
|
9480 |
-
borderColor: 'borderColor'
|
9481 |
-
};
|
9482 |
-
|
9483 |
-
var elements = /*#__PURE__*/Object.freeze({
|
9484 |
-
__proto__: null,
|
9485 |
-
ArcElement: ArcElement,
|
9486 |
-
LineElement: LineElement,
|
9487 |
-
PointElement: PointElement,
|
9488 |
-
BarElement: BarElement
|
9489 |
-
});
|
9490 |
-
|
9491 |
-
function lttbDecimation(data, start, count, availableWidth, options) {
|
9492 |
-
const samples = options.samples || availableWidth;
|
9493 |
-
if (samples >= count) {
|
9494 |
-
return data.slice(start, start + count);
|
9495 |
-
}
|
9496 |
-
const decimated = [];
|
9497 |
-
const bucketWidth = (count - 2) / (samples - 2);
|
9498 |
-
let sampledIndex = 0;
|
9499 |
-
const endIndex = start + count - 1;
|
9500 |
-
let a = start;
|
9501 |
-
let i, maxAreaPoint, maxArea, area, nextA;
|
9502 |
-
decimated[sampledIndex++] = data[a];
|
9503 |
-
for (i = 0; i < samples - 2; i++) {
|
9504 |
-
let avgX = 0;
|
9505 |
-
let avgY = 0;
|
9506 |
-
let j;
|
9507 |
-
const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;
|
9508 |
-
const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;
|
9509 |
-
const avgRangeLength = avgRangeEnd - avgRangeStart;
|
9510 |
-
for (j = avgRangeStart; j < avgRangeEnd; j++) {
|
9511 |
-
avgX += data[j].x;
|
9512 |
-
avgY += data[j].y;
|
9513 |
-
}
|
9514 |
-
avgX /= avgRangeLength;
|
9515 |
-
avgY /= avgRangeLength;
|
9516 |
-
const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;
|
9517 |
-
const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;
|
9518 |
-
const {x: pointAx, y: pointAy} = data[a];
|
9519 |
-
maxArea = area = -1;
|
9520 |
-
for (j = rangeOffs; j < rangeTo; j++) {
|
9521 |
-
area = 0.5 * Math.abs(
|
9522 |
-
(pointAx - avgX) * (data[j].y - pointAy) -
|
9523 |
-
(pointAx - data[j].x) * (avgY - pointAy)
|
9524 |
-
);
|
9525 |
-
if (area > maxArea) {
|
9526 |
-
maxArea = area;
|
9527 |
-
maxAreaPoint = data[j];
|
9528 |
-
nextA = j;
|
9529 |
-
}
|
9530 |
-
}
|
9531 |
-
decimated[sampledIndex++] = maxAreaPoint;
|
9532 |
-
a = nextA;
|
9533 |
-
}
|
9534 |
-
decimated[sampledIndex++] = data[endIndex];
|
9535 |
-
return decimated;
|
9536 |
-
}
|
9537 |
-
function minMaxDecimation(data, start, count, availableWidth) {
|
9538 |
-
let avgX = 0;
|
9539 |
-
let countX = 0;
|
9540 |
-
let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;
|
9541 |
-
const decimated = [];
|
9542 |
-
const endIndex = start + count - 1;
|
9543 |
-
const xMin = data[start].x;
|
9544 |
-
const xMax = data[endIndex].x;
|
9545 |
-
const dx = xMax - xMin;
|
9546 |
-
for (i = start; i < start + count; ++i) {
|
9547 |
-
point = data[i];
|
9548 |
-
x = (point.x - xMin) / dx * availableWidth;
|
9549 |
-
y = point.y;
|
9550 |
-
const truncX = x | 0;
|
9551 |
-
if (truncX === prevX) {
|
9552 |
-
if (y < minY) {
|
9553 |
-
minY = y;
|
9554 |
-
minIndex = i;
|
9555 |
-
} else if (y > maxY) {
|
9556 |
-
maxY = y;
|
9557 |
-
maxIndex = i;
|
9558 |
-
}
|
9559 |
-
avgX = (countX * avgX + point.x) / ++countX;
|
9560 |
-
} else {
|
9561 |
-
const lastIndex = i - 1;
|
9562 |
-
if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {
|
9563 |
-
const intermediateIndex1 = Math.min(minIndex, maxIndex);
|
9564 |
-
const intermediateIndex2 = Math.max(minIndex, maxIndex);
|
9565 |
-
if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {
|
9566 |
-
decimated.push({
|
9567 |
-
...data[intermediateIndex1],
|
9568 |
-
x: avgX,
|
9569 |
-
});
|
9570 |
-
}
|
9571 |
-
if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {
|
9572 |
-
decimated.push({
|
9573 |
-
...data[intermediateIndex2],
|
9574 |
-
x: avgX
|
9575 |
-
});
|
9576 |
-
}
|
9577 |
-
}
|
9578 |
-
if (i > 0 && lastIndex !== startIndex) {
|
9579 |
-
decimated.push(data[lastIndex]);
|
9580 |
-
}
|
9581 |
-
decimated.push(point);
|
9582 |
-
prevX = truncX;
|
9583 |
-
countX = 0;
|
9584 |
-
minY = maxY = y;
|
9585 |
-
minIndex = maxIndex = startIndex = i;
|
9586 |
-
}
|
9587 |
-
}
|
9588 |
-
return decimated;
|
9589 |
-
}
|
9590 |
-
function cleanDecimatedDataset(dataset) {
|
9591 |
-
if (dataset._decimated) {
|
9592 |
-
const data = dataset._data;
|
9593 |
-
delete dataset._decimated;
|
9594 |
-
delete dataset._data;
|
9595 |
-
Object.defineProperty(dataset, 'data', {value: data});
|
9596 |
-
}
|
9597 |
-
}
|
9598 |
-
function cleanDecimatedData(chart) {
|
9599 |
-
chart.data.datasets.forEach((dataset) => {
|
9600 |
-
cleanDecimatedDataset(dataset);
|
9601 |
-
});
|
9602 |
-
}
|
9603 |
-
function getStartAndCountOfVisiblePointsSimplified(meta, points) {
|
9604 |
-
const pointCount = points.length;
|
9605 |
-
let start = 0;
|
9606 |
-
let count;
|
9607 |
-
const {iScale} = meta;
|
9608 |
-
const {min, max, minDefined, maxDefined} = iScale.getUserBounds();
|
9609 |
-
if (minDefined) {
|
9610 |
-
start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);
|
9611 |
-
}
|
9612 |
-
if (maxDefined) {
|
9613 |
-
count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;
|
9614 |
-
} else {
|
9615 |
-
count = pointCount - start;
|
9616 |
-
}
|
9617 |
-
return {start, count};
|
9618 |
-
}
|
9619 |
-
var plugin_decimation = {
|
9620 |
-
id: 'decimation',
|
9621 |
-
defaults: {
|
9622 |
-
algorithm: 'min-max',
|
9623 |
-
enabled: false,
|
9624 |
-
},
|
9625 |
-
beforeElementsUpdate: (chart, args, options) => {
|
9626 |
-
if (!options.enabled) {
|
9627 |
-
cleanDecimatedData(chart);
|
9628 |
-
return;
|
9629 |
-
}
|
9630 |
-
const availableWidth = chart.width;
|
9631 |
-
chart.data.datasets.forEach((dataset, datasetIndex) => {
|
9632 |
-
const {_data, indexAxis} = dataset;
|
9633 |
-
const meta = chart.getDatasetMeta(datasetIndex);
|
9634 |
-
const data = _data || dataset.data;
|
9635 |
-
if (resolve([indexAxis, chart.options.indexAxis]) === 'y') {
|
9636 |
-
return;
|
9637 |
-
}
|
9638 |
-
if (meta.type !== 'line') {
|
9639 |
-
return;
|
9640 |
-
}
|
9641 |
-
const xAxis = chart.scales[meta.xAxisID];
|
9642 |
-
if (xAxis.type !== 'linear' && xAxis.type !== 'time') {
|
9643 |
-
return;
|
9644 |
-
}
|
9645 |
-
if (chart.options.parsing) {
|
9646 |
-
return;
|
9647 |
-
}
|
9648 |
-
let {start, count} = getStartAndCountOfVisiblePointsSimplified(meta, data);
|
9649 |
-
const threshold = options.threshold || 4 * availableWidth;
|
9650 |
-
if (count <= threshold) {
|
9651 |
-
cleanDecimatedDataset(dataset);
|
9652 |
-
return;
|
9653 |
-
}
|
9654 |
-
if (isNullOrUndef(_data)) {
|
9655 |
-
dataset._data = data;
|
9656 |
-
delete dataset.data;
|
9657 |
-
Object.defineProperty(dataset, 'data', {
|
9658 |
-
configurable: true,
|
9659 |
-
enumerable: true,
|
9660 |
-
get: function() {
|
9661 |
-
return this._decimated;
|
9662 |
-
},
|
9663 |
-
set: function(d) {
|
9664 |
-
this._data = d;
|
9665 |
-
}
|
9666 |
-
});
|
9667 |
-
}
|
9668 |
-
let decimated;
|
9669 |
-
switch (options.algorithm) {
|
9670 |
-
case 'lttb':
|
9671 |
-
decimated = lttbDecimation(data, start, count, availableWidth, options);
|
9672 |
-
break;
|
9673 |
-
case 'min-max':
|
9674 |
-
decimated = minMaxDecimation(data, start, count, availableWidth);
|
9675 |
-
break;
|
9676 |
-
default:
|
9677 |
-
throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);
|
9678 |
-
}
|
9679 |
-
dataset._decimated = decimated;
|
9680 |
-
});
|
9681 |
-
},
|
9682 |
-
destroy(chart) {
|
9683 |
-
cleanDecimatedData(chart);
|
9684 |
-
}
|
9685 |
-
};
|
9686 |
-
|
9687 |
-
function getLineByIndex(chart, index) {
|
9688 |
-
const meta = chart.getDatasetMeta(index);
|
9689 |
-
const visible = meta && chart.isDatasetVisible(index);
|
9690 |
-
return visible ? meta.dataset : null;
|
9691 |
-
}
|
9692 |
-
function parseFillOption(line) {
|
9693 |
-
const options = line.options;
|
9694 |
-
const fillOption = options.fill;
|
9695 |
-
let fill = valueOrDefault(fillOption && fillOption.target, fillOption);
|
9696 |
-
if (fill === undefined) {
|
9697 |
-
fill = !!options.backgroundColor;
|
9698 |
-
}
|
9699 |
-
if (fill === false || fill === null) {
|
9700 |
-
return false;
|
9701 |
-
}
|
9702 |
-
if (fill === true) {
|
9703 |
-
return 'origin';
|
9704 |
-
}
|
9705 |
-
return fill;
|
9706 |
-
}
|
9707 |
-
function decodeFill(line, index, count) {
|
9708 |
-
const fill = parseFillOption(line);
|
9709 |
-
if (isObject(fill)) {
|
9710 |
-
return isNaN(fill.value) ? false : fill;
|
9711 |
-
}
|
9712 |
-
let target = parseFloat(fill);
|
9713 |
-
if (isNumberFinite(target) && Math.floor(target) === target) {
|
9714 |
-
if (fill[0] === '-' || fill[0] === '+') {
|
9715 |
-
target = index + target;
|
9716 |
-
}
|
9717 |
-
if (target === index || target < 0 || target >= count) {
|
9718 |
-
return false;
|
9719 |
-
}
|
9720 |
-
return target;
|
9721 |
-
}
|
9722 |
-
return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill;
|
9723 |
-
}
|
9724 |
-
function computeLinearBoundary(source) {
|
9725 |
-
const {scale = {}, fill} = source;
|
9726 |
-
let target = null;
|
9727 |
-
let horizontal;
|
9728 |
-
if (fill === 'start') {
|
9729 |
-
target = scale.bottom;
|
9730 |
-
} else if (fill === 'end') {
|
9731 |
-
target = scale.top;
|
9732 |
-
} else if (isObject(fill)) {
|
9733 |
-
target = scale.getPixelForValue(fill.value);
|
9734 |
-
} else if (scale.getBasePixel) {
|
9735 |
-
target = scale.getBasePixel();
|
9736 |
-
}
|
9737 |
-
if (isNumberFinite(target)) {
|
9738 |
-
horizontal = scale.isHorizontal();
|
9739 |
-
return {
|
9740 |
-
x: horizontal ? target : null,
|
9741 |
-
y: horizontal ? null : target
|
9742 |
-
};
|
9743 |
-
}
|
9744 |
-
return null;
|
9745 |
-
}
|
9746 |
-
class simpleArc {
|
9747 |
-
constructor(opts) {
|
9748 |
-
this.x = opts.x;
|
9749 |
-
this.y = opts.y;
|
9750 |
-
this.radius = opts.radius;
|
9751 |
-
}
|
9752 |
-
pathSegment(ctx, bounds, opts) {
|
9753 |
-
const {x, y, radius} = this;
|
9754 |
-
bounds = bounds || {start: 0, end: TAU};
|
9755 |
-
ctx.arc(x, y, radius, bounds.end, bounds.start, true);
|
9756 |
-
return !opts.bounds;
|
9757 |
-
}
|
9758 |
-
interpolate(point) {
|
9759 |
-
const {x, y, radius} = this;
|
9760 |
-
const angle = point.angle;
|
9761 |
-
return {
|
9762 |
-
x: x + Math.cos(angle) * radius,
|
9763 |
-
y: y + Math.sin(angle) * radius,
|
9764 |
-
angle
|
9765 |
-
};
|
9766 |
-
}
|
9767 |
-
}
|
9768 |
-
function computeCircularBoundary(source) {
|
9769 |
-
const {scale, fill} = source;
|
9770 |
-
const options = scale.options;
|
9771 |
-
const length = scale.getLabels().length;
|
9772 |
-
const target = [];
|
9773 |
-
const start = options.reverse ? scale.max : scale.min;
|
9774 |
-
const end = options.reverse ? scale.min : scale.max;
|
9775 |
-
let i, center, value;
|
9776 |
-
if (fill === 'start') {
|
9777 |
-
value = start;
|
9778 |
-
} else if (fill === 'end') {
|
9779 |
-
value = end;
|
9780 |
-
} else if (isObject(fill)) {
|
9781 |
-
value = fill.value;
|
9782 |
-
} else {
|
9783 |
-
value = scale.getBaseValue();
|
9784 |
-
}
|
9785 |
-
if (options.grid.circular) {
|
9786 |
-
center = scale.getPointPositionForValue(0, start);
|
9787 |
-
return new simpleArc({
|
9788 |
-
x: center.x,
|
9789 |
-
y: center.y,
|
9790 |
-
radius: scale.getDistanceFromCenterForValue(value)
|
9791 |
-
});
|
9792 |
-
}
|
9793 |
-
for (i = 0; i < length; ++i) {
|
9794 |
-
target.push(scale.getPointPositionForValue(i, value));
|
9795 |
-
}
|
9796 |
-
return target;
|
9797 |
-
}
|
9798 |
-
function computeBoundary(source) {
|
9799 |
-
const scale = source.scale || {};
|
9800 |
-
if (scale.getPointPositionForValue) {
|
9801 |
-
return computeCircularBoundary(source);
|
9802 |
-
}
|
9803 |
-
return computeLinearBoundary(source);
|
9804 |
-
}
|
9805 |
-
function findSegmentEnd(start, end, points) {
|
9806 |
-
for (;end > start; end--) {
|
9807 |
-
const point = points[end];
|
9808 |
-
if (!isNaN(point.x) && !isNaN(point.y)) {
|
9809 |
-
break;
|
9810 |
-
}
|
9811 |
-
}
|
9812 |
-
return end;
|
9813 |
-
}
|
9814 |
-
function pointsFromSegments(boundary, line) {
|
9815 |
-
const {x = null, y = null} = boundary || {};
|
9816 |
-
const linePoints = line.points;
|
9817 |
-
const points = [];
|
9818 |
-
line.segments.forEach(({start, end}) => {
|
9819 |
-
end = findSegmentEnd(start, end, linePoints);
|
9820 |
-
const first = linePoints[start];
|
9821 |
-
const last = linePoints[end];
|
9822 |
-
if (y !== null) {
|
9823 |
-
points.push({x: first.x, y});
|
9824 |
-
points.push({x: last.x, y});
|
9825 |
-
} else if (x !== null) {
|
9826 |
-
points.push({x, y: first.y});
|
9827 |
-
points.push({x, y: last.y});
|
9828 |
-
}
|
9829 |
-
});
|
9830 |
-
return points;
|
9831 |
-
}
|
9832 |
-
function buildStackLine(source) {
|
9833 |
-
const {scale, index, line} = source;
|
9834 |
-
const points = [];
|
9835 |
-
const segments = line.segments;
|
9836 |
-
const sourcePoints = line.points;
|
9837 |
-
const linesBelow = getLinesBelow(scale, index);
|
9838 |
-
linesBelow.push(createBoundaryLine({x: null, y: scale.bottom}, line));
|
9839 |
-
for (let i = 0; i < segments.length; i++) {
|
9840 |
-
const segment = segments[i];
|
9841 |
-
for (let j = segment.start; j <= segment.end; j++) {
|
9842 |
-
addPointsBelow(points, sourcePoints[j], linesBelow);
|
9843 |
-
}
|
9844 |
-
}
|
9845 |
-
return new LineElement({points, options: {}});
|
9846 |
-
}
|
9847 |
-
function getLinesBelow(scale, index) {
|
9848 |
-
const below = [];
|
9849 |
-
const metas = scale.getMatchingVisibleMetas('line');
|
9850 |
-
for (let i = 0; i < metas.length; i++) {
|
9851 |
-
const meta = metas[i];
|
9852 |
-
if (meta.index === index) {
|
9853 |
-
break;
|
9854 |
-
}
|
9855 |
-
if (!meta.hidden) {
|
9856 |
-
below.unshift(meta.dataset);
|
9857 |
-
}
|
9858 |
-
}
|
9859 |
-
return below;
|
9860 |
-
}
|
9861 |
-
function addPointsBelow(points, sourcePoint, linesBelow) {
|
9862 |
-
const postponed = [];
|
9863 |
-
for (let j = 0; j < linesBelow.length; j++) {
|
9864 |
-
const line = linesBelow[j];
|
9865 |
-
const {first, last, point} = findPoint(line, sourcePoint, 'x');
|
9866 |
-
if (!point || (first && last)) {
|
9867 |
-
continue;
|
9868 |
-
}
|
9869 |
-
if (first) {
|
9870 |
-
postponed.unshift(point);
|
9871 |
-
} else {
|
9872 |
-
points.push(point);
|
9873 |
-
if (!last) {
|
9874 |
-
break;
|
9875 |
-
}
|
9876 |
-
}
|
9877 |
-
}
|
9878 |
-
points.push(...postponed);
|
9879 |
-
}
|
9880 |
-
function findPoint(line, sourcePoint, property) {
|
9881 |
-
const point = line.interpolate(sourcePoint, property);
|
9882 |
-
if (!point) {
|
9883 |
-
return {};
|
9884 |
-
}
|
9885 |
-
const pointValue = point[property];
|
9886 |
-
const segments = line.segments;
|
9887 |
-
const linePoints = line.points;
|
9888 |
-
let first = false;
|
9889 |
-
let last = false;
|
9890 |
-
for (let i = 0; i < segments.length; i++) {
|
9891 |
-
const segment = segments[i];
|
9892 |
-
const firstValue = linePoints[segment.start][property];
|
9893 |
-
const lastValue = linePoints[segment.end][property];
|
9894 |
-
if (_isBetween(pointValue, firstValue, lastValue)) {
|
9895 |
-
first = pointValue === firstValue;
|
9896 |
-
last = pointValue === lastValue;
|
9897 |
-
break;
|
9898 |
-
}
|
9899 |
-
}
|
9900 |
-
return {first, last, point};
|
9901 |
-
}
|
9902 |
-
function getTarget(source) {
|
9903 |
-
const {chart, fill, line} = source;
|
9904 |
-
if (isNumberFinite(fill)) {
|
9905 |
-
return getLineByIndex(chart, fill);
|
9906 |
-
}
|
9907 |
-
if (fill === 'stack') {
|
9908 |
-
return buildStackLine(source);
|
9909 |
-
}
|
9910 |
-
if (fill === 'shape') {
|
9911 |
-
return true;
|
9912 |
-
}
|
9913 |
-
const boundary = computeBoundary(source);
|
9914 |
-
if (boundary instanceof simpleArc) {
|
9915 |
-
return boundary;
|
9916 |
-
}
|
9917 |
-
return createBoundaryLine(boundary, line);
|
9918 |
-
}
|
9919 |
-
function createBoundaryLine(boundary, line) {
|
9920 |
-
let points = [];
|
9921 |
-
let _loop = false;
|
9922 |
-
if (isArray(boundary)) {
|
9923 |
-
_loop = true;
|
9924 |
-
points = boundary;
|
9925 |
-
} else {
|
9926 |
-
points = pointsFromSegments(boundary, line);
|
9927 |
-
}
|
9928 |
-
return points.length ? new LineElement({
|
9929 |
-
points,
|
9930 |
-
options: {tension: 0},
|
9931 |
-
_loop,
|
9932 |
-
_fullLoop: _loop
|
9933 |
-
}) : null;
|
9934 |
-
}
|
9935 |
-
function resolveTarget(sources, index, propagate) {
|
9936 |
-
const source = sources[index];
|
9937 |
-
let fill = source.fill;
|
9938 |
-
const visited = [index];
|
9939 |
-
let target;
|
9940 |
-
if (!propagate) {
|
9941 |
-
return fill;
|
9942 |
-
}
|
9943 |
-
while (fill !== false && visited.indexOf(fill) === -1) {
|
9944 |
-
if (!isNumberFinite(fill)) {
|
9945 |
-
return fill;
|
9946 |
-
}
|
9947 |
-
target = sources[fill];
|
9948 |
-
if (!target) {
|
9949 |
-
return false;
|
9950 |
-
}
|
9951 |
-
if (target.visible) {
|
9952 |
-
return fill;
|
9953 |
-
}
|
9954 |
-
visited.push(fill);
|
9955 |
-
fill = target.fill;
|
9956 |
-
}
|
9957 |
-
return false;
|
9958 |
-
}
|
9959 |
-
function _clip(ctx, target, clipY) {
|
9960 |
-
ctx.beginPath();
|
9961 |
-
target.path(ctx);
|
9962 |
-
ctx.lineTo(target.last().x, clipY);
|
9963 |
-
ctx.lineTo(target.first().x, clipY);
|
9964 |
-
ctx.closePath();
|
9965 |
-
ctx.clip();
|
9966 |
-
}
|
9967 |
-
function getBounds(property, first, last, loop) {
|
9968 |
-
if (loop) {
|
9969 |
-
return;
|
9970 |
-
}
|
9971 |
-
let start = first[property];
|
9972 |
-
let end = last[property];
|
9973 |
-
if (property === 'angle') {
|
9974 |
-
start = _normalizeAngle(start);
|
9975 |
-
end = _normalizeAngle(end);
|
9976 |
-
}
|
9977 |
-
return {property, start, end};
|
9978 |
-
}
|
9979 |
-
function _getEdge(a, b, prop, fn) {
|
9980 |
-
if (a && b) {
|
9981 |
-
return fn(a[prop], b[prop]);
|
9982 |
-
}
|
9983 |
-
return a ? a[prop] : b ? b[prop] : 0;
|
9984 |
-
}
|
9985 |
-
function _segments(line, target, property) {
|
9986 |
-
const segments = line.segments;
|
9987 |
-
const points = line.points;
|
9988 |
-
const tpoints = target.points;
|
9989 |
-
const parts = [];
|
9990 |
-
for (const segment of segments) {
|
9991 |
-
let {start, end} = segment;
|
9992 |
-
end = findSegmentEnd(start, end, points);
|
9993 |
-
const bounds = getBounds(property, points[start], points[end], segment.loop);
|
9994 |
-
if (!target.segments) {
|
9995 |
-
parts.push({
|
9996 |
-
source: segment,
|
9997 |
-
target: bounds,
|
9998 |
-
start: points[start],
|
9999 |
-
end: points[end]
|
10000 |
-
});
|
10001 |
-
continue;
|
10002 |
-
}
|
10003 |
-
const targetSegments = _boundSegments(target, bounds);
|
10004 |
-
for (const tgt of targetSegments) {
|
10005 |
-
const subBounds = getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);
|
10006 |
-
const fillSources = _boundSegment(segment, points, subBounds);
|
10007 |
-
for (const fillSource of fillSources) {
|
10008 |
-
parts.push({
|
10009 |
-
source: fillSource,
|
10010 |
-
target: tgt,
|
10011 |
-
start: {
|
10012 |
-
[property]: _getEdge(bounds, subBounds, 'start', Math.max)
|
10013 |
-
},
|
10014 |
-
end: {
|
10015 |
-
[property]: _getEdge(bounds, subBounds, 'end', Math.min)
|
10016 |
-
}
|
10017 |
-
});
|
10018 |
-
}
|
10019 |
-
}
|
10020 |
-
}
|
10021 |
-
return parts;
|
10022 |
-
}
|
10023 |
-
function clipBounds(ctx, scale, bounds) {
|
10024 |
-
const {top, bottom} = scale.chart.chartArea;
|
10025 |
-
const {property, start, end} = bounds || {};
|
10026 |
-
if (property === 'x') {
|
10027 |
-
ctx.beginPath();
|
10028 |
-
ctx.rect(start, top, end - start, bottom - top);
|
10029 |
-
ctx.clip();
|
10030 |
-
}
|
10031 |
-
}
|
10032 |
-
function interpolatedLineTo(ctx, target, point, property) {
|
10033 |
-
const interpolatedPoint = target.interpolate(point, property);
|
10034 |
-
if (interpolatedPoint) {
|
10035 |
-
ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);
|
10036 |
-
}
|
10037 |
-
}
|
10038 |
-
function _fill(ctx, cfg) {
|
10039 |
-
const {line, target, property, color, scale} = cfg;
|
10040 |
-
const segments = _segments(line, target, property);
|
10041 |
-
for (const {source: src, target: tgt, start, end} of segments) {
|
10042 |
-
const {style: {backgroundColor = color} = {}} = src;
|
10043 |
-
const notShape = target !== true;
|
10044 |
-
ctx.save();
|
10045 |
-
ctx.fillStyle = backgroundColor;
|
10046 |
-
clipBounds(ctx, scale, notShape && getBounds(property, start, end));
|
10047 |
-
ctx.beginPath();
|
10048 |
-
const lineLoop = !!line.pathSegment(ctx, src);
|
10049 |
-
let loop;
|
10050 |
-
if (notShape) {
|
10051 |
-
if (lineLoop) {
|
10052 |
-
ctx.closePath();
|
10053 |
-
} else {
|
10054 |
-
interpolatedLineTo(ctx, target, end, property);
|
10055 |
-
}
|
10056 |
-
const targetLoop = !!target.pathSegment(ctx, tgt, {move: lineLoop, reverse: true});
|
10057 |
-
loop = lineLoop && targetLoop;
|
10058 |
-
if (!loop) {
|
10059 |
-
interpolatedLineTo(ctx, target, start, property);
|
10060 |
-
}
|
10061 |
-
}
|
10062 |
-
ctx.closePath();
|
10063 |
-
ctx.fill(loop ? 'evenodd' : 'nonzero');
|
10064 |
-
ctx.restore();
|
10065 |
-
}
|
10066 |
-
}
|
10067 |
-
function doFill(ctx, cfg) {
|
10068 |
-
const {line, target, above, below, area, scale} = cfg;
|
10069 |
-
const property = line._loop ? 'angle' : cfg.axis;
|
10070 |
-
ctx.save();
|
10071 |
-
if (property === 'x' && below !== above) {
|
10072 |
-
_clip(ctx, target, area.top);
|
10073 |
-
_fill(ctx, {line, target, color: above, scale, property});
|
10074 |
-
ctx.restore();
|
10075 |
-
ctx.save();
|
10076 |
-
_clip(ctx, target, area.bottom);
|
10077 |
-
}
|
10078 |
-
_fill(ctx, {line, target, color: below, scale, property});
|
10079 |
-
ctx.restore();
|
10080 |
-
}
|
10081 |
-
function drawfill(ctx, source, area) {
|
10082 |
-
const target = getTarget(source);
|
10083 |
-
const {line, scale, axis} = source;
|
10084 |
-
const lineOpts = line.options;
|
10085 |
-
const fillOption = lineOpts.fill;
|
10086 |
-
const color = lineOpts.backgroundColor;
|
10087 |
-
const {above = color, below = color} = fillOption || {};
|
10088 |
-
if (target && line.points.length) {
|
10089 |
-
clipArea(ctx, area);
|
10090 |
-
doFill(ctx, {line, target, above, below, area, scale, axis});
|
10091 |
-
unclipArea(ctx);
|
10092 |
-
}
|
10093 |
-
}
|
10094 |
-
var plugin_filler = {
|
10095 |
-
id: 'filler',
|
10096 |
-
afterDatasetsUpdate(chart, _args, options) {
|
10097 |
-
const count = (chart.data.datasets || []).length;
|
10098 |
-
const sources = [];
|
10099 |
-
let meta, i, line, source;
|
10100 |
-
for (i = 0; i < count; ++i) {
|
10101 |
-
meta = chart.getDatasetMeta(i);
|
10102 |
-
line = meta.dataset;
|
10103 |
-
source = null;
|
10104 |
-
if (line && line.options && line instanceof LineElement) {
|
10105 |
-
source = {
|
10106 |
-
visible: chart.isDatasetVisible(i),
|
10107 |
-
index: i,
|
10108 |
-
fill: decodeFill(line, i, count),
|
10109 |
-
chart,
|
10110 |
-
axis: meta.controller.options.indexAxis,
|
10111 |
-
scale: meta.vScale,
|
10112 |
-
line,
|
10113 |
-
};
|
10114 |
-
}
|
10115 |
-
meta.$filler = source;
|
10116 |
-
sources.push(source);
|
10117 |
-
}
|
10118 |
-
for (i = 0; i < count; ++i) {
|
10119 |
-
source = sources[i];
|
10120 |
-
if (!source || source.fill === false) {
|
10121 |
-
continue;
|
10122 |
-
}
|
10123 |
-
source.fill = resolveTarget(sources, i, options.propagate);
|
10124 |
-
}
|
10125 |
-
},
|
10126 |
-
beforeDraw(chart, _args, options) {
|
10127 |
-
const draw = options.drawTime === 'beforeDraw';
|
10128 |
-
const metasets = chart.getSortedVisibleDatasetMetas();
|
10129 |
-
const area = chart.chartArea;
|
10130 |
-
for (let i = metasets.length - 1; i >= 0; --i) {
|
10131 |
-
const source = metasets[i].$filler;
|
10132 |
-
if (!source) {
|
10133 |
-
continue;
|
10134 |
-
}
|
10135 |
-
source.line.updateControlPoints(area, source.axis);
|
10136 |
-
if (draw) {
|
10137 |
-
drawfill(chart.ctx, source, area);
|
10138 |
-
}
|
10139 |
-
}
|
10140 |
-
},
|
10141 |
-
beforeDatasetsDraw(chart, _args, options) {
|
10142 |
-
if (options.drawTime !== 'beforeDatasetsDraw') {
|
10143 |
-
return;
|
10144 |
-
}
|
10145 |
-
const metasets = chart.getSortedVisibleDatasetMetas();
|
10146 |
-
for (let i = metasets.length - 1; i >= 0; --i) {
|
10147 |
-
const source = metasets[i].$filler;
|
10148 |
-
if (source) {
|
10149 |
-
drawfill(chart.ctx, source, chart.chartArea);
|
10150 |
-
}
|
10151 |
-
}
|
10152 |
-
},
|
10153 |
-
beforeDatasetDraw(chart, args, options) {
|
10154 |
-
const source = args.meta.$filler;
|
10155 |
-
if (!source || source.fill === false || options.drawTime !== 'beforeDatasetDraw') {
|
10156 |
-
return;
|
10157 |
-
}
|
10158 |
-
drawfill(chart.ctx, source, chart.chartArea);
|
10159 |
-
},
|
10160 |
-
defaults: {
|
10161 |
-
propagate: true,
|
10162 |
-
drawTime: 'beforeDatasetDraw'
|
10163 |
-
}
|
10164 |
-
};
|
10165 |
-
|
10166 |
-
const getBoxSize = (labelOpts, fontSize) => {
|
10167 |
-
let {boxHeight = fontSize, boxWidth = fontSize} = labelOpts;
|
10168 |
-
if (labelOpts.usePointStyle) {
|
10169 |
-
boxHeight = Math.min(boxHeight, fontSize);
|
10170 |
-
boxWidth = Math.min(boxWidth, fontSize);
|
10171 |
-
}
|
10172 |
-
return {
|
10173 |
-
boxWidth,
|
10174 |
-
boxHeight,
|
10175 |
-
itemHeight: Math.max(fontSize, boxHeight)
|
10176 |
-
};
|
10177 |
-
};
|
10178 |
-
const itemsEqual = (a, b) => a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;
|
10179 |
-
class Legend extends Element {
|
10180 |
-
constructor(config) {
|
10181 |
-
super();
|
10182 |
-
this._added = false;
|
10183 |
-
this.legendHitBoxes = [];
|
10184 |
-
this._hoveredItem = null;
|
10185 |
-
this.doughnutMode = false;
|
10186 |
-
this.chart = config.chart;
|
10187 |
-
this.options = config.options;
|
10188 |
-
this.ctx = config.ctx;
|
10189 |
-
this.legendItems = undefined;
|
10190 |
-
this.columnSizes = undefined;
|
10191 |
-
this.lineWidths = undefined;
|
10192 |
-
this.maxHeight = undefined;
|
10193 |
-
this.maxWidth = undefined;
|
10194 |
-
this.top = undefined;
|
10195 |
-
this.bottom = undefined;
|
10196 |
-
this.left = undefined;
|
10197 |
-
this.right = undefined;
|
10198 |
-
this.height = undefined;
|
10199 |
-
this.width = undefined;
|
10200 |
-
this._margins = undefined;
|
10201 |
-
this.position = undefined;
|
10202 |
-
this.weight = undefined;
|
10203 |
-
this.fullSize = undefined;
|
10204 |
-
}
|
10205 |
-
update(maxWidth, maxHeight, margins) {
|
10206 |
-
this.maxWidth = maxWidth;
|
10207 |
-
this.maxHeight = maxHeight;
|
10208 |
-
this._margins = margins;
|
10209 |
-
this.setDimensions();
|
10210 |
-
this.buildLabels();
|
10211 |
-
this.fit();
|
10212 |
-
}
|
10213 |
-
setDimensions() {
|
10214 |
-
if (this.isHorizontal()) {
|
10215 |
-
this.width = this.maxWidth;
|
10216 |
-
this.left = this._margins.left;
|
10217 |
-
this.right = this.width;
|
10218 |
-
} else {
|
10219 |
-
this.height = this.maxHeight;
|
10220 |
-
this.top = this._margins.top;
|
10221 |
-
this.bottom = this.height;
|
10222 |
-
}
|
10223 |
-
}
|
10224 |
-
buildLabels() {
|
10225 |
-
const labelOpts = this.options.labels || {};
|
10226 |
-
let legendItems = callback(labelOpts.generateLabels, [this.chart], this) || [];
|
10227 |
-
if (labelOpts.filter) {
|
10228 |
-
legendItems = legendItems.filter((item) => labelOpts.filter(item, this.chart.data));
|
10229 |
-
}
|
10230 |
-
if (labelOpts.sort) {
|
10231 |
-
legendItems = legendItems.sort((a, b) => labelOpts.sort(a, b, this.chart.data));
|
10232 |
-
}
|
10233 |
-
if (this.options.reverse) {
|
10234 |
-
legendItems.reverse();
|
10235 |
-
}
|
10236 |
-
this.legendItems = legendItems;
|
10237 |
-
}
|
10238 |
-
fit() {
|
10239 |
-
const {options, ctx} = this;
|
10240 |
-
if (!options.display) {
|
10241 |
-
this.width = this.height = 0;
|
10242 |
-
return;
|
10243 |
-
}
|
10244 |
-
const labelOpts = options.labels;
|
10245 |
-
const labelFont = toFont(labelOpts.font);
|
10246 |
-
const fontSize = labelFont.size;
|
10247 |
-
const titleHeight = this._computeTitleHeight();
|
10248 |
-
const {boxWidth, itemHeight} = getBoxSize(labelOpts, fontSize);
|
10249 |
-
let width, height;
|
10250 |
-
ctx.font = labelFont.string;
|
10251 |
-
if (this.isHorizontal()) {
|
10252 |
-
width = this.maxWidth;
|
10253 |
-
height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;
|
10254 |
-
} else {
|
10255 |
-
height = this.maxHeight;
|
10256 |
-
width = this._fitCols(titleHeight, fontSize, boxWidth, itemHeight) + 10;
|
10257 |
-
}
|
10258 |
-
this.width = Math.min(width, options.maxWidth || this.maxWidth);
|
10259 |
-
this.height = Math.min(height, options.maxHeight || this.maxHeight);
|
10260 |
-
}
|
10261 |
-
_fitRows(titleHeight, fontSize, boxWidth, itemHeight) {
|
10262 |
-
const {ctx, maxWidth, options: {labels: {padding}}} = this;
|
10263 |
-
const hitboxes = this.legendHitBoxes = [];
|
10264 |
-
const lineWidths = this.lineWidths = [0];
|
10265 |
-
const lineHeight = itemHeight + padding;
|
10266 |
-
let totalHeight = titleHeight;
|
10267 |
-
ctx.textAlign = 'left';
|
10268 |
-
ctx.textBaseline = 'middle';
|
10269 |
-
let row = -1;
|
10270 |
-
let top = -lineHeight;
|
10271 |
-
this.legendItems.forEach((legendItem, i) => {
|
10272 |
-
const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
|
10273 |
-
if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {
|
10274 |
-
totalHeight += lineHeight;
|
10275 |
-
lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;
|
10276 |
-
top += lineHeight;
|
10277 |
-
row++;
|
10278 |
-
}
|
10279 |
-
hitboxes[i] = {left: 0, top, row, width: itemWidth, height: itemHeight};
|
10280 |
-
lineWidths[lineWidths.length - 1] += itemWidth + padding;
|
10281 |
-
});
|
10282 |
-
return totalHeight;
|
10283 |
-
}
|
10284 |
-
_fitCols(titleHeight, fontSize, boxWidth, itemHeight) {
|
10285 |
-
const {ctx, maxHeight, options: {labels: {padding}}} = this;
|
10286 |
-
const hitboxes = this.legendHitBoxes = [];
|
10287 |
-
const columnSizes = this.columnSizes = [];
|
10288 |
-
const heightLimit = maxHeight - titleHeight;
|
10289 |
-
let totalWidth = padding;
|
10290 |
-
let currentColWidth = 0;
|
10291 |
-
let currentColHeight = 0;
|
10292 |
-
let left = 0;
|
10293 |
-
let col = 0;
|
10294 |
-
this.legendItems.forEach((legendItem, i) => {
|
10295 |
-
const itemWidth = boxWidth + (fontSize / 2) + ctx.measureText(legendItem.text).width;
|
10296 |
-
if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {
|
10297 |
-
totalWidth += currentColWidth + padding;
|
10298 |
-
columnSizes.push({width: currentColWidth, height: currentColHeight});
|
10299 |
-
left += currentColWidth + padding;
|
10300 |
-
col++;
|
10301 |
-
currentColWidth = currentColHeight = 0;
|
10302 |
-
}
|
10303 |
-
hitboxes[i] = {left, top: currentColHeight, col, width: itemWidth, height: itemHeight};
|
10304 |
-
currentColWidth = Math.max(currentColWidth, itemWidth);
|
10305 |
-
currentColHeight += itemHeight + padding;
|
10306 |
-
});
|
10307 |
-
totalWidth += currentColWidth;
|
10308 |
-
columnSizes.push({width: currentColWidth, height: currentColHeight});
|
10309 |
-
return totalWidth;
|
10310 |
-
}
|
10311 |
-
adjustHitBoxes() {
|
10312 |
-
if (!this.options.display) {
|
10313 |
-
return;
|
10314 |
-
}
|
10315 |
-
const titleHeight = this._computeTitleHeight();
|
10316 |
-
const {legendHitBoxes: hitboxes, options: {align, labels: {padding}, rtl}} = this;
|
10317 |
-
const rtlHelper = getRtlAdapter(rtl, this.left, this.width);
|
10318 |
-
if (this.isHorizontal()) {
|
10319 |
-
let row = 0;
|
10320 |
-
let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);
|
10321 |
-
for (const hitbox of hitboxes) {
|
10322 |
-
if (row !== hitbox.row) {
|
10323 |
-
row = hitbox.row;
|
10324 |
-
left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);
|
10325 |
-
}
|
10326 |
-
hitbox.top += this.top + titleHeight + padding;
|
10327 |
-
hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);
|
10328 |
-
left += hitbox.width + padding;
|
10329 |
-
}
|
10330 |
-
} else {
|
10331 |
-
let col = 0;
|
10332 |
-
let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);
|
10333 |
-
for (const hitbox of hitboxes) {
|
10334 |
-
if (hitbox.col !== col) {
|
10335 |
-
col = hitbox.col;
|
10336 |
-
top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);
|
10337 |
-
}
|
10338 |
-
hitbox.top = top;
|
10339 |
-
hitbox.left += this.left + padding;
|
10340 |
-
hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);
|
10341 |
-
top += hitbox.height + padding;
|
10342 |
-
}
|
10343 |
-
}
|
10344 |
-
}
|
10345 |
-
isHorizontal() {
|
10346 |
-
return this.options.position === 'top' || this.options.position === 'bottom';
|
10347 |
-
}
|
10348 |
-
draw() {
|
10349 |
-
if (this.options.display) {
|
10350 |
-
const ctx = this.ctx;
|
10351 |
-
clipArea(ctx, this);
|
10352 |
-
this._draw();
|
10353 |
-
unclipArea(ctx);
|
10354 |
-
}
|
10355 |
-
}
|
10356 |
-
_draw() {
|
10357 |
-
const {options: opts, columnSizes, lineWidths, ctx} = this;
|
10358 |
-
const {align, labels: labelOpts} = opts;
|
10359 |
-
const defaultColor = defaults.color;
|
10360 |
-
const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);
|
10361 |
-
const labelFont = toFont(labelOpts.font);
|
10362 |
-
const {color: fontColor, padding} = labelOpts;
|
10363 |
-
const fontSize = labelFont.size;
|
10364 |
-
const halfFontSize = fontSize / 2;
|
10365 |
-
let cursor;
|
10366 |
-
this.drawTitle();
|
10367 |
-
ctx.textAlign = rtlHelper.textAlign('left');
|
10368 |
-
ctx.textBaseline = 'middle';
|
10369 |
-
ctx.lineWidth = 0.5;
|
10370 |
-
ctx.font = labelFont.string;
|
10371 |
-
const {boxWidth, boxHeight, itemHeight} = getBoxSize(labelOpts, fontSize);
|
10372 |
-
const drawLegendBox = function(x, y, legendItem) {
|
10373 |
-
if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {
|
10374 |
-
return;
|
10375 |
-
}
|
10376 |
-
ctx.save();
|
10377 |
-
const lineWidth = valueOrDefault(legendItem.lineWidth, 1);
|
10378 |
-
ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);
|
10379 |
-
ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');
|
10380 |
-
ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);
|
10381 |
-
ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');
|
10382 |
-
ctx.lineWidth = lineWidth;
|
10383 |
-
ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);
|
10384 |
-
ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));
|
10385 |
-
if (labelOpts.usePointStyle) {
|
10386 |
-
const drawOptions = {
|
10387 |
-
radius: boxWidth * Math.SQRT2 / 2,
|
10388 |
-
pointStyle: legendItem.pointStyle,
|
10389 |
-
rotation: legendItem.rotation,
|
10390 |
-
borderWidth: lineWidth
|
10391 |
-
};
|
10392 |
-
const centerX = rtlHelper.xPlus(x, boxWidth / 2);
|
10393 |
-
const centerY = y + halfFontSize;
|
10394 |
-
drawPoint(ctx, drawOptions, centerX, centerY);
|
10395 |
-
} else {
|
10396 |
-
const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);
|
10397 |
-
const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);
|
10398 |
-
const borderRadius = toTRBLCorners(legendItem.borderRadius);
|
10399 |
-
ctx.beginPath();
|
10400 |
-
if (Object.values(borderRadius).some(v => v !== 0)) {
|
10401 |
-
addRoundedRectPath(ctx, {
|
10402 |
-
x: xBoxLeft,
|
10403 |
-
y: yBoxTop,
|
10404 |
-
w: boxWidth,
|
10405 |
-
h: boxHeight,
|
10406 |
-
radius: borderRadius,
|
10407 |
-
});
|
10408 |
-
} else {
|
10409 |
-
ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);
|
10410 |
-
}
|
10411 |
-
ctx.fill();
|
10412 |
-
if (lineWidth !== 0) {
|
10413 |
-
ctx.stroke();
|
10414 |
-
}
|
10415 |
-
}
|
10416 |
-
ctx.restore();
|
10417 |
-
};
|
10418 |
-
const fillText = function(x, y, legendItem) {
|
10419 |
-
renderText(ctx, legendItem.text, x, y + (itemHeight / 2), labelFont, {
|
10420 |
-
strikethrough: legendItem.hidden,
|
10421 |
-
textAlign: rtlHelper.textAlign(legendItem.textAlign)
|
10422 |
-
});
|
10423 |
-
};
|
10424 |
-
const isHorizontal = this.isHorizontal();
|
10425 |
-
const titleHeight = this._computeTitleHeight();
|
10426 |
-
if (isHorizontal) {
|
10427 |
-
cursor = {
|
10428 |
-
x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),
|
10429 |
-
y: this.top + padding + titleHeight,
|
10430 |
-
line: 0
|
10431 |
-
};
|
10432 |
-
} else {
|
10433 |
-
cursor = {
|
10434 |
-
x: this.left + padding,
|
10435 |
-
y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),
|
10436 |
-
line: 0
|
10437 |
-
};
|
10438 |
-
}
|
10439 |
-
overrideTextDirection(this.ctx, opts.textDirection);
|
10440 |
-
const lineHeight = itemHeight + padding;
|
10441 |
-
this.legendItems.forEach((legendItem, i) => {
|
10442 |
-
ctx.strokeStyle = legendItem.fontColor || fontColor;
|
10443 |
-
ctx.fillStyle = legendItem.fontColor || fontColor;
|
10444 |
-
const textWidth = ctx.measureText(legendItem.text).width;
|
10445 |
-
const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));
|
10446 |
-
const width = boxWidth + halfFontSize + textWidth;
|
10447 |
-
let x = cursor.x;
|
10448 |
-
let y = cursor.y;
|
10449 |
-
rtlHelper.setWidth(this.width);
|
10450 |
-
if (isHorizontal) {
|
10451 |
-
if (i > 0 && x + width + padding > this.right) {
|
10452 |
-
y = cursor.y += lineHeight;
|
10453 |
-
cursor.line++;
|
10454 |
-
x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);
|
10455 |
-
}
|
10456 |
-
} else if (i > 0 && y + lineHeight > this.bottom) {
|
10457 |
-
x = cursor.x = x + columnSizes[cursor.line].width + padding;
|
10458 |
-
cursor.line++;
|
10459 |
-
y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);
|
10460 |
-
}
|
10461 |
-
const realX = rtlHelper.x(x);
|
10462 |
-
drawLegendBox(realX, y, legendItem);
|
10463 |
-
x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);
|
10464 |
-
fillText(rtlHelper.x(x), y, legendItem);
|
10465 |
-
if (isHorizontal) {
|
10466 |
-
cursor.x += width + padding;
|
10467 |
-
} else {
|
10468 |
-
cursor.y += lineHeight;
|
10469 |
-
}
|
10470 |
-
});
|
10471 |
-
restoreTextDirection(this.ctx, opts.textDirection);
|
10472 |
-
}
|
10473 |
-
drawTitle() {
|
10474 |
-
const opts = this.options;
|
10475 |
-
const titleOpts = opts.title;
|
10476 |
-
const titleFont = toFont(titleOpts.font);
|
10477 |
-
const titlePadding = toPadding(titleOpts.padding);
|
10478 |
-
if (!titleOpts.display) {
|
10479 |
-
return;
|
10480 |
-
}
|
10481 |
-
const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);
|
10482 |
-
const ctx = this.ctx;
|
10483 |
-
const position = titleOpts.position;
|
10484 |
-
const halfFontSize = titleFont.size / 2;
|
10485 |
-
const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;
|
10486 |
-
let y;
|
10487 |
-
let left = this.left;
|
10488 |
-
let maxWidth = this.width;
|
10489 |
-
if (this.isHorizontal()) {
|
10490 |
-
maxWidth = Math.max(...this.lineWidths);
|
10491 |
-
y = this.top + topPaddingPlusHalfFontSize;
|
10492 |
-
left = _alignStartEnd(opts.align, left, this.right - maxWidth);
|
10493 |
-
} else {
|
10494 |
-
const maxHeight = this.columnSizes.reduce((acc, size) => Math.max(acc, size.height), 0);
|
10495 |
-
y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());
|
10496 |
-
}
|
10497 |
-
const x = _alignStartEnd(position, left, left + maxWidth);
|
10498 |
-
ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));
|
10499 |
-
ctx.textBaseline = 'middle';
|
10500 |
-
ctx.strokeStyle = titleOpts.color;
|
10501 |
-
ctx.fillStyle = titleOpts.color;
|
10502 |
-
ctx.font = titleFont.string;
|
10503 |
-
renderText(ctx, titleOpts.text, x, y, titleFont);
|
10504 |
-
}
|
10505 |
-
_computeTitleHeight() {
|
10506 |
-
const titleOpts = this.options.title;
|
10507 |
-
const titleFont = toFont(titleOpts.font);
|
10508 |
-
const titlePadding = toPadding(titleOpts.padding);
|
10509 |
-
return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;
|
10510 |
-
}
|
10511 |
-
_getLegendItemAt(x, y) {
|
10512 |
-
let i, hitBox, lh;
|
10513 |
-
if (_isBetween(x, this.left, this.right)
|
10514 |
-
&& _isBetween(y, this.top, this.bottom)) {
|
10515 |
-
lh = this.legendHitBoxes;
|
10516 |
-
for (i = 0; i < lh.length; ++i) {
|
10517 |
-
hitBox = lh[i];
|
10518 |
-
if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width)
|
10519 |
-
&& _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {
|
10520 |
-
return this.legendItems[i];
|
10521 |
-
}
|
10522 |
-
}
|
10523 |
-
}
|
10524 |
-
return null;
|
10525 |
-
}
|
10526 |
-
handleEvent(e) {
|
10527 |
-
const opts = this.options;
|
10528 |
-
if (!isListened(e.type, opts)) {
|
10529 |
-
return;
|
10530 |
-
}
|
10531 |
-
const hoveredItem = this._getLegendItemAt(e.x, e.y);
|
10532 |
-
if (e.type === 'mousemove') {
|
10533 |
-
const previous = this._hoveredItem;
|
10534 |
-
const sameItem = itemsEqual(previous, hoveredItem);
|
10535 |
-
if (previous && !sameItem) {
|
10536 |
-
callback(opts.onLeave, [e, previous, this], this);
|
10537 |
-
}
|
10538 |
-
this._hoveredItem = hoveredItem;
|
10539 |
-
if (hoveredItem && !sameItem) {
|
10540 |
-
callback(opts.onHover, [e, hoveredItem, this], this);
|
10541 |
-
}
|
10542 |
-
} else if (hoveredItem) {
|
10543 |
-
callback(opts.onClick, [e, hoveredItem, this], this);
|
10544 |
-
}
|
10545 |
-
}
|
10546 |
-
}
|
10547 |
-
function isListened(type, opts) {
|
10548 |
-
if (type === 'mousemove' && (opts.onHover || opts.onLeave)) {
|
10549 |
-
return true;
|
10550 |
-
}
|
10551 |
-
if (opts.onClick && (type === 'click' || type === 'mouseup')) {
|
10552 |
-
return true;
|
10553 |
-
}
|
10554 |
-
return false;
|
10555 |
-
}
|
10556 |
-
var plugin_legend = {
|
10557 |
-
id: 'legend',
|
10558 |
-
_element: Legend,
|
10559 |
-
start(chart, _args, options) {
|
10560 |
-
const legend = chart.legend = new Legend({ctx: chart.ctx, options, chart});
|
10561 |
-
layouts.configure(chart, legend, options);
|
10562 |
-
layouts.addBox(chart, legend);
|
10563 |
-
},
|
10564 |
-
stop(chart) {
|
10565 |
-
layouts.removeBox(chart, chart.legend);
|
10566 |
-
delete chart.legend;
|
10567 |
-
},
|
10568 |
-
beforeUpdate(chart, _args, options) {
|
10569 |
-
const legend = chart.legend;
|
10570 |
-
layouts.configure(chart, legend, options);
|
10571 |
-
legend.options = options;
|
10572 |
-
},
|
10573 |
-
afterUpdate(chart) {
|
10574 |
-
const legend = chart.legend;
|
10575 |
-
legend.buildLabels();
|
10576 |
-
legend.adjustHitBoxes();
|
10577 |
-
},
|
10578 |
-
afterEvent(chart, args) {
|
10579 |
-
if (!args.replay) {
|
10580 |
-
chart.legend.handleEvent(args.event);
|
10581 |
-
}
|
10582 |
-
},
|
10583 |
-
defaults: {
|
10584 |
-
display: true,
|
10585 |
-
position: 'top',
|
10586 |
-
align: 'center',
|
10587 |
-
fullSize: true,
|
10588 |
-
reverse: false,
|
10589 |
-
weight: 1000,
|
10590 |
-
onClick(e, legendItem, legend) {
|
10591 |
-
const index = legendItem.datasetIndex;
|
10592 |
-
const ci = legend.chart;
|
10593 |
-
if (ci.isDatasetVisible(index)) {
|
10594 |
-
ci.hide(index);
|
10595 |
-
legendItem.hidden = true;
|
10596 |
-
} else {
|
10597 |
-
ci.show(index);
|
10598 |
-
legendItem.hidden = false;
|
10599 |
-
}
|
10600 |
-
},
|
10601 |
-
onHover: null,
|
10602 |
-
onLeave: null,
|
10603 |
-
labels: {
|
10604 |
-
color: (ctx) => ctx.chart.options.color,
|
10605 |
-
boxWidth: 40,
|
10606 |
-
padding: 10,
|
10607 |
-
generateLabels(chart) {
|
10608 |
-
const datasets = chart.data.datasets;
|
10609 |
-
const {labels: {usePointStyle, pointStyle, textAlign, color}} = chart.legend.options;
|
10610 |
-
return chart._getSortedDatasetMetas().map((meta) => {
|
10611 |
-
const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);
|
10612 |
-
const borderWidth = toPadding(style.borderWidth);
|
10613 |
-
return {
|
10614 |
-
text: datasets[meta.index].label,
|
10615 |
-
fillStyle: style.backgroundColor,
|
10616 |
-
fontColor: color,
|
10617 |
-
hidden: !meta.visible,
|
10618 |
-
lineCap: style.borderCapStyle,
|
10619 |
-
lineDash: style.borderDash,
|
10620 |
-
lineDashOffset: style.borderDashOffset,
|
10621 |
-
lineJoin: style.borderJoinStyle,
|
10622 |
-
lineWidth: (borderWidth.width + borderWidth.height) / 4,
|
10623 |
-
strokeStyle: style.borderColor,
|
10624 |
-
pointStyle: pointStyle || style.pointStyle,
|
10625 |
-
rotation: style.rotation,
|
10626 |
-
textAlign: textAlign || style.textAlign,
|
10627 |
-
borderRadius: 0,
|
10628 |
-
datasetIndex: meta.index
|
10629 |
-
};
|
10630 |
-
}, this);
|
10631 |
-
}
|
10632 |
-
},
|
10633 |
-
title: {
|
10634 |
-
color: (ctx) => ctx.chart.options.color,
|
10635 |
-
display: false,
|
10636 |
-
position: 'center',
|
10637 |
-
text: '',
|
10638 |
-
}
|
10639 |
-
},
|
10640 |
-
descriptors: {
|
10641 |
-
_scriptable: (name) => !name.startsWith('on'),
|
10642 |
-
labels: {
|
10643 |
-
_scriptable: (name) => !['generateLabels', 'filter', 'sort'].includes(name),
|
10644 |
-
}
|
10645 |
-
},
|
10646 |
-
};
|
10647 |
-
|
10648 |
-
class Title extends Element {
|
10649 |
-
constructor(config) {
|
10650 |
-
super();
|
10651 |
-
this.chart = config.chart;
|
10652 |
-
this.options = config.options;
|
10653 |
-
this.ctx = config.ctx;
|
10654 |
-
this._padding = undefined;
|
10655 |
-
this.top = undefined;
|
10656 |
-
this.bottom = undefined;
|
10657 |
-
this.left = undefined;
|
10658 |
-
this.right = undefined;
|
10659 |
-
this.width = undefined;
|
10660 |
-
this.height = undefined;
|
10661 |
-
this.position = undefined;
|
10662 |
-
this.weight = undefined;
|
10663 |
-
this.fullSize = undefined;
|
10664 |
-
}
|
10665 |
-
update(maxWidth, maxHeight) {
|
10666 |
-
const opts = this.options;
|
10667 |
-
this.left = 0;
|
10668 |
-
this.top = 0;
|
10669 |
-
if (!opts.display) {
|
10670 |
-
this.width = this.height = this.right = this.bottom = 0;
|
10671 |
-
return;
|
10672 |
-
}
|
10673 |
-
this.width = this.right = maxWidth;
|
10674 |
-
this.height = this.bottom = maxHeight;
|
10675 |
-
const lineCount = isArray(opts.text) ? opts.text.length : 1;
|
10676 |
-
this._padding = toPadding(opts.padding);
|
10677 |
-
const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;
|
10678 |
-
if (this.isHorizontal()) {
|
10679 |
-
this.height = textSize;
|
10680 |
-
} else {
|
10681 |
-
this.width = textSize;
|
10682 |
-
}
|
10683 |
-
}
|
10684 |
-
isHorizontal() {
|
10685 |
-
const pos = this.options.position;
|
10686 |
-
return pos === 'top' || pos === 'bottom';
|
10687 |
-
}
|
10688 |
-
_drawArgs(offset) {
|
10689 |
-
const {top, left, bottom, right, options} = this;
|
10690 |
-
const align = options.align;
|
10691 |
-
let rotation = 0;
|
10692 |
-
let maxWidth, titleX, titleY;
|
10693 |
-
if (this.isHorizontal()) {
|
10694 |
-
titleX = _alignStartEnd(align, left, right);
|
10695 |
-
titleY = top + offset;
|
10696 |
-
maxWidth = right - left;
|
10697 |
-
} else {
|
10698 |
-
if (options.position === 'left') {
|
10699 |
-
titleX = left + offset;
|
10700 |
-
titleY = _alignStartEnd(align, bottom, top);
|
10701 |
-
rotation = PI * -0.5;
|
10702 |
-
} else {
|
10703 |
-
titleX = right - offset;
|
10704 |
-
titleY = _alignStartEnd(align, top, bottom);
|
10705 |
-
rotation = PI * 0.5;
|
10706 |
-
}
|
10707 |
-
maxWidth = bottom - top;
|
10708 |
-
}
|
10709 |
-
return {titleX, titleY, maxWidth, rotation};
|
10710 |
-
}
|
10711 |
-
draw() {
|
10712 |
-
const ctx = this.ctx;
|
10713 |
-
const opts = this.options;
|
10714 |
-
if (!opts.display) {
|
10715 |
-
return;
|
10716 |
-
}
|
10717 |
-
const fontOpts = toFont(opts.font);
|
10718 |
-
const lineHeight = fontOpts.lineHeight;
|
10719 |
-
const offset = lineHeight / 2 + this._padding.top;
|
10720 |
-
const {titleX, titleY, maxWidth, rotation} = this._drawArgs(offset);
|
10721 |
-
renderText(ctx, opts.text, 0, 0, fontOpts, {
|
10722 |
-
color: opts.color,
|
10723 |
-
maxWidth,
|
10724 |
-
rotation,
|
10725 |
-
textAlign: _toLeftRightCenter(opts.align),
|
10726 |
-
textBaseline: 'middle',
|
10727 |
-
translation: [titleX, titleY],
|
10728 |
-
});
|
10729 |
-
}
|
10730 |
-
}
|
10731 |
-
function createTitle(chart, titleOpts) {
|
10732 |
-
const title = new Title({
|
10733 |
-
ctx: chart.ctx,
|
10734 |
-
options: titleOpts,
|
10735 |
-
chart
|
10736 |
-
});
|
10737 |
-
layouts.configure(chart, title, titleOpts);
|
10738 |
-
layouts.addBox(chart, title);
|
10739 |
-
chart.titleBlock = title;
|
10740 |
-
}
|
10741 |
-
var plugin_title = {
|
10742 |
-
id: 'title',
|
10743 |
-
_element: Title,
|
10744 |
-
start(chart, _args, options) {
|
10745 |
-
createTitle(chart, options);
|
10746 |
-
},
|
10747 |
-
stop(chart) {
|
10748 |
-
const titleBlock = chart.titleBlock;
|
10749 |
-
layouts.removeBox(chart, titleBlock);
|
10750 |
-
delete chart.titleBlock;
|
10751 |
-
},
|
10752 |
-
beforeUpdate(chart, _args, options) {
|
10753 |
-
const title = chart.titleBlock;
|
10754 |
-
layouts.configure(chart, title, options);
|
10755 |
-
title.options = options;
|
10756 |
-
},
|
10757 |
-
defaults: {
|
10758 |
-
align: 'center',
|
10759 |
-
display: false,
|
10760 |
-
font: {
|
10761 |
-
weight: 'bold',
|
10762 |
-
},
|
10763 |
-
fullSize: true,
|
10764 |
-
padding: 10,
|
10765 |
-
position: 'top',
|
10766 |
-
text: '',
|
10767 |
-
weight: 2000
|
10768 |
-
},
|
10769 |
-
defaultRoutes: {
|
10770 |
-
color: 'color'
|
10771 |
-
},
|
10772 |
-
descriptors: {
|
10773 |
-
_scriptable: true,
|
10774 |
-
_indexable: false,
|
10775 |
-
},
|
10776 |
-
};
|
10777 |
-
|
10778 |
-
const map = new WeakMap();
|
10779 |
-
var plugin_subtitle = {
|
10780 |
-
id: 'subtitle',
|
10781 |
-
start(chart, _args, options) {
|
10782 |
-
const title = new Title({
|
10783 |
-
ctx: chart.ctx,
|
10784 |
-
options,
|
10785 |
-
chart
|
10786 |
-
});
|
10787 |
-
layouts.configure(chart, title, options);
|
10788 |
-
layouts.addBox(chart, title);
|
10789 |
-
map.set(chart, title);
|
10790 |
-
},
|
10791 |
-
stop(chart) {
|
10792 |
-
layouts.removeBox(chart, map.get(chart));
|
10793 |
-
map.delete(chart);
|
10794 |
-
},
|
10795 |
-
beforeUpdate(chart, _args, options) {
|
10796 |
-
const title = map.get(chart);
|
10797 |
-
layouts.configure(chart, title, options);
|
10798 |
-
title.options = options;
|
10799 |
-
},
|
10800 |
-
defaults: {
|
10801 |
-
align: 'center',
|
10802 |
-
display: false,
|
10803 |
-
font: {
|
10804 |
-
weight: 'normal',
|
10805 |
-
},
|
10806 |
-
fullSize: true,
|
10807 |
-
padding: 0,
|
10808 |
-
position: 'top',
|
10809 |
-
text: '',
|
10810 |
-
weight: 1500
|
10811 |
-
},
|
10812 |
-
defaultRoutes: {
|
10813 |
-
color: 'color'
|
10814 |
-
},
|
10815 |
-
descriptors: {
|
10816 |
-
_scriptable: true,
|
10817 |
-
_indexable: false,
|
10818 |
-
},
|
10819 |
-
};
|
10820 |
-
|
10821 |
-
const positioners = {
|
10822 |
-
average(items) {
|
10823 |
-
if (!items.length) {
|
10824 |
-
return false;
|
10825 |
-
}
|
10826 |
-
let i, len;
|
10827 |
-
let x = 0;
|
10828 |
-
let y = 0;
|
10829 |
-
let count = 0;
|
10830 |
-
for (i = 0, len = items.length; i < len; ++i) {
|
10831 |
-
const el = items[i].element;
|
10832 |
-
if (el && el.hasValue()) {
|
10833 |
-
const pos = el.tooltipPosition();
|
10834 |
-
x += pos.x;
|
10835 |
-
y += pos.y;
|
10836 |
-
++count;
|
10837 |
-
}
|
10838 |
-
}
|
10839 |
-
return {
|
10840 |
-
x: x / count,
|
10841 |
-
y: y / count
|
10842 |
-
};
|
10843 |
-
},
|
10844 |
-
nearest(items, eventPosition) {
|
10845 |
-
if (!items.length) {
|
10846 |
-
return false;
|
10847 |
-
}
|
10848 |
-
let x = eventPosition.x;
|
10849 |
-
let y = eventPosition.y;
|
10850 |
-
let minDistance = Number.POSITIVE_INFINITY;
|
10851 |
-
let i, len, nearestElement;
|
10852 |
-
for (i = 0, len = items.length; i < len; ++i) {
|
10853 |
-
const el = items[i].element;
|
10854 |
-
if (el && el.hasValue()) {
|
10855 |
-
const center = el.getCenterPoint();
|
10856 |
-
const d = distanceBetweenPoints(eventPosition, center);
|
10857 |
-
if (d < minDistance) {
|
10858 |
-
minDistance = d;
|
10859 |
-
nearestElement = el;
|
10860 |
-
}
|
10861 |
-
}
|
10862 |
-
}
|
10863 |
-
if (nearestElement) {
|
10864 |
-
const tp = nearestElement.tooltipPosition();
|
10865 |
-
x = tp.x;
|
10866 |
-
y = tp.y;
|
10867 |
-
}
|
10868 |
-
return {
|
10869 |
-
x,
|
10870 |
-
y
|
10871 |
-
};
|
10872 |
-
}
|
10873 |
-
};
|
10874 |
-
function pushOrConcat(base, toPush) {
|
10875 |
-
if (toPush) {
|
10876 |
-
if (isArray(toPush)) {
|
10877 |
-
Array.prototype.push.apply(base, toPush);
|
10878 |
-
} else {
|
10879 |
-
base.push(toPush);
|
10880 |
-
}
|
10881 |
-
}
|
10882 |
-
return base;
|
10883 |
-
}
|
10884 |
-
function splitNewlines(str) {
|
10885 |
-
if ((typeof str === 'string' || str instanceof String) && str.indexOf('\n') > -1) {
|
10886 |
-
return str.split('\n');
|
10887 |
-
}
|
10888 |
-
return str;
|
10889 |
-
}
|
10890 |
-
function createTooltipItem(chart, item) {
|
10891 |
-
const {element, datasetIndex, index} = item;
|
10892 |
-
const controller = chart.getDatasetMeta(datasetIndex).controller;
|
10893 |
-
const {label, value} = controller.getLabelAndValue(index);
|
10894 |
-
return {
|
10895 |
-
chart,
|
10896 |
-
label,
|
10897 |
-
parsed: controller.getParsed(index),
|
10898 |
-
raw: chart.data.datasets[datasetIndex].data[index],
|
10899 |
-
formattedValue: value,
|
10900 |
-
dataset: controller.getDataset(),
|
10901 |
-
dataIndex: index,
|
10902 |
-
datasetIndex,
|
10903 |
-
element
|
10904 |
-
};
|
10905 |
-
}
|
10906 |
-
function getTooltipSize(tooltip, options) {
|
10907 |
-
const ctx = tooltip._chart.ctx;
|
10908 |
-
const {body, footer, title} = tooltip;
|
10909 |
-
const {boxWidth, boxHeight} = options;
|
10910 |
-
const bodyFont = toFont(options.bodyFont);
|
10911 |
-
const titleFont = toFont(options.titleFont);
|
10912 |
-
const footerFont = toFont(options.footerFont);
|
10913 |
-
const titleLineCount = title.length;
|
10914 |
-
const footerLineCount = footer.length;
|
10915 |
-
const bodyLineItemCount = body.length;
|
10916 |
-
const padding = toPadding(options.padding);
|
10917 |
-
let height = padding.height;
|
10918 |
-
let width = 0;
|
10919 |
-
let combinedBodyLength = body.reduce((count, bodyItem) => count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);
|
10920 |
-
combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;
|
10921 |
-
if (titleLineCount) {
|
10922 |
-
height += titleLineCount * titleFont.lineHeight
|
10923 |
-
+ (titleLineCount - 1) * options.titleSpacing
|
10924 |
-
+ options.titleMarginBottom;
|
10925 |
-
}
|
10926 |
-
if (combinedBodyLength) {
|
10927 |
-
const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;
|
10928 |
-
height += bodyLineItemCount * bodyLineHeight
|
10929 |
-
+ (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight
|
10930 |
-
+ (combinedBodyLength - 1) * options.bodySpacing;
|
10931 |
-
}
|
10932 |
-
if (footerLineCount) {
|
10933 |
-
height += options.footerMarginTop
|
10934 |
-
+ footerLineCount * footerFont.lineHeight
|
10935 |
-
+ (footerLineCount - 1) * options.footerSpacing;
|
10936 |
-
}
|
10937 |
-
let widthPadding = 0;
|
10938 |
-
const maxLineWidth = function(line) {
|
10939 |
-
width = Math.max(width, ctx.measureText(line).width + widthPadding);
|
10940 |
-
};
|
10941 |
-
ctx.save();
|
10942 |
-
ctx.font = titleFont.string;
|
10943 |
-
each(tooltip.title, maxLineWidth);
|
10944 |
-
ctx.font = bodyFont.string;
|
10945 |
-
each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);
|
10946 |
-
widthPadding = options.displayColors ? (boxWidth + 2 + options.boxPadding) : 0;
|
10947 |
-
each(body, (bodyItem) => {
|
10948 |
-
each(bodyItem.before, maxLineWidth);
|
10949 |
-
each(bodyItem.lines, maxLineWidth);
|
10950 |
-
each(bodyItem.after, maxLineWidth);
|
10951 |
-
});
|
10952 |
-
widthPadding = 0;
|
10953 |
-
ctx.font = footerFont.string;
|
10954 |
-
each(tooltip.footer, maxLineWidth);
|
10955 |
-
ctx.restore();
|
10956 |
-
width += padding.width;
|
10957 |
-
return {width, height};
|
10958 |
-
}
|
10959 |
-
function determineYAlign(chart, size) {
|
10960 |
-
const {y, height} = size;
|
10961 |
-
if (y < height / 2) {
|
10962 |
-
return 'top';
|
10963 |
-
} else if (y > (chart.height - height / 2)) {
|
10964 |
-
return 'bottom';
|
10965 |
-
}
|
10966 |
-
return 'center';
|
10967 |
-
}
|
10968 |
-
function doesNotFitWithAlign(xAlign, chart, options, size) {
|
10969 |
-
const {x, width} = size;
|
10970 |
-
const caret = options.caretSize + options.caretPadding;
|
10971 |
-
if (xAlign === 'left' && x + width + caret > chart.width) {
|
10972 |
-
return true;
|
10973 |
-
}
|
10974 |
-
if (xAlign === 'right' && x - width - caret < 0) {
|
10975 |
-
return true;
|
10976 |
-
}
|
10977 |
-
}
|
10978 |
-
function determineXAlign(chart, options, size, yAlign) {
|
10979 |
-
const {x, width} = size;
|
10980 |
-
const {width: chartWidth, chartArea: {left, right}} = chart;
|
10981 |
-
let xAlign = 'center';
|
10982 |
-
if (yAlign === 'center') {
|
10983 |
-
xAlign = x <= (left + right) / 2 ? 'left' : 'right';
|
10984 |
-
} else if (x <= width / 2) {
|
10985 |
-
xAlign = 'left';
|
10986 |
-
} else if (x >= chartWidth - width / 2) {
|
10987 |
-
xAlign = 'right';
|
10988 |
-
}
|
10989 |
-
if (doesNotFitWithAlign(xAlign, chart, options, size)) {
|
10990 |
-
xAlign = 'center';
|
10991 |
-
}
|
10992 |
-
return xAlign;
|
10993 |
-
}
|
10994 |
-
function determineAlignment(chart, options, size) {
|
10995 |
-
const yAlign = options.yAlign || determineYAlign(chart, size);
|
10996 |
-
return {
|
10997 |
-
xAlign: options.xAlign || determineXAlign(chart, options, size, yAlign),
|
10998 |
-
yAlign
|
10999 |
-
};
|
11000 |
-
}
|
11001 |
-
function alignX(size, xAlign) {
|
11002 |
-
let {x, width} = size;
|
11003 |
-
if (xAlign === 'right') {
|
11004 |
-
x -= width;
|
11005 |
-
} else if (xAlign === 'center') {
|
11006 |
-
x -= (width / 2);
|
11007 |
-
}
|
11008 |
-
return x;
|
11009 |
-
}
|
11010 |
-
function alignY(size, yAlign, paddingAndSize) {
|
11011 |
-
let {y, height} = size;
|
11012 |
-
if (yAlign === 'top') {
|
11013 |
-
y += paddingAndSize;
|
11014 |
-
} else if (yAlign === 'bottom') {
|
11015 |
-
y -= height + paddingAndSize;
|
11016 |
-
} else {
|
11017 |
-
y -= (height / 2);
|
11018 |
-
}
|
11019 |
-
return y;
|
11020 |
-
}
|
11021 |
-
function getBackgroundPoint(options, size, alignment, chart) {
|
11022 |
-
const {caretSize, caretPadding, cornerRadius} = options;
|
11023 |
-
const {xAlign, yAlign} = alignment;
|
11024 |
-
const paddingAndSize = caretSize + caretPadding;
|
11025 |
-
const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);
|
11026 |
-
let x = alignX(size, xAlign);
|
11027 |
-
const y = alignY(size, yAlign, paddingAndSize);
|
11028 |
-
if (yAlign === 'center') {
|
11029 |
-
if (xAlign === 'left') {
|
11030 |
-
x += paddingAndSize;
|
11031 |
-
} else if (xAlign === 'right') {
|
11032 |
-
x -= paddingAndSize;
|
11033 |
-
}
|
11034 |
-
} else if (xAlign === 'left') {
|
11035 |
-
x -= Math.max(topLeft, bottomLeft) + caretSize;
|
11036 |
-
} else if (xAlign === 'right') {
|
11037 |
-
x += Math.max(topRight, bottomRight) + caretSize;
|
11038 |
-
}
|
11039 |
-
return {
|
11040 |
-
x: _limitValue(x, 0, chart.width - size.width),
|
11041 |
-
y: _limitValue(y, 0, chart.height - size.height)
|
11042 |
-
};
|
11043 |
-
}
|
11044 |
-
function getAlignedX(tooltip, align, options) {
|
11045 |
-
const padding = toPadding(options.padding);
|
11046 |
-
return align === 'center'
|
11047 |
-
? tooltip.x + tooltip.width / 2
|
11048 |
-
: align === 'right'
|
11049 |
-
? tooltip.x + tooltip.width - padding.right
|
11050 |
-
: tooltip.x + padding.left;
|
11051 |
-
}
|
11052 |
-
function getBeforeAfterBodyLines(callback) {
|
11053 |
-
return pushOrConcat([], splitNewlines(callback));
|
11054 |
-
}
|
11055 |
-
function createTooltipContext(parent, tooltip, tooltipItems) {
|
11056 |
-
return createContext(parent, {
|
11057 |
-
tooltip,
|
11058 |
-
tooltipItems,
|
11059 |
-
type: 'tooltip'
|
11060 |
-
});
|
11061 |
-
}
|
11062 |
-
function overrideCallbacks(callbacks, context) {
|
11063 |
-
const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;
|
11064 |
-
return override ? callbacks.override(override) : callbacks;
|
11065 |
-
}
|
11066 |
-
class Tooltip extends Element {
|
11067 |
-
constructor(config) {
|
11068 |
-
super();
|
11069 |
-
this.opacity = 0;
|
11070 |
-
this._active = [];
|
11071 |
-
this._chart = config._chart;
|
11072 |
-
this._eventPosition = undefined;
|
11073 |
-
this._size = undefined;
|
11074 |
-
this._cachedAnimations = undefined;
|
11075 |
-
this._tooltipItems = [];
|
11076 |
-
this.$animations = undefined;
|
11077 |
-
this.$context = undefined;
|
11078 |
-
this.options = config.options;
|
11079 |
-
this.dataPoints = undefined;
|
11080 |
-
this.title = undefined;
|
11081 |
-
this.beforeBody = undefined;
|
11082 |
-
this.body = undefined;
|
11083 |
-
this.afterBody = undefined;
|
11084 |
-
this.footer = undefined;
|
11085 |
-
this.xAlign = undefined;
|
11086 |
-
this.yAlign = undefined;
|
11087 |
-
this.x = undefined;
|
11088 |
-
this.y = undefined;
|
11089 |
-
this.height = undefined;
|
11090 |
-
this.width = undefined;
|
11091 |
-
this.caretX = undefined;
|
11092 |
-
this.caretY = undefined;
|
11093 |
-
this.labelColors = undefined;
|
11094 |
-
this.labelPointStyles = undefined;
|
11095 |
-
this.labelTextColors = undefined;
|
11096 |
-
}
|
11097 |
-
initialize(options) {
|
11098 |
-
this.options = options;
|
11099 |
-
this._cachedAnimations = undefined;
|
11100 |
-
this.$context = undefined;
|
11101 |
-
}
|
11102 |
-
_resolveAnimations() {
|
11103 |
-
const cached = this._cachedAnimations;
|
11104 |
-
if (cached) {
|
11105 |
-
return cached;
|
11106 |
-
}
|
11107 |
-
const chart = this._chart;
|
11108 |
-
const options = this.options.setContext(this.getContext());
|
11109 |
-
const opts = options.enabled && chart.options.animation && options.animations;
|
11110 |
-
const animations = new Animations(this._chart, opts);
|
11111 |
-
if (opts._cacheable) {
|
11112 |
-
this._cachedAnimations = Object.freeze(animations);
|
11113 |
-
}
|
11114 |
-
return animations;
|
11115 |
-
}
|
11116 |
-
getContext() {
|
11117 |
-
return this.$context ||
|
11118 |
-
(this.$context = createTooltipContext(this._chart.getContext(), this, this._tooltipItems));
|
11119 |
-
}
|
11120 |
-
getTitle(context, options) {
|
11121 |
-
const {callbacks} = options;
|
11122 |
-
const beforeTitle = callbacks.beforeTitle.apply(this, [context]);
|
11123 |
-
const title = callbacks.title.apply(this, [context]);
|
11124 |
-
const afterTitle = callbacks.afterTitle.apply(this, [context]);
|
11125 |
-
let lines = [];
|
11126 |
-
lines = pushOrConcat(lines, splitNewlines(beforeTitle));
|
11127 |
-
lines = pushOrConcat(lines, splitNewlines(title));
|
11128 |
-
lines = pushOrConcat(lines, splitNewlines(afterTitle));
|
11129 |
-
return lines;
|
11130 |
-
}
|
11131 |
-
getBeforeBody(tooltipItems, options) {
|
11132 |
-
return getBeforeAfterBodyLines(options.callbacks.beforeBody.apply(this, [tooltipItems]));
|
11133 |
-
}
|
11134 |
-
getBody(tooltipItems, options) {
|
11135 |
-
const {callbacks} = options;
|
11136 |
-
const bodyItems = [];
|
11137 |
-
each(tooltipItems, (context) => {
|
11138 |
-
const bodyItem = {
|
11139 |
-
before: [],
|
11140 |
-
lines: [],
|
11141 |
-
after: []
|
11142 |
-
};
|
11143 |
-
const scoped = overrideCallbacks(callbacks, context);
|
11144 |
-
pushOrConcat(bodyItem.before, splitNewlines(scoped.beforeLabel.call(this, context)));
|
11145 |
-
pushOrConcat(bodyItem.lines, scoped.label.call(this, context));
|
11146 |
-
pushOrConcat(bodyItem.after, splitNewlines(scoped.afterLabel.call(this, context)));
|
11147 |
-
bodyItems.push(bodyItem);
|
11148 |
-
});
|
11149 |
-
return bodyItems;
|
11150 |
-
}
|
11151 |
-
getAfterBody(tooltipItems, options) {
|
11152 |
-
return getBeforeAfterBodyLines(options.callbacks.afterBody.apply(this, [tooltipItems]));
|
11153 |
-
}
|
11154 |
-
getFooter(tooltipItems, options) {
|
11155 |
-
const {callbacks} = options;
|
11156 |
-
const beforeFooter = callbacks.beforeFooter.apply(this, [tooltipItems]);
|
11157 |
-
const footer = callbacks.footer.apply(this, [tooltipItems]);
|
11158 |
-
const afterFooter = callbacks.afterFooter.apply(this, [tooltipItems]);
|
11159 |
-
let lines = [];
|
11160 |
-
lines = pushOrConcat(lines, splitNewlines(beforeFooter));
|
11161 |
-
lines = pushOrConcat(lines, splitNewlines(footer));
|
11162 |
-
lines = pushOrConcat(lines, splitNewlines(afterFooter));
|
11163 |
-
return lines;
|
11164 |
-
}
|
11165 |
-
_createItems(options) {
|
11166 |
-
const active = this._active;
|
11167 |
-
const data = this._chart.data;
|
11168 |
-
const labelColors = [];
|
11169 |
-
const labelPointStyles = [];
|
11170 |
-
const labelTextColors = [];
|
11171 |
-
let tooltipItems = [];
|
11172 |
-
let i, len;
|
11173 |
-
for (i = 0, len = active.length; i < len; ++i) {
|
11174 |
-
tooltipItems.push(createTooltipItem(this._chart, active[i]));
|
11175 |
-
}
|
11176 |
-
if (options.filter) {
|
11177 |
-
tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));
|
11178 |
-
}
|
11179 |
-
if (options.itemSort) {
|
11180 |
-
tooltipItems = tooltipItems.sort((a, b) => options.itemSort(a, b, data));
|
11181 |
-
}
|
11182 |
-
each(tooltipItems, (context) => {
|
11183 |
-
const scoped = overrideCallbacks(options.callbacks, context);
|
11184 |
-
labelColors.push(scoped.labelColor.call(this, context));
|
11185 |
-
labelPointStyles.push(scoped.labelPointStyle.call(this, context));
|
11186 |
-
labelTextColors.push(scoped.labelTextColor.call(this, context));
|
11187 |
-
});
|
11188 |
-
this.labelColors = labelColors;
|
11189 |
-
this.labelPointStyles = labelPointStyles;
|
11190 |
-
this.labelTextColors = labelTextColors;
|
11191 |
-
this.dataPoints = tooltipItems;
|
11192 |
-
return tooltipItems;
|
11193 |
-
}
|
11194 |
-
update(changed, replay) {
|
11195 |
-
const options = this.options.setContext(this.getContext());
|
11196 |
-
const active = this._active;
|
11197 |
-
let properties;
|
11198 |
-
let tooltipItems = [];
|
11199 |
-
if (!active.length) {
|
11200 |
-
if (this.opacity !== 0) {
|
11201 |
-
properties = {
|
11202 |
-
opacity: 0
|
11203 |
-
};
|
11204 |
-
}
|
11205 |
-
} else {
|
11206 |
-
const position = positioners[options.position].call(this, active, this._eventPosition);
|
11207 |
-
tooltipItems = this._createItems(options);
|
11208 |
-
this.title = this.getTitle(tooltipItems, options);
|
11209 |
-
this.beforeBody = this.getBeforeBody(tooltipItems, options);
|
11210 |
-
this.body = this.getBody(tooltipItems, options);
|
11211 |
-
this.afterBody = this.getAfterBody(tooltipItems, options);
|
11212 |
-
this.footer = this.getFooter(tooltipItems, options);
|
11213 |
-
const size = this._size = getTooltipSize(this, options);
|
11214 |
-
const positionAndSize = Object.assign({}, position, size);
|
11215 |
-
const alignment = determineAlignment(this._chart, options, positionAndSize);
|
11216 |
-
const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this._chart);
|
11217 |
-
this.xAlign = alignment.xAlign;
|
11218 |
-
this.yAlign = alignment.yAlign;
|
11219 |
-
properties = {
|
11220 |
-
opacity: 1,
|
11221 |
-
x: backgroundPoint.x,
|
11222 |
-
y: backgroundPoint.y,
|
11223 |
-
width: size.width,
|
11224 |
-
height: size.height,
|
11225 |
-
caretX: position.x,
|
11226 |
-
caretY: position.y
|
11227 |
-
};
|
11228 |
-
}
|
11229 |
-
this._tooltipItems = tooltipItems;
|
11230 |
-
this.$context = undefined;
|
11231 |
-
if (properties) {
|
11232 |
-
this._resolveAnimations().update(this, properties);
|
11233 |
-
}
|
11234 |
-
if (changed && options.external) {
|
11235 |
-
options.external.call(this, {chart: this._chart, tooltip: this, replay});
|
11236 |
-
}
|
11237 |
-
}
|
11238 |
-
drawCaret(tooltipPoint, ctx, size, options) {
|
11239 |
-
const caretPosition = this.getCaretPosition(tooltipPoint, size, options);
|
11240 |
-
ctx.lineTo(caretPosition.x1, caretPosition.y1);
|
11241 |
-
ctx.lineTo(caretPosition.x2, caretPosition.y2);
|
11242 |
-
ctx.lineTo(caretPosition.x3, caretPosition.y3);
|
11243 |
-
}
|
11244 |
-
getCaretPosition(tooltipPoint, size, options) {
|
11245 |
-
const {xAlign, yAlign} = this;
|
11246 |
-
const {caretSize, cornerRadius} = options;
|
11247 |
-
const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(cornerRadius);
|
11248 |
-
const {x: ptX, y: ptY} = tooltipPoint;
|
11249 |
-
const {width, height} = size;
|
11250 |
-
let x1, x2, x3, y1, y2, y3;
|
11251 |
-
if (yAlign === 'center') {
|
11252 |
-
y2 = ptY + (height / 2);
|
11253 |
-
if (xAlign === 'left') {
|
11254 |
-
x1 = ptX;
|
11255 |
-
x2 = x1 - caretSize;
|
11256 |
-
y1 = y2 + caretSize;
|
11257 |
-
y3 = y2 - caretSize;
|
11258 |
-
} else {
|
11259 |
-
x1 = ptX + width;
|
11260 |
-
x2 = x1 + caretSize;
|
11261 |
-
y1 = y2 - caretSize;
|
11262 |
-
y3 = y2 + caretSize;
|
11263 |
-
}
|
11264 |
-
x3 = x1;
|
11265 |
-
} else {
|
11266 |
-
if (xAlign === 'left') {
|
11267 |
-
x2 = ptX + Math.max(topLeft, bottomLeft) + (caretSize);
|
11268 |
-
} else if (xAlign === 'right') {
|
11269 |
-
x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;
|
11270 |
-
} else {
|
11271 |
-
x2 = this.caretX;
|
11272 |
-
}
|
11273 |
-
if (yAlign === 'top') {
|
11274 |
-
y1 = ptY;
|
11275 |
-
y2 = y1 - caretSize;
|
11276 |
-
x1 = x2 - caretSize;
|
11277 |
-
x3 = x2 + caretSize;
|
11278 |
-
} else {
|
11279 |
-
y1 = ptY + height;
|
11280 |
-
y2 = y1 + caretSize;
|
11281 |
-
x1 = x2 + caretSize;
|
11282 |
-
x3 = x2 - caretSize;
|
11283 |
-
}
|
11284 |
-
y3 = y1;
|
11285 |
-
}
|
11286 |
-
return {x1, x2, x3, y1, y2, y3};
|
11287 |
-
}
|
11288 |
-
drawTitle(pt, ctx, options) {
|
11289 |
-
const title = this.title;
|
11290 |
-
const length = title.length;
|
11291 |
-
let titleFont, titleSpacing, i;
|
11292 |
-
if (length) {
|
11293 |
-
const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);
|
11294 |
-
pt.x = getAlignedX(this, options.titleAlign, options);
|
11295 |
-
ctx.textAlign = rtlHelper.textAlign(options.titleAlign);
|
11296 |
-
ctx.textBaseline = 'middle';
|
11297 |
-
titleFont = toFont(options.titleFont);
|
11298 |
-
titleSpacing = options.titleSpacing;
|
11299 |
-
ctx.fillStyle = options.titleColor;
|
11300 |
-
ctx.font = titleFont.string;
|
11301 |
-
for (i = 0; i < length; ++i) {
|
11302 |
-
ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);
|
11303 |
-
pt.y += titleFont.lineHeight + titleSpacing;
|
11304 |
-
if (i + 1 === length) {
|
11305 |
-
pt.y += options.titleMarginBottom - titleSpacing;
|
11306 |
-
}
|
11307 |
-
}
|
11308 |
-
}
|
11309 |
-
}
|
11310 |
-
_drawColorBox(ctx, pt, i, rtlHelper, options) {
|
11311 |
-
const labelColors = this.labelColors[i];
|
11312 |
-
const labelPointStyle = this.labelPointStyles[i];
|
11313 |
-
const {boxHeight, boxWidth, boxPadding} = options;
|
11314 |
-
const bodyFont = toFont(options.bodyFont);
|
11315 |
-
const colorX = getAlignedX(this, 'left', options);
|
11316 |
-
const rtlColorX = rtlHelper.x(colorX);
|
11317 |
-
const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;
|
11318 |
-
const colorY = pt.y + yOffSet;
|
11319 |
-
if (options.usePointStyle) {
|
11320 |
-
const drawOptions = {
|
11321 |
-
radius: Math.min(boxWidth, boxHeight) / 2,
|
11322 |
-
pointStyle: labelPointStyle.pointStyle,
|
11323 |
-
rotation: labelPointStyle.rotation,
|
11324 |
-
borderWidth: 1
|
11325 |
-
};
|
11326 |
-
const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;
|
11327 |
-
const centerY = colorY + boxHeight / 2;
|
11328 |
-
ctx.strokeStyle = options.multiKeyBackground;
|
11329 |
-
ctx.fillStyle = options.multiKeyBackground;
|
11330 |
-
drawPoint(ctx, drawOptions, centerX, centerY);
|
11331 |
-
ctx.strokeStyle = labelColors.borderColor;
|
11332 |
-
ctx.fillStyle = labelColors.backgroundColor;
|
11333 |
-
drawPoint(ctx, drawOptions, centerX, centerY);
|
11334 |
-
} else {
|
11335 |
-
ctx.lineWidth = labelColors.borderWidth || 1;
|
11336 |
-
ctx.strokeStyle = labelColors.borderColor;
|
11337 |
-
ctx.setLineDash(labelColors.borderDash || []);
|
11338 |
-
ctx.lineDashOffset = labelColors.borderDashOffset || 0;
|
11339 |
-
const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth - boxPadding);
|
11340 |
-
const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - boxPadding - 2);
|
11341 |
-
const borderRadius = toTRBLCorners(labelColors.borderRadius);
|
11342 |
-
if (Object.values(borderRadius).some(v => v !== 0)) {
|
11343 |
-
ctx.beginPath();
|
11344 |
-
ctx.fillStyle = options.multiKeyBackground;
|
11345 |
-
addRoundedRectPath(ctx, {
|
11346 |
-
x: outerX,
|
11347 |
-
y: colorY,
|
11348 |
-
w: boxWidth,
|
11349 |
-
h: boxHeight,
|
11350 |
-
radius: borderRadius,
|
11351 |
-
});
|
11352 |
-
ctx.fill();
|
11353 |
-
ctx.stroke();
|
11354 |
-
ctx.fillStyle = labelColors.backgroundColor;
|
11355 |
-
ctx.beginPath();
|
11356 |
-
addRoundedRectPath(ctx, {
|
11357 |
-
x: innerX,
|
11358 |
-
y: colorY + 1,
|
11359 |
-
w: boxWidth - 2,
|
11360 |
-
h: boxHeight - 2,
|
11361 |
-
radius: borderRadius,
|
11362 |
-
});
|
11363 |
-
ctx.fill();
|
11364 |
-
} else {
|
11365 |
-
ctx.fillStyle = options.multiKeyBackground;
|
11366 |
-
ctx.fillRect(outerX, colorY, boxWidth, boxHeight);
|
11367 |
-
ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);
|
11368 |
-
ctx.fillStyle = labelColors.backgroundColor;
|
11369 |
-
ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);
|
11370 |
-
}
|
11371 |
-
}
|
11372 |
-
ctx.fillStyle = this.labelTextColors[i];
|
11373 |
-
}
|
11374 |
-
drawBody(pt, ctx, options) {
|
11375 |
-
const {body} = this;
|
11376 |
-
const {bodySpacing, bodyAlign, displayColors, boxHeight, boxWidth, boxPadding} = options;
|
11377 |
-
const bodyFont = toFont(options.bodyFont);
|
11378 |
-
let bodyLineHeight = bodyFont.lineHeight;
|
11379 |
-
let xLinePadding = 0;
|
11380 |
-
const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);
|
11381 |
-
const fillLineOfText = function(line) {
|
11382 |
-
ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);
|
11383 |
-
pt.y += bodyLineHeight + bodySpacing;
|
11384 |
-
};
|
11385 |
-
const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);
|
11386 |
-
let bodyItem, textColor, lines, i, j, ilen, jlen;
|
11387 |
-
ctx.textAlign = bodyAlign;
|
11388 |
-
ctx.textBaseline = 'middle';
|
11389 |
-
ctx.font = bodyFont.string;
|
11390 |
-
pt.x = getAlignedX(this, bodyAlignForCalculation, options);
|
11391 |
-
ctx.fillStyle = options.bodyColor;
|
11392 |
-
each(this.beforeBody, fillLineOfText);
|
11393 |
-
xLinePadding = displayColors && bodyAlignForCalculation !== 'right'
|
11394 |
-
? bodyAlign === 'center' ? (boxWidth / 2 + boxPadding) : (boxWidth + 2 + boxPadding)
|
11395 |
-
: 0;
|
11396 |
-
for (i = 0, ilen = body.length; i < ilen; ++i) {
|
11397 |
-
bodyItem = body[i];
|
11398 |
-
textColor = this.labelTextColors[i];
|
11399 |
-
ctx.fillStyle = textColor;
|
11400 |
-
each(bodyItem.before, fillLineOfText);
|
11401 |
-
lines = bodyItem.lines;
|
11402 |
-
if (displayColors && lines.length) {
|
11403 |
-
this._drawColorBox(ctx, pt, i, rtlHelper, options);
|
11404 |
-
bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);
|
11405 |
-
}
|
11406 |
-
for (j = 0, jlen = lines.length; j < jlen; ++j) {
|
11407 |
-
fillLineOfText(lines[j]);
|
11408 |
-
bodyLineHeight = bodyFont.lineHeight;
|
11409 |
-
}
|
11410 |
-
each(bodyItem.after, fillLineOfText);
|
11411 |
-
}
|
11412 |
-
xLinePadding = 0;
|
11413 |
-
bodyLineHeight = bodyFont.lineHeight;
|
11414 |
-
each(this.afterBody, fillLineOfText);
|
11415 |
-
pt.y -= bodySpacing;
|
11416 |
-
}
|
11417 |
-
drawFooter(pt, ctx, options) {
|
11418 |
-
const footer = this.footer;
|
11419 |
-
const length = footer.length;
|
11420 |
-
let footerFont, i;
|
11421 |
-
if (length) {
|
11422 |
-
const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);
|
11423 |
-
pt.x = getAlignedX(this, options.footerAlign, options);
|
11424 |
-
pt.y += options.footerMarginTop;
|
11425 |
-
ctx.textAlign = rtlHelper.textAlign(options.footerAlign);
|
11426 |
-
ctx.textBaseline = 'middle';
|
11427 |
-
footerFont = toFont(options.footerFont);
|
11428 |
-
ctx.fillStyle = options.footerColor;
|
11429 |
-
ctx.font = footerFont.string;
|
11430 |
-
for (i = 0; i < length; ++i) {
|
11431 |
-
ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);
|
11432 |
-
pt.y += footerFont.lineHeight + options.footerSpacing;
|
11433 |
-
}
|
11434 |
-
}
|
11435 |
-
}
|
11436 |
-
drawBackground(pt, ctx, tooltipSize, options) {
|
11437 |
-
const {xAlign, yAlign} = this;
|
11438 |
-
const {x, y} = pt;
|
11439 |
-
const {width, height} = tooltipSize;
|
11440 |
-
const {topLeft, topRight, bottomLeft, bottomRight} = toTRBLCorners(options.cornerRadius);
|
11441 |
-
ctx.fillStyle = options.backgroundColor;
|
11442 |
-
ctx.strokeStyle = options.borderColor;
|
11443 |
-
ctx.lineWidth = options.borderWidth;
|
11444 |
-
ctx.beginPath();
|
11445 |
-
ctx.moveTo(x + topLeft, y);
|
11446 |
-
if (yAlign === 'top') {
|
11447 |
-
this.drawCaret(pt, ctx, tooltipSize, options);
|
11448 |
-
}
|
11449 |
-
ctx.lineTo(x + width - topRight, y);
|
11450 |
-
ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);
|
11451 |
-
if (yAlign === 'center' && xAlign === 'right') {
|
11452 |
-
this.drawCaret(pt, ctx, tooltipSize, options);
|
11453 |
-
}
|
11454 |
-
ctx.lineTo(x + width, y + height - bottomRight);
|
11455 |
-
ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);
|
11456 |
-
if (yAlign === 'bottom') {
|
11457 |
-
this.drawCaret(pt, ctx, tooltipSize, options);
|
11458 |
-
}
|
11459 |
-
ctx.lineTo(x + bottomLeft, y + height);
|
11460 |
-
ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);
|
11461 |
-
if (yAlign === 'center' && xAlign === 'left') {
|
11462 |
-
this.drawCaret(pt, ctx, tooltipSize, options);
|
11463 |
-
}
|
11464 |
-
ctx.lineTo(x, y + topLeft);
|
11465 |
-
ctx.quadraticCurveTo(x, y, x + topLeft, y);
|
11466 |
-
ctx.closePath();
|
11467 |
-
ctx.fill();
|
11468 |
-
if (options.borderWidth > 0) {
|
11469 |
-
ctx.stroke();
|
11470 |
-
}
|
11471 |
-
}
|
11472 |
-
_updateAnimationTarget(options) {
|
11473 |
-
const chart = this._chart;
|
11474 |
-
const anims = this.$animations;
|
11475 |
-
const animX = anims && anims.x;
|
11476 |
-
const animY = anims && anims.y;
|
11477 |
-
if (animX || animY) {
|
11478 |
-
const position = positioners[options.position].call(this, this._active, this._eventPosition);
|
11479 |
-
if (!position) {
|
11480 |
-
return;
|
11481 |
-
}
|
11482 |
-
const size = this._size = getTooltipSize(this, options);
|
11483 |
-
const positionAndSize = Object.assign({}, position, this._size);
|
11484 |
-
const alignment = determineAlignment(chart, options, positionAndSize);
|
11485 |
-
const point = getBackgroundPoint(options, positionAndSize, alignment, chart);
|
11486 |
-
if (animX._to !== point.x || animY._to !== point.y) {
|
11487 |
-
this.xAlign = alignment.xAlign;
|
11488 |
-
this.yAlign = alignment.yAlign;
|
11489 |
-
this.width = size.width;
|
11490 |
-
this.height = size.height;
|
11491 |
-
this.caretX = position.x;
|
11492 |
-
this.caretY = position.y;
|
11493 |
-
this._resolveAnimations().update(this, point);
|
11494 |
-
}
|
11495 |
-
}
|
11496 |
-
}
|
11497 |
-
draw(ctx) {
|
11498 |
-
const options = this.options.setContext(this.getContext());
|
11499 |
-
let opacity = this.opacity;
|
11500 |
-
if (!opacity) {
|
11501 |
-
return;
|
11502 |
-
}
|
11503 |
-
this._updateAnimationTarget(options);
|
11504 |
-
const tooltipSize = {
|
11505 |
-
width: this.width,
|
11506 |
-
height: this.height
|
11507 |
-
};
|
11508 |
-
const pt = {
|
11509 |
-
x: this.x,
|
11510 |
-
y: this.y
|
11511 |
-
};
|
11512 |
-
opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;
|
11513 |
-
const padding = toPadding(options.padding);
|
11514 |
-
const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
|
11515 |
-
if (options.enabled && hasTooltipContent) {
|
11516 |
-
ctx.save();
|
11517 |
-
ctx.globalAlpha = opacity;
|
11518 |
-
this.drawBackground(pt, ctx, tooltipSize, options);
|
11519 |
-
overrideTextDirection(ctx, options.textDirection);
|
11520 |
-
pt.y += padding.top;
|
11521 |
-
this.drawTitle(pt, ctx, options);
|
11522 |
-
this.drawBody(pt, ctx, options);
|
11523 |
-
this.drawFooter(pt, ctx, options);
|
11524 |
-
restoreTextDirection(ctx, options.textDirection);
|
11525 |
-
ctx.restore();
|
11526 |
-
}
|
11527 |
-
}
|
11528 |
-
getActiveElements() {
|
11529 |
-
return this._active || [];
|
11530 |
-
}
|
11531 |
-
setActiveElements(activeElements, eventPosition) {
|
11532 |
-
const lastActive = this._active;
|
11533 |
-
const active = activeElements.map(({datasetIndex, index}) => {
|
11534 |
-
const meta = this._chart.getDatasetMeta(datasetIndex);
|
11535 |
-
if (!meta) {
|
11536 |
-
throw new Error('Cannot find a dataset at index ' + datasetIndex);
|
11537 |
-
}
|
11538 |
-
return {
|
11539 |
-
datasetIndex,
|
11540 |
-
element: meta.data[index],
|
11541 |
-
index,
|
11542 |
-
};
|
11543 |
-
});
|
11544 |
-
const changed = !_elementsEqual(lastActive, active);
|
11545 |
-
const positionChanged = this._positionChanged(active, eventPosition);
|
11546 |
-
if (changed || positionChanged) {
|
11547 |
-
this._active = active;
|
11548 |
-
this._eventPosition = eventPosition;
|
11549 |
-
this.update(true);
|
11550 |
-
}
|
11551 |
-
}
|
11552 |
-
handleEvent(e, replay) {
|
11553 |
-
const options = this.options;
|
11554 |
-
const lastActive = this._active || [];
|
11555 |
-
let changed = false;
|
11556 |
-
let active = [];
|
11557 |
-
if (e.type !== 'mouseout') {
|
11558 |
-
active = this._chart.getElementsAtEventForMode(e, options.mode, options, replay);
|
11559 |
-
if (options.reverse) {
|
11560 |
-
active.reverse();
|
11561 |
-
}
|
11562 |
-
}
|
11563 |
-
const positionChanged = this._positionChanged(active, e);
|
11564 |
-
changed = replay || !_elementsEqual(active, lastActive) || positionChanged;
|
11565 |
-
if (changed) {
|
11566 |
-
this._active = active;
|
11567 |
-
if (options.enabled || options.external) {
|
11568 |
-
this._eventPosition = {
|
11569 |
-
x: e.x,
|
11570 |
-
y: e.y
|
11571 |
-
};
|
11572 |
-
this.update(true, replay);
|
11573 |
-
}
|
11574 |
-
}
|
11575 |
-
return changed;
|
11576 |
-
}
|
11577 |
-
_positionChanged(active, e) {
|
11578 |
-
const {caretX, caretY, options} = this;
|
11579 |
-
const position = positioners[options.position].call(this, active, e);
|
11580 |
-
return position !== false && (caretX !== position.x || caretY !== position.y);
|
11581 |
-
}
|
11582 |
-
}
|
11583 |
-
Tooltip.positioners = positioners;
|
11584 |
-
var plugin_tooltip = {
|
11585 |
-
id: 'tooltip',
|
11586 |
-
_element: Tooltip,
|
11587 |
-
positioners,
|
11588 |
-
afterInit(chart, _args, options) {
|
11589 |
-
if (options) {
|
11590 |
-
chart.tooltip = new Tooltip({_chart: chart, options});
|
11591 |
-
}
|
11592 |
-
},
|
11593 |
-
beforeUpdate(chart, _args, options) {
|
11594 |
-
if (chart.tooltip) {
|
11595 |
-
chart.tooltip.initialize(options);
|
11596 |
-
}
|
11597 |
-
},
|
11598 |
-
reset(chart, _args, options) {
|
11599 |
-
if (chart.tooltip) {
|
11600 |
-
chart.tooltip.initialize(options);
|
11601 |
-
}
|
11602 |
-
},
|
11603 |
-
afterDraw(chart) {
|
11604 |
-
const tooltip = chart.tooltip;
|
11605 |
-
const args = {
|
11606 |
-
tooltip
|
11607 |
-
};
|
11608 |
-
if (chart.notifyPlugins('beforeTooltipDraw', args) === false) {
|
11609 |
-
return;
|
11610 |
-
}
|
11611 |
-
if (tooltip) {
|
11612 |
-
tooltip.draw(chart.ctx);
|
11613 |
-
}
|
11614 |
-
chart.notifyPlugins('afterTooltipDraw', args);
|
11615 |
-
},
|
11616 |
-
afterEvent(chart, args) {
|
11617 |
-
if (chart.tooltip) {
|
11618 |
-
const useFinalPosition = args.replay;
|
11619 |
-
if (chart.tooltip.handleEvent(args.event, useFinalPosition)) {
|
11620 |
-
args.changed = true;
|
11621 |
-
}
|
11622 |
-
}
|
11623 |
-
},
|
11624 |
-
defaults: {
|
11625 |
-
enabled: true,
|
11626 |
-
external: null,
|
11627 |
-
position: 'average',
|
11628 |
-
backgroundColor: 'rgba(0,0,0,0.8)',
|
11629 |
-
titleColor: '#fff',
|
11630 |
-
titleFont: {
|
11631 |
-
weight: 'bold',
|
11632 |
-
},
|
11633 |
-
titleSpacing: 2,
|
11634 |
-
titleMarginBottom: 6,
|
11635 |
-
titleAlign: 'left',
|
11636 |
-
bodyColor: '#fff',
|
11637 |
-
bodySpacing: 2,
|
11638 |
-
bodyFont: {
|
11639 |
-
},
|
11640 |
-
bodyAlign: 'left',
|
11641 |
-
footerColor: '#fff',
|
11642 |
-
footerSpacing: 2,
|
11643 |
-
footerMarginTop: 6,
|
11644 |
-
footerFont: {
|
11645 |
-
weight: 'bold',
|
11646 |
-
},
|
11647 |
-
footerAlign: 'left',
|
11648 |
-
padding: 6,
|
11649 |
-
caretPadding: 2,
|
11650 |
-
caretSize: 5,
|
11651 |
-
cornerRadius: 6,
|
11652 |
-
boxHeight: (ctx, opts) => opts.bodyFont.size,
|
11653 |
-
boxWidth: (ctx, opts) => opts.bodyFont.size,
|
11654 |
-
multiKeyBackground: '#fff',
|
11655 |
-
displayColors: true,
|
11656 |
-
boxPadding: 0,
|
11657 |
-
borderColor: 'rgba(0,0,0,0)',
|
11658 |
-
borderWidth: 0,
|
11659 |
-
animation: {
|
11660 |
-
duration: 400,
|
11661 |
-
easing: 'easeOutQuart',
|
11662 |
-
},
|
11663 |
-
animations: {
|
11664 |
-
numbers: {
|
11665 |
-
type: 'number',
|
11666 |
-
properties: ['x', 'y', 'width', 'height', 'caretX', 'caretY'],
|
11667 |
-
},
|
11668 |
-
opacity: {
|
11669 |
-
easing: 'linear',
|
11670 |
-
duration: 200
|
11671 |
-
}
|
11672 |
-
},
|
11673 |
-
callbacks: {
|
11674 |
-
beforeTitle: noop,
|
11675 |
-
title(tooltipItems) {
|
11676 |
-
if (tooltipItems.length > 0) {
|
11677 |
-
const item = tooltipItems[0];
|
11678 |
-
const labels = item.chart.data.labels;
|
11679 |
-
const labelCount = labels ? labels.length : 0;
|
11680 |
-
if (this && this.options && this.options.mode === 'dataset') {
|
11681 |
-
return item.dataset.label || '';
|
11682 |
-
} else if (item.label) {
|
11683 |
-
return item.label;
|
11684 |
-
} else if (labelCount > 0 && item.dataIndex < labelCount) {
|
11685 |
-
return labels[item.dataIndex];
|
11686 |
-
}
|
11687 |
-
}
|
11688 |
-
return '';
|
11689 |
-
},
|
11690 |
-
afterTitle: noop,
|
11691 |
-
beforeBody: noop,
|
11692 |
-
beforeLabel: noop,
|
11693 |
-
label(tooltipItem) {
|
11694 |
-
if (this && this.options && this.options.mode === 'dataset') {
|
11695 |
-
return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;
|
11696 |
-
}
|
11697 |
-
let label = tooltipItem.dataset.label || '';
|
11698 |
-
if (label) {
|
11699 |
-
label += ': ';
|
11700 |
-
}
|
11701 |
-
const value = tooltipItem.formattedValue;
|
11702 |
-
if (!isNullOrUndef(value)) {
|
11703 |
-
label += value;
|
11704 |
-
}
|
11705 |
-
return label;
|
11706 |
-
},
|
11707 |
-
labelColor(tooltipItem) {
|
11708 |
-
const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);
|
11709 |
-
const options = meta.controller.getStyle(tooltipItem.dataIndex);
|
11710 |
-
return {
|
11711 |
-
borderColor: options.borderColor,
|
11712 |
-
backgroundColor: options.backgroundColor,
|
11713 |
-
borderWidth: options.borderWidth,
|
11714 |
-
borderDash: options.borderDash,
|
11715 |
-
borderDashOffset: options.borderDashOffset,
|
11716 |
-
borderRadius: 0,
|
11717 |
-
};
|
11718 |
-
},
|
11719 |
-
labelTextColor() {
|
11720 |
-
return this.options.bodyColor;
|
11721 |
-
},
|
11722 |
-
labelPointStyle(tooltipItem) {
|
11723 |
-
const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);
|
11724 |
-
const options = meta.controller.getStyle(tooltipItem.dataIndex);
|
11725 |
-
return {
|
11726 |
-
pointStyle: options.pointStyle,
|
11727 |
-
rotation: options.rotation,
|
11728 |
-
};
|
11729 |
-
},
|
11730 |
-
afterLabel: noop,
|
11731 |
-
afterBody: noop,
|
11732 |
-
beforeFooter: noop,
|
11733 |
-
footer: noop,
|
11734 |
-
afterFooter: noop
|
11735 |
-
}
|
11736 |
-
},
|
11737 |
-
defaultRoutes: {
|
11738 |
-
bodyFont: 'font',
|
11739 |
-
footerFont: 'font',
|
11740 |
-
titleFont: 'font'
|
11741 |
-
},
|
11742 |
-
descriptors: {
|
11743 |
-
_scriptable: (name) => name !== 'filter' && name !== 'itemSort' && name !== 'external',
|
11744 |
-
_indexable: false,
|
11745 |
-
callbacks: {
|
11746 |
-
_scriptable: false,
|
11747 |
-
_indexable: false,
|
11748 |
-
},
|
11749 |
-
animation: {
|
11750 |
-
_fallback: false
|
11751 |
-
},
|
11752 |
-
animations: {
|
11753 |
-
_fallback: 'animation'
|
11754 |
-
}
|
11755 |
-
},
|
11756 |
-
additionalOptionScopes: ['interaction']
|
11757 |
-
};
|
11758 |
-
|
11759 |
-
var plugins = /*#__PURE__*/Object.freeze({
|
11760 |
-
__proto__: null,
|
11761 |
-
Decimation: plugin_decimation,
|
11762 |
-
Filler: plugin_filler,
|
11763 |
-
Legend: plugin_legend,
|
11764 |
-
SubTitle: plugin_subtitle,
|
11765 |
-
Title: plugin_title,
|
11766 |
-
Tooltip: plugin_tooltip
|
11767 |
-
});
|
11768 |
-
|
11769 |
-
const addIfString = (labels, raw, index, addedLabels) => {
|
11770 |
-
if (typeof raw === 'string') {
|
11771 |
-
index = labels.push(raw) - 1;
|
11772 |
-
addedLabels.unshift({index, label: raw});
|
11773 |
-
} else if (isNaN(raw)) {
|
11774 |
-
index = null;
|
11775 |
-
}
|
11776 |
-
return index;
|
11777 |
-
};
|
11778 |
-
function findOrAddLabel(labels, raw, index, addedLabels) {
|
11779 |
-
const first = labels.indexOf(raw);
|
11780 |
-
if (first === -1) {
|
11781 |
-
return addIfString(labels, raw, index, addedLabels);
|
11782 |
-
}
|
11783 |
-
const last = labels.lastIndexOf(raw);
|
11784 |
-
return first !== last ? index : first;
|
11785 |
-
}
|
11786 |
-
const validIndex = (index, max) => index === null ? null : _limitValue(Math.round(index), 0, max);
|
11787 |
-
class CategoryScale extends Scale {
|
11788 |
-
constructor(cfg) {
|
11789 |
-
super(cfg);
|
11790 |
-
this._startValue = undefined;
|
11791 |
-
this._valueRange = 0;
|
11792 |
-
this._addedLabels = [];
|
11793 |
-
}
|
11794 |
-
init(scaleOptions) {
|
11795 |
-
const added = this._addedLabels;
|
11796 |
-
if (added.length) {
|
11797 |
-
const labels = this.getLabels();
|
11798 |
-
for (const {index, label} of added) {
|
11799 |
-
if (labels[index] === label) {
|
11800 |
-
labels.splice(index, 1);
|
11801 |
-
}
|
11802 |
-
}
|
11803 |
-
this._addedLabels = [];
|
11804 |
-
}
|
11805 |
-
super.init(scaleOptions);
|
11806 |
-
}
|
11807 |
-
parse(raw, index) {
|
11808 |
-
if (isNullOrUndef(raw)) {
|
11809 |
-
return null;
|
11810 |
-
}
|
11811 |
-
const labels = this.getLabels();
|
11812 |
-
index = isFinite(index) && labels[index] === raw ? index
|
11813 |
-
: findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);
|
11814 |
-
return validIndex(index, labels.length - 1);
|
11815 |
-
}
|
11816 |
-
determineDataLimits() {
|
11817 |
-
const {minDefined, maxDefined} = this.getUserBounds();
|
11818 |
-
let {min, max} = this.getMinMax(true);
|
11819 |
-
if (this.options.bounds === 'ticks') {
|
11820 |
-
if (!minDefined) {
|
11821 |
-
min = 0;
|
11822 |
-
}
|
11823 |
-
if (!maxDefined) {
|
11824 |
-
max = this.getLabels().length - 1;
|
11825 |
-
}
|
11826 |
-
}
|
11827 |
-
this.min = min;
|
11828 |
-
this.max = max;
|
11829 |
-
}
|
11830 |
-
buildTicks() {
|
11831 |
-
const min = this.min;
|
11832 |
-
const max = this.max;
|
11833 |
-
const offset = this.options.offset;
|
11834 |
-
const ticks = [];
|
11835 |
-
let labels = this.getLabels();
|
11836 |
-
labels = (min === 0 && max === labels.length - 1) ? labels : labels.slice(min, max + 1);
|
11837 |
-
this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);
|
11838 |
-
this._startValue = this.min - (offset ? 0.5 : 0);
|
11839 |
-
for (let value = min; value <= max; value++) {
|
11840 |
-
ticks.push({value});
|
11841 |
-
}
|
11842 |
-
return ticks;
|
11843 |
-
}
|
11844 |
-
getLabelForValue(value) {
|
11845 |
-
const labels = this.getLabels();
|
11846 |
-
if (value >= 0 && value < labels.length) {
|
11847 |
-
return labels[value];
|
11848 |
-
}
|
11849 |
-
return value;
|
11850 |
-
}
|
11851 |
-
configure() {
|
11852 |
-
super.configure();
|
11853 |
-
if (!this.isHorizontal()) {
|
11854 |
-
this._reversePixels = !this._reversePixels;
|
11855 |
-
}
|
11856 |
-
}
|
11857 |
-
getPixelForValue(value) {
|
11858 |
-
if (typeof value !== 'number') {
|
11859 |
-
value = this.parse(value);
|
11860 |
-
}
|
11861 |
-
return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);
|
11862 |
-
}
|
11863 |
-
getPixelForTick(index) {
|
11864 |
-
const ticks = this.ticks;
|
11865 |
-
if (index < 0 || index > ticks.length - 1) {
|
11866 |
-
return null;
|
11867 |
-
}
|
11868 |
-
return this.getPixelForValue(ticks[index].value);
|
11869 |
-
}
|
11870 |
-
getValueForPixel(pixel) {
|
11871 |
-
return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);
|
11872 |
-
}
|
11873 |
-
getBasePixel() {
|
11874 |
-
return this.bottom;
|
11875 |
-
}
|
11876 |
-
}
|
11877 |
-
CategoryScale.id = 'category';
|
11878 |
-
CategoryScale.defaults = {
|
11879 |
-
ticks: {
|
11880 |
-
callback: CategoryScale.prototype.getLabelForValue
|
11881 |
-
}
|
11882 |
-
};
|
11883 |
-
|
11884 |
-
function generateTicks$1(generationOptions, dataRange) {
|
11885 |
-
const ticks = [];
|
11886 |
-
const MIN_SPACING = 1e-14;
|
11887 |
-
const {bounds, step, min, max, precision, count, maxTicks, maxDigits, includeBounds} = generationOptions;
|
11888 |
-
const unit = step || 1;
|
11889 |
-
const maxSpaces = maxTicks - 1;
|
11890 |
-
const {min: rmin, max: rmax} = dataRange;
|
11891 |
-
const minDefined = !isNullOrUndef(min);
|
11892 |
-
const maxDefined = !isNullOrUndef(max);
|
11893 |
-
const countDefined = !isNullOrUndef(count);
|
11894 |
-
const minSpacing = (rmax - rmin) / (maxDigits + 1);
|
11895 |
-
let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;
|
11896 |
-
let factor, niceMin, niceMax, numSpaces;
|
11897 |
-
if (spacing < MIN_SPACING && !minDefined && !maxDefined) {
|
11898 |
-
return [{value: rmin}, {value: rmax}];
|
11899 |
-
}
|
11900 |
-
numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);
|
11901 |
-
if (numSpaces > maxSpaces) {
|
11902 |
-
spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;
|
11903 |
-
}
|
11904 |
-
if (!isNullOrUndef(precision)) {
|
11905 |
-
factor = Math.pow(10, precision);
|
11906 |
-
spacing = Math.ceil(spacing * factor) / factor;
|
11907 |
-
}
|
11908 |
-
if (bounds === 'ticks') {
|
11909 |
-
niceMin = Math.floor(rmin / spacing) * spacing;
|
11910 |
-
niceMax = Math.ceil(rmax / spacing) * spacing;
|
11911 |
-
} else {
|
11912 |
-
niceMin = rmin;
|
11913 |
-
niceMax = rmax;
|
11914 |
-
}
|
11915 |
-
if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {
|
11916 |
-
numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));
|
11917 |
-
spacing = (max - min) / numSpaces;
|
11918 |
-
niceMin = min;
|
11919 |
-
niceMax = max;
|
11920 |
-
} else if (countDefined) {
|
11921 |
-
niceMin = minDefined ? min : niceMin;
|
11922 |
-
niceMax = maxDefined ? max : niceMax;
|
11923 |
-
numSpaces = count - 1;
|
11924 |
-
spacing = (niceMax - niceMin) / numSpaces;
|
11925 |
-
} else {
|
11926 |
-
numSpaces = (niceMax - niceMin) / spacing;
|
11927 |
-
if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {
|
11928 |
-
numSpaces = Math.round(numSpaces);
|
11929 |
-
} else {
|
11930 |
-
numSpaces = Math.ceil(numSpaces);
|
11931 |
-
}
|
11932 |
-
}
|
11933 |
-
const decimalPlaces = Math.max(
|
11934 |
-
_decimalPlaces(spacing),
|
11935 |
-
_decimalPlaces(niceMin)
|
11936 |
-
);
|
11937 |
-
factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);
|
11938 |
-
niceMin = Math.round(niceMin * factor) / factor;
|
11939 |
-
niceMax = Math.round(niceMax * factor) / factor;
|
11940 |
-
let j = 0;
|
11941 |
-
if (minDefined) {
|
11942 |
-
if (includeBounds && niceMin !== min) {
|
11943 |
-
ticks.push({value: min});
|
11944 |
-
if (niceMin < min) {
|
11945 |
-
j++;
|
11946 |
-
}
|
11947 |
-
if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {
|
11948 |
-
j++;
|
11949 |
-
}
|
11950 |
-
} else if (niceMin < min) {
|
11951 |
-
j++;
|
11952 |
-
}
|
11953 |
-
}
|
11954 |
-
for (; j < numSpaces; ++j) {
|
11955 |
-
ticks.push({value: Math.round((niceMin + j * spacing) * factor) / factor});
|
11956 |
-
}
|
11957 |
-
if (maxDefined && includeBounds && niceMax !== max) {
|
11958 |
-
if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {
|
11959 |
-
ticks[ticks.length - 1].value = max;
|
11960 |
-
} else {
|
11961 |
-
ticks.push({value: max});
|
11962 |
-
}
|
11963 |
-
} else if (!maxDefined || niceMax === max) {
|
11964 |
-
ticks.push({value: niceMax});
|
11965 |
-
}
|
11966 |
-
return ticks;
|
11967 |
-
}
|
11968 |
-
function relativeLabelSize(value, minSpacing, {horizontal, minRotation}) {
|
11969 |
-
const rad = toRadians(minRotation);
|
11970 |
-
const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;
|
11971 |
-
const length = 0.75 * minSpacing * ('' + value).length;
|
11972 |
-
return Math.min(minSpacing / ratio, length);
|
11973 |
-
}
|
11974 |
-
class LinearScaleBase extends Scale {
|
11975 |
-
constructor(cfg) {
|
11976 |
-
super(cfg);
|
11977 |
-
this.start = undefined;
|
11978 |
-
this.end = undefined;
|
11979 |
-
this._startValue = undefined;
|
11980 |
-
this._endValue = undefined;
|
11981 |
-
this._valueRange = 0;
|
11982 |
-
}
|
11983 |
-
parse(raw, index) {
|
11984 |
-
if (isNullOrUndef(raw)) {
|
11985 |
-
return null;
|
11986 |
-
}
|
11987 |
-
if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {
|
11988 |
-
return null;
|
11989 |
-
}
|
11990 |
-
return +raw;
|
11991 |
-
}
|
11992 |
-
handleTickRangeOptions() {
|
11993 |
-
const {beginAtZero} = this.options;
|
11994 |
-
const {minDefined, maxDefined} = this.getUserBounds();
|
11995 |
-
let {min, max} = this;
|
11996 |
-
const setMin = v => (min = minDefined ? min : v);
|
11997 |
-
const setMax = v => (max = maxDefined ? max : v);
|
11998 |
-
if (beginAtZero) {
|
11999 |
-
const minSign = sign(min);
|
12000 |
-
const maxSign = sign(max);
|
12001 |
-
if (minSign < 0 && maxSign < 0) {
|
12002 |
-
setMax(0);
|
12003 |
-
} else if (minSign > 0 && maxSign > 0) {
|
12004 |
-
setMin(0);
|
12005 |
-
}
|
12006 |
-
}
|
12007 |
-
if (min === max) {
|
12008 |
-
let offset = 1;
|
12009 |
-
if (max >= Number.MAX_SAFE_INTEGER || min <= Number.MIN_SAFE_INTEGER) {
|
12010 |
-
offset = Math.abs(max * 0.05);
|
12011 |
-
}
|
12012 |
-
setMax(max + offset);
|
12013 |
-
if (!beginAtZero) {
|
12014 |
-
setMin(min - offset);
|
12015 |
-
}
|
12016 |
-
}
|
12017 |
-
this.min = min;
|
12018 |
-
this.max = max;
|
12019 |
-
}
|
12020 |
-
getTickLimit() {
|
12021 |
-
const tickOpts = this.options.ticks;
|
12022 |
-
let {maxTicksLimit, stepSize} = tickOpts;
|
12023 |
-
let maxTicks;
|
12024 |
-
if (stepSize) {
|
12025 |
-
maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;
|
12026 |
-
if (maxTicks > 1000) {
|
12027 |
-
console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);
|
12028 |
-
maxTicks = 1000;
|
12029 |
-
}
|
12030 |
-
} else {
|
12031 |
-
maxTicks = this.computeTickLimit();
|
12032 |
-
maxTicksLimit = maxTicksLimit || 11;
|
12033 |
-
}
|
12034 |
-
if (maxTicksLimit) {
|
12035 |
-
maxTicks = Math.min(maxTicksLimit, maxTicks);
|
12036 |
-
}
|
12037 |
-
return maxTicks;
|
12038 |
-
}
|
12039 |
-
computeTickLimit() {
|
12040 |
-
return Number.POSITIVE_INFINITY;
|
12041 |
-
}
|
12042 |
-
buildTicks() {
|
12043 |
-
const opts = this.options;
|
12044 |
-
const tickOpts = opts.ticks;
|
12045 |
-
let maxTicks = this.getTickLimit();
|
12046 |
-
maxTicks = Math.max(2, maxTicks);
|
12047 |
-
const numericGeneratorOptions = {
|
12048 |
-
maxTicks,
|
12049 |
-
bounds: opts.bounds,
|
12050 |
-
min: opts.min,
|
12051 |
-
max: opts.max,
|
12052 |
-
precision: tickOpts.precision,
|
12053 |
-
step: tickOpts.stepSize,
|
12054 |
-
count: tickOpts.count,
|
12055 |
-
maxDigits: this._maxDigits(),
|
12056 |
-
horizontal: this.isHorizontal(),
|
12057 |
-
minRotation: tickOpts.minRotation || 0,
|
12058 |
-
includeBounds: tickOpts.includeBounds !== false
|
12059 |
-
};
|
12060 |
-
const dataRange = this._range || this;
|
12061 |
-
const ticks = generateTicks$1(numericGeneratorOptions, dataRange);
|
12062 |
-
if (opts.bounds === 'ticks') {
|
12063 |
-
_setMinAndMaxByKey(ticks, this, 'value');
|
12064 |
-
}
|
12065 |
-
if (opts.reverse) {
|
12066 |
-
ticks.reverse();
|
12067 |
-
this.start = this.max;
|
12068 |
-
this.end = this.min;
|
12069 |
-
} else {
|
12070 |
-
this.start = this.min;
|
12071 |
-
this.end = this.max;
|
12072 |
-
}
|
12073 |
-
return ticks;
|
12074 |
-
}
|
12075 |
-
configure() {
|
12076 |
-
const ticks = this.ticks;
|
12077 |
-
let start = this.min;
|
12078 |
-
let end = this.max;
|
12079 |
-
super.configure();
|
12080 |
-
if (this.options.offset && ticks.length) {
|
12081 |
-
const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;
|
12082 |
-
start -= offset;
|
12083 |
-
end += offset;
|
12084 |
-
}
|
12085 |
-
this._startValue = start;
|
12086 |
-
this._endValue = end;
|
12087 |
-
this._valueRange = end - start;
|
12088 |
-
}
|
12089 |
-
getLabelForValue(value) {
|
12090 |
-
return formatNumber(value, this.chart.options.locale, this.options.ticks.format);
|
12091 |
-
}
|
12092 |
-
}
|
12093 |
-
|
12094 |
-
class LinearScale extends LinearScaleBase {
|
12095 |
-
determineDataLimits() {
|
12096 |
-
const {min, max} = this.getMinMax(true);
|
12097 |
-
this.min = isNumberFinite(min) ? min : 0;
|
12098 |
-
this.max = isNumberFinite(max) ? max : 1;
|
12099 |
-
this.handleTickRangeOptions();
|
12100 |
-
}
|
12101 |
-
computeTickLimit() {
|
12102 |
-
const horizontal = this.isHorizontal();
|
12103 |
-
const length = horizontal ? this.width : this.height;
|
12104 |
-
const minRotation = toRadians(this.options.ticks.minRotation);
|
12105 |
-
const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;
|
12106 |
-
const tickFont = this._resolveTickFontOptions(0);
|
12107 |
-
return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));
|
12108 |
-
}
|
12109 |
-
getPixelForValue(value) {
|
12110 |
-
return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);
|
12111 |
-
}
|
12112 |
-
getValueForPixel(pixel) {
|
12113 |
-
return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;
|
12114 |
-
}
|
12115 |
-
}
|
12116 |
-
LinearScale.id = 'linear';
|
12117 |
-
LinearScale.defaults = {
|
12118 |
-
ticks: {
|
12119 |
-
callback: Ticks.formatters.numeric
|
12120 |
-
}
|
12121 |
-
};
|
12122 |
-
|
12123 |
-
function isMajor(tickVal) {
|
12124 |
-
const remain = tickVal / (Math.pow(10, Math.floor(log10(tickVal))));
|
12125 |
-
return remain === 1;
|
12126 |
-
}
|
12127 |
-
function generateTicks(generationOptions, dataRange) {
|
12128 |
-
const endExp = Math.floor(log10(dataRange.max));
|
12129 |
-
const endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));
|
12130 |
-
const ticks = [];
|
12131 |
-
let tickVal = finiteOrDefault(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));
|
12132 |
-
let exp = Math.floor(log10(tickVal));
|
12133 |
-
let significand = Math.floor(tickVal / Math.pow(10, exp));
|
12134 |
-
let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;
|
12135 |
-
do {
|
12136 |
-
ticks.push({value: tickVal, major: isMajor(tickVal)});
|
12137 |
-
++significand;
|
12138 |
-
if (significand === 10) {
|
12139 |
-
significand = 1;
|
12140 |
-
++exp;
|
12141 |
-
precision = exp >= 0 ? 1 : precision;
|
12142 |
-
}
|
12143 |
-
tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;
|
12144 |
-
} while (exp < endExp || (exp === endExp && significand < endSignificand));
|
12145 |
-
const lastTick = finiteOrDefault(generationOptions.max, tickVal);
|
12146 |
-
ticks.push({value: lastTick, major: isMajor(tickVal)});
|
12147 |
-
return ticks;
|
12148 |
-
}
|
12149 |
-
class LogarithmicScale extends Scale {
|
12150 |
-
constructor(cfg) {
|
12151 |
-
super(cfg);
|
12152 |
-
this.start = undefined;
|
12153 |
-
this.end = undefined;
|
12154 |
-
this._startValue = undefined;
|
12155 |
-
this._valueRange = 0;
|
12156 |
-
}
|
12157 |
-
parse(raw, index) {
|
12158 |
-
const value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);
|
12159 |
-
if (value === 0) {
|
12160 |
-
this._zero = true;
|
12161 |
-
return undefined;
|
12162 |
-
}
|
12163 |
-
return isNumberFinite(value) && value > 0 ? value : null;
|
12164 |
-
}
|
12165 |
-
determineDataLimits() {
|
12166 |
-
const {min, max} = this.getMinMax(true);
|
12167 |
-
this.min = isNumberFinite(min) ? Math.max(0, min) : null;
|
12168 |
-
this.max = isNumberFinite(max) ? Math.max(0, max) : null;
|
12169 |
-
if (this.options.beginAtZero) {
|
12170 |
-
this._zero = true;
|
12171 |
-
}
|
12172 |
-
this.handleTickRangeOptions();
|
12173 |
-
}
|
12174 |
-
handleTickRangeOptions() {
|
12175 |
-
const {minDefined, maxDefined} = this.getUserBounds();
|
12176 |
-
let min = this.min;
|
12177 |
-
let max = this.max;
|
12178 |
-
const setMin = v => (min = minDefined ? min : v);
|
12179 |
-
const setMax = v => (max = maxDefined ? max : v);
|
12180 |
-
const exp = (v, m) => Math.pow(10, Math.floor(log10(v)) + m);
|
12181 |
-
if (min === max) {
|
12182 |
-
if (min <= 0) {
|
12183 |
-
setMin(1);
|
12184 |
-
setMax(10);
|
12185 |
-
} else {
|
12186 |
-
setMin(exp(min, -1));
|
12187 |
-
setMax(exp(max, +1));
|
12188 |
-
}
|
12189 |
-
}
|
12190 |
-
if (min <= 0) {
|
12191 |
-
setMin(exp(max, -1));
|
12192 |
-
}
|
12193 |
-
if (max <= 0) {
|
12194 |
-
setMax(exp(min, +1));
|
12195 |
-
}
|
12196 |
-
if (this._zero && this.min !== this._suggestedMin && min === exp(this.min, 0)) {
|
12197 |
-
setMin(exp(min, -1));
|
12198 |
-
}
|
12199 |
-
this.min = min;
|
12200 |
-
this.max = max;
|
12201 |
-
}
|
12202 |
-
buildTicks() {
|
12203 |
-
const opts = this.options;
|
12204 |
-
const generationOptions = {
|
12205 |
-
min: this._userMin,
|
12206 |
-
max: this._userMax
|
12207 |
-
};
|
12208 |
-
const ticks = generateTicks(generationOptions, this);
|
12209 |
-
if (opts.bounds === 'ticks') {
|
12210 |
-
_setMinAndMaxByKey(ticks, this, 'value');
|
12211 |
-
}
|
12212 |
-
if (opts.reverse) {
|
12213 |
-
ticks.reverse();
|
12214 |
-
this.start = this.max;
|
12215 |
-
this.end = this.min;
|
12216 |
-
} else {
|
12217 |
-
this.start = this.min;
|
12218 |
-
this.end = this.max;
|
12219 |
-
}
|
12220 |
-
return ticks;
|
12221 |
-
}
|
12222 |
-
getLabelForValue(value) {
|
12223 |
-
return value === undefined
|
12224 |
-
? '0'
|
12225 |
-
: formatNumber(value, this.chart.options.locale, this.options.ticks.format);
|
12226 |
-
}
|
12227 |
-
configure() {
|
12228 |
-
const start = this.min;
|
12229 |
-
super.configure();
|
12230 |
-
this._startValue = log10(start);
|
12231 |
-
this._valueRange = log10(this.max) - log10(start);
|
12232 |
-
}
|
12233 |
-
getPixelForValue(value) {
|
12234 |
-
if (value === undefined || value === 0) {
|
12235 |
-
value = this.min;
|
12236 |
-
}
|
12237 |
-
if (value === null || isNaN(value)) {
|
12238 |
-
return NaN;
|
12239 |
-
}
|
12240 |
-
return this.getPixelForDecimal(value === this.min
|
12241 |
-
? 0
|
12242 |
-
: (log10(value) - this._startValue) / this._valueRange);
|
12243 |
-
}
|
12244 |
-
getValueForPixel(pixel) {
|
12245 |
-
const decimal = this.getDecimalForPixel(pixel);
|
12246 |
-
return Math.pow(10, this._startValue + decimal * this._valueRange);
|
12247 |
-
}
|
12248 |
-
}
|
12249 |
-
LogarithmicScale.id = 'logarithmic';
|
12250 |
-
LogarithmicScale.defaults = {
|
12251 |
-
ticks: {
|
12252 |
-
callback: Ticks.formatters.logarithmic,
|
12253 |
-
major: {
|
12254 |
-
enabled: true
|
12255 |
-
}
|
12256 |
-
}
|
12257 |
-
};
|
12258 |
-
|
12259 |
-
function getTickBackdropHeight(opts) {
|
12260 |
-
const tickOpts = opts.ticks;
|
12261 |
-
if (tickOpts.display && opts.display) {
|
12262 |
-
const padding = toPadding(tickOpts.backdropPadding);
|
12263 |
-
return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;
|
12264 |
-
}
|
12265 |
-
return 0;
|
12266 |
-
}
|
12267 |
-
function measureLabelSize(ctx, font, label) {
|
12268 |
-
label = isArray(label) ? label : [label];
|
12269 |
-
return {
|
12270 |
-
w: _longestText(ctx, font.string, label),
|
12271 |
-
h: label.length * font.lineHeight
|
12272 |
-
};
|
12273 |
-
}
|
12274 |
-
function determineLimits(angle, pos, size, min, max) {
|
12275 |
-
if (angle === min || angle === max) {
|
12276 |
-
return {
|
12277 |
-
start: pos - (size / 2),
|
12278 |
-
end: pos + (size / 2)
|
12279 |
-
};
|
12280 |
-
} else if (angle < min || angle > max) {
|
12281 |
-
return {
|
12282 |
-
start: pos - size,
|
12283 |
-
end: pos
|
12284 |
-
};
|
12285 |
-
}
|
12286 |
-
return {
|
12287 |
-
start: pos,
|
12288 |
-
end: pos + size
|
12289 |
-
};
|
12290 |
-
}
|
12291 |
-
function fitWithPointLabels(scale) {
|
12292 |
-
const furthestLimits = {
|
12293 |
-
l: 0,
|
12294 |
-
r: scale.width,
|
12295 |
-
t: 0,
|
12296 |
-
b: scale.height - scale.paddingTop
|
12297 |
-
};
|
12298 |
-
const furthestAngles = {};
|
12299 |
-
const labelSizes = [];
|
12300 |
-
const padding = [];
|
12301 |
-
const valueCount = scale.getLabels().length;
|
12302 |
-
for (let i = 0; i < valueCount; i++) {
|
12303 |
-
const opts = scale.options.pointLabels.setContext(scale.getPointLabelContext(i));
|
12304 |
-
padding[i] = opts.padding;
|
12305 |
-
const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i]);
|
12306 |
-
const plFont = toFont(opts.font);
|
12307 |
-
const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);
|
12308 |
-
labelSizes[i] = textSize;
|
12309 |
-
const angleRadians = scale.getIndexAngle(i);
|
12310 |
-
const angle = toDegrees(angleRadians);
|
12311 |
-
const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);
|
12312 |
-
const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);
|
12313 |
-
if (hLimits.start < furthestLimits.l) {
|
12314 |
-
furthestLimits.l = hLimits.start;
|
12315 |
-
furthestAngles.l = angleRadians;
|
12316 |
-
}
|
12317 |
-
if (hLimits.end > furthestLimits.r) {
|
12318 |
-
furthestLimits.r = hLimits.end;
|
12319 |
-
furthestAngles.r = angleRadians;
|
12320 |
-
}
|
12321 |
-
if (vLimits.start < furthestLimits.t) {
|
12322 |
-
furthestLimits.t = vLimits.start;
|
12323 |
-
furthestAngles.t = angleRadians;
|
12324 |
-
}
|
12325 |
-
if (vLimits.end > furthestLimits.b) {
|
12326 |
-
furthestLimits.b = vLimits.end;
|
12327 |
-
furthestAngles.b = angleRadians;
|
12328 |
-
}
|
12329 |
-
}
|
12330 |
-
scale._setReductions(scale.drawingArea, furthestLimits, furthestAngles);
|
12331 |
-
scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);
|
12332 |
-
}
|
12333 |
-
function buildPointLabelItems(scale, labelSizes, padding) {
|
12334 |
-
const items = [];
|
12335 |
-
const valueCount = scale.getLabels().length;
|
12336 |
-
const opts = scale.options;
|
12337 |
-
const tickBackdropHeight = getTickBackdropHeight(opts);
|
12338 |
-
const outerDistance = scale.getDistanceFromCenterForValue(opts.ticks.reverse ? scale.min : scale.max);
|
12339 |
-
for (let i = 0; i < valueCount; i++) {
|
12340 |
-
const extra = (i === 0 ? tickBackdropHeight / 2 : 0);
|
12341 |
-
const pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + padding[i]);
|
12342 |
-
const angle = toDegrees(scale.getIndexAngle(i));
|
12343 |
-
const size = labelSizes[i];
|
12344 |
-
const y = yForAngle(pointLabelPosition.y, size.h, angle);
|
12345 |
-
const textAlign = getTextAlignForAngle(angle);
|
12346 |
-
const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);
|
12347 |
-
items.push({
|
12348 |
-
x: pointLabelPosition.x,
|
12349 |
-
y,
|
12350 |
-
textAlign,
|
12351 |
-
left,
|
12352 |
-
top: y,
|
12353 |
-
right: left + size.w,
|
12354 |
-
bottom: y + size.h
|
12355 |
-
});
|
12356 |
-
}
|
12357 |
-
return items;
|
12358 |
-
}
|
12359 |
-
function getTextAlignForAngle(angle) {
|
12360 |
-
if (angle === 0 || angle === 180) {
|
12361 |
-
return 'center';
|
12362 |
-
} else if (angle < 180) {
|
12363 |
-
return 'left';
|
12364 |
-
}
|
12365 |
-
return 'right';
|
12366 |
-
}
|
12367 |
-
function leftForTextAlign(x, w, align) {
|
12368 |
-
if (align === 'right') {
|
12369 |
-
x -= w;
|
12370 |
-
} else if (align === 'center') {
|
12371 |
-
x -= (w / 2);
|
12372 |
-
}
|
12373 |
-
return x;
|
12374 |
-
}
|
12375 |
-
function yForAngle(y, h, angle) {
|
12376 |
-
if (angle === 90 || angle === 270) {
|
12377 |
-
y -= (h / 2);
|
12378 |
-
} else if (angle > 270 || angle < 90) {
|
12379 |
-
y -= h;
|
12380 |
-
}
|
12381 |
-
return y;
|
12382 |
-
}
|
12383 |
-
function drawPointLabels(scale, labelCount) {
|
12384 |
-
const {ctx, options: {pointLabels}} = scale;
|
12385 |
-
for (let i = labelCount - 1; i >= 0; i--) {
|
12386 |
-
const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));
|
12387 |
-
const plFont = toFont(optsAtIndex.font);
|
12388 |
-
const {x, y, textAlign, left, top, right, bottom} = scale._pointLabelItems[i];
|
12389 |
-
const {backdropColor} = optsAtIndex;
|
12390 |
-
if (!isNullOrUndef(backdropColor)) {
|
12391 |
-
const padding = toPadding(optsAtIndex.backdropPadding);
|
12392 |
-
ctx.fillStyle = backdropColor;
|
12393 |
-
ctx.fillRect(left - padding.left, top - padding.top, right - left + padding.width, bottom - top + padding.height);
|
12394 |
-
}
|
12395 |
-
renderText(
|
12396 |
-
ctx,
|
12397 |
-
scale._pointLabels[i],
|
12398 |
-
x,
|
12399 |
-
y + (plFont.lineHeight / 2),
|
12400 |
-
plFont,
|
12401 |
-
{
|
12402 |
-
color: optsAtIndex.color,
|
12403 |
-
textAlign: textAlign,
|
12404 |
-
textBaseline: 'middle'
|
12405 |
-
}
|
12406 |
-
);
|
12407 |
-
}
|
12408 |
-
}
|
12409 |
-
function pathRadiusLine(scale, radius, circular, labelCount) {
|
12410 |
-
const {ctx} = scale;
|
12411 |
-
if (circular) {
|
12412 |
-
ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);
|
12413 |
-
} else {
|
12414 |
-
let pointPosition = scale.getPointPosition(0, radius);
|
12415 |
-
ctx.moveTo(pointPosition.x, pointPosition.y);
|
12416 |
-
for (let i = 1; i < labelCount; i++) {
|
12417 |
-
pointPosition = scale.getPointPosition(i, radius);
|
12418 |
-
ctx.lineTo(pointPosition.x, pointPosition.y);
|
12419 |
-
}
|
12420 |
-
}
|
12421 |
-
}
|
12422 |
-
function drawRadiusLine(scale, gridLineOpts, radius, labelCount) {
|
12423 |
-
const ctx = scale.ctx;
|
12424 |
-
const circular = gridLineOpts.circular;
|
12425 |
-
const {color, lineWidth} = gridLineOpts;
|
12426 |
-
if ((!circular && !labelCount) || !color || !lineWidth || radius < 0) {
|
12427 |
-
return;
|
12428 |
-
}
|
12429 |
-
ctx.save();
|
12430 |
-
ctx.strokeStyle = color;
|
12431 |
-
ctx.lineWidth = lineWidth;
|
12432 |
-
ctx.setLineDash(gridLineOpts.borderDash);
|
12433 |
-
ctx.lineDashOffset = gridLineOpts.borderDashOffset;
|
12434 |
-
ctx.beginPath();
|
12435 |
-
pathRadiusLine(scale, radius, circular, labelCount);
|
12436 |
-
ctx.closePath();
|
12437 |
-
ctx.stroke();
|
12438 |
-
ctx.restore();
|
12439 |
-
}
|
12440 |
-
function numberOrZero(param) {
|
12441 |
-
return isNumber(param) ? param : 0;
|
12442 |
-
}
|
12443 |
-
function createPointLabelContext(parent, index, label) {
|
12444 |
-
return createContext(parent, {
|
12445 |
-
label,
|
12446 |
-
index,
|
12447 |
-
type: 'pointLabel'
|
12448 |
-
});
|
12449 |
-
}
|
12450 |
-
class RadialLinearScale extends LinearScaleBase {
|
12451 |
-
constructor(cfg) {
|
12452 |
-
super(cfg);
|
12453 |
-
this.xCenter = undefined;
|
12454 |
-
this.yCenter = undefined;
|
12455 |
-
this.drawingArea = undefined;
|
12456 |
-
this._pointLabels = [];
|
12457 |
-
this._pointLabelItems = [];
|
12458 |
-
}
|
12459 |
-
setDimensions() {
|
12460 |
-
this.width = this.maxWidth;
|
12461 |
-
this.height = this.maxHeight;
|
12462 |
-
this.paddingTop = getTickBackdropHeight(this.options) / 2;
|
12463 |
-
this.xCenter = Math.floor(this.width / 2);
|
12464 |
-
this.yCenter = Math.floor((this.height - this.paddingTop) / 2);
|
12465 |
-
this.drawingArea = Math.min(this.height - this.paddingTop, this.width) / 2;
|
12466 |
-
}
|
12467 |
-
determineDataLimits() {
|
12468 |
-
const {min, max} = this.getMinMax(false);
|
12469 |
-
this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;
|
12470 |
-
this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;
|
12471 |
-
this.handleTickRangeOptions();
|
12472 |
-
}
|
12473 |
-
computeTickLimit() {
|
12474 |
-
return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));
|
12475 |
-
}
|
12476 |
-
generateTickLabels(ticks) {
|
12477 |
-
LinearScaleBase.prototype.generateTickLabels.call(this, ticks);
|
12478 |
-
this._pointLabels = this.getLabels().map((value, index) => {
|
12479 |
-
const label = callback(this.options.pointLabels.callback, [value, index], this);
|
12480 |
-
return label || label === 0 ? label : '';
|
12481 |
-
});
|
12482 |
-
}
|
12483 |
-
fit() {
|
12484 |
-
const opts = this.options;
|
12485 |
-
if (opts.display && opts.pointLabels.display) {
|
12486 |
-
fitWithPointLabels(this);
|
12487 |
-
} else {
|
12488 |
-
this.setCenterPoint(0, 0, 0, 0);
|
12489 |
-
}
|
12490 |
-
}
|
12491 |
-
_setReductions(largestPossibleRadius, furthestLimits, furthestAngles) {
|
12492 |
-
let radiusReductionLeft = furthestLimits.l / Math.sin(furthestAngles.l);
|
12493 |
-
let radiusReductionRight = Math.max(furthestLimits.r - this.width, 0) / Math.sin(furthestAngles.r);
|
12494 |
-
let radiusReductionTop = -furthestLimits.t / Math.cos(furthestAngles.t);
|
12495 |
-
let radiusReductionBottom = -Math.max(furthestLimits.b - (this.height - this.paddingTop), 0) / Math.cos(furthestAngles.b);
|
12496 |
-
radiusReductionLeft = numberOrZero(radiusReductionLeft);
|
12497 |
-
radiusReductionRight = numberOrZero(radiusReductionRight);
|
12498 |
-
radiusReductionTop = numberOrZero(radiusReductionTop);
|
12499 |
-
radiusReductionBottom = numberOrZero(radiusReductionBottom);
|
12500 |
-
this.drawingArea = Math.max(largestPossibleRadius / 2, Math.min(
|
12501 |
-
Math.floor(largestPossibleRadius - (radiusReductionLeft + radiusReductionRight) / 2),
|
12502 |
-
Math.floor(largestPossibleRadius - (radiusReductionTop + radiusReductionBottom) / 2)));
|
12503 |
-
this.setCenterPoint(radiusReductionLeft, radiusReductionRight, radiusReductionTop, radiusReductionBottom);
|
12504 |
-
}
|
12505 |
-
setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {
|
12506 |
-
const maxRight = this.width - rightMovement - this.drawingArea;
|
12507 |
-
const maxLeft = leftMovement + this.drawingArea;
|
12508 |
-
const maxTop = topMovement + this.drawingArea;
|
12509 |
-
const maxBottom = (this.height - this.paddingTop) - bottomMovement - this.drawingArea;
|
12510 |
-
this.xCenter = Math.floor(((maxLeft + maxRight) / 2) + this.left);
|
12511 |
-
this.yCenter = Math.floor(((maxTop + maxBottom) / 2) + this.top + this.paddingTop);
|
12512 |
-
}
|
12513 |
-
getIndexAngle(index) {
|
12514 |
-
const angleMultiplier = TAU / this.getLabels().length;
|
12515 |
-
const startAngle = this.options.startAngle || 0;
|
12516 |
-
return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));
|
12517 |
-
}
|
12518 |
-
getDistanceFromCenterForValue(value) {
|
12519 |
-
if (isNullOrUndef(value)) {
|
12520 |
-
return NaN;
|
12521 |
-
}
|
12522 |
-
const scalingFactor = this.drawingArea / (this.max - this.min);
|
12523 |
-
if (this.options.reverse) {
|
12524 |
-
return (this.max - value) * scalingFactor;
|
12525 |
-
}
|
12526 |
-
return (value - this.min) * scalingFactor;
|
12527 |
-
}
|
12528 |
-
getValueForDistanceFromCenter(distance) {
|
12529 |
-
if (isNullOrUndef(distance)) {
|
12530 |
-
return NaN;
|
12531 |
-
}
|
12532 |
-
const scaledDistance = distance / (this.drawingArea / (this.max - this.min));
|
12533 |
-
return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;
|
12534 |
-
}
|
12535 |
-
getPointLabelContext(index) {
|
12536 |
-
const pointLabels = this._pointLabels || [];
|
12537 |
-
if (index >= 0 && index < pointLabels.length) {
|
12538 |
-
const pointLabel = pointLabels[index];
|
12539 |
-
return createPointLabelContext(this.getContext(), index, pointLabel);
|
12540 |
-
}
|
12541 |
-
}
|
12542 |
-
getPointPosition(index, distanceFromCenter) {
|
12543 |
-
const angle = this.getIndexAngle(index) - HALF_PI;
|
12544 |
-
return {
|
12545 |
-
x: Math.cos(angle) * distanceFromCenter + this.xCenter,
|
12546 |
-
y: Math.sin(angle) * distanceFromCenter + this.yCenter,
|
12547 |
-
angle
|
12548 |
-
};
|
12549 |
-
}
|
12550 |
-
getPointPositionForValue(index, value) {
|
12551 |
-
return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));
|
12552 |
-
}
|
12553 |
-
getBasePosition(index) {
|
12554 |
-
return this.getPointPositionForValue(index || 0, this.getBaseValue());
|
12555 |
-
}
|
12556 |
-
getPointLabelPosition(index) {
|
12557 |
-
const {left, top, right, bottom} = this._pointLabelItems[index];
|
12558 |
-
return {
|
12559 |
-
left,
|
12560 |
-
top,
|
12561 |
-
right,
|
12562 |
-
bottom,
|
12563 |
-
};
|
12564 |
-
}
|
12565 |
-
drawBackground() {
|
12566 |
-
const {backgroundColor, grid: {circular}} = this.options;
|
12567 |
-
if (backgroundColor) {
|
12568 |
-
const ctx = this.ctx;
|
12569 |
-
ctx.save();
|
12570 |
-
ctx.beginPath();
|
12571 |
-
pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this.getLabels().length);
|
12572 |
-
ctx.closePath();
|
12573 |
-
ctx.fillStyle = backgroundColor;
|
12574 |
-
ctx.fill();
|
12575 |
-
ctx.restore();
|
12576 |
-
}
|
12577 |
-
}
|
12578 |
-
drawGrid() {
|
12579 |
-
const ctx = this.ctx;
|
12580 |
-
const opts = this.options;
|
12581 |
-
const {angleLines, grid} = opts;
|
12582 |
-
const labelCount = this.getLabels().length;
|
12583 |
-
let i, offset, position;
|
12584 |
-
if (opts.pointLabels.display) {
|
12585 |
-
drawPointLabels(this, labelCount);
|
12586 |
-
}
|
12587 |
-
if (grid.display) {
|
12588 |
-
this.ticks.forEach((tick, index) => {
|
12589 |
-
if (index !== 0) {
|
12590 |
-
offset = this.getDistanceFromCenterForValue(tick.value);
|
12591 |
-
const optsAtIndex = grid.setContext(this.getContext(index - 1));
|
12592 |
-
drawRadiusLine(this, optsAtIndex, offset, labelCount);
|
12593 |
-
}
|
12594 |
-
});
|
12595 |
-
}
|
12596 |
-
if (angleLines.display) {
|
12597 |
-
ctx.save();
|
12598 |
-
for (i = this.getLabels().length - 1; i >= 0; i--) {
|
12599 |
-
const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));
|
12600 |
-
const {color, lineWidth} = optsAtIndex;
|
12601 |
-
if (!lineWidth || !color) {
|
12602 |
-
continue;
|
12603 |
-
}
|
12604 |
-
ctx.lineWidth = lineWidth;
|
12605 |
-
ctx.strokeStyle = color;
|
12606 |
-
ctx.setLineDash(optsAtIndex.borderDash);
|
12607 |
-
ctx.lineDashOffset = optsAtIndex.borderDashOffset;
|
12608 |
-
offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);
|
12609 |
-
position = this.getPointPosition(i, offset);
|
12610 |
-
ctx.beginPath();
|
12611 |
-
ctx.moveTo(this.xCenter, this.yCenter);
|
12612 |
-
ctx.lineTo(position.x, position.y);
|
12613 |
-
ctx.stroke();
|
12614 |
-
}
|
12615 |
-
ctx.restore();
|
12616 |
-
}
|
12617 |
-
}
|
12618 |
-
drawBorder() {}
|
12619 |
-
drawLabels() {
|
12620 |
-
const ctx = this.ctx;
|
12621 |
-
const opts = this.options;
|
12622 |
-
const tickOpts = opts.ticks;
|
12623 |
-
if (!tickOpts.display) {
|
12624 |
-
return;
|
12625 |
-
}
|
12626 |
-
const startAngle = this.getIndexAngle(0);
|
12627 |
-
let offset, width;
|
12628 |
-
ctx.save();
|
12629 |
-
ctx.translate(this.xCenter, this.yCenter);
|
12630 |
-
ctx.rotate(startAngle);
|
12631 |
-
ctx.textAlign = 'center';
|
12632 |
-
ctx.textBaseline = 'middle';
|
12633 |
-
this.ticks.forEach((tick, index) => {
|
12634 |
-
if (index === 0 && !opts.reverse) {
|
12635 |
-
return;
|
12636 |
-
}
|
12637 |
-
const optsAtIndex = tickOpts.setContext(this.getContext(index));
|
12638 |
-
const tickFont = toFont(optsAtIndex.font);
|
12639 |
-
offset = this.getDistanceFromCenterForValue(this.ticks[index].value);
|
12640 |
-
if (optsAtIndex.showLabelBackdrop) {
|
12641 |
-
ctx.font = tickFont.string;
|
12642 |
-
width = ctx.measureText(tick.label).width;
|
12643 |
-
ctx.fillStyle = optsAtIndex.backdropColor;
|
12644 |
-
const padding = toPadding(optsAtIndex.backdropPadding);
|
12645 |
-
ctx.fillRect(
|
12646 |
-
-width / 2 - padding.left,
|
12647 |
-
-offset - tickFont.size / 2 - padding.top,
|
12648 |
-
width + padding.width,
|
12649 |
-
tickFont.size + padding.height
|
12650 |
-
);
|
12651 |
-
}
|
12652 |
-
renderText(ctx, tick.label, 0, -offset, tickFont, {
|
12653 |
-
color: optsAtIndex.color,
|
12654 |
-
});
|
12655 |
-
});
|
12656 |
-
ctx.restore();
|
12657 |
-
}
|
12658 |
-
drawTitle() {}
|
12659 |
-
}
|
12660 |
-
RadialLinearScale.id = 'radialLinear';
|
12661 |
-
RadialLinearScale.defaults = {
|
12662 |
-
display: true,
|
12663 |
-
animate: true,
|
12664 |
-
position: 'chartArea',
|
12665 |
-
angleLines: {
|
12666 |
-
display: true,
|
12667 |
-
lineWidth: 1,
|
12668 |
-
borderDash: [],
|
12669 |
-
borderDashOffset: 0.0
|
12670 |
-
},
|
12671 |
-
grid: {
|
12672 |
-
circular: false
|
12673 |
-
},
|
12674 |
-
startAngle: 0,
|
12675 |
-
ticks: {
|
12676 |
-
showLabelBackdrop: true,
|
12677 |
-
callback: Ticks.formatters.numeric
|
12678 |
-
},
|
12679 |
-
pointLabels: {
|
12680 |
-
backdropColor: undefined,
|
12681 |
-
backdropPadding: 2,
|
12682 |
-
display: true,
|
12683 |
-
font: {
|
12684 |
-
size: 10
|
12685 |
-
},
|
12686 |
-
callback(label) {
|
12687 |
-
return label;
|
12688 |
-
},
|
12689 |
-
padding: 5
|
12690 |
-
}
|
12691 |
-
};
|
12692 |
-
RadialLinearScale.defaultRoutes = {
|
12693 |
-
'angleLines.color': 'borderColor',
|
12694 |
-
'pointLabels.color': 'color',
|
12695 |
-
'ticks.color': 'color'
|
12696 |
-
};
|
12697 |
-
RadialLinearScale.descriptors = {
|
12698 |
-
angleLines: {
|
12699 |
-
_fallback: 'grid'
|
12700 |
-
}
|
12701 |
-
};
|
12702 |
-
|
12703 |
-
const INTERVALS = {
|
12704 |
-
millisecond: {common: true, size: 1, steps: 1000},
|
12705 |
-
second: {common: true, size: 1000, steps: 60},
|
12706 |
-
minute: {common: true, size: 60000, steps: 60},
|
12707 |
-
hour: {common: true, size: 3600000, steps: 24},
|
12708 |
-
day: {common: true, size: 86400000, steps: 30},
|
12709 |
-
week: {common: false, size: 604800000, steps: 4},
|
12710 |
-
month: {common: true, size: 2.628e9, steps: 12},
|
12711 |
-
quarter: {common: false, size: 7.884e9, steps: 4},
|
12712 |
-
year: {common: true, size: 3.154e10}
|
12713 |
-
};
|
12714 |
-
const UNITS = (Object.keys(INTERVALS));
|
12715 |
-
function sorter(a, b) {
|
12716 |
-
return a - b;
|
12717 |
-
}
|
12718 |
-
function parse(scale, input) {
|
12719 |
-
if (isNullOrUndef(input)) {
|
12720 |
-
return null;
|
12721 |
-
}
|
12722 |
-
const adapter = scale._adapter;
|
12723 |
-
const {parser, round, isoWeekday} = scale._parseOpts;
|
12724 |
-
let value = input;
|
12725 |
-
if (typeof parser === 'function') {
|
12726 |
-
value = parser(value);
|
12727 |
-
}
|
12728 |
-
if (!isNumberFinite(value)) {
|
12729 |
-
value = typeof parser === 'string'
|
12730 |
-
? adapter.parse(value, parser)
|
12731 |
-
: adapter.parse(value);
|
12732 |
-
}
|
12733 |
-
if (value === null) {
|
12734 |
-
return null;
|
12735 |
-
}
|
12736 |
-
if (round) {
|
12737 |
-
value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true)
|
12738 |
-
? adapter.startOf(value, 'isoWeek', isoWeekday)
|
12739 |
-
: adapter.startOf(value, round);
|
12740 |
-
}
|
12741 |
-
return +value;
|
12742 |
-
}
|
12743 |
-
function determineUnitForAutoTicks(minUnit, min, max, capacity) {
|
12744 |
-
const ilen = UNITS.length;
|
12745 |
-
for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {
|
12746 |
-
const interval = INTERVALS[UNITS[i]];
|
12747 |
-
const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;
|
12748 |
-
if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {
|
12749 |
-
return UNITS[i];
|
12750 |
-
}
|
12751 |
-
}
|
12752 |
-
return UNITS[ilen - 1];
|
12753 |
-
}
|
12754 |
-
function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
|
12755 |
-
for (let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {
|
12756 |
-
const unit = UNITS[i];
|
12757 |
-
if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {
|
12758 |
-
return unit;
|
12759 |
-
}
|
12760 |
-
}
|
12761 |
-
return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];
|
12762 |
-
}
|
12763 |
-
function determineMajorUnit(unit) {
|
12764 |
-
for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {
|
12765 |
-
if (INTERVALS[UNITS[i]].common) {
|
12766 |
-
return UNITS[i];
|
12767 |
-
}
|
12768 |
-
}
|
12769 |
-
}
|
12770 |
-
function addTick(ticks, time, timestamps) {
|
12771 |
-
if (!timestamps) {
|
12772 |
-
ticks[time] = true;
|
12773 |
-
} else if (timestamps.length) {
|
12774 |
-
const {lo, hi} = _lookup(timestamps, time);
|
12775 |
-
const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];
|
12776 |
-
ticks[timestamp] = true;
|
12777 |
-
}
|
12778 |
-
}
|
12779 |
-
function setMajorTicks(scale, ticks, map, majorUnit) {
|
12780 |
-
const adapter = scale._adapter;
|
12781 |
-
const first = +adapter.startOf(ticks[0].value, majorUnit);
|
12782 |
-
const last = ticks[ticks.length - 1].value;
|
12783 |
-
let major, index;
|
12784 |
-
for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {
|
12785 |
-
index = map[major];
|
12786 |
-
if (index >= 0) {
|
12787 |
-
ticks[index].major = true;
|
12788 |
-
}
|
12789 |
-
}
|
12790 |
-
return ticks;
|
12791 |
-
}
|
12792 |
-
function ticksFromTimestamps(scale, values, majorUnit) {
|
12793 |
-
const ticks = [];
|
12794 |
-
const map = {};
|
12795 |
-
const ilen = values.length;
|
12796 |
-
let i, value;
|
12797 |
-
for (i = 0; i < ilen; ++i) {
|
12798 |
-
value = values[i];
|
12799 |
-
map[value] = i;
|
12800 |
-
ticks.push({
|
12801 |
-
value,
|
12802 |
-
major: false
|
12803 |
-
});
|
12804 |
-
}
|
12805 |
-
return (ilen === 0 || !majorUnit) ? ticks : setMajorTicks(scale, ticks, map, majorUnit);
|
12806 |
-
}
|
12807 |
-
class TimeScale extends Scale {
|
12808 |
-
constructor(props) {
|
12809 |
-
super(props);
|
12810 |
-
this._cache = {
|
12811 |
-
data: [],
|
12812 |
-
labels: [],
|
12813 |
-
all: []
|
12814 |
-
};
|
12815 |
-
this._unit = 'day';
|
12816 |
-
this._majorUnit = undefined;
|
12817 |
-
this._offsets = {};
|
12818 |
-
this._normalized = false;
|
12819 |
-
this._parseOpts = undefined;
|
12820 |
-
}
|
12821 |
-
init(scaleOpts, opts) {
|
12822 |
-
const time = scaleOpts.time || (scaleOpts.time = {});
|
12823 |
-
const adapter = this._adapter = new _adapters._date(scaleOpts.adapters.date);
|
12824 |
-
mergeIf(time.displayFormats, adapter.formats());
|
12825 |
-
this._parseOpts = {
|
12826 |
-
parser: time.parser,
|
12827 |
-
round: time.round,
|
12828 |
-
isoWeekday: time.isoWeekday
|
12829 |
-
};
|
12830 |
-
super.init(scaleOpts);
|
12831 |
-
this._normalized = opts.normalized;
|
12832 |
-
}
|
12833 |
-
parse(raw, index) {
|
12834 |
-
if (raw === undefined) {
|
12835 |
-
return null;
|
12836 |
-
}
|
12837 |
-
return parse(this, raw);
|
12838 |
-
}
|
12839 |
-
beforeLayout() {
|
12840 |
-
super.beforeLayout();
|
12841 |
-
this._cache = {
|
12842 |
-
data: [],
|
12843 |
-
labels: [],
|
12844 |
-
all: []
|
12845 |
-
};
|
12846 |
-
}
|
12847 |
-
determineDataLimits() {
|
12848 |
-
const options = this.options;
|
12849 |
-
const adapter = this._adapter;
|
12850 |
-
const unit = options.time.unit || 'day';
|
12851 |
-
let {min, max, minDefined, maxDefined} = this.getUserBounds();
|
12852 |
-
function _applyBounds(bounds) {
|
12853 |
-
if (!minDefined && !isNaN(bounds.min)) {
|
12854 |
-
min = Math.min(min, bounds.min);
|
12855 |
-
}
|
12856 |
-
if (!maxDefined && !isNaN(bounds.max)) {
|
12857 |
-
max = Math.max(max, bounds.max);
|
12858 |
-
}
|
12859 |
-
}
|
12860 |
-
if (!minDefined || !maxDefined) {
|
12861 |
-
_applyBounds(this._getLabelBounds());
|
12862 |
-
if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {
|
12863 |
-
_applyBounds(this.getMinMax(false));
|
12864 |
-
}
|
12865 |
-
}
|
12866 |
-
min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);
|
12867 |
-
max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;
|
12868 |
-
this.min = Math.min(min, max - 1);
|
12869 |
-
this.max = Math.max(min + 1, max);
|
12870 |
-
}
|
12871 |
-
_getLabelBounds() {
|
12872 |
-
const arr = this.getLabelTimestamps();
|
12873 |
-
let min = Number.POSITIVE_INFINITY;
|
12874 |
-
let max = Number.NEGATIVE_INFINITY;
|
12875 |
-
if (arr.length) {
|
12876 |
-
min = arr[0];
|
12877 |
-
max = arr[arr.length - 1];
|
12878 |
-
}
|
12879 |
-
return {min, max};
|
12880 |
-
}
|
12881 |
-
buildTicks() {
|
12882 |
-
const options = this.options;
|
12883 |
-
const timeOpts = options.time;
|
12884 |
-
const tickOpts = options.ticks;
|
12885 |
-
const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();
|
12886 |
-
if (options.bounds === 'ticks' && timestamps.length) {
|
12887 |
-
this.min = this._userMin || timestamps[0];
|
12888 |
-
this.max = this._userMax || timestamps[timestamps.length - 1];
|
12889 |
-
}
|
12890 |
-
const min = this.min;
|
12891 |
-
const max = this.max;
|
12892 |
-
const ticks = _filterBetween(timestamps, min, max);
|
12893 |
-
this._unit = timeOpts.unit || (tickOpts.autoSkip
|
12894 |
-
? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min))
|
12895 |
-
: determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));
|
12896 |
-
this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined
|
12897 |
-
: determineMajorUnit(this._unit);
|
12898 |
-
this.initOffsets(timestamps);
|
12899 |
-
if (options.reverse) {
|
12900 |
-
ticks.reverse();
|
12901 |
-
}
|
12902 |
-
return ticksFromTimestamps(this, ticks, this._majorUnit);
|
12903 |
-
}
|
12904 |
-
initOffsets(timestamps) {
|
12905 |
-
let start = 0;
|
12906 |
-
let end = 0;
|
12907 |
-
let first, last;
|
12908 |
-
if (this.options.offset && timestamps.length) {
|
12909 |
-
first = this.getDecimalForValue(timestamps[0]);
|
12910 |
-
if (timestamps.length === 1) {
|
12911 |
-
start = 1 - first;
|
12912 |
-
} else {
|
12913 |
-
start = (this.getDecimalForValue(timestamps[1]) - first) / 2;
|
12914 |
-
}
|
12915 |
-
last = this.getDecimalForValue(timestamps[timestamps.length - 1]);
|
12916 |
-
if (timestamps.length === 1) {
|
12917 |
-
end = last;
|
12918 |
-
} else {
|
12919 |
-
end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;
|
12920 |
-
}
|
12921 |
-
}
|
12922 |
-
const limit = timestamps.length < 3 ? 0.5 : 0.25;
|
12923 |
-
start = _limitValue(start, 0, limit);
|
12924 |
-
end = _limitValue(end, 0, limit);
|
12925 |
-
this._offsets = {start, end, factor: 1 / (start + 1 + end)};
|
12926 |
-
}
|
12927 |
-
_generate() {
|
12928 |
-
const adapter = this._adapter;
|
12929 |
-
const min = this.min;
|
12930 |
-
const max = this.max;
|
12931 |
-
const options = this.options;
|
12932 |
-
const timeOpts = options.time;
|
12933 |
-
const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));
|
12934 |
-
const stepSize = valueOrDefault(timeOpts.stepSize, 1);
|
12935 |
-
const weekday = minor === 'week' ? timeOpts.isoWeekday : false;
|
12936 |
-
const hasWeekday = isNumber(weekday) || weekday === true;
|
12937 |
-
const ticks = {};
|
12938 |
-
let first = min;
|
12939 |
-
let time, count;
|
12940 |
-
if (hasWeekday) {
|
12941 |
-
first = +adapter.startOf(first, 'isoWeek', weekday);
|
12942 |
-
}
|
12943 |
-
first = +adapter.startOf(first, hasWeekday ? 'day' : minor);
|
12944 |
-
if (adapter.diff(max, min, minor) > 100000 * stepSize) {
|
12945 |
-
throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);
|
12946 |
-
}
|
12947 |
-
const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();
|
12948 |
-
for (time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++) {
|
12949 |
-
addTick(ticks, time, timestamps);
|
12950 |
-
}
|
12951 |
-
if (time === max || options.bounds === 'ticks' || count === 1) {
|
12952 |
-
addTick(ticks, time, timestamps);
|
12953 |
-
}
|
12954 |
-
return Object.keys(ticks).sort((a, b) => a - b).map(x => +x);
|
12955 |
-
}
|
12956 |
-
getLabelForValue(value) {
|
12957 |
-
const adapter = this._adapter;
|
12958 |
-
const timeOpts = this.options.time;
|
12959 |
-
if (timeOpts.tooltipFormat) {
|
12960 |
-
return adapter.format(value, timeOpts.tooltipFormat);
|
12961 |
-
}
|
12962 |
-
return adapter.format(value, timeOpts.displayFormats.datetime);
|
12963 |
-
}
|
12964 |
-
_tickFormatFunction(time, index, ticks, format) {
|
12965 |
-
const options = this.options;
|
12966 |
-
const formats = options.time.displayFormats;
|
12967 |
-
const unit = this._unit;
|
12968 |
-
const majorUnit = this._majorUnit;
|
12969 |
-
const minorFormat = unit && formats[unit];
|
12970 |
-
const majorFormat = majorUnit && formats[majorUnit];
|
12971 |
-
const tick = ticks[index];
|
12972 |
-
const major = majorUnit && majorFormat && tick && tick.major;
|
12973 |
-
const label = this._adapter.format(time, format || (major ? majorFormat : minorFormat));
|
12974 |
-
const formatter = options.ticks.callback;
|
12975 |
-
return formatter ? callback(formatter, [label, index, ticks], this) : label;
|
12976 |
-
}
|
12977 |
-
generateTickLabels(ticks) {
|
12978 |
-
let i, ilen, tick;
|
12979 |
-
for (i = 0, ilen = ticks.length; i < ilen; ++i) {
|
12980 |
-
tick = ticks[i];
|
12981 |
-
tick.label = this._tickFormatFunction(tick.value, i, ticks);
|
12982 |
-
}
|
12983 |
-
}
|
12984 |
-
getDecimalForValue(value) {
|
12985 |
-
return value === null ? NaN : (value - this.min) / (this.max - this.min);
|
12986 |
-
}
|
12987 |
-
getPixelForValue(value) {
|
12988 |
-
const offsets = this._offsets;
|
12989 |
-
const pos = this.getDecimalForValue(value);
|
12990 |
-
return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);
|
12991 |
-
}
|
12992 |
-
getValueForPixel(pixel) {
|
12993 |
-
const offsets = this._offsets;
|
12994 |
-
const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
|
12995 |
-
return this.min + pos * (this.max - this.min);
|
12996 |
-
}
|
12997 |
-
_getLabelSize(label) {
|
12998 |
-
const ticksOpts = this.options.ticks;
|
12999 |
-
const tickLabelWidth = this.ctx.measureText(label).width;
|
13000 |
-
const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);
|
13001 |
-
const cosRotation = Math.cos(angle);
|
13002 |
-
const sinRotation = Math.sin(angle);
|
13003 |
-
const tickFontSize = this._resolveTickFontOptions(0).size;
|
13004 |
-
return {
|
13005 |
-
w: (tickLabelWidth * cosRotation) + (tickFontSize * sinRotation),
|
13006 |
-
h: (tickLabelWidth * sinRotation) + (tickFontSize * cosRotation)
|
13007 |
-
};
|
13008 |
-
}
|
13009 |
-
_getLabelCapacity(exampleTime) {
|
13010 |
-
const timeOpts = this.options.time;
|
13011 |
-
const displayFormats = timeOpts.displayFormats;
|
13012 |
-
const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;
|
13013 |
-
const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [exampleTime], this._majorUnit), format);
|
13014 |
-
const size = this._getLabelSize(exampleLabel);
|
13015 |
-
const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;
|
13016 |
-
return capacity > 0 ? capacity : 1;
|
13017 |
-
}
|
13018 |
-
getDataTimestamps() {
|
13019 |
-
let timestamps = this._cache.data || [];
|
13020 |
-
let i, ilen;
|
13021 |
-
if (timestamps.length) {
|
13022 |
-
return timestamps;
|
13023 |
-
}
|
13024 |
-
const metas = this.getMatchingVisibleMetas();
|
13025 |
-
if (this._normalized && metas.length) {
|
13026 |
-
return (this._cache.data = metas[0].controller.getAllParsedValues(this));
|
13027 |
-
}
|
13028 |
-
for (i = 0, ilen = metas.length; i < ilen; ++i) {
|
13029 |
-
timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));
|
13030 |
-
}
|
13031 |
-
return (this._cache.data = this.normalize(timestamps));
|
13032 |
-
}
|
13033 |
-
getLabelTimestamps() {
|
13034 |
-
const timestamps = this._cache.labels || [];
|
13035 |
-
let i, ilen;
|
13036 |
-
if (timestamps.length) {
|
13037 |
-
return timestamps;
|
13038 |
-
}
|
13039 |
-
const labels = this.getLabels();
|
13040 |
-
for (i = 0, ilen = labels.length; i < ilen; ++i) {
|
13041 |
-
timestamps.push(parse(this, labels[i]));
|
13042 |
-
}
|
13043 |
-
return (this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps));
|
13044 |
-
}
|
13045 |
-
normalize(values) {
|
13046 |
-
return _arrayUnique(values.sort(sorter));
|
13047 |
-
}
|
13048 |
-
}
|
13049 |
-
TimeScale.id = 'time';
|
13050 |
-
TimeScale.defaults = {
|
13051 |
-
bounds: 'data',
|
13052 |
-
adapters: {},
|
13053 |
-
time: {
|
13054 |
-
parser: false,
|
13055 |
-
unit: false,
|
13056 |
-
round: false,
|
13057 |
-
isoWeekday: false,
|
13058 |
-
minUnit: 'millisecond',
|
13059 |
-
displayFormats: {}
|
13060 |
-
},
|
13061 |
-
ticks: {
|
13062 |
-
source: 'auto',
|
13063 |
-
major: {
|
13064 |
-
enabled: false
|
13065 |
-
}
|
13066 |
-
}
|
13067 |
-
};
|
13068 |
-
|
13069 |
-
function interpolate(table, val, reverse) {
|
13070 |
-
let lo = 0;
|
13071 |
-
let hi = table.length - 1;
|
13072 |
-
let prevSource, nextSource, prevTarget, nextTarget;
|
13073 |
-
if (reverse) {
|
13074 |
-
if (val >= table[lo].pos && val <= table[hi].pos) {
|
13075 |
-
({lo, hi} = _lookupByKey(table, 'pos', val));
|
13076 |
-
}
|
13077 |
-
({pos: prevSource, time: prevTarget} = table[lo]);
|
13078 |
-
({pos: nextSource, time: nextTarget} = table[hi]);
|
13079 |
-
} else {
|
13080 |
-
if (val >= table[lo].time && val <= table[hi].time) {
|
13081 |
-
({lo, hi} = _lookupByKey(table, 'time', val));
|
13082 |
-
}
|
13083 |
-
({time: prevSource, pos: prevTarget} = table[lo]);
|
13084 |
-
({time: nextSource, pos: nextTarget} = table[hi]);
|
13085 |
-
}
|
13086 |
-
const span = nextSource - prevSource;
|
13087 |
-
return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;
|
13088 |
-
}
|
13089 |
-
class TimeSeriesScale extends TimeScale {
|
13090 |
-
constructor(props) {
|
13091 |
-
super(props);
|
13092 |
-
this._table = [];
|
13093 |
-
this._minPos = undefined;
|
13094 |
-
this._tableRange = undefined;
|
13095 |
-
}
|
13096 |
-
initOffsets() {
|
13097 |
-
const timestamps = this._getTimestampsForTable();
|
13098 |
-
const table = this._table = this.buildLookupTable(timestamps);
|
13099 |
-
this._minPos = interpolate(table, this.min);
|
13100 |
-
this._tableRange = interpolate(table, this.max) - this._minPos;
|
13101 |
-
super.initOffsets(timestamps);
|
13102 |
-
}
|
13103 |
-
buildLookupTable(timestamps) {
|
13104 |
-
const {min, max} = this;
|
13105 |
-
const items = [];
|
13106 |
-
const table = [];
|
13107 |
-
let i, ilen, prev, curr, next;
|
13108 |
-
for (i = 0, ilen = timestamps.length; i < ilen; ++i) {
|
13109 |
-
curr = timestamps[i];
|
13110 |
-
if (curr >= min && curr <= max) {
|
13111 |
-
items.push(curr);
|
13112 |
-
}
|
13113 |
-
}
|
13114 |
-
if (items.length < 2) {
|
13115 |
-
return [
|
13116 |
-
{time: min, pos: 0},
|
13117 |
-
{time: max, pos: 1}
|
13118 |
-
];
|
13119 |
-
}
|
13120 |
-
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
13121 |
-
next = items[i + 1];
|
13122 |
-
prev = items[i - 1];
|
13123 |
-
curr = items[i];
|
13124 |
-
if (Math.round((next + prev) / 2) !== curr) {
|
13125 |
-
table.push({time: curr, pos: i / (ilen - 1)});
|
13126 |
-
}
|
13127 |
-
}
|
13128 |
-
return table;
|
13129 |
-
}
|
13130 |
-
_getTimestampsForTable() {
|
13131 |
-
let timestamps = this._cache.all || [];
|
13132 |
-
if (timestamps.length) {
|
13133 |
-
return timestamps;
|
13134 |
-
}
|
13135 |
-
const data = this.getDataTimestamps();
|
13136 |
-
const label = this.getLabelTimestamps();
|
13137 |
-
if (data.length && label.length) {
|
13138 |
-
timestamps = this.normalize(data.concat(label));
|
13139 |
-
} else {
|
13140 |
-
timestamps = data.length ? data : label;
|
13141 |
-
}
|
13142 |
-
timestamps = this._cache.all = timestamps;
|
13143 |
-
return timestamps;
|
13144 |
-
}
|
13145 |
-
getDecimalForValue(value) {
|
13146 |
-
return (interpolate(this._table, value) - this._minPos) / this._tableRange;
|
13147 |
-
}
|
13148 |
-
getValueForPixel(pixel) {
|
13149 |
-
const offsets = this._offsets;
|
13150 |
-
const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;
|
13151 |
-
return interpolate(this._table, decimal * this._tableRange + this._minPos, true);
|
13152 |
-
}
|
13153 |
-
}
|
13154 |
-
TimeSeriesScale.id = 'timeseries';
|
13155 |
-
TimeSeriesScale.defaults = TimeScale.defaults;
|
13156 |
-
|
13157 |
-
var scales = /*#__PURE__*/Object.freeze({
|
13158 |
-
__proto__: null,
|
13159 |
-
CategoryScale: CategoryScale,
|
13160 |
-
LinearScale: LinearScale,
|
13161 |
-
LogarithmicScale: LogarithmicScale,
|
13162 |
-
RadialLinearScale: RadialLinearScale,
|
13163 |
-
TimeScale: TimeScale,
|
13164 |
-
TimeSeriesScale: TimeSeriesScale
|
13165 |
-
});
|
13166 |
-
|
13167 |
-
Chart.register(controllers, scales, elements, plugins);
|
13168 |
-
Chart.helpers = {...helpers};
|
13169 |
-
Chart._adapters = _adapters;
|
13170 |
-
Chart.Animation = Animation;
|
13171 |
-
Chart.Animations = Animations;
|
13172 |
-
Chart.animator = animator;
|
13173 |
-
Chart.controllers = registry.controllers.items;
|
13174 |
-
Chart.DatasetController = DatasetController;
|
13175 |
-
Chart.Element = Element;
|
13176 |
-
Chart.elements = elements;
|
13177 |
-
Chart.Interaction = Interaction;
|
13178 |
-
Chart.layouts = layouts;
|
13179 |
-
Chart.platforms = platforms;
|
13180 |
-
Chart.Scale = Scale;
|
13181 |
-
Chart.Ticks = Ticks;
|
13182 |
-
Object.assign(Chart, controllers, scales, elements, plugins, platforms);
|
13183 |
-
Chart.Chart = Chart;
|
13184 |
-
if (typeof window !== 'undefined') {
|
13185 |
-
window.Chart = Chart;
|
13186 |
-
}
|
13187 |
-
|
13188 |
-
return Chart;
|
13189 |
-
|
13190 |
-
})));
|
1 |
+
/*!
|
2 |
+
* Chart.js v3.6.2
|
3 |
+
* https://www.chartjs.org
|
4 |
+
* (c) 2021 Chart.js Contributors
|
5 |
+
* Released under the MIT License
|
6 |
+
*/
|
7 |
+
(function (global, factory) {
|
8 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
9 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
10 |
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chart = factory());
|
11 |
+
}(this, (function () { 'use strict';
|
12 |
+
|
13 |
+
function fontString(pixelSize, fontStyle, fontFamily) {
|
14 |
+
return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;
|
15 |
+
}
|
16 |
+
const requestAnimFrame = (function() {
|
17 |
+
if (typeof window === 'undefined') {
|
18 |
+
return function(callback) {
|
19 |
+
return callback();
|
20 |
+
};
|
21 |
+
}
|
22 |
+
return window.requestAnimationFrame;
|
23 |
+
}());
|
24 |
+
function throttled(fn, thisArg, updateFn) {
|
25 |
+
const updateArgs = updateFn || ((args) => Array.prototype.slice.call(args));
|
26 |
+
let ticking = false;
|
27 |
+
let args = [];
|
28 |
+
return function(...rest) {
|
29 |
+
args = updateArgs(rest);
|
30 |
+
if (!ticking) {
|
31 |
+
ticking = true;
|
32 |
+
requestAnimFrame.call(window, () => {
|
33 |
+
ticking = false;
|
34 |
+
fn.apply(thisArg, args);
|
35 |
+
});
|
36 |
+
}
|
37 |
+
};
|
38 |
+
}
|
39 |
+
function debounce(fn, delay) {
|
40 |
+
let timeout;
|
41 |
+
return function(...args) {
|
42 |
+
if (delay) {
|
43 |
+
clearTimeout(timeout);
|
44 |
+
timeout = setTimeout(fn, delay, args);
|
45 |
+
} else {
|
46 |
+
fn.apply(this, args);
|
47 |
+
}
|
48 |
+
return delay;
|
49 |
+
};
|
50 |
+
}
|
51 |
+
const _toLeftRightCenter = (align) => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';
|
52 |
+
const _alignStartEnd = (align, start, end) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;
|
53 |
+
const _textX = (align, left, right, rtl) => {
|
54 |
+
const check = rtl ? 'left' : 'right';
|
55 |
+
return align === check ? right : align === 'center' ? (left + right) / 2 : left;
|
56 |
+
};
|
57 |
+
|
58 |
+
class Animator {
|
59 |
+
constructor() {
|
60 |
+
this._request = null;
|
61 |
+
this._charts = new Map();
|
62 |
+
this._running = false;
|
63 |
+
this._lastDate = undefined;
|
64 |
+
}
|
65 |
+
_notify(chart, anims, date, type) {
|
66 |
+
const callbacks = anims.listeners[type];
|
67 |
+
const numSteps = anims.duration;
|
68 |
+
callbacks.forEach(fn => fn({
|
69 |
+
chart,
|
70 |
+
initial: anims.initial,
|
71 |
+
numSteps,
|
72 |
+
currentStep: Math.min(date - anims.start, numSteps)
|
73 |
+
}));
|
74 |
+
}
|
75 |
+
_refresh() {
|
76 |
+
if (this._request) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
this._running = true;
|
80 |
+
this._request = requestAnimFrame.call(window, () => {
|
81 |
+
this._update();
|
82 |
+
this._request = null;
|
83 |
+
if (this._running) {
|
84 |
+
this._refresh();
|
85 |
+
}
|
86 |
+
});
|
87 |
+
}
|
88 |
+
_update(date = Date.now()) {
|
89 |
+
let remaining = 0;
|
90 |
+
this._charts.forEach((anims, chart) => {
|
91 |
+
if (!anims.running || !anims.items.length) {
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
const items = anims.items;
|
95 |
+
let i = items.length - 1;
|
96 |
+
let draw = false;
|
97 |
+
let item;
|
98 |
+
for (; i >= 0; --i) {
|
99 |
+
item = items[i];
|
100 |
+
if (item._active) {
|
101 |
+
if (item._total > anims.duration) {
|
102 |
+
anims.duration = item._total;
|
103 |
+
}
|
104 |
+
item.tick(date);
|
105 |
+
draw = true;
|
106 |
+
} else {
|
107 |
+
items[i] = items[items.length - 1];
|
108 |
+
items.pop();
|
109 |
+
}
|
110 |
+
}
|
111 |
+
if (draw) {
|
112 |
+
chart.draw();
|
113 |
+
this._notify(chart, anims, date, 'progress');
|
114 |
+
}
|
115 |
+
if (!items.length) {
|
116 |
+
anims.running = false;
|
117 |
+
this._notify(chart, anims, date, 'complete');
|
118 |
+
anims.initial = false;
|
119 |
+
}
|
120 |
+
remaining += items.length;
|
121 |
+
});
|
122 |
+
this._lastDate = date;
|
123 |
+
if (remaining === 0) {
|
124 |
+
this._running = false;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
_getAnims(chart) {
|
128 |
+
const charts = this._charts;
|
129 |
+
let anims = charts.get(chart);
|
130 |
+
if (!anims) {
|
131 |
+
anims = {
|
132 |
+
running: false,
|
133 |
+
initial: true,
|
134 |
+
items: [],
|
135 |
+
listeners: {
|
136 |
+
complete: [],
|
137 |
+
progress: []
|
138 |
+
}
|
139 |
+
};
|
140 |
+
charts.set(chart, anims);
|
141 |
+
}
|
142 |
+
return anims;
|
143 |
+
}
|
144 |
+
listen(chart, event, cb) {
|
145 |
+
this._getAnims(chart).listeners[event].push(cb);
|
146 |
+
}
|
147 |
+
add(chart, items) {
|
148 |
+
if (!items || !items.length) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
this._getAnims(chart).items.push(...items);
|
152 |
+
}
|
153 |
+
has(chart) {
|
154 |
+
return this._getAnims(chart).items.length > 0;
|
155 |
+
}
|
156 |
+
start(chart) {
|
157 |
+
const anims = this._charts.get(chart);
|
158 |
+
if (!anims) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
anims.running = true;
|
162 |
+
anims.start = Date.now();
|
163 |
+
anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);
|
164 |
+
this._refresh();
|
165 |
+
}
|
166 |
+
running(chart) {
|
167 |
+
if (!this._running) {
|
168 |
+
return false;
|
169 |
+
}
|
170 |
+
const anims = this._charts.get(chart);
|
171 |
+
if (!anims || !anims.running || !anims.items.length) {
|
172 |
+
return false;
|
173 |
+
}
|
174 |
+
return true;
|
175 |
+
}
|
176 |
+
stop(chart) {
|
177 |
+
const anims = this._charts.get(chart);
|
178 |
+
if (!anims || !anims.items.length) {
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
const items = anims.items;
|
182 |
+
let i = items.length - 1;
|
183 |
+
for (; i >= 0; --i) {
|
184 |
+
items[i].cancel();
|
185 |
+
}
|
186 |
+
anims.items = [];
|
187 |
+
this._notify(chart, anims, Date.now(), 'complete');
|
188 |
+
}
|
189 |
+
remove(chart) {
|
190 |
+
return this._charts.delete(chart);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
var animator = new Animator();
|
194 |
+
|
195 |
+
/*!
|
196 |
+
* @kurkle/color v0.1.9
|
197 |
+
* https://github.com/kurkle/color#readme
|
198 |
+
* (c) 2020 Jukka Kurkela
|
199 |
+
* Released under the MIT License
|
200 |
+
*/
|
201 |
+
const map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};
|
202 |
+
const hex = '0123456789ABCDEF';
|
203 |
+
const h1 = (b) => hex[b & 0xF];
|
204 |
+
const h2 = (b) => hex[(b & 0xF0) >> 4] + hex[b & 0xF];
|
205 |
+
const eq = (b) => (((b & 0xF0) >> 4) === (b & 0xF));
|
206 |
+
function isShort(v) {
|
207 |
+
return eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);
|
208 |
+
}
|
209 |
+
function hexParse(str) {
|
210 |
+
var len = str.length;
|
211 |
+
var ret;
|
212 |
+
if (str[0] === '#') {
|
213 |
+
if (len === 4 || len === 5) {
|
214 |
+
ret = {
|
215 |
+
r: 255 & map$1[str[1]] * 17,
|
216 |
+
g: 255 & map$1[str[2]] * 17,
|
217 |
+
b: 255 & map$1[str[3]] * 17,
|
218 |
+
a: len === 5 ? map$1[str[4]] * 17 : 255
|
219 |
+
};
|
220 |
+
} else if (len === 7 || len === 9) {
|
221 |
+
ret = {
|
222 |
+
r: map$1[str[1]] << 4 | map$1[str[2]],
|
223 |
+
g: map$1[str[3]] << 4 | map$1[str[4]],
|
224 |
+
b: map$1[str[5]] << 4 | map$1[str[6]],
|
225 |
+
a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255
|
226 |
+
};
|
227 |
+
}
|
228 |
+
}
|
229 |
+
return ret;
|
230 |
+
}
|
231 |
+
function hexString(v) {
|
232 |
+
var f = isShort(v) ? h1 : h2;
|
233 |
+
return v
|
234 |
+
? '#' + f(v.r) + f(v.g) + f(v.b) + (v.a < 255 ? f(v.a) : '')
|
235 |
+
: v;
|
236 |
+
}
|
237 |
+
function round(v) {
|
238 |
+
return v + 0.5 | 0;
|
239 |
+
}
|
240 |
+
const lim = (v, l, h) => Math.max(Math.min(v, h), l);
|
241 |
+
function p2b(v) {
|
242 |
+
return lim(round(v * 2.55), 0, 255);
|
243 |
+
}
|
244 |
+
function n2b(v) {
|
245 |
+
return lim(round(v * 255), 0, 255);
|
246 |
+
}
|
247 |
+
function b2n(v) {
|
248 |
+
return lim(round(v / 2.55) / 100, 0, 1);
|
249 |
+
}
|
250 |
+
function n2p(v) {
|
251 |
+
return lim(round(v * 100), 0, 100);
|
252 |
+
}
|
253 |
+
const RGB_RE = /^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;
|
254 |
+
function rgbParse(str) {
|
255 |
+
const m = RGB_RE.exec(str);
|
256 |
+
let a = 255;
|
257 |
+
let r, g, b;
|
258 |
+
if (!m) {
|
259 |
+
return;
|
260 |
+
}
|
261 |
+
if (m[7] !== r) {
|
262 |
+
const v = +m[7];
|
263 |
+
a = 255 & (m[8] ? p2b(v) : v * 255);
|
264 |
+
}
|
265 |
+
r = +m[1];
|
266 |
+
g = +m[3];
|
267 |
+
b = +m[5];
|
268 |
+
r = 255 & (m[2] ? p2b(r) : r);
|
269 |
+
g = 255 & (m[4] ? p2b(g) : g);
|
270 |
+
b = 255 & (m[6] ? p2b(b) : b);
|
271 |
+
return {
|
272 |
+
r: r,
|
273 |
+
g: g,
|
274 |
+
b: b,
|
275 |
+
a: a
|
276 |
+
};
|
277 |
+
}
|
278 |
+
function rgbString(v) {
|
279 |
+
return v && (
|
280 |
+
v.a < 255
|
281 |
+
? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`
|
282 |
+
: `rgb(${v.r}, ${v.g}, ${v.b})`
|
283 |
+
);
|
284 |
+
}
|
285 |
+
const HUE_RE = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
286 |
+
function hsl2rgbn(h, s, l) {
|
287 |
+
const a = s * Math.min(l, 1 - l);
|
288 |
+
const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
289 |
+
return [f(0), f(8), f(4)];
|
290 |
+
}
|
291 |
+
function hsv2rgbn(h, s, v) {
|
292 |
+
const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);
|
293 |
+
return [f(5), f(3), f(1)];
|
294 |
+
}
|
295 |
+
function hwb2rgbn(h, w, b) {
|
296 |
+
const rgb = hsl2rgbn(h, 1, 0.5);
|
297 |
+
let i;
|
298 |
+
if (w + b > 1) {
|
299 |
+
i = 1 / (w + b);
|
300 |
+
w *= i;
|
301 |
+
b *= i;
|
302 |
+
}
|
303 |
+
for (i = 0; i < 3; i++) {
|
304 |
+
rgb[i] *= 1 - w - b;
|
305 |
+
rgb[i] += w;
|
306 |
+
}
|
307 |
+
return rgb;
|
308 |
+
}
|
309 |
+
function rgb2hsl(v) {
|
310 |
+
const range = 255;
|
311 |
+
const r = v.r / range;
|
312 |
+
const g = v.g / range;
|
313 |
+
const b = v.b / range;
|
314 |
+
const max = Math.max(r, g, b);
|
315 |
+
const min = Math.min(r, g, b);
|
316 |
+
const l = (max + min) / 2;
|
317 |
+
let h, s, d;
|
318 |
+
if (max !== min) {
|
319 |
+
d = max - min;
|
320 |
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
321 |
+
h = max === r
|
322 |
+
? ((g - b) / d) + (g < b ? 6 : 0)
|
323 |
+
: max === g
|
324 |
+
? (b - r) / d + 2
|
325 |
+
: (r - g) / d + 4;
|
326 |
+
h = h * 60 + 0.5;
|
327 |
+
}
|
328 |
+
return [h | 0, s || 0, l];
|
329 |
+
}
|
330 |
+
function calln(f, a, b, c) {
|
331 |
+
return (
|
332 |
+
Array.isArray(a)
|
333 |
+
? f(a[0], a[1], a[2])
|
334 |
+
: f(a, b, c)
|
335 |
+
).map(n2b);
|
336 |
+
}
|
337 |
+
function hsl2rgb(h, s, l) {
|
338 |
+
return calln(hsl2rgbn, h, s, l);
|
339 |
+
}
|
340 |
+
function hwb2rgb(h, w, b) {
|
341 |
+
return calln(hwb2rgbn, h, w, b);
|
342 |
+
}
|
343 |
+
function hsv2rgb(h, s, v) {
|
344 |
+
return calln(hsv2rgbn, h, s, v);
|
345 |
+
}
|
346 |
+
function hue(h) {
|
347 |
+
return (h % 360 + 360) % 360;
|
348 |
+
}
|
349 |
+
function hueParse(str) {
|
350 |
+
const m = HUE_RE.exec(str);
|
351 |
+
let a = 255;
|
352 |
+
let v;
|
353 |
+
if (!m) {
|
354 |
+
return;
|
355 |
+
}
|
356 |
+
if (m[5] !== v) {
|
357 |
+
a = m[6] ? p2b(+m[5]) : n2b(+m[5]);
|
358 |
+
}
|
359 |
+
const h = hue(+m[2]);
|
360 |
+
const p1 = +m[3] / 100;
|
361 |
+
const p2 = +m[4] / 100;
|
362 |
+
if (m[1] === 'hwb') {
|
363 |
+
v = hwb2rgb(h, p1, p2);
|
364 |
+
} else if (m[1] === 'hsv') {
|
365 |
+
v = hsv2rgb(h, p1, p2);
|
366 |
+
} else {
|
367 |
+
v = hsl2rgb(h, p1, p2);
|
368 |
+
}
|
369 |
+
return {
|
370 |
+
r: v[0],
|
371 |
+
g: v[1],
|
372 |
+
b: v[2],
|
373 |
+
a: a
|
374 |
+
};
|
375 |
+
}
|
376 |
+
function rotate(v, deg) {
|
377 |
+
var h = rgb2hsl(v);
|
378 |
+
h[0] = hue(h[0] + deg);
|
379 |
+
h = hsl2rgb(h);
|
380 |
+
v.r = h[0];
|
381 |
+
v.g = h[1];
|
382 |
+
v.b = h[2];
|
383 |
+
}
|
384 |
+
function hslString(v) {
|
385 |
+
if (!v) {
|
386 |
+
return;
|
387 |
+
}
|
388 |
+
const a = rgb2hsl(v);
|
389 |
+
const h = a[0];
|
390 |
+
const s = n2p(a[1]);
|
391 |
+
const l = n2p(a[2]);
|
392 |
+
return v.a < 255
|
393 |
+
? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`
|
394 |
+
: `hsl(${h}, ${s}%, ${l}%)`;
|
395 |
+
}
|
396 |
+
const map$1$1 = {
|
397 |
+
x: 'dark',
|
398 |
+
Z: 'light',
|
399 |
+
Y: 're',
|
400 |
+
X: 'blu',
|
401 |
+
W: 'gr',
|
402 |
+
V: 'medium',
|
403 |
+
U: 'slate',
|
404 |
+
A: 'ee',
|
405 |
+
T: 'ol',
|
406 |
+
S: 'or',
|
407 |
+
B: 'ra',
|
408 |
+
C: 'lateg',
|
409 |
+
D: 'ights',
|
410 |
+
R: 'in',
|
411 |
+
Q: 'turquois',
|
412 |
+
E: 'hi',
|
413 |
+
P: 'ro',
|
414 |
+
O: 'al',
|
415 |
+
N: 'le',
|
416 |
+
M: 'de',
|
417 |
+
L: 'yello',
|
418 |
+
F: 'en',
|
419 |
+
K: 'ch',
|
420 |
+
G: 'arks',
|
421 |
+
H: 'ea',
|
422 |
+
I: 'ightg',
|
423 |
+
J: 'wh'
|
424 |
+
};
|
425 |
+
const names = {
|
426 |
+
OiceXe: 'f0f8ff',
|
427 |
+
antiquewEte: 'faebd7',
|
428 |
+
aqua: 'ffff',
|
429 |
+
aquamarRe: '7fffd4',
|
430 |
+
azuY: 'f0ffff',
|
431 |
+
beige: 'f5f5dc',
|
432 |
+
bisque: 'ffe4c4',
|
433 |
+
black: '0',
|
434 |
+
blanKedOmond: 'ffebcd',
|
435 |
+
Xe: 'ff',
|
436 |
+
XeviTet: '8a2be2',
|
437 |
+
bPwn: 'a52a2a',
|
438 |
+
burlywood: 'deb887',
|
439 |
+
caMtXe: '5f9ea0',
|
440 |
+
KartYuse: '7fff00',
|
441 |
+
KocTate: 'd2691e',
|
442 |
+
cSO: 'ff7f50',
|
443 |
+
cSnflowerXe: '6495ed',
|
444 |
+
cSnsilk: 'fff8dc',
|
445 |
+
crimson: 'dc143c',
|
446 |
+
cyan: 'ffff',
|
447 |
+
xXe: '8b',
|
448 |
+
xcyan: '8b8b',
|
449 |
+
xgTMnPd: 'b8860b',
|
450 |
+
xWay: 'a9a9a9',
|
451 |
+
xgYF: '6400',
|
452 |
+
xgYy: 'a9a9a9',
|
453 |
+
xkhaki: 'bdb76b',
|
454 |
+
xmagFta: '8b008b',
|
455 |
+
xTivegYF: '556b2f',
|
456 |
+
xSange: 'ff8c00',
|
457 |
+
xScEd: '9932cc',
|
458 |
+
xYd: '8b0000',
|
459 |
+
xsOmon: 'e9967a',
|
460 |
+
xsHgYF: '8fbc8f',
|
461 |
+
xUXe: '483d8b',
|
462 |
+
xUWay: '2f4f4f',
|
463 |
+
xUgYy: '2f4f4f',
|
464 |
+
xQe: 'ced1',
|
465 |
+
xviTet: '9400d3',
|
466 |
+
dAppRk: 'ff1493',
|
467 |
+
dApskyXe: 'bfff',
|
468 |
+
dimWay: '696969',
|
469 |
+
dimgYy: '696969',
|
470 |
+
dodgerXe: '1e90ff',
|
471 |
+
fiYbrick: 'b22222',
|
472 |
+
flSOwEte: 'fffaf0',
|
473 |
+
foYstWAn: '228b22',
|
474 |
+
fuKsia: 'ff00ff',
|
475 |
+
gaRsbSo: 'dcdcdc',
|
476 |
+
ghostwEte: 'f8f8ff',
|
477 |
+
gTd: 'ffd700',
|
478 |
+
gTMnPd: 'daa520',
|
479 |
+
Way: '808080',
|
480 |
+
gYF: '8000',
|
481 |
+
gYFLw: 'adff2f',
|
482 |
+
gYy: '808080',
|
483 |
+
honeyMw: 'f0fff0',
|
484 |
+
hotpRk: 'ff69b4',
|
485 |
+
RdianYd: 'cd5c5c',
|
486 |
+
Rdigo: '4b0082',
|
487 |
+
ivSy: 'fffff0',
|
488 |
+
khaki: 'f0e68c',
|
489 |
+
lavFMr: 'e6e6fa',
|
490 |
+
lavFMrXsh: 'fff0f5',
|
491 |
+
lawngYF: '7cfc00',
|
492 |
+
NmoncEffon: 'fffacd',
|
493 |
+
ZXe: 'add8e6',
|
494 |
+
ZcSO: 'f08080',
|
495 |
+
Zcyan: 'e0ffff',
|
496 |
+
ZgTMnPdLw: 'fafad2',
|
497 |
+
ZWay: 'd3d3d3',
|
498 |
+
ZgYF: '90ee90',
|
499 |
+
ZgYy: 'd3d3d3',
|
500 |
+
ZpRk: 'ffb6c1',
|
501 |
+
ZsOmon: 'ffa07a',
|
502 |
+
ZsHgYF: '20b2aa',
|
503 |
+
ZskyXe: '87cefa',
|
504 |
+
ZUWay: '778899',
|
505 |
+
ZUgYy: '778899',
|
506 |
+
ZstAlXe: 'b0c4de',
|
507 |
+
ZLw: 'ffffe0',
|
508 |
+
lime: 'ff00',
|
509 |
+
limegYF: '32cd32',
|
510 |
+
lRF: 'faf0e6',
|
511 |
+
magFta: 'ff00ff',
|
512 |
+
maPon: '800000',
|
513 |
+
VaquamarRe: '66cdaa',
|
514 |
+
VXe: 'cd',
|
515 |
+
VScEd: 'ba55d3',
|
516 |
+
VpurpN: '9370db',
|
517 |
+
VsHgYF: '3cb371',
|
518 |
+
VUXe: '7b68ee',
|
519 |
+
VsprRggYF: 'fa9a',
|
520 |
+
VQe: '48d1cc',
|
521 |
+
VviTetYd: 'c71585',
|
522 |
+
midnightXe: '191970',
|
523 |
+
mRtcYam: 'f5fffa',
|
524 |
+
mistyPse: 'ffe4e1',
|
525 |
+
moccasR: 'ffe4b5',
|
526 |
+
navajowEte: 'ffdead',
|
527 |
+
navy: '80',
|
528 |
+
Tdlace: 'fdf5e6',
|
529 |
+
Tive: '808000',
|
530 |
+
TivedBb: '6b8e23',
|
531 |
+
Sange: 'ffa500',
|
532 |
+
SangeYd: 'ff4500',
|
533 |
+
ScEd: 'da70d6',
|
534 |
+
pOegTMnPd: 'eee8aa',
|
535 |
+
pOegYF: '98fb98',
|
536 |
+
pOeQe: 'afeeee',
|
537 |
+
pOeviTetYd: 'db7093',
|
538 |
+
papayawEp: 'ffefd5',
|
539 |
+
pHKpuff: 'ffdab9',
|
540 |
+
peru: 'cd853f',
|
541 |
+
pRk: 'ffc0cb',
|
542 |
+
plum: 'dda0dd',
|
543 |
+
powMrXe: 'b0e0e6',
|
544 |
+
purpN: '800080',
|
545 |
+
YbeccapurpN: '663399',
|
546 |
+
Yd: 'ff0000',
|
547 |
+
Psybrown: 'bc8f8f',
|
548 |
+
PyOXe: '4169e1',
|
549 |
+
saddNbPwn: '8b4513',
|
550 |
+
sOmon: 'fa8072',
|
551 |
+
sandybPwn: 'f4a460',
|
552 |
+
sHgYF: '2e8b57',
|
553 |
+
sHshell: 'fff5ee',
|
554 |
+
siFna: 'a0522d',
|
555 |
+
silver: 'c0c0c0',
|
556 |
+
skyXe: '87ceeb',
|
557 |
+
UXe: '6a5acd',
|
558 |
+
UWay: '708090',
|
559 |
+
UgYy: '708090',
|
560 |
+
snow: 'fffafa',
|
561 |
+
sprRggYF: 'ff7f',
|
562 |
+
stAlXe: '4682b4',
|
563 |
+
tan: 'd2b48c',
|
564 |
+
teO: '8080',
|
565 |
+
tEstN: 'd8bfd8',
|
566 |
+
tomato: 'ff6347',
|
567 |
+
Qe: '40e0d0',
|
568 |
+
viTet: 'ee82ee',
|
569 |
+
JHt: 'f5deb3',
|
570 |
+
wEte: 'ffffff',
|
571 |
+
wEtesmoke: 'f5f5f5',
|
572 |
+
Lw: 'ffff00',
|
573 |
+
LwgYF: '9acd32'
|
574 |
+
};
|
575 |
+
function unpack() {
|
576 |
+
const unpacked = {};
|
577 |
+
const keys = Object.keys(names);
|
578 |
+
const tkeys = Object.keys(map$1$1);
|
579 |
+
let i, j, k, ok, nk;
|
580 |
+
for (i = 0; i < keys.length; i++) {
|
581 |
+
ok = nk = keys[i];
|
582 |
+
for (j = 0; j < tkeys.length; j++) {
|
583 |
+
k = tkeys[j];
|
584 |
+
nk = nk.replace(k, map$1$1[k]);
|
585 |
+
}
|
586 |
+
k = parseInt(names[ok], 16);
|
587 |
+
unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];
|
588 |
+
}
|
589 |
+
return unpacked;
|
590 |
+
}
|
591 |
+
let names$1;
|
592 |
+
function nameParse(str) {
|
593 |
+
if (!names$1) {
|
594 |
+
names$1 = unpack();
|
595 |
+
names$1.transparent = [0, 0, 0, 0];
|
596 |
+
}
|
597 |
+
const a = names$1[str.toLowerCase()];
|
598 |
+
return a && {
|
599 |
+
r: a[0],
|
600 |
+
g: a[1],
|
601 |
+
b: a[2],
|
602 |
+
a: a.length === 4 ? a[3] : 255
|
603 |
+
};
|
604 |
+
}
|
605 |
+
function modHSL(v, i, ratio) {
|
606 |
+
if (v) {
|
607 |
+
let tmp = rgb2hsl(v);
|
608 |
+
tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));
|
609 |
+
tmp = hsl2rgb(tmp);
|
610 |
+
v.r = tmp[0];
|
611 |
+
v.g = tmp[1];
|
612 |
+
v.b = tmp[2];
|
613 |
+
}
|
614 |
+
}
|
615 |
+
function clone$1(v, proto) {
|
616 |
+
return v ? Object.assign(proto || {}, v) : v;
|
617 |
+
}
|
618 |
+
function fromObject(input) {
|
619 |
+
var v = {r: 0, g: 0, b: 0, a: 255};
|
620 |
+
if (Array.isArray(input)) {
|
621 |
+
if (input.length >= 3) {
|
622 |
+
v = {r: input[0], g: input[1], b: input[2], a: 255};
|
623 |
+
if (input.length > 3) {
|
624 |
+
v.a = n2b(input[3]);
|
625 |
+
}
|
626 |
+
}
|
627 |
+
} else {
|
628 |
+
v = clone$1(input, {r: 0, g: 0, b: 0, a: 1});
|
629 |
+
v.a = n2b(v.a);
|
630 |
+
}
|
631 |
+
return v;
|
632 |
+
}
|
633 |
+
function functionParse(str) {
|
634 |
+
if (str.charAt(0) === 'r') {
|
635 |
+
return rgbParse(str);
|
636 |
+
}
|
637 |
+
return hueParse(str);
|
638 |
+
}
|
639 |
+
class Color {
|
640 |
+
constructor(input) {
|
641 |
+
if (input instanceof Color) {
|
642 |
+
return input;
|
643 |
+
}
|
644 |
+
const type = typeof input;
|
645 |
+
let v;
|
646 |
+
if (type === 'object') {
|
647 |
+
v = fromObject(input);
|
648 |
+
} else if (type === 'string') {
|
649 |
+
v = hexParse(input) || nameParse(input) || functionParse(input);
|
650 |
+
}
|
651 |
+
this._rgb = v;
|
652 |
+
this._valid = !!v;
|
653 |
+
}
|
654 |
+
get valid() {
|
655 |
+
return this._valid;
|
656 |
+
}
|
657 |
+
get rgb() {
|
658 |
+
var v = clone$1(this._rgb);
|
659 |
+
if (v) {
|
660 |
+
v.a = b2n(v.a);
|
661 |
+
}
|
662 |
+
return v;
|
663 |
+
}
|
664 |
+
set rgb(obj) {
|
665 |
+
this._rgb = fromObject(obj);
|
666 |
+
}
|
667 |
+
rgbString() {
|
668 |
+
return this._valid ? rgbString(this._rgb) : this._rgb;
|
669 |
+
}
|
670 |
+
hexString() {
|
671 |
+
return this._valid ? hexString(this._rgb) : this._rgb;
|
672 |
+
}
|
673 |
+
hslString() {
|
674 |
+
return this._valid ? hslString(this._rgb) : this._rgb;
|
675 |
+
}
|
676 |
+
mix(color, weight) {
|
677 |
+
const me = this;
|
678 |
+
if (color) {
|
679 |
+
const c1 = me.rgb;
|
680 |
+
const c2 = color.rgb;
|
681 |
+
let w2;
|
682 |
+
const p = weight === w2 ? 0.5 : weight;
|
683 |
+
const w = 2 * p - 1;
|
684 |
+
const a = c1.a - c2.a;
|
685 |
+
const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;
|
686 |
+
w2 = 1 - w1;
|
687 |
+
c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;
|
688 |
+
c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;
|
689 |
+
c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;
|
690 |
+
c1.a = p * c1.a + (1 - p) * c2.a;
|
691 |
+
me.rgb = c1;
|
692 |
+
}
|
693 |
+
return me;
|
694 |
+
}
|
695 |
+
clone() {
|
696 |
+
return new Color(this.rgb);
|
697 |
+
}
|
698 |
+
alpha(a) {
|
699 |
+
this._rgb.a = n2b(a);
|
700 |
+
return this;
|
701 |
+
}
|
702 |
+
clearer(ratio) {
|
703 |
+
const rgb = this._rgb;
|
704 |
+
rgb.a *= 1 - ratio;
|
705 |
+
return this;
|
706 |
+
}
|
707 |
+
greyscale() {
|
708 |
+
const rgb = this._rgb;
|
709 |
+
const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);
|
710 |
+
rgb.r = rgb.g = rgb.b = val;
|
711 |
+
return this;
|
712 |
+
}
|
713 |
+
opaquer(ratio) {
|
714 |
+
const rgb = this._rgb;
|
715 |
+
rgb.a *= 1 + ratio;
|
716 |
+
return this;
|
717 |
+
}
|
718 |
+
negate() {
|
719 |
+
const v = this._rgb;
|
720 |
+
v.r = 255 - v.r;
|
721 |
+
v.g = 255 - v.g;
|
722 |
+
v.b = 255 - v.b;
|
723 |
+
return this;
|
724 |
+
}
|
725 |
+
lighten(ratio) {
|
726 |
+
modHSL(this._rgb, 2, ratio);
|
727 |
+
return this;
|
728 |
+
}
|
729 |
+
darken(ratio) {
|
730 |
+
modHSL(this._rgb, 2, -ratio);
|
731 |
+
return this;
|
732 |
+
}
|
733 |
+
saturate(ratio) {
|
734 |
+
modHSL(this._rgb, 1, ratio);
|
735 |
+
return this;
|
736 |
+
}
|
737 |
+
desaturate(ratio) {
|
738 |
+
modHSL(this._rgb, 1, -ratio);
|
739 |
+
return this;
|
740 |
+
}
|
741 |
+
rotate(deg) {
|
742 |
+
rotate(this._rgb, deg);
|
743 |
+
return this;
|
744 |
+
}
|
745 |
+
}
|
746 |
+
function index_esm(input) {
|
747 |
+
return new Color(input);
|
748 |
+
}
|
749 |
+
|
750 |
+
const isPatternOrGradient = (value) => value instanceof CanvasGradient || value instanceof CanvasPattern;
|
751 |
+
function color(value) {
|
752 |
+
return isPatternOrGradient(value) ? value : index_esm(value);
|
753 |
+
}
|
754 |
+
function getHoverColor(value) {
|
755 |
+
return isPatternOrGradient(value)
|
756 |
+
? value
|
757 |
+
: index_esm(value).saturate(0.5).darken(0.1).hexString();
|
758 |
+
}
|
759 |
+
|
760 |
+
function noop() {}
|
761 |
+
const uid = (function() {
|
762 |
+
let id = 0;
|
763 |
+
return function() {
|
764 |
+
return id++;
|
765 |
+
};
|
766 |
+
}());
|
767 |
+
function isNullOrUndef(value) {
|
768 |
+
return value === null || typeof value === 'undefined';
|
769 |
+
}
|
770 |
+
function isArray(value) {
|
771 |
+
if (Array.isArray && Array.isArray(value)) {
|
772 |
+
return true;
|
773 |
+
}
|
774 |
+
const type = Object.prototype.toString.call(value);
|
775 |
+
if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {
|
776 |
+
return true;
|
777 |
+
}
|
778 |
+
return false;
|
779 |
+
}
|
780 |
+
function isObject(value) {
|
781 |
+
return value !== null && Object.prototype.toString.call(value) === '[object Object]';
|
782 |
+
}
|
783 |
+
const isNumberFinite = (value) => (typeof value === 'number' || value instanceof Number) && isFinite(+value);
|
784 |
+
function finiteOrDefault(value, defaultValue) {
|
785 |
+
return isNumberFinite(value) ? value : defaultValue;
|
786 |
+
}
|
787 |
+
function valueOrDefault(value, defaultValue) {
|
788 |
+
return typeof value === 'undefined' ? defaultValue : value;
|
789 |
+
}
|
790 |
+
const toPercentage = (value, dimension) =>
|
791 |
+
typeof value === 'string' && value.endsWith('%') ?
|
792 |
+
parseFloat(value) / 100
|
793 |
+
: value / dimension;
|
794 |
+
const toDimension = (value, dimension) =>
|
795 |
+
typeof value === 'string' && value.endsWith('%') ?
|
796 |
+
parseFloat(value) / 100 * dimension
|
797 |
+
: +value;
|
798 |
+
function callback(fn, args, thisArg) {
|
799 |
+
if (fn && typeof fn.call === 'function') {
|
800 |
+
return fn.apply(thisArg, args);
|
801 |
+
}
|
802 |
+
}
|
803 |
+
function each(loopable, fn, thisArg, reverse) {
|
804 |
+
let i, len, keys;
|
805 |
+
if (isArray(loopable)) {
|
806 |
+
len = loopable.length;
|
807 |
+
if (reverse) {
|
808 |
+
for (i = len - 1; i >= 0; i--) {
|
809 |
+
fn.call(thisArg, loopable[i], i);
|
810 |
+
}
|
811 |
+
} else {
|
812 |
+
for (i = 0; i < len; i++) {
|
813 |
+
fn.call(thisArg, loopable[i], i);
|
814 |
+
}
|
815 |
+
}
|
816 |
+
} else if (isObject(loopable)) {
|
817 |
+
keys = Object.keys(loopable);
|
818 |
+
len = keys.length;
|
819 |
+
for (i = 0; i < len; i++) {
|
820 |
+
fn.call(thisArg, loopable[keys[i]], keys[i]);
|
821 |
+
}
|
822 |
+
}
|
823 |
+
}
|
824 |
+
function _elementsEqual(a0, a1) {
|
825 |
+
let i, ilen, v0, v1;
|
826 |
+
if (!a0 || !a1 || a0.length !== a1.length) {
|
827 |
+
return false;
|
828 |
+
}
|
829 |
+
for (i = 0, ilen = a0.length; i < ilen; ++i) {
|
830 |
+
v0 = a0[i];
|
831 |
+
v1 = a1[i];
|
832 |
+
if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {
|
833 |
+
return false;
|
834 |
+
}
|
835 |
+
}
|
836 |
+
return true;
|
837 |
+
}
|
838 |
+
function clone(source) {
|
839 |
+
if (isArray(source)) {
|
840 |
+
return source.map(clone);
|
841 |
+
}
|
842 |
+
if (isObject(source)) {
|
843 |
+
const target = Object.create(null);
|
844 |
+
const keys = Object.keys(source);
|
845 |
+
const klen = keys.length;
|
846 |
+
let k = 0;
|
847 |
+
for (; k < klen; ++k) {
|
848 |
+
target[keys[k]] = clone(source[keys[k]]);
|
849 |
+
}
|
850 |
+
return target;
|
851 |
+
}
|
852 |
+
return source;
|
853 |
+
}
|
854 |
+
function isValidKey(key) {
|
855 |
+
return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;
|
856 |
+
}
|
857 |
+
function _merger(key, target, source, options) {
|
858 |
+
if (!isValidKey(key)) {
|
859 |
+
return;
|
860 |
+
}
|
861 |
+
const tval = target[key];
|
862 |
+
const sval = source[key];
|
863 |
+
if (isObject(tval) && isObject(sval)) {
|
864 |
+
merge(tval, sval, options);
|
865 |
+
} else {
|
866 |
+
target[key] = clone(sval);
|
867 |
+
}
|
868 |
+
}
|
869 |
+
function merge(target, source, options) {
|
870 |
+
const sources = isArray(source) ? source : [source];
|
871 |
+
const ilen = sources.length;
|
872 |
+
if (!isObject(target)) {
|
873 |
+
return target;
|
874 |
+
}
|
875 |
+
options = options || {};
|
876 |
+
const merger = options.merger || _merger;
|
877 |
+
for (let i = 0; i < ilen; ++i) {
|
878 |
+
source = sources[i];
|
879 |
+
if (!isObject(source)) {
|
880 |
+
continue;
|
881 |
+
}
|
882 |
+
const keys = Object.keys(source);
|
883 |
+
for (let k = 0, klen = keys.length; k < klen; ++k) {
|
884 |
+
merger(keys[k], target, source, options);
|
885 |
+
}
|
886 |
+
}
|
887 |
+
return target;
|
888 |
+
}
|
889 |
+
function mergeIf(target, source) {
|
890 |
+
return merge(target, source, {merger: _mergerIf});
|
891 |
+
}
|
892 |
+
function _mergerIf(key, target, source) {
|
893 |
+
if (!isValidKey(key)) {
|
894 |
+
return;
|
895 |
+
}
|
896 |
+
const tval = target[key];
|
897 |
+
const sval = source[key];
|
898 |
+
if (isObject(tval) && isObject(sval)) {
|
899 |
+
mergeIf(tval, sval);
|
900 |
+
} else if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
901 |
+
target[key] = clone(sval);
|
902 |
+
}
|
903 |
+
}
|
904 |
+
function _deprecated(scope, value, previous, current) {
|
905 |
+
if (value !== undefined) {
|
906 |
+
console.warn(scope + ': "' + previous +
|
907 |
+
'" is deprecated. Please use "' + current + '" instead');
|
908 |
+
}
|
909 |
+
}
|
910 |
+
const emptyString = '';
|
911 |
+
const dot = '.';
|
912 |
+
function indexOfDotOrLength(key, start) {
|
913 |
+
const idx = key.indexOf(dot, start);
|
914 |
+
return idx === -1 ? key.length : idx;
|
915 |
+
}
|
916 |
+
function resolveObjectKey(obj, key) {
|
917 |
+
if (key === emptyString) {
|
918 |
+
return obj;
|
919 |
+
}
|
920 |
+
let pos = 0;
|
921 |
+
let idx = indexOfDotOrLength(key, pos);
|
922 |
+
while (obj && idx > pos) {
|
923 |
+
obj = obj[key.substr(pos, idx - pos)];
|
924 |
+
pos = idx + 1;
|
925 |
+
idx = indexOfDotOrLength(key, pos);
|
926 |
+
}
|
927 |
+
return obj;
|
928 |
+
}
|
929 |
+
function _capitalize(str) {
|
930 |
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
931 |
+
}
|
932 |
+
const defined = (value) => typeof value !== 'undefined';
|
933 |
+
const isFunction = (value) => typeof value === 'function';
|
934 |
+
const setsEqual = (a, b) => {
|
935 |
+
if (a.size !== b.size) {
|
936 |
+
return false;
|
937 |
+
}
|
938 |
+
for (const item of a) {
|
939 |
+
if (!b.has(item)) {
|
940 |
+
return false;
|
941 |
+
}
|
942 |
+
}
|
943 |
+
return true;
|
944 |
+
};
|
945 |
+
|
946 |
+
const overrides = Object.create(null);
|
947 |
+
const descriptors = Object.create(null);
|
948 |
+
function getScope$1(node, key) {
|
949 |
+
if (!key) {
|
950 |
+
return node;
|
951 |
+
}
|
952 |
+
const keys = key.split('.');
|
953 |
+
for (let i = 0, n = keys.length; i < n; ++i) {
|
954 |
+
const k = keys[i];
|
955 |
+
node = node[k] || (node[k] = Object.create(null));
|
956 |
+
}
|
957 |
+
return node;
|
958 |
+
}
|
959 |
+
function set(root, scope, values) {
|
960 |
+
if (typeof scope === 'string') {
|
961 |
+
return merge(getScope$1(root, scope), values);
|
962 |
+
}
|
963 |
+
return merge(getScope$1(root, ''), scope);
|
964 |
+
}
|
965 |
+
class Defaults {
|
966 |
+
constructor(_descriptors) {
|
967 |
+
this.animation = undefined;
|
968 |
+
this.backgroundColor = 'rgba(0,0,0,0.1)';
|
969 |
+
this.borderColor = 'rgba(0,0,0,0.1)';
|
970 |
+
this.color = '#666';
|
971 |
+
this.datasets = {};
|
972 |
+
this.devicePixelRatio = (context) => context.chart.platform.getDevicePixelRatio();
|
973 |
+
this.elements = {};
|
974 |
+
this.events = [
|
975 |
+
'mousemove',
|
976 |
+
'mouseout',
|
977 |
+
'click',
|
978 |
+
'touchstart',
|
979 |
+
'touchmove'
|
980 |
+
];
|
981 |
+
this.font = {
|
982 |
+
family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
|
983 |
+
size: 12,
|
984 |
+
style: 'normal',
|
985 |
+
lineHeight: 1.2,
|
986 |
+
weight: null
|
987 |
+
};
|
988 |
+
this.hover = {};
|
989 |
+
this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);
|
990 |
+
this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);
|
991 |
+
this.hoverColor = (ctx, options) => getHoverColor(options.color);
|
992 |
+
this.indexAxis = 'x';
|
993 |
+
this.interaction = {
|
994 |
+
mode: 'nearest',
|
995 |
+
intersect: true
|
996 |
+
};
|
997 |
+
this.maintainAspectRatio = true;
|
998 |
+
this.onHover = null;
|
999 |
+
this.onClick = null;
|
1000 |
+
this.parsing = true;
|
1001 |
+
this.plugins = {};
|
1002 |
+
this.responsive = true;
|
1003 |
+
this.scale = undefined;
|
1004 |
+
this.scales = {};
|
1005 |
+
this.showLine = true;
|
1006 |
+
this.describe(_descriptors);
|
1007 |
+
}
|
1008 |
+
set(scope, values) {
|
1009 |
+
return set(this, scope, values);
|
1010 |
+
}
|
1011 |
+
get(scope) {
|
1012 |
+
return getScope$1(this, scope);
|
1013 |
+
}
|
1014 |
+
describe(scope, values) {
|
1015 |
+
return set(descriptors, scope, values);
|
1016 |
+
}
|
1017 |
+
override(scope, values) {
|
1018 |
+
return set(overrides, scope, values);
|
1019 |
+
}
|
1020 |
+
route(scope, name, targetScope, targetName) {
|
1021 |
+
const scopeObject = getScope$1(this, scope);
|
1022 |
+
const targetScopeObject = getScope$1(this, targetScope);
|
1023 |
+
const privateName = '_' + name;
|
1024 |
+
Object.defineProperties(scopeObject, {
|
1025 |
+
[privateName]: {
|
1026 |
+
value: scopeObject[name],
|
1027 |
+
writable: true
|
1028 |
+
},
|
1029 |
+
[name]: {
|
1030 |
+
enumerable: true,
|
1031 |
+
get() {
|
1032 |
+
const local = this[privateName];
|
1033 |
+
const target = targetScopeObject[targetName];
|
1034 |
+
if (isObject(local)) {
|
1035 |
+
return Object.assign({}, target, local);
|
1036 |
+
}
|
1037 |
+
return valueOrDefault(local, target);
|
1038 |
+
},
|
1039 |
+
set(value) {
|
1040 |
+
this[privateName] = value;
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
});
|
1044 |
+
}
|
1045 |
+
}
|
1046 |
+
var defaults = new Defaults({
|
1047 |
+
_scriptable: (name) => !name.startsWith('on'),
|
1048 |
+
_indexable: (name) => name !== 'events',
|
1049 |
+
hover: {
|
1050 |
+
_fallback: 'interaction'
|
1051 |
+
},
|
1052 |
+
interaction: {
|
1053 |
+
_scriptable: false,
|
1054 |
+
_indexable: false,
|
1055 |
+
}
|
1056 |
+
});
|
1057 |
+
|
1058 |
+
const PI = Math.PI;
|
1059 |
+
const TAU = 2 * PI;
|
1060 |
+
const PITAU = TAU + PI;
|
1061 |
+
const INFINITY = Number.POSITIVE_INFINITY;
|
1062 |
+
const RAD_PER_DEG = PI / 180;
|
1063 |
+
const HALF_PI = PI / 2;
|
1064 |
+
const QUARTER_PI = PI / 4;
|
1065 |
+
const TWO_THIRDS_PI = PI * 2 / 3;
|
1066 |
+
const log10 = Math.log10;
|
1067 |
+
const sign = Math.sign;
|
1068 |
+
function niceNum(range) {
|
1069 |
+
const roundedRange = Math.round(range);
|
1070 |
+
range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;
|
1071 |
+
const niceRange = Math.pow(10, Math.floor(log10(range)));
|
1072 |
+
const fraction = range / niceRange;
|
1073 |
+
const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;
|
1074 |
+
return niceFraction * niceRange;
|
1075 |
+
}
|
1076 |
+
function _factorize(value) {
|
1077 |
+
const result = [];
|
1078 |
+
const sqrt = Math.sqrt(value);
|
1079 |
+
let i;
|
1080 |
+
for (i = 1; i < sqrt; i++) {
|
1081 |
+
if (value % i === 0) {
|
1082 |
+
result.push(i);
|
1083 |
+
result.push(value / i);
|
1084 |
+
}
|
1085 |
+
}
|
1086 |
+
if (sqrt === (sqrt | 0)) {
|
1087 |
+
result.push(sqrt);
|
1088 |
+
}
|
1089 |
+
result.sort((a, b) => a - b).pop();
|
1090 |
+
return result;
|
1091 |
+
}
|
1092 |
+
function isNumber(n) {
|
1093 |
+
return !isNaN(parseFloat(n)) && isFinite(n);
|
1094 |
+
}
|
1095 |
+
function almostEquals(x, y, epsilon) {
|
1096 |
+
return Math.abs(x - y) < epsilon;
|
1097 |
+
}
|
1098 |
+
function almostWhole(x, epsilon) {
|
1099 |
+
const rounded = Math.round(x);
|
1100 |
+
return ((rounded - epsilon) <= x) && ((rounded + epsilon) >= x);
|
1101 |
+
}
|
1102 |
+
function _setMinAndMaxByKey(array, target, property) {
|
1103 |
+
let i, ilen, value;
|
1104 |
+
for (i = 0, ilen = array.length; i < ilen; i++) {
|
1105 |
+
value = array[i][property];
|
1106 |
+
if (!isNaN(value)) {
|
1107 |
+
target.min = Math.min(target.min, value);
|
1108 |
+
target.max = Math.max(target.max, value);
|
1109 |
+
}
|
1110 |
+
}
|
1111 |
+
}
|
1112 |
+
function toRadians(degrees) {
|
1113 |
+
return degrees * (PI / 180);
|
1114 |
+
}
|
1115 |
+
function toDegrees(radians) {
|
1116 |
+
return radians * (180 / PI);
|
1117 |
+
}
|
1118 |
+
function _decimalPlaces(x) {
|
1119 |
+
if (!isNumberFinite(x)) {
|
1120 |
+
return;
|
1121 |
+
}
|
1122 |
+
let e = 1;
|
1123 |
+
let p = 0;
|
1124 |
+
while (Math.round(x * e) / e !== x) {
|
1125 |
+
e *= 10;
|
1126 |
+
p++;
|
1127 |
+
}
|
1128 |
+
return p;
|
1129 |
+
}
|
1130 |
+
function getAngleFromPoint(centrePoint, anglePoint) {
|
1131 |
+
const distanceFromXCenter = anglePoint.x - centrePoint.x;
|
1132 |
+
const distanceFromYCenter = anglePoint.y - centrePoint.y;
|
1133 |
+
const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
|
1134 |
+
let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);
|
1135 |
+
if (angle < (-0.5 * PI)) {
|
1136 |
+
angle += TAU;
|
1137 |
+
}
|
1138 |
+
return {
|
1139 |
+
angle,
|
1140 |
+
distance: radialDistanceFromCenter
|
1141 |
+
};
|
1142 |
+
}
|
1143 |
+
function distanceBetweenPoints(pt1, pt2) {
|
1144 |
+
return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));
|
1145 |
+
}
|
1146 |
+
function _angleDiff(a, b) {
|
1147 |
+
return (a - b + PITAU) % TAU - PI;
|
1148 |
+
}
|
1149 |
+
function _normalizeAngle(a) {
|
1150 |
+
return (a % TAU + TAU) % TAU;
|
1151 |
+
}
|
1152 |
+
function _angleBetween(angle, start, end, sameAngleIsFullCircle) {
|
1153 |
+
const a = _normalizeAngle(angle);
|
1154 |
+
const s = _normalizeAngle(start);
|
1155 |
+
const e = _normalizeAngle(end);
|
1156 |
+
const angleToStart = _normalizeAngle(s - a);
|
1157 |
+
const angleToEnd = _normalizeAngle(e - a);
|
1158 |
+
const startToAngle = _normalizeAngle(a - s);
|
1159 |
+
const endToAngle = _normalizeAngle(a - e);
|
1160 |
+
return a === s || a === e || (sameAngleIsFullCircle && s === e)
|
1161 |
+
|| (angleToStart > angleToEnd && startToAngle < endToAngle);
|
1162 |
+
}
|
1163 |
+
function _limitValue(value, min, max) {
|
1164 |
+
return Math.max(min, Math.min(max, value));
|
1165 |
+
}
|
1166 |
+
function _int16Range(value) {
|
1167 |
+
return _limitValue(value, -32768, 32767);
|
1168 |
+
}
|
1169 |
+
function _isBetween(value, start, end, epsilon = 1e-6) {
|
1170 |
+
return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
function toFontString(font) {
|
1174 |
+
if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {
|
1175 |
+
return null;
|
1176 |
+
}
|
1177 |
+
return (font.style ? font.style + ' ' : '')
|
1178 |
+
+ (font.weight ? font.weight + ' ' : '')
|
1179 |
+
+ font.size + 'px '
|
1180 |
+
+ font.family;
|
1181 |
+
}
|
1182 |
+
function _measureText(ctx, data, gc, longest, string) {
|
1183 |
+
let textWidth = data[string];
|
1184 |
+
if (!textWidth) {
|
1185 |
+
textWidth = data[string] = ctx.measureText(string).width;
|
1186 |
+
gc.push(string);
|
1187 |
+
}
|
1188 |
+
if (textWidth > longest) {
|
1189 |
+
longest = textWidth;
|
1190 |
+
}
|
1191 |
+
return longest;
|
1192 |
+
}
|
1193 |
+
function _longestText(ctx, font, arrayOfThings, cache) {
|
1194 |
+
cache = cache || {};
|
1195 |
+
let data = cache.data = cache.data || {};
|
1196 |
+
let gc = cache.garbageCollect = cache.garbageCollect || [];
|
1197 |
+
if (cache.font !== font) {
|
1198 |
+
data = cache.data = {};
|
1199 |
+
gc = cache.garbageCollect = [];
|
1200 |
+
cache.font = font;
|
1201 |
+
}
|
1202 |
+
ctx.save();
|
1203 |
+
ctx.font = font;
|
1204 |
+
let longest = 0;
|
1205 |
+
const ilen = arrayOfThings.length;
|
1206 |
+
let i, j, jlen, thing, nestedThing;
|
1207 |
+
for (i = 0; i < ilen; i++) {
|
1208 |
+
thing = arrayOfThings[i];
|
1209 |
+
if (thing !== undefined && thing !== null && isArray(thing) !== true) {
|
1210 |
+
longest = _measureText(ctx, data, gc, longest, thing);
|
1211 |
+
} else if (isArray(thing)) {
|
1212 |
+
for (j = 0, jlen = thing.length; j < jlen; j++) {
|
1213 |
+
nestedThing = thing[j];
|
1214 |
+
if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {
|
1215 |
+
longest = _measureText(ctx, data, gc, longest, nestedThing);
|
1216 |
+
}
|
1217 |
+
}
|
1218 |
+
}
|
1219 |
+
}
|
1220 |
+
ctx.restore();
|
1221 |
+
const gcLen = gc.length / 2;
|
1222 |
+
if (gcLen > arrayOfThings.length) {
|
1223 |
+
for (i = 0; i < gcLen; i++) {
|
1224 |
+
delete data[gc[i]];
|
1225 |
+
}
|
1226 |
+
gc.splice(0, gcLen);
|
1227 |
+
}
|
1228 |
+
return longest;
|
1229 |
+
}
|
1230 |
+
function _alignPixel(chart, pixel, width) {
|
1231 |
+
const devicePixelRatio = chart.currentDevicePixelRatio;
|
1232 |
+
const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;
|
1233 |
+
return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;
|
1234 |
+
}
|
1235 |
+
function clearCanvas(canvas, ctx) {
|
1236 |
+
ctx = ctx || canvas.getContext('2d');
|
1237 |
+
ctx.save();
|
1238 |
+
ctx.resetTransform();
|
1239 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
1240 |
+
ctx.restore();
|
1241 |
+
}
|
1242 |
+
function drawPoint(ctx, options, x, y) {
|
1243 |
+
let type, xOffset, yOffset, size, cornerRadius;
|
1244 |
+
const style = options.pointStyle;
|
1245 |
+
const rotation = options.rotation;
|
1246 |
+
const radius = options.radius;
|
1247 |
+
let rad = (rotation || 0) * RAD_PER_DEG;
|
1248 |
+
if (style && typeof style === 'object') {
|
1249 |
+
type = style.toString();
|
1250 |
+
if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {
|
1251 |
+
ctx.save();
|
1252 |
+
ctx.translate(x, y);
|
1253 |
+
ctx.rotate(rad);
|
1254 |
+
ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);
|
1255 |
+
ctx.restore();
|
1256 |
+
return;
|
1257 |
+
}
|
1258 |
+
}
|
1259 |
+
if (isNaN(radius) || radius <= 0) {
|
1260 |
+
return;
|
1261 |
+
}
|
1262 |
+
ctx.beginPath();
|
1263 |
+
switch (style) {
|
1264 |
+
default:
|
1265 |
+
ctx.arc(x, y, radius, 0, TAU);
|
1266 |
+
ctx.closePath();
|
1267 |
+
break;
|
1268 |
+
case 'triangle':
|
1269 |
+
ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1270 |
+
rad += TWO_THIRDS_PI;
|
1271 |
+
ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1272 |
+
rad += TWO_THIRDS_PI;
|
1273 |
+
ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);
|
1274 |
+
ctx.closePath();
|
1275 |
+
break;
|
1276 |
+
case 'rectRounded':
|
1277 |
+
cornerRadius = radius * 0.516;
|
1278 |
+
size = radius - cornerRadius;
|
1279 |
+
xOffset = Math.cos(rad + QUARTER_PI) * size;
|
1280 |
+
yOffset = Math.sin(rad + QUARTER_PI) * size;
|
1281 |
+
ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);
|
1282 |
+
ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);
|
1283 |
+
ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);
|
1284 |
+
ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);
|
1285 |
+
ctx.closePath();
|
1286 |
+
break;
|
1287 |
+
case 'rect':
|
1288 |
+
if (!rotation) {
|
1289 |
+
size = Math.SQRT1_2 * radius;
|
1290 |
+
ctx.rect(x - size, y - size, 2 * size, 2 * size);
|
1291 |
+
break;
|
1292 |
+
}
|
1293 |
+
rad += QUARTER_PI;
|
1294 |
+
case 'rectRot':
|
1295 |
+
xOffset = Math.cos(rad) * radius;
|
1296 |
+
yOffset = Math.sin(rad) * radius;
|
1297 |
+
ctx.moveTo(x - xOffset, y - yOffset);
|
1298 |
+
ctx.lineTo(x + yOffset, y - xOffset);
|
1299 |
+
ctx.lineTo(x + xOffset, y + yOffset);
|
1300 |
+
ctx.lineTo(x - yOffset, y + xOffset);
|
1301 |
+
ctx.closePath();
|
1302 |
+
break;
|
1303 |
+
case 'crossRot':
|
1304 |
+
rad += QUARTER_PI;
|
1305 |
+
case 'cross':
|
1306 |
+
xOffset = Math.cos(rad) * radius;
|
1307 |
+
yOffset = Math.sin(rad) * radius;
|
1308 |
+
ctx.moveTo(x - xOffset, y - yOffset);
|
1309 |
+
ctx.lineTo(x + xOffset, y + yOffset);
|
1310 |
+
ctx.moveTo(x + yOffset, y - xOffset);
|
1311 |
+
ctx.lineTo(x - yOffset, y + xOffset);
|
1312 |
+
break;
|
1313 |
+
case 'star':
|
1314 |
+
xOffset = Math.cos(rad) * radius;
|
1315 |
+
yOffset = Math.sin(rad) * radius;
|
1316 |
+
ctx.moveTo(x - xOffset, y - yOffset);
|
1317 |
+
ctx.lineTo(x + xOffset, y + yOffset);
|
1318 |
+
ctx.moveTo(x + yOffset, y - xOffset);
|
1319 |
+
ctx.lineTo(x - yOffset, y + xOffset);
|
1320 |
+
rad += QUARTER_PI;
|
1321 |
+
xOffset = Math.cos(rad) * radius;
|
1322 |
+
yOffset = Math.sin(rad) * radius;
|
1323 |
+
ctx.moveTo(x - xOffset, y - yOffset);
|
1324 |
+
ctx.lineTo(x + xOffset, y + yOffset);
|
1325 |
+
ctx.moveTo(x + yOffset, y - xOffset);
|
1326 |
+
ctx.lineTo(x - yOffset, y + xOffset);
|
1327 |
+
break;
|
1328 |
+
case 'line':
|
1329 |
+
xOffset = Math.cos(rad) * radius;
|
1330 |
+
yOffset = Math.sin(rad) * radius;
|
1331 |
+
ctx.moveTo(x - xOffset, y - yOffset);
|
1332 |
+
ctx.lineTo(x + xOffset, y + yOffset);
|
1333 |
+
break;
|
1334 |
+
case 'dash':
|
1335 |
+
ctx.moveTo(x, y);
|
1336 |
+
ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);
|
1337 |
+
break;
|
1338 |
+
}
|
1339 |
+
ctx.fill();
|
1340 |
+
if (options.borderWidth > 0) {
|
1341 |
+
ctx.stroke();
|
1342 |
+
}
|
1343 |
+
}
|
1344 |
+
function _isPointInArea(point, area, margin) {
|
1345 |
+
margin = margin || 0.5;
|
1346 |
+
return !area || (point && point.x > area.left - margin && point.x < area.right + margin &&
|
1347 |
+
point.y > area.top - margin && point.y < area.bottom + margin);
|
1348 |
+
}
|
1349 |
+
function clipArea(ctx, area) {
|
1350 |
+
ctx.save();
|
1351 |
+
ctx.beginPath();
|
1352 |
+
ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);
|
1353 |
+
ctx.clip();
|
1354 |
+
}
|
1355 |
+
function unclipArea(ctx) {
|
1356 |
+
ctx.restore();
|
1357 |
+
}
|
1358 |
+
function _steppedLineTo(ctx, previous, target, flip, mode) {
|
1359 |
+
if (!previous) {
|
1360 |
+
return ctx.lineTo(target.x, target.y);
|
1361 |
+
}
|
1362 |
+
if (mode === 'middle') {
|
1363 |
+
const midpoint = (previous.x + target.x) / 2.0;
|
1364 |
+
ctx.lineTo(midpoint, previous.y);
|
1365 |
+
ctx.lineTo(midpoint, target.y);
|
1366 |
+
} else if (mode === 'after' !== !!flip) {
|
1367 |
+
ctx.lineTo(previous.x, target.y);
|
1368 |
+
} else {
|
1369 |
+
ctx.lineTo(target.x, previous.y);
|
1370 |
+
}
|
1371 |
+
ctx.lineTo(target.x, target.y);
|
1372 |
+
}
|
1373 |
+
function _bezierCurveTo(ctx, previous, target, flip) {
|
1374 |
+
if (!previous) {
|
1375 |
+
return ctx.lineTo(target.x, target.y);
|
1376 |
+
}
|
1377 |
+
ctx.bezierCurveTo(
|
1378 |
+
flip ? previous.cp1x : previous.cp2x,
|
1379 |
+
flip ? previous.cp1y : previous.cp2y,
|
1380 |
+
flip ? target.cp2x : target.cp1x,
|
1381 |
+
flip ? target.cp2y : target.cp1y,
|
1382 |
+
target.x,
|
1383 |
+
target.y);
|
1384 |
+
}
|
1385 |
+
function renderText(ctx, text, x, y, font, opts = {}) {
|
1386 |
+
const lines = isArray(text) ? text : [text];
|
1387 |
+
const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';
|
1388 |
+
let i, line;
|
1389 |
+
ctx.save();
|
1390 |
+
ctx.font = font.string;
|
1391 |
+
setRenderOpts(ctx, opts);
|
1392 |
+
for (i = 0; i < lines.length; ++i) {
|
1393 |
+
line = lines[i];
|
1394 |
+
if (stroke) {
|
1395 |
+
if (opts.strokeColor) {
|
1396 |
+
ctx.strokeStyle = opts.strokeColor;
|
1397 |
+
}
|
1398 |
+
if (!isNullOrUndef(opts.strokeWidth)) {
|
1399 |
+
ctx.lineWidth = opts.strokeWidth;
|
1400 |
+
}
|
1401 |
+
ctx.strokeText(line, x, y, opts.maxWidth);
|
1402 |
+
}
|
1403 |
+
ctx.fillText(line, x, y, opts.maxWidth);
|
1404 |
+
decorateText(ctx, x, y, line, opts);
|
1405 |
+
y += font.lineHeight;
|
1406 |
+
}
|
1407 |
+
ctx.restore();
|
1408 |
+
}
|
1409 |
+
function setRenderOpts(ctx, opts) {
|
1410 |
+
if (opts.translation) {
|
1411 |
+
ctx.translate(opts.translation[0], opts.translation[1]);
|
1412 |
+
}
|
1413 |
+
if (!isNullOrUndef(opts.rotation)) {
|
1414 |
+
ctx.rotate(opts.rotation);
|
1415 |
+
}
|
1416 |
+
if (opts.color) {
|
1417 |
+
ctx.fillStyle = opts.color;
|
1418 |
+
}
|
1419 |
+
if (opts.textAlign) {
|
1420 |
+
ctx.textAlign = opts.textAlign;
|
1421 |
+
}
|
1422 |
+
if (opts.textBaseline) {
|
1423 |
+
ctx.textBaseline = opts.textBaseline;
|
1424 |
+
}
|
1425 |
+
}
|
1426 |
+
function decorateText(ctx, x, y, line, opts) {
|
1427 |
+
if (opts.strikethrough || opts.underline) {
|
1428 |
+
const metrics = ctx.measureText(line);
|
1429 |
+
const left = x - metrics.actualBoundingBoxLeft;
|
1430 |
+
const right = x + metrics.actualBoundingBoxRight;
|
1431 |
+
const top = y - metrics.actualBoundingBoxAscent;
|
1432 |
+
const bottom = y + metrics.actualBoundingBoxDescent;
|
1433 |
+
const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;
|
1434 |
+
ctx.strokeStyle = ctx.fillStyle;
|
1435 |
+
ctx.beginPath();
|
1436 |
+
ctx.lineWidth = opts.decorationWidth || 2;
|
1437 |
+
ctx.moveTo(left, yDecoration);
|
1438 |
+
ctx.lineTo(right, yDecoration);
|
1439 |
+
ctx.stroke();
|
1440 |
+
}
|
1441 |
+
}
|
1442 |
+
function addRoundedRectPath(ctx, rect) {
|
1443 |
+
const {x, y, w, h, radius} = rect;
|
1444 |
+
ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);
|
1445 |
+
ctx.lineTo(x, y + h - radius.bottomLeft);
|
1446 |
+
ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);
|
1447 |
+
ctx.lineTo(x + w - radius.bottomRight, y + h);
|
1448 |
+
ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);
|
1449 |
+
ctx.lineTo(x + w, y + radius.topRight);
|
1450 |
+
ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);
|
1451 |
+
ctx.lineTo(x + radius.topLeft, y);
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
function _lookup(table, value, cmp) {
|
1455 |
+
cmp = cmp || ((index) => table[index] < value);
|
1456 |
+
let hi = table.length - 1;
|
1457 |
+
let lo = 0;
|
1458 |
+
let mid;
|
1459 |
+
while (hi - lo > 1) {
|
1460 |
+
mid = (lo + hi) >> 1;
|
1461 |
+
if (cmp(mid)) {
|
1462 |
+
lo = mid;
|
1463 |
+
} else {
|
1464 |
+
hi = mid;
|
1465 |
+
}
|
1466 |
+
}
|
1467 |
+
return {lo, hi};
|
1468 |
+
}
|
1469 |
+
const _lookupByKey = (table, key, value) =>
|
1470 |
+
_lookup(table, value, index => table[index][key] < value);
|
1471 |
+
const _rlookupByKey = (table, key, value) =>
|
1472 |
+
_lookup(table, value, index => table[index][key] >= value);
|
1473 |
+
function _filterBetween(values, min, max) {
|
1474 |
+
let start = 0;
|
1475 |
+
let end = values.length;
|
1476 |
+
while (start < end && values[start] < min) {
|
1477 |
+
start++;
|
1478 |
+
}
|
1479 |
+
while (end > start && values[end - 1] > max) {
|
1480 |
+
end--;
|
1481 |
+
}
|
1482 |
+
return start > 0 || end < values.length
|
1483 |
+
? values.slice(start, end)
|
1484 |
+
: values;
|
1485 |
+
}
|
1486 |
+
const arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
|
1487 |
+
function listenArrayEvents(array, listener) {
|
1488 |
+
if (array._chartjs) {
|
1489 |
+
array._chartjs.listeners.push(listener);
|
1490 |
+
return;
|
1491 |
+
}
|
1492 |
+
Object.defineProperty(array, '_chartjs', {
|
1493 |
+
configurable: true,
|
1494 |
+
enumerable: false,
|
1495 |
+
value: {
|
1496 |
+
listeners: [listener]
|
1497 |
+
}
|
1498 |
+
});
|
1499 |
+
arrayEvents.forEach((key) => {
|
1500 |
+
const method = '_onData' + _capitalize(key);
|
1501 |
+
const base = array[key];
|
1502 |
+
Object.defineProperty(array, key, {
|
1503 |
+
configurable: true,
|
1504 |
+
enumerable: false,
|
1505 |
+
value(...args) {
|
1506 |
+
const res = base.apply(this, args);
|
1507 |
+
array._chartjs.listeners.forEach((object) => {
|
1508 |
+
if (typeof object[method] === 'function') {
|
1509 |
+
object[method](...args);
|
1510 |
+
}
|
1511 |
+
});
|
1512 |
+
return res;
|
1513 |
+
}
|
1514 |
+
});
|
1515 |
+
});
|
1516 |
+
}
|
1517 |
+
function unlistenArrayEvents(array, listener) {
|
1518 |
+
const stub = array._chartjs;
|
1519 |
+
if (!stub) {
|
1520 |
+
return;
|
1521 |
+
}
|
1522 |
+
const listeners = stub.listeners;
|
1523 |
+
const index = listeners.indexOf(listener);
|
1524 |
+
if (index !== -1) {
|
1525 |
+
listeners.splice(index, 1);
|
1526 |
+
}
|
1527 |
+
if (listeners.length > 0) {
|
1528 |
+
return;
|
1529 |
+
}
|
1530 |
+
arrayEvents.forEach((key) => {
|
1531 |
+
delete array[key];
|
1532 |
+
});
|
1533 |
+
delete array._chartjs;
|
1534 |
+
}
|
1535 |
+
function _arrayUnique(items) {
|
1536 |
+
const set = new Set();
|
1537 |
+
let i, ilen;
|
1538 |
+
for (i = 0, ilen = items.length; i < ilen; ++i) {
|
1539 |
+
set.add(items[i]);
|
1540 |
+
}
|
1541 |
+
if (set.size === ilen) {
|
1542 |
+
return items;
|
1543 |
+
}
|
1544 |
+
return Array.from(set);
|
1545 |
+
}
|
1546 |
+
|
1547 |
+
function _isDomSupported() {
|
1548 |
+
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
1549 |
+
}
|
1550 |
+
function _getParentNode(domNode) {
|
1551 |
+
let parent = domNode.parentNode;
|
1552 |
+
if (parent && parent.toString() === '[object ShadowRoot]') {
|
1553 |
+
parent = parent.host;
|
1554 |
+
}
|
1555 |
+
return parent;
|
1556 |
+
}
|
1557 |
+
function parseMaxStyle(styleValue, node, parentProperty) {
|
1558 |
+
let valueInPixels;
|
1559 |
+
if (typeof styleValue === 'string') {
|
1560 |
+
valueInPixels = parseInt(styleValue, 10);
|
1561 |
+
if (styleValue.indexOf('%') !== -1) {
|
1562 |
+
valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];
|
1563 |
+
}
|
1564 |
+
} else {
|
1565 |
+
valueInPixels = styleValue;
|
1566 |
+
}
|
1567 |
+
return valueInPixels;
|
1568 |
+
}
|
1569 |
+
const getComputedStyle = (element) => window.getComputedStyle(element, null);
|
1570 |
+
function getStyle(el, property) {
|
1571 |
+
return getComputedStyle(el).getPropertyValue(property);
|
1572 |
+
}
|
1573 |
+
const positions = ['top', 'right', 'bottom', 'left'];
|
1574 |
+
function getPositionedStyle(styles, style, suffix) {
|
1575 |
+
const result = {};
|
1576 |
+
suffix = suffix ? '-' + suffix : '';
|
1577 |
+
for (let i = 0; i < 4; i++) {
|
1578 |
+
const pos = positions[i];
|
1579 |
+
result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;
|
1580 |
+
}
|
1581 |
+
result.width = result.left + result.right;
|
1582 |
+
result.height = result.top + result.bottom;
|
1583 |
+
return result;
|
1584 |
+
}
|
1585 |
+
const useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);
|
1586 |
+
function getCanvasPosition(evt, canvas) {
|
1587 |
+
const e = evt.native || evt;
|
1588 |
+
const touches = e.touches;
|
1589 |
+
const source = touches && touches.length ? touches[0] : e;
|
1590 |
+
const {offsetX, offsetY} = source;
|
1591 |
+
let box = false;
|
1592 |
+
let x, y;
|
1593 |
+
if (useOffsetPos(offsetX, offsetY, e.target)) {
|
1594 |
+
x = offsetX;
|
1595 |
+
y = offsetY;
|
1596 |
+
} else {
|
1597 |
+
const rect = canvas.getBoundingClientRect();
|
1598 |
+
x = source.clientX - rect.left;
|
1599 |
+
y = source.clientY - rect.top;
|
1600 |
+
box = true;
|
1601 |
+
}
|
1602 |
+
return {x, y, box};
|
1603 |
+
}
|
1604 |
+
function getRelativePosition$1(evt, chart) {
|
1605 |
+
const {canvas, currentDevicePixelRatio} = chart;
|
1606 |
+
const style = getComputedStyle(canvas);
|
1607 |
+
const borderBox = style.boxSizing === 'border-box';
|
1608 |
+
const paddings = getPositionedStyle(style, 'padding');
|
1609 |
+
const borders = getPositionedStyle(style, 'border', 'width');
|
1610 |
+
const {x, y, box} = getCanvasPosition(evt, canvas);
|
1611 |
+
const xOffset = paddings.left + (box && borders.left);
|
1612 |
+
const yOffset = paddings.top + (box && borders.top);
|
1613 |
+
let {width, height} = chart;
|
1614 |
+
if (borderBox) {
|
1615 |
+
width -= paddings.width + borders.width;
|
1616 |
+
height -= paddings.height + borders.height;
|
1617 |
+
}
|
1618 |
+
return {
|
1619 |
+
x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),
|
1620 |
+
y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)
|
1621 |
+
};
|
1622 |
+
}
|
1623 |
+
function getContainerSize(canvas, width, height) {
|
1624 |
+
let maxWidth, maxHeight;
|
1625 |
+
if (width === undefined || height === undefined) {
|
1626 |
+
const container = _getParentNode(canvas);
|
1627 |
+
if (!container) {
|
1628 |
+
width = canvas.clientWidth;
|
1629 |
+
height = canvas.clientHeight;
|
1630 |
+
} else {
|
1631 |
+
const rect = container.getBoundingClientRect();
|
1632 |
+
const containerStyle = getComputedStyle(container);
|
1633 |
+
const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');
|
1634 |
+
const containerPadding = getPositionedStyle(containerStyle, 'padding');
|
1635 |
+
width = rect.width - containerPadding.width - containerBorder.width;
|
1636 |
+
height = rect.height - containerPadding.height - containerBorder.height;
|
1637 |
+
maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');
|
1638 |
+
maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');
|
1639 |
+
}
|
1640 |
+
}
|
1641 |
+
return {
|
1642 |
+
width,
|
1643 |
+
height,
|
1644 |
+
maxWidth: maxWidth || INFINITY,
|
1645 |
+
maxHeight: maxHeight || INFINITY
|
1646 |
+
};
|
1647 |
+
}
|
1648 |
+
const round1 = v => Math.round(v * 10) / 10;
|
1649 |
+
function getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {
|
1650 |
+
const style = getComputedStyle(canvas);
|
1651 |
+
const margins = getPositionedStyle(style, 'margin');
|
1652 |
+
const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;
|
1653 |
+
const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;
|
1654 |
+
const containerSize = getContainerSize(canvas, bbWidth, bbHeight);
|
1655 |
+
let {width, height} = containerSize;
|
1656 |
+
if (style.boxSizing === 'content-box') {
|
1657 |
+
const borders = getPositionedStyle(style, 'border', 'width');
|
1658 |
+
const paddings = getPositionedStyle(style, 'padding');
|
1659 |
+
width -= paddings.width + borders.width;
|
1660 |
+
height -= paddings.height + borders.height;
|
1661 |
+
}
|
1662 |
+
width = Math.max(0, width - margins.width);
|
1663 |
+
height = Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height - margins.height);
|
1664 |
+
width = round1(Math.min(width, maxWidth, containerSize.maxWidth));
|
1665 |
+
height = round1(Math.min(height, maxHeight, containerSize.maxHeight));
|
1666 |
+
if (width && !height) {
|
1667 |
+
height = round1(width / 2);
|
1668 |
+
}
|
1669 |
+
return {
|
1670 |
+
width,
|
1671 |
+
height
|
1672 |
+
};
|
1673 |
+
}
|
1674 |
+
function retinaScale(chart, forceRatio, forceStyle) {
|
1675 |
+
const pixelRatio = forceRatio || 1;
|
1676 |
+
const deviceHeight = Math.floor(chart.height * pixelRatio);
|
1677 |
+
const deviceWidth = Math.floor(chart.width * pixelRatio);
|
1678 |
+
chart.height = deviceHeight / pixelRatio;
|
1679 |
+
chart.width = deviceWidth / pixelRatio;
|
1680 |
+
const canvas = chart.canvas;
|
1681 |
+
if (canvas.style && (forceStyle || (!canvas.style.height && !canvas.style.width))) {
|
1682 |
+
canvas.style.height = `${chart.height}px`;
|
1683 |
+
canvas.style.width = `${chart.width}px`;
|
1684 |
+
}
|
1685 |
+
if (chart.currentDevicePixelRatio !== pixelRatio
|
1686 |
+
|| canvas.height !== deviceHeight
|
1687 |
+
|| canvas.width !== deviceWidth) {
|
1688 |
+
chart.currentDevicePixelRatio = pixelRatio;
|
1689 |
+
canvas.height = deviceHeight;
|
1690 |
+
canvas.width = deviceWidth;
|
1691 |
+
chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
|
1692 |
+
return true;
|
1693 |
+
}
|
1694 |
+
return false;
|
1695 |
+
}
|
1696 |
+
const supportsEventListenerOptions = (function() {
|
1697 |
+
let passiveSupported = false;
|
1698 |
+
try {
|
1699 |
+
const options = {
|
1700 |
+
get passive() {
|
1701 |
+
passiveSupported = true;
|
1702 |
+
return false;
|
1703 |
+
}
|
1704 |
+
};
|
1705 |
+
window.addEventListener('test', null, options);
|
1706 |
+
window.removeEventListener('test', null, options);
|
1707 |
+
} catch (e) {
|
1708 |
+
}
|
1709 |
+
return passiveSupported;
|
1710 |
+
}());
|
1711 |
+
function readUsedSize(element, property) {
|
1712 |
+
const value = getStyle(element, property);
|
1713 |
+
const matches = value && value.match(/^(\d+)(\.\d+)?px$/);
|
1714 |
+
return matches ? +matches[1] : undefined;
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
function getRelativePosition(e, chart) {
|
1718 |
+
if ('native' in e) {
|
1719 |
+
return {
|
1720 |
+
x: e.x,
|
1721 |
+
y: e.y
|
1722 |
+
};
|
1723 |
+
}
|
1724 |
+
return getRelativePosition$1(e, chart);
|
1725 |
+
}
|
1726 |
+
function evaluateAllVisibleItems(chart, handler) {
|
1727 |
+
const metasets = chart.getSortedVisibleDatasetMetas();
|
1728 |
+
let index, data, element;
|
1729 |
+
for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
|
1730 |
+
({index, data} = metasets[i]);
|
1731 |
+
for (let j = 0, jlen = data.length; j < jlen; ++j) {
|
1732 |
+
element = data[j];
|
1733 |
+
if (!element.skip) {
|
1734 |
+
handler(element, index, j);
|
1735 |
+
}
|
1736 |
+
}
|
1737 |
+
}
|
1738 |
+
}
|
1739 |
+
function binarySearch(metaset, axis, value, intersect) {
|
1740 |
+
const {controller, data, _sorted} = metaset;
|
1741 |
+
const iScale = controller._cachedMeta.iScale;
|
1742 |
+
if (iScale && axis === iScale.axis && _sorted && data.length) {
|
1743 |
+
const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;
|
1744 |
+
if (!intersect) {
|
1745 |
+
return lookupMethod(data, axis, value);
|
1746 |
+
} else if (controller._sharedOptions) {
|
1747 |
+
const el = data[0];
|
1748 |
+
const range = typeof el.getRange === 'function' && el.getRange(axis);
|
1749 |
+
if (range) {
|
1750 |
+
const start = lookupMethod(data, axis, value - range);
|
1751 |
+
const end = lookupMethod(data, axis, value + range);
|
1752 |
+
return {lo: start.lo, hi: end.hi};
|
1753 |
+
}
|
1754 |
+
}
|
1755 |
+
}
|
1756 |
+
return {lo: 0, hi: data.length - 1};
|
1757 |
+
}
|
1758 |
+
function optimizedEvaluateItems(chart, axis, position, handler, intersect) {
|
1759 |
+
const metasets = chart.getSortedVisibleDatasetMetas();
|
1760 |
+
const value = position[axis];
|
1761 |
+
for (let i = 0, ilen = metasets.length; i < ilen; ++i) {
|
1762 |
+
const {index, data} = metasets[i];
|
1763 |
+
const {lo, hi} = binarySearch(metasets[i], axis, value, intersect);
|
1764 |
+
for (let j = lo; j <= hi; ++j) {
|
1765 |
+
const element = data[j];
|
1766 |
+
if (!element.skip) {
|
1767 |
+
handler(element, index, j);
|
1768 |
+
}
|
1769 |
+
}
|
1770 |
+
}
|
1771 |
+
}
|
1772 |
+
function getDistanceMetricForAxis(axis) {
|
1773 |
+
const useX = axis.indexOf('x') !== -1;
|
1774 |
+
const useY = axis.indexOf('y') !== -1;
|
1775 |
+
return function(pt1, pt2) {
|
1776 |
+
const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;
|
1777 |
+
const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;
|
1778 |
+
return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
|
1779 |
+
};
|
1780 |
+
}
|
1781 |
+
function getIntersectItems(chart, position, axis, useFinalPosition) {
|
1782 |
+
const items = [];
|
1783 |
+
if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
|
1784 |
+
return items;
|
1785 |
+
}
|
1786 |
+
const evaluationFunc = function(element, datasetIndex, index) {
|
1787 |
+
if (element.inRange(position.x, position.y, useFinalPosition)) {
|
1788 |
+
items.push({element, datasetIndex, index});
|
1789 |
+
}
|
1790 |
+
};
|
1791 |
+
optimizedEvaluateItems(chart, axis, position, evaluationFunc, true);
|
1792 |
+
return items;
|
1793 |
+
}
|
1794 |
+
function getNearestItems(chart, position, axis, intersect, useFinalPosition) {
|
1795 |
+
const distanceMetric = getDistanceMetricForAxis(axis);
|
1796 |
+
let minDistance = Number.POSITIVE_INFINITY;
|
1797 |
+
let items = [];
|
1798 |
+
if (!_isPointInArea(position, chart.chartArea, chart._minPadding)) {
|
1799 |
+
return items;
|
1800 |
+
}
|
1801 |
+
const evaluationFunc = function(element, datasetIndex, index) {
|
1802 |
+
if (intersect && !element.inRange(position.x, position.y, useFinalPosition)) {
|
1803 |
+
return;
|
1804 |
+
}
|
1805 |
+
const center = element.getCenterPoint(useFinalPosition);
|
1806 |
+
if (!_isPointInArea(center, chart.chartArea, chart._minPadding) && !element.inRange(position.x, position.y, useFinalPosition)) {
|
1807 |
+
return;
|
1808 |
+
}
|
1809 |
+
const distance = distanceMetric(position, center);
|
1810 |
+
if (distance < minDistance) {
|
1811 |
+
items = [{element, datasetIndex, index}];
|
1812 |
+
minDistance = distance;
|
1813 |
+
} else if (distance === minDistance) {
|
1814 |
+
items.push({element, datasetIndex, index});
|
1815 |
+
}
|
1816 |
+
};
|
1817 |
+
optimizedEvaluateItems(chart, axis, position, evaluationFunc);
|
1818 |
+
return items;
|
1819 |
+
}
|
1820 |
+
function getAxisItems(chart, e, options, useFinalPosition) {
|
1821 |
+
const position = getRelativePosition(e, chart);
|
1822 |
+
const items = [];
|
1823 |
+
const axis = options.axis;
|
1824 |
+
const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';
|
1825 |
+
let intersectsItem = false;
|
1826 |
+
evaluateAllVisibleItems(chart, (element, datasetIndex, index) => {
|
1827 |
+
if (element[rangeMethod](position[axis], useFinalPosition)) {
|
1828 |
+
items.push({element, datasetIndex, index});
|
1829 |
+
}
|
1830 |
+
if (element.inRange(position.x, position.y, useFinalPosition)) {
|
1831 |
+
intersectsItem = true;
|
1832 |
+
}
|
1833 |
+
});
|
1834 |
+
if (options.intersect && !intersectsItem) {
|
1835 |
+
return [];
|
1836 |
+
}
|
1837 |
+
return items;
|
1838 |
+
}
|
1839 |
+
var Interaction = {
|
1840 |
+
modes: {
|
1841 |
+
index(chart, e, options, useFinalPosition) {
|
1842 |
+
const position = getRelativePosition(e, chart);
|
1843 |
+
const axis = options.axis || 'x';
|
1844 |
+
const items = options.intersect
|
1845 |
+
? getIntersectItems(chart, position, axis, useFinalPosition)
|
1846 |
+
: getNearestItems(chart, position, axis, false, useFinalPosition);
|
1847 |
+
const elements = [];
|
1848 |
+
if (!items.length) {
|
1849 |
+
return [];
|
1850 |
+
}
|
1851 |
+
chart.getSortedVisibleDatasetMetas().forEach((meta) => {
|
1852 |
+
const index = items[0].index;
|
1853 |
+
const element = meta.data[index];
|
1854 |
+
if (element && !element.skip) {
|
1855 |
+
elements.push({element, datasetIndex: meta.index, index});
|
1856 |
+
}
|
1857 |
+
});
|
1858 |
+
return elements;
|
1859 |
+
},
|
1860 |
+
dataset(chart, e, options, useFinalPosition) {
|
1861 |
+
const position = getRelativePosition(e, chart);
|
1862 |
+
const axis = options.axis || 'xy';
|
1863 |
+
let items = options.intersect
|
1864 |
+
? getIntersectItems(chart, position, axis, useFinalPosition) :
|
1865 |
+
getNearestItems(chart, position, axis, false, useFinalPosition);
|
1866 |
+
if (items.length > 0) {
|
1867 |
+
const datasetIndex = items[0].datasetIndex;
|
1868 |
+
const data = chart.getDatasetMeta(datasetIndex).data;
|
1869 |
+
items = [];
|
1870 |
+
for (let i = 0; i < data.length; ++i) {
|
1871 |
+
items.push({element: data[i], datasetIndex, index: i});
|
1872 |
+
}
|
1873 |
+
}
|
1874 |
+
return items;
|
1875 |
+
},
|
1876 |
+
point(chart, e, options, useFinalPosition) {
|
1877 |
+
const position = getRelativePosition(e, chart);
|
1878 |
+
const axis = options.axis || 'xy';
|
1879 |
+
return getIntersectItems(chart, position, axis, useFinalPosition);
|
1880 |
+
},
|
1881 |
+
nearest(chart, e, options, useFinalPosition) {
|
1882 |
+
const position = getRelativePosition(e, chart);
|
1883 |
+
const axis = options.axis || 'xy';
|
1884 |
+
return getNearestItems(chart, position, axis, options.intersect, useFinalPosition);
|
1885 |
+
},
|
1886 |
+
x(chart, e, options, useFinalPosition) {
|
1887 |
+
return getAxisItems(chart, e, {axis: 'x', intersect: options.intersect}, useFinalPosition);
|
1888 |
+
},
|
1889 |
+
y(chart, e, options, useFinalPosition) {
|
1890 |
+
return getAxisItems(chart, e, {axis: 'y', intersect: options.intersect}, useFinalPosition);
|
1891 |
+
}
|
1892 |
+
}
|
1893 |
+
};
|
1894 |
+
|
1895 |
+
const LINE_HEIGHT = new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);
|
1896 |
+
const FONT_STYLE = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);
|
1897 |
+
function toLineHeight(value, size) {
|
1898 |
+
const matches = ('' + value).match(LINE_HEIGHT);
|
1899 |
+
if (!matches || matches[1] === 'normal') {
|
1900 |
+
return size * 1.2;
|
1901 |
+
}
|
1902 |
+
value = +matches[2];
|
1903 |
+
switch (matches[3]) {
|
1904 |
+
case 'px':
|
1905 |
+
return value;
|
1906 |
+
case '%':
|
1907 |
+
value /= 100;
|
1908 |
+
break;
|
1909 |
+
}
|
1910 |
+
return size * value;
|
1911 |
+
}
|
1912 |
+
const numberOrZero$1 = v => +v || 0;
|
1913 |
+
function _readValueToProps(value, props) {
|
1914 |
+
const ret = {};
|
1915 |
+
const objProps = isObject(props);
|
1916 |
+
const keys = objProps ? Object.keys(props) : props;
|
1917 |
+
const read = isObject(value)
|
1918 |
+
? objProps
|
1919 |
+
? prop => valueOrDefault(value[prop], value[props[prop]])
|
1920 |
+
: prop => value[prop]
|
1921 |
+
: () => value;
|
1922 |
+
for (const prop of keys) {
|
1923 |
+
ret[prop] = numberOrZero$1(read(prop));
|
1924 |
+
}
|
1925 |
+
return ret;
|
1926 |
+
}
|
1927 |
+
function toTRBL(value) {
|
1928 |
+
return _readValueToProps(value, {top: 'y', right: 'x', bottom: 'y', left: 'x'});
|
1929 |
+
}
|
1930 |
+
function toTRBLCorners(value) {
|
1931 |
+
return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);
|
1932 |
+
}
|
1933 |
+
function toPadding(value) {
|
1934 |
+
const obj = toTRBL(value);
|
1935 |
+
obj.width = obj.left + obj.right;
|
1936 |
+
obj.height = obj.top + obj.bottom;
|
1937 |
+
return obj;
|
1938 |
+
}
|
1939 |
+
function toFont(options, fallback) {
|
1940 |
+
options = options || {};
|
1941 |
+
fallback = fallback || defaults.font;
|
1942 |
+
let size = valueOrDefault(options.size, fallback.size);
|
1943 |
+
if (typeof size === 'string') {
|
1944 |
+
size = parseInt(size, 10);
|
1945 |
+
}
|
1946 |
+
let style = valueOrDefault(options.style, fallback.style);
|
1947 |
+
if (style && !('' + style).match(FONT_STYLE)) {
|
1948 |
+
console.warn('Invalid font style specified: "' + style + '"');
|
1949 |
+
style = '';
|
1950 |
+
}
|
1951 |
+
const font = {
|
1952 |
+
family: valueOrDefault(options.family, fallback.family),
|
1953 |
+
lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),
|
1954 |
+
size,
|
1955 |
+
style,
|
1956 |
+
weight: valueOrDefault(options.weight, fallback.weight),
|
1957 |
+
string: ''
|
1958 |
+
};
|
1959 |
+
font.string = toFontString(font);
|
1960 |
+
return font;
|
1961 |
+
}
|
1962 |
+
function resolve(inputs, context, index, info) {
|
1963 |
+
let cacheable = true;
|
1964 |
+
let i, ilen, value;
|
1965 |
+
for (i = 0, ilen = inputs.length; i < ilen; ++i) {
|
1966 |
+
value = inputs[i];
|
1967 |
+
if (value === undefined) {
|
1968 |
+
continue;
|
1969 |
+
}
|
1970 |
+
if (context !== undefined && typeof value === 'function') {
|
1971 |
+
value = value(context);
|
1972 |
+
cacheable = false;
|
1973 |
+
}
|
1974 |
+
if (index !== undefined && isArray(value)) {
|
1975 |
+
value = value[index % value.length];
|
1976 |
+
cacheable = false;
|
1977 |
+
}
|
1978 |
+
if (value !== undefined) {
|
1979 |
+
if (info && !cacheable) {
|
1980 |
+
info.cacheable = false;
|
1981 |
+
}
|
1982 |
+
return value;
|
1983 |
+
}
|
1984 |
+
}
|
1985 |
+
}
|
1986 |
+
function _addGrace(minmax, grace, beginAtZero) {
|
1987 |
+
const {min, max} = minmax;
|
1988 |
+
const change = toDimension(grace, (max - min) / 2);
|
1989 |
+
const keepZero = (value, add) => beginAtZero && value === 0 ? 0 : value + add;
|
1990 |
+
return {
|
1991 |
+
min: keepZero(min, -Math.abs(change)),
|
1992 |
+
max: keepZero(max, change)
|
1993 |
+
};
|
1994 |
+
}
|
1995 |
+
function createContext(parentContext, context) {
|
1996 |
+
return Object.assign(Object.create(parentContext), context);
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
const STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];
|
2000 |
+
function filterByPosition(array, position) {
|
2001 |
+
return array.filter(v => v.pos === position);
|
2002 |
+
}
|
2003 |
+
function filterDynamicPositionByAxis(array, axis) {
|
2004 |
+
return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);
|
2005 |
+
}
|
2006 |
+
function sortByWeight(array, reverse) {
|
2007 |
+
return array.sort((a, b) => {
|
2008 |
+
const v0 = reverse ? b : a;
|
2009 |
+
const v1 = reverse ? a : b;
|
2010 |
+
return v0.weight === v1.weight ?
|
2011 |
+
v0.index - v1.index :
|
2012 |
+
v0.weight - v1.weight;
|
2013 |
+
});
|
2014 |
+
}
|
2015 |
+
function wrapBoxes(boxes) {
|
2016 |
+
const layoutBoxes = [];
|
2017 |
+
let i, ilen, box, pos, stack, stackWeight;
|
2018 |
+
for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {
|
2019 |
+
box = boxes[i];
|
2020 |
+
({position: pos, options: {stack, stackWeight = 1}} = box);
|
2021 |
+
layoutBoxes.push({
|
2022 |
+
index: i,
|
2023 |
+
box,
|
2024 |
+
pos,
|
2025 |
+
horizontal: box.isHorizontal(),
|
2026 |
+
weight: box.weight,
|
2027 |
+
stack: stack && (pos + stack),
|
2028 |
+
stackWeight
|
2029 |
+
});
|
2030 |
+
}
|
2031 |
+
return layoutBoxes;
|
2032 |
+
}
|
2033 |
+
function buildStacks(layouts) {
|
2034 |
+
const stacks = {};
|
2035 |
+
for (const wrap of layouts) {
|
2036 |
+
const {stack, pos, stackWeight} = wrap;
|
2037 |
+
if (!stack || !STATIC_POSITIONS.includes(pos)) {
|
2038 |
+
continue;
|
2039 |
+
}
|
2040 |
+
const _stack = stacks[stack] || (stacks[stack] = {count: 0, placed: 0, weight: 0, size: 0});
|
2041 |
+
_stack.count++;
|
2042 |
+
_stack.weight += stackWeight;
|
2043 |
+
}
|
2044 |
+
return stacks;
|
2045 |
+
}
|
2046 |
+
function setLayoutDims(layouts, params) {
|
2047 |
+
const stacks = buildStacks(layouts);
|
2048 |
+
const {vBoxMaxWidth, hBoxMaxHeight} = params;
|
2049 |
+
let i, ilen, layout;
|
2050 |
+
for (i = 0, ilen = layouts.length; i < ilen; ++i) {
|
2051 |
+
layout = layouts[i];
|
2052 |
+
const {fullSize} = layout.box;
|
2053 |
+
const stack = stacks[layout.stack];
|
2054 |
+
const factor = stack && layout.stackWeight / stack.weight;
|
2055 |
+
if (layout.horizontal) {
|
2056 |
+
layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;
|
2057 |
+
layout.height = hBoxMaxHeight;
|
2058 |
+
} else {
|
2059 |
+
layout.width = vBoxMaxWidth;
|
2060 |
+
layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;
|
2061 |
+
}
|
2062 |
+
}
|
2063 |
+
return stacks;
|
2064 |
+
}
|
2065 |
+
function buildLayoutBoxes(boxes) {
|
2066 |
+
const layoutBoxes = wrapBoxes(boxes);
|
2067 |
+
const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);
|
2068 |
+
const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);
|
2069 |
+
const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));
|
2070 |
+
const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);
|
2071 |
+
const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));
|
2072 |
+
const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');
|
2073 |
+
const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');
|
2074 |
+
return {
|
2075 |
+
fullSize,
|
2076 |
+
leftAndTop: left.concat(top),
|
2077 |
+
rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),
|
2078 |
+
chartArea: filterByPosition(layoutBoxes, 'chartArea'),
|
2079 |
+
vertical: left.concat(right).concat(centerVertical),
|
2080 |
+
horizontal: top.concat(bottom).concat(centerHorizontal)
|
2081 |
+
};
|
2082 |
+
}
|
2083 |
+
function getCombinedMax(maxPadding, chartArea, a, b) {
|
2084 |
+
return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);
|
2085 |
+
}
|
2086 |
+
function updateMaxPadding(maxPadding, boxPadding) {
|
2087 |
+
maxPadding.top = Math.max(maxPadding.top, boxPadding.top);
|
2088 |
+
maxPadding.left = Math.max(maxPadding.left, boxPadding.left);
|
2089 |
+
maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);
|
2090 |
+
maxPadding.right = Math.max(maxPadding.right, boxPadding.right);
|
2091 |
+
}
|
2092 |
+
function updateDims(chartArea, params, layout, stacks) {
|
2093 |
+
const {pos, box} = layout;
|
2094 |
+
const maxPadding = chartArea.maxPadding;
|
2095 |
+
if (!isObject(pos)) {
|
2096 |
+
if (layout.size) {
|
2097 |
+
chartArea[pos] -= layout.size;
|
2098 |
+
}
|
2099 |
+
const stack = stacks[layout.stack] || {size: 0, count: 1};
|
2100 |
+
stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);
|
2101 |
+
layout.size = stack.size / stack.count;
|
2102 |
+
chartArea[pos] += layout.size;
|
2103 |
+
}
|
2104 |
+
if (box.getPadding) {
|
2105 |
+
updateMaxPadding(maxPadding, box.getPadding());
|
2106 |
+
}
|
2107 |
+
const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));
|
2108 |
+
const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));
|
2109 |
+
const widthChanged = newWidth !== chartArea.w;
|
2110 |
+
const heightChanged = newHeight !== chartArea.h;
|
2111 |
+
chartArea.w = newWidth;
|
2112 |
+
chartArea.h = newHeight;
|
2113 |
+
return layout.horizontal
|
2114 |
+
? {same: widthChanged, other: heightChanged}
|
2115 |
+
: {same: heightChanged, other: widthChanged};
|
2116 |
+
}
|
2117 |
+
function handleMaxPadding(chartArea) {
|
2118 |
+
const maxPadding = chartArea.maxPadding;
|
2119 |
+
function updatePos(pos) {
|
2120 |
+
const change = Math.max(maxPadding[pos] - chartArea[pos], 0);
|
2121 |
+
chartArea[pos] += change;
|
2122 |
+
return change;
|
2123 |
+
}
|
2124 |
+
chartArea.y += updatePos('top');
|
2125 |
+
chartArea.x += updatePos('left');
|
2126 |
+
updatePos('right');
|
2127 |
+
updatePos('bottom');
|
2128 |
+
}
|
2129 |
+
function getMargins(horizontal, chartArea) {
|
2130 |
+
const maxPadding = chartArea.maxPadding;
|
2131 |
+
function marginForPositions(positions) {
|
2132 |
+
const margin = {left: 0, top: 0, right: 0, bottom: 0};
|
2133 |
+
positions.forEach((pos) => {
|
2134 |
+
margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);
|
2135 |
+
});
|
2136 |
+
return margin;
|
2137 |
+
}
|
2138 |
+
return horizontal
|
2139 |
+
? marginForPositions(['left', 'right'])
|
2140 |
+
: marginForPositions(['top', 'bottom']);
|
2141 |
+
}
|
2142 |
+
function fitBoxes(boxes, chartArea, params, stacks) {
|
2143 |
+
const refitBoxes = [];
|
2144 |
+
let i, ilen, layout, box, refit, changed;
|
2145 |
+
for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {
|
2146 |
+
layout = boxes[i];
|
2147 |
+
box = layout.box;
|
2148 |
+
box.update(
|
2149 |
+
layout.width || chartArea.w,
|
2150 |
+
layout.height || chartArea.h,
|
2151 |
+
getMargins(layout.horizontal, chartArea)
|
2152 |
+
);
|
2153 |
+
const {same, other} = updateDims(chartArea, params, layout, stacks);
|
2154 |
+
refit |= same && refitBoxes.length;
|
2155 |
+
changed = changed || other;
|
2156 |
+
if (!box.fullSize) {
|
2157 |
+
refitBoxes.push(layout);
|
2158 |
+
}
|
2159 |
+
}
|
2160 |
+
return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;
|
2161 |
+
}
|
2162 |
+
function setBoxDims(box, left, top, width, height) {
|
2163 |
+
box.top = top;
|
2164 |
+
box.left = left;
|
2165 |
+
box.right = left + width;
|
2166 |
+
box.bottom = top + height;
|
2167 |
+
box.width = width;
|
2168 |
+
box.height = height;
|
2169 |
+
}
|
2170 |
+
function placeBoxes(boxes, chartArea, params, stacks) {
|
2171 |
+
const userPadding = params.padding;
|
2172 |
+
let {x, y} = chartArea;
|
2173 |
+
for (const layout of boxes) {
|
2174 |
+
const box = layout.box;
|
2175 |
+
const stack = stacks[layout.stack] || {count: 1, placed: 0, weight: 1};
|
2176 |
+
const weight = (layout.stackWeight / stack.weight) || 1;
|
2177 |
+
if (layout.horizontal) {
|
2178 |
+
const width = chartArea.w * weight;
|
2179 |
+
const height = stack.size || box.height;
|
2180 |
+
if (defined(stack.start)) {
|
2181 |
+
y = stack.start;
|
2182 |
+
}
|
2183 |
+
if (box.fullSize) {
|
2184 |
+
setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);
|
2185 |
+
} else {
|
2186 |
+
setBoxDims(box, chartArea.left + stack.placed, y, width, height);
|
2187 |
+
}
|
2188 |
+
stack.start = y;
|
2189 |
+
stack.placed += width;
|
2190 |
+
y = box.bottom;
|
2191 |
+
} else {
|
2192 |
+
const height = chartArea.h * weight;
|
2193 |
+
const width = stack.size || box.width;
|
2194 |
+
if (defined(stack.start)) {
|
2195 |
+
x = stack.start;
|
2196 |
+
}
|
2197 |
+
if (box.fullSize) {
|
2198 |
+
setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);
|
2199 |
+
} else {
|
2200 |
+
setBoxDims(box, x, chartArea.top + stack.placed, width, height);
|
2201 |
+
}
|
2202 |
+
stack.start = x;
|
2203 |
+
stack.placed += height;
|
2204 |
+
x = box.right;
|
2205 |
+
}
|
2206 |
+
}
|
2207 |
+
chartArea.x = x;
|
2208 |
+
chartArea.y = y;
|
2209 |
+
}
|
2210 |
+
defaults.set('layout', {
|
2211 |
+
autoPadding: true,
|
2212 |
+
padding: {
|
2213 |
+
top: 0,
|
2214 |
+
right: 0,
|
2215 |
+
bottom: 0,
|
2216 |
+
left: 0
|
2217 |
+
}
|
2218 |
+
});
|
2219 |
+
var layouts = {
|
2220 |
+
addBox(chart, item) {
|
2221 |
+
if (!chart.boxes) {
|
2222 |
+
chart.boxes = [];
|
2223 |
+
}
|
2224 |
+
item.fullSize = item.fullSize || false;
|
2225 |
+
item.position = item.position || 'top';
|
2226 |
+
item.weight = item.weight || 0;
|
2227 |
+
item._layers = item._layers || function() {
|
2228 |
+
return [{
|
2229 |
+
z: 0,
|
2230 |
+
draw(chartArea) {
|
2231 |
+
item.draw(chartArea);
|
2232 |
+
}
|
2233 |
+
}];
|
2234 |
+
};
|
2235 |
+
chart.boxes.push(item);
|
2236 |
+
},
|
2237 |
+
removeBox(chart, layoutItem) {
|
2238 |
+
const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;
|
2239 |
+
if (index !== -1) {
|
2240 |
+
chart.boxes.splice(index, 1);
|
2241 |
+
}
|
2242 |
+
},
|
2243 |
+
configure(chart, item, options) {
|
2244 |
+
item.fullSize = options.fullSize;
|
2245 |
+
item.position = options.position;
|
2246 |
+
item.weight = options.weight;
|
2247 |
+
},
|
2248 |
+
update(chart, width, height, minPadding) {
|
2249 |
+
if (!chart) {
|
2250 |
+
return;
|
2251 |
+
}
|
2252 |
+
const padding = toPadding(chart.options.layout.padding);
|
2253 |
+
const availableWidth = Math.max(width - padding.width, 0);
|
2254 |
+
const availableHeight = Math.max(height - padding.height, 0);
|
2255 |
+
const boxes = buildLayoutBoxes(chart.boxes);
|
2256 |
+
const verticalBoxes = boxes.vertical;
|
2257 |
+
const horizontalBoxes = boxes.horizontal;
|
2258 |
+
each(chart.boxes, box => {
|
2259 |
+
if (typeof box.beforeLayout === 'function') {
|
2260 |
+
box.beforeLayout();
|
2261 |
+
}
|
2262 |
+
});
|
2263 |
+
const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) =>
|
2264 |
+
wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;
|
2265 |
+
const params = Object.freeze({
|
2266 |
+
outerWidth: width,
|
2267 |
+
outerHeight: height,
|
2268 |
+
padding,
|
2269 |
+
availableWidth,
|
2270 |
+
availableHeight,
|
2271 |
+
vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,
|
2272 |
+
hBoxMaxHeight: availableHeight / 2
|
2273 |
+
});
|
2274 |
+
const maxPadding = Object.assign({}, padding);
|
2275 |
+
updateMaxPadding(maxPadding, toPadding(minPadding));
|
2276 |
+
const chartArea = Object.assign({
|
2277 |
+
maxPadding,
|
2278 |
+
w: availableWidth,
|
2279 |
+
h: availableHeight,
|
2280 |
+
x: padding.left,
|
2281 |
+
y: padding.top
|
2282 |
+
}, padding);
|
2283 |
+
const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);
|
2284 |
+
fitBoxes(boxes.fullSize, chartArea, params, stacks);
|
2285 |
+
fitBoxes(verticalBoxes, chartArea, params, stacks);
|
2286 |
+
if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {
|
2287 |
+
fitBoxes(verticalBoxes, chartArea, params, stacks);
|
2288 |
+
}
|
2289 |
+
handleMaxPadding(chartArea);
|
2290 |
+
placeBoxes(boxes.leftAndTop, chartArea, params, stacks);
|
2291 |
+
chartArea.x += chartArea.w;
|
2292 |
+
chartArea.y += chartArea.h;
|
2293 |
+
placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);
|
2294 |
+
chart.chartArea = {
|
2295 |
+
left: chartArea.left,
|
2296 |
+
top: chartArea.top,
|
2297 |
+
right: chartArea.left + chartArea.w,
|
2298 |
+
bottom: chartArea.top + chartArea.h,
|
2299 |
+
height: chartArea.h,
|
2300 |
+
width: chartArea.w,
|
2301 |
+
};
|
2302 |
+
each(boxes.chartArea, (layout) => {
|
2303 |
+
const box = layout.box;
|
2304 |
+
Object.assign(box, chart.chartArea);
|
2305 |
+
box.update(chartArea.w, chartArea.h, {left: 0, top: 0, right: 0, bottom: 0});
|
2306 |
+
});
|
2307 |
+
}
|
2308 |
+
};
|
2309 |
+
|
2310 |
+
function _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {
|
2311 |
+
if (!defined(fallback)) {
|
2312 |
+
fallback = _resolve('_fallback', scopes);
|
2313 |
+
}
|
2314 |
+
const cache = {
|
2315 |
+
[Symbol.toStringTag]: 'Object',
|
2316 |
+
_cacheable: true,
|
2317 |
+
_scopes: scopes,
|
2318 |
+
_rootScopes: rootScopes,
|
2319 |
+
_fallback: fallback,
|
2320 |
+
_getTarget: getTarget,
|
2321 |
+
override: (scope) => _createResolver([scope, ...scopes], prefixes, rootScopes, fallback),
|
2322 |
+
};
|
2323 |
+
return new Proxy(cache, {
|
2324 |
+
deleteProperty(target, prop) {
|
2325 |
+
delete target[prop];
|
2326 |
+
delete target._keys;
|
2327 |
+
delete scopes[0][prop];
|
2328 |
+
return true;
|
2329 |
+
},
|
2330 |
+
get(target, prop) {
|
2331 |
+
return _cached(target, prop,
|
2332 |
+
() => _resolveWithPrefixes(prop, prefixes, scopes, target));
|
2333 |
+
},
|
2334 |
+
getOwnPropertyDescriptor(target, prop) {
|
2335 |
+
return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);
|
2336 |
+
},
|
2337 |
+
getPrototypeOf() {
|
2338 |
+
return Reflect.getPrototypeOf(scopes[0]);
|
2339 |
+
},
|
2340 |
+
has(target, prop) {
|
2341 |
+
return getKeysFromAllScopes(target).includes(prop);
|
2342 |
+
},
|
2343 |
+
ownKeys(target) {
|
2344 |
+
return getKeysFromAllScopes(target);
|
2345 |
+
},
|
2346 |
+
set(target, prop, value) {
|
2347 |
+
const storage = target._storage || (target._storage = getTarget());
|
2348 |
+
target[prop] = storage[prop] = value;
|
2349 |
+
delete target._keys;
|
2350 |
+
return true;
|
2351 |
+
}
|
2352 |
+
});
|
2353 |
+
}
|
2354 |
+
function _attachContext(proxy, context, subProxy, descriptorDefaults) {
|
2355 |
+
const cache = {
|
2356 |
+
_cacheable: false,
|
2357 |
+
_proxy: proxy,
|
2358 |
+
_context: context,
|
2359 |
+
_subProxy: subProxy,
|
2360 |
+
_stack: new Set(),
|
2361 |
+
_descriptors: _descriptors(proxy, descriptorDefaults),
|
2362 |
+
setContext: (ctx) => _attachContext(proxy, ctx, subProxy, descriptorDefaults),
|
2363 |
+
override: (scope) => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)
|
2364 |
+
};
|
2365 |
+
return new Proxy(cache, {
|
2366 |
+
deleteProperty(target, prop) {
|
2367 |
+
delete target[prop];
|
2368 |
+
delete proxy[prop];
|
2369 |
+
return true;
|
2370 |
+
},
|
2371 |
+
get(target, prop, receiver) {
|
2372 |
+
return _cached(target, prop,
|
2373 |
+
() => _resolveWithContext(target, prop, receiver));
|
2374 |
+
},
|
2375 |
+
getOwnPropertyDescriptor(target, prop) {
|
2376 |
+
return target._descriptors.allKeys
|
2377 |
+
? Reflect.has(proxy, prop) ? {enumerable: true, configurable: true} : undefined
|
2378 |
+
: Reflect.getOwnPropertyDescriptor(proxy, prop);
|
2379 |
+
},
|
2380 |
+
getPrototypeOf() {
|
2381 |
+
return Reflect.getPrototypeOf(proxy);
|
2382 |
+
},
|
2383 |
+
has(target, prop) {
|
2384 |
+
return Reflect.has(proxy, prop);
|
2385 |
+
},
|
2386 |
+
ownKeys() {
|
2387 |
+
return Reflect.ownKeys(proxy);
|
2388 |
+
},
|
2389 |
+
set(target, prop, value) {
|
2390 |
+
proxy[prop] = value;
|
2391 |
+
delete target[prop];
|
2392 |
+
return true;
|
2393 |
+
}
|
2394 |
+
});
|
2395 |
+
}
|
2396 |
+
function _descriptors(proxy, defaults = {scriptable: true, indexable: true}) {
|
2397 |
+
const {_scriptable = defaults.scriptable, _indexable = defaults.indexable, _allKeys = defaults.allKeys} = proxy;
|
2398 |
+
return {
|
2399 |
+
allKeys: _allKeys,
|
2400 |
+
scriptable: _scriptable,
|
2401 |
+
indexable: _indexable,
|
2402 |
+
isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,
|
2403 |
+
isIndexable: isFunction(_indexable) ? _indexable : () => _indexable
|
2404 |
+
};
|
2405 |
+
}
|
2406 |
+
const readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name;
|
2407 |
+
const needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters' &&
|
2408 |
+
(Object.getPrototypeOf(value) === null || value.constructor === Object);
|
2409 |
+
function _cached(target, prop, resolve) {
|
2410 |
+
if (Object.prototype.hasOwnProperty.call(target, prop)) {
|
2411 |
+
return target[prop];
|
2412 |
+
}
|
2413 |
+
const value = resolve();
|
2414 |
+
target[prop] = value;
|
2415 |
+
return value;
|
2416 |
+
}
|
2417 |
+
function _resolveWithContext(target, prop, receiver) {
|
2418 |
+
const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
|
2419 |
+
let value = _proxy[prop];
|
2420 |
+
if (isFunction(value) && descriptors.isScriptable(prop)) {
|
2421 |
+
value = _resolveScriptable(prop, value, target, receiver);
|
2422 |
+
}
|
2423 |
+
if (isArray(value) && value.length) {
|
2424 |
+
value = _resolveArray(prop, value, target, descriptors.isIndexable);
|
2425 |
+
}
|
2426 |
+
if (needsSubResolver(prop, value)) {
|
2427 |
+
value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);
|
2428 |
+
}
|
2429 |
+
return value;
|
2430 |
+
}
|
2431 |
+
function _resolveScriptable(prop, value, target, receiver) {
|
2432 |
+
const {_proxy, _context, _subProxy, _stack} = target;
|
2433 |
+
if (_stack.has(prop)) {
|
2434 |
+
throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);
|
2435 |
+
}
|
2436 |
+
_stack.add(prop);
|
2437 |
+
value = value(_context, _subProxy || receiver);
|
2438 |
+
_stack.delete(prop);
|
2439 |
+
if (needsSubResolver(prop, value)) {
|
2440 |
+
value = createSubResolver(_proxy._scopes, _proxy, prop, value);
|
2441 |
+
}
|
2442 |
+
return value;
|
2443 |
+
}
|
2444 |
+
function _resolveArray(prop, value, target, isIndexable) {
|
2445 |
+
const {_proxy, _context, _subProxy, _descriptors: descriptors} = target;
|
2446 |
+
if (defined(_context.index) && isIndexable(prop)) {
|
2447 |
+
value = value[_context.index % value.length];
|
2448 |
+
} else if (isObject(value[0])) {
|
2449 |
+
const arr = value;
|
2450 |
+
const scopes = _proxy._scopes.filter(s => s !== arr);
|
2451 |
+
value = [];
|
2452 |
+
for (const item of arr) {
|
2453 |
+
const resolver = createSubResolver(scopes, _proxy, prop, item);
|
2454 |
+
value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));
|
2455 |
+
}
|
2456 |
+
}
|
2457 |
+
return value;
|
2458 |
+
}
|
2459 |
+
function resolveFallback(fallback, prop, value) {
|
2460 |
+
return isFunction(fallback) ? fallback(prop, value) : fallback;
|
2461 |
+
}
|
2462 |
+
const getScope = (key, parent) => key === true ? parent
|
2463 |
+
: typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;
|
2464 |
+
function addScopes(set, parentScopes, key, parentFallback) {
|
2465 |
+
for (const parent of parentScopes) {
|
2466 |
+
const scope = getScope(key, parent);
|
2467 |
+
if (scope) {
|
2468 |
+
set.add(scope);
|
2469 |
+
const fallback = resolveFallback(scope._fallback, key, scope);
|
2470 |
+
if (defined(fallback) && fallback !== key && fallback !== parentFallback) {
|
2471 |
+
return fallback;
|
2472 |
+
}
|
2473 |
+
} else if (scope === false && defined(parentFallback) && key !== parentFallback) {
|
2474 |
+
return null;
|
2475 |
+
}
|
2476 |
+
}
|
2477 |
+
return false;
|
2478 |
+
}
|
2479 |
+
function createSubResolver(parentScopes, resolver, prop, value) {
|
2480 |
+
const rootScopes = resolver._rootScopes;
|
2481 |
+
const fallback = resolveFallback(resolver._fallback, prop, value);
|
2482 |
+
const allScopes = [...parentScopes, ...rootScopes];
|
2483 |
+
const set = new Set();
|
2484 |
+
set.add(value);
|
2485 |
+
let key = addScopesFromKey(set, allScopes, prop, fallback || prop);
|
2486 |
+
if (key === null) {
|
2487 |
+
return false;
|
2488 |
+
}
|
2489 |
+
if (defined(fallback) && fallback !== prop) {
|
2490 |
+
key = addScopesFromKey(set, allScopes, fallback, key);
|
2491 |
+
if (key === null) {
|
2492 |
+
return false;
|
2493 |
+
}
|
2494 |
+
}
|
2495 |
+
return _createResolver(Array.from(set), [''], rootScopes, fallback,
|
2496 |
+
() => subGetTarget(resolver, prop, value));
|
2497 |
+
}
|
2498 |
+
function addScopesFromKey(set, allScopes, key, fallback) {
|
2499 |
+
while (key) {
|
2500 |
+
key = addScopes(set, allScopes, key, fallback);
|
2501 |
+
}
|
2502 |
+
return key;
|
2503 |
+
}
|
2504 |
+
function subGetTarget(resolver, prop, value) {
|
2505 |
+
const parent = resolver._getTarget();
|
2506 |
+
if (!(prop in parent)) {
|
2507 |
+
parent[prop] = {};
|
2508 |
+
}
|
2509 |
+
const target = parent[prop];
|
2510 |
+
if (isArray(target) && isObject(value)) {
|
2511 |
+
return value;
|
2512 |
+
}
|
2513 |
+
return target;
|
2514 |
+
}
|
2515 |
+
function _resolveWithPrefixes(prop, prefixes, scopes, proxy) {
|
2516 |
+
let value;
|
2517 |
+
for (const prefix of prefixes) {
|
2518 |
+
value = _resolve(readKey(prefix, prop), scopes);
|
2519 |
+
if (defined(value)) {
|
2520 |
+
return needsSubResolver(prop, value)
|
2521 |
+
? createSubResolver(scopes, proxy, prop, value)
|
2522 |
+
: value;
|
2523 |
+
}
|
2524 |
+
}
|
2525 |
+
}
|
2526 |
+
function _resolve(key, scopes) {
|
2527 |
+
for (const scope of scopes) {
|
2528 |
+
if (!scope) {
|
2529 |
+
continue;
|
2530 |
+
}
|
2531 |
+
const value = scope[key];
|
2532 |
+
if (defined(value)) {
|
2533 |
+
return value;
|
2534 |
+
}
|
2535 |
+
}
|
2536 |
+
}
|
2537 |
+
function getKeysFromAllScopes(target) {
|
2538 |
+
let keys = target._keys;
|
2539 |
+
if (!keys) {
|
2540 |
+
keys = target._keys = resolveKeysFromAllScopes(target._scopes);
|
2541 |
+
}
|
2542 |
+
return keys;
|
2543 |
+
}
|
2544 |
+
function resolveKeysFromAllScopes(scopes) {
|
2545 |
+
const set = new Set();
|
2546 |
+
for (const scope of scopes) {
|
2547 |
+
for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {
|
2548 |
+
set.add(key);
|
2549 |
+
}
|
2550 |
+
}
|
2551 |
+
return Array.from(set);
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
const EPSILON = Number.EPSILON || 1e-14;
|
2555 |
+
const getPoint = (points, i) => i < points.length && !points[i].skip && points[i];
|
2556 |
+
const getValueAxis = (indexAxis) => indexAxis === 'x' ? 'y' : 'x';
|
2557 |
+
function splineCurve(firstPoint, middlePoint, afterPoint, t) {
|
2558 |
+
const previous = firstPoint.skip ? middlePoint : firstPoint;
|
2559 |
+
const current = middlePoint;
|
2560 |
+
const next = afterPoint.skip ? middlePoint : afterPoint;
|
2561 |
+
const d01 = distanceBetweenPoints(current, previous);
|
2562 |
+
const d12 = distanceBetweenPoints(next, current);
|
2563 |
+
let s01 = d01 / (d01 + d12);
|
2564 |
+
let s12 = d12 / (d01 + d12);
|
2565 |
+
s01 = isNaN(s01) ? 0 : s01;
|
2566 |
+
s12 = isNaN(s12) ? 0 : s12;
|
2567 |
+
const fa = t * s01;
|
2568 |
+
const fb = t * s12;
|
2569 |
+
return {
|
2570 |
+
previous: {
|
2571 |
+
x: current.x - fa * (next.x - previous.x),
|
2572 |
+
y: current.y - fa * (next.y - previous.y)
|
2573 |
+
},
|
2574 |
+
next: {
|
2575 |
+
x: current.x + fb * (next.x - previous.x),
|
2576 |
+
y: current.y + fb * (next.y - previous.y)
|
2577 |
+
}
|
2578 |
+
};
|
2579 |
+
}
|
2580 |
+
function monotoneAdjust(points, deltaK, mK) {
|
2581 |
+
const pointsLen = points.length;
|
2582 |
+
let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;
|
2583 |
+
let pointAfter = getPoint(points, 0);
|
2584 |
+
for (let i = 0; i < pointsLen - 1; ++i) {
|
2585 |
+
pointCurrent = pointAfter;
|
2586 |
+
pointAfter = getPoint(points, i + 1);
|
2587 |
+
if (!pointCurrent || !pointAfter) {
|
2588 |
+
continue;
|
2589 |
+
}
|
2590 |
+
if (almostEquals(deltaK[i], 0, EPSILON)) {
|
2591 |
+
mK[i] = mK[i + 1] = 0;
|
2592 |
+
continue;
|
2593 |
+
}
|
2594 |
+
alphaK = mK[i] / deltaK[i];
|
2595 |
+
betaK = mK[i + 1] / deltaK[i];
|
2596 |
+
squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);
|
2597 |
+
if (squaredMagnitude <= 9) {
|
2598 |
+
continue;
|
2599 |
+
}
|
2600 |
+
tauK = 3 / Math.sqrt(squaredMagnitude);
|
2601 |
+
mK[i] = alphaK * tauK * deltaK[i];
|
2602 |
+
mK[i + 1] = betaK * tauK * deltaK[i];
|
2603 |
+
}
|
2604 |
+
}
|
2605 |
+
function monotoneCompute(points, mK, indexAxis = 'x') {
|
2606 |
+
const valueAxis = getValueAxis(indexAxis);
|
2607 |
+
const pointsLen = points.length;
|
2608 |
+
let delta, pointBefore, pointCurrent;
|
2609 |
+
let pointAfter = getPoint(points, 0);
|
2610 |
+
for (let i = 0; i < pointsLen; ++i) {
|
2611 |
+
pointBefore = pointCurrent;
|
2612 |
+
pointCurrent = pointAfter;
|
2613 |
+
pointAfter = getPoint(points, i + 1);
|
2614 |
+
if (!pointCurrent) {
|
2615 |
+
continue;
|
2616 |
+
}
|
2617 |
+
const iPixel = pointCurrent[indexAxis];
|
2618 |
+
const vPixel = pointCurrent[valueAxis];
|
2619 |
+
if (pointBefore) {
|
2620 |
+
delta = (iPixel - pointBefore[indexAxis]) / 3;
|
2621 |
+
pointCurrent[`cp1${indexAxis}`] = iPixel - delta;
|
2622 |
+
pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];
|
2623 |
+
}
|
2624 |
+
if (pointAfter) {
|
2625 |
+
delta = (pointAfter[indexAxis] - iPixel) / 3;
|
2626 |
+
pointCurrent[`cp2${indexAxis}`] = iPixel + delta;
|
2627 |
+
pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];
|
2628 |
+
}
|
2629 |
+
}
|
2630 |
+
}
|
2631 |
+
function splineCurveMonotone(points, indexAxis = 'x') {
|
2632 |
+
const valueAxis = getValueAxis(indexAxis);
|
2633 |
+
const pointsLen = points.length;
|
2634 |
+
const deltaK = Array(pointsLen).fill(0);
|
2635 |
+
const mK = Array(pointsLen);
|
2636 |
+
let i, pointBefore, pointCurrent;
|
2637 |
+
let pointAfter = getPoint(points, 0);
|
2638 |
+
for (i = 0; i < pointsLen; ++i) {
|
2639 |
+
pointBefore = pointCurrent;
|
2640 |
+
pointCurrent = pointAfter;
|
2641 |
+
pointAfter = getPoint(points, i + 1);
|
2642 |
+
if (!pointCurrent) {
|
2643 |
+
continue;
|
2644 |
+
}
|
2645 |
+
if (pointAfter) {
|
2646 |
+
const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];
|
2647 |
+
deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;
|
2648 |
+
}
|
2649 |
+
mK[i] = !pointBefore ? deltaK[i]
|
2650 |
+
: !pointAfter ? deltaK[i - 1]
|
2651 |
+
: (sign(deltaK[i - 1]) !== sign(deltaK[i])) ? 0
|
2652 |
+
: (deltaK[i - 1] + deltaK[i]) / 2;
|
2653 |
+
}
|
2654 |
+
monotoneAdjust(points, deltaK, mK);
|
2655 |
+
monotoneCompute(points, mK, indexAxis);
|
2656 |
+
}
|
2657 |
+
function capControlPoint(pt, min, max) {
|
2658 |
+
return Math.max(Math.min(pt, max), min);
|
2659 |
+
}
|
2660 |
+
function capBezierPoints(points, area) {
|
2661 |
+
let i, ilen, point, inArea, inAreaPrev;
|
2662 |
+
let inAreaNext = _isPointInArea(points[0], area);
|
2663 |
+
for (i = 0, ilen = points.length; i < ilen; ++i) {
|
2664 |
+
inAreaPrev = inArea;
|
2665 |
+
inArea = inAreaNext;
|
2666 |
+
inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);
|
2667 |
+
if (!inArea) {
|
2668 |
+
continue;
|
2669 |
+
}
|
2670 |
+
point = points[i];
|
2671 |
+
if (inAreaPrev) {
|
2672 |
+
point.cp1x = capControlPoint(point.cp1x, area.left, area.right);
|
2673 |
+
point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);
|
2674 |
+
}
|
2675 |
+
if (inAreaNext) {
|
2676 |
+
point.cp2x = capControlPoint(point.cp2x, area.left, area.right);
|
2677 |
+
point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);
|
2678 |
+
}
|
2679 |
+
}
|
2680 |
+
}
|
2681 |
+
function _updateBezierControlPoints(points, options, area, loop, indexAxis) {
|
2682 |
+
let i, ilen, point, controlPoints;
|
2683 |
+
if (options.spanGaps) {
|
2684 |
+
points = points.filter((pt) => !pt.skip);
|
2685 |
+
}
|
2686 |
+
if (options.cubicInterpolationMode === 'monotone') {
|
2687 |
+
splineCurveMonotone(points, indexAxis);
|
2688 |
+
} else {
|
2689 |
+
let prev = loop ? points[points.length - 1] : points[0];
|
2690 |
+
for (i = 0, ilen = points.length; i < ilen; ++i) {
|
2691 |
+
point = points[i];
|
2692 |
+
controlPoints = splineCurve(
|
2693 |
+
prev,
|
2694 |
+
point,
|
2695 |
+
points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen],
|
2696 |
+
options.tension
|
2697 |
+
);
|
2698 |
+
point.cp1x = controlPoints.previous.x;
|
2699 |
+
point.cp1y = controlPoints.previous.y;
|
2700 |
+
point.cp2x = controlPoints.next.x;
|
2701 |
+
point.cp2y = controlPoints.next.y;
|
2702 |
+
prev = point;
|
2703 |
+
}
|
2704 |
+
}
|
2705 |
+
if (options.capBezierPoints) {
|
2706 |
+
capBezierPoints(points, area);
|
2707 |
+
}
|
2708 |
+
}
|
2709 |
+
|
2710 |
+
const atEdge = (t) => t === 0 || t === 1;
|
2711 |
+
const elasticIn = (t, s, p) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));
|
2712 |
+
const elasticOut = (t, s, p) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;
|
2713 |
+
const effects = {
|
2714 |
+
linear: t => t,
|
2715 |
+
easeInQuad: t => t * t,
|
2716 |
+
easeOutQuad: t => -t * (t - 2),
|
2717 |
+
easeInOutQuad: t => ((t /= 0.5) < 1)
|
2718 |
+
? 0.5 * t * t
|
2719 |
+
: -0.5 * ((--t) * (t - 2) - 1),
|
2720 |
+
easeInCubic: t => t * t * t,
|
2721 |
+
easeOutCubic: t => (t -= 1) * t * t + 1,
|
2722 |
+
easeInOutCubic: t => ((t /= 0.5) < 1)
|
2723 |
+
? 0.5 * t * t * t
|
2724 |
+
: 0.5 * ((t -= 2) * t * t + 2),
|
2725 |
+
easeInQuart: t => t * t * t * t,
|
2726 |
+
easeOutQuart: t => -((t -= 1) * t * t * t - 1),
|
2727 |
+
easeInOutQuart: t => ((t /= 0.5) < 1)
|
2728 |
+
? 0.5 * t * t * t * t
|
2729 |
+
: -0.5 * ((t -= 2) * t * t * t - 2),
|
2730 |
+
easeInQuint: t => t * t * t * t * t,
|
2731 |
+
easeOutQuint: t => (t -= 1) * t * t * t * t + 1,
|
2732 |
+
easeInOutQuint: t => ((t /= 0.5) < 1)
|
2733 |
+
? 0.5 * t * t * t * t * t
|
2734 |
+
: 0.5 * ((t -= 2) * t * t * t * t + 2),
|
2735 |
+
easeInSine: t => -Math.cos(t * HALF_PI) + 1,
|
2736 |
+
easeOutSine: t => Math.sin(t * HALF_PI),
|
2737 |
+
easeInOutSine: t => -0.5 * (Math.cos(PI * t) - 1),
|
2738 |
+
easeInExpo: t => (t === 0) ? 0 : Math.pow(2, 10 * (t - 1)),
|
2739 |
+
easeOutExpo: t => (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1,
|
2740 |
+
easeInOutExpo: t => atEdge(t) ? t : t < 0.5
|
2741 |
+
? 0.5 * Math.pow(2, 10 * (t * 2 - 1))
|
2742 |
+
: 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),
|
2743 |
+
easeInCirc: t => (t >= 1) ? t : -(Math.sqrt(1 - t * t) - 1),
|
2744 |
+
easeOutCirc: t => Math.sqrt(1 - (t -= 1) * t),
|
2745 |
+
easeInOutCirc: t => ((t /= 0.5) < 1)
|
2746 |
+
? -0.5 * (Math.sqrt(1 - t * t) - 1)
|
2747 |
+
: 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),
|
2748 |
+
easeInElastic: t => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),
|
2749 |
+
easeOutElastic: t => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),
|
2750 |
+
easeInOutElastic(t) {
|
2751 |
+
const s = 0.1125;
|
2752 |
+
const p = 0.45;
|
2753 |
+
return atEdge(t) ? t :
|
2754 |
+
t < 0.5
|
2755 |
+
? 0.5 * elasticIn(t * 2, s, p)
|
2756 |
+
: 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);
|
2757 |
+
},
|
2758 |
+
easeInBack(t) {
|
2759 |
+
const s = 1.70158;
|
2760 |
+
return t * t * ((s + 1) * t - s);
|
2761 |
+
},
|
2762 |
+
easeOutBack(t) {
|
2763 |
+
const s = 1.70158;
|
2764 |
+
return (t -= 1) * t * ((s + 1) * t + s) + 1;
|
2765 |
+
},
|
2766 |
+
easeInOutBack(t) {
|
2767 |
+
let s = 1.70158;
|
2768 |
+
if ((t /= 0.5) < 1) {
|
2769 |
+
return 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));
|
2770 |
+
}
|
2771 |
+
return 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
|
2772 |
+
},
|
2773 |
+
easeInBounce: t => 1 - effects.easeOutBounce(1 - t),
|
2774 |
+
easeOutBounce(t) {
|
2775 |
+
const m = 7.5625;
|
2776 |
+
const d = 2.75;
|
2777 |
+
if (t < (1 / d)) {
|
2778 |
+
return m * t * t;
|
2779 |
+
}
|
2780 |
+
if (t < (2 / d)) {
|
2781 |
+
return m * (t -= (1.5 / d)) * t + 0.75;
|
2782 |
+
}
|
2783 |
+
if (t < (2.5 / d)) {
|
2784 |
+
return m * (t -= (2.25 / d)) * t + 0.9375;
|
2785 |
+
}
|
2786 |
+
return m * (t -= (2.625 / d)) * t + 0.984375;
|
2787 |
+
},
|
2788 |
+
easeInOutBounce: t => (t < 0.5)
|
2789 |
+
? effects.easeInBounce(t * 2) * 0.5
|
2790 |
+
: effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5,
|
2791 |
+
};
|
2792 |
+
|
2793 |
+
function _pointInLine(p1, p2, t, mode) {
|
2794 |
+
return {
|
2795 |
+
x: p1.x + t * (p2.x - p1.x),
|
2796 |
+
y: p1.y + t * (p2.y - p1.y)
|
2797 |
+
};
|
2798 |
+
}
|
2799 |
+
function _steppedInterpolation(p1, p2, t, mode) {
|
2800 |
+
return {
|
2801 |
+
x: p1.x + t * (p2.x - p1.x),
|
2802 |
+
y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y
|
2803 |
+
: mode === 'after' ? t < 1 ? p1.y : p2.y
|
2804 |
+
: t > 0 ? p2.y : p1.y
|
2805 |
+
};
|
2806 |
+
}
|
2807 |
+
function _bezierInterpolation(p1, p2, t, mode) {
|
2808 |
+
const cp1 = {x: p1.cp2x, y: p1.cp2y};
|
2809 |
+
const cp2 = {x: p2.cp1x, y: p2.cp1y};
|
2810 |
+
const a = _pointInLine(p1, cp1, t);
|
2811 |
+
const b = _pointInLine(cp1, cp2, t);
|
2812 |
+
const c = _pointInLine(cp2, p2, t);
|
2813 |
+
const d = _pointInLine(a, b, t);
|
2814 |
+
const e = _pointInLine(b, c, t);
|
2815 |
+
return _pointInLine(d, e, t);
|
2816 |
+
}
|
2817 |
+
|
2818 |
+
const intlCache = new Map();
|
2819 |
+
function getNumberFormat(locale, options) {
|
2820 |
+
options = options || {};
|
2821 |
+
const cacheKey = locale + JSON.stringify(options);
|
2822 |
+
let formatter = intlCache.get(cacheKey);
|
2823 |
+
if (!formatter) {
|
2824 |
+
formatter = new Intl.NumberFormat(locale, options);
|
2825 |
+
intlCache.set(cacheKey, formatter);
|
2826 |
+
}
|
2827 |
+
return formatter;
|
2828 |
+
}
|
2829 |
+
function formatNumber(num, locale, options) {
|
2830 |
+
return getNumberFormat(locale, options).format(num);
|
2831 |
+
}
|
2832 |
+
|
2833 |
+
const getRightToLeftAdapter = function(rectX, width) {
|
2834 |
+
return {
|
2835 |
+
x(x) {
|
2836 |
+
return rectX + rectX + width - x;
|
2837 |
+
},
|
2838 |
+
setWidth(w) {
|
2839 |
+
width = w;
|
2840 |
+
},
|
2841 |
+
textAlign(align) {
|
2842 |
+
if (align === 'center') {
|
2843 |
+
return align;
|
2844 |
+
}
|
2845 |
+
return align === 'right' ? 'left' : 'right';
|
2846 |
+
},
|
2847 |
+
xPlus(x, value) {
|
2848 |
+
return x - value;
|
2849 |
+
},
|
2850 |
+
leftForLtr(x, itemWidth) {
|
2851 |
+
return x - itemWidth;
|
2852 |
+
},
|
2853 |
+
};
|
2854 |
+
};
|
2855 |
+
const getLeftToRightAdapter = function() {
|
2856 |
+
return {
|
2857 |
+
x(x) {
|
2858 |
+
return x;
|
2859 |
+
},
|
2860 |
+
setWidth(w) {
|
2861 |
+
},
|
2862 |
+
textAlign(align) {
|
2863 |
+
return align;
|
2864 |
+
},
|
2865 |
+
xPlus(x, value) {
|
2866 |
+
return x + value;
|
2867 |
+
},
|
2868 |
+
leftForLtr(x, _itemWidth) {
|
2869 |
+
return x;
|
2870 |
+
},
|
2871 |
+
};
|
2872 |
+
};
|
2873 |
+
function getRtlAdapter(rtl, rectX, width) {
|
2874 |
+
return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();
|
2875 |
+
}
|
2876 |
+
function overrideTextDirection(ctx, direction) {
|
2877 |
+
let style, original;
|
2878 |
+
if (direction === 'ltr' || direction === 'rtl') {
|
2879 |
+
style = ctx.canvas.style;
|
2880 |
+
original = [
|
2881 |
+
style.getPropertyValue('direction'),
|
2882 |
+
style.getPropertyPriority('direction'),
|
2883 |
+
];
|
2884 |
+
style.setProperty('direction', direction, 'important');
|
2885 |
+
ctx.prevTextDirection = original;
|
2886 |
+
}
|
2887 |
+
}
|
2888 |
+
function restoreTextDirection(ctx, original) {
|
2889 |
+
if (original !== undefined) {
|
2890 |
+
delete ctx.prevTextDirection;
|
2891 |
+
ctx.canvas.style.setProperty('direction', original[0], original[1]);
|
2892 |
+
}
|
2893 |
+
}
|
2894 |
+
|
2895 |
+
function propertyFn(property) {
|
2896 |
+
if (property === 'angle') {
|
2897 |
+
return {
|
2898 |
+
between: _angleBetween,
|
2899 |
+
compare: _angleDiff,
|
2900 |
+
normalize: _normalizeAngle,
|
2901 |
+
};
|
2902 |
+
}
|
2903 |
+
return {
|
2904 |
+
between: _isBetween,
|
2905 |
+
compare: (a, b) => a - b,
|
2906 |
+
normalize: x => x
|
2907 |
+
};
|
2908 |
+
}
|
2909 |
+
function normalizeSegment({start, end, count, loop, style}) {
|
2910 |
+
return {
|
2911 |
+
start: start % count,
|
2912 |
+
end: end % count,
|
2913 |
+
loop: loop && (end - start + 1) % count === 0,
|
2914 |
+
style
|
2915 |
+
};
|
2916 |
+
}
|
2917 |
+
function getSegment(segment, points, bounds) {
|
2918 |
+
const {property, start: startBound, end: endBound} = bounds;
|
2919 |
+
const {between, normalize} = propertyFn(property);
|
2920 |
+
const count = points.length;
|
2921 |
+
let {start, end, loop} = segment;
|
2922 |
+
let i, ilen;
|
2923 |
+
if (loop) {
|
2924 |
+
start += count;
|
2925 |
+
end += count;
|
2926 |
+
for (i = 0, ilen = count; i < ilen; ++i) {
|
2927 |
+
if (!between(normalize(points[start % count][property]), startBound, endBound)) {
|
2928 |
+
break;
|
2929 |
+
}
|
2930 |
+
start--;
|
2931 |
+
end--;
|
2932 |
+
}
|
2933 |
+
start %= count;
|
2934 |
+
end %= count;
|
2935 |
+
}
|
2936 |
+
if (end < start) {
|
2937 |
+
end += count;
|
2938 |
+
}
|
2939 |
+
return {start, end, loop, style: segment.style};
|
2940 |
+
}
|
2941 |
+
function _boundSegment(segment, points, bounds) {
|
2942 |
+
if (!bounds) {
|
2943 |
+
return [segment];
|
2944 |
+
}
|
2945 |
+
const {property, start: startBound, end: endBound} = bounds;
|
2946 |
+
const count = points.length;
|
2947 |
+
const {compare, between, normalize} = propertyFn(property);
|
2948 |
+
const {start, end, loop, style} = getSegment(segment, points, bounds);
|
2949 |
+
const result = [];
|
2950 |
+
let inside = false;
|
2951 |
+
let subStart = null;
|
2952 |
+
let value, point, prevValue;
|
2953 |
+
const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;
|
2954 |
+
const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);
|
2955 |
+
const shouldStart = () => inside || startIsBefore();
|
2956 |
+
const shouldStop = () => !inside || endIsBefore();
|
2957 |
+
for (let i = start, prev = start; i <= end; ++i) {
|
2958 |
+
point = points[i % count];
|
2959 |
+
if (point.skip) {
|
2960 |
+
continue;
|
2961 |
+
}
|
2962 |
+
value = normalize(point[property]);
|
2963 |
+
if (value === prevValue) {
|
2964 |
+
continue;
|
2965 |
+
}
|
2966 |
+
inside = between(value, startBound, endBound);
|
2967 |
+
if (subStart === null && shouldStart()) {
|
2968 |
+
subStart = compare(value, startBound) === 0 ? i : prev;
|
2969 |
+
}
|
2970 |
+
if (subStart !== null && shouldStop()) {
|
2971 |
+
result.push(normalizeSegment({start: subStart, end: i, loop, count, style}));
|
2972 |
+
subStart = null;
|
2973 |
+
}
|
2974 |
+
prev = i;
|
2975 |
+
prevValue = value;
|
2976 |
+
}
|
2977 |
+
if (subStart !== null) {
|
2978 |
+
result.push(normalizeSegment({start: subStart, end, loop, count, style}));
|
2979 |
+
}
|
2980 |
+
return result;
|
2981 |
+
}
|
2982 |
+
function _boundSegments(line, bounds) {
|
2983 |
+
const result = [];
|
2984 |
+
const segments = line.segments;
|
2985 |
+
for (let i = 0; i < segments.length; i++) {
|
2986 |
+
const sub = _boundSegment(segments[i], line.points, bounds);
|
2987 |
+
if (sub.length) {
|
2988 |
+
result.push(...sub);
|
2989 |
+
}
|
2990 |
+
}
|
2991 |
+
return result;
|
2992 |
+
}
|
2993 |
+
function findStartAndEnd(points, count, loop, spanGaps) {
|
2994 |
+
let start = 0;
|
2995 |
+
let end = count - 1;
|
2996 |
+
if (loop && !spanGaps) {
|
2997 |
+
while (start < count && !points[start].skip) {
|
2998 |
+
start++;
|
2999 |
+
}
|
3000 |
+
}
|
3001 |
+
while (start < count && points[start].skip) {
|
3002 |
+
start++;
|
3003 |
+
}
|
3004 |
+
start %= count;
|
3005 |
+
if (loop) {
|
3006 |
+
end += start;
|
3007 |
+
}
|
3008 |
+
while (end > start && points[end % count].skip) {
|
3009 |
+
end--;
|
3010 |
+
}
|
3011 |
+
end %= count;
|
3012 |
+
return {start, end};
|
3013 |
+
}
|
3014 |
+
function solidSegments(points, start, max, loop) {
|
3015 |
+
const count = points.length;
|
3016 |
+
const result = [];
|
3017 |
+
let last = start;
|
3018 |
+
let prev = points[start];
|
3019 |
+
let end;
|
3020 |
+
for (end = start + 1; end <= max; ++end) {
|
3021 |
+
const cur = points[end % count];
|
3022 |
+
if (cur.skip || cur.stop) {
|
3023 |
+
if (!prev.skip) {
|
3024 |
+
loop = false;
|
3025 |
+
result.push({start: start % count, end: (end - 1) % count, loop});
|
3026 |
+
start = last = cur.stop ? end : null;
|
3027 |
+
}
|
3028 |
+
} else {
|
3029 |
+
last = end;
|
3030 |
+
if (prev.skip) {
|
3031 |
+
start = end;
|
3032 |
+
}
|
3033 |
+
}
|
3034 |
+
prev = cur;
|
3035 |
+
}
|
3036 |
+
if (last !== null) {
|
3037 |
+
result.push({start: start % count, end: last % count, loop});
|
3038 |
+
}
|
3039 |
+
return result;
|
3040 |
+
}
|
3041 |
+
function _computeSegments(line, segmentOptions) {
|
3042 |
+
const points = line.points;
|
3043 |
+
const spanGaps = line.options.spanGaps;
|
3044 |
+
const count = points.length;
|
3045 |
+
if (!count) {
|
3046 |
+
return [];
|
3047 |
+
}
|
3048 |
+
const loop = !!line._loop;
|
3049 |
+
const {start, end} = findStartAndEnd(points, count, loop, spanGaps);
|
3050 |
+
if (spanGaps === true) {
|
3051 |
+
return splitByStyles(line, [{start, end, loop}], points, segmentOptions);
|
3052 |
+
}
|
3053 |
+
const max = end < start ? end + count : end;
|
3054 |
+
const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;
|
3055 |
+
return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);
|
3056 |
+
}
|
3057 |
+
function splitByStyles(line, segments, points, segmentOptions) {
|
3058 |
+
if (!segmentOptions || !segmentOptions.setContext || !points) {
|
3059 |
+
return segments;
|
3060 |
+
}
|
3061 |
+
return doSplitByStyles(line, segments, points, segmentOptions);
|
3062 |
+
}
|
3063 |
+
function doSplitByStyles(line, segments, points, segmentOptions) {
|
3064 |
+
const chartContext = line._chart.getContext();
|
3065 |
+
const baseStyle = readStyle(line.options);
|
3066 |
+
const {_datasetIndex: datasetIndex, options: {spanGaps}} = line;
|
3067 |
+
const count = points.length;
|
3068 |
+
const result = [];
|
3069 |
+
let prevStyle = baseStyle;
|
3070 |
+
let start = segments[0].start;
|
3071 |
+
let i = start;
|
3072 |
+
function addStyle(s, e, l, st) {
|
3073 |
+
const dir = spanGaps ? -1 : 1;
|
3074 |
+
if (s === e) {
|
3075 |
+
return;
|
3076 |
+
}
|
3077 |
+
s += count;
|
3078 |
+
while (points[s % count].skip) {
|
3079 |
+
s -= dir;
|
3080 |
+
}
|
3081 |
+
while (points[e % count].skip) {
|
3082 |
+
e += dir;
|
3083 |
+
}
|
3084 |
+
if (s % count !== e % count) {
|
3085 |
+
result.push({start: s % count, end: e % count, loop: l, style: st});
|
3086 |
+
prevStyle = st;
|
3087 |
+
start = e % count;
|
3088 |
+
}
|
3089 |
+
}
|
3090 |
+
for (const segment of segments) {
|
3091 |
+
start = spanGaps ? start : segment.start;
|
3092 |
+
let prev = points[start % count];
|
3093 |
+
let style;
|
3094 |
+
for (i = start + 1; i <= segment.end; i++) {
|
3095 |
+
const pt = points[i % count];
|
3096 |
+
style = readStyle(segmentOptions.setContext(createContext(chartContext, {
|
3097 |
+
type: 'segment',
|
3098 |
+
p0: prev,
|
3099 |
+
p1: pt,
|
3100 |
+
p0DataIndex: (i - 1) % count,
|
3101 |
+
p1DataIndex: i % count,
|
3102 |
+
datasetIndex
|
3103 |
+
})));
|
3104 |
+
if (styleChanged(style, prevStyle)) {
|
3105 |
+
addStyle(start, i - 1, segment.loop, prevStyle);
|
3106 |
+
}
|
3107 |
+
prev = pt;
|
3108 |
+
prevStyle = style;
|
3109 |
+
}
|
3110 |
+
if (start < i - 1) {
|
3111 |
+
addStyle(start, i - 1, segment.loop, prevStyle);
|
3112 |
+
}
|
3113 |
+
}
|
3114 |
+
return result;
|
3115 |
+
}
|
3116 |
+
function readStyle(options) {
|
3117 |
+
return {
|
3118 |
+
backgroundColor: options.backgroundColor,
|
3119 |
+
borderCapStyle: options.borderCapStyle,
|
3120 |
+
borderDash: options.borderDash,
|
3121 |
+
borderDashOffset: options.borderDashOffset,
|
3122 |
+
borderJoinStyle: options.borderJoinStyle,
|
3123 |
+
borderWidth: options.borderWidth,
|
3124 |
+
borderColor: options.borderColor
|
3125 |
+
};
|
3126 |
+
}
|
3127 |
+
function styleChanged(style, prevStyle) {
|
3128 |
+
return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);
|
3129 |
+
}
|
3130 |
+
|
3131 |
+
var helpers = /*#__PURE__*/Object.freeze({
|
3132 |
+
__proto__: null,
|
3133 |
+
easingEffects: effects,
|
3134 |
+
color: color,
|
3135 |
+
getHoverColor: getHoverColor,
|
3136 |
+
noop: noop,
|
3137 |
+
uid: uid,
|
3138 |
+
isNullOrUndef: isNullOrUndef,
|
3139 |
+
isArray: isArray,
|
3140 |
+
isObject: isObject,
|
3141 |
+
isFinite: isNumberFinite,
|
3142 |
+
finiteOrDefault: finiteOrDefault,
|
3143 |
+
valueOrDefault: valueOrDefault,
|
3144 |
+
toPercentage: toPercentage,
|
3145 |
+
toDimension: toDimension,
|
3146 |
+
callback: callback,
|
3147 |
+
each: each,
|
3148 |
+
_elementsEqual: _elementsEqual,
|
3149 |
+
clone: clone,
|
3150 |
+
_merger: _merger,
|
3151 |
+
merge: merge,
|
3152 |
+
mergeIf: mergeIf,
|
3153 |
+
_mergerIf: _mergerIf,
|
3154 |
+
_deprecated: _deprecated,
|
3155 |
+
resolveObjectKey: resolveObjectKey,
|
3156 |
+
_capitalize: _capitalize,
|
3157 |
+
defined: defined,
|
3158 |
+
isFunction: isFunction,
|
3159 |
+
setsEqual: setsEqual,
|
3160 |
+
toFontString: toFontString,
|
3161 |
+
_measureText: _measureText,
|
3162 |
+
_longestText: _longestText,
|
3163 |
+
_alignPixel: _alignPixel,
|
3164 |
+
clearCanvas: clearCanvas,
|
3165 |
+
drawPoint: drawPoint,
|
3166 |
+
_isPointInArea: _isPointInArea,
|
3167 |
+
clipArea: clipArea,
|
3168 |
+
unclipArea: unclipArea,
|
3169 |
+
_steppedLineTo: _steppedLineTo,
|
3170 |
+
_bezierCurveTo: _bezierCurveTo,
|
3171 |
+
renderText: renderText,
|
3172 |
+
addRoundedRectPath: addRoundedRectPath,
|
3173 |
+
_lookup: _lookup,
|
3174 |
+
_lookupByKey: _lookupByKey,
|
3175 |
+
_rlookupByKey: _rlookupByKey,
|
3176 |
+
_filterBetween: _filterBetween,
|
3177 |
+
listenArrayEvents: listenArrayEvents,
|
3178 |
+
unlistenArrayEvents: unlistenArrayEvents,
|
3179 |
+
_arrayUnique: _arrayUnique,
|
3180 |
+
_createResolver: _createResolver,
|
3181 |
+
_attachContext: _attachContext,
|
3182 |
+
_descriptors: _descriptors,
|
3183 |
+
splineCurve: splineCurve,
|
3184 |
+
splineCurveMonotone: splineCurveMonotone,
|
3185 |
+
_updateBezierControlPoints: _updateBezierControlPoints,
|
3186 |
+
_isDomSupported: _isDomSupported,
|
3187 |
+
_getParentNode: _getParentNode,
|
3188 |
+
getStyle: getStyle,
|
3189 |
+
getRelativePosition: getRelativePosition$1,
|
3190 |
+
getMaximumSize: getMaximumSize,
|
3191 |
+
retinaScale: retinaScale,
|
3192 |
+
supportsEventListenerOptions: supportsEventListenerOptions,
|
3193 |
+
readUsedSize: readUsedSize,
|
3194 |
+
fontString: fontString,
|
3195 |
+
requestAnimFrame: requestAnimFrame,
|
3196 |
+
throttled: throttled,
|
3197 |
+
debounce: debounce,
|
3198 |
+
_toLeftRightCenter: _toLeftRightCenter,
|
3199 |
+
_alignStartEnd: _alignStartEnd,
|
3200 |
+
_textX: _textX,
|
3201 |
+
_pointInLine: _pointInLine,
|
3202 |
+
_steppedInterpolation: _steppedInterpolation,
|
3203 |
+
_bezierInterpolation: _bezierInterpolation,
|
3204 |
+
formatNumber: formatNumber,
|
3205 |
+
toLineHeight: toLineHeight,
|
3206 |
+
_readValueToProps: _readValueToProps,
|
3207 |
+
toTRBL: toTRBL,
|
3208 |
+
toTRBLCorners: toTRBLCorners,
|
3209 |
+
toPadding: toPadding,
|
3210 |
+
toFont: toFont,
|
3211 |
+
resolve: resolve,
|
3212 |
+
_addGrace: _addGrace,
|
3213 |
+
createContext: createContext,
|
3214 |
+
PI: PI,
|
3215 |
+
TAU: TAU,
|
3216 |
+
PITAU: PITAU,
|
3217 |
+
INFINITY: INFINITY,
|
3218 |
+
RAD_PER_DEG: RAD_PER_DEG,
|
3219 |
+
HALF_PI: HALF_PI,
|
3220 |
+
QUARTER_PI: QUARTER_PI,
|
3221 |
+
TWO_THIRDS_PI: TWO_THIRDS_PI,
|
3222 |
+
log10: log10,
|
3223 |
+
sign: sign,
|
3224 |
+
niceNum: niceNum,
|
3225 |
+
_factorize: _factorize,
|
3226 |
+
isNumber: isNumber,
|
3227 |
+
almostEquals: almostEquals,
|
3228 |
+
almostWhole: almostWhole,
|
3229 |
+
_setMinAndMaxByKey: _setMinAndMaxByKey,
|
3230 |
+
toRadians: toRadians,
|
3231 |
+
toDegrees: toDegrees,
|
3232 |
+
_decimalPlaces: _decimalPlaces,
|
3233 |
+
getAngleFromPoint: getAngleFromPoint,
|
3234 |
+
distanceBetweenPoints: distanceBetweenPoints,
|
3235 |
+
_angleDiff: _angleDiff,
|
3236 |
+
_normalizeAngle: _normalizeAngle,
|
3237 |
+
_angleBetween: _angleBetween,
|
3238 |
+
_limitValue: _limitValue,
|
3239 |
+
_int16Range: _int16Range,
|
3240 |
+
_isBetween: _isBetween,
|
3241 |
+
getRtlAdapter: getRtlAdapter,
|
3242 |
+
overrideTextDirection: overrideTextDirection,
|
3243 |
+
restoreTextDirection: restoreTextDirection,
|
3244 |
+
_boundSegment: _boundSegment,
|
3245 |
+
_boundSegments: _boundSegments,
|
3246 |
+
_computeSegments: _computeSegments
|
3247 |
+
});
|
3248 |
+
|
3249 |
+
class BasePlatform {
|
3250 |
+
acquireContext(canvas, aspectRatio) {}
|
3251 |
+
releaseContext(context) {
|
3252 |
+
return false;
|
3253 |
+
}
|
3254 |
+
addEventListener(chart, type, listener) {}
|
3255 |
+
removeEventListener(chart, type, listener) {}
|
3256 |
+
getDevicePixelRatio() {
|
3257 |
+
return 1;
|
3258 |
+
}
|
3259 |
+
getMaximumSize(element, width, height, aspectRatio) {
|
3260 |
+
width = Math.max(0, width || element.width);
|
3261 |
+
height = height || element.height;
|
3262 |
+
return {
|
3263 |
+
width,
|
3264 |
+
height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)
|
3265 |
+
};
|
3266 |
+
}
|
3267 |
+
isAttached(canvas) {
|
3268 |
+
return true;
|
3269 |
+
}
|
3270 |
+
updateConfig(config) {
|
3271 |
+
}
|
3272 |
+
}
|
3273 |
+
|
3274 |
+
class BasicPlatform extends BasePlatform {
|
3275 |
+
acquireContext(item) {
|
3276 |
+
return item && item.getContext && item.getContext('2d') || null;
|
3277 |
+
}
|
3278 |
+
updateConfig(config) {
|
3279 |
+
config.options.animation = false;
|
3280 |
+
}
|
3281 |
+
}
|
3282 |
+
|
3283 |
+
const EXPANDO_KEY = '$chartjs';
|
3284 |
+
const EVENT_TYPES = {
|
3285 |
+
touchstart: 'mousedown',
|
3286 |
+
touchmove: 'mousemove',
|
3287 |
+
touchend: 'mouseup',
|
3288 |
+
pointerenter: 'mouseenter',
|
3289 |
+
pointerdown: 'mousedown',
|
3290 |
+
pointermove: 'mousemove',
|
3291 |
+
pointerup: 'mouseup',
|
3292 |
+
pointerleave: 'mouseout',
|
3293 |
+
pointerout: 'mouseout'
|
3294 |
+
};
|
3295 |
+
const isNullOrEmpty = value => value === null || value === '';
|
3296 |
+
function initCanvas(canvas, aspectRatio) {
|
3297 |
+
const style = canvas.style;
|
3298 |
+
const renderHeight = canvas.getAttribute('height');
|
3299 |
+
const renderWidth = canvas.getAttribute('width');
|
3300 |
+
canvas[EXPANDO_KEY] = {
|
3301 |
+
initial: {
|
3302 |
+
height: renderHeight,
|
3303 |
+
width: renderWidth,
|
3304 |
+
style: {
|
3305 |
+
display: style.display,
|
3306 |
+
height: style.height,
|
3307 |
+
width: style.width
|
3308 |
+
}
|
3309 |
+
}
|
3310 |
+
};
|
3311 |
+
style.display = style.display || 'block';
|
3312 |
+
style.boxSizing = style.boxSizing || 'border-box';
|
3313 |
+
if (isNullOrEmpty(renderWidth)) {
|
3314 |
+
const displayWidth = readUsedSize(canvas, 'width');
|
3315 |
+
if (displayWidth !== undefined) {
|
3316 |
+
canvas.width = displayWidth;
|
3317 |
+
}
|
3318 |
+
}
|
3319 |
+
if (isNullOrEmpty(renderHeight)) {
|
3320 |
+
if (canvas.style.height === '') {
|
3321 |
+
canvas.height = canvas.width / (aspectRatio || 2);
|
3322 |
+
} else {
|
3323 |
+
const displayHeight = readUsedSize(canvas, 'height');
|
3324 |
+
if (displayHeight !== undefined) {
|
3325 |
+
canvas.height = displayHeight;
|
3326 |
+
}
|
3327 |
+
}
|
3328 |
+
}
|
3329 |
+
return canvas;
|
3330 |
+
}
|
3331 |
+
const eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;
|
3332 |
+
function addListener(node, type, listener) {
|
3333 |
+
node.addEventListener(type, listener, eventListenerOptions);
|
3334 |
+
}
|
3335 |
+
function removeListener(chart, type, listener) {
|
3336 |
+
chart.canvas.removeEventListener(type, listener, eventListenerOptions);
|
3337 |
+
}
|
3338 |
+
function fromNativeEvent(event, chart) {
|
3339 |
+
const type = EVENT_TYPES[event.type] || event.type;
|
3340 |
+
const {x, y} = getRelativePosition$1(event, chart);
|
3341 |
+
return {
|
3342 |
+
type,
|
3343 |
+
chart,
|
3344 |
+
native: event,
|
3345 |
+
x: x !== undefined ? x : null,
|
3346 |
+
y: y !== undefined ? y : null,
|
3347 |
+
};
|
3348 |
+
}
|
3349 |
+
function nodeListContains(nodeList, canvas) {
|
3350 |
+
for (const node of nodeList) {
|
3351 |
+
if (node === canvas || node.contains(canvas)) {
|
3352 |
+
return true;
|
3353 |
+
}
|
3354 |
+
}
|
3355 |
+
}
|
3356 |
+
function createAttachObserver(chart, type, listener) {
|
3357 |
+
const canvas = chart.canvas;
|
3358 |
+
const observer = new MutationObserver(entries => {
|
3359 |
+
let trigger = false;
|
3360 |
+
for (const entry of entries) {
|
3361 |
+
trigger = trigger || nodeListContains(entry.addedNodes, canvas);
|
3362 |
+
trigger = trigger && !nodeListContains(entry.removedNodes, canvas);
|
3363 |
+
}
|
3364 |
+
if (trigger) {
|
3365 |
+
listener();
|
3366 |
+
}
|
3367 |
+
});
|
3368 |
+
observer.observe(document, {childList: true, subtree: true});
|
3369 |
+
return observer;
|
3370 |
+
}
|
3371 |
+
function createDetachObserver(chart, type, listener) {
|
3372 |
+
const canvas = chart.canvas;
|
3373 |
+
const observer = new MutationObserver(entries => {
|
3374 |
+
let trigger = false;
|
3375 |
+
for (const entry of entries) {
|
3376 |
+
trigger = trigger || nodeListContains(entry.removedNodes, canvas);
|
3377 |
+
trigger = trigger && !nodeListContains(entry.addedNodes, canvas);
|
3378 |
+
}
|
3379 |
+
if (trigger) {
|
3380 |
+
listener();
|
3381 |
+
}
|
3382 |
+
});
|
3383 |
+
observer.observe(document, {childList: true, subtree: true});
|
3384 |
+
return observer;
|
3385 |
+
}
|
3386 |
+
const drpListeningCharts = new Map();
|
3387 |
+
let oldDevicePixelRatio = 0;
|
3388 |
+
function onWindowResize() {
|
3389 |
+
const dpr = window.devicePixelRatio;
|
3390 |
+
if (dpr === oldDevicePixelRatio) {
|
3391 |
+
return;
|
3392 |
+
}
|
3393 |
+
oldDevicePixelRatio = dpr;
|
3394 |
+
drpListeningCharts.forEach((resize, chart) => {
|
3395 |
+
if (chart.currentDevicePixelRatio !== dpr) {
|
3396 |
+
resize();
|
3397 |
+
}
|
3398 |
+
});
|
3399 |
+
}
|
3400 |
+
function listenDevicePixelRatioChanges(chart, resize) {
|
3401 |
+
if (!drpListeningCharts.size) {
|
3402 |
+
window.addEventListener('resize', onWindowResize);
|
3403 |
+
}
|
3404 |
+
drpListeningCharts.set(chart, resize);
|
3405 |
+
}
|
3406 |
+
function unlistenDevicePixelRatioChanges(chart) {
|
3407 |
+
drpListeningCharts.delete(chart);
|
3408 |
+
if (!drpListeningCharts.size) {
|
3409 |
+
window.removeEventListener('resize', onWindowResize);
|
3410 |
+
}
|
3411 |
+
}
|
3412 |
+
function createResizeObserver(chart, type, listener) {
|
3413 |
+
const canvas = chart.canvas;
|
3414 |
+
const container = canvas && _getParentNode(canvas);
|
3415 |
+
if (!container) {
|
3416 |
+
return;
|
3417 |
+
}
|
3418 |
+
const resize = throttled((width, height) => {
|
3419 |
+
const w = container.clientWidth;
|
3420 |
+
listener(width, height);
|
3421 |
+
if (w < container.clientWidth) {
|
3422 |
+
listener();
|
3423 |
+
}
|
3424 |
+
}, window);
|
3425 |
+
const observer = new ResizeObserver(entries => {
|
3426 |
+
const entry = entries[0];
|
3427 |
+
const width = entry.contentRect.width;
|
3428 |
+
const height = entry.contentRect.height;
|
3429 |
+
if (width === 0 && height === 0) {
|
3430 |
+
return;
|
3431 |
+
}
|
3432 |
+
resize(width, height);
|
3433 |
+
});
|
3434 |
+
observer.observe(container);
|
3435 |
+
listenDevicePixelRatioChanges(chart, resize);
|
3436 |
+
return observer;
|
3437 |
+
}
|
3438 |
+
function releaseObserver(chart, type, observer) {
|
3439 |
+
if (observer) {
|
3440 |
+
observer.disconnect();
|
3441 |
+
}
|
3442 |
+
if (type === 'resize') {
|
3443 |
+
unlistenDevicePixelRatioChanges(chart);
|
3444 |
+
}
|
3445 |
+
}
|
3446 |
+
function createProxyAndListen(chart, type, listener) {
|
3447 |
+
const canvas = chart.canvas;
|
3448 |
+
const proxy = throttled((event) => {
|
3449 |
+
if (chart.ctx !== null) {
|
3450 |
+
listener(fromNativeEvent(event, chart));
|
3451 |
+
}
|
3452 |
+
}, chart, (args) => {
|
3453 |
+
const event = args[0];
|
3454 |
+
return [event, event.offsetX, event.offsetY];
|
3455 |
+
});
|
3456 |
+
addListener(canvas, type, proxy);
|
3457 |
+
return proxy;
|
3458 |
+
}
|
3459 |
+
class DomPlatform extends BasePlatform {
|
3460 |
+
acquireContext(canvas, aspectRatio) {
|
3461 |
+
const context = canvas && canvas.getContext && canvas.getContext('2d');
|
3462 |
+
if (context && context.canvas === canvas) {
|
3463 |
+
initCanvas(canvas, aspectRatio);
|
3464 |
+
return context;
|
3465 |
+
}
|
3466 |
+
return null;
|
3467 |
+
}
|
3468 |
+
releaseContext(context) {
|
3469 |
+
const canvas = context.canvas;
|
3470 |
+
if (!canvas[EXPANDO_KEY]) {
|
3471 |
+
return false;
|
3472 |
+
}
|
3473 |
+
const initial = canvas[EXPANDO_KEY].initial;
|
3474 |
+
['height', 'width'].forEach((prop) => {
|
3475 |
+
const value = initial[prop];
|
3476 |
+
if (isNullOrUndef(value)) {
|
3477 |
+
canvas.removeAttribute(prop);
|
3478 |
+
} else {
|
3479 |
+
canvas.setAttribute(prop, value);
|
3480 |
+
}
|
3481 |
+
});
|
3482 |
+
const style = initial.style || {};
|
3483 |
+
Object.keys(style).forEach((key) => {
|
3484 |
+
canvas.style[key] = style[key];
|
3485 |
+
});
|
3486 |
+
canvas.width = canvas.width;
|
3487 |
+
delete canvas[EXPANDO_KEY];
|
3488 |
+
return true;
|
3489 |
+
}
|
3490 |
+
addEventListener(chart, type, listener) {
|
3491 |
+
this.removeEventListener(chart, type);
|
3492 |
+
const proxies = chart.$proxies || (chart.$proxies = {});
|
3493 |
+
const handlers = {
|
3494 |
+
attach: createAttachObserver,
|
3495 |
+
detach: createDetachObserver,
|
3496 |
+
resize: createResizeObserver
|
3497 |
+
};
|
3498 |
+
const handler = handlers[type] || createProxyAndListen;
|
3499 |
+
proxies[type] = handler(chart, type, listener);
|
3500 |
+
}
|
3501 |
+
removeEventListener(chart, type) {
|
3502 |
+
const proxies = chart.$proxies || (chart.$proxies = {});
|
3503 |
+
const proxy = proxies[type];
|
3504 |
+
if (!proxy) {
|
3505 |
+
return;
|
3506 |
+
}
|
3507 |
+
const handlers = {
|
3508 |
+
attach: releaseObserver,
|
3509 |
+
detach: releaseObserver,
|
3510 |
+
resize: releaseObserver
|
3511 |
+
};
|
3512 |
+
const handler = handlers[type] || removeListener;
|
3513 |
+
handler(chart, type, proxy);
|
3514 |
+
proxies[type] = undefined;
|
3515 |
+
}
|
3516 |
+
getDevicePixelRatio() {
|
3517 |
+
return window.devicePixelRatio;
|
3518 |
+
}
|
3519 |
+
getMaximumSize(canvas, width, height, aspectRatio) {
|
3520 |
+
return getMaximumSize(canvas, width, height, aspectRatio);
|
3521 |
+
}
|
3522 |
+
isAttached(canvas) {
|
3523 |
+
const container = _getParentNode(canvas);
|
3524 |
+
return !!(container && container.isConnected);
|
3525 |
+
}
|
3526 |
+
}
|
3527 |
+
|
3528 |
+
function _detectPlatform(canvas) {
|
3529 |
+
if (!_isDomSupported() || (typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas)) {
|
3530 |
+
return BasicPlatform;
|
3531 |
+
}
|
3532 |
+
return DomPlatform;
|
3533 |
+
}
|
3534 |
+
|
3535 |
+
var platforms = /*#__PURE__*/Object.freeze({
|
3536 |
+
__proto__: null,
|
3537 |
+
_detectPlatform: _detectPlatform,
|
3538 |
+
BasePlatform: BasePlatform,
|
3539 |
+
BasicPlatform: BasicPlatform,
|
3540 |
+
DomPlatform: DomPlatform
|
3541 |
+
});
|
3542 |
+
|
3543 |
+
const transparent = 'transparent';
|
3544 |
+
const interpolators = {
|
3545 |
+
boolean(from, to, factor) {
|
3546 |
+
return factor > 0.5 ? to : from;
|
3547 |
+
},
|
3548 |
+
color(from, to, factor) {
|
3549 |
+
const c0 = color(from || transparent);
|
3550 |
+
const c1 = c0.valid && color(to || transparent);
|
3551 |
+
return c1 && c1.valid
|
3552 |
+
? c1.mix(c0, factor).hexString()
|
3553 |
+
: to;
|
3554 |
+
},
|
3555 |
+
number(from, to, factor) {
|
3556 |
+
return from + (to - from) * factor;
|
3557 |
+
}
|
3558 |
+
};
|
3559 |
+
class Animation {
|
3560 |
+
constructor(cfg, target, prop, to) {
|
3561 |
+
const currentValue = target[prop];
|
3562 |
+
to = resolve([cfg.to, to, currentValue, cfg.from]);
|
3563 |
+
const from = resolve([cfg.from, currentValue, to]);
|
3564 |
+
this._active = true;
|
3565 |
+
this._fn = cfg.fn || interpolators[cfg.type || typeof from];
|
3566 |
+
this._easing = effects[cfg.easing] || effects.linear;
|
3567 |
+
this._start = Math.floor(Date.now() + (cfg.delay || 0));
|
3568 |
+
this._duration = this._total = Math.floor(cfg.duration);
|
3569 |
+
this._loop = !!cfg.loop;
|
3570 |
+
this._target = target;
|
3571 |
+
this._prop = prop;
|
3572 |
+
this._from = from;
|
3573 |
+
this._to = to;
|
3574 |
+
this._promises = undefined;
|
3575 |
+
}
|
3576 |
+
active() {
|
3577 |
+
return this._active;
|
3578 |
+
}
|
3579 |
+
update(cfg, to, date) {
|
3580 |
+
if (this._active) {
|
3581 |
+
this._notify(false);
|
3582 |
+
const currentValue = this._target[this._prop];
|
3583 |
+
const elapsed = date - this._start;
|
3584 |
+
const remain = this._duration - elapsed;
|
3585 |
+
this._start = date;
|
3586 |
+
this._duration = Math.floor(Math.max(remain, cfg.duration));
|
3587 |
+
this._total += elapsed;
|
3588 |
+
this._loop = !!cfg.loop;
|
3589 |
+
this._to = resolve([cfg.to, to, currentValue, cfg.from]);
|
3590 |
+
this._from = resolve([cfg.from, currentValue, to]);
|
3591 |
+
}
|
3592 |
+
}
|
3593 |
+
cancel() {
|
3594 |
+
if (this._active) {
|
3595 |
+
this.tick(Date.now());
|
3596 |
+
this._active = false;
|
3597 |
+
this._notify(false);
|
3598 |
+
}
|
3599 |
+
}
|
3600 |
+
tick(date) {
|
3601 |
+
const elapsed = date - this._start;
|
3602 |
+
const duration = this._duration;
|
3603 |
+
const prop = this._prop;
|
3604 |
+
const from = this._from;
|
3605 |
+
const loop = this._loop;
|
3606 |
+
const to = this._to;
|
3607 |
+
let factor;
|
3608 |
+
this._active = from !== to && (loop || (elapsed < duration));
|
3609 |
+
if (!this._active) {
|
3610 |
+
this._target[prop] = to;
|
3611 |
+
this._notify(true);
|
3612 |
+
return;
|
3613 |
+
}
|
3614 |
+
if (elapsed < 0) {
|
3615 |
+
this._target[prop] = from;
|
3616 |
+
return;
|
3617 |
+
}
|
3618 |
+
factor = (elapsed / duration) % 2;
|
3619 |
+
factor = loop && factor > 1 ? 2 - factor : factor;
|
3620 |
+
factor = this._easing(Math.min(1, Math.max(0, factor)));
|
3621 |
+
this._target[prop] = this._fn(from, to, factor);
|
3622 |
+
}
|
3623 |
+
wait() {
|
3624 |
+
const promises = this._promises || (this._promises = []);
|
3625 |
+
return new Promise((res, rej) => {
|
3626 |
+
promises.push({res, rej});
|
3627 |
+
});
|
3628 |
+
}
|
3629 |
+
_notify(resolved) {
|
3630 |
+
const method = resolved ? 'res' : 'rej';
|
3631 |
+
const promises = this._promises || [];
|
3632 |
+
for (let i = 0; i < promises.length; i++) {
|
3633 |
+
promises[i][method]();
|
3634 |
+
}
|
3635 |
+
}
|
3636 |
+
}
|
3637 |
+
|
3638 |
+
const numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];
|
3639 |
+
const colors = ['color', 'borderColor', 'backgroundColor'];
|
3640 |
+
defaults.set('animation', {
|
3641 |
+
delay: undefined,
|
3642 |
+
duration: 1000,
|
3643 |
+
easing: 'easeOutQuart',
|
3644 |
+
fn: undefined,
|
3645 |
+
from: undefined,
|
3646 |
+
loop: undefined,
|
3647 |
+
to: undefined,
|
3648 |
+
type: undefined,
|
3649 |
+
});
|
3650 |
+
const animationOptions = Object.keys(defaults.animation);
|
3651 |
+
defaults.describe('animation', {
|
3652 |
+
_fallback: false,
|
3653 |
+
_indexable: false,
|
3654 |
+
_scriptable: (name) => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn',
|
3655 |
+
});
|
3656 |
+
defaults.set('animations', {
|
3657 |
+
colors: {
|
3658 |
+
type: 'color',
|
3659 |
+
properties: colors
|
3660 |
+
},
|
3661 |
+
numbers: {
|
3662 |
+
type: 'number',
|
3663 |
+
properties: numbers
|
3664 |
+
},
|
3665 |
+
});
|
3666 |
+
defaults.describe('animations', {
|
3667 |
+
_fallback: 'animation',
|
3668 |
+
});
|
3669 |
+
defaults.set('transitions', {
|
3670 |
+
active: {
|
3671 |
+
animation: {
|
3672 |
+
duration: 400
|
3673 |
+
}
|
3674 |
+
},
|
3675 |
+
resize: {
|
3676 |
+
animation: {
|
3677 |
+
duration: 0
|
3678 |
+
}
|
3679 |
+
},
|
3680 |
+
show: {
|
3681 |
+
animations: {
|
3682 |
+
colors: {
|
3683 |
+
from: 'transparent'
|
3684 |
+
},
|
3685 |
+
visible: {
|
3686 |
+
type: 'boolean',
|
3687 |
+
duration: 0
|
3688 |
+
},
|
3689 |
+
}
|
3690 |
+
},
|
3691 |
+
hide: {
|
3692 |
+
animations: {
|
3693 |
+
colors: {
|
3694 |
+
to: 'transparent'
|
3695 |
+
},
|
3696 |
+
visible: {
|
3697 |
+
type: 'boolean',
|
3698 |
+
easing: 'linear',
|
3699 |
+
fn: v => v | 0
|
3700 |
+
},
|
3701 |
+
}
|
3702 |
+
}
|
3703 |
+
});
|
3704 |
+
class Animations {
|
3705 |
+
constructor(chart, config) {
|
3706 |
+
this._chart = chart;
|
3707 |
+
this._properties = new Map();
|
3708 |
+
this.configure(config);
|
3709 |
+
}
|
3710 |
+
configure(config) {
|
3711 |
+
if (!isObject(config)) {
|
3712 |
+
return;
|
3713 |
+
}
|
3714 |
+
const animatedProps = this._properties;
|
3715 |
+
Object.getOwnPropertyNames(config).forEach(key => {
|
3716 |
+
const cfg = config[key];
|
3717 |
+
if (!isObject(cfg)) {
|
3718 |
+
return;
|
3719 |
+
}
|
3720 |
+
const resolved = {};
|
3721 |
+
for (const option of animationOptions) {
|
3722 |
+
resolved[option] = cfg[option];
|
3723 |
+
}
|
3724 |
+
(isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => {
|
3725 |
+
if (prop === key || !animatedProps.has(prop)) {
|
3726 |
+
animatedProps.set(prop, resolved);
|
3727 |
+
}
|
3728 |
+
});
|
3729 |
+
});
|
3730 |
+
}
|
3731 |
+
_animateOptions(target, values) {
|
3732 |
+
const newOptions = values.options;
|
3733 |
+
const options = resolveTargetOptions(target, newOptions);
|
3734 |
+
if (!options) {
|
3735 |
+
return [];
|
3736 |
+
}
|
3737 |
+
const animations = this._createAnimations(options, newOptions);
|
3738 |
+
if (newOptions.$shared) {
|
3739 |
+
awaitAll(target.options.$animations, newOptions).then(() => {
|
3740 |
+
target.options = newOptions;
|
3741 |
+
}, () => {
|
3742 |
+
});
|
3743 |
+
}
|
3744 |
+
return animations;
|
3745 |
+
}
|
3746 |
+
_createAnimations(target, values) {
|
3747 |
+
const animatedProps = this._properties;
|
3748 |
+
const animations = [];
|
3749 |
+
const running = target.$animations || (target.$animations = {});
|
3750 |
+
const props = Object.keys(values);
|
3751 |
+
const date = Date.now();
|
3752 |
+
let i;
|
3753 |
+
for (i = props.length - 1; i >= 0; --i) {
|
3754 |
+
const prop = props[i];
|
3755 |
+
if (prop.charAt(0) === '$') {
|
3756 |
+
continue;
|
3757 |
+
}
|
3758 |
+
if (prop === 'options') {
|
3759 |
+
animations.push(...this._animateOptions(target, values));
|
3760 |
+
continue;
|
3761 |
+
}
|
3762 |
+
const value = values[prop];
|
3763 |
+
let animation = running[prop];
|
3764 |
+
const cfg = animatedProps.get(prop);
|
3765 |
+
if (animation) {
|
3766 |
+
if (cfg && animation.active()) {
|
3767 |
+
animation.update(cfg, value, date);
|
3768 |
+
continue;
|
3769 |
+
} else {
|
3770 |
+
animation.cancel();
|
3771 |
+
}
|
3772 |
+
}
|
3773 |
+
if (!cfg || !cfg.duration) {
|
3774 |
+
target[prop] = value;
|
3775 |
+
continue;
|
3776 |
+
}
|
3777 |
+
running[prop] = animation = new Animation(cfg, target, prop, value);
|
3778 |
+
animations.push(animation);
|
3779 |
+
}
|
3780 |
+
return animations;
|
3781 |
+
}
|
3782 |
+
update(target, values) {
|
3783 |
+
if (this._properties.size === 0) {
|
3784 |
+
Object.assign(target, values);
|
3785 |
+
return;
|
3786 |
+
}
|
3787 |
+
const animations = this._createAnimations(target, values);
|
3788 |
+
if (animations.length) {
|
3789 |
+
animator.add(this._chart, animations);
|
3790 |
+
return true;
|
3791 |
+
}
|
3792 |
+
}
|
3793 |
+
}
|
3794 |
+
function awaitAll(animations, properties) {
|
3795 |
+
const running = [];
|
3796 |
+
const keys = Object.keys(properties);
|
3797 |
+
for (let i = 0; i < keys.length; i++) {
|
3798 |
+
const anim = animations[keys[i]];
|
3799 |
+
if (anim && anim.active()) {
|
3800 |
+
running.push(anim.wait());
|
3801 |
+
}
|
3802 |
+
}
|
3803 |
+
return Promise.all(running);
|
3804 |
+
}
|
3805 |
+
function resolveTargetOptions(target, newOptions) {
|
3806 |
+
if (!newOptions) {
|
3807 |
+
return;
|
3808 |
+
}
|
3809 |
+
let options = target.options;
|
3810 |
+
if (!options) {
|
3811 |
+
target.options = newOptions;
|
3812 |
+
return;
|
3813 |
+
}
|
3814 |
+
if (options.$shared) {
|
3815 |
+
target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});
|
3816 |
+
}
|
3817 |
+
return options;
|
3818 |
+
}
|
3819 |
+
|
3820 |
+
function scaleClip(scale, allowedOverflow) {
|
3821 |
+
const opts = scale && scale.options || {};
|
3822 |
+
const reverse = opts.reverse;
|
3823 |
+
const min = opts.min === undefined ? allowedOverflow : 0;
|
3824 |
+
const max = opts.max === undefined ? allowedOverflow : 0;
|
3825 |
+
return {
|
3826 |
+
start: reverse ? max : min,
|
3827 |
+
end: reverse ? min : max
|
3828 |
+
};
|
3829 |
+
}
|
3830 |
+
function defaultClip(xScale, yScale, allowedOverflow) {
|
3831 |
+
if (allowedOverflow === false) {
|
3832 |
+
return false;
|
3833 |
+
}
|
3834 |
+
const x = scaleClip(xScale, allowedOverflow);
|
3835 |
+
const y = scaleClip(yScale, allowedOverflow);
|
3836 |
+
return {
|
3837 |
+
top: y.end,
|
3838 |
+
right: x.end,
|
3839 |
+
bottom: y.start,
|
3840 |
+
left: x.start
|
3841 |
+
};
|
3842 |
+
}
|
3843 |
+
function toClip(value) {
|
3844 |
+
let t, r, b, l;
|
3845 |
+
if (isObject(value)) {
|
3846 |
+
t = value.top;
|
3847 |
+
r = value.right;
|
3848 |
+
b = value.bottom;
|
3849 |
+
l = value.left;
|
3850 |
+
} else {
|
3851 |
+
t = r = b = l = value;
|
3852 |
+
}
|
3853 |
+
return {
|
3854 |
+
top: t,
|
3855 |
+
right: r,
|
3856 |
+
bottom: b,
|
3857 |
+
left: l,
|
3858 |
+
disabled: value === false
|
3859 |
+
};
|
3860 |
+
}
|
3861 |
+
function getSortedDatasetIndices(chart, filterVisible) {
|
3862 |
+
const keys = [];
|
3863 |
+
const metasets = chart._getSortedDatasetMetas(filterVisible);
|
3864 |
+
let i, ilen;
|
3865 |
+
for (i = 0, ilen = metasets.length; i < ilen; ++i) {
|
3866 |
+
keys.push(metasets[i].index);
|
3867 |
+
}
|
3868 |
+
return keys;
|
3869 |
+
}
|
3870 |
+
function applyStack(stack, value, dsIndex, options = {}) {
|
3871 |
+
const keys = stack.keys;
|
3872 |
+
const singleMode = options.mode === 'single';
|
3873 |
+
let i, ilen, datasetIndex, otherValue;
|
3874 |
+
if (value === null) {
|
3875 |
+
return;
|
3876 |
+
}
|
3877 |
+
for (i = 0, ilen = keys.length; i < ilen; ++i) {
|
3878 |
+
datasetIndex = +keys[i];
|
3879 |
+
if (datasetIndex === dsIndex) {
|
3880 |
+
if (options.all) {
|
3881 |
+
continue;
|
3882 |
+
}
|
3883 |
+
break;
|
3884 |
+
}
|
3885 |
+
otherValue = stack.values[datasetIndex];
|
3886 |
+
if (isNumberFinite(otherValue) && (singleMode || (value === 0 || sign(value) === sign(otherValue)))) {
|
3887 |
+
value += otherValue;
|
3888 |
+
}
|
3889 |
+
}
|
3890 |
+
return value;
|
3891 |
+
}
|
3892 |
+
function convertObjectDataToArray(data) {
|
3893 |
+
const keys = Object.keys(data);
|
3894 |
+
const adata = new Array(keys.length);
|
3895 |
+
let i, ilen, key;
|
3896 |
+
for (i = 0, ilen = keys.length; i < ilen; ++i) {
|
3897 |
+
key = keys[i];
|
3898 |
+
adata[i] = {
|
3899 |
+
x: key,
|
3900 |
+
y: data[key]
|
3901 |
+
};
|
3902 |
+
}
|
3903 |
+
return adata;
|
3904 |
+
}
|
3905 |
+
function isStacked(scale, meta) {
|
3906 |
+
const stacked = scale && scale.options.stacked;
|
3907 |
+
return stacked || (stacked === undefined && meta.stack !== undefined);
|
3908 |
+
}
|
3909 |
+
function getStackKey(indexScale, valueScale, meta) {
|
3910 |
+
return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;
|
3911 |
+
}
|
3912 |
+
function getUserBounds(scale) {
|
3913 |
+
const {min, max, minDefined, maxDefined} = scale.getUserBounds();
|
3914 |
+
return {
|
3915 |
+
min: minDefined ? min : Number.NEGATIVE_INFINITY,
|
3916 |
+
max: maxDefined ? max : Number.POSITIVE_INFINITY
|
3917 |
+
};
|
3918 |
+
}
|
3919 |
+
function getOrCreateStack(stacks, stackKey, indexValue) {
|
3920 |
+
const subStack = stacks[stackKey] || (stacks[stackKey] = {});
|
3921 |
+
return subStack[indexValue] || (subStack[indexValue] = {});
|
3922 |
+
}
|
3923 |
+
function getLastIndexInStack(stack, vScale, positive, type) {
|
3924 |
+
for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {
|
3925 |
+
const value = stack[meta.index];
|
3926 |
+
if ((positive && value > 0) || (!positive && value < 0)) {
|
3927 |
+
return meta.index;
|
3928 |
+
}
|
3929 |
+
}
|
3930 |
+
return null;
|
3931 |
+
}
|
3932 |
+
function updateStacks(controller, parsed) {
|
3933 |
+
const {chart, _cachedMeta: meta} = controller;
|
3934 |
+
const stacks = chart._stacks || (chart._stacks = {});
|
3935 |
+
const {iScale, vScale, index: datasetIndex} = meta;
|
3936 |
+
const iAxis = iScale.axis;
|
3937 |
+
const vAxis = vScale.axis;
|
3938 |
+
const key = getStackKey(iScale, vScale, meta);
|
3939 |
+
const ilen = parsed.length;
|
3940 |
+
let stack;
|
3941 |
+
for (let i = 0; i < ilen; ++i) {
|
3942 |
+
const item = parsed[i];
|
3943 |
+
const {[iAxis]: index, [vAxis]: value} = item;
|
3944 |
+
const itemStacks = item._stacks || (item._stacks = {});
|
3945 |
+
stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);
|
3946 |
+
stack[datasetIndex] = value;
|
3947 |
+
stack._top = getLastIndexInStack(stack, vScale, true, meta.type);
|
3948 |
+
stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);
|
3949 |
+
}
|
3950 |
+
}
|
3951 |
+
function getFirstScaleId(chart, axis) {
|
3952 |
+
const scales = chart.scales;
|
3953 |
+
return Object.keys(scales).filter(key => scales[key].axis === axis).shift();
|
3954 |
+
}
|
3955 |
+
function createDatasetContext(parent, index) {
|
3956 |
+
return createContext(parent,
|
3957 |
+
{
|
3958 |
+
active: false,
|
3959 |
+
dataset: undefined,
|
3960 |
+
datasetIndex: index,
|
3961 |
+
index,
|
3962 |
+
mode: 'default',
|
3963 |
+
type: 'dataset'
|
3964 |
+
}
|
3965 |
+
);
|
3966 |
+
}
|
3967 |
+
function createDataContext(parent, index, element) {
|
3968 |
+
return createContext(parent, {
|
3969 |
+
active: false,
|
3970 |
+
dataIndex: index,
|
3971 |
+
parsed: undefined,
|
3972 |
+
raw: undefined,
|
3973 |
+
element,
|
3974 |
+
index,
|
3975 |
+
mode: 'default',
|
3976 |
+
type: 'data'
|
3977 |
+
});
|
3978 |
+
}
|
3979 |
+
function clearStacks(meta, items) {
|
3980 |
+
const datasetIndex = meta.controller.index;
|
3981 |
+
const axis = meta.vScale && meta.vScale.axis;
|
3982 |
+
if (!axis) {
|
3983 |
+
return;
|
3984 |
+
}
|
3985 |
+
items = items || meta._parsed;
|
3986 |
+
for (const parsed of items) {
|
3987 |
+
const stacks = parsed._stacks;
|
3988 |
+
if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {
|
3989 |
+
return;
|
3990 |
+
}
|
3991 |
+
delete stacks[axis][datasetIndex];
|
3992 |
+
}
|
3993 |
+
}
|
3994 |
+
const isDirectUpdateMode = (mode) => mode === 'reset' || mode === 'none';
|
3995 |
+
const cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);
|
3996 |
+
const createStack = (canStack, meta, chart) => canStack && !meta.hidden && meta._stacked
|
3997 |
+
&& {keys: getSortedDatasetIndices(chart, true), values: null};
|
3998 |
+
class DatasetController {
|
3999 |
+
constructor(chart, datasetIndex) {
|
4000 |
+
this.chart = chart;
|
4001 |
+
this._ctx = chart.ctx;
|
4002 |
+
this.index = datasetIndex;
|
4003 |
+
this._cachedDataOpts = {};
|
4004 |
+
this._cachedMeta = this.getMeta();
|
4005 |
+
this._type = this._cachedMeta.type;
|
4006 |
+
this.options = undefined;
|
4007 |
+
this._parsing = false;
|
4008 |
+
this._data = undefined;
|
4009 |
+
this._objectData = undefined;
|
4010 |
+
this._sharedOptions = undefined;
|
4011 |
+
this._drawStart = undefined;
|
4012 |
+
this._drawCount = undefined;
|
4013 |
+
this.enableOptionSharing = false;
|
4014 |
+
this.$context = undefined;
|
4015 |
+
this._syncList = [];
|
4016 |
+
this.initialize();
|
4017 |
+
}
|
4018 |
+
initialize() {
|
4019 |
+
const meta = this._cachedMeta;
|
4020 |
+
this.configure();
|
4021 |
+
this.linkScales();
|
4022 |
+
meta._stacked = isStacked(meta.vScale, meta);
|
4023 |
+
this.addElements();
|
4024 |
+
}
|
4025 |
+
updateIndex(datasetIndex) {
|
4026 |
+
if (this.index !== datasetIndex) {
|
4027 |
+
clearStacks(this._cachedMeta);
|
4028 |
+
}
|
4029 |
+
this.index = datasetIndex;
|
4030 |
+
}
|
4031 |
+
linkScales() {
|
4032 |
+
const chart = this.chart;
|
4033 |
+
const meta = this._cachedMeta;
|
4034 |
+
const dataset = this.getDataset();
|
4035 |
+
const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;
|
4036 |
+
const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));
|
4037 |
+
const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));
|
4038 |
+
const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));
|
4039 |
+
const indexAxis = meta.indexAxis;
|
4040 |
+
const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);
|
4041 |
+
const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);
|
4042 |
+
meta.xScale = this.getScaleForId(xid);
|
4043 |
+
meta.yScale = this.getScaleForId(yid);
|
4044 |
+
meta.rScale = this.getScaleForId(rid);
|
4045 |
+
meta.iScale = this.getScaleForId(iid);
|
4046 |
+
meta.vScale = this.getScaleForId(vid);
|
4047 |
+
}
|
4048 |
+
getDataset() {
|
4049 |
+
return this.chart.data.datasets[this.index];
|
4050 |
+
}
|
4051 |
+
getMeta() {
|
4052 |
+
return this.chart.getDatasetMeta(this.index);
|
4053 |
+
}
|
4054 |
+
getScaleForId(scaleID) {
|
4055 |
+
return this.chart.scales[scaleID];
|
4056 |
+
}
|
4057 |
+
_getOtherScale(scale) {
|
4058 |
+
const meta = this._cachedMeta;
|
4059 |
+
return scale === meta.iScale
|
4060 |
+
? meta.vScale
|
4061 |
+
: meta.iScale;
|
4062 |
+
}
|
4063 |
+
reset() {
|
4064 |
+
this._update('reset');
|
4065 |
+
}
|
4066 |
+
_destroy() {
|
4067 |
+
const meta = this._cachedMeta;
|
4068 |
+
if (this._data) {
|
4069 |
+
unlistenArrayEvents(this._data, this);
|
4070 |
+
}
|
4071 |
+
if (meta._stacked) {
|
4072 |
+
clearStacks(meta);
|
4073 |
+
}
|
4074 |
+
}
|
4075 |
+
_dataCheck() {
|
4076 |
+
const dataset = this.getDataset();
|
4077 |
+
const data = dataset.data || (dataset.data = []);
|
4078 |
+
const _data = this._data;
|
4079 |
+
if (isObject(data)) {
|
4080 |
+
this._data = convertObjectDataToArray(data);
|
4081 |
+
} else if (_data !== data) {
|
4082 |
+
if (_data) {
|
4083 |
+
unlistenArrayEvents(_data, this);
|
4084 |
+
const meta = this._cachedMeta;
|
4085 |
+
clearStacks(meta);
|
4086 |
+
meta._parsed = [];
|
4087 |
+
}
|
4088 |
+
if (data && Object.isExtensible(data)) {
|
4089 |
+
listenArrayEvents(data, this);
|
4090 |
+
}
|
4091 |
+
this._syncList = [];
|
4092 |
+
this._data = data;
|
4093 |
+
}
|
4094 |
+
}
|
4095 |
+
addElements() {
|
4096 |
+
const meta = this._cachedMeta;
|
4097 |
+
this._dataCheck();
|
4098 |
+
if (this.datasetElementType) {
|
4099 |
+
meta.dataset = new this.datasetElementType();
|
4100 |
+
}
|
4101 |
+
}
|
4102 |
+
buildOrUpdateElements(resetNewElements) {
|
4103 |
+
const meta = this._cachedMeta;
|
4104 |
+
const dataset = this.getDataset();
|
4105 |
+
let stackChanged = false;
|
4106 |
+
this._dataCheck();
|
4107 |
+
const oldStacked = meta._stacked;
|
4108 |
+
meta._stacked = isStacked(meta.vScale, meta);
|
4109 |
+
if (meta.stack !== dataset.stack) {
|
4110 |
+
stackChanged = true;
|
4111 |
+
clearStacks(meta);
|
4112 |
+
meta.stack = dataset.stack;
|
4113 |
+
}
|
4114 |
+
this._resyncElements(resetNewElements);
|
4115 |
+
if (stackChanged || oldStacked !== meta._stacked) {
|
4116 |
+
updateStacks(this, meta._parsed);
|
4117 |
+
}
|
4118 |
+
}
|
4119 |
+
configure() {
|
4120 |
+
const config = this.chart.config;
|
4121 |
+
const scopeKeys = config.datasetScopeKeys(this._type);
|
4122 |
+
const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);
|
4123 |
+
this.options = config.createResolver(scopes, this.getContext());
|
4124 |
+
this._parsing = this.options.parsing;
|
4125 |
+
this._cachedDataOpts = {};
|
4126 |
+
}
|
4127 |
+
parse(start, count) {
|
4128 |
+
const {_cachedMeta: meta, _data: data} = this;
|
4129 |
+
const {iScale, _stacked} = meta;
|
4130 |
+
const iAxis = iScale.axis;
|
4131 |
+
let sorted = start === 0 && count === data.length ? true : meta._sorted;
|
4132 |
+
let prev = start > 0 && meta._parsed[start - 1];
|
4133 |
+
let i, cur, parsed;
|
4134 |
+
if (this._parsing === false) {
|
4135 |
+
meta._parsed = data;
|
4136 |
+
meta._sorted = true;
|
4137 |
+
parsed = data;
|
4138 |
+
} else {
|
4139 |
+
if (isArray(data[start])) {
|
4140 |
+
parsed = this.parseArrayData(meta, data, start, count);
|
4141 |
+
} else if (isObject(data[start])) {
|
4142 |
+
parsed = this.parseObjectData(meta, data, start, count);
|
4143 |
+
} else {
|
4144 |
+
parsed = this.parsePrimitiveData(meta, data, start, count);
|
4145 |
+
}
|
4146 |
+
const isNotInOrderComparedToPrev = () => cur[iAxis] === null || (prev && cur[iAxis] < prev[iAxis]);
|
4147 |
+
for (i = 0; i < count; ++i) {
|
4148 |
+
meta._parsed[i + start] = cur = parsed[i];
|
4149 |
+
if (sorted) {
|
4150 |
+
if (isNotInOrderComparedToPrev()) {
|
4151 |
+
sorted = false;
|
4152 |
+
}
|
4153 |
+
prev = cur;
|
4154 |
+
}
|
4155 |
+
}
|
4156 |
+
meta._sorted = sorted;
|
4157 |
+
}
|
4158 |
+
if (_stacked) {
|
4159 |
+
updateStacks(this, parsed);
|
4160 |
+
}
|
4161 |
+
}
|
4162 |
+
parsePrimitiveData(meta, data, start, count) {
|
4163 |
+
const {iScale, vScale} = meta;
|
4164 |
+
const iAxis = iScale.axis;
|
4165 |
+
const vAxis = vScale.axis;
|
4166 |
+
const labels = iScale.getLabels();
|
4167 |
+
const singleScale = iScale === vScale;
|
4168 |
+
const parsed = new Array(count);
|
4169 |
+
let i, ilen, index;
|
4170 |
+
for (i = 0, ilen = count; i < ilen; ++i) {
|
4171 |
+
index = i + start;
|
4172 |
+
parsed[i] = {
|
4173 |
+
[iAxis]: singleScale || iScale.parse(labels[index], index),
|
4174 |
+
[vAxis]: vScale.parse(data[index], index)
|
4175 |
+
};
|
4176 |
+
}
|
4177 |
+
return parsed;
|
4178 |
+
}
|
4179 |
+
parseArrayData(meta, data, start, count) {
|
4180 |
+
const {xScale, yScale} = meta;
|
4181 |
+
const parsed = new Array(count);
|
4182 |
+
let i, ilen, index, item;
|
4183 |
+
for (i = 0, ilen = count; i < ilen; ++i) {
|
4184 |
+
index = i + start;
|
4185 |
+
item = data[index];
|
4186 |
+
parsed[i] = {
|
4187 |
+
x: xScale.parse(item[0], index),
|
4188 |
+
y: yScale.parse(item[1], index)
|
4189 |
+
};
|
4190 |
+
}
|
4191 |
+
return parsed;
|
4192 |
+
}
|
4193 |
+
parseObjectData(meta, data, start, count) {
|
4194 |
+
const {xScale, yScale} = meta;
|
4195 |
+
const {xAxisKey = 'x', yAxisKey = 'y'} = this._parsing;
|
4196 |
+
const parsed = new Array(count);
|
4197 |
+
let i, ilen, index, item;
|
4198 |
+
for (i = 0, ilen = count; i < ilen; ++i) {
|
4199 |
+
index = i + start;
|
4200 |
+
item = data[index];
|
4201 |
+
parsed[i] = {
|
4202 |
+
x: xScale.parse(resolveObjectKey(item, xAxisKey), index),
|
4203 |
+
y: yScale.parse(resolveObjectKey(item, yAxisKey), index)
|
4204 |
+
};
|
4205 |
+
}
|
4206 |
+
return parsed;
|
4207 |
+
}
|
4208 |
+
getParsed(index) {
|
4209 |
+
return this._cachedMeta._parsed[index];
|
4210 |
+
}
|
4211 |
+
getDataElement(index) {
|
4212 |
+
return this._cachedMeta.data[index];
|
4213 |
+
}
|
4214 |
+
applyStack(scale, parsed, mode) {
|
4215 |
+
const chart = this.chart;
|
4216 |
+
const meta = this._cachedMeta;
|
4217 |
+
const value = parsed[scale.axis];
|
4218 |
+
const stack = {
|
4219 |
+
keys: getSortedDatasetIndices(chart, true),
|
4220 |
+
values: parsed._stacks[scale.axis]
|
4221 |
+
};
|
4222 |
+
return applyStack(stack, value, meta.index, {mode});
|
4223 |
+
}
|
4224 |
+
updateRangeFromParsed(range, scale, parsed, stack) {
|
4225 |
+
const parsedValue = parsed[scale.axis];
|
4226 |
+
let value = parsedValue === null ? NaN : parsedValue;
|
4227 |
+
const values = stack && parsed._stacks[scale.axis];
|
4228 |
+
if (stack && values) {
|
4229 |
+
stack.values = values;
|
4230 |
+
value = applyStack(stack, parsedValue, this._cachedMeta.index);
|
4231 |
+
}
|
4232 |
+
range.min = Math.min(range.min, value);
|
4233 |
+
range.max = Math.max(range.max, value);
|
4234 |
+
}
|
4235 |
+
getMinMax(scale, canStack) {
|
4236 |
+
const meta = this._cachedMeta;
|
4237 |
+
const _parsed = meta._parsed;
|
4238 |
+
const sorted = meta._sorted && scale === meta.iScale;
|
4239 |
+
const ilen = _parsed.length;
|
4240 |
+
const otherScale = this._getOtherScale(scale);
|
4241 |
+
const stack = createStack(canStack, meta, this.chart);
|
4242 |
+
const range = {min: Number.POSITIVE_INFINITY, max: Number.NEGATIVE_INFINITY};
|
4243 |
+
const {min: otherMin, max: otherMax} = getUserBounds(otherScale);
|
4244 |
+
let i, parsed;
|
4245 |
+
function _skip() {
|
4246 |
+
parsed = _parsed[i];
|
4247 |
+
const otherValue = parsed[otherScale.axis];
|
4248 |
+
return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;
|
4249 |
+
}
|
4250 |
+
for (i = 0; i < ilen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|