Version Description
Download this release
Release Info
Developer | TemplateMonster 2002 |
Plugin | Cherry Testimonials |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- LICENSE +674 -0
- cherry-framework/cherry-core.php +17 -1
- cherry-framework/config.json +0 -196
- cherry-framework/modules/cherry-customizer/cherry-customizer.php +37 -44
- cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php +1 -0
- cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php +13 -4
- cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss +18 -10
- cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -1
- cherry-framework/modules/cherry-js-core/assets/js/cherry-js-core.js +1 -24
- cherry-framework/modules/cherry-js-core/assets/js/min/cherry-js-core.min.js +1 -1
- cherry-framework/modules/cherry-template-manager/cherry-template-manager.php +0 -112
- cherry-framework/modules/cherry-template-manager/inc/cherry-template-loader.php +0 -193
- cherry-framework/modules/cherry-template-manager/inc/cherry-template-parser.php +0 -196
- cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php +1 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/min/ui-button.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/ui-kit/_mixins.scss +2 -4
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss +25 -21
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/wp-color-picker-alpha.min.js +13 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss +42 -72
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/wp-color-picker-alpha.js +490 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php +17 -2
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/min/ui-dimensions.min.css +1 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-dimensions.js +96 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-dimensions.scss +115 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-kit/_mixins.scss +15 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-kit/_variables.scss +7 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/ui-dimensions.php +260 -0
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss +8 -7
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-kit/_mixins.scss +3 -4
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-kit/_mixins.scss +2 -3
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss +66 -41
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss +35 -20
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/min/ui-repeater.min.js +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/ui-repeater.js +10 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-kit/_mixins.scss +9 -10
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-kit/_variables.scss +5 -5
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss +102 -81
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss +16 -26
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-kit/_mixins.scss +9 -8
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-kit/_variables.scss +4 -4
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss +3 -3
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-kit/_mixins.scss +0 -182
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss +46 -61
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-kit/_mixins.scss +9 -8
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-kit/_variables.scss +4 -4
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css +1 -1
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-kit/_mixins.scss +9 -8
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-kit/_variables.scss +4 -4
- cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss +1 -1
- cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php +3 -1
- cherry-framework/modules/cherry5-interface-builder/cherry5-interface-builder.php +495 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/_use-in-js.scss +17 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.css +1 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.js +193 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.scss +511 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/min/cherry-interface-builder.min.css +1 -0
- cherry-framework/modules/cherry5-interface-builder/inc/assets/min/cherry-interface-builder.min.js +1 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/component-accordion.php +30 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/component-repeater.php +30 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/component-tab-horizontal.php +35 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/component-tab-vertical.php +35 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/component-toggle.php +30 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/control.php +34 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/form.php +24 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/html.php +24 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/section.php +36 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/settings-children-title.php +18 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/settings.php +32 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/tab-children-title.php +20 -0
- cherry-framework/modules/cherry5-interface-builder/inc/views/toggle-children-title.php +22 -0
- cherry-framework/setup.php +7 -7
- includes/swiper/css/swiper.css +618 -618
- includes/swiper/css/swiper.min.css +11 -11
- includes/swiper/js/swiper.jquery.js +0 -4686
- includes/swiper/js/swiper.jquery.min.js +0 -17
- includes/swiper/js/swiper.js +548 -7740
LICENSE
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
cherry-framework/cherry-core.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Class Cherry Core
|
4 |
-
* Version: 1.5.
|
5 |
*
|
6 |
* @package Cherry_Framework
|
7 |
* @subpackage Class
|
@@ -265,6 +265,15 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
|
|
265 |
* @return bool
|
266 |
*/
|
267 |
public static function load_module( $module, $path ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
$class_name = self::get_class_name( $module );
|
269 |
|
270 |
if ( ! $path ) {
|
@@ -289,8 +298,15 @@ if ( ! class_exists( 'Cherry_Core' ) ) {
|
|
289 |
* @return object
|
290 |
*/
|
291 |
public function get_module_instance( $module, $args = array() ) {
|
|
|
292 |
$class_name = self::get_class_name( $module );
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
if ( ! class_exists( $class_name ) ) {
|
295 |
echo '<p>Class <b>' . esc_html( $class_name ) . '</b> not exist!</p>';
|
296 |
return false;
|
1 |
<?php
|
2 |
/**
|
3 |
* Class Cherry Core
|
4 |
+
* Version: 1.5.11
|
5 |
*
|
6 |
* @package Cherry_Framework
|
7 |
* @subpackage Class
|
265 |
* @return bool
|
266 |
*/
|
267 |
public static function load_module( $module, $path ) {
|
268 |
+
|
269 |
+
if (
|
270 |
+
'cherry-interface-builder' === $module
|
271 |
+
&& file_exists( str_replace( 'cherry-interface-builder', 'cherry5-interface-builder', $path ) )
|
272 |
+
) {
|
273 |
+
$module = 'cherry5-interface-builder';
|
274 |
+
$path = str_replace( 'cherry-interface-builder', 'cherry5-interface-builder', $path );
|
275 |
+
}
|
276 |
+
|
277 |
$class_name = self::get_class_name( $module );
|
278 |
|
279 |
if ( ! $path ) {
|
298 |
* @return object
|
299 |
*/
|
300 |
public function get_module_instance( $module, $args = array() ) {
|
301 |
+
|
302 |
$class_name = self::get_class_name( $module );
|
303 |
|
304 |
+
if (
|
305 |
+
'cherry-interface-builder' === $module
|
306 |
+
&& class_exists( self::get_class_name( 'cherry5-interface-builder' ) ) ) {
|
307 |
+
$class_name = self::get_class_name( 'cherry5-interface-builder' );
|
308 |
+
}
|
309 |
+
|
310 |
if ( ! class_exists( $class_name ) ) {
|
311 |
echo '<p>Class <b>' . esc_html( $class_name ) . '</b> not exist!</p>';
|
312 |
return false;
|
cherry-framework/config.json
DELETED
@@ -1,196 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name" : "Cherry Framework",
|
3 |
-
"version" : "1.4.3.1",
|
4 |
-
"description" : "",
|
5 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs",
|
6 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework",
|
7 |
-
"modules" : {
|
8 |
-
"cherry-breadcrumbs" : {
|
9 |
-
"name" : "Breadcrumb Trail",
|
10 |
-
"description" : "A breadcrumb menu script for WordPress.",
|
11 |
-
"version" : "1.1.3",
|
12 |
-
"doc_link" : "",
|
13 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-breadcrumbs",
|
14 |
-
"compatible" : ["theme", "plugin"],
|
15 |
-
"wordpress_org" : true,
|
16 |
-
"required" : false,
|
17 |
-
"dependencies" : []
|
18 |
-
},
|
19 |
-
"cherry-customizer" : {
|
20 |
-
"name" : "Customizer API",
|
21 |
-
"description" : "Customizer functionality.",
|
22 |
-
"version" : "1.1.7",
|
23 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/01.%20cherry-customizer.md",
|
24 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-customizer",
|
25 |
-
"compatible" : ["theme", "plugin"],
|
26 |
-
"wordpress_org" : true,
|
27 |
-
"required" : false,
|
28 |
-
"dependencies" : []
|
29 |
-
},
|
30 |
-
"cherry-db-updater" : {
|
31 |
-
"name" : "Database Updater",
|
32 |
-
"description" : "Handle database updates if required.",
|
33 |
-
"version" : "1.0.0",
|
34 |
-
"doc_link" : "",
|
35 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-db-updater",
|
36 |
-
"compatible" : ["theme", "plugin"],
|
37 |
-
"wordpress_org" : true,
|
38 |
-
"required" : false,
|
39 |
-
"dependencies" : []
|
40 |
-
},
|
41 |
-
"cherry-dynamic-css" : {
|
42 |
-
"name" : "Dynamic CSS",
|
43 |
-
"description" : "Generate CSS.",
|
44 |
-
"version" : "1.4.0",
|
45 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/03.%20cherry-dynamic-css.md",
|
46 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-dynamic-css",
|
47 |
-
"compatible" : ["theme", "plugin"],
|
48 |
-
"wordpress_org" : true,
|
49 |
-
"required" : false,
|
50 |
-
"dependencies" : []
|
51 |
-
},
|
52 |
-
"cherry-google-fonts-loader" : {
|
53 |
-
"name" : "Google Fonts Loader",
|
54 |
-
"description" : "Enqueue Google fonts.",
|
55 |
-
"version" : "1.1.0",
|
56 |
-
"doc_link" : "",
|
57 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-google-fonts-loader",
|
58 |
-
"compatible" : ["theme", "plugin"],
|
59 |
-
"wordpress_org" : true,
|
60 |
-
"required" : false,
|
61 |
-
"dependencies" : []
|
62 |
-
},
|
63 |
-
"cherry-handler" : {
|
64 |
-
"name" : "Cherry handler",
|
65 |
-
"description" : "Initialize handlers.",
|
66 |
-
"version" : "1.1.3",
|
67 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/02.%20cherry-handler.md",
|
68 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
|
69 |
-
"compatible" : ["theme", "plugin"],
|
70 |
-
"wordpress_org" : true,
|
71 |
-
"required" : false,
|
72 |
-
"dependencies" : [ "cherry-js-core" ]
|
73 |
-
},
|
74 |
-
"cherry-interface-builder" : {
|
75 |
-
"name" : "Interface Builder",
|
76 |
-
"description" : "The module for the creation of interfaces in the WordPress admin panel.",
|
77 |
-
"version" : "1.1.2",
|
78 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/07.%20cherry-interface-builder.md",
|
79 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-interface-builder",
|
80 |
-
"compatible" : ["theme", "plugin"],
|
81 |
-
"wordpress_org" : true,
|
82 |
-
"required" : false,
|
83 |
-
"dependencies" : [ "cherry-ui-elements" ]
|
84 |
-
},
|
85 |
-
"cherry-js-core" : {
|
86 |
-
"name" : "JS Core",
|
87 |
-
"description" : "Initialize global JS object which provides additional plugin functionality.",
|
88 |
-
"version" : "1.1.2",
|
89 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/04.%20cherry-js-core.md",
|
90 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-js-core",
|
91 |
-
"compatible" : ["theme", "plugin"],
|
92 |
-
"wordpress_org" : true,
|
93 |
-
"required" : false,
|
94 |
-
"dependencies" : []
|
95 |
-
},
|
96 |
-
"cherry-post-formats-api" : {
|
97 |
-
"name" : "Post Formats API",
|
98 |
-
"description" : "API for post formats specific content.",
|
99 |
-
"version" : "1.1.2",
|
100 |
-
"doc_link" : "",
|
101 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-formats-api",
|
102 |
-
"compatible" : ["theme", "plugin"],
|
103 |
-
"wordpress_org" : true,
|
104 |
-
"required" : false,
|
105 |
-
"dependencies" : [ "cherry-js-core" ]
|
106 |
-
},
|
107 |
-
"cherry-post-meta" : {
|
108 |
-
"name" : "Post Meta",
|
109 |
-
"description" : "Manage post meta.",
|
110 |
-
"version" : "1.2.1",
|
111 |
-
"doc_link" : "",
|
112 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-post-meta",
|
113 |
-
"compatible" : ["theme", "plugin"],
|
114 |
-
"wordpress_org" : true,
|
115 |
-
"required" : false,
|
116 |
-
"dependencies" : [ "cherry-interface-builder" ]
|
117 |
-
},
|
118 |
-
"cherry-term-meta" : {
|
119 |
-
"name" : "Term Meta",
|
120 |
-
"description" : "Manage term metadata.",
|
121 |
-
"version" : "1.1.4",
|
122 |
-
"doc_link" : "",
|
123 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-term-meta",
|
124 |
-
"compatible" : ["theme", "plugin"],
|
125 |
-
"wordpress_org" : true,
|
126 |
-
"required" : false,
|
127 |
-
"dependencies" : [ "cherry-ui-elements" ]
|
128 |
-
},
|
129 |
-
"cherry-toolkit": {
|
130 |
-
"name": "Framework Toolkit",
|
131 |
-
"description": "Framework Toolkit contains various PHP utilities",
|
132 |
-
"version" : "1.2.0",
|
133 |
-
"doc_link": "https://github.com/CherryFramework/cherry-framework-docs/blob/master/100.%20cherry-toolkit.md",
|
134 |
-
"git_link": "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-toolkit",
|
135 |
-
"compatible": ["theme", "plugin"],
|
136 |
-
"wordpress_org": true,
|
137 |
-
"required": true,
|
138 |
-
"dependencies": []
|
139 |
-
},
|
140 |
-
"cherry-ui-elements" : {
|
141 |
-
"name" : "UI Elements",
|
142 |
-
"description" : "UI Elements",
|
143 |
-
"version" : "1.4.3",
|
144 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/09.%20cherry-ui-elements.md",
|
145 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-ui-elements",
|
146 |
-
"compatible" : ["theme", "plugin"],
|
147 |
-
"wordpress_org" : true,
|
148 |
-
"required" : false,
|
149 |
-
"dependencies" : [ "cherry-js-core" ]
|
150 |
-
},
|
151 |
-
"cherry-utility" : {
|
152 |
-
"name" : "Utility",
|
153 |
-
"description" : "Multiple utility functions.",
|
154 |
-
"version" : "1.1.7",
|
155 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/08.%20cherry-utility.md",
|
156 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-utility",
|
157 |
-
"compatible" : ["theme", "plugin"],
|
158 |
-
"wordpress_org" : true,
|
159 |
-
"required" : false,
|
160 |
-
"dependencies" : []
|
161 |
-
},
|
162 |
-
"cherry-widget-factory" : {
|
163 |
-
"name" : "Widget Factory",
|
164 |
-
"description" : "Base widget class that simplifies creating of your own widgets.",
|
165 |
-
"version" : "1.2.1",
|
166 |
-
"doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/06.%20cherry-widget-factory.md",
|
167 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-widget-factory",
|
168 |
-
"compatible" : ["theme", "plugin"],
|
169 |
-
"wordpress_org" : true,
|
170 |
-
"required" : false,
|
171 |
-
"dependencies" : [ "cherry-ui-elements" ]
|
172 |
-
},
|
173 |
-
"cherry5-assets-loader" : {
|
174 |
-
"name" : "Assets Loader",
|
175 |
-
"description" : "The module allows you deferred loading scripts and styles.",
|
176 |
-
"version" : "1.0.0",
|
177 |
-
"doc_link" : "",
|
178 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-assets-loader",
|
179 |
-
"compatible" : [ "theme", "plugin" ],
|
180 |
-
"wordpress_org" : true,
|
181 |
-
"required" : false,
|
182 |
-
"dependencies" : [ "cherry-js-core" ]
|
183 |
-
},
|
184 |
-
"cherry5-insert-shortcode" : {
|
185 |
-
"name" : "Insert Shortcode",
|
186 |
-
"description" : "The module allows you to add shortcodes from editor tinyMCE.",
|
187 |
-
"version" : "1.0.2",
|
188 |
-
"doc_link" : "",
|
189 |
-
"git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry5-insert-shortcode",
|
190 |
-
"compatible" : [ "plugin" ],
|
191 |
-
"wordpress_org" : true,
|
192 |
-
"required" : false,
|
193 |
-
"dependencies" : [ "cherry-ui-elements", "cherry-interface-builder" ]
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cherry-framework/modules/cherry-customizer/cherry-customizer.php
CHANGED
@@ -113,9 +113,10 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
113 |
|
114 |
/*
|
115 |
* $args = array(
|
|
|
116 |
* 'prefix' => 'unique_prefix', // theme or plugin slug (*).
|
117 |
* 'capability' => 'edit_theme_options', // (default: `edit_theme_options`).
|
118 |
-
* 'type' => 'theme_mod', // `theme_mod` - for themes; `option` - for plugins (default: `theme_mod`)
|
119 |
* 'options' => array(
|
120 |
* 'unique_panel_ID' => array(
|
121 |
* 'title' => esc_html__( 'Panel Title', 'text-domain' ),
|
@@ -155,6 +156,7 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
155 |
* Cherry customizer class construct.
|
156 |
*/
|
157 |
public function __construct( $core, $args ) {
|
|
|
158 |
/**
|
159 |
* Cherry Customizer only works in WordPress 4.0 or later.
|
160 |
*/
|
@@ -162,22 +164,10 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
162 |
return;
|
163 |
}
|
164 |
|
165 |
-
$this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] ) ? $args['type'] : 'theme_mod';
|
166 |
-
|
167 |
-
if ( empty( $args['options'] ) || ( ( 'option' === $this->type ) && empty( $args['prefix'] ) ) ) {
|
168 |
-
return;
|
169 |
-
}
|
170 |
-
|
171 |
-
$this->prefix = $this->prepare_prefix( $args['prefix'] );
|
172 |
-
$this->capability = ! empty( $args['capability'] ) ? $args['capability'] : 'edit_theme_options';
|
173 |
-
$this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] ) ? $args['type'] : 'theme_mod';
|
174 |
-
$this->options = $args['options'];
|
175 |
$this->core = $core;
|
176 |
$this->fonts = array();
|
177 |
$this->module_path = $args['module_path'];
|
178 |
|
179 |
-
add_action( 'customize_register', array( $this, 'register' ) );
|
180 |
-
|
181 |
// Prepare fonts data.
|
182 |
add_action( 'after_switch_theme', array( $this, 'init_fonts' ), 10 );
|
183 |
add_action( 'after_switch_theme', array( $this, 'add_options' ), 11 );
|
@@ -186,6 +176,27 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
186 |
add_action( 'switch_theme', array( $this, 'clear_fonts' ) );
|
187 |
add_action( 'upgrader_process_complete', array( $this, 'fire_clear_fonts' ), 10, 2 );
|
188 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
add_filter( 'cherry_customizer_get_core', array( $this, 'pass_core_into_control' ) );
|
190 |
|
191 |
$this->include_custom_controls();
|
@@ -877,6 +888,13 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
877 |
* @since 1.0.0
|
878 |
*/
|
879 |
public function init_fonts() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
880 |
$fonts_data = $this->get_fonts_data();
|
881 |
$fonts_data = (array) $fonts_data;
|
882 |
|
@@ -884,6 +902,8 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
884 |
$data = $this->read_font_file( $file );
|
885 |
add_option( 'cherry_customiser_fonts_' . $type, $data );
|
886 |
}
|
|
|
|
|
887 |
}
|
888 |
|
889 |
/**
|
@@ -986,20 +1006,7 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
986 |
* @return bool
|
987 |
*/
|
988 |
public function file_exists( $file ) {
|
989 |
-
|
990 |
-
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
991 |
-
include_once( ABSPATH . '/wp-admin/includes/file.php' );
|
992 |
-
}
|
993 |
-
|
994 |
-
WP_Filesystem();
|
995 |
-
global $wp_filesystem;
|
996 |
-
|
997 |
-
if ( $wp_filesystem->abspath() ) {
|
998 |
-
return $wp_filesystem->exists( $file );
|
999 |
-
|
1000 |
-
} else {
|
1001 |
-
return file_exists( $file );
|
1002 |
-
}
|
1003 |
}
|
1004 |
|
1005 |
/**
|
@@ -1011,23 +1018,7 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
1011 |
* @return bool
|
1012 |
*/
|
1013 |
public function get_file( $file ) {
|
1014 |
-
|
1015 |
-
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
1016 |
-
include_once( ABSPATH . '/wp-admin/includes/file.php' );
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
WP_Filesystem();
|
1020 |
-
global $wp_filesystem;
|
1021 |
-
|
1022 |
-
$result = '';
|
1023 |
-
|
1024 |
-
if ( $wp_filesystem->abspath() ) {
|
1025 |
-
$result = $wp_filesystem->get_contents( $file );
|
1026 |
-
|
1027 |
-
} else {
|
1028 |
-
$result = Cherry_Toolkit::get_file( $file );
|
1029 |
-
}
|
1030 |
-
|
1031 |
return $result;
|
1032 |
}
|
1033 |
|
@@ -1130,6 +1121,8 @@ if ( ! class_exists( 'Cherry_Customizer' ) ) {
|
|
1130 |
delete_option( 'cherry_customiser_fonts_' . $type );
|
1131 |
}
|
1132 |
|
|
|
|
|
1133 |
$this->fonts = array();
|
1134 |
}
|
1135 |
|
113 |
|
114 |
/*
|
115 |
* $args = array(
|
116 |
+
* 'just_fonts' => false, // set to TRUE if you want use customizer only as fonts manager.
|
117 |
* 'prefix' => 'unique_prefix', // theme or plugin slug (*).
|
118 |
* 'capability' => 'edit_theme_options', // (default: `edit_theme_options`).
|
119 |
+
* 'type' => 'theme_mod', // `theme_mod` - for themes; `option` - for plugins (default: `theme_mod`)
|
120 |
* 'options' => array(
|
121 |
* 'unique_panel_ID' => array(
|
122 |
* 'title' => esc_html__( 'Panel Title', 'text-domain' ),
|
156 |
* Cherry customizer class construct.
|
157 |
*/
|
158 |
public function __construct( $core, $args ) {
|
159 |
+
|
160 |
/**
|
161 |
* Cherry Customizer only works in WordPress 4.0 or later.
|
162 |
*/
|
164 |
return;
|
165 |
}
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
$this->core = $core;
|
168 |
$this->fonts = array();
|
169 |
$this->module_path = $args['module_path'];
|
170 |
|
|
|
|
|
171 |
// Prepare fonts data.
|
172 |
add_action( 'after_switch_theme', array( $this, 'init_fonts' ), 10 );
|
173 |
add_action( 'after_switch_theme', array( $this, 'add_options' ), 11 );
|
176 |
add_action( 'switch_theme', array( $this, 'clear_fonts' ) );
|
177 |
add_action( 'upgrader_process_complete', array( $this, 'fire_clear_fonts' ), 10, 2 );
|
178 |
|
179 |
+
/**
|
180 |
+
* Fonts are loaded, abort if $args['just_fonts'] set to TRUE
|
181 |
+
*/
|
182 |
+
if ( isset( $args['just_fonts'] ) && true === $args['just_fonts'] ) {
|
183 |
+
return;
|
184 |
+
}
|
185 |
+
|
186 |
+
$this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] ) ? $args['type'] : 'theme_mod';
|
187 |
+
|
188 |
+
if ( empty( $args['options'] ) || ( ( 'option' === $this->type ) && empty( $args['prefix'] ) ) ) {
|
189 |
+
return;
|
190 |
+
}
|
191 |
+
|
192 |
+
$this->prefix = $this->prepare_prefix( $args['prefix'] );
|
193 |
+
$this->capability = ! empty( $args['capability'] ) ? $args['capability'] : 'edit_theme_options';
|
194 |
+
$this->type = ! empty( $args['type'] ) && $this->sanitize_type( $args['type'] ) ? $args['type'] : 'theme_mod';
|
195 |
+
$this->options = $args['options'];
|
196 |
+
|
197 |
+
|
198 |
+
add_action( 'customize_register', array( $this, 'register' ) );
|
199 |
+
|
200 |
add_filter( 'cherry_customizer_get_core', array( $this, 'pass_core_into_control' ) );
|
201 |
|
202 |
$this->include_custom_controls();
|
888 |
* @since 1.0.0
|
889 |
*/
|
890 |
public function init_fonts() {
|
891 |
+
|
892 |
+
$inited = get_option( 'cherry_customiser_fonts_inited' );
|
893 |
+
|
894 |
+
if ( $inited ) {
|
895 |
+
return;
|
896 |
+
}
|
897 |
+
|
898 |
$fonts_data = $this->get_fonts_data();
|
899 |
$fonts_data = (array) $fonts_data;
|
900 |
|
902 |
$data = $this->read_font_file( $file );
|
903 |
add_option( 'cherry_customiser_fonts_' . $type, $data );
|
904 |
}
|
905 |
+
|
906 |
+
add_option( 'cherry_customiser_fonts_inited', true );
|
907 |
}
|
908 |
|
909 |
/**
|
1006 |
* @return bool
|
1007 |
*/
|
1008 |
public function file_exists( $file ) {
|
1009 |
+
return file_exists( $file );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1010 |
}
|
1011 |
|
1012 |
/**
|
1018 |
* @return bool
|
1019 |
*/
|
1020 |
public function get_file( $file ) {
|
1021 |
+
$result = Cherry_Toolkit::get_file( $file );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
return $result;
|
1023 |
}
|
1024 |
|
1121 |
delete_option( 'cherry_customiser_fonts_' . $type );
|
1122 |
}
|
1123 |
|
1124 |
+
delete_option( 'cherry_customiser_fonts_inited' );
|
1125 |
+
|
1126 |
$this->fonts = array();
|
1127 |
}
|
1128 |
|
cherry-framework/modules/cherry-dynamic-css/inc/class-cherry-dynamic-css-collector.php
CHANGED
@@ -243,6 +243,7 @@ if ( ! class_exists( 'Cherry_Dynamic_Css_Collector' ) ) {
|
|
243 |
$has_media = false;
|
244 |
$min = '';
|
245 |
$max = '';
|
|
|
246 |
|
247 |
if ( ! empty( $media['min'] ) ) {
|
248 |
$has_media = true;
|
243 |
$has_media = false;
|
244 |
$min = '';
|
245 |
$max = '';
|
246 |
+
$sep = '';
|
247 |
|
248 |
if ( ! empty( $media['min'] ) ) {
|
249 |
$has_media = true;
|
cherry-framework/modules/cherry-google-fonts-loader/cherry-google-fonts-loader.php
CHANGED
@@ -101,7 +101,16 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
|
|
101 |
public function prepare_fonts() {
|
102 |
|
103 |
$font_url = $this->get_fonts_url();
|
104 |
-
wp_enqueue_style( 'cherry-google-fonts', $font_url );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -112,7 +121,7 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
|
|
112 |
*/
|
113 |
public function get_fonts_url() {
|
114 |
|
115 |
-
$font_url = get_transient(
|
116 |
|
117 |
if ( ! $font_url ) {
|
118 |
|
@@ -132,7 +141,7 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
|
|
132 |
|
133 |
global $wp_customize;
|
134 |
if ( ! isset( $wp_customize ) ) {
|
135 |
-
set_transient(
|
136 |
}
|
137 |
}
|
138 |
|
@@ -348,7 +357,7 @@ if ( ! class_exists( 'Cherry_Google_Fonts_Loader' ) ) {
|
|
348 |
* @since 1.0.0
|
349 |
*/
|
350 |
public function reset_fonts_cache() {
|
351 |
-
delete_transient(
|
352 |
}
|
353 |
|
354 |
/**
|
101 |
public function prepare_fonts() {
|
102 |
|
103 |
$font_url = $this->get_fonts_url();
|
104 |
+
wp_enqueue_style( 'cherry-google-fonts-' . $this->args['prefix'], $font_url );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Returns transient key.
|
109 |
+
*
|
110 |
+
* @return [type] [description]
|
111 |
+
*/
|
112 |
+
public function transient_key() {
|
113 |
+
return 'cherry_google_fonts_url_' . $this->args['prefix'];
|
114 |
}
|
115 |
|
116 |
/**
|
121 |
*/
|
122 |
public function get_fonts_url() {
|
123 |
|
124 |
+
$font_url = get_transient( $this->transient_key() );
|
125 |
|
126 |
if ( ! $font_url ) {
|
127 |
|
141 |
|
142 |
global $wp_customize;
|
143 |
if ( ! isset( $wp_customize ) ) {
|
144 |
+
set_transient( $this->transient_key(), $font_url, WEEK_IN_SECONDS );
|
145 |
}
|
146 |
}
|
147 |
|
357 |
* @since 1.0.0
|
358 |
*/
|
359 |
public function reset_fonts_cache() {
|
360 |
+
delete_transient( $this->transient_key() );
|
361 |
}
|
362 |
|
363 |
/**
|
cherry-framework/modules/cherry-interface-builder/inc/assets/cherry-interface-builder.scss
CHANGED
@@ -9,13 +9,13 @@ $color-7: #206ff4; // Scrollbar track background
|
|
9 |
$link-color: #298ffc; // link color.
|
10 |
$link-hover-color: #23282d; // link hover color.
|
11 |
|
12 |
-
$shadow:
|
13 |
$border: 1px solid rgba(0, 0, 0, 0.1) ;
|
14 |
|
15 |
-
$br-radius:
|
16 |
|
17 |
-
$padding:
|
18 |
-
$margin:
|
19 |
$max-heught: 700px;
|
20 |
|
21 |
@import "use-in-js";
|
@@ -190,7 +190,7 @@ html{
|
|
190 |
}
|
191 |
&:focus{
|
192 |
outline: none;
|
193 |
-
box-shadow: inset
|
194 |
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
195 |
}
|
196 |
transition: all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
@@ -364,7 +364,7 @@ html{
|
|
364 |
>.cherry-tab__tabs{
|
365 |
flex-direction: row;
|
366 |
-webkit-box-flex: 0;
|
367 |
-
flex: 0 1
|
368 |
border-radius:$br-radius 0 0 $br-radius;
|
369 |
border-right: none;
|
370 |
.cherry-component__button{
|
@@ -379,7 +379,7 @@ html{
|
|
379 |
}
|
380 |
>.cherry-tab__content{
|
381 |
-webkit-box-flex: 0;
|
382 |
-
flex: 0 1
|
383 |
border-radius: 0 $br-radius $br-radius 0;
|
384 |
}
|
385 |
}
|
@@ -424,7 +424,9 @@ html{
|
|
424 |
}
|
425 |
}
|
426 |
.cherry-control{
|
427 |
-
padding: $padding *
|
|
|
|
|
428 |
&__title{
|
429 |
margin: 0 0 $margin 0 ;
|
430 |
}
|
@@ -434,8 +436,11 @@ html{
|
|
434 |
.cherry-ui-container {
|
435 |
margin: 0;
|
436 |
}
|
|
|
437 |
@media (min-width: 783px) {
|
438 |
-
padding: $padding *
|
|
|
|
|
439 |
display: flex;
|
440 |
flex-flow: row nowrap;
|
441 |
&__info{
|
@@ -448,9 +453,12 @@ html{
|
|
448 |
flex: 0 1 70%;
|
449 |
}
|
450 |
}
|
|
|
451 |
@media ( min-width: 961px ) {
|
452 |
-
padding: $padding *
|
|
|
453 |
}
|
|
|
454 |
.widget & {
|
455 |
padding: $padding * 1.5 0;
|
456 |
flex-direction: column;
|
9 |
$link-color: #298ffc; // link color.
|
10 |
$link-hover-color: #23282d; // link hover color.
|
11 |
|
12 |
+
$shadow: 2px 2px 5px rgba(0,0,0,0.05); //Shadow.
|
13 |
$border: 1px solid rgba(0, 0, 0, 0.1) ;
|
14 |
|
15 |
+
$br-radius: 3px; // Border radius.
|
16 |
|
17 |
+
$padding: 5px;
|
18 |
+
$margin: 5px;
|
19 |
$max-heught: 700px;
|
20 |
|
21 |
@import "use-in-js";
|
190 |
}
|
191 |
&:focus{
|
192 |
outline: none;
|
193 |
+
box-shadow: inset 0 0 1px 0 rgba(41,143,252,0.5);
|
194 |
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
195 |
}
|
196 |
transition: all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
364 |
>.cherry-tab__tabs{
|
365 |
flex-direction: row;
|
366 |
-webkit-box-flex: 0;
|
367 |
+
flex: 0 1 20%;
|
368 |
border-radius:$br-radius 0 0 $br-radius;
|
369 |
border-right: none;
|
370 |
.cherry-component__button{
|
379 |
}
|
380 |
>.cherry-tab__content{
|
381 |
-webkit-box-flex: 0;
|
382 |
+
flex: 0 1 80%;
|
383 |
border-radius: 0 $br-radius $br-radius 0;
|
384 |
}
|
385 |
}
|
424 |
}
|
425 |
}
|
426 |
.cherry-control{
|
427 |
+
padding: $padding * 3 0;
|
428 |
+
margin: 0 $margin;
|
429 |
+
|
430 |
&__title{
|
431 |
margin: 0 0 $margin 0 ;
|
432 |
}
|
436 |
.cherry-ui-container {
|
437 |
margin: 0;
|
438 |
}
|
439 |
+
|
440 |
@media (min-width: 783px) {
|
441 |
+
padding: $padding * 4;
|
442 |
+
margin: 0 $margin * 1.5;
|
443 |
+
|
444 |
display: flex;
|
445 |
flex-flow: row nowrap;
|
446 |
&__info{
|
453 |
flex: 0 1 70%;
|
454 |
}
|
455 |
}
|
456 |
+
|
457 |
@media ( min-width: 961px ) {
|
458 |
+
padding: $padding * 6 0;
|
459 |
+
margin: 0 $margin * 3;
|
460 |
}
|
461 |
+
|
462 |
.widget & {
|
463 |
padding: $padding * 1.5 0;
|
464 |
flex-direction: column;
|
cherry-framework/modules/cherry-interface-builder/inc/assets/min/cherry-interface-builder.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 20px 0 -5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:20px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:10px 0}.cherry-ui-kit__title{margin:20px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:10px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:10px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);padding:15px;margin:15px 15px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:5px;padding:15px}.cherry-section__info{background-color:#fff;border-radius:5px;padding:15px;box-shadow:0px 5px 21px rgba(0,0,0,0.1);margin-bottom:15px}.cherry-section .cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:15px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:30px;margin:20px 20px 0 0}.cherry-section__info{padding:30px;margin-bottom:30px}.cherry-section__holder{padding:30px}.cherry-section .cherry-settings{margin-top:30px}}.cherry-component{padding:20px 0}@media (min-width: 783px){.cherry-component{padding:15px}}@media (min-width: 961px){.cherry-component{padding:30px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0px 0px 10px rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:15px 20px;border:0;background:none;cursor:pointer;position:relative}.widget .cherry-component.cherry-accordion .cherry-component__button,.widget .cherry-component.cherry-toggle .cherry-component__button{background-color:#495159;color:#fff}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.widget .cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.widget .cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{color:#fff}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:10px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1)}.widget .cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.widget .cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:none;border-radius:0;border-left:0;border-right:0}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;-ms-flex-item-align:auto;-ms-grid-row-align:auto;align-self:auto;padding:15px 20px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-radius:5px 5px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 5px 5px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-ms-flex:0 1 25%;flex:0 1 25%;border-radius:5px 0 0 5px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 75%;flex:0 1 75%;border-radius:0 5px 5px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-ms-flex:0 1 80%;flex:0 1 80%}}.widget .cherry-component{padding:0}.widget .cherry-component__content{margin:0 -15px 20px}.widget .cherry-component__content .cherry-control{padding:15px 20px}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:10px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:10px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:30px}}.cherry-control{padding:15px 20px}.cherry-control__title{margin:0 0 10px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:15px}.cherry-control__content{-webkit-box-flex:0;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px}}.widget .cherry-control{padding:15px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.widget .cherry-control__content{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%}.widget .cherry-control__info{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;padding-right:0}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
|
1 |
+
.cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 10px 0 -2.5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:10px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:2.5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:5px 0}.cherry-ui-kit__title{margin:10px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:5px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:5px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);padding:7.5px;margin:7.5px 7.5px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:3px;padding:7.5px}.cherry-section__info{background-color:#fff;border-radius:3px;padding:7.5px;box-shadow:2px 2px 5px rgba(0,0,0,0.05);margin-bottom:7.5px}.cherry-section .cherry-settings{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:7.5px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:15px;margin:10px 10px 0 0}.cherry-section__info{padding:15px;margin-bottom:15px}.cherry-section__holder{padding:15px}.cherry-section .cherry-settings{margin-top:15px}}.cherry-component{padding:10px 0}@media (min-width: 783px){.cherry-component{padding:7.5px}}@media (min-width: 961px){.cherry-component{padding:15px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0 0 1px 0 rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:7.5px 10px;border:0;background:none;cursor:pointer;position:relative}.widget .cherry-component.cherry-accordion .cherry-component__button,.widget .cherry-component.cherry-toggle .cherry-component__button{background-color:#495159;color:#fff}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.widget .cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.widget .cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{color:#fff}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:5px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1)}.widget .cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.widget .cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:none;border-radius:0;border-left:0;border-right:0}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0;-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;-webkit-align-self:auto;-ms-flex-item-align:auto;align-self:auto;padding:7.5px 10px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;border-radius:3px 3px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 3px 3px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-webkit-flex:0 1 20%;-ms-flex:0 1 20%;flex:0 1 20%;border-radius:3px 0 0 3px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 80%;-ms-flex:0 1 80%;flex:0 1 80%;border-radius:0 3px 3px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-webkit-flex:0 1 20%;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 80%;-ms-flex:0 1 80%;flex:0 1 80%}}.widget .cherry-component{padding:0}.widget .cherry-component__content{margin:0 -7.5px 10px}.widget .cherry-component__content .cherry-control{padding:7.5px 10px}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:5px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:5px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:7.5px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}.cherry-control{padding:15px 0;margin:0 5px}.cherry-control__title{margin:0 0 5px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:20px;margin:0 7.5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 30%;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:7.5px}.cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 70%;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px 0;margin:0 15px}}.widget .cherry-control{padding:7.5px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.widget .cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%}.widget .cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;padding-right:0}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:3px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:3px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
|
cherry-framework/modules/cherry-js-core/assets/js/cherry-js-core.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var CherryJsCore = {};
|
2 |
|
3 |
( function( $ ) {
|
4 |
'use strict';
|
@@ -11,7 +11,6 @@ var CherryJsCore = {};
|
|
11 |
variable: {
|
12 |
$document: $( document ),
|
13 |
$window: $( window ),
|
14 |
-
browser: $.browser,
|
15 |
browser_supported: true,
|
16 |
security: window.cherry_ajax,
|
17 |
loaded_assets: {
|
@@ -29,33 +28,11 @@ var CherryJsCore = {};
|
|
29 |
|
30 |
init: function(){
|
31 |
|
32 |
-
CherryJsCore.set_variable();
|
33 |
-
|
34 |
$( document ).on( 'ready', CherryJsCore.ready );
|
35 |
|
36 |
$( window ).on( 'load', CherryJsCore.load );
|
37 |
},
|
38 |
|
39 |
-
set_variable: function() {
|
40 |
-
//Set variable browser_supported
|
41 |
-
CherryJsCore.variable.browser_supported = ( function (){
|
42 |
-
var uset_browser = CherryJsCore.variable.browser,
|
43 |
-
not_supported = { 'msie': [8] };
|
44 |
-
|
45 |
-
for ( var browser in not_supported ) {
|
46 |
-
if( uset_browser.browser !== 'undefined' ){
|
47 |
-
for ( var version in not_supported[ browser ] ) {
|
48 |
-
if( uset_browser.version <= not_supported [ browser ] [ version ] ){
|
49 |
-
return false;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
return true;
|
56 |
-
}() );
|
57 |
-
},
|
58 |
-
|
59 |
ready: function() {
|
60 |
CherryJsCore.status.is_ready = true;
|
61 |
|
1 |
+
var CherryJsCore = {};
|
2 |
|
3 |
( function( $ ) {
|
4 |
'use strict';
|
11 |
variable: {
|
12 |
$document: $( document ),
|
13 |
$window: $( window ),
|
|
|
14 |
browser_supported: true,
|
15 |
security: window.cherry_ajax,
|
16 |
loaded_assets: {
|
28 |
|
29 |
init: function(){
|
30 |
|
|
|
|
|
31 |
$( document ).on( 'ready', CherryJsCore.ready );
|
32 |
|
33 |
$( window ).on( 'load', CherryJsCore.load );
|
34 |
},
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
ready: function() {
|
37 |
CherryJsCore.status.is_ready = true;
|
38 |
|
cherry-framework/modules/cherry-js-core/assets/js/min/cherry-js-core.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var CherryJsCore={};!function(
|
1 |
+
var CherryJsCore={};!function(e){"use strict";(CherryJsCore={name:"Cherry Js Core",version:"1.0.0",author:"Cherry Team",variable:{$document:e(document),$window:e(window),browser_supported:!0,security:window.cherry_ajax,loaded_assets:{script:window.wp_load_script,style:window.wp_load_style},ui_auto_init:"true"===window.ui_init_object.auto_init,ui_auto_target:window.ui_init_object.targets},status:{on_load:!1,is_ready:!1},init:function(){e(document).on("ready",CherryJsCore.ready),e(window).on("load",CherryJsCore.load)},ready:function(){CherryJsCore.status.is_ready=!0,CherryJsCore.expressions.widget_ui_init()},load:function(){CherryJsCore.status.on_load=!0},expressions:{widget_ui_init:function(){e(document).on("widget-added widget-updated",function(r,t){e("body").trigger({type:"cherry-ui-elements-init",_target:t})})}},utilites:{namespace:function(e){var r=e.split("."),t=CherryJsCore,i=r.length,o=0;for(o=0;o<i;o+=1)void 0===t[r[o]]&&(t[r[o]]={}),t=t[r[o]];return t}}}).init()}(jQuery);
|
cherry-framework/modules/cherry-template-manager/cherry-template-manager.php
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Module Name: Template Manager
|
4 |
-
* Description: Module load and parse tmpl files.
|
5 |
-
* Version: 1.0.2
|
6 |
-
* Author: Cherry Team
|
7 |
-
* Author URI: http://www.cherryframework.com/
|
8 |
-
* License: GPLv3
|
9 |
-
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
-
*
|
11 |
-
* @package Template_Manager
|
12 |
-
* @subpackage Modules
|
13 |
-
* @version 1.0.2
|
14 |
-
* @author Cherry Team <cherryframework@gmail.com>
|
15 |
-
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
16 |
-
* @link http://www.cherryframework.com/
|
17 |
-
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
18 |
-
*/
|
19 |
-
|
20 |
-
// If this file is called directly, abort.
|
21 |
-
if ( ! defined( 'WPINC' ) ) {
|
22 |
-
die;
|
23 |
-
}
|
24 |
-
|
25 |
-
if ( ! class_exists( 'Cherry_Template_Manager' ) ) {
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Class Cherry Template Manager.
|
29 |
-
*
|
30 |
-
* @since 1.0.0
|
31 |
-
*/
|
32 |
-
class Cherry_Template_Manager {
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Module arguments.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
* @access private
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
private $args = array();
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Core instance
|
45 |
-
*
|
46 |
-
* @var object
|
47 |
-
*/
|
48 |
-
public $core = null;
|
49 |
-
|
50 |
-
/**
|
51 |
-
* It contains a class Cherry_Template_Parser.
|
52 |
-
*
|
53 |
-
* @since 1.0.0
|
54 |
-
* @access public
|
55 |
-
* @var object
|
56 |
-
*/
|
57 |
-
public $parser = null;
|
58 |
-
|
59 |
-
/**
|
60 |
-
* It contains a class Cherry_Template_Loader.
|
61 |
-
*
|
62 |
-
* @since 1.0.0
|
63 |
-
* @access public
|
64 |
-
* @var object
|
65 |
-
*/
|
66 |
-
public $loader = null;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Cherry_Template_Manager constructor.
|
70 |
-
*
|
71 |
-
* @since 1.0.0
|
72 |
-
* @access public
|
73 |
-
* @return void
|
74 |
-
*/
|
75 |
-
public function __construct( $core = null, $args = array() ) {
|
76 |
-
$this->core = $core;
|
77 |
-
|
78 |
-
$this->include_class();
|
79 |
-
|
80 |
-
$this->args = wp_parse_args(
|
81 |
-
$args,
|
82 |
-
$this->args
|
83 |
-
);
|
84 |
-
|
85 |
-
$this->set_class();
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Include abstract widget class
|
90 |
-
*
|
91 |
-
* @since 1.0.0
|
92 |
-
* @access public
|
93 |
-
* @return void
|
94 |
-
*/
|
95 |
-
public function include_class() {
|
96 |
-
require_once( dirname( __FILE__ ) . '/inc/cherry-template-loader.php' );
|
97 |
-
require_once( dirname( __FILE__ ) . '/inc/cherry-template-parser.php' );
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Function set the child classes.
|
102 |
-
*
|
103 |
-
* @since 1.0.0
|
104 |
-
* @access public
|
105 |
-
* @return void
|
106 |
-
*/
|
107 |
-
public function set_class() {
|
108 |
-
$this->loader = new Cherry_Template_Loader( $this->args, $this );
|
109 |
-
$this->parser = new Cherry_Template_Parser( $this->args, $this );
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cherry-framework/modules/cherry-template-manager/inc/cherry-template-loader.php
DELETED
@@ -1,193 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for load templates.
|
4 |
-
*
|
5 |
-
* @package Template_Manager
|
6 |
-
* @author Cherry Team <cherryframework@gmail.com>
|
7 |
-
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
8 |
-
* @link http://www.cherryframework.com/
|
9 |
-
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
-
*/
|
11 |
-
|
12 |
-
// If this file is called directly, abort.
|
13 |
-
if ( ! defined( 'WPINC' ) ) {
|
14 |
-
die;
|
15 |
-
}
|
16 |
-
|
17 |
-
if ( ! class_exists( 'Cherry_Template_Loader' ) ) {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Class Cherry Template Loader.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
*/
|
24 |
-
class Cherry_Template_Loader {
|
25 |
-
|
26 |
-
/**
|
27 |
-
* A reference to an instance of this Cherry_Template_Manager class.
|
28 |
-
*
|
29 |
-
* @since 1.0.0
|
30 |
-
* @access private
|
31 |
-
* @var object
|
32 |
-
*/
|
33 |
-
private $cherry_template_manager_class = null;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Module arguments.
|
37 |
-
*
|
38 |
-
* @since 1.0.0
|
39 |
-
* @access private
|
40 |
-
* @var array
|
41 |
-
*/
|
42 |
-
private $args = array(
|
43 |
-
'template_dir' => 'templates/%1$s/%2$s.tmpl',
|
44 |
-
'slug' => null,
|
45 |
-
'upload_dir' => null,
|
46 |
-
);
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Cherry_Template_Loader constructor.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
* @access public
|
53 |
-
* @return void
|
54 |
-
*/
|
55 |
-
public function __construct( $args = array(), $main_class = null ) {
|
56 |
-
|
57 |
-
$this->args = wp_parse_args(
|
58 |
-
$args,
|
59 |
-
$this->args
|
60 |
-
);
|
61 |
-
|
62 |
-
$this->cherry_template_manager_class = $main_class;
|
63 |
-
|
64 |
-
$this->set_default_variable();
|
65 |
-
$this->includes_file_system();
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Set the default variables.
|
71 |
-
*
|
72 |
-
* @since 1.0.0
|
73 |
-
* @access private
|
74 |
-
* @return void
|
75 |
-
*/
|
76 |
-
private function set_default_variable() {
|
77 |
-
if ( ! $this->args['slug'] ) {
|
78 |
-
$this->args['slug'] = $this->get_slug();
|
79 |
-
}
|
80 |
-
|
81 |
-
if ( ! $this->args['upload_dir'] ) {
|
82 |
-
$get_upload_dir = wp_upload_dir();
|
83 |
-
$this->args['upload_dir'] = trailingslashit( $get_upload_dir['basedir'] );
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Function Include file with class WP_Filesystem.
|
89 |
-
*
|
90 |
-
* @since 1.0.0
|
91 |
-
* @access private
|
92 |
-
* @return void
|
93 |
-
*/
|
94 |
-
private function includes_file_system() {
|
95 |
-
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
96 |
-
include_once( ABSPATH . '/wp-admin/includes/file.php' );
|
97 |
-
}
|
98 |
-
|
99 |
-
WP_Filesystem();
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Return product slug.
|
104 |
-
*
|
105 |
-
* @since 1.0.0
|
106 |
-
* @access private
|
107 |
-
* @return string
|
108 |
-
*/
|
109 |
-
private function get_slug() {
|
110 |
-
$file_dir = wp_normalize_path( dirname( $this->cherry_template_manager_class->core->settings['extra_base_dir'] ) );
|
111 |
-
$product_dir = $this->get_project_root();
|
112 |
-
|
113 |
-
$slug = str_replace( $product_dir, '', $file_dir );
|
114 |
-
preg_match( '/^[a-zA-Z-]*/' , $slug, $slug );
|
115 |
-
|
116 |
-
return $slug[0];
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Function return the project root dir, themes or plugins.
|
121 |
-
*
|
122 |
-
* @since 1.0.0
|
123 |
-
* @access private
|
124 |
-
* @return string
|
125 |
-
*/
|
126 |
-
private function get_project_root() {
|
127 |
-
$themes_dir = wp_normalize_path( get_theme_root() );
|
128 |
-
$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
|
129 |
-
$file_dir = wp_normalize_path( dirname( $this->cherry_template_manager_class->core->settings['extra_base_dir'] ) );
|
130 |
-
$project_root = ( false === strpos( $file_dir, $themes_dir ) ) ? $plugin_dir : $themes_dir;
|
131 |
-
|
132 |
-
return trailingslashit( $project_root );
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Retrieve a *.tmpl file content.
|
137 |
-
*
|
138 |
-
* @since 1.0.0
|
139 |
-
* @param string $name File name.
|
140 |
-
* @access private
|
141 |
-
* @return string|bool
|
142 |
-
*/
|
143 |
-
public function get_template_by_name( $name ) {
|
144 |
-
$file = '';
|
145 |
-
$template_dir = sprintf( $this->args['template_dir'], $this->args['slug'], $name );
|
146 |
-
$in_uploads = $this->args['upload_dir'] . $template_dir ;
|
147 |
-
$in_project = trailingslashit( $this->get_project_root() . $this->args['slug'] ) . $template_dir;
|
148 |
-
|
149 |
-
if ( file_exists( $in_uploads ) ) {
|
150 |
-
$file = $in_uploads;
|
151 |
-
} elseif ( $theme_template = locate_template( $template_dir ) ) {
|
152 |
-
$file = $theme_template;
|
153 |
-
} else {
|
154 |
-
$file = $in_project;
|
155 |
-
}
|
156 |
-
|
157 |
-
if ( ! empty( $file ) ) {
|
158 |
-
return $this->get_contents( $file );
|
159 |
-
} else {
|
160 |
-
return false;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Read template (static).
|
166 |
-
*
|
167 |
-
* @since 1.0.0
|
168 |
-
* @since 1.0.1 - Use Cherry_Toolkit::get_file instead of WP Filesystem.
|
169 |
-
* @param string $file Correct file path.
|
170 |
-
* @access public
|
171 |
-
* @return string|bool
|
172 |
-
*/
|
173 |
-
public function get_contents( $file ) {
|
174 |
-
return Cherry_Toolkit::get_file( $file );
|
175 |
-
}
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Returns argument.
|
179 |
-
*
|
180 |
-
* @since 1.0.0
|
181 |
-
* @param string $argument_name Argument name.
|
182 |
-
* @access public
|
183 |
-
* @return object
|
184 |
-
*/
|
185 |
-
public function get_argument( $argument_name ) {
|
186 |
-
if ( isset( $this->args[ $argument_name ] ) ) {
|
187 |
-
return $this->args[ $argument_name ];
|
188 |
-
} else {
|
189 |
-
return;
|
190 |
-
}
|
191 |
-
}
|
192 |
-
}
|
193 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cherry-framework/modules/cherry-template-manager/inc/cherry-template-parser.php
DELETED
@@ -1,196 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class for parse templates.
|
4 |
-
*
|
5 |
-
* @package Template_Manager
|
6 |
-
* @author Cherry Team <cherryframework@gmail.com>
|
7 |
-
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
8 |
-
* @link http://www.cherryframework.com/
|
9 |
-
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
-
*/
|
11 |
-
|
12 |
-
// If this file is called directly, abort.
|
13 |
-
if ( ! defined( 'WPINC' ) ) {
|
14 |
-
die;
|
15 |
-
}
|
16 |
-
|
17 |
-
if ( ! class_exists( 'Cherry_Template_Parser' ) ) {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Class Cherry Template Parser.
|
21 |
-
*
|
22 |
-
* @since 1.0.0
|
23 |
-
*/
|
24 |
-
class Cherry_Template_Parser {
|
25 |
-
/**
|
26 |
-
* A reference to an instance of this Cherry_Template_Manager class.
|
27 |
-
*
|
28 |
-
* @since 1.0.0
|
29 |
-
* @access private
|
30 |
-
* @var object
|
31 |
-
*/
|
32 |
-
private $cherry_template_manager_class = null;
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Module arguments.
|
36 |
-
*
|
37 |
-
* @since 1.0.0
|
38 |
-
* @access private
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
private $args = array(
|
42 |
-
'macros_callback' => '/%%.+?%%/',
|
43 |
-
'macros_variable' => '/\$\$.+?\$\$/',
|
44 |
-
);
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Keeps the user callbacks class.
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
* @access private
|
51 |
-
* @var object
|
52 |
-
*/
|
53 |
-
private static $callbacks_class = null;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Cherry_Template_Parser constructor.
|
57 |
-
*
|
58 |
-
* @since 1.0.0
|
59 |
-
* @access public
|
60 |
-
* @return void
|
61 |
-
*/
|
62 |
-
public function __construct( $args = array(), $main_class = null ) {
|
63 |
-
$this->args = wp_parse_args(
|
64 |
-
$args,
|
65 |
-
$this->args
|
66 |
-
);
|
67 |
-
|
68 |
-
$this->cherry_template_manager_class = $main_class;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Function parsed template.
|
73 |
-
*
|
74 |
-
* @since 1.0.0
|
75 |
-
* @param string $template_name Template Name.
|
76 |
-
* @param string|stdClass $class An instance or class name.
|
77 |
-
* @param string $macros_callback The regular expression for the callback.
|
78 |
-
* @param string $macros_variable The regular expression for the variable.
|
79 |
-
* @access public
|
80 |
-
* @return string|bool
|
81 |
-
*/
|
82 |
-
public function parsed_template( $template_name = false, $class = false, $macros_callback = false, $macros_variable = false ) {
|
83 |
-
if ( $template_name && $class ) {
|
84 |
-
|
85 |
-
if ( ! $macros_callback ) {
|
86 |
-
$macros_callback = $this->args['macros_callback'];
|
87 |
-
}
|
88 |
-
|
89 |
-
if ( ! $macros_variable ) {
|
90 |
-
$macros_variable = $this->args['macros_variable'];
|
91 |
-
}
|
92 |
-
|
93 |
-
$search_form_template = $this->cherry_template_manager_class->loader->get_template_by_name( $template_name );
|
94 |
-
|
95 |
-
if ( ! $search_form_template ) {
|
96 |
-
return false;
|
97 |
-
}
|
98 |
-
|
99 |
-
if ( 'string' === gettype( $class ) && class_exists( $class ) ) {
|
100 |
-
$class = new $class();
|
101 |
-
}
|
102 |
-
|
103 |
-
if ( $class !== self::$callbacks_class ) {
|
104 |
-
self::$callbacks_class = $class;
|
105 |
-
}
|
106 |
-
|
107 |
-
$ouput = preg_replace_callback( $macros_callback, array( $this, 'replace_callback' ), $search_form_template );
|
108 |
-
$ouput = preg_replace_callback( $macros_variable, array( $this, 'replace_variable' ), $ouput );
|
109 |
-
|
110 |
-
return $ouput;
|
111 |
-
} else {
|
112 |
-
return false;
|
113 |
-
}
|
114 |
-
|
115 |
-
}
|
116 |
-
|
117 |
-
/**
|
118 |
-
* Callback to replace macros with data.
|
119 |
-
*
|
120 |
-
* @since 1.0.0
|
121 |
-
* @param array $matches Founded macros.
|
122 |
-
* @access private
|
123 |
-
* @return string
|
124 |
-
*/
|
125 |
-
private function replace_callback( $matches, $slug = '' ) {
|
126 |
-
if ( ! is_array( $matches ) || empty( $matches ) ) {
|
127 |
-
return;
|
128 |
-
}
|
129 |
-
|
130 |
-
$slug = $this->cherry_template_manager_class->loader->get_argument( 'slug' );
|
131 |
-
$item = trim( $matches[0], '%%' );
|
132 |
-
$arr = explode( ' ', $item, 2 );
|
133 |
-
$macros = strtolower( $arr[0] );
|
134 |
-
$attr = isset( $arr[1] ) ? shortcode_parse_atts( $arr[1] ) : array();
|
135 |
-
$callback = apply_filters( $slug . '_set_callback_' . $macros, array( self::$callbacks_class, 'get_' . $macros ) );
|
136 |
-
|
137 |
-
if ( ! is_callable( $callback ) ) {
|
138 |
-
return;
|
139 |
-
}
|
140 |
-
|
141 |
-
if ( ! empty( $attr ) ) {
|
142 |
-
// Call a WordPress function.
|
143 |
-
return call_user_func( $callback, $attr );
|
144 |
-
}
|
145 |
-
|
146 |
-
return call_user_func( $callback );
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Callback to replace macros with data.
|
151 |
-
*
|
152 |
-
* @since 1.0.0
|
153 |
-
* @param array $matches Founded macros.
|
154 |
-
* @access private
|
155 |
-
* @return string
|
156 |
-
*/
|
157 |
-
private function replace_variable( $matches, $slug = '' ) {
|
158 |
-
|
159 |
-
if ( ! is_array( $matches ) || empty( $matches ) ) {
|
160 |
-
return;
|
161 |
-
}
|
162 |
-
|
163 |
-
$slug = $this->cherry_template_manager_class->loader->get_argument( 'slug' );
|
164 |
-
$item = trim( $matches[0], '$$' );
|
165 |
-
$arr = explode( ' ', $item, 2 );
|
166 |
-
$macros = strtolower( $arr[0] );
|
167 |
-
$variable = apply_filters( $slug . '_set_variable_' . $macros, null );
|
168 |
-
|
169 |
-
if ( null === $variable ) {
|
170 |
-
if ( isset( self::$callbacks_class->variable ) && array_key_exists( $macros, self::$callbacks_class->variable ) ) {
|
171 |
-
$variable = self::$callbacks_class->variable[ $macros ];
|
172 |
-
} else {
|
173 |
-
return;
|
174 |
-
}
|
175 |
-
}
|
176 |
-
|
177 |
-
return $variable;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Returns argument.
|
182 |
-
*
|
183 |
-
* @since 1.0.0
|
184 |
-
* @param string $argument_name Argument name.
|
185 |
-
* @access public
|
186 |
-
* @return object
|
187 |
-
*/
|
188 |
-
public function get_argument( $argument_name ) {
|
189 |
-
if ( isset( $this->args[ $argument_name ] ) ) {
|
190 |
-
return $this->args[ $argument_name ];
|
191 |
-
} else {
|
192 |
-
return;
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cherry-framework/modules/cherry-ui-elements/cherry-ui-elements.php
CHANGED
@@ -51,6 +51,7 @@ if ( ! class_exists( 'Cherry_UI_Elements' ) ) {
|
|
51 |
'repeater',
|
52 |
'iconpicker',
|
53 |
'button',
|
|
|
54 |
),
|
55 |
);
|
56 |
|
51 |
'repeater',
|
52 |
'iconpicker',
|
53 |
'button',
|
54 |
+
'dimensions',
|
55 |
),
|
56 |
);
|
57 |
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/min/ui-button.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry5-ui-button{position:relative;display:inline-block;font-size:
|
1 |
+
.cherry5-ui-button{position:relative;display:inline-block;font-size:11px;line-height:18px;text-decoration:none;padding:4px 22px;color:#23282d;text-transform:uppercase;border-radius:4px;border-width:1px;border-style:solid;outline:none;cursor:pointer;transition:all 200ms linear}.cherry5-ui-button:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:4px;background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.cherry5-ui-button:hover:before{background-image:linear-gradient(0deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%)}.cherry5-ui-button:active:before{opacity:0}.cherry5-ui-button.cherry5-ui-button-normal-style{color:#23282d;border-color:#d7d7d7 #b7b7b7 #b7b7b7 #d7d7d7;background-color:#f0f0f0}.cherry5-ui-button.cherry5-ui-button-normal-style:active{background-color:#e1e1e1;border-color:#9e9e9e #d7d7d7 #d7d7d7 #9e9e9e}.cherry5-ui-button.cherry5-ui-button-success-style{color:#fff;border-color:#49c56a #3a9e54 #3a9e54 #49c56a;background-color:#49c66a}.cherry5-ui-button.cherry5-ui-button-success-style:active{background-color:#3ba956;border-color:#2c7940 #49c56a #49c56a #2c7940}.cherry5-ui-button.cherry5-ui-button-primary-style{color:#fff;border-color:#5b9add #3e6a99 #3e6a99 #5b9add;background-color:#2a90fc}.cherry5-ui-button.cherry5-ui-button-primary-style:active{background-color:#206ff4;border-color:#2f5175 #5b9add #5b9add #2f5175}.cherry5-ui-button.cherry5-ui-button-secondary-style{color:#fff;border-color:#777879 #41464d #41464d #777879;background-color:#495159}.cherry5-ui-button.cherry5-ui-button-secondary-style:active{background-color:#495159;border-color:#2a2d31 #777879 #777879 #2a2d31}.cherry5-ui-button.cherry5-ui-button-danger-style{color:#fff;border-color:#e54444 #b83636 #b83636 #e54444;background-color:#e64545}.cherry5-ui-button.cherry5-ui-button-danger-style:active{background-color:#c73434;border-color:#912a2a #e54444 #e54444 #912a2a}.cherry5-ui-button.cherry5-ui-button-warning-style{color:#fff;border-color:#faa832 #c98627 #c98627 #faa832;background-color:#faa832}.cherry5-ui-button.cherry5-ui-button-warning-style:active{background-color:#ee8425;border-color:#9e6a1f #faa832 #faa832 #9e6a1f}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-button/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
@mixin button_base() {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
-
font-size:
|
5 |
line-height: 18px;
|
6 |
-
font-weight: 900;
|
7 |
-
letter-spacing: 0.5px;
|
8 |
text-decoration: none;
|
9 |
-
padding:
|
10 |
color: $dark_color;
|
11 |
text-transform: uppercase;
|
12 |
border-radius: $border_radius_small;
|
1 |
@mixin button_base() {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
+
font-size: 11px;
|
5 |
line-height: 18px;
|
|
|
|
|
6 |
text-decoration: none;
|
7 |
+
padding: 4px 22px;
|
8 |
color: $dark_color;
|
9 |
text-transform: uppercase;
|
10 |
border-radius: $border_radius_small;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/min/ui-checkbox.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-checkbox-item{width:
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-checkbox-item{width:20px;height:20px;display:inline-block;border-radius:2px;margin-right:10px;margin-bottom:10px;cursor:pointer;position:relative;background-color:#f1f1f1;user-select:none;transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-checkbox-item .marker{position:absolute;width:20px;height:20px;top:0px;left:0px;color:#fff;font-size:20px;transition:inherit;transform:scale(0)}.cherry-checkbox-item .marker:before{transition:inherit;position:relative;left:-1px}.cherry-lable-content{display:flex}.cherry-checkbox-input[checked]+.cherry-checkbox-item{background-color:#48c569}.cherry-checkbox-input[checked]+.cherry-checkbox-item .marker{transform:scale(1)}.cherry-checkbox-label{font-size:12px;line-height:20px;color:#23282d;user-select:none}.cherry-checkbox-label:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-checkbox/assets/ui-checkbox.scss
CHANGED
@@ -13,34 +13,40 @@ label.cherry-label{
|
|
13 |
display: none !important;
|
14 |
}
|
15 |
.cherry-checkbox-item{
|
16 |
-
width:
|
17 |
-
height:
|
18 |
display: inline-block;
|
19 |
border-radius: $border_radius_extra_small;
|
20 |
margin-right: 10px;
|
21 |
-
margin-bottom:
|
22 |
cursor: pointer;
|
23 |
position: relative;
|
24 |
background-color: $grey_color_3;
|
25 |
user-select: none;
|
26 |
transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
35 |
transition:inherit;
|
36 |
-
|
37 |
-
|
38 |
-
transition:inherit;
|
39 |
-
position: relative;
|
40 |
-
left: -2px;
|
41 |
-
}
|
42 |
}
|
|
|
43 |
}
|
|
|
|
|
|
|
|
|
44 |
.cherry-checkbox-input{
|
45 |
&[checked]{
|
46 |
&+.cherry-checkbox-item{
|
@@ -52,10 +58,8 @@ label.cherry-label{
|
|
52 |
}
|
53 |
}
|
54 |
.cherry-checkbox-label{
|
55 |
-
|
56 |
-
|
57 |
-
font-size: 14px;
|
58 |
-
line-height: 26px;
|
59 |
color: $dark_color_1;
|
60 |
user-select: none;
|
61 |
&:focus{
|
13 |
display: none !important;
|
14 |
}
|
15 |
.cherry-checkbox-item{
|
16 |
+
width: 20px;
|
17 |
+
height: 20px;
|
18 |
display: inline-block;
|
19 |
border-radius: $border_radius_extra_small;
|
20 |
margin-right: 10px;
|
21 |
+
margin-bottom: 10px;
|
22 |
cursor: pointer;
|
23 |
position: relative;
|
24 |
background-color: $grey_color_3;
|
25 |
user-select: none;
|
26 |
transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
27 |
+
|
28 |
+
.marker{
|
29 |
+
position: absolute;
|
30 |
+
width: 20px;
|
31 |
+
height: 20px;
|
32 |
+
top: 0px;
|
33 |
+
left: 0px;
|
34 |
+
color: #fff;
|
35 |
+
font-size: 20px;
|
36 |
+
transition:inherit;
|
37 |
+
transform: scale(0);
|
38 |
+
|
39 |
+
&:before{
|
40 |
transition:inherit;
|
41 |
+
position: relative;
|
42 |
+
left: -1px;
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
+
}
|
45 |
}
|
46 |
+
.cherry-lable-content {
|
47 |
+
display: flex;
|
48 |
+
}
|
49 |
+
|
50 |
.cherry-checkbox-input{
|
51 |
&[checked]{
|
52 |
&+.cherry-checkbox-item{
|
58 |
}
|
59 |
}
|
60 |
.cherry-checkbox-label{
|
61 |
+
font-size: 12px;
|
62 |
+
line-height: 20px;
|
|
|
|
|
63 |
color: $dark_color_1;
|
64 |
user-select: none;
|
65 |
&:focus{
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both
|
1 |
+
.cherry-lock-element{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:no-drop;position:relative;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{-webkit-animation-name:lock_show;animation-name:lock_show;-webkit-animation-duration:450ms;animation-duration:450ms;-webkit-animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1);animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;-webkit-animation-name:lock_hide;animation-name:lock_hide;-webkit-animation-duration:200ms;animation-duration:200ms;-webkit-animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-transform-origin:0% 0%;-ms-transform-origin:0% 0%;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@-webkit-keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@-webkit-keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}@keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-colorpicker-wrapper .wp-picker-container{padding:3px;border-radius:3px}.cherry-ui-colorpicker-wrapper .wp-picker-container .wp-color-result-text{line-height:18px;text-align:right}.cherry-ui-colorpicker-wrapper .wp-picker-container .wp-color-result{width:105px;height:26px;padding:0;border:none;margin:0;box-shadow:inset 0 0 0 3px white;border:1px solid #d5dadf}.cherry-ui-colorpicker-wrapper .wp-picker-container .wp-color-result:focus{border:1px solid #9ba7b3;outline:none}.cherry-ui-colorpicker-wrapper .wp-picker-container .wp-color-result:after{display:none}.cherry-ui-colorpicker-wrapper .wp-picker-container .wp-picker-input-wrap{margin:1px 0}.cherry-ui-colorpicker-wrapper .wp-picker-container.wp-picker-active .wp-color-result{margin-right:6px}.cherry-ui-colorpicker-wrapper .wp-picker-container .iris-picker{position:absolute;z-index:999}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/min/wp-color-picker-alpha.min.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**!
|
2 |
+
* wp-color-picker-alpha
|
3 |
+
*
|
4 |
+
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
|
5 |
+
* Only run in input and is defined data alpha in true
|
6 |
+
*
|
7 |
+
* Version: 2.1.2
|
8 |
+
* https://github.com/kallookoo/wp-color-picker-alpha
|
9 |
+
* Licensed under the GPLv2 license.
|
10 |
+
*/
|
11 |
+
!function(t){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',i='<input type="button" class="button button-small" />',a=void 0!==wpColorPickerL10n.current;if(a)n='<a tabindex="0" class="wp-color-result" />';else var n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>',l="<label></label>",s='<span class="screen-reader-text"></span>';Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),a?(c.hide().wrap(e),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(i).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(e),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(i)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),a||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),a||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),a?c.wrap('<span class="wp-picker-input-wrap" />').after(p.button):(p.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,e){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),a?p.toggler.html('<span class="color-alpha" />'):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('<span class="color-alpha" />')),p.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:e.color.toString()})):p.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,e)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(a&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(a&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r)):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,e=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),i={aContainer:e,aSlider:e.find(".iris-slider-offset-alpha")};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(i,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var a=o.picker.width()-o.controls.square.width()-20,n=a/6,l=a/2-n;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var e=t.controls,i=parseInt(100*t._color._alpha),a=t._color.toRgb(),n=["rgb("+a.r+","+a.g+","+a.b+") 0%","rgba("+a.r+","+a.g+","+a.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(e.aSlider.slider("value",i),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()})},_addInputListeners:function(t){var o=this,r=function(r){var e=new Color(t.val()),i=t.val();t.removeClass("iris-error"),e.error?""!==i&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===r.type&&i.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}(jQuery),
|
12 |
+
// Auto call with colo-picker class
|
13 |
+
jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/ui-colorpicker.scss
CHANGED
@@ -3,96 +3,66 @@
|
|
3 |
@import "../../../../assets/sass/lock";
|
4 |
|
5 |
$font_size: 14px;
|
6 |
-
|
|
|
7 |
opacity: 0.5;
|
8 |
cursor: no-drop;
|
9 |
pointer-events: none;
|
10 |
filter: grayscale( 100% );
|
11 |
}
|
12 |
-
|
|
|
13 |
margin: 10px 0 20px 0;
|
14 |
}
|
15 |
-
|
|
|
16 |
margin: 0 0 5px 0;
|
17 |
display: block;
|
18 |
}
|
19 |
-
.cherry-ui-colorpicker-wrapper{
|
20 |
-
background-color: $grey_color_3;
|
21 |
-
padding: 5px;
|
22 |
-
max-width: 230px;
|
23 |
-
height: 46px;
|
24 |
-
box-sizing: border-box;
|
25 |
-
}
|
26 |
-
.cherry-ui-colorpicker-wrapper, .customize-control-content{
|
27 |
-
& .wp-picker-container{
|
28 |
-
display: block;
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
39 |
border: none;
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
border-left: none;
|
47 |
-
};
|
48 |
-
&:focus, &:active{
|
49 |
outline: none;
|
50 |
-
border: 1px solid rgba(41, 143, 252, .6);
|
51 |
-
box-shadow: 0px 0px 2px rgba(41,143,252,0.6);
|
52 |
}
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
display: flex;
|
57 |
-
width: calc(100% - 40px);
|
58 |
-
max-width: calc(100% - 40px);
|
59 |
-
float: right;
|
60 |
-
&:after{
|
61 |
-
content: '.';
|
62 |
-
clear: both;
|
63 |
-
visibility: hidden;
|
64 |
-
height: 0;
|
65 |
-
};
|
66 |
-
input[type="text"]{
|
67 |
-
padding: 8px 10px 9px;
|
68 |
-
font-size: $font_size;
|
69 |
-
max-width: 100%;
|
70 |
-
flex-grow: 1;
|
71 |
-
}
|
72 |
-
input[type="button"]{
|
73 |
-
height: auto;
|
74 |
-
border: none;
|
75 |
-
border-radius: $border_radius_extra_small;
|
76 |
-
box-shadow: none;
|
77 |
-
padding: 6px 10px 7px;
|
78 |
-
font-size: $font_size;
|
79 |
-
margin-left: 5px;
|
80 |
-
flex-shrink: 0;
|
81 |
}
|
82 |
}
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
}
|
92 |
-
}
|
93 |
-
> .wp-picker-input-wrap{
|
94 |
-
display: inline-flex;
|
95 |
}
|
96 |
}
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
}
|
3 |
@import "../../../../assets/sass/lock";
|
4 |
|
5 |
$font_size: 14px;
|
6 |
+
|
7 |
+
.cherry-ui-elements-lock {
|
8 |
opacity: 0.5;
|
9 |
cursor: no-drop;
|
10 |
pointer-events: none;
|
11 |
filter: grayscale( 100% );
|
12 |
}
|
13 |
+
|
14 |
+
.cherry-ui-container {
|
15 |
margin: 10px 0 20px 0;
|
16 |
}
|
17 |
+
|
18 |
+
label.cherry-label {
|
19 |
margin: 0 0 5px 0;
|
20 |
display: block;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
.cherry-ui-colorpicker-wrapper {
|
24 |
+
|
25 |
+
.wp-picker-container {
|
26 |
+
padding: 3px;
|
27 |
+
border-radius: 3px;
|
28 |
+
|
29 |
+
.wp-color-result-text {
|
30 |
+
line-height: 18px;
|
31 |
+
text-align: right;
|
32 |
}
|
33 |
+
|
34 |
+
.wp-color-result {
|
35 |
+
width: 105px;
|
36 |
+
height: 26px;
|
37 |
+
padding: 0;
|
38 |
border: none;
|
39 |
+
margin: 0;
|
40 |
+
box-shadow: inset 0 0 0 3px white;
|
41 |
+
border: 1px solid #d5dadf;
|
42 |
+
|
43 |
+
&:focus {
|
44 |
+
border: 1px solid #9ba7b3;
|
|
|
|
|
|
|
45 |
outline: none;
|
|
|
|
|
46 |
}
|
47 |
+
|
48 |
+
&:after {
|
49 |
+
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
}
|
52 |
+
|
53 |
+
.wp-picker-input-wrap {
|
54 |
+
margin: 1px 0;
|
55 |
+
}
|
56 |
+
|
57 |
+
&.wp-picker-active {
|
58 |
+
.wp-color-result {
|
59 |
+
margin-right: 6px;
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
}
|
62 |
+
|
63 |
+
.iris-picker {
|
64 |
+
position: absolute;
|
65 |
+
z-index: 999;
|
66 |
+
}
|
67 |
}
|
68 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/assets/wp-color-picker-alpha.js
ADDED
@@ -0,0 +1,490 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**!
|
2 |
+
* wp-color-picker-alpha
|
3 |
+
*
|
4 |
+
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
|
5 |
+
* Only run in input and is defined data alpha in true
|
6 |
+
*
|
7 |
+
* Version: 2.1.2
|
8 |
+
* https://github.com/kallookoo/wp-color-picker-alpha
|
9 |
+
* Licensed under the GPLv2 license.
|
10 |
+
*/
|
11 |
+
( function( $ ) {
|
12 |
+
// Variable for some backgrounds ( grid )
|
13 |
+
var image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==',
|
14 |
+
// html stuff for wpColorPicker copy of the original color-picker.js
|
15 |
+
_after = '<div class="wp-picker-holder" />',
|
16 |
+
_wrap = '<div class="wp-picker-container" />',
|
17 |
+
_button = '<input type="button" class="button button-small" />',
|
18 |
+
// Prevent CSS issues in < WordPress 4.9
|
19 |
+
_deprecated = ( wpColorPickerL10n.current !== undefined );
|
20 |
+
// Declare some global variables when is deprecated or not
|
21 |
+
if ( _deprecated ) {
|
22 |
+
var _before = '<a tabindex="0" class="wp-color-result" />';
|
23 |
+
} else {
|
24 |
+
var _before = '<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>',
|
25 |
+
_wrappingLabel = '<label></label>',
|
26 |
+
_wrappingLabelText = '<span class="screen-reader-text"></span>';
|
27 |
+
}
|
28 |
+
/**
|
29 |
+
* Overwrite Color
|
30 |
+
* for enable support rbga
|
31 |
+
*/
|
32 |
+
Color.fn.toString = function() {
|
33 |
+
if ( this._alpha < 1 )
|
34 |
+
return this.toCSS( 'rgba', this._alpha ).replace( /\s+/g, '' );
|
35 |
+
|
36 |
+
var hex = parseInt( this._color, 10 ).toString( 16 );
|
37 |
+
|
38 |
+
if ( this.error )
|
39 |
+
return '';
|
40 |
+
|
41 |
+
if ( hex.length < 6 )
|
42 |
+
hex = ( '00000' + hex ).substr( -6 );
|
43 |
+
|
44 |
+
return '#' + hex;
|
45 |
+
};
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Overwrite wpColorPicker
|
49 |
+
*/
|
50 |
+
$.widget( 'wp.wpColorPicker', $.wp.wpColorPicker, {
|
51 |
+
/**
|
52 |
+
* @summary Creates the color picker.
|
53 |
+
*
|
54 |
+
* Creates the color picker, sets default values, css classes and wraps it all in HTML.
|
55 |
+
*
|
56 |
+
* @since 3.5.0
|
57 |
+
*
|
58 |
+
* @access private
|
59 |
+
*
|
60 |
+
* @returns {void}
|
61 |
+
*/
|
62 |
+
_create: function() {
|
63 |
+
// Return early if Iris support is missing.
|
64 |
+
if ( ! $.support.iris ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
var self = this,
|
69 |
+
el = self.element;
|
70 |
+
|
71 |
+
// Override default options with options bound to the element.
|
72 |
+
$.extend( self.options, el.data() );
|
73 |
+
|
74 |
+
// Create a color picker which only allows adjustments to the hue.
|
75 |
+
if ( self.options.type === 'hue' ) {
|
76 |
+
return self._createHueOnly();
|
77 |
+
}
|
78 |
+
|
79 |
+
// Bind the close event.
|
80 |
+
self.close = $.proxy( self.close, self );
|
81 |
+
|
82 |
+
self.initialValue = el.val();
|
83 |
+
|
84 |
+
// Add a CSS class to the input field.
|
85 |
+
el.addClass( 'wp-color-picker' );
|
86 |
+
|
87 |
+
if ( _deprecated ) {
|
88 |
+
el.hide().wrap( _wrap );
|
89 |
+
self.wrap = el.parent();
|
90 |
+
self.toggler = $( _before )
|
91 |
+
.insertBefore( el )
|
92 |
+
.css( { backgroundColor : self.initialValue } )
|
93 |
+
.attr( 'title', wpColorPickerL10n.pick )
|
94 |
+
.attr( 'data-current', wpColorPickerL10n.current );
|
95 |
+
self.pickerContainer = $( _after ).insertAfter( el );
|
96 |
+
self.button = $( _button ).addClass('hidden');
|
97 |
+
} else {
|
98 |
+
/*
|
99 |
+
* Check if there's already a wrapping label, e.g. in the Customizer.
|
100 |
+
* If there's no label, add a default one to match the Customizer template.
|
101 |
+
*/
|
102 |
+
if ( ! el.parent( 'label' ).length ) {
|
103 |
+
// Wrap the input field in the default label.
|
104 |
+
el.wrap( _wrappingLabel );
|
105 |
+
// Insert the default label text.
|
106 |
+
self.wrappingLabelText = $( _wrappingLabelText )
|
107 |
+
.insertBefore( el )
|
108 |
+
.text( wpColorPickerL10n.defaultLabel );
|
109 |
+
}
|
110 |
+
|
111 |
+
/*
|
112 |
+
* At this point, either it's the standalone version or the Customizer
|
113 |
+
* one, we have a wrapping label to use as hook in the DOM, let's store it.
|
114 |
+
*/
|
115 |
+
self.wrappingLabel = el.parent();
|
116 |
+
|
117 |
+
// Wrap the label in the main wrapper.
|
118 |
+
self.wrappingLabel.wrap( _wrap );
|
119 |
+
// Store a reference to the main wrapper.
|
120 |
+
self.wrap = self.wrappingLabel.parent();
|
121 |
+
// Set up the toggle button and insert it before the wrapping label.
|
122 |
+
self.toggler = $( _before )
|
123 |
+
.insertBefore( self.wrappingLabel )
|
124 |
+
.css( { backgroundColor: self.initialValue } );
|
125 |
+
// Set the toggle button span element text.
|
126 |
+
self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick );
|
127 |
+
// Set up the Iris container and insert it after the wrapping label.
|
128 |
+
self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel );
|
129 |
+
// Store a reference to the Clear/Default button.
|
130 |
+
self.button = $( _button );
|
131 |
+
}
|
132 |
+
|
133 |
+
// Set up the Clear/Default button.
|
134 |
+
if ( self.options.defaultColor ) {
|
135 |
+
self.button.addClass( 'wp-picker-default' ).val( wpColorPickerL10n.defaultString );
|
136 |
+
if ( ! _deprecated ) {
|
137 |
+
self.button.attr( 'aria-label', wpColorPickerL10n.defaultAriaLabel );
|
138 |
+
}
|
139 |
+
} else {
|
140 |
+
self.button.addClass( 'wp-picker-clear' ).val( wpColorPickerL10n.clear );
|
141 |
+
if ( ! _deprecated ) {
|
142 |
+
self.button.attr( 'aria-label', wpColorPickerL10n.clearAriaLabel );
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
if ( _deprecated ) {
|
147 |
+
el.wrap( '<span class="wp-picker-input-wrap" />' ).after( self.button );
|
148 |
+
} else {
|
149 |
+
// Wrap the wrapping label in its wrapper and append the Clear/Default button.
|
150 |
+
self.wrappingLabel
|
151 |
+
.wrap( '<span class="wp-picker-input-wrap hidden" />' )
|
152 |
+
.after( self.button );
|
153 |
+
|
154 |
+
/*
|
155 |
+
* The input wrapper now contains the label+input+Clear/Default button.
|
156 |
+
* Store a reference to the input wrapper: we'll use this to toggle
|
157 |
+
* the controls visibility.
|
158 |
+
*/
|
159 |
+
self.inputWrapper = el.closest( '.wp-picker-input-wrap' );
|
160 |
+
}
|
161 |
+
|
162 |
+
el.iris( {
|
163 |
+
target: self.pickerContainer,
|
164 |
+
hide: self.options.hide,
|
165 |
+
width: self.options.width,
|
166 |
+
mode: self.options.mode,
|
167 |
+
palettes: self.options.palettes,
|
168 |
+
/**
|
169 |
+
* @summary Handles the onChange event if one has been defined in the options.
|
170 |
+
*
|
171 |
+
* Handles the onChange event if one has been defined in the options and additionally
|
172 |
+
* sets the background color for the toggler element.
|
173 |
+
*
|
174 |
+
* @since 3.5.0
|
175 |
+
*
|
176 |
+
* @param {Event} event The event that's being called.
|
177 |
+
* @param {HTMLElement} ui The HTMLElement containing the color picker.
|
178 |
+
*
|
179 |
+
* @returns {void}
|
180 |
+
*/
|
181 |
+
change: function( event, ui ) {
|
182 |
+
if ( self.options.alpha ) {
|
183 |
+
self.toggler.css( { 'background-image' : 'url(' + image + ')' } );
|
184 |
+
if ( _deprecated ) {
|
185 |
+
self.toggler.html( '<span class="color-alpha" />' );
|
186 |
+
} else {
|
187 |
+
self.toggler.css( {
|
188 |
+
'position' : 'relative'
|
189 |
+
} );
|
190 |
+
if ( self.toggler.find('span.color-alpha').length == 0 ) {
|
191 |
+
self.toggler.append('<span class="color-alpha" />');
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
self.toggler.find( 'span.color-alpha' ).css( {
|
196 |
+
'width' : '30px',
|
197 |
+
'height' : '24px',
|
198 |
+
'position' : 'absolute',
|
199 |
+
'top' : 0,
|
200 |
+
'left' : 0,
|
201 |
+
'border-top-left-radius' : '2px',
|
202 |
+
'border-bottom-left-radius' : '2px',
|
203 |
+
'background' : ui.color.toString()
|
204 |
+
} );
|
205 |
+
} else {
|
206 |
+
self.toggler.css( { backgroundColor : ui.color.toString() } );
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( $.isFunction( self.options.change ) ) {
|
210 |
+
self.options.change.call( this, event, ui );
|
211 |
+
}
|
212 |
+
}
|
213 |
+
} );
|
214 |
+
|
215 |
+
el.val( self.initialValue );
|
216 |
+
self._addListeners();
|
217 |
+
|
218 |
+
// Force the color picker to always be closed on initial load.
|
219 |
+
if ( ! self.options.hide ) {
|
220 |
+
self.toggler.click();
|
221 |
+
}
|
222 |
+
},
|
223 |
+
/**
|
224 |
+
* @summary Binds event listeners to the color picker.
|
225 |
+
*
|
226 |
+
* @since 3.5.0
|
227 |
+
*
|
228 |
+
* @access private
|
229 |
+
*
|
230 |
+
* @returns {void}
|
231 |
+
*/
|
232 |
+
_addListeners: function() {
|
233 |
+
var self = this;
|
234 |
+
|
235 |
+
/**
|
236 |
+
* @summary Prevent any clicks inside this widget from leaking to the top and closing it.
|
237 |
+
*
|
238 |
+
* @since 3.5.0
|
239 |
+
*
|
240 |
+
* @param {Event} event The event that's being called.
|
241 |
+
*
|
242 |
+
* @returs {void}
|
243 |
+
*/
|
244 |
+
self.wrap.on( 'click.wpcolorpicker', function( event ) {
|
245 |
+
event.stopPropagation();
|
246 |
+
});
|
247 |
+
|
248 |
+
/**
|
249 |
+
* @summary Open or close the color picker depending on the class.
|
250 |
+
*
|
251 |
+
* @since 3.5
|
252 |
+
*/
|
253 |
+
self.toggler.click( function(){
|
254 |
+
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
|
255 |
+
self.close();
|
256 |
+
} else {
|
257 |
+
self.open();
|
258 |
+
}
|
259 |
+
});
|
260 |
+
|
261 |
+
/**
|
262 |
+
* @summary Checks if value is empty when changing the color in the color picker.
|
263 |
+
*
|
264 |
+
* Checks if value is empty when changing the color in the color picker.
|
265 |
+
* If so, the background color is cleared.
|
266 |
+
*
|
267 |
+
* @since 3.5.0
|
268 |
+
*
|
269 |
+
* @param {Event} event The event that's being called.
|
270 |
+
*
|
271 |
+
* @returns {void}
|
272 |
+
*/
|
273 |
+
self.element.on( 'change', function( event ) {
|
274 |
+
// Empty or Error = clear
|
275 |
+
if ( $( this ).val() === '' || self.element.hasClass( 'iris-error' ) ) {
|
276 |
+
if ( self.options.alpha ) {
|
277 |
+
if ( _deprecated ) {
|
278 |
+
self.toggler.removeAttr( 'style' );
|
279 |
+
}
|
280 |
+
self.toggler.find( 'span.color-alpha' ).css( 'backgroundColor', '' );
|
281 |
+
} else {
|
282 |
+
self.toggler.css( 'backgroundColor', '' );
|
283 |
+
}
|
284 |
+
|
285 |
+
// fire clear callback if we have one
|
286 |
+
if ( $.isFunction( self.options.clear ) )
|
287 |
+
self.options.clear.call( this, event );
|
288 |
+
}
|
289 |
+
} );
|
290 |
+
|
291 |
+
/**
|
292 |
+
* @summary Enables the user to clear or revert the color in the color picker.
|
293 |
+
*
|
294 |
+
* Enables the user to either clear the color in the color picker or revert back to the default color.
|
295 |
+
*
|
296 |
+
* @since 3.5.0
|
297 |
+
*
|
298 |
+
* @param {Event} event The event that's being called.
|
299 |
+
*
|
300 |
+
* @returns {void}
|
301 |
+
*/
|
302 |
+
self.button.on( 'click', function( event ) {
|
303 |
+
if ( $( this ).hasClass( 'wp-picker-clear' ) ) {
|
304 |
+
self.element.val( '' );
|
305 |
+
if ( self.options.alpha ) {
|
306 |
+
if ( _deprecated ) {
|
307 |
+
self.toggler.removeAttr( 'style' );
|
308 |
+
}
|
309 |
+
self.toggler.find( 'span.color-alpha' ).css( 'backgroundColor', '' );
|
310 |
+
} else {
|
311 |
+
self.toggler.css( 'backgroundColor', '' );
|
312 |
+
}
|
313 |
+
|
314 |
+
if ( $.isFunction( self.options.clear ) )
|
315 |
+
self.options.clear.call( this, event );
|
316 |
+
|
317 |
+
} else if ( $( this ).hasClass( 'wp-picker-default' ) ) {
|
318 |
+
self.element.val( self.options.defaultColor ).change();
|
319 |
+
}
|
320 |
+
});
|
321 |
+
},
|
322 |
+
});
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Overwrite iris
|
326 |
+
*/
|
327 |
+
$.widget( 'a8c.iris', $.a8c.iris, {
|
328 |
+
_create: function() {
|
329 |
+
this._super();
|
330 |
+
|
331 |
+
// Global option for check is mode rbga is enabled
|
332 |
+
this.options.alpha = this.element.data( 'alpha' ) || false;
|
333 |
+
|
334 |
+
// Is not input disabled
|
335 |
+
if ( ! this.element.is( ':input' ) )
|
336 |
+
this.options.alpha = false;
|
337 |
+
|
338 |
+
if ( typeof this.options.alpha !== 'undefined' && this.options.alpha ) {
|
339 |
+
var self = this,
|
340 |
+
el = self.element,
|
341 |
+
_html = '<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>',
|
342 |
+
aContainer = $( _html ).appendTo( self.picker.find( '.iris-picker-inner' ) ),
|
343 |
+
aSlider = aContainer.find( '.iris-slider-offset-alpha' ),
|
344 |
+
controls = {
|
345 |
+
aContainer : aContainer,
|
346 |
+
aSlider : aSlider
|
347 |
+
};
|
348 |
+
|
349 |
+
if ( typeof el.data( 'custom-width' ) !== 'undefined' ) {
|
350 |
+
self.options.customWidth = parseInt( el.data( 'custom-width' ) ) || 0;
|
351 |
+
} else {
|
352 |
+
self.options.customWidth = 100;
|
353 |
+
}
|
354 |
+
|
355 |
+
// Set default width for input reset
|
356 |
+
self.options.defaultWidth = el.width();
|
357 |
+
|
358 |
+
// Update width for input
|
359 |
+
if ( self._color._alpha < 1 || self._color.toString().indexOf('rgb') != -1 )
|
360 |
+
el.width( parseInt( self.options.defaultWidth + self.options.customWidth ) );
|
361 |
+
|
362 |
+
// Push new controls
|
363 |
+
$.each( controls, function( k, v ) {
|
364 |
+
self.controls[k] = v;
|
365 |
+
} );
|
366 |
+
|
367 |
+
// Change size strip and add margin for sliders
|
368 |
+
self.controls.square.css( { 'margin-right': '0' } );
|
369 |
+
var emptyWidth = ( self.picker.width() - self.controls.square.width() - 20 ),
|
370 |
+
stripsMargin = ( emptyWidth / 6 ),
|
371 |
+
stripsWidth = ( ( emptyWidth / 2 ) - stripsMargin );
|
372 |
+
|
373 |
+
$.each( [ 'aContainer', 'strip' ], function( k, v ) {
|
374 |
+
self.controls[v].width( stripsWidth ).css( { 'margin-left' : stripsMargin + 'px' } );
|
375 |
+
} );
|
376 |
+
|
377 |
+
// Add new slider
|
378 |
+
self._initControls();
|
379 |
+
|
380 |
+
// For updated widget
|
381 |
+
self._change();
|
382 |
+
}
|
383 |
+
},
|
384 |
+
_initControls: function() {
|
385 |
+
this._super();
|
386 |
+
|
387 |
+
if ( this.options.alpha ) {
|
388 |
+
var self = this,
|
389 |
+
controls = self.controls;
|
390 |
+
|
391 |
+
controls.aSlider.slider({
|
392 |
+
orientation : 'vertical',
|
393 |
+
min : 0,
|
394 |
+
max : 100,
|
395 |
+
step : 1,
|
396 |
+
value : parseInt( self._color._alpha * 100 ),
|
397 |
+
slide : function( event, ui ) {
|
398 |
+
// Update alpha value
|
399 |
+
self._color._alpha = parseFloat( ui.value / 100 );
|
400 |
+
self._change.apply( self, arguments );
|
401 |
+
}
|
402 |
+
});
|
403 |
+
}
|
404 |
+
},
|
405 |
+
_change: function() {
|
406 |
+
this._super();
|
407 |
+
|
408 |
+
var self = this,
|
409 |
+
el = self.element;
|
410 |
+
|
411 |
+
if ( this.options.alpha ) {
|
412 |
+
var controls = self.controls,
|
413 |
+
alpha = parseInt( self._color._alpha * 100 ),
|
414 |
+
color = self._color.toRgb(),
|
415 |
+
gradient = [
|
416 |
+
'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%',
|
417 |
+
'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%'
|
418 |
+
],
|
419 |
+
defaultWidth = self.options.defaultWidth,
|
420 |
+
customWidth = self.options.customWidth,
|
421 |
+
target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' );
|
422 |
+
|
423 |
+
// Generate background slider alpha, only for CSS3 old browser fuck!! :)
|
424 |
+
controls.aContainer.css( { 'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + image + ')' } );
|
425 |
+
|
426 |
+
if ( target.hasClass( 'wp-picker-open' ) ) {
|
427 |
+
// Update alpha value
|
428 |
+
controls.aSlider.slider( 'value', alpha );
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Disabled change opacity in default slider Saturation ( only is alpha enabled )
|
432 |
+
* and change input width for view all value
|
433 |
+
*/
|
434 |
+
if ( self._color._alpha < 1 ) {
|
435 |
+
controls.strip.attr( 'style', controls.strip.attr( 'style' ).replace( /rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g, 'rgb($1$3$5)' ) );
|
436 |
+
el.width( parseInt( defaultWidth + customWidth ) );
|
437 |
+
} else {
|
438 |
+
el.width( defaultWidth );
|
439 |
+
}
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
var reset = el.data( 'reset-alpha' ) || false;
|
444 |
+
|
445 |
+
if ( reset ) {
|
446 |
+
self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() {
|
447 |
+
self._color._alpha = 1;
|
448 |
+
self.active = 'external';
|
449 |
+
self._change();
|
450 |
+
} );
|
451 |
+
}
|
452 |
+
},
|
453 |
+
_addInputListeners: function( input ) {
|
454 |
+
var self = this,
|
455 |
+
debounceTimeout = 100,
|
456 |
+
callback = function( event ) {
|
457 |
+
var color = new Color( input.val() ),
|
458 |
+
val = input.val();
|
459 |
+
|
460 |
+
input.removeClass( 'iris-error' );
|
461 |
+
// we gave a bad color
|
462 |
+
if ( color.error ) {
|
463 |
+
// don't error on an empty input
|
464 |
+
if ( val !== '' )
|
465 |
+
input.addClass( 'iris-error' );
|
466 |
+
} else {
|
467 |
+
if ( color.toString() !== self._color.toString() ) {
|
468 |
+
// let's not do this on keyup for hex shortcodes
|
469 |
+
if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) )
|
470 |
+
self._setOption( 'color', color.toString() );
|
471 |
+
}
|
472 |
+
}
|
473 |
+
};
|
474 |
+
|
475 |
+
input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) );
|
476 |
+
|
477 |
+
// If we initialized hidden, show on first focus. The rest is up to you.
|
478 |
+
if ( self.options.hide ) {
|
479 |
+
input.on( 'focus', function() {
|
480 |
+
self.show();
|
481 |
+
} );
|
482 |
+
}
|
483 |
+
}
|
484 |
+
} );
|
485 |
+
}( jQuery ) );
|
486 |
+
|
487 |
+
// Auto Call plugin is class is color-picker
|
488 |
+
jQuery( document ).ready( function( $ ) {
|
489 |
+
$( '.color-picker' ).wpColorPicker();
|
490 |
+
} );
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-colorpicker/ui-colorpicker.php
CHANGED
@@ -35,6 +35,7 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
|
|
35 |
'label' => '',
|
36 |
'class' => '',
|
37 |
'master' => '',
|
|
|
38 |
'lock' => false,
|
39 |
);
|
40 |
|
@@ -74,12 +75,18 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
|
|
74 |
)
|
75 |
);
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
|
78 |
if ( '' !== $this->settings['label'] ) {
|
79 |
$html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
|
80 |
}
|
81 |
$html .= '<div class="cherry-ui-colorpicker-wrapper' . $this->lock_element->get_class() .'">';
|
82 |
-
$html .= '<input type="text" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-colorpicker" name="' . esc_attr( $this->settings['name'] ) . '" value="' . esc_html( $this->settings['value'] ) . '"' . $this->lock_element->get_disabled_attr() . '/>';
|
83 |
$html .= $this->lock_element->get_html();
|
84 |
$html .= '</div>';
|
85 |
$html .= '</div>';
|
@@ -94,10 +101,18 @@ if ( ! class_exists( 'UI_Colorpicker' ) ) {
|
|
94 |
*/
|
95 |
public static function enqueue_assets() {
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
wp_enqueue_script(
|
98 |
'ui-colorpicker',
|
99 |
esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.js', Cherry_UI_Elements::$module_path ) ),
|
100 |
-
array( 'jquery'
|
101 |
Cherry_UI_Elements::$core_version,
|
102 |
true
|
103 |
);
|
35 |
'label' => '',
|
36 |
'class' => '',
|
37 |
'master' => '',
|
38 |
+
'alpha' => false,
|
39 |
'lock' => false,
|
40 |
);
|
41 |
|
75 |
)
|
76 |
);
|
77 |
|
78 |
+
$alpha = '';
|
79 |
+
|
80 |
+
if ( true === $this->settings['alpha'] ) {
|
81 |
+
$alpha = ' data-alpha=true ';
|
82 |
+
}
|
83 |
+
|
84 |
$html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
|
85 |
if ( '' !== $this->settings['label'] ) {
|
86 |
$html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
|
87 |
}
|
88 |
$html .= '<div class="cherry-ui-colorpicker-wrapper' . $this->lock_element->get_class() .'">';
|
89 |
+
$html .= '<input type="text" id="' . esc_attr( $this->settings['id'] ) . '" class="cherry-ui-colorpicker" name="' . esc_attr( $this->settings['name'] ) . '"' . $alpha . 'value="' . esc_html( $this->settings['value'] ) . '"' . $this->lock_element->get_disabled_attr() . '/>';
|
90 |
$html .= $this->lock_element->get_html();
|
91 |
$html .= '</div>';
|
92 |
$html .= '</div>';
|
101 |
*/
|
102 |
public static function enqueue_assets() {
|
103 |
|
104 |
+
wp_enqueue_script(
|
105 |
+
'wp-color-picker-alpha',
|
106 |
+
esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-colorpicker/assets/min/wp-color-picker-alpha.min.js', Cherry_UI_Elements::$module_path ) ),
|
107 |
+
array( 'wp-color-picker' ),
|
108 |
+
'1.2.2',
|
109 |
+
true
|
110 |
+
);
|
111 |
+
|
112 |
wp_enqueue_script(
|
113 |
'ui-colorpicker',
|
114 |
esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-colorpicker/assets/min/ui-colorpicker.min.js', Cherry_UI_Elements::$module_path ) ),
|
115 |
+
array( 'jquery' ),
|
116 |
Cherry_UI_Elements::$core_version,
|
117 |
true
|
118 |
);
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/min/ui-dimensions.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-dimensions{max-width:300px}.cherry-ui-dimensions__units{margin-right:20%;display:flex;justify-content:flex-end}.cherry-ui-dimensions__unit{color:#c2cbd2;cursor:pointer;font-size:9px;text-transform:uppercase;margin:0 2px}.cherry-ui-dimensions__unit.is-active{color:#6d7882;text-decoration:underline}.cherry-ui-dimensions__values{display:flex;border:1px solid #a4afb7;border-radius:3px}.cherry-ui-dimensions__value-item{position:relative;width:20%}.cherry-ui-dimensions__value-item input{width:100%;margin:0;border:none;box-shadow:none;border-right:1px solid #a4afb7;font-size: 12px;}.cherry-ui-dimensions__value-item input:first-child{border-radius:3px 0 0 3px}.cherry-ui-dimensions__value-item input:focus{border-color:none}.cherry-ui-dimensions__value-label{width:100%;display:block;position:absolute;bottom:-18px;font-size:9px;text-transform:uppercase;text-align:center;color:#d5dadf}.cherry-ui-dimensions__is-linked{width:20%;height:28px;background-color:white;text-align:center;color:#a4afb7;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:0 3px 3px 0}.cherry-ui-dimensions__is-linked .link-icon{display:none}.cherry-ui-dimensions__is-linked .unlink-icon{display:block}.cherry-ui-dimensions__is-linked.is-linked{color:white;background-color:#a4afb7}.cherry-ui-dimensions__is-linked.is-linked .link-icon{display:block}.cherry-ui-dimensions__is-linked.is-linked .unlink-icon{display:none}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-dimensions.js
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Radio
|
3 |
+
*/
|
4 |
+
(function($, CherryJsCore){
|
5 |
+
'use strict';
|
6 |
+
|
7 |
+
CherryJsCore.utilites.namespace('ui_elements.dimensions');
|
8 |
+
CherryJsCore.ui_elements.dimensions = {
|
9 |
+
container: '.cherry-ui-dimensions',
|
10 |
+
isLinked: '.cherry-ui-dimensions__is-linked',
|
11 |
+
units: '.cherry-ui-dimensions__unit',
|
12 |
+
unitsInput: 'input[name*="[units]"]',
|
13 |
+
linkedInput: 'input[name*="[is_linked]"]',
|
14 |
+
valuesInput: '.cherry-ui-dimensions__val',
|
15 |
+
|
16 |
+
init: function() {
|
17 |
+
$( document ).on( 'ready', this.addEvents.bind( this ) );
|
18 |
+
this.triggers();
|
19 |
+
},
|
20 |
+
|
21 |
+
triggers: function( $target ) {
|
22 |
+
|
23 |
+
if ( $target ) {
|
24 |
+
$( document ).trigger( 'cherry-ui-elements-init', { 'target': $target } );
|
25 |
+
}
|
26 |
+
|
27 |
+
return this;
|
28 |
+
},
|
29 |
+
|
30 |
+
addEvents: function() {
|
31 |
+
$( 'body' )
|
32 |
+
|
33 |
+
// Delegate events
|
34 |
+
.on( 'click', this.isLinked, { 'self': this }, this.switchLinked )
|
35 |
+
.on( 'click', this.units, { 'self': this }, this.switchUnits )
|
36 |
+
.on( 'input', this.valuesInput + '.is-linked', { 'self': this }, this.changeLinked );
|
37 |
+
|
38 |
+
this.triggers();
|
39 |
+
},
|
40 |
+
|
41 |
+
switchLinked: function( event ) {
|
42 |
+
|
43 |
+
var self = event.data.self,
|
44 |
+
$this = $( this ),
|
45 |
+
$container = $this.closest( self.container ),
|
46 |
+
$input = $container.find( self.linkedInput ),
|
47 |
+
$values = $container.find( self.valuesInput ),
|
48 |
+
isLinked = $input.val();
|
49 |
+
|
50 |
+
if ( 0 === parseInt( isLinked ) ) {
|
51 |
+
$input.val(1);
|
52 |
+
$this.addClass( 'is-linked' );
|
53 |
+
$values.addClass( 'is-linked' );
|
54 |
+
} else {
|
55 |
+
$input.val(0);
|
56 |
+
$this.removeClass( 'is-linked' );
|
57 |
+
$values.removeClass( 'is-linked' );
|
58 |
+
}
|
59 |
+
|
60 |
+
},
|
61 |
+
|
62 |
+
switchUnits: function( event ) {
|
63 |
+
var self = event.data.self,
|
64 |
+
$this = $( this ),
|
65 |
+
unit = $this.data( 'unit' ),
|
66 |
+
$container = $this.closest( self.container ),
|
67 |
+
$input = $container.find( self.unitsInput ),
|
68 |
+
$values = $container.find( self.valuesInput ),
|
69 |
+
range = $container.data( 'range' );
|
70 |
+
|
71 |
+
if ( $this.hasClass( 'is-active' ) ) {
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
$this.addClass( 'is-active' ).siblings( self.units ).removeClass( 'is-active' );
|
76 |
+
$input.val( unit );
|
77 |
+
$values.attr({
|
78 |
+
min: range[ unit ].min,
|
79 |
+
max: range[ unit ].max,
|
80 |
+
step: range[ unit ].step
|
81 |
+
});
|
82 |
+
|
83 |
+
},
|
84 |
+
|
85 |
+
changeLinked: function( event ) {
|
86 |
+
var self = event.data.self,
|
87 |
+
$this = $( this ),
|
88 |
+
$container = $this.closest( '.cherry-ui-dimensions__values' );
|
89 |
+
|
90 |
+
$( self.valuesInput, $container ).val( $this.val() )
|
91 |
+
}
|
92 |
+
};
|
93 |
+
|
94 |
+
CherryJsCore.ui_elements.dimensions.init();
|
95 |
+
|
96 |
+
}(jQuery, window.CherryJsCore));
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-dimensions.scss
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "ui-kit/variables";
|
2 |
+
@import "ui-kit/mixins";
|
3 |
+
@import "../../../../assets/sass/lock";
|
4 |
+
|
5 |
+
.cherry-ui-elements-lock{
|
6 |
+
opacity: 0.5;
|
7 |
+
cursor: no-drop;
|
8 |
+
pointer-events: none;
|
9 |
+
filter: grayscale( 100% );
|
10 |
+
}
|
11 |
+
.cherry-ui-container{
|
12 |
+
margin: 10px 0 20px 0;
|
13 |
+
}
|
14 |
+
label.cherry-label{
|
15 |
+
margin: 0 0 5px 0;
|
16 |
+
display: block;
|
17 |
+
}
|
18 |
+
|
19 |
+
.cherry-ui-dimensions {
|
20 |
+
max-width: 300px;
|
21 |
+
|
22 |
+
&__units {
|
23 |
+
margin-right: 20%;
|
24 |
+
display: flex;
|
25 |
+
justify-content: flex-end;
|
26 |
+
}
|
27 |
+
|
28 |
+
&__unit {
|
29 |
+
color: #c2cbd2;
|
30 |
+
cursor: pointer;
|
31 |
+
font-size: 9px;
|
32 |
+
text-transform: uppercase;
|
33 |
+
margin: 0 2px;
|
34 |
+
|
35 |
+
&.is-active {
|
36 |
+
color: #6d7882;
|
37 |
+
text-decoration: underline;
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
&__values {
|
43 |
+
display: flex;
|
44 |
+
border: 1px solid #a4afb7;
|
45 |
+
border-radius: 3px;
|
46 |
+
}
|
47 |
+
|
48 |
+
&__value-item {
|
49 |
+
position: relative;
|
50 |
+
width: 20%;
|
51 |
+
|
52 |
+
input {
|
53 |
+
width: 100%;
|
54 |
+
margin: 0;
|
55 |
+
border: none;
|
56 |
+
box-shadow: none;
|
57 |
+
border-right: 1px solid #a4afb7;
|
58 |
+
font-size: 12px;
|
59 |
+
|
60 |
+
&:first-child {
|
61 |
+
border-radius: 3px 0 0 3px;
|
62 |
+
}
|
63 |
+
|
64 |
+
&:focus {
|
65 |
+
border-color: none;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
&__value-label {
|
71 |
+
width: 100%;
|
72 |
+
display: block;
|
73 |
+
position: absolute;
|
74 |
+
bottom: -18px;
|
75 |
+
font-size: 9px;
|
76 |
+
text-transform: uppercase;
|
77 |
+
text-align: center;
|
78 |
+
color: #d5dadf;
|
79 |
+
}
|
80 |
+
|
81 |
+
&__is-linked {
|
82 |
+
width: 20%;
|
83 |
+
height: 28px;
|
84 |
+
background-color: white;
|
85 |
+
text-align: center;
|
86 |
+
color: #a4afb7;
|
87 |
+
cursor: pointer;
|
88 |
+
display: flex;
|
89 |
+
align-items: center;
|
90 |
+
justify-content: center;
|
91 |
+
border-radius: 0 3px 3px 0;
|
92 |
+
|
93 |
+
.link-icon {
|
94 |
+
display: none;
|
95 |
+
}
|
96 |
+
|
97 |
+
.unlink-icon {
|
98 |
+
display: block;
|
99 |
+
}
|
100 |
+
|
101 |
+
&.is-linked {
|
102 |
+
color: white;
|
103 |
+
background-color: #a4afb7;
|
104 |
+
|
105 |
+
.link-icon {
|
106 |
+
display: block;
|
107 |
+
}
|
108 |
+
|
109 |
+
.unlink-icon {
|
110 |
+
display: none;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-kit/_mixins.scss
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@mixin input() {
|
2 |
+
font-size: 14px;
|
3 |
+
line-height: 20px;
|
4 |
+
color: $dark_color;
|
5 |
+
background-color: $bg_color;
|
6 |
+
border-radius: $border_radius_extra_small;
|
7 |
+
padding: 10px 20px;
|
8 |
+
min-height: 50px;
|
9 |
+
border: 1px solid $border_color;
|
10 |
+
box-shadow: none;
|
11 |
+
&:focus{
|
12 |
+
border-color: rgba(41, 143, 252, .6);
|
13 |
+
box-shadow: 0 0 2px rgba(41, 143, 252, .6);
|
14 |
+
}
|
15 |
+
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/assets/ui-kit/_variables.scss
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$light_color: #ffffff;
|
2 |
+
$dark_color: #23282d;
|
3 |
+
|
4 |
+
$bg_color: #f1f1f1;
|
5 |
+
$border_color: #dcdcdc;
|
6 |
+
|
7 |
+
$border_radius_extra_small: 2px;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-dimensions/ui-dimensions.php
ADDED
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class for the building ui-dimensions elements.
|
4 |
+
*
|
5 |
+
* @package Cherry_Framework
|
6 |
+
* @subpackage Class
|
7 |
+
* @author Cherry Team <support@cherryframework.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2015, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.en.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
|
18 |
+
if ( ! class_exists( 'UI_Dimensions' ) ) {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Class for the building ui-dimensions elements.
|
22 |
+
*/
|
23 |
+
class UI_Dimensions extends UI_Element implements I_UI {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Default settings.
|
27 |
+
*
|
28 |
+
* @since 1.0.0
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
private $defaults_settings = array(
|
32 |
+
'type' => 'dimensions',
|
33 |
+
'id' => 'cherry-ui-dimensions-id',
|
34 |
+
'name' => 'cherry-ui-dimensions-name',
|
35 |
+
'value' => array(),
|
36 |
+
'range' => array(
|
37 |
+
'px' => array(
|
38 |
+
'min' => 0,
|
39 |
+
'max' => 100,
|
40 |
+
'step' => 1,
|
41 |
+
),
|
42 |
+
),
|
43 |
+
'label' => '',
|
44 |
+
'dimension_labels' => array(
|
45 |
+
'top' => 'Top',
|
46 |
+
'right' => 'Right',
|
47 |
+
'bottom' => 'Bottom',
|
48 |
+
'left' => 'Left',
|
49 |
+
),
|
50 |
+
'class' => '',
|
51 |
+
'master' => '',
|
52 |
+
'required' => false,
|
53 |
+
'lock' => false,
|
54 |
+
);
|
55 |
+
|
56 |
+
protected $default_value = array(
|
57 |
+
'units' => 'px',
|
58 |
+
'is_linked' => true,
|
59 |
+
'top' => '',
|
60 |
+
'right' => '',
|
61 |
+
'bottom' => '',
|
62 |
+
'left' => '',
|
63 |
+
);
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Instance of this Cherry5_Lock_Element class.
|
67 |
+
*
|
68 |
+
* @since 1.0.0
|
69 |
+
* @var object
|
70 |
+
* @access private
|
71 |
+
*/
|
72 |
+
private $lock_element = null;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Constructor method for the UI_Text class.
|
76 |
+
*
|
77 |
+
* @since 1.0.0
|
78 |
+
*/
|
79 |
+
function __construct( $args = array() ) {
|
80 |
+
|
81 |
+
$this->defaults_settings['id'] = 'cherry-ui-dimensions-' . uniqid();
|
82 |
+
$this->settings = wp_parse_args( $args, $this->defaults_settings );
|
83 |
+
|
84 |
+
$this->lock_element = new Cherry5_Lock_Element( $this->settings );
|
85 |
+
|
86 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_assets' ) );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get required attribute.
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
public function get_required() {
|
96 |
+
|
97 |
+
if ( $this->settings['required'] ) {
|
98 |
+
return 'required="required"';
|
99 |
+
}
|
100 |
+
|
101 |
+
return '';
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Render html UI_Text.
|
106 |
+
*
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
public function render() {
|
110 |
+
$html = '';
|
111 |
+
$class = implode( ' ',
|
112 |
+
array(
|
113 |
+
$this->settings['class'],
|
114 |
+
$this->settings['master'],
|
115 |
+
$this->lock_element->get_class(),
|
116 |
+
)
|
117 |
+
);
|
118 |
+
|
119 |
+
if ( empty( $this->settings['value'] ) ) {
|
120 |
+
$this->settings['value'] = $this->default_value;
|
121 |
+
} else {
|
122 |
+
$this->settings['value'] = array_merge( $this->default_value, $this->settings['value'] );
|
123 |
+
}
|
124 |
+
|
125 |
+
$html .= '<div class="cherry-ui-container ' . esc_attr( $class ) . '">';
|
126 |
+
|
127 |
+
if ( '' !== $this->settings['label'] ) {
|
128 |
+
$html .= '<label class="cherry-label" for="' . esc_attr( $this->settings['id'] ) . '">' . esc_html( $this->settings['label'] ) . '</label> ';
|
129 |
+
}
|
130 |
+
|
131 |
+
$html .= $this->get_fields();
|
132 |
+
$html .= $this->lock_element->get_html();
|
133 |
+
$html .= '</div>';
|
134 |
+
return $html;
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Return UI fileds
|
139 |
+
* @return [type] [description]
|
140 |
+
*/
|
141 |
+
public function get_fields() {
|
142 |
+
|
143 |
+
$hidden = '<input type="hidden" name="%1$s" id="%3$s" value="%2$s">';
|
144 |
+
$number = '<div class="cherry-ui-dimensions__value-item"><input type="number" name="%1$s" id="%3$s" value="%2$s" min="%4$s" max="%5$s" step="%6$s" class="cherry-ui-dimensions__val%7$s"><span class="cherry-ui-dimensions__value-label">%8$s</span></div>';
|
145 |
+
|
146 |
+
$value = $this->settings['value'];
|
147 |
+
$value = array_merge( $this->default_value, $value );
|
148 |
+
|
149 |
+
$result = sprintf(
|
150 |
+
'<div class="cherry-ui-dimensions" data-range=\'%s\'>',
|
151 |
+
json_encode( $this->settings['range'] )
|
152 |
+
);
|
153 |
+
|
154 |
+
foreach ( array( 'units', 'is_linked' ) as $field ) {
|
155 |
+
$result .= sprintf(
|
156 |
+
$hidden,
|
157 |
+
$this->get_name_attr( $field ), $value[ $field ], $this->get_id_attr( $field )
|
158 |
+
);
|
159 |
+
}
|
160 |
+
$result .= $this->get_units();
|
161 |
+
$result .= '<div class="cherry-ui-dimensions__values">';
|
162 |
+
|
163 |
+
$value['is_linked'] = filter_var( $value['is_linked'], FILTER_VALIDATE_BOOLEAN );
|
164 |
+
|
165 |
+
foreach ( array( 'top', 'right', 'bottom', 'left' ) as $field ) {
|
166 |
+
$result .= sprintf(
|
167 |
+
$number,
|
168 |
+
$this->get_name_attr( $field ),
|
169 |
+
$value[ $field ],
|
170 |
+
$this->get_id_attr( $field ),
|
171 |
+
$this->settings['range'][ $value['units'] ]['min'],
|
172 |
+
$this->settings['range'][ $value['units'] ]['max'],
|
173 |
+
$this->settings['range'][ $value['units'] ]['step'],
|
174 |
+
( true === $value['is_linked'] ? ' is-linked' : '' ),
|
175 |
+
$this->settings['dimension_labels'][ $field ]
|
176 |
+
);
|
177 |
+
}
|
178 |
+
$result .= sprintf(
|
179 |
+
'<div class="cherry-ui-dimensions__is-linked%s"><span class="dashicons dashicons-admin-links link-icon"></span><span class="dashicons dashicons-editor-unlink unlink-icon"></span></div>',
|
180 |
+
( true === $value['is_linked'] ? ' is-linked' : '' )
|
181 |
+
);
|
182 |
+
$result .= '</div>';
|
183 |
+
$result .= '</div>';
|
184 |
+
|
185 |
+
return $result;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Returns units selector
|
190 |
+
*
|
191 |
+
* @return string
|
192 |
+
*/
|
193 |
+
public function get_units() {
|
194 |
+
|
195 |
+
$units = array_keys( $this->settings['range'] );
|
196 |
+
$switcher = 'can-switch';
|
197 |
+
|
198 |
+
if ( 1 === count( $units ) ) {
|
199 |
+
$switcher = '';
|
200 |
+
}
|
201 |
+
|
202 |
+
$item = '<span class="cherry-ui-dimensions__unit%2$s" data-unit="%1$s">%1$s</span>';
|
203 |
+
$result = '';
|
204 |
+
|
205 |
+
foreach ( $units as $unit ) {
|
206 |
+
$result .= sprintf(
|
207 |
+
$item,
|
208 |
+
$unit,
|
209 |
+
( $this->settings['value']['units'] === $unit ? ' is-active' : '' )
|
210 |
+
);
|
211 |
+
}
|
212 |
+
|
213 |
+
return sprintf( '<div class="cherry-ui-dimensions__units">%s</div>', $result );
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Retrurn full name attibute by name
|
218 |
+
*
|
219 |
+
* @param [type] $name [description]
|
220 |
+
* @return [type] [description]
|
221 |
+
*/
|
222 |
+
public function get_name_attr( $name = '' ) {
|
223 |
+
return sprintf( '%s[%s]', esc_attr( $this->settings['name'] ), esc_attr( $name ) );
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Retrurn full ID attibute by name
|
228 |
+
*
|
229 |
+
* @param [type] $name [description]
|
230 |
+
* @return [type] [description]
|
231 |
+
*/
|
232 |
+
public function get_id_attr( $name = '' ) {
|
233 |
+
return sprintf( '%s_%s', esc_attr( $this->settings['name'] ), esc_attr( $name ) );
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Enqueue javascript and stylesheet UI_Text.
|
238 |
+
*
|
239 |
+
* @since 1.0.0
|
240 |
+
*/
|
241 |
+
public static function enqueue_assets() {
|
242 |
+
wp_enqueue_style(
|
243 |
+
'ui-dimensions',
|
244 |
+
esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-dimensions/assets/min/ui-dimensions.min.css', Cherry_UI_Elements::$module_path ) ),
|
245 |
+
array(),
|
246 |
+
Cherry_UI_Elements::$core_version,
|
247 |
+
'all'
|
248 |
+
);
|
249 |
+
|
250 |
+
wp_enqueue_script(
|
251 |
+
'ui-dimensions',
|
252 |
+
esc_url( Cherry_Core::base_url( 'inc/ui-elements/ui-dimensions/assets/ui-dimensions.js', Cherry_UI_Elements::$module_path ) ),
|
253 |
+
array( 'jquery' ),
|
254 |
+
Cherry_UI_Elements::$core_version,
|
255 |
+
true
|
256 |
+
);
|
257 |
+
|
258 |
+
}
|
259 |
+
}
|
260 |
+
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/min/ui-iconpicker.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-iconpicker-group{position:relative}.full .cherry-ui-iconpicker-group{max-width:100%}.fixed .cherry-ui-iconpicker-group{max-width:150px}.cherry-ui-iconpicker-group .input-group-addon{position:absolute;width:20px;height:20px;left:0px;top:0px;background:#f1f1f1;font-size:14px;line-height:20px;text-align:center;border-radius:3px 0 0 3px;border-right:1px solid #dddcdc;margin:3px}.cherry-ui-iconpicker-group .input-group-addon .fa{line-height:20px}.cherry-ui-iconpicker-group .cherry-ui-text{font-size:12px;line-height:16px;color:#23282d;background-color:#f1f1f1;border-radius:2px;min-height:26px;border:1px solid #f1f1f1;box-shadow:none;padding:0px 0px 0px 30px}.cherry-ui-iconpicker-group .cherry-ui-text:focus{border-color:rgba(41,143,252,0.6);box-shadow:0 0 2px rgba(41,143,252,0.6)}.iconpicker-popover.popover{position:absolute;top:0;left:0;display:none;max-width:none;padding:1px;text-align:left;width:242px;background:#f0f0f0;z-index:999}.iconpicker-popover.popover.top,.iconpicker-popover.popover.topLeftCorner,.iconpicker-popover.popover.topLeft,.iconpicker-popover.popover.topRight,.iconpicker-popover.popover.topRightCorner{margin-top:-10px}.iconpicker-popover.popover.right,.iconpicker-popover.popover.rightTop,.iconpicker-popover.popover.rightBottom{margin-left:10px}.iconpicker-popover.popover.bottom,.iconpicker-popover.popover.bottomRightCorner,.iconpicker-popover.popover.bottomRight,.iconpicker-popover.popover.bottomLeft,.iconpicker-popover.popover.bottomLeftCorner{margin-top:10px}.iconpicker-popover.popover.left,.iconpicker-popover.popover.leftBottom,.iconpicker-popover.popover.leftTop{margin-left:-10px}.iconpicker-popover.popover.inline{margin:0 0 14px 0;position:relative;display:inline-block;opacity:1;top:auto;left:auto;bottom:auto;right:auto;max-width:100%;box-shadow:none;z-index:auto;vertical-align:top}.iconpicker-popover.popover.inline>.arrow{display:none}.dropdown-menu .iconpicker-popover.inline{margin:0;border:none}.dropdown-menu.iconpicker-container{padding:0}.iconpicker-popover.popover .popover-title{padding:14px;font-size:14px;line-height:16px;border-bottom:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search{margin:0 0 2px 0}.iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search{margin-top:14px}.iconpicker-popover.popover .popover-content{padding:0px;text-align:center}.iconpicker-popover .popover-footer{float:none;clear:both;padding:14px;text-align:right;margin:0;border-top:1px solid #ebebeb;background-color:#f0f0f0}.iconpicker-popover .popover-footer:before,.iconpicker-popover .popover-footer:after{content:" ";display:table}.iconpicker-popover .popover-footer:after{clear:both}.iconpicker-popover .popover-footer .iconpicker-btn{margin-left:10px}.iconpicker-popover .popover-footer input[type=search].iconpicker-search{margin-bottom:14px}.iconpicker-popover.popover>.arrow,.iconpicker-popover.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.iconpicker-popover.popover>.arrow{border-width:11px}.iconpicker-popover.popover>.arrow:after{border-width:10px;content:""}.iconpicker-popover.popover.top>.arrow,.iconpicker-popover.popover.topLeft>.arrow,.iconpicker-popover.popover.topRight>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#f0f0f0;bottom:-11px}.iconpicker-popover.popover.top>.arrow:after,.iconpicker-popover.popover.topLeft>.arrow:after,.iconpicker-popover.popover.topRight>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.iconpicker-popover.popover.topLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.topRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.right>.arrow,.iconpicker-popover.popover.rightTop>.arrow,.iconpicker-popover.popover.rightBottom>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#f0f0f0}.iconpicker-popover.popover.right>.arrow:after,.iconpicker-popover.popover.rightTop>.arrow:after,.iconpicker-popover.popover.rightBottom>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.iconpicker-popover.popover.rightTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker-popover.popover.rightBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.bottom>.arrow,.iconpicker-popover.popover.bottomRight>.arrow,.iconpicker-popover.popover.bottomLeft>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#f0f0f0;top:-11px}.iconpicker-popover.popover.bottom>.arrow:after,.iconpicker-popover.popover.bottomRight>.arrow:after,.iconpicker-popover.popover.bottomLeft>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#f0f0f0}.iconpicker-popover.popover.bottomLeft>.arrow{left:14px;margin-left:0}.iconpicker-popover.popover.bottomRight>.arrow{left:auto;right:14px;margin-left:0}.iconpicker-popover.popover.left>.arrow,.iconpicker-popover.popover.leftBottom>.arrow,.iconpicker-popover.popover.leftTop>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#f0f0f0}.iconpicker-popover.popover.left>.arrow:after,.iconpicker-popover.popover.leftBottom>.arrow:after,.iconpicker-popover.popover.leftTop>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.iconpicker-popover.popover.leftBottom>.arrow{top:14px;margin-top:0}.iconpicker-popover.popover.leftTop>.arrow{top:auto;bottom:14px;margin-top:0}.iconpicker{position:relative;text-align:left;text-shadow:none;line-height:0;display:block;margin:0;overflow:hidden}.iconpicker *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}.iconpicker:before,.iconpicker:after{content:" ";display:table}.iconpicker:after{clear:both}.iconpicker .iconpicker-items{position:relative;clear:both;float:none;padding:10px 0 0 10px;background:#fff;margin:0;overflow:hidden;overflow-y:auto;min-height:55px;max-height:275px}.iconpicker .iconpicker-items:before,.iconpicker .iconpicker-items:after{content:" ";display:table}.iconpicker .iconpicker-items:after{clear:both}.iconpicker .iconpicker-item{float:left;width:28px;height:28px;line-height:28px;margin:0 7px 7px 0;text-align:center;cursor:pointer;border-radius:3px;font-size:18px;color:#444;box-shadow:0 0 0 1px #dddddd}.iconpicker .iconpicker-item .fa{line-height:28px}.iconpicker .iconpicker-item:hover:not(.iconpicker-selected){background-color:#eeeeee}.iconpicker .iconpicker-item.iconpicker-selected{box-shadow:none;background:#ddd}.iconpicker-component{cursor:pointer}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-iconpicker.scss
CHANGED
@@ -15,28 +15,29 @@
|
|
15 |
max-width: 100%;
|
16 |
}
|
17 |
.fixed &{
|
18 |
-
max-width:
|
19 |
}
|
20 |
.input-group-addon {
|
21 |
position: absolute;
|
22 |
-
width:
|
23 |
-
height:
|
24 |
left: 0px;
|
25 |
top: 0px;
|
26 |
background: $grey_color_3;
|
27 |
font-size: 14px;
|
28 |
-
line-height:
|
29 |
text-align: center;
|
30 |
border-radius: 3px 0 0 3px;
|
31 |
border-right: 1px solid #dddcdc;
|
32 |
-
margin:
|
|
|
33 |
.fa {
|
34 |
-
line-height:
|
35 |
}
|
36 |
}
|
37 |
.cherry-ui-text{
|
38 |
@include input();
|
39 |
-
padding
|
40 |
}
|
41 |
}
|
42 |
|
15 |
max-width: 100%;
|
16 |
}
|
17 |
.fixed &{
|
18 |
+
max-width: 150px;
|
19 |
}
|
20 |
.input-group-addon {
|
21 |
position: absolute;
|
22 |
+
width: 20px;
|
23 |
+
height: 20px;
|
24 |
left: 0px;
|
25 |
top: 0px;
|
26 |
background: $grey_color_3;
|
27 |
font-size: 14px;
|
28 |
+
line-height: 20px;
|
29 |
text-align: center;
|
30 |
border-radius: 3px 0 0 3px;
|
31 |
border-right: 1px solid #dddcdc;
|
32 |
+
margin: 3px;
|
33 |
+
|
34 |
.fa {
|
35 |
+
line-height: 20px;
|
36 |
}
|
37 |
}
|
38 |
.cherry-ui-text{
|
39 |
@include input();
|
40 |
+
padding: 0px 0px 0px 30px;
|
41 |
}
|
42 |
}
|
43 |
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/ui-kit/_mixins.scss
CHANGED
@@ -59,13 +59,12 @@
|
|
59 |
}
|
60 |
|
61 |
@mixin input() {
|
62 |
-
font-size:
|
63 |
-
line-height:
|
64 |
color: $dark_color_1;
|
65 |
background-color: $grey_color_3;
|
66 |
border-radius: $border_radius_extra_small;
|
67 |
-
|
68 |
-
min-height: 50px;
|
69 |
border: 1px solid $grey_color_3;
|
70 |
box-shadow: none;
|
71 |
&:focus{
|
59 |
}
|
60 |
|
61 |
@mixin input() {
|
62 |
+
font-size: 12px;
|
63 |
+
line-height: 16px;
|
64 |
color: $dark_color_1;
|
65 |
background-color: $grey_color_3;
|
66 |
border-radius: $border_radius_extra_small;
|
67 |
+
min-height: 26px;
|
|
|
68 |
border: 1px solid $grey_color_3;
|
69 |
box-shadow: none;
|
70 |
&:focus{
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/ui-iconpicker.php
CHANGED
@@ -251,7 +251,7 @@ if ( ! class_exists( 'UI_Iconpicker' ) ) {
|
|
251 |
|
252 |
ob_start();
|
253 |
|
254 |
-
$path = str_replace(
|
255 |
if ( file_exists( $path ) ) {
|
256 |
include $path;
|
257 |
}
|
251 |
|
252 |
ob_start();
|
253 |
|
254 |
+
$path = str_replace( content_url(), WP_CONTENT_DIR, $this->settings['icon_data']['icon_css'] );
|
255 |
if ( file_exists( $path ) ) {
|
256 |
include $path;
|
257 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/min/ui-media.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-media-wrap .cherry-upload-preview{display:block;margin:0 0 5px 0}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap{position:relative;display:inline-block;vertical-align:top;width:128px;height:128px}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner{width:110px;height:110px;margin:3px;position:relative;border:1px solid #d5dadf;padding:5px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder{width:100%;height:100%;position:relative;background:#f1f1f1;box-sizing:border-box}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder .centered{position:absolute;width:100%;height:100%;top:0;left:0;transform:translate(50%, 50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder img{max-width:100%;height:auto;transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .preview-holder span{width:auto;height:auto;font-size:60px;transform:translate(-50%, -50%)}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap .inner .title{position:absolute;display:none;width:100px;padding:5px;margin:5px;bottom:0;left:0;color:#fff;background:#a4afb7;text-align:center;font-size:11px;overflow:hidden}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap:hover .inner{border-color:#d5dadf}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap:hover .title{display:block}.cherry-ui-media-wrap .cherry-upload-preview .cherry-image-wrap:hover .cherry-remove-image{display:block}.cherry-ui-media-wrap .cherry-upload-preview .cherry-media-thumb-sortable-placeholder{width:120px;height:120px;margin:3px;vertical-align:top;border:1px dashed #dcdcdc;display:inline-block;background-color:#f1f1f1}.cherry-ui-media-wrap .upload-button{float:left}.cherry-ui-media-wrap .cherry-remove-image{width:25px;height:25px;color:#e54343;display:block;position:absolute;top:5px;right:5px;cursor:pointer;text-decoration:none;outline:0;display:none}.cherry-ui-media-wrap .cherry-remove-image i{width:25px;height:25px;font-size:25px}.cherry-ui-media-wrap .cherry-remove-image:hover{color:#d71e1e}.cherry-ui-media-wrap .cherry-bgsetting{float:left;width:32%;margin-right:1%}.cherry-ui-media-wrap .cherry-bgsetting:nth-child(3n+1){width:34%;margin-right:0}.cherry-ui-media-wrap .cherry-bgsetting select{margin-bottom:10px}.button-default_{position:relative;display:inline-block;font-size:11px;line-height:18px;font-weight:900;text-decoration:none;padding:4px 22px;color:#23282d;text-transform:uppercase;border-radius:4px;border-width:1px;border-style:solid;outline:none;cursor:pointer;transition:all 200ms linear;color:#fff;border-color:#777879 #2f343a #2f343a #777879;background-color:#495159}.button-default_:before{position:absolute;display:block;width:100%;height:100%;top:0;left:0;border-radius:4px;background-image:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);content:''}.button-default_:hover:before{background-image:linear-gradient(0deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%)}.button-default_:active:before{opacity:0}.button-default_:active{background-color:#495159;border-color:#181b1e #777879 #777879 #181b1e}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
@mixin button_base() {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
-
font-size:
|
5 |
line-height: 18px;
|
6 |
font-weight: 900;
|
7 |
-
letter-spacing: 0.5px;
|
8 |
text-decoration: none;
|
9 |
-
padding:
|
10 |
color: $dark_color;
|
11 |
text-transform: uppercase;
|
12 |
border-radius: $border_radius_small;
|
1 |
@mixin button_base() {
|
2 |
position: relative;
|
3 |
display: inline-block;
|
4 |
+
font-size: 11px;
|
5 |
line-height: 18px;
|
6 |
font-weight: 900;
|
|
|
7 |
text-decoration: none;
|
8 |
+
padding: 4px 22px;
|
9 |
color: $dark_color;
|
10 |
text-transform: uppercase;
|
11 |
border-radius: $border_radius_small;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.scss
CHANGED
@@ -16,71 +16,91 @@ label.cherry-label {
|
|
16 |
display: block;
|
17 |
}
|
18 |
.cherry-ui-media-wrap {
|
19 |
-
|
|
|
20 |
display: block;
|
21 |
margin: 0 0 5px 0;
|
|
|
22 |
.cherry-image-wrap {
|
23 |
position: relative;
|
24 |
display: inline-block;
|
25 |
vertical-align: top;
|
26 |
-
width:
|
27 |
-
height:
|
|
|
28 |
.inner {
|
29 |
width: 110px;
|
30 |
height: 110px;
|
31 |
margin: 3px;
|
32 |
position: relative;
|
33 |
-
border:
|
34 |
-
|
35 |
overflow: hidden;
|
|
|
36 |
.preview-holder {
|
37 |
width: 100%;
|
38 |
height: 100%;
|
39 |
position: relative;
|
40 |
background: $bg_color;
|
41 |
box-sizing: border-box;
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
61 |
}
|
|
|
62 |
.title {
|
63 |
position: absolute;
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
bottom: 0;
|
67 |
left: 0;
|
68 |
color: #fff;
|
69 |
-
background:
|
70 |
text-align: center;
|
71 |
font-size: 11px;
|
72 |
overflow: hidden;
|
73 |
}
|
74 |
}
|
|
|
75 |
&:hover {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
.cherry-remove-image {
|
77 |
display: block;
|
78 |
}
|
79 |
}
|
80 |
}
|
|
|
81 |
.cherry-media-thumb-sortable-placeholder {
|
82 |
-
width:
|
83 |
-
height:
|
84 |
margin: 3px;
|
85 |
vertical-align: top;
|
86 |
border: 1px dashed $border_color;
|
@@ -88,30 +108,35 @@ label.cherry-label {
|
|
88 |
background-color: $bg_color;
|
89 |
}
|
90 |
}
|
|
|
91 |
.upload-button {
|
92 |
float: left;
|
93 |
}
|
|
|
94 |
.cherry-remove-image {
|
95 |
-
width:
|
96 |
-
height:
|
97 |
color: $remove_color;
|
98 |
display: block;
|
99 |
position: absolute;
|
100 |
-
top:
|
101 |
-
right:
|
102 |
cursor: pointer;
|
103 |
text-decoration: none;
|
104 |
outline: 0;
|
105 |
display: none;
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
114 |
}
|
|
|
115 |
.cherry-bgsetting {
|
116 |
float: left;
|
117 |
width: 32%;
|
16 |
display: block;
|
17 |
}
|
18 |
.cherry-ui-media-wrap {
|
19 |
+
|
20 |
+
.cherry-upload-preview {
|
21 |
display: block;
|
22 |
margin: 0 0 5px 0;
|
23 |
+
|
24 |
.cherry-image-wrap {
|
25 |
position: relative;
|
26 |
display: inline-block;
|
27 |
vertical-align: top;
|
28 |
+
width: 128px;
|
29 |
+
height: 128px;
|
30 |
+
|
31 |
.inner {
|
32 |
width: 110px;
|
33 |
height: 110px;
|
34 |
margin: 3px;
|
35 |
position: relative;
|
36 |
+
border: 1px solid #d5dadf;
|
37 |
+
padding: 5px;
|
38 |
overflow: hidden;
|
39 |
+
|
40 |
.preview-holder {
|
41 |
width: 100%;
|
42 |
height: 100%;
|
43 |
position: relative;
|
44 |
background: $bg_color;
|
45 |
box-sizing: border-box;
|
46 |
+
|
47 |
+
.centered {
|
48 |
+
position: absolute;
|
49 |
+
width: 100%;
|
50 |
+
height: 100%;
|
51 |
+
top: 0;
|
52 |
+
left: 0;
|
53 |
+
transform: translate(50%,50%);
|
54 |
+
}
|
55 |
+
|
56 |
+
img {
|
57 |
+
max-width: 100%;
|
58 |
+
height: auto;
|
59 |
+
transform: translate(-50%,-50%);
|
60 |
+
}
|
61 |
+
|
62 |
+
span {
|
63 |
+
width: auto;
|
64 |
+
height: auto;
|
65 |
+
font-size: 60px;
|
66 |
+
transform: translate(-50%,-50%);
|
67 |
+
}
|
68 |
}
|
69 |
+
|
70 |
.title {
|
71 |
position: absolute;
|
72 |
+
display: none;
|
73 |
+
width: 100px;
|
74 |
+
padding: 5px;
|
75 |
+
margin: 5px;
|
76 |
bottom: 0;
|
77 |
left: 0;
|
78 |
color: #fff;
|
79 |
+
background: #a4afb7;
|
80 |
text-align: center;
|
81 |
font-size: 11px;
|
82 |
overflow: hidden;
|
83 |
}
|
84 |
}
|
85 |
+
|
86 |
&:hover {
|
87 |
+
.inner {
|
88 |
+
border-color: #d5dadf;
|
89 |
+
}
|
90 |
+
|
91 |
+
.title {
|
92 |
+
display: block;
|
93 |
+
}
|
94 |
+
|
95 |
.cherry-remove-image {
|
96 |
display: block;
|
97 |
}
|
98 |
}
|
99 |
}
|
100 |
+
|
101 |
.cherry-media-thumb-sortable-placeholder {
|
102 |
+
width: 120px;
|
103 |
+
height: 120px;
|
104 |
margin: 3px;
|
105 |
vertical-align: top;
|
106 |
border: 1px dashed $border_color;
|
108 |
background-color: $bg_color;
|
109 |
}
|
110 |
}
|
111 |
+
|
112 |
.upload-button {
|
113 |
float: left;
|
114 |
}
|
115 |
+
|
116 |
.cherry-remove-image {
|
117 |
+
width: 25px;
|
118 |
+
height: 25px;
|
119 |
color: $remove_color;
|
120 |
display: block;
|
121 |
position: absolute;
|
122 |
+
top: 5px;
|
123 |
+
right: 5px;
|
124 |
cursor: pointer;
|
125 |
text-decoration: none;
|
126 |
outline: 0;
|
127 |
display: none;
|
128 |
+
|
129 |
+
i {
|
130 |
+
width: 25px;
|
131 |
+
height: 25px;
|
132 |
+
font-size: 25px;
|
133 |
+
}
|
134 |
+
|
135 |
+
&:hover {
|
136 |
+
color: darken( $remove_color, 10% );
|
137 |
+
}
|
138 |
}
|
139 |
+
|
140 |
.cherry-bgsetting {
|
141 |
float: left;
|
142 |
width: 32%;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/min/ui-radio.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}input.cherry-radio-input{display:none}.cherry-radio-item{margin-bottom:10px}.cherry-radio-item:last-child{margin-bottom:0}.cherry-radio-item label{display:inline-block;font-size:
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}input.cherry-radio-input{display:none}.cherry-radio-item{margin-bottom:10px}.cherry-radio-item:last-child{margin-bottom:0}.cherry-radio-item label{display:inline-block;font-size:12px;line-height:14px;color:#23282d}.cherry-radio-item span.cherry-radio-item{width:16px;height:16px;border-radius:25px;margin-right:10px;cursor:pointer;position:relative;background-color:white;display:inline-block;float:left;box-shadow:1px 1px 6px rgba(0,0,0,0.2)}.cherry-radio-item span.cherry-radio-item i{width:8px;height:8px;background-color:#495159;margin:4px;border-radius:20px;display:inline-block;transform:scale(0);transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1)}.cherry-radio-item .cherry-radio-input:checked+label span i{transform:scale(1)}.cherry-radio-img{float:left;margin:10px 5px 0 5px;text-align:center;max-width:60px;font-size:12px;position:relative}.cherry-radio-img .cherry-lable-content{display:flex;flex-flow:column}.cherry-radio-img label{display:inline-block}.cherry-radio-img img{width:100%;height:auto;margin:0 0 5px 0;pointer-events:none}.cherry-radio-img .cherry-radio-input:checked+label{font-weight:bold}.cherry-radio-img .cherry-radio-input:checked+label .check{display:block}.cherry-radio-img .cherry-radio-input:checked+label img{box-shadow:0 0 0 2px #fffeff,0 0 0 5px #49c66a}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-radio/assets/ui-radio.scss
CHANGED
@@ -17,38 +17,44 @@ input.cherry-radio-input{
|
|
17 |
}
|
18 |
.cherry-radio-item{
|
19 |
margin-bottom: 10px;
|
|
|
20 |
&:last-child{
|
21 |
margin-bottom: 0;
|
22 |
}
|
23 |
-
|
|
|
24 |
display: inline-block;
|
25 |
-
font-size:
|
26 |
-
line-height:
|
27 |
color: $dark_color_1;
|
28 |
}
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
32 |
border-radius: 25px;
|
33 |
margin-right: 10px;
|
34 |
cursor: pointer;
|
35 |
position: relative;
|
36 |
-
background-color:
|
37 |
display: inline-block;
|
38 |
float: left;
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
}
|
50 |
}
|
51 |
-
|
|
|
52 |
.cherry-radio-input:checked{
|
53 |
& + label{
|
54 |
span{
|
@@ -59,15 +65,24 @@ input.cherry-radio-input{
|
|
59 |
}
|
60 |
}
|
61 |
}
|
|
|
62 |
.cherry-radio-img {
|
63 |
float: left;
|
64 |
margin: 10px 5px 0 5px;
|
65 |
text-align: center;
|
66 |
-
max-width:
|
|
|
67 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
label{
|
69 |
display: inline-block;
|
70 |
}
|
|
|
71 |
img {
|
72 |
width: 100%;
|
73 |
height: auto;
|
@@ -83,7 +98,7 @@ input.cherry-radio-input{
|
|
83 |
display: block;
|
84 |
}
|
85 |
img{
|
86 |
-
box-shadow: 0 0 0 2px rgba(255, 254, 255, 1), 0 0 0 5px
|
87 |
}
|
88 |
}
|
89 |
}
|
17 |
}
|
18 |
.cherry-radio-item{
|
19 |
margin-bottom: 10px;
|
20 |
+
|
21 |
&:last-child{
|
22 |
margin-bottom: 0;
|
23 |
}
|
24 |
+
|
25 |
+
label {
|
26 |
display: inline-block;
|
27 |
+
font-size: 12px;
|
28 |
+
line-height: 14px;
|
29 |
color: $dark_color_1;
|
30 |
}
|
31 |
+
|
32 |
+
span.cherry-radio-item {
|
33 |
+
width: 16px;
|
34 |
+
height: 16px;
|
35 |
border-radius: 25px;
|
36 |
margin-right: 10px;
|
37 |
cursor: pointer;
|
38 |
position: relative;
|
39 |
+
background-color: white;
|
40 |
display: inline-block;
|
41 |
float: left;
|
42 |
+
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
|
43 |
+
|
44 |
+
i {
|
45 |
+
width: 8px;
|
46 |
+
height: 8px;
|
47 |
+
background-color: #495159;
|
48 |
+
margin: 4px;
|
49 |
+
border-radius: 20px;
|
50 |
+
display: inline-block;
|
51 |
+
transform: scale(0);
|
52 |
+
transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
53 |
+
}
|
54 |
}
|
55 |
}
|
56 |
+
|
57 |
+
.cherry-radio-item {
|
58 |
.cherry-radio-input:checked{
|
59 |
& + label{
|
60 |
span{
|
65 |
}
|
66 |
}
|
67 |
}
|
68 |
+
|
69 |
.cherry-radio-img {
|
70 |
float: left;
|
71 |
margin: 10px 5px 0 5px;
|
72 |
text-align: center;
|
73 |
+
max-width: 60px;
|
74 |
+
font-size: 12px;
|
75 |
position: relative;
|
76 |
+
|
77 |
+
.cherry-lable-content {
|
78 |
+
display: flex;
|
79 |
+
flex-flow: column;
|
80 |
+
}
|
81 |
+
|
82 |
label{
|
83 |
display: inline-block;
|
84 |
}
|
85 |
+
|
86 |
img {
|
87 |
width: 100%;
|
88 |
height: auto;
|
98 |
display: block;
|
99 |
}
|
100 |
img{
|
101 |
+
box-shadow: 0 0 0 2px rgba(255, 254, 255, 1), 0 0 0 5px #49c66a;
|
102 |
}
|
103 |
}
|
104 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/min/ui-repeater.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t){"use strict";t.utilites.namespace("ui_elements.repeater"),t.ui_elements.repeater={repeaterContainerClass:".cherry-ui-repeater-container",repeaterListClass:".cherry-ui-repeater-list",repeaterItemClass:".cherry-ui-repeater-item",repeaterItemHandleClass:".cherry-ui-repeater-actions-box",repeaterTitleClass:".cherry-ui-repeater-title",addItemButtonClass:".cherry-ui-repeater-add",removeItemButtonClass:".cherry-ui-repeater-remove",toggleItemButtonClass:".cherry-ui-repeater-toggle",minItemClass:"cherry-ui-repeater-min",sortablePlaceholderClass:"sortable-placeholder",init:function(){e(document).on("ready",this.addEvents.bind(this))},addEvents:function(){e("body").on("click",this.addItemButtonClass,{self:this},this.addItem).on("click",this.removeItemButtonClass,{self:this},this.removeItem).on("click",this.toggleItemButtonClass,{self:this},this.toggleItem).on("change",this.repeaterListClass+" input, "+this.repeaterListClass+" textarea, "+this.repeaterListClass+" select",{self:this},this.changeWrapperLable).on("sortable-init",{self:this},this.sortableItem),e(document).on("cherry-ui-elements-init",{self:this},this.sortableItem),this.triggers()},triggers:function(t){return e("body").trigger("sortable-init"),t&&e(document).trigger("cherry-ui-elements-init",{target:t}),this},addItem:function(t){var
|
1 |
+
!function(e,t){"use strict";t.utilites.namespace("ui_elements.repeater"),t.ui_elements.repeater={repeaterContainerClass:".cherry-ui-repeater-container",repeaterListClass:".cherry-ui-repeater-list",repeaterItemClass:".cherry-ui-repeater-item",repeaterItemHandleClass:".cherry-ui-repeater-actions-box",repeaterTitleClass:".cherry-ui-repeater-title",addItemButtonClass:".cherry-ui-repeater-add",removeItemButtonClass:".cherry-ui-repeater-remove",toggleItemButtonClass:".cherry-ui-repeater-toggle",minItemClass:"cherry-ui-repeater-min",sortablePlaceholderClass:"sortable-placeholder",init:function(){e(document).on("ready",this.addEvents.bind(this))},addEvents:function(){e("body").on("click",this.addItemButtonClass,{self:this},this.addItem).on("click",this.removeItemButtonClass,{self:this},this.removeItem).on("click",this.toggleItemButtonClass,{self:this},this.toggleItem).on("change",this.repeaterListClass+" input, "+this.repeaterListClass+" textarea, "+this.repeaterListClass+" select",{self:this},this.changeWrapperLable).on("sortable-init",{self:this},this.sortableItem),e(document).on("cherry-ui-elements-init",{self:this},this.sortableItem),this.triggers()},triggers:function(t){return e("body").trigger("sortable-init"),t&&e(document).trigger("cherry-ui-elements-init",{target:t}),this},addItem:function(t){var r=t.data.self,a=e(this).prev(r.repeaterListClass),s=a.data("index"),i=a.data("name"),n=wp.template(i),l=a.data("widget-id"),o={index:s};(l="__i__"!==l?l:a.attr("id"))&&(o.widgetId=l),a.append(n(o)),s++,a.data("index",s),r.triggers(e(r.repeaterItemClass+":last",a)).stopDefaultEvent(t)},removeItem:function(t){var r=t.data.self,a=e(this).closest(r.repeaterListClass);r.applyChanges(a),e(this).closest(r.repeaterItemClass).remove(),r.triggers().stopDefaultEvent(t)},toggleItem:function(t){var r=t.data.self;e(this).closest(r.repeaterItemClass).toggleClass(r.minItemClass),r.stopDefaultEvent(t)},sortableItem:function(t){var r,a,s=t.data.self;e(s.repeaterListClass).each(function(t,i){r=e(i),(a=e(i).data("sortable-init"))?r.sortable("refresh"):r.sortable({items:s.repeaterItemClass,handle:s.repeaterItemHandleClass,cursor:"move",scrollSensitivity:40,forcePlaceholderSize:!0,forceHelperSize:!1,distance:2,tolerance:"pointer",helper:function(e,t){return t.clone().find(":input").attr("name",function(e,t){return"sort_"+parseInt(1e5*Math.random(),10).toString()+"_"+t}).end()},opacity:.65,placeholder:s.sortablePlaceholderClass,create:function(){r.data("sortable-init",!0)},update:function(t){var r=e(t.target);s.applyChanges(r)}})})},changeWrapperLable:function(t){var r,a,s=t.data.self,i=e(s.repeaterListClass).data("title-field"),n=e(this);i&&n.closest("."+i+"-wrap")[0]&&(r=n.val(),a=n.closest(s.repeaterItemClass),e(s.repeaterTitleClass,a).html(r)),s.stopDefaultEvent(t)},applyChanges:function(t){return void 0!==wp.customize&&e("input[name]:first, select[name]:first",t).change(),this},stopDefaultEvent:function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),this}},t.ui_elements.repeater.init()}(jQuery,window.CherryJsCore);
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-repeater/assets/ui-repeater.js
CHANGED
@@ -118,7 +118,16 @@
|
|
118 |
scrollSensitivity: 40,
|
119 |
forcePlaceholderSize: true,
|
120 |
forceHelperSize: false,
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
opacity: 0.65,
|
123 |
placeholder: self.sortablePlaceholderClass,
|
124 |
create: function() {
|
118 |
scrollSensitivity: 40,
|
119 |
forcePlaceholderSize: true,
|
120 |
forceHelperSize: false,
|
121 |
+
distance: 2,
|
122 |
+
tolerance: 'pointer',
|
123 |
+
helper: function( event, element ) {
|
124 |
+
return element.clone()
|
125 |
+
.find( ':input' )
|
126 |
+
.attr( 'name', function( i, currentName ) {
|
127 |
+
return 'sort_' + parseInt( Math.random() * 100000, 10 ).toString() + '_' + currentName;
|
128 |
+
} )
|
129 |
+
.end();
|
130 |
+
},
|
131 |
opacity: 0.65,
|
132 |
placeholder: self.sortablePlaceholderClass,
|
133 |
create: function() {
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/min/ui-select.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both
|
1 |
+
.cherry-lock-element{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:no-drop;position:relative;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{-webkit-animation-name:lock_show;animation-name:lock_show;-webkit-animation-duration:450ms;animation-duration:450ms;-webkit-animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1);animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;-webkit-animation-name:lock_hide;animation-name:lock_hide;-webkit-animation-duration:200ms;animation-duration:200ms;-webkit-animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-transform-origin:0% 0%;-ms-transform-origin:0% 0%;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@-webkit-keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@-webkit-keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}@keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}select.cherry-ui-select{width:100%;outline:0 none;font-size:12px;line-height:16px;border-radius:3px;padding:3px 5px;min-height:28px;border:1px solid #d5dadf;box-shadow:none}select.cherry-ui-select:focus{border-color:#9ba7b3;box-shadow:none}select.cherry-ui-select:focus{box-shadow:none}select.select2-hidden-accessible{display:none}.cherry-ui-select-wrapper .select2{color:#ddd;background-color:white;border-radius:3px;border:1px solid #d5dadf}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--single{background-color:transparent;border:none;border-radius:3px;height:28px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--single .select2-selection__rendered{padding:5px;font-size:12px;line-height:18px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--single .select2-selection__arrow{height:24px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple{background-color:transparent;border:none;border-radius:3px;min-height:26px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered{font-size:12px;line-height:14px;padding:0;display:block}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered:focus{outline:none}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice{line-height:14px;margin:2px;border:none;background-color:#e4e4e4;border-radius:3px;color:#5e5e5e;padding:4px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove{color:#f6121c;margin-right:5px;font-size:14px}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search{margin:0}.cherry-ui-select-wrapper .select2 .selection .select2-selection.select2-selection--multiple .select2-selection__rendered .select2-search .select2-search__field{padding:0;border:none;box-shadow:none;line-height:20px}.cherry-ui-select-wrapper .select2-container .select2-dropdown{background-color:white;border:1px solid #d5dadf;border-radius:3px;box-shadow:0px 5px 21px rgba(0,0,0,0.1);margin-top:1px;z-index:500001}.cherry-ui-select-wrapper .select2-container .select2-dropdown .select2-search__field{border:1px solid #d5dadf;box-shadow:none;border-radius:3px;margin:0;height:25px}.cherry-ui-select-wrapper .select2-container .select2-dropdown .select2-search__field:focus{outline:none}.cherry-ui-select-wrapper .select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option[aria-selected=true]{color:#5e5e5e;background-color:#ddd}.cherry-ui-select-wrapper .select2-container .select2-dropdown .select2-results .select2-results__options .select2-results__option--highlighted{color:#fff;background-color:#48c569}.cherry-ui-select-wrapper .select2-container .select2-dropdown .select2-results .select2-results__options .li[aria-disabled=true]{display:none}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,15 +1,14 @@
|
|
1 |
@mixin input() {
|
2 |
-
font-size:
|
3 |
-
line-height:
|
4 |
-
color: $dark_color;
|
5 |
-
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
-
padding:
|
8 |
-
min-height:
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
}
|
1 |
@mixin input() {
|
2 |
+
font-size: 12px;
|
3 |
+
line-height: 16px;
|
|
|
|
|
4 |
border-radius: $border_radius_extra_small;
|
5 |
+
padding: 3px 5px;
|
6 |
+
min-height: 28px;
|
7 |
border: 1px solid $border_color;
|
8 |
box-shadow: none;
|
9 |
+
|
10 |
+
&:focus{
|
11 |
+
border-color: darken( $border_color, 20% );
|
12 |
+
box-shadow: none;
|
13 |
+
}
|
14 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-kit/_variables.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
$light_color: #ffffff;
|
2 |
-
$dark_color: #
|
3 |
|
4 |
$bg_color: #f1f1f1;
|
5 |
$bg_color_2: #e5e5e5;
|
6 |
-
$border_color: #
|
7 |
|
8 |
-
$remove_color: #
|
9 |
-
$primary_color: #
|
10 |
|
11 |
-
$border_radius_extra_small:
|
1 |
$light_color: #ffffff;
|
2 |
+
$dark_color: #dddddd;
|
3 |
|
4 |
$bg_color: #f1f1f1;
|
5 |
$bg_color_2: #e5e5e5;
|
6 |
+
$border_color: #d5dadf;
|
7 |
|
8 |
+
$remove_color: #f6121c;
|
9 |
+
$primary_color: #48c569;
|
10 |
|
11 |
+
$border_radius_extra_small: 3px;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-select/assets/ui-select.scss
CHANGED
@@ -15,112 +15,133 @@ label.cherry-label{
|
|
15 |
select.cherry-ui-select{
|
16 |
width: 100%;
|
17 |
outline: 0 none;
|
18 |
-
color: $dark_color;
|
19 |
@include input();
|
|
|
20 |
&:focus{
|
21 |
-
border-color: none;
|
22 |
box-shadow: none;
|
23 |
}
|
24 |
|
25 |
}
|
|
|
26 |
select.select2-hidden-accessible{
|
27 |
display: none;
|
28 |
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
}
|
50 |
-
&.select2-selection--multiple{
|
51 |
-
background-color: transparent;
|
52 |
-
border: none;
|
53 |
-
border-radius: $border_radius_extra_small;
|
54 |
-
.select2-selection__rendered{
|
55 |
-
font-size: 14px;
|
56 |
-
line-height: 20px;
|
57 |
-
padding: 0;
|
58 |
-
display: block;
|
59 |
-
.select2-selection__choice{
|
60 |
-
line-height: 20px;
|
61 |
-
margin: 5px;
|
62 |
-
border: none;
|
63 |
-
background-color: $dark_color;
|
64 |
-
border-radius: $border_radius_extra_small;
|
65 |
-
color: #fff;
|
66 |
-
padding: 10px;
|
67 |
-
.select2-selection__choice__remove{
|
68 |
-
color: $remove_color;
|
69 |
-
margin-right: 10px;
|
70 |
-
}
|
71 |
}
|
72 |
-
.select2-selection__clear{
|
73 |
|
|
|
|
|
74 |
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
border: none;
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
}
|
85 |
}
|
86 |
}
|
87 |
}
|
88 |
}
|
89 |
-
|
90 |
-
.select2-
|
91 |
-
|
92 |
-
|
93 |
-
border: none;
|
94 |
-
border-radius: $border_radius_extra_small;
|
95 |
-
margin: 5px 0;
|
96 |
-
box-shadow: 0px 5px 21px rgba(0,0,0,0.1);
|
97 |
-
z-index: 500001;
|
98 |
-
&.select2-container--open, &.select2-dropdown--below{}
|
99 |
-
.select2-search__field{
|
100 |
-
border: none;
|
101 |
-
box-shadow: none;
|
102 |
border-radius: $border_radius_extra_small;
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
-
}
|
108 |
-
.select2-results{
|
109 |
-
.select2-results__options{
|
110 |
-
.select2-results__option{
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
}
|
120 |
}
|
121 |
-
.li[aria-disabled=true]{
|
122 |
-
display: none;
|
123 |
-
}
|
124 |
}
|
125 |
}
|
126 |
}
|
15 |
select.cherry-ui-select{
|
16 |
width: 100%;
|
17 |
outline: 0 none;
|
|
|
18 |
@include input();
|
19 |
+
|
20 |
&:focus{
|
|
|
21 |
box-shadow: none;
|
22 |
}
|
23 |
|
24 |
}
|
25 |
+
|
26 |
select.select2-hidden-accessible{
|
27 |
display: none;
|
28 |
}
|
29 |
+
|
30 |
+
.cherry-ui-select-wrapper {
|
31 |
+
.select2{
|
32 |
+
color: $dark_color;
|
33 |
+
background-color: white;
|
34 |
+
border-radius: $border_radius_extra_small;
|
35 |
+
border: 1px solid $border_color;
|
36 |
+
|
37 |
+
.selection{
|
38 |
+
.select2-selection{
|
39 |
+
&.select2-selection--single{
|
40 |
+
background-color: transparent;
|
41 |
+
border: none;
|
42 |
+
border-radius: $border_radius_extra_small;
|
43 |
+
height: 28px;
|
44 |
+
|
45 |
+
.select2-selection__rendered{
|
46 |
+
padding: 5px;
|
47 |
+
font-size: 12px;
|
48 |
+
line-height: 18px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
|
|
50 |
|
51 |
+
.select2-selection__arrow{
|
52 |
+
height: 24px;
|
53 |
}
|
54 |
+
}
|
55 |
+
&.select2-selection--multiple{
|
56 |
+
background-color: transparent;
|
57 |
+
border: none;
|
58 |
+
border-radius: $border_radius_extra_small;
|
59 |
+
min-height: 26px;
|
60 |
+
|
61 |
+
.select2-selection__rendered{
|
62 |
+
font-size: 12px;
|
63 |
+
line-height: 14px;
|
64 |
+
padding: 0;
|
65 |
+
display: block;
|
66 |
+
|
67 |
+
&:focus {
|
68 |
+
outline: none;
|
69 |
+
}
|
70 |
+
|
71 |
+
.select2-selection__choice{
|
72 |
+
line-height: 14px;
|
73 |
+
margin: 2px;
|
74 |
border: none;
|
75 |
+
background-color: #e4e4e4;
|
76 |
+
border-radius: $border_radius_extra_small;
|
77 |
+
color: darken( $dark_color, 50% );
|
78 |
+
padding: 4px;
|
79 |
+
|
80 |
+
.select2-selection__choice__remove{
|
81 |
+
color: $remove_color;
|
82 |
+
margin-right: 5px;
|
83 |
+
font-size: 14px;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
.select2-selection__clear{
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
.select2-search{
|
92 |
+
margin: 0;
|
93 |
+
.select2-search__field{
|
94 |
+
padding: 0;
|
95 |
+
border: none;
|
96 |
+
box-shadow: none;
|
97 |
+
line-height: 20px;
|
98 |
+
}
|
99 |
}
|
100 |
}
|
101 |
}
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
+
.select2-container{
|
106 |
+
.select2-dropdown{
|
107 |
+
background-color: white;
|
108 |
+
border: 1px solid $border_color;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
border-radius: $border_radius_extra_small;
|
110 |
+
box-shadow: 0px 5px 21px rgba(0,0,0,0.1);
|
111 |
+
margin-top: 1px;
|
112 |
+
z-index: 500001;
|
113 |
+
|
114 |
+
.select2-search__field{
|
115 |
+
border: 1px solid $border_color;
|
116 |
+
box-shadow: none;
|
117 |
+
border-radius: $border_radius_extra_small;
|
118 |
+
margin: 0;
|
119 |
+
height: 25px;
|
120 |
+
|
121 |
+
&:focus{
|
122 |
+
outline: none;
|
123 |
+
}
|
124 |
}
|
|
|
|
|
|
|
|
|
125 |
|
126 |
+
.select2-results {
|
127 |
+
.select2-results__options{
|
128 |
+
.select2-results__option{
|
129 |
+
|
130 |
+
&[aria-selected=true]{
|
131 |
+
color: darken( $dark_color, 50% );
|
132 |
+
background-color: $dark_color;
|
133 |
+
}
|
134 |
+
|
135 |
+
&--highlighted{
|
136 |
+
color: #fff;
|
137 |
+
background-color: $primary_color;
|
138 |
+
}
|
139 |
}
|
140 |
+
|
141 |
+
.li[aria-disabled=true]{
|
142 |
+
display: none;
|
143 |
}
|
144 |
}
|
|
|
|
|
|
|
145 |
}
|
146 |
}
|
147 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/min/ui-slider.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}.cherry-ui-container .cherry-ui-container{margin:0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-slider-wrap{display:flex;flex-wrap:wrap}.cherry-slider-wrap .cherry-slider-input{flex:0 1 10%;min-width:100px;max-width:200px}.cherry-slider-wrap .cherry-slider-holder{flex:0 1 90%;min-width:200px;max-width:300px;margin-right:10px}.cherry-slider-wrap .cherry-slider-holder input[type=range]{-webkit-appearance:none;width:100%;margin:10px 0}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus{outline:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-runnable-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#a4afb7;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-webkit-slider-thumb{box-shadow:1px 1px 6px rgba(0,0,0,0.3);height:16px;width:16px;margin-top:-6px;border-radius:15px;background:white;cursor:pointer;-webkit-appearance:none;transition:all 250ms cubic-bezier(0.645, 0.045, 0.355, 1)}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-webkit-slider-runnable-track{background:#a4afb7}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-track{width:100%;height:5px;cursor:pointer;box-shadow:none;background:#a4afb7;border-radius:25px;border:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-moz-range-thumb{box-shadow:none;border:none;height:16px;width:16px;border-radius:15px;background:#a4afb7;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-track{width:100%;height:10px;cursor:pointer;background:#f1f1f1;border-color:transparent;color:transparent}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-lower{background:#f1f1f1;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-fill-upper{background:#48c569;border:none;border-radius:50px;box-shadow:none}.cherry-slider-wrap .cherry-slider-holder input[type=range]::-ms-thumb{box-shadow:none;border:none;height:10px;width:10px;border-radius:15px;background:#495159;cursor:pointer}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-lower{background:#f1f1f1}.cherry-slider-wrap .cherry-slider-holder input[type=range]:focus::-ms-fill-upper{background:#48c569}.cherry-slider-wrap .cherry-input{margin:0;width:100%}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-slider/assets/ui-slider.scss
CHANGED
@@ -18,23 +18,26 @@ label.cherry-label{
|
|
18 |
margin: 0 0 5px 0;
|
19 |
display: block;
|
20 |
}
|
|
|
21 |
.cherry-slider-wrap{
|
22 |
display: flex;
|
23 |
flex-wrap: wrap;
|
|
|
24 |
.cherry-slider-input{
|
25 |
flex: 0 1 10%;
|
26 |
min-width: 100px;
|
27 |
max-width: 200px;
|
28 |
}
|
|
|
29 |
.cherry-slider-holder{
|
30 |
flex: 0 1 90%;
|
31 |
min-width: 200px;
|
32 |
max-width: 300px;
|
33 |
-
margin-right:
|
34 |
input[type=range] {
|
35 |
-webkit-appearance: none;
|
36 |
width: 100%;
|
37 |
-
margin:
|
38 |
}
|
39 |
input[type=range]:focus {
|
40 |
outline: none;
|
@@ -44,53 +47,40 @@ label.cherry-label{
|
|
44 |
height: 5px;
|
45 |
cursor: pointer;
|
46 |
box-shadow: none;
|
47 |
-
background:
|
48 |
border-radius: 25px;
|
49 |
border: none;
|
50 |
}
|
51 |
input[type=range]::-webkit-slider-thumb {
|
52 |
-
box-shadow:
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
margin-top: -7px;
|
57 |
border-radius: 15px;
|
58 |
-
background:
|
59 |
cursor: pointer;
|
60 |
-webkit-appearance: none;
|
61 |
transition: all 250ms cubic-bezier(0.645, 0.045, 0.355, 1);
|
62 |
}
|
63 |
-
input[type=range]:focus::-webkit-slider-thumb {
|
64 |
-
background: $grey_color_3;
|
65 |
-
height: 28px;
|
66 |
-
width: 28px;
|
67 |
-
margin-top: -11.5px;
|
68 |
-
}
|
69 |
-
input[type=range]:hover::-webkit-slider-thumb {
|
70 |
-
background: $grey_color_3;
|
71 |
-
height: 28px;
|
72 |
-
width: 28px;
|
73 |
-
margin-top: -11.5px;
|
74 |
-
}
|
75 |
input[type=range]:focus::-webkit-slider-runnable-track {
|
76 |
-
background:
|
77 |
}
|
78 |
input[type=range]::-moz-range-track {
|
79 |
width: 100%;
|
80 |
height: 5px;
|
81 |
cursor: pointer;
|
82 |
box-shadow: none;
|
83 |
-
background:
|
84 |
border-radius: 25px;
|
85 |
border: none;
|
86 |
}
|
87 |
input[type=range]::-moz-range-thumb {
|
88 |
box-shadow: none;
|
89 |
border: none;
|
90 |
-
height:
|
91 |
-
width:
|
92 |
border-radius: 15px;
|
93 |
-
background:
|
94 |
cursor: pointer;
|
95 |
}
|
96 |
input[type=range]::-ms-track {
|
18 |
margin: 0 0 5px 0;
|
19 |
display: block;
|
20 |
}
|
21 |
+
|
22 |
.cherry-slider-wrap{
|
23 |
display: flex;
|
24 |
flex-wrap: wrap;
|
25 |
+
|
26 |
.cherry-slider-input{
|
27 |
flex: 0 1 10%;
|
28 |
min-width: 100px;
|
29 |
max-width: 200px;
|
30 |
}
|
31 |
+
|
32 |
.cherry-slider-holder{
|
33 |
flex: 0 1 90%;
|
34 |
min-width: 200px;
|
35 |
max-width: 300px;
|
36 |
+
margin-right: 10px;
|
37 |
input[type=range] {
|
38 |
-webkit-appearance: none;
|
39 |
width: 100%;
|
40 |
+
margin: 10px 0;
|
41 |
}
|
42 |
input[type=range]:focus {
|
43 |
outline: none;
|
47 |
height: 5px;
|
48 |
cursor: pointer;
|
49 |
box-shadow: none;
|
50 |
+
background: #a4afb7;
|
51 |
border-radius: 25px;
|
52 |
border: none;
|
53 |
}
|
54 |
input[type=range]::-webkit-slider-thumb {
|
55 |
+
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
|
56 |
+
height: 16px;
|
57 |
+
width: 16px;
|
58 |
+
margin-top: -6px;
|
|
|
59 |
border-radius: 15px;
|
60 |
+
background: white;
|
61 |
cursor: pointer;
|
62 |
-webkit-appearance: none;
|
63 |
transition: all 250ms cubic-bezier(0.645, 0.045, 0.355, 1);
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
input[type=range]:focus::-webkit-slider-runnable-track {
|
66 |
+
background: #a4afb7;
|
67 |
}
|
68 |
input[type=range]::-moz-range-track {
|
69 |
width: 100%;
|
70 |
height: 5px;
|
71 |
cursor: pointer;
|
72 |
box-shadow: none;
|
73 |
+
background: #a4afb7;
|
74 |
border-radius: 25px;
|
75 |
border: none;
|
76 |
}
|
77 |
input[type=range]::-moz-range-thumb {
|
78 |
box-shadow: none;
|
79 |
border: none;
|
80 |
+
height: 16px;
|
81 |
+
width: 16px;
|
82 |
border-radius: 15px;
|
83 |
+
background: #a4afb7;
|
84 |
cursor: pointer;
|
85 |
}
|
86 |
input[type=range]::-ms-track {
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/min/ui-stepper.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.cherry-ui-stepper{position:relative;max-width:100px}.cherry-ui-stepper input[type=number]{font-size:12px;line-height:16px;color:#495157;background-color:#fff;border-radius:3px;padding:5px;min-height:28px;border:1px solid #d5dadf;box-shadow:none}.cherry-ui-stepper input[type=number]:focus{border-color:#9ba7b3;box-shadow:none}.cherry-ui-stepper-input{min-width:70px;max-width:70px;text-align:left}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
@mixin input() {
|
2 |
-
font-size:
|
3 |
-
line-height:
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
-
padding:
|
8 |
-
min-height:
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
}
|
1 |
@mixin input() {
|
2 |
+
font-size: 12px;
|
3 |
+
line-height: 16px;
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
+
padding: 5px;
|
8 |
+
min-height: 28px;
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
+
|
12 |
+
&:focus{
|
13 |
+
border-color: darken( $border_color, 20% );
|
14 |
+
box-shadow: none;
|
15 |
+
}
|
16 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-kit/_variables.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
$light_color: #ffffff;
|
2 |
-
$dark_color: #
|
3 |
|
4 |
-
$bg_color:
|
5 |
-
$border_color: #
|
6 |
|
7 |
-
$border_radius_extra_small:
|
1 |
$light_color: #ffffff;
|
2 |
+
$dark_color: #495157;
|
3 |
|
4 |
+
$bg_color: white;
|
5 |
+
$border_color: #d5dadf;
|
6 |
|
7 |
+
$border_radius_extra_small: 3px;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-stepper/assets/ui-stepper.scss
CHANGED
@@ -24,7 +24,7 @@ label.cherry-label{
|
|
24 |
|
25 |
}
|
26 |
.cherry-ui-stepper-input{
|
27 |
-
min-width:
|
28 |
-
max-width:
|
29 |
-
text-align:
|
30 |
}
|
24 |
|
25 |
}
|
26 |
.cherry-ui-stepper-input{
|
27 |
+
min-width: 70px;
|
28 |
+
max-width: 70px;
|
29 |
+
text-align: left;
|
30 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/min/ui-switcher.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-switcher-wrap{height:
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}.hide{display:none !important}.cherry-switcher-wrap{height:20px;border-radius:25px;display:inline-block;overflow:hidden;position:relative;cursor:pointer;user-select:none;background-color:white}.cherry-switcher-wrap:after{display:block;position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:inset 0 1px 2px rgba(0,0,0,0.12),inset 0 0 2px rgba(0,0,0,0.15);pointer-events:none;border-radius:25px;content:''}.cherry-switcher-wrap label{display:block;float:left;background-color:#eceeef;transition:all 0.4s ease}.cherry-switcher-wrap label span{font-size:7px;line-height:12px;text-transform:uppercase;color:#a4afb7;text-align:center;display:block;opacity:1;transition:all 0.4s ease}.cherry-switcher-wrap .sw-enable{padding:4px 4px 4px 12px}.cherry-switcher-wrap .sw-enable span{opacity:0}.cherry-switcher-wrap .sw-disable{padding:4px 12px 4px 4px}.cherry-switcher-wrap .sw-disable span{opacity:1}.cherry-switcher-wrap .state-marker{background-color:white;display:block;position:absolute;width:18px;height:18px;margin:1px;top:0;left:0;border-radius:50%;transition:all 0.4s cubic-bezier(0.77, 0, 0.175, 1);box-sizing:border-box}.cherry-switcher-wrap .cherry-input-switcher{display:none}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-enable{background-color:#49c66a}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-enable span{opacity:1;color:white;text-shadow:0 1px rgba(0,0,0,0.2)}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-disable{background-color:#49c66a}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .sw-disable span{opacity:0}.cherry-switcher-wrap .cherry-input-switcher-true:checked ~ .state-marker{left:100%;margin-left:-19px}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-kit/_mixins.scss
DELETED
@@ -1,182 +0,0 @@
|
|
1 |
-
@mixin button_base() {
|
2 |
-
display: inline-block;
|
3 |
-
text-decoration: none;
|
4 |
-
font-size: 12px;
|
5 |
-
line-height: 20px;
|
6 |
-
font-weight: bold;
|
7 |
-
padding: 15px 20px;
|
8 |
-
color: #fff;
|
9 |
-
text-transform: uppercase;
|
10 |
-
border-radius: $border_radius_small;
|
11 |
-
transition: all 200ms linear;
|
12 |
-
box-shadow: $box_shadow;
|
13 |
-
&:hover {
|
14 |
-
color: #fff;
|
15 |
-
box-shadow: none;
|
16 |
-
}
|
17 |
-
&:focus,
|
18 |
-
&:active {
|
19 |
-
outline: none;
|
20 |
-
box-shadow: none;
|
21 |
-
color: #fff;
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
@mixin button_normal() {
|
26 |
-
background: $dark_color_2;
|
27 |
-
&:hover {
|
28 |
-
background: $dark_color_2_h;
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
@mixin button_primary() {
|
33 |
-
background: $blue_color;
|
34 |
-
&:hover {
|
35 |
-
background: $blue_color_h;
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
@mixin button_success() {
|
40 |
-
background: $green_color;
|
41 |
-
&:hover {
|
42 |
-
background: $green_color_h;
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
@mixin button_danger() {
|
47 |
-
background: $red_color;
|
48 |
-
&:hover {
|
49 |
-
background: $red_color_h;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
@mixin button_warning() {
|
54 |
-
background: $orange_color;
|
55 |
-
&:hover {
|
56 |
-
background: $orange_color_h;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
@mixin input() {
|
61 |
-
font-size: 14px;
|
62 |
-
line-height: 20px;
|
63 |
-
color: $dark_color_1;
|
64 |
-
background-color: $grey_color_3;
|
65 |
-
border-radius: $border_radius_extra_small;
|
66 |
-
padding: 10px 20px;
|
67 |
-
height: 50px;
|
68 |
-
border: 1px solid $grey_color_3;
|
69 |
-
box-shadow: none;
|
70 |
-
&:focus{
|
71 |
-
border-color: rgba(72,197,105,.6);
|
72 |
-
box-shadow: 0 0 2px rgba(72,197,105,.6);
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
@mixin button_icon( $icon ) {
|
77 |
-
content: $icon;
|
78 |
-
display: inline-block;
|
79 |
-
font-family: dashicons;
|
80 |
-
font-size: 16px;
|
81 |
-
font-style: normal;
|
82 |
-
font-weight: 400;
|
83 |
-
height: 18px;
|
84 |
-
line-height: 18px;
|
85 |
-
text-align: center;
|
86 |
-
text-decoration: inherit;
|
87 |
-
transition: all 200ms linear;
|
88 |
-
vertical-align: middle;
|
89 |
-
}
|
90 |
-
|
91 |
-
@mixin button_icon_before( $icon ) {
|
92 |
-
&:before {
|
93 |
-
@include button_icon( $icon );
|
94 |
-
padding: 0 5px 0 0;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
@mixin button_icon_after( $icon ) {
|
99 |
-
&:after {
|
100 |
-
@include button_icon( $icon );
|
101 |
-
padding: 0 0 0 5px;
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
@mixin button_icon_middle( $icon ) {
|
106 |
-
&:before {
|
107 |
-
@include button_icon( $icon );
|
108 |
-
margin: 0 -5px;
|
109 |
-
}
|
110 |
-
}
|
111 |
-
|
112 |
-
@mixin link() {
|
113 |
-
display: inline-block;
|
114 |
-
text-decoration: none;
|
115 |
-
font-size: 12px;
|
116 |
-
line-height: 20px;
|
117 |
-
font-weight: bold;
|
118 |
-
color: $blue_color;
|
119 |
-
text-transform: uppercase;
|
120 |
-
transition: all 200ms linear;
|
121 |
-
&:hover {
|
122 |
-
color: $dark_color_1;
|
123 |
-
box-shadow: none;
|
124 |
-
}
|
125 |
-
&:focus,
|
126 |
-
&:active {
|
127 |
-
outline: none;
|
128 |
-
box-shadow: none;
|
129 |
-
color: $blue_color;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
@mixin link_icon_before( $icon ) {
|
134 |
-
&:before {
|
135 |
-
@include button_icon( $icon );
|
136 |
-
padding: 0 5px 0 0;
|
137 |
-
color: $grey_color_4;
|
138 |
-
}
|
139 |
-
&:hover {
|
140 |
-
&:before {
|
141 |
-
color: $blue_color;
|
142 |
-
}
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
@mixin container() {
|
147 |
-
padding: 30px;
|
148 |
-
border: 2px solid $grey_color_2;
|
149 |
-
background: $grey_color_3;
|
150 |
-
border-radius: $border_radius_large;
|
151 |
-
}
|
152 |
-
|
153 |
-
@mixin container_heading() {
|
154 |
-
margin: -30px -30px 30px -30px;
|
155 |
-
border-radius: $border_radius_large $border_radius_large 0 0;
|
156 |
-
border-bottom: 1px solid $grey_color_2;
|
157 |
-
padding: 20px 30px;
|
158 |
-
font-weight: bold;
|
159 |
-
font-size: 16px;
|
160 |
-
line-height: 18px;
|
161 |
-
text-align: center;
|
162 |
-
background: #fff;
|
163 |
-
}
|
164 |
-
|
165 |
-
@mixin box() {
|
166 |
-
margin: 0 0 30px;
|
167 |
-
padding: 20px;
|
168 |
-
background: #fff;
|
169 |
-
box-shadow: $box_shadow_box;
|
170 |
-
border-radius: $border_radius;
|
171 |
-
}
|
172 |
-
|
173 |
-
@mixin box_heading() {
|
174 |
-
margin: -20px -20px 20px -20px;
|
175 |
-
border-radius: $border_radius_small $border_radius_small 0 0;
|
176 |
-
border-bottom: 1px solid $grey_color_2;
|
177 |
-
padding: 20px 30px;
|
178 |
-
font-weight: bold;
|
179 |
-
font-size: 16px;
|
180 |
-
line-height: 18px;
|
181 |
-
background: #fff;
|
182 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-switcher/assets/ui-switcher.scss
CHANGED
@@ -12,113 +12,98 @@ label.cherry-label{
|
|
12 |
display: none !important;
|
13 |
}
|
14 |
.cherry-switcher-wrap{
|
15 |
-
height:
|
16 |
border-radius: 25px;
|
17 |
display: inline-block;
|
18 |
overflow: hidden;
|
19 |
position: relative;
|
20 |
cursor: pointer;
|
21 |
user-select: none;
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
label{
|
24 |
-
background-color: $switcher_bg_color;
|
25 |
display: block;
|
26 |
float: left;
|
|
|
27 |
transition: all 0.4s ease;
|
|
|
28 |
span{
|
29 |
-
font-size:
|
30 |
-
line-height:
|
31 |
-
font-weight: 900;
|
32 |
text-transform: uppercase;
|
33 |
-
color:
|
34 |
text-align: center;
|
35 |
display: block;
|
36 |
opacity: 1;
|
37 |
transition: all 0.4s ease;
|
38 |
}
|
39 |
}
|
|
|
40 |
.sw-enable{
|
41 |
-
padding:
|
42 |
span{
|
43 |
opacity: 0;
|
44 |
}
|
45 |
}
|
|
|
46 |
.sw-disable{
|
47 |
-
padding:
|
48 |
span{
|
49 |
opacity: 1;
|
50 |
}
|
51 |
}
|
|
|
52 |
.state-marker{
|
53 |
-
background-color:
|
54 |
display: block;
|
55 |
position: absolute;
|
56 |
-
width:
|
57 |
-
height:
|
58 |
-
margin:
|
59 |
top: 0;
|
60 |
left: 0;
|
61 |
-
|
62 |
-
border-radius: 25px;
|
63 |
-
border-style: solid;
|
64 |
-
border-width: 1px;
|
65 |
-
border-color: $false_state_outset_1 $false_state_outset_2 $false_state_outset_2 $false_state_outset_1;
|
66 |
transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
67 |
box-sizing: border-box;
|
68 |
-
&:before {
|
69 |
-
position: absolute;
|
70 |
-
display: block;
|
71 |
-
width: 100%;
|
72 |
-
height: 100%;
|
73 |
-
top: 0;
|
74 |
-
left: 0;
|
75 |
-
border-radius: 50%;
|
76 |
-
background-image: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
|
77 |
-
content: '';
|
78 |
-
}
|
79 |
}
|
80 |
.cherry-input-switcher{
|
81 |
display: none;
|
82 |
}
|
83 |
.cherry-input-switcher-true:checked{
|
|
|
|
|
84 |
~ .sw-enable{
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
~ .sw-disable{
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
93 |
}
|
94 |
~ .state-marker{
|
95 |
left: 100%;
|
96 |
-
margin-left: -
|
97 |
-
border-color: $true_state_outset_1 $true_state_outset_2 $true_state_outset_2 $true_state_outset_1;
|
98 |
-
background-color: $true_state_gradint_2;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
&.size-small{
|
103 |
-
height: 23px;
|
104 |
-
label{
|
105 |
-
height: 23px;
|
106 |
-
padding: 0;
|
107 |
-
span{
|
108 |
-
font-size: 10px;
|
109 |
-
line-height: 15px;
|
110 |
-
padding: 5px;
|
111 |
-
}
|
112 |
-
}
|
113 |
-
.state-marker{
|
114 |
-
width: 17px;
|
115 |
-
height: 17px;
|
116 |
-
margin-left: 4px;
|
117 |
-
}
|
118 |
-
.cherry-input-switcher-true:checked{
|
119 |
-
~ .state-marker{
|
120 |
-
margin-left: -22px;
|
121 |
-
}
|
122 |
}
|
123 |
}
|
124 |
}
|
12 |
display: none !important;
|
13 |
}
|
14 |
.cherry-switcher-wrap{
|
15 |
+
height: 20px;
|
16 |
border-radius: 25px;
|
17 |
display: inline-block;
|
18 |
overflow: hidden;
|
19 |
position: relative;
|
20 |
cursor: pointer;
|
21 |
user-select: none;
|
22 |
+
background-color: white;
|
23 |
+
|
24 |
+
&:after {
|
25 |
+
display: block;
|
26 |
+
position: absolute;
|
27 |
+
top: 0;
|
28 |
+
left: 0;
|
29 |
+
width: 100%;
|
30 |
+
height: 100%;
|
31 |
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
|
32 |
+
pointer-events: none;
|
33 |
+
border-radius: 25px;
|
34 |
+
content: '';
|
35 |
+
}
|
36 |
+
|
37 |
label{
|
|
|
38 |
display: block;
|
39 |
float: left;
|
40 |
+
background-color: #eceeef;
|
41 |
transition: all 0.4s ease;
|
42 |
+
|
43 |
span{
|
44 |
+
font-size: 7px;
|
45 |
+
line-height: 12px;
|
|
|
46 |
text-transform: uppercase;
|
47 |
+
color: #a4afb7;
|
48 |
text-align: center;
|
49 |
display: block;
|
50 |
opacity: 1;
|
51 |
transition: all 0.4s ease;
|
52 |
}
|
53 |
}
|
54 |
+
|
55 |
.sw-enable{
|
56 |
+
padding: 4px 4px 4px 12px;
|
57 |
span{
|
58 |
opacity: 0;
|
59 |
}
|
60 |
}
|
61 |
+
|
62 |
.sw-disable{
|
63 |
+
padding: 4px 12px 4px 4px;
|
64 |
span{
|
65 |
opacity: 1;
|
66 |
}
|
67 |
}
|
68 |
+
|
69 |
.state-marker{
|
70 |
+
background-color: white;
|
71 |
display: block;
|
72 |
position: absolute;
|
73 |
+
width: 18px;
|
74 |
+
height: 18px;
|
75 |
+
margin: 1px;
|
76 |
top: 0;
|
77 |
left: 0;
|
78 |
+
border-radius: 50%;
|
|
|
|
|
|
|
|
|
79 |
transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
|
80 |
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
.cherry-input-switcher{
|
83 |
display: none;
|
84 |
}
|
85 |
.cherry-input-switcher-true:checked{
|
86 |
+
|
87 |
+
|
88 |
~ .sw-enable{
|
89 |
+
background-color: #49c66a;
|
90 |
+
|
91 |
+
span{
|
92 |
+
opacity: 1;
|
93 |
+
color: white;
|
94 |
+
text-shadow: 0 1px rgba(0, 0, 0, 0.2);
|
95 |
+
}
|
96 |
}
|
97 |
~ .sw-disable{
|
98 |
+
background-color: #49c66a;
|
99 |
+
|
100 |
+
span{
|
101 |
+
opacity: 0;
|
102 |
+
}
|
103 |
}
|
104 |
~ .state-marker{
|
105 |
left: 100%;
|
106 |
+
margin-left: -19px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
}
|
109 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/min/ui-text.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50
|
1 |
+
.cherry-lock-element{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:no-drop;position:relative;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{-webkit-animation-name:lock_show;animation-name:lock_show;-webkit-animation-duration:450ms;animation-duration:450ms;-webkit-animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1);animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;-webkit-box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;-webkit-animation-name:lock_hide;animation-name:lock_hide;-webkit-animation-duration:200ms;animation-duration:200ms;-webkit-animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-transform-origin:0% 0%;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@-webkit-keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_show{0%{opacity:0;-webkit-filter:blur(5px);filter:blur(5px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;-webkit-transform:scale(1.1) translate(-50%, -130%);transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}}@-webkit-keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}@keyframes lock_hide{0%{opacity:1;-webkit-filter:blur(0px);filter:blur(0px);-webkit-transform:scale(1) translate(-50%, -100%);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;-webkit-filter:blur(3px);filter:blur(3px);-webkit-transform:scale(0) translate(-50%, 200%);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}input.cherry-ui-text{font-size:12px;line-height:16px;color:#495157;background-color:#fff;border-radius:3px;padding:5px;min-height:28px;border:1px solid #d5dadf;-webkit-box-shadow:none;box-shadow:none}input.cherry-ui-text:focus{border-color:#9ba7b3;-webkit-box-shadow:none;box-shadow:none}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
@mixin input() {
|
2 |
-
font-size:
|
3 |
-
line-height:
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
-
padding:
|
8 |
-
min-height:
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
}
|
1 |
@mixin input() {
|
2 |
+
font-size: 12px;
|
3 |
+
line-height: 16px;
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
+
padding: 5px;
|
8 |
+
min-height: 28px;
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
+
|
12 |
+
&:focus{
|
13 |
+
border-color: darken( $border_color, 20% );
|
14 |
+
box-shadow: none;
|
15 |
+
}
|
16 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-text/assets/ui-kit/_variables.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
$light_color: #ffffff;
|
2 |
-
$dark_color: #
|
3 |
|
4 |
-
$bg_color:
|
5 |
-
$border_color: #
|
6 |
|
7 |
-
$border_radius_extra_small:
|
1 |
$light_color: #ffffff;
|
2 |
+
$dark_color: #495157;
|
3 |
|
4 |
+
$bg_color: white;
|
5 |
+
$border_color: #d5dadf;
|
6 |
|
7 |
+
$border_radius_extra_small: 3px;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/min/ui-textarea.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none
|
1 |
+
.cherry-lock-element{user-select:none;cursor:no-drop;position:relative;filter:grayscale(100%)}.cherry-lock-element.inline-block{display:inline-block}.cherry-lock-element label{position:relative}.cherry-lock-element .cherry-lable-content,.cherry-lock-element .cherry-checkbox-item,.cherry-lock-element .select2-container,.cherry-lock-element>*:first-child{opacity:0.5;pointer-events:none}.cherry-lock-element a.cherry-lock-element__area{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2000;cursor:no-drop}.cherry-lock-element a.cherry-lock-element__area:focus{outline:none;box-shadow:none}.cherry-lock-element a.cherry-lock-element__area:hover .cherry-lock-element__label{animation-name:lock_show;animation-duration:450ms;animation-timing-function:cubic-bezier(0.165, 0.84, 0.44, 1)}.cherry-lock-element__label{opacity:0;display:inline-block;background-color:rgba(0,0,0,0.9);border-radius:5px;color:#fff;padding:8px 10px;position:absolute;white-space:nowrap;top:-10px;left:50%;box-shadow:2px 2px 5px 0px rgba(0,0,0,0.5);will-change:auto;pointer-events:none;font-size:14px;line-height:16px;animation-name:lock_hide;animation-duration:200ms;animation-timing-function:cubic-bezier(0.55, 0.055, 0.675, 0.19);animation-fill-mode:both;transform-origin:0% 0%}.cherry-lock-element__label *+*{margin-right:5px}.cherry-lock-element__label:after{border:solid;border-color:rgba(0,0,0,0.9) transparent;border-width:6px 6px 0 6px;bottom:-5px;margin-left:-6px;content:"";left:50%;position:absolute}@keyframes lock_show{0%{opacity:0;filter:blur(5px);transform:scale(0) translate(-50%, 200%)}60%{opacity:0.8;transform:scale(1.1) translate(-50%, -130%)}100%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}}@keyframes lock_hide{0%{opacity:1;filter:blur(0px);transform:scale(1) translate(-50%, -100%)}100%{opacity:0;filter:blur(3px);transform:scale(0) translate(-50%, 200%)}}.cherry-ui-elements-lock{opacity:0.5;cursor:no-drop;pointer-events:none;filter:grayscale(100%)}.cherry-ui-container{margin:10px 0 20px 0}label.cherry-label{margin:0 0 5px 0;display:block}textarea.cherry-ui-textarea{width:100%;font-size:12px;line-height:16px;color:#495157;background-color:#fff;border-radius:3px;padding:5px;min-height:28px;border:1px solid #d5dadf;box-shadow:none;height:100px}textarea.cherry-ui-textarea:focus{border-color:#9ba7b3;box-shadow:none}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-kit/_mixins.scss
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
@mixin input() {
|
2 |
-
font-size:
|
3 |
-
line-height:
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
-
padding:
|
8 |
-
min-height:
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
}
|
1 |
@mixin input() {
|
2 |
+
font-size: 12px;
|
3 |
+
line-height: 16px;
|
4 |
color: $dark_color;
|
5 |
background-color: $bg_color;
|
6 |
border-radius: $border_radius_extra_small;
|
7 |
+
padding: 5px;
|
8 |
+
min-height: 28px;
|
9 |
border: 1px solid $border_color;
|
10 |
box-shadow: none;
|
11 |
+
|
12 |
+
&:focus{
|
13 |
+
border-color: darken( $border_color, 20% );
|
14 |
+
box-shadow: none;
|
15 |
+
}
|
16 |
}
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-kit/_variables.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
$light_color: #ffffff;
|
2 |
-
$dark_color: #
|
3 |
|
4 |
-
$bg_color:
|
5 |
-
$border_color: #
|
6 |
|
7 |
-
$border_radius_extra_small:
|
1 |
$light_color: #ffffff;
|
2 |
+
$dark_color: #495157;
|
3 |
|
4 |
+
$bg_color: white;
|
5 |
+
$border_color: #d5dadf;
|
6 |
|
7 |
+
$border_radius_extra_small: 3px;
|
cherry-framework/modules/cherry-ui-elements/inc/ui-elements/ui-textarea/assets/ui-textarea.scss
CHANGED
@@ -18,5 +18,5 @@ label.cherry-label{
|
|
18 |
textarea.cherry-ui-textarea{
|
19 |
width: 100%;
|
20 |
@include input();
|
21 |
-
height:
|
22 |
}
|
18 |
textarea.cherry-ui-textarea{
|
19 |
width: 100%;
|
20 |
@include input();
|
21 |
+
height: 100px;
|
22 |
}
|
cherry-framework/modules/cherry-utility/inc/cherry-attributes-utilit.php
CHANGED
@@ -115,7 +115,9 @@ if ( ! class_exists( 'Cherry_Attributes_Utilit' ) ) {
|
|
115 |
}
|
116 |
}
|
117 |
|
118 |
-
|
|
|
|
|
119 |
|
120 |
return $this->output_method( $html, $args['echo'] );
|
121 |
}
|
115 |
}
|
116 |
}
|
117 |
|
118 |
+
if ( 'post_content' === $content_type && -1 === $args['length'] ) {
|
119 |
+
$html = apply_filters( 'the_content', $html );
|
120 |
+
}
|
121 |
|
122 |
return $this->output_method( $html, $args['echo'] );
|
123 |
}
|
cherry-framework/modules/cherry5-interface-builder/cherry5-interface-builder.php
ADDED
@@ -0,0 +1,495 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Module Name: Interface Builder
|
4 |
+
* Description: The module for the creation of interfaces in the WordPress admin panel
|
5 |
+
* Author: Cherry Team
|
6 |
+
* Author URI: http://www.cherryframework.com/
|
7 |
+
* License: GPLv3
|
8 |
+
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
+
*
|
10 |
+
* @package Cherry_Framework
|
11 |
+
* @subpackage Modules
|
12 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
13 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
14 |
+
* @link http://www.cherryframework.com/
|
15 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
16 |
+
*/
|
17 |
+
|
18 |
+
// If this file is called directly, abort.
|
19 |
+
if ( ! defined( 'WPINC' ) ) {
|
20 |
+
die;
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( ! class_exists( 'Cherry5_Interface_Builder' ) ) {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Class Cherry Interface Builder.
|
27 |
+
*
|
28 |
+
* @since 1.0.0
|
29 |
+
*/
|
30 |
+
class Cherry5_Interface_Builder {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Core version.
|
34 |
+
*
|
35 |
+
* @since 1.5.0
|
36 |
+
* @access public
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $core_version = '';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Module directory path.
|
43 |
+
*
|
44 |
+
* @since 1.5.0
|
45 |
+
* @access protected
|
46 |
+
* @var srting.
|
47 |
+
*/
|
48 |
+
protected $module_path;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Module settings.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
* @access private
|
55 |
+
* @var array
|
56 |
+
*/
|
57 |
+
private $args = array(
|
58 |
+
'views' => array(
|
59 |
+
'section' => 'inc/views/section.php',
|
60 |
+
'component-tab-vertical' => 'inc/views/component-tab-vertical.php',
|
61 |
+
'component-tab-horizontal' => 'inc/views/component-tab-horizontal.php',
|
62 |
+
'component-toggle' => 'inc/views/component-toggle.php',
|
63 |
+
'component-accordion' => 'inc/views/component-accordion.php',
|
64 |
+
'component-repeater' => 'inc/views/component-repeater.php',
|
65 |
+
'settings' => 'inc/views/settings.php',
|
66 |
+
'control' => 'inc/views/control.php',
|
67 |
+
'settings-children-title' => 'inc/views/settings-children-title.php',
|
68 |
+
'tab-children-title' => 'inc/views/tab-children-title.php',
|
69 |
+
'toggle-children-title' => 'inc/views/toggle-children-title.php',
|
70 |
+
'form' => 'inc/views/form.php',
|
71 |
+
'html' => 'inc/views/html.php',
|
72 |
+
),
|
73 |
+
'views_args' => array(
|
74 |
+
'parent' => '',
|
75 |
+
'type' => '',
|
76 |
+
'view' => '',
|
77 |
+
'view_wrapping' => true,
|
78 |
+
'html' => '',
|
79 |
+
'scroll' => false,
|
80 |
+
'master' => false,
|
81 |
+
'title' => '',
|
82 |
+
'description' => '',
|
83 |
+
),
|
84 |
+
);
|
85 |
+
|
86 |
+
/**
|
87 |
+
* A reference to an instance of this class.
|
88 |
+
*
|
89 |
+
* @since 1.0.0
|
90 |
+
* @access private
|
91 |
+
* @var object
|
92 |
+
*/
|
93 |
+
private static $instance = null;
|
94 |
+
|
95 |
+
/**
|
96 |
+
* UI element instance.
|
97 |
+
*
|
98 |
+
* @since 1.0.0
|
99 |
+
* @access public
|
100 |
+
* @var object
|
101 |
+
*/
|
102 |
+
public $ui_elements = null;
|
103 |
+
|
104 |
+
/**
|
105 |
+
* The structure of the interface elements.
|
106 |
+
*
|
107 |
+
* @since 1.0.0
|
108 |
+
* @access private
|
109 |
+
* @var array
|
110 |
+
*/
|
111 |
+
private $structure = array();
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Cherry_Interface_Builder constructor.
|
115 |
+
*
|
116 |
+
* @since 1.0.0
|
117 |
+
* @access public
|
118 |
+
* @return void
|
119 |
+
*/
|
120 |
+
public function __construct( $core, array $args = array() ) {
|
121 |
+
$this->args = array_merge_recursive(
|
122 |
+
$args,
|
123 |
+
$this->args
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->core_version = $core->get_core_version();
|
127 |
+
$this->module_path = $args['module_path'];
|
128 |
+
$this->ui_elements = $core->init_module( 'cherry-ui-elements' );
|
129 |
+
|
130 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Register element type section.
|
135 |
+
*
|
136 |
+
* @since 1.0.0
|
137 |
+
* @access public
|
138 |
+
* @param array $args Options section.
|
139 |
+
* @return void
|
140 |
+
*/
|
141 |
+
public function register_section( array $args = array() ) {
|
142 |
+
$this->add_new_element( $args, 'section' );
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Register element type component.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
* @access public
|
150 |
+
* @param array $args Options component.
|
151 |
+
* @return void
|
152 |
+
*/
|
153 |
+
public function register_component( array $args = array() ) {
|
154 |
+
$this->add_new_element( $args, 'component' );
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Register element type settings.
|
159 |
+
*
|
160 |
+
* @since 1.0.0
|
161 |
+
* @access public
|
162 |
+
* @param array $args Options settings.
|
163 |
+
* @return void
|
164 |
+
*/
|
165 |
+
public function register_settings( array $args = array() ) {
|
166 |
+
$this->add_new_element( $args, 'settings' );
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Register element type control.
|
171 |
+
*
|
172 |
+
* @since 1.0.0
|
173 |
+
* @access public
|
174 |
+
* @param array $args Options control.
|
175 |
+
* @return void
|
176 |
+
*/
|
177 |
+
public function register_control( array $args = array() ) {
|
178 |
+
$this->add_new_element( $args, 'control' );
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Register element type form.
|
183 |
+
*
|
184 |
+
* @since 1.0.0
|
185 |
+
* @access public
|
186 |
+
* @param array $args Options form.
|
187 |
+
* @return void
|
188 |
+
*/
|
189 |
+
public function register_form( array $args = array() ) {
|
190 |
+
$this->add_new_element( $args, 'form' );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Register element type html.
|
195 |
+
*
|
196 |
+
* @since 1.0.0
|
197 |
+
* @access public
|
198 |
+
* @param array $args Options control.
|
199 |
+
* @return void
|
200 |
+
*/
|
201 |
+
public function register_html( array $args = array() ) {
|
202 |
+
$this->add_new_element( $args, 'html' );
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* This function adds a new element to the structure.
|
207 |
+
*
|
208 |
+
* @since 1.0.0
|
209 |
+
* @access protected
|
210 |
+
* @param array $args Options new element.
|
211 |
+
* @param string $type Type new element.
|
212 |
+
* @return void
|
213 |
+
*/
|
214 |
+
protected function add_new_element( array $args = array(), $type = 'section' ) {
|
215 |
+
|
216 |
+
if ( ! isset( $args[0] ) && ! is_array( current( $args ) ) ) {
|
217 |
+
|
218 |
+
if ( 'control' !== $type && 'component' !== $type ) {
|
219 |
+
$args['type'] = $type;
|
220 |
+
}
|
221 |
+
|
222 |
+
$this->structure[ $args['id'] ] = $args;
|
223 |
+
|
224 |
+
} else {
|
225 |
+
foreach ( $args as $key => $value ) {
|
226 |
+
|
227 |
+
if ( 'control' !== $type && 'component' !== $type ) {
|
228 |
+
$value['type'] = $type;
|
229 |
+
}
|
230 |
+
|
231 |
+
$this->structure[ $key ] = $value;
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Sorts the elements of the structure, adding child items to the parent.
|
238 |
+
*
|
239 |
+
* @since 1.0.0
|
240 |
+
* @access protected
|
241 |
+
* @param array $structure The original structure of the elements.
|
242 |
+
* @param string $parent_key The key of the parent element.
|
243 |
+
* @return array
|
244 |
+
*/
|
245 |
+
protected function sort_structure( array $structure = array(), $parent_key = null ) {
|
246 |
+
$new_array = array();
|
247 |
+
|
248 |
+
foreach ( $structure as $key => $value ) {
|
249 |
+
if (
|
250 |
+
( null === $parent_key && ! isset( $value['parent'] ) )
|
251 |
+
|| null === $parent_key && ! isset( $structure[ $value['parent'] ] )
|
252 |
+
|| ( isset( $value['parent'] ) && $value['parent'] === $parent_key )
|
253 |
+
) {
|
254 |
+
|
255 |
+
if ( ! isset( $value['id'] ) ) {
|
256 |
+
$value['id'] = $key;
|
257 |
+
}
|
258 |
+
if ( ! isset( $value['name'] ) ) {
|
259 |
+
$value['name'] = $key;
|
260 |
+
}
|
261 |
+
$new_array[ $key ] = $value;
|
262 |
+
|
263 |
+
$children = $this->sort_structure( $structure, $key );
|
264 |
+
if ( ! empty( $children ) ) {
|
265 |
+
$new_array[ $key ]['children'] = $children;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
return $new_array;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Reset structure array.
|
275 |
+
* Call this method only after render.
|
276 |
+
*
|
277 |
+
* @since 1.0.1
|
278 |
+
* @return void
|
279 |
+
*/
|
280 |
+
public function reset_structure() {
|
281 |
+
$this->structure = array();
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Get view for interface elements.
|
286 |
+
*
|
287 |
+
* @since 1.0.0
|
288 |
+
* @access protected
|
289 |
+
* @param string $type View type.
|
290 |
+
* @param array $args Input data.
|
291 |
+
* @return string
|
292 |
+
*/
|
293 |
+
protected function get_view( $type = 'control', array $args = array() ) {
|
294 |
+
|
295 |
+
if ( empty( $args['view'] ) ) {
|
296 |
+
$path = ( array_key_exists( $type, $this->args['views'] ) ) ? $this->args['views'][ $type ] : $this->args['views']['control'];
|
297 |
+
|
298 |
+
$path = is_array( $path ) ? $path[0] : $path;
|
299 |
+
$path = file_exists( $path ) ? $path : $this->module_path . $path;
|
300 |
+
|
301 |
+
} else {
|
302 |
+
$path = $args['view'];
|
303 |
+
}
|
304 |
+
|
305 |
+
return Cherry_Toolkit::render_view( $path, $args );
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Render HTML elements.
|
310 |
+
*
|
311 |
+
* @since 1.0.0
|
312 |
+
* @access public
|
313 |
+
* @param bool $echo Input data.
|
314 |
+
* @param array $args The original structure of the elements.
|
315 |
+
* @return string
|
316 |
+
*/
|
317 |
+
public function render( $echo = true, array $args = array() ) {
|
318 |
+
|
319 |
+
if ( empty( $args ) ) {
|
320 |
+
$args = $this->structure;
|
321 |
+
}
|
322 |
+
|
323 |
+
if ( empty( $args ) ) {
|
324 |
+
return false;
|
325 |
+
}
|
326 |
+
|
327 |
+
$sorted_structure = $this->sort_structure( $args );
|
328 |
+
|
329 |
+
$output = $this->build( $sorted_structure );
|
330 |
+
$output = str_replace( array( "\r\n", "\r", "\n", "\t" ), '', $output );
|
331 |
+
|
332 |
+
$this->reset_structure();
|
333 |
+
|
334 |
+
return $this->output_method( $output, $echo );
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Render HTML elements.
|
339 |
+
*
|
340 |
+
* @since 1.0.0
|
341 |
+
* @access protected
|
342 |
+
* @param array $args Input data.
|
343 |
+
* @return string
|
344 |
+
*/
|
345 |
+
protected function build( array $args = array() ) {
|
346 |
+
$output = '';
|
347 |
+
$views = $this->args['views'];
|
348 |
+
|
349 |
+
foreach ( $args as $key => $value ) {
|
350 |
+
$value = wp_parse_args(
|
351 |
+
$value,
|
352 |
+
$this->args['views_args']
|
353 |
+
);
|
354 |
+
|
355 |
+
$value['class'] = isset( $value['class'] ) ? $value['class'] . ' ' : '';
|
356 |
+
$value['class'] .= $value['id'] . ' ';
|
357 |
+
|
358 |
+
if ( $value['scroll'] ) {
|
359 |
+
$value['class'] .= 'cherry-scroll ';
|
360 |
+
}
|
361 |
+
|
362 |
+
if ( $value['master'] ) {
|
363 |
+
$value['class'] .= $value['master'] . ' ';
|
364 |
+
}
|
365 |
+
|
366 |
+
$type = array_key_exists( $value['type'], $views ) ? $value['type'] : 'field';
|
367 |
+
$has_child = isset( $value['children'] ) && is_array( $value['children'] ) && ! empty( $value['children'] );
|
368 |
+
|
369 |
+
switch ( $type ) {
|
370 |
+
case 'component-tab-vertical':
|
371 |
+
case 'component-tab-horizontal':
|
372 |
+
if ( $has_child ) {
|
373 |
+
$value['tabs'] = '';
|
374 |
+
|
375 |
+
foreach ( $value['children'] as $key_children => $value_children ) {
|
376 |
+
$value['tabs'] .= $this->get_view( 'tab-children-title', $value_children );
|
377 |
+
|
378 |
+
unset( $value['children'][ $key_children ]['title'] );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
break;
|
382 |
+
|
383 |
+
case 'component-toggle':
|
384 |
+
case 'component-accordion':
|
385 |
+
if ( $has_child ) {
|
386 |
+
foreach ( $value['children'] as $key_children => $value_children ) {
|
387 |
+
$value['children'][ $key_children ]['title_in_view'] = $this->get_view( 'toggle-children-title', $value_children );
|
388 |
+
}
|
389 |
+
}
|
390 |
+
break;
|
391 |
+
|
392 |
+
case 'settings':
|
393 |
+
if ( isset( $value['title'] ) && $value['title'] ) {
|
394 |
+
$value['title'] = isset( $value['title_in_view'] ) ? $value['title_in_view'] : $this->get_view( 'settings-children-title', $value );
|
395 |
+
}
|
396 |
+
break;
|
397 |
+
|
398 |
+
case 'html':
|
399 |
+
$value['children'] = $value['html'];
|
400 |
+
break;
|
401 |
+
|
402 |
+
case 'form':
|
403 |
+
$value['accept-charset'] = isset( $value['accept-charset'] ) ? $value['accept-charset'] : 'utf-8';
|
404 |
+
$value['action'] = isset( $value['action'] ) ? $value['action'] : '' ;
|
405 |
+
$value['autocomplete'] = isset( $value['autocomplete'] ) ? $value['autocomplete'] : 'on';
|
406 |
+
$value['enctype'] = isset( $value['enctype'] ) ? $value['enctype'] : 'application/x-www-form-urlencoded';
|
407 |
+
$value['method'] = isset( $value['method'] ) ? $value['method'] : 'post';
|
408 |
+
$value['novalidate'] = ( isset( $value['novalidate'] ) && $value['novalidate'] ) ? 'novalidate' : '';
|
409 |
+
$value['target'] = isset( $value['target'] ) ? $value['target'] : '';
|
410 |
+
break;
|
411 |
+
|
412 |
+
case 'field':
|
413 |
+
$ui_args = $value;
|
414 |
+
|
415 |
+
$ui_args['class'] = isset( $ui_args['child_class'] ) ? $ui_args['child_class'] : '' ;
|
416 |
+
|
417 |
+
if ( isset( $ui_args['options_callback'] ) ) {
|
418 |
+
$ui_args['options'] = call_user_func( $ui_args['options_callback'] );
|
419 |
+
}
|
420 |
+
|
421 |
+
unset( $ui_args['master'] );
|
422 |
+
|
423 |
+
$value['children'] = $this->ui_elements->get_ui_element_instance( $ui_args['type'], $ui_args )->render();
|
424 |
+
break;
|
425 |
+
}
|
426 |
+
|
427 |
+
if ( $has_child ) {
|
428 |
+
$value['children'] = $this->build( $value['children'] );
|
429 |
+
}
|
430 |
+
|
431 |
+
$output .= ( $value['view_wrapping'] ) ? $this->get_view( $type, $value ) : $value['children'];
|
432 |
+
}
|
433 |
+
|
434 |
+
return $output;
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Output HTML.
|
439 |
+
*
|
440 |
+
* @since 1.0.0
|
441 |
+
* @access protected
|
442 |
+
* @param string $output Output HTML.
|
443 |
+
* @param boolean $echo Output type.
|
444 |
+
* @return string
|
445 |
+
*/
|
446 |
+
protected function output_method( $output = '', $echo = true ) {
|
447 |
+
if ( ! filter_var( $echo, FILTER_VALIDATE_BOOLEAN ) ) {
|
448 |
+
return $output;
|
449 |
+
} else {
|
450 |
+
echo $output;
|
451 |
+
}
|
452 |
+
}
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Enqueue javascript and stylesheet interface builder.
|
456 |
+
*
|
457 |
+
* @since 4.0.0
|
458 |
+
* @access public
|
459 |
+
* @return void
|
460 |
+
*/
|
461 |
+
public function enqueue_assets() {
|
462 |
+
wp_enqueue_script(
|
463 |
+
'cherry-interface-builder',
|
464 |
+
esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.js', $this->module_path ) ),
|
465 |
+
array( 'jquery' ),
|
466 |
+
$this->core_version,
|
467 |
+
true
|
468 |
+
);
|
469 |
+
wp_enqueue_style(
|
470 |
+
'cherry-interface-builder',
|
471 |
+
esc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.css', $this->module_path ) ),
|
472 |
+
array(),
|
473 |
+
$this->core_version,
|
474 |
+
'all'
|
475 |
+
);
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Returns the instance.
|
480 |
+
*
|
481 |
+
* @since 1.0.0
|
482 |
+
* @access public
|
483 |
+
* @return object
|
484 |
+
*/
|
485 |
+
public static function get_instance( $core, $args ) {
|
486 |
+
|
487 |
+
// If the single instance hasn't been set, set it now.
|
488 |
+
if ( null == self::$instance ) {
|
489 |
+
self::$instance = new self( $core, $args );
|
490 |
+
}
|
491 |
+
|
492 |
+
return self::$instance;
|
493 |
+
}
|
494 |
+
}
|
495 |
+
}
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/_use-in-js.scss
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cherry-ui-kit{
|
2 |
+
button{
|
3 |
+
*{
|
4 |
+
pointer-events: none;
|
5 |
+
}
|
6 |
+
}
|
7 |
+
}
|
8 |
+
.cherry-component{
|
9 |
+
&__content{
|
10 |
+
.cherry-settings__content{
|
11 |
+
display: none;
|
12 |
+
&.show{
|
13 |
+
display: inherit;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
}
|
17 |
+
}
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 20px 0 -5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:20px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:10px 0}.cherry-ui-kit__title{margin:20px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:10px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:10px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);padding:15px;margin:15px 15px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:5px;padding:15px}.cherry-section__info{background-color:#fff;border-radius:5px;padding:15px;box-shadow:0px 5px 21px rgba(0,0,0,0.1);margin-bottom:15px}.cherry-section .cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:15px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:30px;margin:20px 20px 0 0}.cherry-section__info{padding:30px;margin-bottom:30px}.cherry-section__holder{padding:30px}.cherry-section .cherry-settings{margin-top:30px}}.cherry-component{padding:20px 0}@media (min-width: 783px){.cherry-component{padding:15px}}@media (min-width: 961px){.cherry-component{padding:30px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0px 0px 10px rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:15px 20px;border:0;background:none;cursor:pointer;position:relative}.widget .cherry-component.cherry-accordion .cherry-component__button,.widget .cherry-component.cherry-toggle .cherry-component__button{background-color:#495159;color:#fff}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.widget .cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.widget .cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{color:#fff}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:10px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1)}.widget .cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.widget .cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:none;border-radius:0;border-left:0;border-right:0}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0;-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;-webkit-align-self:auto;-ms-flex-item-align:auto;align-self:auto;padding:15px 20px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:0px 5px 21px rgba(0,0,0,0.1);border-radius:5px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;border-radius:5px 5px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 5px 5px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-webkit-flex:0 1 25%;-ms-flex:0 1 25%;flex:0 1 25%;border-radius:5px 0 0 5px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 75%;-ms-flex:0 1 75%;flex:0 1 75%;border-radius:0 5px 5px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-webkit-flex:0 1 20%;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 80%;-ms-flex:0 1 80%;flex:0 1 80%}}.widget .cherry-component{padding:0}.widget .cherry-component__content{margin:0 -15px 20px}.widget .cherry-component__content .cherry-control{padding:15px 20px}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:10px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:10px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:30px}}.cherry-control{padding:15px 20px}.cherry-control__title{margin:0 0 10px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 30%;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:15px}.cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 70%;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px}}.widget .cherry-control{padding:15px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.widget .cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%}.widget .cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;padding-right:0}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:5px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.js
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Interface Builder
|
3 |
+
*/
|
4 |
+
;( function( $, CherryJsCore ) {
|
5 |
+
'use strict';
|
6 |
+
|
7 |
+
CherryJsCore.utilites.namespace( 'interfaceBuilder' );
|
8 |
+
|
9 |
+
CherryJsCore.interfaceBuilder = {
|
10 |
+
init: function() {
|
11 |
+
this.component.init();
|
12 |
+
|
13 |
+
$( document )
|
14 |
+
.on( 'cherryInterfaceBuilder', this.component.init.bind( this.component ) );
|
15 |
+
},
|
16 |
+
component: {
|
17 |
+
tabClass: '.cherry-tab',
|
18 |
+
accordionClass: '.cherry-accordion',
|
19 |
+
toggleClass: '.cherry-toggle',
|
20 |
+
|
21 |
+
buttonClass: '.cherry-component__button',
|
22 |
+
contentClass: '.cherry-settings__content',
|
23 |
+
|
24 |
+
buttonActiveClass: 'active',
|
25 |
+
showClass: 'show',
|
26 |
+
|
27 |
+
localStorage: {},
|
28 |
+
|
29 |
+
init: function () {
|
30 |
+
this.localStorage = this.getState() || {};
|
31 |
+
|
32 |
+
this.componentInit( this.tabClass );
|
33 |
+
this.componentInit( this.accordionClass );
|
34 |
+
this.componentInit( this.toggleClass );
|
35 |
+
|
36 |
+
this.addEvent();
|
37 |
+
},
|
38 |
+
|
39 |
+
addEvent: function() {
|
40 |
+
$( 'body' )
|
41 |
+
.off( 'click.cherryInterfaceBuilder' )
|
42 |
+
.on( 'click.cherryInterfaceBuilder',
|
43 |
+
this.tabClass + ' ' + this.buttonClass + ', ' +
|
44 |
+
this.toggleClass + ' ' + this.buttonClass + ', ' +
|
45 |
+
this.accordionClass + ' ' + this.buttonClass,
|
46 |
+
|
47 |
+
this.componentClick.bind( this )
|
48 |
+
);
|
49 |
+
},
|
50 |
+
|
51 |
+
componentInit: function( componentClass ) {
|
52 |
+
var _this = this,
|
53 |
+
components = $( componentClass ),
|
54 |
+
componentId = null,
|
55 |
+
button = null,
|
56 |
+
contentId = null,
|
57 |
+
notShow = '';
|
58 |
+
|
59 |
+
components.each( function( index, component ) {
|
60 |
+
component = $( component );
|
61 |
+
componentId = component.data( 'compotent-id' );
|
62 |
+
|
63 |
+
switch ( componentClass ) {
|
64 |
+
case _this.toggleClass:
|
65 |
+
if ( _this.localStorage[ componentId ] && _this.localStorage[ componentId ].length ) {
|
66 |
+
notShow = _this.localStorage[ componentId ].join( ', ' );
|
67 |
+
}
|
68 |
+
|
69 |
+
$( _this.contentClass, component )
|
70 |
+
.not( notShow )
|
71 |
+
.addClass( _this.showClass )
|
72 |
+
.prevAll( _this.buttonClass )
|
73 |
+
.addClass( _this.buttonActiveClass );
|
74 |
+
break;
|
75 |
+
|
76 |
+
case _this.tabClass:
|
77 |
+
case _this.accordionClass:
|
78 |
+
if ( _this.localStorage[ componentId ] ) {
|
79 |
+
contentId = _this.localStorage[ componentId ][ 0 ];
|
80 |
+
button = $( '[data-content-id="' + contentId + '"]', component );
|
81 |
+
} else {
|
82 |
+
button = $( _this.buttonClass, component ).eq( 0 );
|
83 |
+
contentId = button.data( 'content-id' );
|
84 |
+
}
|
85 |
+
|
86 |
+
_this.showElement( button, component, contentId );
|
87 |
+
break;
|
88 |
+
}
|
89 |
+
} );
|
90 |
+
},
|
91 |
+
|
92 |
+
componentClick: function( event ) {
|
93 |
+
var $target = $( event.target ),
|
94 |
+
$parent = $target.closest( this.tabClass + ', ' + this.accordionClass + ', ' + this.toggleClass ),
|
95 |
+
expr = new RegExp( this.tabClass + '|' + this.accordionClass + '|' + this.toggleClass ),
|
96 |
+
componentName = $parent[0].className.match( expr )[ 0 ].replace( ' ', '.' ),
|
97 |
+
contentId = $target.data( 'content-id' ),
|
98 |
+
componentId = $parent.data( 'compotent-id' ),
|
99 |
+
activeFlag = $target.hasClass( this.buttonActiveClass ),
|
100 |
+
itemClosed;
|
101 |
+
|
102 |
+
switch ( componentName ) {
|
103 |
+
case this.tabClass:
|
104 |
+
if ( ! activeFlag ) {
|
105 |
+
this.hideElement( $parent );
|
106 |
+
this.showElement( $target, $parent, contentId );
|
107 |
+
|
108 |
+
this.localStorage[ componentId ] = new Array( contentId );
|
109 |
+
this.setState();
|
110 |
+
}
|
111 |
+
break;
|
112 |
+
|
113 |
+
case this.accordionClass:
|
114 |
+
this.hideElement( $parent );
|
115 |
+
|
116 |
+
if ( ! activeFlag ) {
|
117 |
+
this.showElement( $target, $parent, contentId );
|
118 |
+
|
119 |
+
this.localStorage[ componentId ] = new Array( contentId );
|
120 |
+
} else {
|
121 |
+
this.localStorage[ componentId ] = {};
|
122 |
+
}
|
123 |
+
this.setState();
|
124 |
+
break;
|
125 |
+
|
126 |
+
case this.toggleClass:
|
127 |
+
$target
|
128 |
+
.toggleClass( this.buttonActiveClass )
|
129 |
+
.nextAll( contentId )
|
130 |
+
.toggleClass( this.showClass );
|
131 |
+
|
132 |
+
if ( Array.isArray( this.localStorage[ componentId ] ) ) {
|
133 |
+
itemClosed = this.localStorage[ componentId ].indexOf( contentId );
|
134 |
+
|
135 |
+
if ( -1 !== itemClosed ) {
|
136 |
+
this.localStorage[ componentId ].splice( itemClosed, 1 );
|
137 |
+
} else {
|
138 |
+
this.localStorage[ componentId ].push( contentId );
|
139 |
+
}
|
140 |
+
|
141 |
+
} else {
|
142 |
+
this.localStorage[ componentId ] = new Array( contentId );
|
143 |
+
}
|
144 |
+
|
145 |
+
this.setState();
|
146 |
+
break;
|
147 |
+
}
|
148 |
+
$target.blur();
|
149 |
+
|
150 |
+
return false;
|
151 |
+
},
|
152 |
+
|
153 |
+
showElement: function ( button, holder, contentId ) {
|
154 |
+
button
|
155 |
+
.addClass( this.buttonActiveClass );
|
156 |
+
|
157 |
+
holder
|
158 |
+
.data( 'content-id', contentId );
|
159 |
+
|
160 |
+
$( contentId, holder )
|
161 |
+
.addClass( this.showClass );
|
162 |
+
},
|
163 |
+
|
164 |
+
hideElement: function ( holder ) {
|
165 |
+
var contsntId = holder.data( 'content-id' );
|
166 |
+
|
167 |
+
$( '[data-content-id="' + contsntId + '"]', holder )
|
168 |
+
.removeClass( this.buttonActiveClass );
|
169 |
+
|
170 |
+
$( contsntId, holder )
|
171 |
+
.removeClass( this.showClass );
|
172 |
+
},
|
173 |
+
|
174 |
+
getState: function() {
|
175 |
+
try {
|
176 |
+
return JSON.parse( localStorage.getItem( 'interface-builder' ) );
|
177 |
+
} catch ( e ) {
|
178 |
+
return false;
|
179 |
+
}
|
180 |
+
},
|
181 |
+
|
182 |
+
setState: function() {
|
183 |
+
try {
|
184 |
+
localStorage.setItem( 'interface-builder', JSON.stringify( this.localStorage ) );
|
185 |
+
} catch ( e ) {
|
186 |
+
return false;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
}
|
190 |
+
};
|
191 |
+
|
192 |
+
CherryJsCore.interfaceBuilder.init();
|
193 |
+
}( jQuery, window.CherryJsCore ) );
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/cherry-interface-builder.scss
ADDED
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$color-1: #fff; // Background color.
|
2 |
+
$widget-bg: #495159; // Background color in widgets.
|
3 |
+
$color-2: #efefef; // Background color.
|
4 |
+
$color-3: #96989a; // Description color and tabs button text color.
|
5 |
+
$color-4: #b4b7ba; //
|
6 |
+
$color-5: #f1f1f1; // Scrollbar background
|
7 |
+
$color-6: #e5e5e5; // Hover scrollbar background
|
8 |
+
$color-7: #206ff4; // Scrollbar track background
|
9 |
+
$link-color: #298ffc; // link color.
|
10 |
+
$link-hover-color: #23282d; // link hover color.
|
11 |
+
|
12 |
+
$shadow: 2px 2px 5px rgba(0,0,0,0.05); //Shadow.
|
13 |
+
$border: 1px solid rgba(0, 0, 0, 0.1) ;
|
14 |
+
|
15 |
+
$br-radius: 3px; // Border radius.
|
16 |
+
|
17 |
+
$padding: 5px;
|
18 |
+
$margin: 5px;
|
19 |
+
$max-heught: 700px;
|
20 |
+
|
21 |
+
@import "use-in-js";
|
22 |
+
|
23 |
+
html{
|
24 |
+
font-size: 13px;
|
25 |
+
}
|
26 |
+
.cherry-ui-kit{
|
27 |
+
h1{
|
28 |
+
font-weight: 700;
|
29 |
+
font-size: 2.308rem;
|
30 |
+
line-height: 2.308rem;
|
31 |
+
.dashicons{
|
32 |
+
font-size: 3rem;
|
33 |
+
line-height: inherit;
|
34 |
+
width: 20px;
|
35 |
+
margin: 0 $margin * 2 0 $margin * -0.5;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
h2{
|
39 |
+
font-weight: 600;
|
40 |
+
font-size: 1.538rem;
|
41 |
+
line-height: 1.538rem;
|
42 |
+
.dashicons{
|
43 |
+
font-size: 2rem;
|
44 |
+
line-height: inherit;
|
45 |
+
width: 20px;
|
46 |
+
margin-right: $margin * 2;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
h3{
|
50 |
+
font-weight: 600;
|
51 |
+
font-size: 1.231rem;
|
52 |
+
line-height: 1.231rem;
|
53 |
+
.dashicons{
|
54 |
+
font-size: 1.7rem;
|
55 |
+
line-height: inherit;
|
56 |
+
margin-right: $margin * 0.5;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
h4{
|
60 |
+
font-weight: 500;
|
61 |
+
font-size: 1.077rem;
|
62 |
+
line-height: 1.077rem;
|
63 |
+
|
64 |
+
}
|
65 |
+
h5{
|
66 |
+
font-weight: 500;
|
67 |
+
font-size: 1.077rem;
|
68 |
+
line-height: 1.077rem;
|
69 |
+
}
|
70 |
+
h6{
|
71 |
+
font-weight: 400;
|
72 |
+
font-size: 1rem;
|
73 |
+
line-height: 1rem;
|
74 |
+
}
|
75 |
+
a{
|
76 |
+
color: $link-color;
|
77 |
+
text-decoration: none;
|
78 |
+
&:hover{
|
79 |
+
color: $link-hover-color;
|
80 |
+
}
|
81 |
+
&:focus{
|
82 |
+
outline: 1px solid rgba(41, 143, 252, .6);
|
83 |
+
box-shadow: 0px 0px 2px rgba(41,143,252,0.6);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
&__description{
|
87 |
+
font-size: 0.9rem;
|
88 |
+
color: $color-3;
|
89 |
+
margin: $margin 0;
|
90 |
+
}
|
91 |
+
&__title{
|
92 |
+
margin: $margin*2 0;
|
93 |
+
}
|
94 |
+
&.hide{
|
95 |
+
display: none;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
.cherry-control + .cherry-control, .cherry-settings + .cherry-control{
|
100 |
+
border-top: $border;
|
101 |
+
}
|
102 |
+
|
103 |
+
.cherry-section{
|
104 |
+
padding: $padding;
|
105 |
+
background-color: $color-1;
|
106 |
+
margin-left: -10px;
|
107 |
+
&__title, &__description{
|
108 |
+
margin: $margin 0 0 0;
|
109 |
+
}
|
110 |
+
& + .cherry-ui-kit {
|
111 |
+
border-top: $border;
|
112 |
+
}
|
113 |
+
@media ( min-width: 783px ) {
|
114 |
+
box-shadow:$shadow;
|
115 |
+
border-radius: $br-radius;
|
116 |
+
border: $border;
|
117 |
+
padding: $padding * 1.5;
|
118 |
+
margin: $margin * 1.5 $margin * 1.5 0 0;
|
119 |
+
&__holder{
|
120 |
+
background-color: $color-2;
|
121 |
+
border-radius: $br-radius;
|
122 |
+
padding: $padding * 1.5;
|
123 |
+
}
|
124 |
+
&__inner{
|
125 |
+
|
126 |
+
}
|
127 |
+
&__info{
|
128 |
+
background-color: $color-1;
|
129 |
+
border-radius: $br-radius;
|
130 |
+
padding: $padding * 1.5;
|
131 |
+
box-shadow: $shadow;
|
132 |
+
margin-bottom: $padding * 1.5;
|
133 |
+
}
|
134 |
+
.cherry-settings{
|
135 |
+
box-shadow: $shadow;
|
136 |
+
border-radius: $br-radius;
|
137 |
+
border: $border;
|
138 |
+
background-color: $color-1;
|
139 |
+
margin-top: $padding * 1.5;
|
140 |
+
&:first-child{
|
141 |
+
margin-top: 0;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
@media ( min-width: 961px ) {
|
146 |
+
padding: $padding * 3;
|
147 |
+
margin: $margin * 2 $margin * 2 0 0;
|
148 |
+
&__info{
|
149 |
+
padding: $padding * 3;
|
150 |
+
margin-bottom: $padding * 3;
|
151 |
+
}
|
152 |
+
&__holder{
|
153 |
+
padding: $padding * 3;
|
154 |
+
}
|
155 |
+
.cherry-settings{
|
156 |
+
margin-top: $padding * 3;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
.cherry-component{
|
162 |
+
padding: $padding * 2 0;
|
163 |
+
@media ( min-width: 783px ) {
|
164 |
+
padding: $padding * 1.5;
|
165 |
+
}
|
166 |
+
@media ( min-width: 961px ) {
|
167 |
+
padding: $padding * 3;
|
168 |
+
}
|
169 |
+
& + * {
|
170 |
+
border-top: $border;
|
171 |
+
}
|
172 |
+
&__title{
|
173 |
+
margin-top: 0;
|
174 |
+
}
|
175 |
+
& &__content{
|
176 |
+
.cherry-settings{
|
177 |
+
padding: 0;
|
178 |
+
border-top: none;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
&__button{
|
182 |
+
display: block;
|
183 |
+
min-height: 45px;
|
184 |
+
.cherry-ui-kit__title {
|
185 |
+
color: inherit;
|
186 |
+
}
|
187 |
+
&.active, &:hover{
|
188 |
+
color: $link-color;
|
189 |
+
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
190 |
+
}
|
191 |
+
&:focus{
|
192 |
+
outline: none;
|
193 |
+
box-shadow: inset 0 0 1px 0 rgba(41,143,252,0.5);
|
194 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
195 |
+
}
|
196 |
+
transition: all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);
|
197 |
+
}
|
198 |
+
&.cherry-accordion, &.cherry-toggle{
|
199 |
+
.cherry-component__button{
|
200 |
+
width: 100%;
|
201 |
+
padding: $padding * 1.5 $padding * 2;
|
202 |
+
border:0;
|
203 |
+
background: none;
|
204 |
+
cursor: pointer;
|
205 |
+
position: relative;
|
206 |
+
.widget &{
|
207 |
+
background-color: $widget-bg;
|
208 |
+
color: $color-1;
|
209 |
+
}
|
210 |
+
.cherry-toggle__title {
|
211 |
+
font-weight: 700;
|
212 |
+
font-size: 14px;
|
213 |
+
float: left;
|
214 |
+
margin: 0;
|
215 |
+
}
|
216 |
+
>span[class*="icon"]{
|
217 |
+
position: absolute;
|
218 |
+
top: 50%;
|
219 |
+
right: 5px;
|
220 |
+
margin-top: -10px;
|
221 |
+
|
222 |
+
font-size: 25px;
|
223 |
+
color: $color-4;
|
224 |
+
padding: 5px 5px;
|
225 |
+
width: 10px;
|
226 |
+
height: 9px;
|
227 |
+
text-align: left;
|
228 |
+
overflow: hidden;
|
229 |
+
.widget &{
|
230 |
+
color: $color-1;
|
231 |
+
}
|
232 |
+
&.hide-icon{
|
233 |
+
&:before{
|
234 |
+
position: relative;
|
235 |
+
top: -8px;
|
236 |
+
left: -9px;
|
237 |
+
}
|
238 |
+
transform:scaleX(1);
|
239 |
+
transition: all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
240 |
+
}
|
241 |
+
&.show-icon{
|
242 |
+
&:before{
|
243 |
+
position: relative;
|
244 |
+
top: -7px;
|
245 |
+
left: -9px;
|
246 |
+
}
|
247 |
+
transform:scaleX(0);
|
248 |
+
transition: all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);
|
249 |
+
}
|
250 |
+
}
|
251 |
+
&.active{
|
252 |
+
>span[class*="icon"]{
|
253 |
+
&.show-icon{
|
254 |
+
transform:scaleX(1);
|
255 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
256 |
+
}
|
257 |
+
&.hide-icon{
|
258 |
+
transform:scaleX(0);
|
259 |
+
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
260 |
+
}
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
.cherry-component__button + .cherry-settings__content{
|
265 |
+
border-top: $border;
|
266 |
+
}
|
267 |
+
> .cherry-ui-kit__content{
|
268 |
+
& > .cherry-settings + .cherry-settings{
|
269 |
+
margin-top: $margin;
|
270 |
+
}
|
271 |
+
> .cherry-settings{
|
272 |
+
box-shadow:$shadow;
|
273 |
+
border-radius: $br-radius;
|
274 |
+
border: $border;
|
275 |
+
.widget &{
|
276 |
+
box-shadow:none;
|
277 |
+
border-radius: 0;
|
278 |
+
border-left: 0;
|
279 |
+
border-right: 0;
|
280 |
+
}
|
281 |
+
}
|
282 |
+
}
|
283 |
+
}
|
284 |
+
&.cherry-tab{
|
285 |
+
.cherry-tab__tabs{
|
286 |
+
display: flex;
|
287 |
+
flex-flow: row wrap;
|
288 |
+
justify-content: flex-start;
|
289 |
+
align-items: flex-start;
|
290 |
+
align-content: flex-start;
|
291 |
+
border-bottom: $border;
|
292 |
+
.cherry-component__button{
|
293 |
+
order: 0;
|
294 |
+
flex: 0 1 100%;
|
295 |
+
align-self: auto;
|
296 |
+
padding: $padding * 1.5 $padding * 2;
|
297 |
+
border: 0;
|
298 |
+
background: none;
|
299 |
+
cursor: pointer;
|
300 |
+
&.active{
|
301 |
+
-ms-box-shadow: inset 0px -3px 0px 0px $link-color;
|
302 |
+
box-shadow: inset 0px -3px 0px 0px $link-color;
|
303 |
+
}
|
304 |
+
.cherry-tab__title {
|
305 |
+
font-weight: 700;
|
306 |
+
font-size: 14px;
|
307 |
+
float: left;
|
308 |
+
margin: 0;
|
309 |
+
}
|
310 |
+
& + button{
|
311 |
+
border-top: $border;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
}
|
315 |
+
.cherry-tab__body{
|
316 |
+
box-shadow:$shadow;
|
317 |
+
border-radius: $br-radius;
|
318 |
+
border: $border;
|
319 |
+
background-color: $color-1;
|
320 |
+
.cherry-settings{
|
321 |
+
box-shadow: none;
|
322 |
+
border-radius: 0;
|
323 |
+
border: none;
|
324 |
+
background-color: inherit;
|
325 |
+
margin: 0;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
@media ( min-width: 783px ) {
|
329 |
+
.cherry-tab__tabs{
|
330 |
+
border: solid 1px rgba(0,0,0,0.1);
|
331 |
+
.cherry-component__button{
|
332 |
+
& + button{
|
333 |
+
border-top: none;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
.cherry-tab__body{
|
338 |
+
border: none;
|
339 |
+
.cherry-tab__content{
|
340 |
+
border: $border;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
&--horizontal{
|
344 |
+
>.cherry-tab__body{
|
345 |
+
border-radius: none;
|
346 |
+
>.cherry-tab__tabs{
|
347 |
+
flex-wrap: nowrap;
|
348 |
+
flex-direction: row;
|
349 |
+
border-radius:$br-radius $br-radius 0 0;
|
350 |
+
border-bottom: none;
|
351 |
+
.cherry-component__button{
|
352 |
+
flex: 0 1 auto;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
>.cherry-tab__content{
|
356 |
+
border-radius: 0 0 $br-radius $br-radius;
|
357 |
+
}
|
358 |
+
}
|
359 |
+
}
|
360 |
+
&--vertical{
|
361 |
+
>.cherry-tab__body{
|
362 |
+
display: flex;
|
363 |
+
border-radius: none;
|
364 |
+
>.cherry-tab__tabs{
|
365 |
+
flex-direction: row;
|
366 |
+
-webkit-box-flex: 0;
|
367 |
+
flex: 0 1 20%;
|
368 |
+
border-radius:$br-radius 0 0 $br-radius;
|
369 |
+
border-right: none;
|
370 |
+
.cherry-component__button{
|
371 |
+
text-align: right;
|
372 |
+
.cherry-tab__title {
|
373 |
+
width: 100%;
|
374 |
+
}
|
375 |
+
&.active{
|
376 |
+
box-shadow: inset -3px 0px 0px $link-color;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
}
|
380 |
+
>.cherry-tab__content{
|
381 |
+
-webkit-box-flex: 0;
|
382 |
+
flex: 0 1 80%;
|
383 |
+
border-radius: 0 $br-radius $br-radius 0;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
@media ( min-width: 1200px ) {
|
389 |
+
&--vertical{
|
390 |
+
.cherry-tab__tabs{
|
391 |
+
flex: 0 1 20%;
|
392 |
+
}
|
393 |
+
.cherry-tab__content{
|
394 |
+
flex: 0 1 80%;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
}
|
398 |
+
}
|
399 |
+
.widget &{
|
400 |
+
padding: 0;
|
401 |
+
&__content{
|
402 |
+
margin: 0 $margin * -1.5 $margin * 2;
|
403 |
+
.cherry-control{
|
404 |
+
padding: $padding * 1.5 $padding * 2;
|
405 |
+
}
|
406 |
+
}
|
407 |
+
}
|
408 |
+
}
|
409 |
+
.cherry-settings{
|
410 |
+
& + & {
|
411 |
+
border-top: $border;
|
412 |
+
}
|
413 |
+
& &__title{
|
414 |
+
margin-bottom: $margin;
|
415 |
+
}
|
416 |
+
&__description, & &__title{
|
417 |
+
margin-left: $margin;
|
418 |
+
@media ( min-width: 783px ) {
|
419 |
+
margin-left: $margin * 1.5;
|
420 |
+
}
|
421 |
+
@media ( min-width: 961px ) {
|
422 |
+
margin-left: $margin * 3;
|
423 |
+
}
|
424 |
+
}
|
425 |
+
}
|
426 |
+
.cherry-control{
|
427 |
+
padding: $padding * 3 0;
|
428 |
+
margin: 0 $margin;
|
429 |
+
|
430 |
+
&__title{
|
431 |
+
margin: 0 0 $margin 0 ;
|
432 |
+
}
|
433 |
+
&__description{
|
434 |
+
margin-top: 0;
|
435 |
+
}
|
436 |
+
.cherry-ui-container {
|
437 |
+
margin: 0;
|
438 |
+
}
|
439 |
+
|
440 |
+
@media (min-width: 783px) {
|
441 |
+
padding: $padding * 4;
|
442 |
+
margin: 0 $margin * 1.5;
|
443 |
+
|
444 |
+
display: flex;
|
445 |
+
flex-flow: row nowrap;
|
446 |
+
&__info{
|
447 |
+
-webkit-box-flex: 0;
|
448 |
+
flex: 0 1 30%;
|
449 |
+
padding-right: $padding * 1.5;
|
450 |
+
}
|
451 |
+
&__content{
|
452 |
+
-webkit-box-flex: 0;
|
453 |
+
flex: 0 1 70%;
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
@media ( min-width: 961px ) {
|
458 |
+
padding: $padding * 6 0;
|
459 |
+
margin: 0 $margin * 3;
|
460 |
+
}
|
461 |
+
|
462 |
+
.widget & {
|
463 |
+
padding: $padding * 1.5 0;
|
464 |
+
flex-direction: column;
|
465 |
+
&__content{
|
466 |
+
-webkit-box-flex: 0;
|
467 |
+
flex: 0 1 100%;
|
468 |
+
}
|
469 |
+
&__info{
|
470 |
+
-webkit-box-flex: 0;
|
471 |
+
flex: 0 1 100%;
|
472 |
+
padding-right: 0;
|
473 |
+
}
|
474 |
+
}
|
475 |
+
}
|
476 |
+
|
477 |
+
.cherry-section.cherry-scroll > .cherry-section__holder > .cherry-section__inner,
|
478 |
+
.cherry-tab__content > .cherry-scroll,
|
479 |
+
.cherry-accordion__content > .cherry-scroll > .cherry-settings__content,
|
480 |
+
.cherry-toggle__content > .cherry-scroll > .cherry-settings__content,
|
481 |
+
{
|
482 |
+
@media ( min-width: 783px ) {
|
483 |
+
max-height: $max-heught;
|
484 |
+
overflow-y: auto;
|
485 |
+
position: relative;
|
486 |
+
&::-webkit-scrollbar {
|
487 |
+
width: 10px;
|
488 |
+
height: 10px;
|
489 |
+
&-button {
|
490 |
+
width: 0px;
|
491 |
+
height: 0px;
|
492 |
+
}
|
493 |
+
&-thumb {
|
494 |
+
background-color: $link-color;
|
495 |
+
border: none;
|
496 |
+
border-radius: $br-radius;
|
497 |
+
&:hover, &:active {
|
498 |
+
background: $color-7;
|
499 |
+
}
|
500 |
+
}
|
501 |
+
&-track {
|
502 |
+
background-color: $color-1;
|
503 |
+
border: none;
|
504 |
+
border-radius: $br-radius;
|
505 |
+
}
|
506 |
+
&-corner {
|
507 |
+
background: transparent;
|
508 |
+
}
|
509 |
+
}
|
510 |
+
}
|
511 |
+
}
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/min/cherry-interface-builder.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.cherry-ui-kit button *{pointer-events:none}.cherry-component__content .cherry-settings__content{display:none}.cherry-component__content .cherry-settings__content.show{display:inherit}html{font-size:13px}.cherry-ui-kit h1{font-weight:700;font-size:2.308rem;line-height:2.308rem}.cherry-ui-kit h1 .dashicons{font-size:3rem;line-height:inherit;width:20px;margin:0 10px 0 -2.5px}.cherry-ui-kit h2{font-weight:600;font-size:1.538rem;line-height:1.538rem}.cherry-ui-kit h2 .dashicons{font-size:2rem;line-height:inherit;width:20px;margin-right:10px}.cherry-ui-kit h3{font-weight:600;font-size:1.231rem;line-height:1.231rem}.cherry-ui-kit h3 .dashicons{font-size:1.7rem;line-height:inherit;margin-right:2.5px}.cherry-ui-kit h4{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h5{font-weight:500;font-size:1.077rem;line-height:1.077rem}.cherry-ui-kit h6{font-weight:400;font-size:1rem;line-height:1rem}.cherry-ui-kit a{color:#298ffc;text-decoration:none}.cherry-ui-kit a:hover{color:#23282d}.cherry-ui-kit a:focus{outline:1px solid rgba(41,143,252,0.6);box-shadow:0px 0px 2px rgba(41,143,252,0.6)}.cherry-ui-kit__description{font-size:0.9rem;color:#96989a;margin:5px 0}.cherry-ui-kit__title{margin:10px 0}.cherry-ui-kit.hide{display:none}.cherry-control+.cherry-control,.cherry-settings+.cherry-control{border-top:1px solid rgba(0,0,0,0.1)}.cherry-section{padding:5px;background-color:#fff;margin-left:-10px}.cherry-section__title,.cherry-section__description{margin:5px 0 0 0}.cherry-section+.cherry-ui-kit{border-top:1px solid rgba(0,0,0,0.1)}@media (min-width: 783px){.cherry-section{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);padding:7.5px;margin:7.5px 7.5px 0 0}.cherry-section__holder{background-color:#efefef;border-radius:3px;padding:7.5px}.cherry-section__info{background-color:#fff;border-radius:3px;padding:7.5px;box-shadow:2px 2px 5px rgba(0,0,0,0.05);margin-bottom:7.5px}.cherry-section .cherry-settings{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);background-color:#fff;margin-top:7.5px}.cherry-section .cherry-settings:first-child{margin-top:0}}@media (min-width: 961px){.cherry-section{padding:15px;margin:10px 10px 0 0}.cherry-section__info{padding:15px;margin-bottom:15px}.cherry-section__holder{padding:15px}.cherry-section .cherry-settings{margin-top:15px}}.cherry-component{padding:10px 0}@media (min-width: 783px){.cherry-component{padding:7.5px}}@media (min-width: 961px){.cherry-component{padding:15px}}.cherry-component+*{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component__title{margin-top:0}.cherry-component .cherry-component__content .cherry-settings{padding:0;border-top:none}.cherry-component__button{display:block;min-height:45px;-webkit-transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19);transition:all 300ms cubic-bezier(0.55, 0.055, 0.675, 0.19)}.cherry-component__button .cherry-ui-kit__title{color:inherit}.cherry-component__button.active,.cherry-component__button:hover{color:#298ffc;-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component__button:focus{outline:none;box-shadow:inset 0 0 1px 0 rgba(41,143,252,0.5);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button,.cherry-component.cherry-toggle .cherry-component__button{width:100%;padding:7.5px 10px;border:0;background:none;cursor:pointer;position:relative}.widget .cherry-component.cherry-accordion .cherry-component__button,.widget .cherry-component.cherry-toggle .cherry-component__button{background-color:#495159;color:#fff}.cherry-component.cherry-accordion .cherry-component__button .cherry-toggle__title,.cherry-component.cherry-toggle .cherry-component__button .cherry-toggle__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{position:absolute;top:50%;right:5px;margin-top:-10px;font-size:25px;color:#b4b7ba;padding:5px 5px;width:10px;height:9px;text-align:left;overflow:hidden}.widget .cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"],.widget .cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"]{color:#fff}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:all 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].hide-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].hide-icon:before{position:relative;top:-8px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1);transition:all 300ms cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button>span[class*="icon"].show-icon:before,.cherry-component.cherry-toggle .cherry-component__button>span[class*="icon"].show-icon:before{position:relative;top:-7px;left:-9px}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].show-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].show-icon{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);transition-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275)}.cherry-component.cherry-accordion .cherry-component__button.active>span[class*="icon"].hide-icon,.cherry-component.cherry-toggle .cherry-component__button.active>span[class*="icon"].hide-icon{-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1);transition-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}.cherry-component.cherry-accordion .cherry-component__button+.cherry-settings__content,.cherry-component.cherry-toggle .cherry-component__button+.cherry-settings__content{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings+.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings+.cherry-settings{margin-top:5px}.cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1)}.widget .cherry-component.cherry-accordion>.cherry-ui-kit__content>.cherry-settings,.widget .cherry-component.cherry-toggle>.cherry-ui-kit__content>.cherry-settings{box-shadow:none;border-radius:0;border-left:0;border-right:0}.cherry-component.cherry-tab .cherry-tab__tabs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start;border-bottom:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0;-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;-webkit-align-self:auto;-ms-flex-item-align:auto;align-self:auto;padding:7.5px 10px;border:0;background:none;cursor:pointer}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button.active{-ms-box-shadow:inset 0px -3px 0px 0px #298ffc;box-shadow:inset 0px -3px 0px 0px #298ffc}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button .cherry-tab__title{font-weight:700;font-size:14px;float:left;margin:0}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__body{box-shadow:2px 2px 5px rgba(0,0,0,0.05);border-radius:3px;border:1px solid rgba(0,0,0,0.1);background-color:#fff}.cherry-component.cherry-tab .cherry-tab__body .cherry-settings{box-shadow:none;border-radius:0;border:none;background-color:inherit;margin:0}@media (min-width: 783px){.cherry-component.cherry-tab .cherry-tab__tabs{border:solid 1px rgba(0,0,0,0.1)}.cherry-component.cherry-tab .cherry-tab__tabs .cherry-component__button+button{border-top:none}.cherry-component.cherry-tab .cherry-tab__body{border:none}.cherry-component.cherry-tab .cherry-tab__body .cherry-tab__content{border:1px solid rgba(0,0,0,0.1)}.cherry-component.cherry-tab--horizontal>.cherry-tab__body{border-radius:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;border-radius:3px 3px 0 0;border-bottom:none}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto}.cherry-component.cherry-tab--horizontal>.cherry-tab__body>.cherry-tab__content{border-radius:0 0 3px 3px}.cherry-component.cherry-tab--vertical>.cherry-tab__body{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-radius:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:0;-webkit-flex:0 1 20%;-ms-flex:0 1 20%;flex:0 1 20%;border-radius:3px 0 0 3px;border-right:none}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button{text-align:right}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button .cherry-tab__title{width:100%}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__tabs .cherry-component__button.active{box-shadow:inset -3px 0px 0px #298ffc}.cherry-component.cherry-tab--vertical>.cherry-tab__body>.cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 80%;-ms-flex:0 1 80%;flex:0 1 80%;border-radius:0 3px 3px 0}}@media (min-width: 1200px){.cherry-component.cherry-tab--vertical .cherry-tab__tabs{-webkit-box-flex:0;-webkit-flex:0 1 20%;-ms-flex:0 1 20%;flex:0 1 20%}.cherry-component.cherry-tab--vertical .cherry-tab__content{-webkit-box-flex:0;-webkit-flex:0 1 80%;-ms-flex:0 1 80%;flex:0 1 80%}}.widget .cherry-component{padding:0}.widget .cherry-component__content{margin:0 -7.5px 10px}.widget .cherry-component__content .cherry-control{padding:7.5px 10px}.cherry-settings+.cherry-settings{border-top:1px solid rgba(0,0,0,0.1)}.cherry-settings .cherry-settings__title{margin-bottom:5px}.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:5px}@media (min-width: 783px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:7.5px}}@media (min-width: 961px){.cherry-settings__description,.cherry-settings .cherry-settings__title{margin-left:15px}}.cherry-control{padding:15px 0;margin:0 5px}.cherry-control__title{margin:0 0 5px 0}.cherry-control__description{margin-top:0}.cherry-control .cherry-ui-container{margin:0}@media (min-width: 783px){.cherry-control{padding:20px;margin:0 7.5px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row nowrap;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 30%;-ms-flex:0 1 30%;flex:0 1 30%;padding-right:7.5px}.cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 70%;-ms-flex:0 1 70%;flex:0 1 70%}}@media (min-width: 961px){.cherry-control{padding:30px 0;margin:0 15px}}.widget .cherry-control{padding:7.5px 0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.widget .cherry-control__content{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%}.widget .cherry-control__info{-webkit-box-flex:0;-webkit-flex:0 1 100%;-ms-flex:0 1 100%;flex:0 1 100%;padding-right:0}@media (min-width: 783px){.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner,.cherry-tab__content>.cherry-scroll,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content{max-height:700px;overflow-y:auto;position:relative}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar{width:10px;height:10px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-button,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-button,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-button{width:0px;height:0px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb{background-color:#298ffc;border:none;border-radius:3px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:hover,.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-thumb:active,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:hover,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-thumb:active,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:hover,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-thumb:active{background:#206ff4}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-track,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-track,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-track{background-color:#fff;border:none;border-radius:3px}.cherry-section.cherry-scroll>.cherry-section__holder>.cherry-section__inner::-webkit-scrollbar-corner,.cherry-tab__content>.cherry-scroll::-webkit-scrollbar-corner,.cherry-accordion__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner,.cherry-toggle__content>.cherry-scroll>.cherry-settings__content::-webkit-scrollbar-corner{background:transparent}}
|
cherry-framework/modules/cherry5-interface-builder/inc/assets/min/cherry-interface-builder.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t,s){"use strict";s.utilites.namespace("interfaceBuilder"),s.interfaceBuilder={init:function(){this.component.init(),t(document).on("cherryInterfaceBuilder",this.component.init.bind(this.component))},component:{tabClass:".cherry-tab",accordionClass:".cherry-accordion",toggleClass:".cherry-toggle",buttonClass:".cherry-component__button",contentClass:".cherry-settings__content",buttonActiveClass:"active",showClass:"show",localStorage:{},init:function(){this.localStorage=this.getState()||{},this.componentInit(this.tabClass),this.componentInit(this.accordionClass),this.componentInit(this.toggleClass),this.addEvent()},addEvent:function(){t("body").off("click.cherryInterfaceBuilder").on("click.cherryInterfaceBuilder",this.tabClass+" "+this.buttonClass+", "+this.toggleClass+" "+this.buttonClass+", "+this.accordionClass+" "+this.buttonClass,this.componentClick.bind(this))},componentInit:function(s){var e=this,a=t(s),o=null,i=null,n=null,l="";a.each(function(a,c){switch(c=t(c),o=c.data("compotent-id"),s){case e.toggleClass:e.localStorage[o]&&e.localStorage[o].length&&(l=e.localStorage[o].join(", ")),t(e.contentClass,c).not(l).addClass(e.showClass).prevAll(e.buttonClass).addClass(e.buttonActiveClass);break;case e.tabClass:case e.accordionClass:e.localStorage[o]?(n=e.localStorage[o][0],i=t('[data-content-id="'+n+'"]',c)):(i=t(e.buttonClass,c).eq(0),n=i.data("content-id")),e.showElement(i,c,n)}})},componentClick:function(s){var e,a=t(s.target),o=a.closest(this.tabClass+", "+this.accordionClass+", "+this.toggleClass),i=new RegExp(this.tabClass+"|"+this.accordionClass+"|"+this.toggleClass),n=o[0].className.match(i)[0].replace(" ","."),l=a.data("content-id"),c=o.data("compotent-id"),r=a.hasClass(this.buttonActiveClass);switch(n){case this.tabClass:r||(this.hideElement(o),this.showElement(a,o,l),this.localStorage[c]=new Array(l),this.setState());break;case this.accordionClass:this.hideElement(o),r?this.localStorage[c]={}:(this.showElement(a,o,l),this.localStorage[c]=new Array(l)),this.setState();break;case this.toggleClass:a.toggleClass(this.buttonActiveClass).nextAll(l).toggleClass(this.showClass),Array.isArray(this.localStorage[c])?(e=this.localStorage[c].indexOf(l),-1!==e?this.localStorage[c].splice(e,1):this.localStorage[c].push(l)):this.localStorage[c]=new Array(l),this.setState()}return a.blur(),!1},showElement:function(s,e,a){s.addClass(this.buttonActiveClass),e.data("content-id",a),t(a,e).addClass(this.showClass)},hideElement:function(s){var e=s.data("content-id");t('[data-content-id="'+e+'"]',s).removeClass(this.buttonActiveClass),t(e,s).removeClass(this.showClass)},getState:function(){try{return JSON.parse(localStorage.getItem("interface-builder"))}catch(t){return!1}},setState:function(){try{localStorage.setItem("interface-builder",JSON.stringify(this.localStorage))}catch(t){return!1}}}},s.interfaceBuilder.init()}(jQuery,window.CherryJsCore);
|
cherry-framework/modules/cherry5-interface-builder/inc/views/component-accordion.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Accordion template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-component cherry-accordion <?php echo esc_attr( $__data['class'] ); ?>" data-compotent-id="#<?php echo esc_attr( $__data['id'] ) ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
20 |
+
<h2 class="cherry-ui-kit__title cherry-component__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h2>
|
21 |
+
<?php } ?>
|
22 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__description cherry-component__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
26 |
+
<div class="cherry-ui-kit__content cherry-component__content cherry-accordion__content" role="group" >
|
27 |
+
<?php echo $__data['children'] ?>
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/component-repeater.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Repeater template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-component cherry-repeater <?php echo esc_attr( $__data['class'] ); ?>" data-compotent-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
20 |
+
<h2 class="cherry-ui-kit__title cherry-component__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h2>
|
21 |
+
<?php } ?>
|
22 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__description cherry-component__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
26 |
+
<div class="cherry-ui-kit__content cherry-component__content" role="group" >
|
27 |
+
<?php echo $__data['children']; ?>
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/component-tab-horizontal.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Horizontal tab template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-component cherry-tab cherry-tab--horizontal <?php echo esc_attr( $__data['class'] ) ?>" data-compotent-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
20 |
+
<h2 class="cherry-ui-kit__title cherry-component__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h2>
|
21 |
+
<?php } ?>
|
22 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__description cherry-component__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
26 |
+
<div class="cherry-tab__body" >
|
27 |
+
<div class="cherry-tab__tabs" role="navigation" >
|
28 |
+
<?php echo $__data['tabs']; ?>
|
29 |
+
</div>
|
30 |
+
<div class="cherry-ui-kit__content cherry-component__content cherry-tab__content" role="group" >
|
31 |
+
<?php echo $__data['children']; ?>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<?php } ?>
|
35 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/component-tab-vertical.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Verticall tab template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-component cherry-tab cherry-tab--vertical <?php echo esc_attr( $__data['class'] ); ?>" data-compotent-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
20 |
+
<h2 class="cherry-ui-kit__title cherry-component__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h2>
|
21 |
+
<?php } ?>
|
22 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__description cherry-component__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
26 |
+
<div class="cherry-tab__body" >
|
27 |
+
<div class="cherry-tab__tabs" role="navigation" >
|
28 |
+
<?php echo $__data['tabs']; ?>
|
29 |
+
</div>
|
30 |
+
<div class="cherry-ui-kit__content cherry-component__content cherry-tab__content" role="group" >
|
31 |
+
<?php echo $__data['children']; ?>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<?php } ?>
|
35 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/component-toggle.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Toggle template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-component cherry-toggle <?php echo esc_attr( $__data['class'] ); ?>" data-compotent-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
20 |
+
<h2 class="cherry-ui-kit__title cherry-component__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h2>
|
21 |
+
<?php } ?>
|
22 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__description cherry-component__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
26 |
+
<div class="cherry-ui-kit__content cherry-component__content cherry-toggle__content" role="group" >
|
27 |
+
<?php echo $__data['children']; ?>
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/control.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Control template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-control <?php echo esc_attr( $__data['class'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) || ! empty( $__data['description'] ) ) { ?>
|
20 |
+
<div class="cherry-control__info">
|
21 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
22 |
+
<h4 class="cherry-ui-kit__title cherry-control__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h4>
|
23 |
+
<?php } ?>
|
24 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
25 |
+
<div class="cherry-ui-kit__description cherry-control__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
26 |
+
<?php } ?>
|
27 |
+
</div>
|
28 |
+
<?php } ?>
|
29 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
30 |
+
<div class="cherry-ui-kit__content cherry-control__content" role="group" >
|
31 |
+
<?php echo $__data['children']; ?>
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/form.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Form template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<form class="cherry-form <?php echo esc_attr( $__data['class'] ); ?>" id="<?php echo esc_attr( $__data['id'] ); ?>" name="<?php echo esc_attr( $__data['id'] ); ?>" accept-charset="<?php echo esc_attr( $__data['accept-charset'] ); ?>" action="<?php echo esc_attr( $__data['action'] ); ?>" autocomplete="<?php echo esc_attr( $__data['autocomplete'] ); ?>" enctype="<?php echo esc_attr( $__data['enctype'] ); ?>" method="<?php echo esc_attr( $__data['method'] ); ?>" target="<?php echo esc_attr( $__data['target'] ); ?>" <?php echo esc_attr( $__data['novalidate'] ); ?> >
|
19 |
+
<?php
|
20 |
+
if ( ! empty( $__data['children'] ) ) {
|
21 |
+
echo $__data['children'];
|
22 |
+
}
|
23 |
+
?>
|
24 |
+
</form>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/html.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* HTML template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit <?php echo esc_attr( $__data['class'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
20 |
+
<div class="cherry-ui-kit__content" role="group" >
|
21 |
+
<?php echo $__data['children']; ?>
|
22 |
+
</div>
|
23 |
+
<?php } ?>
|
24 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/section.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Section template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-section <?php echo esc_attr( $__data['class'] ); ?>" onclick="void(0)">
|
19 |
+
<div class="cherry-section__holder">
|
20 |
+
<div class="cherry-section__inner">
|
21 |
+
<div class="cherry-section__info">
|
22 |
+
<?php if ( ! empty( $__data['title'] ) ) { ?>
|
23 |
+
<h1 class="cherry-ui-kit__title cherry-section__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h1>
|
24 |
+
<?php } ?>
|
25 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
26 |
+
<div class="cherry-ui-kit__description cherry-section__description " role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
27 |
+
<?php } ?>
|
28 |
+
</div>
|
29 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
30 |
+
<div class="cherry-ui-kit__content cherry-section__content" role="group" >
|
31 |
+
<?php echo $__data['children']; ?>
|
32 |
+
</div>
|
33 |
+
<?php } ?>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/settings-children-title.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings title template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<h3 class="cherry-ui-kit__title cherry-settings__title" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h3>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/settings.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Settings template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<div class="cherry-ui-kit cherry-settings <?php echo esc_attr( $__data['class'] ); ?>">
|
19 |
+
<?php if ( ! empty( $__data['title'] ) ) {
|
20 |
+
echo $__data['title'];
|
21 |
+
} ?>
|
22 |
+
<?php if ( ! empty( $__data['children'] ) || ! empty( $__data['description'] ) ) { ?>
|
23 |
+
<div class="cherry-ui-kit__content cherry-settings__content" role="group" id="<?php echo esc_attr( $__data['id'] ); ?>" >
|
24 |
+
<?php if ( ! empty( $__data['description'] ) ) { ?>
|
25 |
+
<div class="cherry-ui-kit__description cherry-settings__description" role="note" ><?php echo wp_kses_post( $__data['description'] ); ?></div>
|
26 |
+
<?php } ?>
|
27 |
+
<?php if ( ! empty( $__data['children'] ) ) { ?>
|
28 |
+
<?php echo $__data['children']; ?>
|
29 |
+
<?php } ?>
|
30 |
+
</div>
|
31 |
+
<?php } ?>
|
32 |
+
</div>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/tab-children-title.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tabs title template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<button class="cherry-tab__button cherry-component__button" role="button" title="<?php echo esc_attr( $__data['title'] ); ?>" aria-expanded="false" data-content-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<h3 class="cherry-ui-kit__title cherry-tab__title" aria-grabbed="true" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h3>
|
20 |
+
</button>
|
cherry-framework/modules/cherry5-interface-builder/inc/views/toggle-children-title.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Toggle title template.
|
4 |
+
*
|
5 |
+
* @package Cherry_Interface_Builder
|
6 |
+
* @subpackage Views
|
7 |
+
* @author Cherry Team <cherryframework@gmail.com>
|
8 |
+
* @copyright Copyright (c) 2012 - 2017, Cherry Team
|
9 |
+
* @link http://www.cherryframework.com/
|
10 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// If this file is called directly, abort.
|
14 |
+
if ( ! defined( 'WPINC' ) ) {
|
15 |
+
die;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<button class="cherry-toggle__header cherry-component__button" role="button" aria-expanded="false" data-content-id="#<?php echo esc_attr( $__data['id'] ); ?>">
|
19 |
+
<h3 class="cherry-ui-kit__title cherry-toggle__title" aria-grabbed="true" role="banner" ><?php echo wp_kses_post( $__data['title'] ); ?></h3>
|
20 |
+
<span class="dashicons dashicons-arrow-down hide-icon"></span>
|
21 |
+
<span class="dashicons dashicons-arrow-up show-icon"></span>
|
22 |
+
</button>
|
cherry-framework/setup.php
CHANGED
@@ -11,17 +11,17 @@
|
|
11 |
* @license http://www.gnu.org/licenses/gpl-3.0.en.html
|
12 |
*/
|
13 |
|
14 |
-
return
|
15 |
global $chery_core_version;
|
16 |
|
17 |
-
$path = trailingslashit( dirname( __FILE__ ) ) .
|
18 |
|
19 |
$data = get_file_data( $path, array(
|
20 |
-
|
21 |
) );
|
22 |
|
23 |
-
if ( isset( $data[
|
24 |
-
$version = $data[
|
25 |
}
|
26 |
|
27 |
$old_versions = null;
|
@@ -31,7 +31,7 @@ return create_function( '', '
|
|
31 |
}
|
32 |
|
33 |
if ( is_array( $old_versions ) && isset( $old_versions[0] ) ) {
|
34 |
-
$compare = version_compare( $old_versions[0], $version,
|
35 |
|
36 |
if ( $compare ) {
|
37 |
$chery_core_version = array();
|
@@ -41,4 +41,4 @@ return create_function( '', '
|
|
41 |
$chery_core_version = array();
|
42 |
$chery_core_version[ $version ] = $path;
|
43 |
}
|
44 |
-
|
11 |
* @license http://www.gnu.org/licenses/gpl-3.0.en.html
|
12 |
*/
|
13 |
|
14 |
+
return function () {
|
15 |
global $chery_core_version;
|
16 |
|
17 |
+
$path = trailingslashit( dirname( __FILE__ ) ) . 'cherry-core.php';
|
18 |
|
19 |
$data = get_file_data( $path, array(
|
20 |
+
'version' => 'Version'
|
21 |
) );
|
22 |
|
23 |
+
if ( isset( $data['version'] ) ) {
|
24 |
+
$version = $data['version'];
|
25 |
}
|
26 |
|
27 |
$old_versions = null;
|
31 |
}
|
32 |
|
33 |
if ( is_array( $old_versions ) && isset( $old_versions[0] ) ) {
|
34 |
+
$compare = version_compare( $old_versions[0], $version, '<' );
|
35 |
|
36 |
if ( $compare ) {
|
37 |
$chery_core_version = array();
|
41 |
$chery_core_version = array();
|
42 |
$chery_core_version[ $version ] = $path;
|
43 |
}
|
44 |
+
};
|
includes/swiper/css/swiper.css
CHANGED
@@ -1,618 +1,618 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.3.5
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: July 31, 2018
|
11 |
-
*/
|
12 |
-
.swiper-container {
|
13 |
-
margin: 0 auto;
|
14 |
-
position: relative;
|
15 |
-
overflow: hidden;
|
16 |
-
list-style: none;
|
17 |
-
padding: 0;
|
18 |
-
/* Fix of Webkit flickering */
|
19 |
-
z-index: 1;
|
20 |
-
}
|
21 |
-
.swiper-container-no-flexbox .swiper-slide {
|
22 |
-
float: left;
|
23 |
-
}
|
24 |
-
.swiper-container-vertical > .swiper-wrapper {
|
25 |
-
-webkit-box-orient: vertical;
|
26 |
-
-webkit-box-direction: normal;
|
27 |
-
-webkit-flex-direction: column;
|
28 |
-
-ms-flex-direction: column;
|
29 |
-
flex-direction: column;
|
30 |
-
}
|
31 |
-
.swiper-wrapper {
|
32 |
-
position: relative;
|
33 |
-
width: 100%;
|
34 |
-
height: 100%;
|
35 |
-
z-index: 1;
|
36 |
-
display: -webkit-box;
|
37 |
-
display: -webkit-flex;
|
38 |
-
display: -ms-flexbox;
|
39 |
-
display: flex;
|
40 |
-
-webkit-transition-property: -webkit-transform;
|
41 |
-
transition-property: -webkit-transform;
|
42 |
-
-o-transition-property: transform;
|
43 |
-
transition-property: transform;
|
44 |
-
transition-property: transform, -webkit-transform;
|
45 |
-
-webkit-box-sizing: content-box;
|
46 |
-
box-sizing: content-box;
|
47 |
-
}
|
48 |
-
.swiper-container-android .swiper-slide,
|
49 |
-
.swiper-wrapper {
|
50 |
-
-webkit-transform: translate3d(0px, 0, 0);
|
51 |
-
transform: translate3d(0px, 0, 0);
|
52 |
-
}
|
53 |
-
.swiper-container-multirow > .swiper-wrapper {
|
54 |
-
-webkit-flex-wrap: wrap;
|
55 |
-
-ms-flex-wrap: wrap;
|
56 |
-
flex-wrap: wrap;
|
57 |
-
}
|
58 |
-
.swiper-container-free-mode > .swiper-wrapper {
|
59 |
-
-webkit-transition-timing-function: ease-out;
|
60 |
-
-o-transition-timing-function: ease-out;
|
61 |
-
transition-timing-function: ease-out;
|
62 |
-
margin: 0 auto;
|
63 |
-
}
|
64 |
-
.swiper-slide {
|
65 |
-
-webkit-flex-shrink: 0;
|
66 |
-
-ms-flex-negative: 0;
|
67 |
-
flex-shrink: 0;
|
68 |
-
width: 100%;
|
69 |
-
height: 100%;
|
70 |
-
position: relative;
|
71 |
-
-webkit-transition-property: -webkit-transform;
|
72 |
-
transition-property: -webkit-transform;
|
73 |
-
-o-transition-property: transform;
|
74 |
-
transition-property: transform;
|
75 |
-
transition-property: transform, -webkit-transform;
|
76 |
-
}
|
77 |
-
.swiper-invisible-blank-slide {
|
78 |
-
visibility: hidden;
|
79 |
-
}
|
80 |
-
/* Auto Height */
|
81 |
-
.swiper-container-autoheight,
|
82 |
-
.swiper-container-autoheight .swiper-slide {
|
83 |
-
height: auto;
|
84 |
-
}
|
85 |
-
.swiper-container-autoheight .swiper-wrapper {
|
86 |
-
-webkit-box-align: start;
|
87 |
-
-webkit-align-items: flex-start;
|
88 |
-
-ms-flex-align: start;
|
89 |
-
align-items: flex-start;
|
90 |
-
-webkit-transition-property: height, -webkit-transform;
|
91 |
-
transition-property: height, -webkit-transform;
|
92 |
-
-o-transition-property: transform, height;
|
93 |
-
transition-property: transform, height;
|
94 |
-
transition-property: transform, height, -webkit-transform;
|
95 |
-
}
|
96 |
-
/* 3D Effects */
|
97 |
-
.swiper-container-3d {
|
98 |
-
-webkit-perspective: 1200px;
|
99 |
-
perspective: 1200px;
|
100 |
-
}
|
101 |
-
.swiper-container-3d .swiper-wrapper,
|
102 |
-
.swiper-container-3d .swiper-slide,
|
103 |
-
.swiper-container-3d .swiper-slide-shadow-left,
|
104 |
-
.swiper-container-3d .swiper-slide-shadow-right,
|
105 |
-
.swiper-container-3d .swiper-slide-shadow-top,
|
106 |
-
.swiper-container-3d .swiper-slide-shadow-bottom,
|
107 |
-
.swiper-container-3d .swiper-cube-shadow {
|
108 |
-
-webkit-transform-style: preserve-3d;
|
109 |
-
transform-style: preserve-3d;
|
110 |
-
}
|
111 |
-
.swiper-container-3d .swiper-slide-shadow-left,
|
112 |
-
.swiper-container-3d .swiper-slide-shadow-right,
|
113 |
-
.swiper-container-3d .swiper-slide-shadow-top,
|
114 |
-
.swiper-container-3d .swiper-slide-shadow-bottom {
|
115 |
-
position: absolute;
|
116 |
-
left: 0;
|
117 |
-
top: 0;
|
118 |
-
width: 100%;
|
119 |
-
height: 100%;
|
120 |
-
pointer-events: none;
|
121 |
-
z-index: 10;
|
122 |
-
}
|
123 |
-
.swiper-container-3d .swiper-slide-shadow-left {
|
124 |
-
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
125 |
-
background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
126 |
-
background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
127 |
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
128 |
-
}
|
129 |
-
.swiper-container-3d .swiper-slide-shadow-right {
|
130 |
-
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
131 |
-
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
132 |
-
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
133 |
-
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
134 |
-
}
|
135 |
-
.swiper-container-3d .swiper-slide-shadow-top {
|
136 |
-
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
137 |
-
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
138 |
-
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
139 |
-
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
140 |
-
}
|
141 |
-
.swiper-container-3d .swiper-slide-shadow-bottom {
|
142 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
143 |
-
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
144 |
-
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
145 |
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
146 |
-
}
|
147 |
-
/* IE10 Windows Phone 8 Fixes */
|
148 |
-
.swiper-container-wp8-horizontal,
|
149 |
-
.swiper-container-wp8-horizontal > .swiper-wrapper {
|
150 |
-
-ms-touch-action: pan-y;
|
151 |
-
touch-action: pan-y;
|
152 |
-
}
|
153 |
-
.swiper-container-wp8-vertical,
|
154 |
-
.swiper-container-wp8-vertical > .swiper-wrapper {
|
155 |
-
-ms-touch-action: pan-x;
|
156 |
-
touch-action: pan-x;
|
157 |
-
}
|
158 |
-
.swiper-button-prev,
|
159 |
-
.swiper-button-next {
|
160 |
-
position: absolute;
|
161 |
-
top: 50%;
|
162 |
-
width: 27px;
|
163 |
-
height: 44px;
|
164 |
-
margin-top: -22px;
|
165 |
-
z-index: 10;
|
166 |
-
cursor: pointer;
|
167 |
-
background-size: 27px 44px;
|
168 |
-
background-position: center;
|
169 |
-
background-repeat: no-repeat;
|
170 |
-
}
|
171 |
-
.swiper-button-prev.swiper-button-disabled,
|
172 |
-
.swiper-button-next.swiper-button-disabled {
|
173 |
-
opacity: 0.35;
|
174 |
-
cursor: auto;
|
175 |
-
pointer-events: none;
|
176 |
-
}
|
177 |
-
.swiper-button-prev,
|
178 |
-
.swiper-container-rtl .swiper-button-next {
|
179 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
180 |
-
left: 10px;
|
181 |
-
right: auto;
|
182 |
-
}
|
183 |
-
.swiper-button-next,
|
184 |
-
.swiper-container-rtl .swiper-button-prev {
|
185 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
186 |
-
right: 10px;
|
187 |
-
left: auto;
|
188 |
-
}
|
189 |
-
.swiper-button-prev.swiper-button-white,
|
190 |
-
.swiper-container-rtl .swiper-button-next.swiper-button-white {
|
191 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
192 |
-
}
|
193 |
-
.swiper-button-next.swiper-button-white,
|
194 |
-
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
|
195 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
196 |
-
}
|
197 |
-
.swiper-button-prev.swiper-button-black,
|
198 |
-
.swiper-container-rtl .swiper-button-next.swiper-button-black {
|
199 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
200 |
-
}
|
201 |
-
.swiper-button-next.swiper-button-black,
|
202 |
-
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
|
203 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
204 |
-
}
|
205 |
-
.swiper-button-lock {
|
206 |
-
display: none;
|
207 |
-
}
|
208 |
-
.swiper-pagination {
|
209 |
-
position: absolute;
|
210 |
-
text-align: center;
|
211 |
-
-webkit-transition: 300ms opacity;
|
212 |
-
-o-transition: 300ms opacity;
|
213 |
-
transition: 300ms opacity;
|
214 |
-
-webkit-transform: translate3d(0, 0, 0);
|
215 |
-
transform: translate3d(0, 0, 0);
|
216 |
-
z-index: 10;
|
217 |
-
}
|
218 |
-
.swiper-pagination.swiper-pagination-hidden {
|
219 |
-
opacity: 0;
|
220 |
-
}
|
221 |
-
/* Common Styles */
|
222 |
-
.swiper-pagination-fraction,
|
223 |
-
.swiper-pagination-custom,
|
224 |
-
.swiper-container-horizontal > .swiper-pagination-bullets {
|
225 |
-
bottom: 10px;
|
226 |
-
left: 0;
|
227 |
-
width: 100%;
|
228 |
-
}
|
229 |
-
/* Bullets */
|
230 |
-
.swiper-pagination-bullets-dynamic {
|
231 |
-
overflow: hidden;
|
232 |
-
font-size: 0;
|
233 |
-
}
|
234 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
235 |
-
-webkit-transform: scale(0.33);
|
236 |
-
-ms-transform: scale(0.33);
|
237 |
-
transform: scale(0.33);
|
238 |
-
position: relative;
|
239 |
-
}
|
240 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
|
241 |
-
-webkit-transform: scale(1);
|
242 |
-
-ms-transform: scale(1);
|
243 |
-
transform: scale(1);
|
244 |
-
}
|
245 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
|
246 |
-
-webkit-transform: scale(1);
|
247 |
-
-ms-transform: scale(1);
|
248 |
-
transform: scale(1);
|
249 |
-
}
|
250 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
|
251 |
-
-webkit-transform: scale(0.66);
|
252 |
-
-ms-transform: scale(0.66);
|
253 |
-
transform: scale(0.66);
|
254 |
-
}
|
255 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
|
256 |
-
-webkit-transform: scale(0.33);
|
257 |
-
-ms-transform: scale(0.33);
|
258 |
-
transform: scale(0.33);
|
259 |
-
}
|
260 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
|
261 |
-
-webkit-transform: scale(0.66);
|
262 |
-
-ms-transform: scale(0.66);
|
263 |
-
transform: scale(0.66);
|
264 |
-
}
|
265 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
|
266 |
-
-webkit-transform: scale(0.33);
|
267 |
-
-ms-transform: scale(0.33);
|
268 |
-
transform: scale(0.33);
|
269 |
-
}
|
270 |
-
.swiper-pagination-bullet {
|
271 |
-
width: 8px;
|
272 |
-
height: 8px;
|
273 |
-
display: inline-block;
|
274 |
-
border-radius: 100%;
|
275 |
-
background: #000;
|
276 |
-
opacity: 0.2;
|
277 |
-
}
|
278 |
-
button.swiper-pagination-bullet {
|
279 |
-
border: none;
|
280 |
-
margin: 0;
|
281 |
-
padding: 0;
|
282 |
-
-webkit-box-shadow: none;
|
283 |
-
box-shadow: none;
|
284 |
-
-webkit-appearance: none;
|
285 |
-
-moz-appearance: none;
|
286 |
-
appearance: none;
|
287 |
-
}
|
288 |
-
.swiper-pagination-clickable .swiper-pagination-bullet {
|
289 |
-
cursor: pointer;
|
290 |
-
}
|
291 |
-
.swiper-pagination-bullet-active {
|
292 |
-
opacity: 1;
|
293 |
-
background: #007aff;
|
294 |
-
}
|
295 |
-
.swiper-container-vertical > .swiper-pagination-bullets {
|
296 |
-
right: 10px;
|
297 |
-
top: 50%;
|
298 |
-
-webkit-transform: translate3d(0px, -50%, 0);
|
299 |
-
transform: translate3d(0px, -50%, 0);
|
300 |
-
}
|
301 |
-
.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
|
302 |
-
margin: 6px 0;
|
303 |
-
display: block;
|
304 |
-
}
|
305 |
-
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
306 |
-
top: 50%;
|
307 |
-
-webkit-transform: translateY(-50%);
|
308 |
-
-ms-transform: translateY(-50%);
|
309 |
-
transform: translateY(-50%);
|
310 |
-
width: 8px;
|
311 |
-
}
|
312 |
-
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
313 |
-
display: inline-block;
|
314 |
-
-webkit-transition: 200ms top, 200ms -webkit-transform;
|
315 |
-
transition: 200ms top, 200ms -webkit-transform;
|
316 |
-
-o-transition: 200ms transform, 200ms top;
|
317 |
-
transition: 200ms transform, 200ms top;
|
318 |
-
transition: 200ms transform, 200ms top, 200ms -webkit-transform;
|
319 |
-
}
|
320 |
-
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
|
321 |
-
margin: 0 4px;
|
322 |
-
}
|
323 |
-
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
324 |
-
left: 50%;
|
325 |
-
-webkit-transform: translateX(-50%);
|
326 |
-
-ms-transform: translateX(-50%);
|
327 |
-
transform: translateX(-50%);
|
328 |
-
white-space: nowrap;
|
329 |
-
}
|
330 |
-
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
331 |
-
-webkit-transition: 200ms left, 200ms -webkit-transform;
|
332 |
-
transition: 200ms left, 200ms -webkit-transform;
|
333 |
-
-o-transition: 200ms transform, 200ms left;
|
334 |
-
transition: 200ms transform, 200ms left;
|
335 |
-
transition: 200ms transform, 200ms left, 200ms -webkit-transform;
|
336 |
-
}
|
337 |
-
.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
338 |
-
-webkit-transition: 200ms right, 200ms -webkit-transform;
|
339 |
-
transition: 200ms right, 200ms -webkit-transform;
|
340 |
-
-o-transition: 200ms transform, 200ms right;
|
341 |
-
transition: 200ms transform, 200ms right;
|
342 |
-
transition: 200ms transform, 200ms right, 200ms -webkit-transform;
|
343 |
-
}
|
344 |
-
/* Progress */
|
345 |
-
.swiper-pagination-progressbar {
|
346 |
-
background: rgba(0, 0, 0, 0.25);
|
347 |
-
position: absolute;
|
348 |
-
}
|
349 |
-
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
350 |
-
background: #007aff;
|
351 |
-
position: absolute;
|
352 |
-
left: 0;
|
353 |
-
top: 0;
|
354 |
-
width: 100%;
|
355 |
-
height: 100%;
|
356 |
-
-webkit-transform: scale(0);
|
357 |
-
-ms-transform: scale(0);
|
358 |
-
transform: scale(0);
|
359 |
-
-webkit-transform-origin: left top;
|
360 |
-
-ms-transform-origin: left top;
|
361 |
-
transform-origin: left top;
|
362 |
-
}
|
363 |
-
.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
364 |
-
-webkit-transform-origin: right top;
|
365 |
-
-ms-transform-origin: right top;
|
366 |
-
transform-origin: right top;
|
367 |
-
}
|
368 |
-
.swiper-container-horizontal > .swiper-pagination-progressbar,
|
369 |
-
.swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
370 |
-
width: 100%;
|
371 |
-
height: 4px;
|
372 |
-
left: 0;
|
373 |
-
top: 0;
|
374 |
-
}
|
375 |
-
.swiper-container-vertical > .swiper-pagination-progressbar,
|
376 |
-
.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
377 |
-
width: 4px;
|
378 |
-
height: 100%;
|
379 |
-
left: 0;
|
380 |
-
top: 0;
|
381 |
-
}
|
382 |
-
.swiper-pagination-white .swiper-pagination-bullet-active {
|
383 |
-
background: #ffffff;
|
384 |
-
}
|
385 |
-
.swiper-pagination-progressbar.swiper-pagination-white {
|
386 |
-
background: rgba(255, 255, 255, 0.25);
|
387 |
-
}
|
388 |
-
.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill {
|
389 |
-
background: #ffffff;
|
390 |
-
}
|
391 |
-
.swiper-pagination-black .swiper-pagination-bullet-active {
|
392 |
-
background: #000000;
|
393 |
-
}
|
394 |
-
.swiper-pagination-progressbar.swiper-pagination-black {
|
395 |
-
background: rgba(0, 0, 0, 0.25);
|
396 |
-
}
|
397 |
-
.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill {
|
398 |
-
background: #000000;
|
399 |
-
}
|
400 |
-
.swiper-pagination-lock {
|
401 |
-
display: none;
|
402 |
-
}
|
403 |
-
/* Scrollbar */
|
404 |
-
.swiper-scrollbar {
|
405 |
-
border-radius: 10px;
|
406 |
-
position: relative;
|
407 |
-
-ms-touch-action: none;
|
408 |
-
background: rgba(0, 0, 0, 0.1);
|
409 |
-
}
|
410 |
-
.swiper-container-horizontal > .swiper-scrollbar {
|
411 |
-
position: absolute;
|
412 |
-
left: 1%;
|
413 |
-
bottom: 3px;
|
414 |
-
z-index: 50;
|
415 |
-
height: 5px;
|
416 |
-
width: 98%;
|
417 |
-
}
|
418 |
-
.swiper-container-vertical > .swiper-scrollbar {
|
419 |
-
position: absolute;
|
420 |
-
right: 3px;
|
421 |
-
top: 1%;
|
422 |
-
z-index: 50;
|
423 |
-
width: 5px;
|
424 |
-
height: 98%;
|
425 |
-
}
|
426 |
-
.swiper-scrollbar-drag {
|
427 |
-
height: 100%;
|
428 |
-
width: 100%;
|
429 |
-
position: relative;
|
430 |
-
background: rgba(0, 0, 0, 0.5);
|
431 |
-
border-radius: 10px;
|
432 |
-
left: 0;
|
433 |
-
top: 0;
|
434 |
-
}
|
435 |
-
.swiper-scrollbar-cursor-drag {
|
436 |
-
cursor: move;
|
437 |
-
}
|
438 |
-
.swiper-scrollbar-lock {
|
439 |
-
display: none;
|
440 |
-
}
|
441 |
-
.swiper-zoom-container {
|
442 |
-
width: 100%;
|
443 |
-
height: 100%;
|
444 |
-
display: -webkit-box;
|
445 |
-
display: -webkit-flex;
|
446 |
-
display: -ms-flexbox;
|
447 |
-
display: flex;
|
448 |
-
-webkit-box-pack: center;
|
449 |
-
-webkit-justify-content: center;
|
450 |
-
-ms-flex-pack: center;
|
451 |
-
justify-content: center;
|
452 |
-
-webkit-box-align: center;
|
453 |
-
-webkit-align-items: center;
|
454 |
-
-ms-flex-align: center;
|
455 |
-
align-items: center;
|
456 |
-
text-align: center;
|
457 |
-
}
|
458 |
-
.swiper-zoom-container > img,
|
459 |
-
.swiper-zoom-container > svg,
|
460 |
-
.swiper-zoom-container > canvas {
|
461 |
-
max-width: 100%;
|
462 |
-
max-height: 100%;
|
463 |
-
-o-object-fit: contain;
|
464 |
-
object-fit: contain;
|
465 |
-
}
|
466 |
-
.swiper-slide-zoomed {
|
467 |
-
cursor: move;
|
468 |
-
}
|
469 |
-
/* Preloader */
|
470 |
-
.swiper-lazy-preloader {
|
471 |
-
width: 42px;
|
472 |
-
height: 42px;
|
473 |
-
position: absolute;
|
474 |
-
left: 50%;
|
475 |
-
top: 50%;
|
476 |
-
margin-left: -21px;
|
477 |
-
margin-top: -21px;
|
478 |
-
z-index: 10;
|
479 |
-
-webkit-transform-origin: 50%;
|
480 |
-
-ms-transform-origin: 50%;
|
481 |
-
transform-origin: 50%;
|
482 |
-
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
483 |
-
animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
484 |
-
}
|
485 |
-
.swiper-lazy-preloader:after {
|
486 |
-
display: block;
|
487 |
-
content: '';
|
488 |
-
width: 100%;
|
489 |
-
height: 100%;
|
490 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
491 |
-
background-position: 50%;
|
492 |
-
background-size: 100%;
|
493 |
-
background-repeat: no-repeat;
|
494 |
-
}
|
495 |
-
.swiper-lazy-preloader-white:after {
|
496 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
497 |
-
}
|
498 |
-
@-webkit-keyframes swiper-preloader-spin {
|
499 |
-
100% {
|
500 |
-
-webkit-transform: rotate(360deg);
|
501 |
-
transform: rotate(360deg);
|
502 |
-
}
|
503 |
-
}
|
504 |
-
@keyframes swiper-preloader-spin {
|
505 |
-
100% {
|
506 |
-
-webkit-transform: rotate(360deg);
|
507 |
-
transform: rotate(360deg);
|
508 |
-
}
|
509 |
-
}
|
510 |
-
/* a11y */
|
511 |
-
.swiper-container .swiper-notification {
|
512 |
-
position: absolute;
|
513 |
-
left: 0;
|
514 |
-
top: 0;
|
515 |
-
pointer-events: none;
|
516 |
-
opacity: 0;
|
517 |
-
z-index: -1000;
|
518 |
-
}
|
519 |
-
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
|
520 |
-
-webkit-transition-timing-function: ease-out;
|
521 |
-
-o-transition-timing-function: ease-out;
|
522 |
-
transition-timing-function: ease-out;
|
523 |
-
}
|
524 |
-
.swiper-container-fade .swiper-slide {
|
525 |
-
pointer-events: none;
|
526 |
-
-webkit-transition-property: opacity;
|
527 |
-
-o-transition-property: opacity;
|
528 |
-
transition-property: opacity;
|
529 |
-
}
|
530 |
-
.swiper-container-fade .swiper-slide .swiper-slide {
|
531 |
-
pointer-events: none;
|
532 |
-
}
|
533 |
-
.swiper-container-fade .swiper-slide-active,
|
534 |
-
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
|
535 |
-
pointer-events: auto;
|
536 |
-
}
|
537 |
-
.swiper-container-cube {
|
538 |
-
overflow: visible;
|
539 |
-
}
|
540 |
-
.swiper-container-cube .swiper-slide {
|
541 |
-
pointer-events: none;
|
542 |
-
-webkit-backface-visibility: hidden;
|
543 |
-
backface-visibility: hidden;
|
544 |
-
z-index: 1;
|
545 |
-
visibility: hidden;
|
546 |
-
-webkit-transform-origin: 0 0;
|
547 |
-
-ms-transform-origin: 0 0;
|
548 |
-
transform-origin: 0 0;
|
549 |
-
width: 100%;
|
550 |
-
height: 100%;
|
551 |
-
}
|
552 |
-
.swiper-container-cube .swiper-slide .swiper-slide {
|
553 |
-
pointer-events: none;
|
554 |
-
}
|
555 |
-
.swiper-container-cube.swiper-container-rtl .swiper-slide {
|
556 |
-
-webkit-transform-origin: 100% 0;
|
557 |
-
-ms-transform-origin: 100% 0;
|
558 |
-
transform-origin: 100% 0;
|
559 |
-
}
|
560 |
-
.swiper-container-cube .swiper-slide-active,
|
561 |
-
.swiper-container-cube .swiper-slide-active .swiper-slide-active {
|
562 |
-
pointer-events: auto;
|
563 |
-
}
|
564 |
-
.swiper-container-cube .swiper-slide-active,
|
565 |
-
.swiper-container-cube .swiper-slide-next,
|
566 |
-
.swiper-container-cube .swiper-slide-prev,
|
567 |
-
.swiper-container-cube .swiper-slide-next + .swiper-slide {
|
568 |
-
pointer-events: auto;
|
569 |
-
visibility: visible;
|
570 |
-
}
|
571 |
-
.swiper-container-cube .swiper-slide-shadow-top,
|
572 |
-
.swiper-container-cube .swiper-slide-shadow-bottom,
|
573 |
-
.swiper-container-cube .swiper-slide-shadow-left,
|
574 |
-
.swiper-container-cube .swiper-slide-shadow-right {
|
575 |
-
z-index: 0;
|
576 |
-
-webkit-backface-visibility: hidden;
|
577 |
-
backface-visibility: hidden;
|
578 |
-
}
|
579 |
-
.swiper-container-cube .swiper-cube-shadow {
|
580 |
-
position: absolute;
|
581 |
-
left: 0;
|
582 |
-
bottom: 0px;
|
583 |
-
width: 100%;
|
584 |
-
height: 100%;
|
585 |
-
background: #000;
|
586 |
-
opacity: 0.6;
|
587 |
-
-webkit-filter: blur(50px);
|
588 |
-
filter: blur(50px);
|
589 |
-
z-index: 0;
|
590 |
-
}
|
591 |
-
.swiper-container-flip {
|
592 |
-
overflow: visible;
|
593 |
-
}
|
594 |
-
.swiper-container-flip .swiper-slide {
|
595 |
-
pointer-events: none;
|
596 |
-
-webkit-backface-visibility: hidden;
|
597 |
-
backface-visibility: hidden;
|
598 |
-
z-index: 1;
|
599 |
-
}
|
600 |
-
.swiper-container-flip .swiper-slide .swiper-slide {
|
601 |
-
pointer-events: none;
|
602 |
-
}
|
603 |
-
.swiper-container-flip .swiper-slide-active,
|
604 |
-
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
|
605 |
-
pointer-events: auto;
|
606 |
-
}
|
607 |
-
.swiper-container-flip .swiper-slide-shadow-top,
|
608 |
-
.swiper-container-flip .swiper-slide-shadow-bottom,
|
609 |
-
.swiper-container-flip .swiper-slide-shadow-left,
|
610 |
-
.swiper-container-flip .swiper-slide-shadow-right {
|
611 |
-
z-index: 0;
|
612 |
-
-webkit-backface-visibility: hidden;
|
613 |
-
backface-visibility: hidden;
|
614 |
-
}
|
615 |
-
.swiper-container-coverflow .swiper-wrapper {
|
616 |
-
/* Windows 8 IE 10 fix */
|
617 |
-
-ms-perspective: 1200px;
|
618 |
-
}
|
1 |
+
/**
|
2 |
+
* Swiper 4.3.5
|
3 |
+
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
+
* http://www.idangero.us/swiper/
|
5 |
+
*
|
6 |
+
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
+
*
|
8 |
+
* Released under the MIT License
|
9 |
+
*
|
10 |
+
* Released on: July 31, 2018
|
11 |
+
*/
|
12 |
+
.swiper-container {
|
13 |
+
margin: 0 auto;
|
14 |
+
position: relative;
|
15 |
+
overflow: hidden;
|
16 |
+
list-style: none;
|
17 |
+
padding: 0;
|
18 |
+
/* Fix of Webkit flickering */
|
19 |
+
z-index: 1;
|
20 |
+
}
|
21 |
+
.swiper-container-no-flexbox .swiper-slide {
|
22 |
+
float: left;
|
23 |
+
}
|
24 |
+
.swiper-container-vertical > .swiper-wrapper {
|
25 |
+
-webkit-box-orient: vertical;
|
26 |
+
-webkit-box-direction: normal;
|
27 |
+
-webkit-flex-direction: column;
|
28 |
+
-ms-flex-direction: column;
|
29 |
+
flex-direction: column;
|
30 |
+
}
|
31 |
+
.swiper-wrapper {
|
32 |
+
position: relative;
|
33 |
+
width: 100%;
|
34 |
+
height: 100%;
|
35 |
+
z-index: 1;
|
36 |
+
display: -webkit-box;
|
37 |
+
display: -webkit-flex;
|
38 |
+
display: -ms-flexbox;
|
39 |
+
display: flex;
|
40 |
+
-webkit-transition-property: -webkit-transform;
|
41 |
+
transition-property: -webkit-transform;
|
42 |
+
-o-transition-property: transform;
|
43 |
+
transition-property: transform;
|
44 |
+
transition-property: transform, -webkit-transform;
|
45 |
+
-webkit-box-sizing: content-box;
|
46 |
+
box-sizing: content-box;
|
47 |
+
}
|
48 |
+
.swiper-container-android .swiper-slide,
|
49 |
+
.swiper-wrapper {
|
50 |
+
-webkit-transform: translate3d(0px, 0, 0);
|
51 |
+
transform: translate3d(0px, 0, 0);
|
52 |
+
}
|
53 |
+
.swiper-container-multirow > .swiper-wrapper {
|
54 |
+
-webkit-flex-wrap: wrap;
|
55 |
+
-ms-flex-wrap: wrap;
|
56 |
+
flex-wrap: wrap;
|
57 |
+
}
|
58 |
+
.swiper-container-free-mode > .swiper-wrapper {
|
59 |
+
-webkit-transition-timing-function: ease-out;
|
60 |
+
-o-transition-timing-function: ease-out;
|
61 |
+
transition-timing-function: ease-out;
|
62 |
+
margin: 0 auto;
|
63 |
+
}
|
64 |
+
.swiper-slide {
|
65 |
+
-webkit-flex-shrink: 0;
|
66 |
+
-ms-flex-negative: 0;
|
67 |
+
flex-shrink: 0;
|
68 |
+
width: 100%;
|
69 |
+
height: 100%;
|
70 |
+
position: relative;
|
71 |
+
-webkit-transition-property: -webkit-transform;
|
72 |
+
transition-property: -webkit-transform;
|
73 |
+
-o-transition-property: transform;
|
74 |
+
transition-property: transform;
|
75 |
+
transition-property: transform, -webkit-transform;
|
76 |
+
}
|
77 |
+
.swiper-invisible-blank-slide {
|
78 |
+
visibility: hidden;
|
79 |
+
}
|
80 |
+
/* Auto Height */
|
81 |
+
.swiper-container-autoheight,
|
82 |
+
.swiper-container-autoheight .swiper-slide {
|
83 |
+
height: auto;
|
84 |
+
}
|
85 |
+
.swiper-container-autoheight .swiper-wrapper {
|
86 |
+
-webkit-box-align: start;
|
87 |
+
-webkit-align-items: flex-start;
|
88 |
+
-ms-flex-align: start;
|
89 |
+
align-items: flex-start;
|
90 |
+
-webkit-transition-property: height, -webkit-transform;
|
91 |
+
transition-property: height, -webkit-transform;
|
92 |
+
-o-transition-property: transform, height;
|
93 |
+
transition-property: transform, height;
|
94 |
+
transition-property: transform, height, -webkit-transform;
|
95 |
+
}
|
96 |
+
/* 3D Effects */
|
97 |
+
.swiper-container-3d {
|
98 |
+
-webkit-perspective: 1200px;
|
99 |
+
perspective: 1200px;
|
100 |
+
}
|
101 |
+
.swiper-container-3d .swiper-wrapper,
|
102 |
+
.swiper-container-3d .swiper-slide,
|
103 |
+
.swiper-container-3d .swiper-slide-shadow-left,
|
104 |
+
.swiper-container-3d .swiper-slide-shadow-right,
|
105 |
+
.swiper-container-3d .swiper-slide-shadow-top,
|
106 |
+
.swiper-container-3d .swiper-slide-shadow-bottom,
|
107 |
+
.swiper-container-3d .swiper-cube-shadow {
|
108 |
+
-webkit-transform-style: preserve-3d;
|
109 |
+
transform-style: preserve-3d;
|
110 |
+
}
|
111 |
+
.swiper-container-3d .swiper-slide-shadow-left,
|
112 |
+
.swiper-container-3d .swiper-slide-shadow-right,
|
113 |
+
.swiper-container-3d .swiper-slide-shadow-top,
|
114 |
+
.swiper-container-3d .swiper-slide-shadow-bottom {
|
115 |
+
position: absolute;
|
116 |
+
left: 0;
|
117 |
+
top: 0;
|
118 |
+
width: 100%;
|
119 |
+
height: 100%;
|
120 |
+
pointer-events: none;
|
121 |
+
z-index: 10;
|
122 |
+
}
|
123 |
+
.swiper-container-3d .swiper-slide-shadow-left {
|
124 |
+
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
125 |
+
background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
126 |
+
background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
127 |
+
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
128 |
+
}
|
129 |
+
.swiper-container-3d .swiper-slide-shadow-right {
|
130 |
+
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
131 |
+
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
132 |
+
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
133 |
+
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
134 |
+
}
|
135 |
+
.swiper-container-3d .swiper-slide-shadow-top {
|
136 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
137 |
+
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
138 |
+
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
139 |
+
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
140 |
+
}
|
141 |
+
.swiper-container-3d .swiper-slide-shadow-bottom {
|
142 |
+
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
143 |
+
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
144 |
+
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
145 |
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
146 |
+
}
|
147 |
+
/* IE10 Windows Phone 8 Fixes */
|
148 |
+
.swiper-container-wp8-horizontal,
|
149 |
+
.swiper-container-wp8-horizontal > .swiper-wrapper {
|
150 |
+
-ms-touch-action: pan-y;
|
151 |
+
touch-action: pan-y;
|
152 |
+
}
|
153 |
+
.swiper-container-wp8-vertical,
|
154 |
+
.swiper-container-wp8-vertical > .swiper-wrapper {
|
155 |
+
-ms-touch-action: pan-x;
|
156 |
+
touch-action: pan-x;
|
157 |
+
}
|
158 |
+
.swiper-button-prev,
|
159 |
+
.swiper-button-next {
|
160 |
+
position: absolute;
|
161 |
+
top: 50%;
|
162 |
+
width: 27px;
|
163 |
+
height: 44px;
|
164 |
+
margin-top: -22px;
|
165 |
+
z-index: 10;
|
166 |
+
cursor: pointer;
|
167 |
+
background-size: 27px 44px;
|
168 |
+
background-position: center;
|
169 |
+
background-repeat: no-repeat;
|
170 |
+
}
|
171 |
+
.swiper-button-prev.swiper-button-disabled,
|
172 |
+
.swiper-button-next.swiper-button-disabled {
|
173 |
+
opacity: 0.35;
|
174 |
+
cursor: auto;
|
175 |
+
pointer-events: none;
|
176 |
+
}
|
177 |
+
.swiper-button-prev,
|
178 |
+
.swiper-container-rtl .swiper-button-next {
|
179 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
180 |
+
left: 10px;
|
181 |
+
right: auto;
|
182 |
+
}
|
183 |
+
.swiper-button-next,
|
184 |
+
.swiper-container-rtl .swiper-button-prev {
|
185 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
186 |
+
right: 10px;
|
187 |
+
left: auto;
|
188 |
+
}
|
189 |
+
.swiper-button-prev.swiper-button-white,
|
190 |
+
.swiper-container-rtl .swiper-button-next.swiper-button-white {
|
191 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
192 |
+
}
|
193 |
+
.swiper-button-next.swiper-button-white,
|
194 |
+
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
|
195 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
196 |
+
}
|
197 |
+
.swiper-button-prev.swiper-button-black,
|
198 |
+
.swiper-container-rtl .swiper-button-next.swiper-button-black {
|
199 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
200 |
+
}
|
201 |
+
.swiper-button-next.swiper-button-black,
|
202 |
+
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
|
203 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
204 |
+
}
|
205 |
+
.swiper-button-lock {
|
206 |
+
display: none;
|
207 |
+
}
|
208 |
+
.swiper-pagination {
|
209 |
+
position: absolute;
|
210 |
+
text-align: center;
|
211 |
+
-webkit-transition: 300ms opacity;
|
212 |
+
-o-transition: 300ms opacity;
|
213 |
+
transition: 300ms opacity;
|
214 |
+
-webkit-transform: translate3d(0, 0, 0);
|
215 |
+
transform: translate3d(0, 0, 0);
|
216 |
+
z-index: 10;
|
217 |
+
}
|
218 |
+
.swiper-pagination.swiper-pagination-hidden {
|
219 |
+
opacity: 0;
|
220 |
+
}
|
221 |
+
/* Common Styles */
|
222 |
+
.swiper-pagination-fraction,
|
223 |
+
.swiper-pagination-custom,
|
224 |
+
.swiper-container-horizontal > .swiper-pagination-bullets {
|
225 |
+
bottom: 10px;
|
226 |
+
left: 0;
|
227 |
+
width: 100%;
|
228 |
+
}
|
229 |
+
/* Bullets */
|
230 |
+
.swiper-pagination-bullets-dynamic {
|
231 |
+
overflow: hidden;
|
232 |
+
font-size: 0;
|
233 |
+
}
|
234 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
235 |
+
-webkit-transform: scale(0.33);
|
236 |
+
-ms-transform: scale(0.33);
|
237 |
+
transform: scale(0.33);
|
238 |
+
position: relative;
|
239 |
+
}
|
240 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
|
241 |
+
-webkit-transform: scale(1);
|
242 |
+
-ms-transform: scale(1);
|
243 |
+
transform: scale(1);
|
244 |
+
}
|
245 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
|
246 |
+
-webkit-transform: scale(1);
|
247 |
+
-ms-transform: scale(1);
|
248 |
+
transform: scale(1);
|
249 |
+
}
|
250 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
|
251 |
+
-webkit-transform: scale(0.66);
|
252 |
+
-ms-transform: scale(0.66);
|
253 |
+
transform: scale(0.66);
|
254 |
+
}
|
255 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
|
256 |
+
-webkit-transform: scale(0.33);
|
257 |
+
-ms-transform: scale(0.33);
|
258 |
+
transform: scale(0.33);
|
259 |
+
}
|
260 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
|
261 |
+
-webkit-transform: scale(0.66);
|
262 |
+
-ms-transform: scale(0.66);
|
263 |
+
transform: scale(0.66);
|
264 |
+
}
|
265 |
+
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
|
266 |
+
-webkit-transform: scale(0.33);
|
267 |
+
-ms-transform: scale(0.33);
|
268 |
+
transform: scale(0.33);
|
269 |
+
}
|
270 |
+
.swiper-pagination-bullet {
|
271 |
+
width: 8px;
|
272 |
+
height: 8px;
|
273 |
+
display: inline-block;
|
274 |
+
border-radius: 100%;
|
275 |
+
background: #000;
|
276 |
+
opacity: 0.2;
|
277 |
+
}
|
278 |
+
button.swiper-pagination-bullet {
|
279 |
+
border: none;
|
280 |
+
margin: 0;
|
281 |
+
padding: 0;
|
282 |
+
-webkit-box-shadow: none;
|
283 |
+
box-shadow: none;
|
284 |
+
-webkit-appearance: none;
|
285 |
+
-moz-appearance: none;
|
286 |
+
appearance: none;
|
287 |
+
}
|
288 |
+
.swiper-pagination-clickable .swiper-pagination-bullet {
|
289 |
+
cursor: pointer;
|
290 |
+
}
|
291 |
+
.swiper-pagination-bullet-active {
|
292 |
+
opacity: 1;
|
293 |
+
background: #007aff;
|
294 |
+
}
|
295 |
+
.swiper-container-vertical > .swiper-pagination-bullets {
|
296 |
+
right: 10px;
|
297 |
+
top: 50%;
|
298 |
+
-webkit-transform: translate3d(0px, -50%, 0);
|
299 |
+
transform: translate3d(0px, -50%, 0);
|
300 |
+
}
|
301 |
+
.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
|
302 |
+
margin: 6px 0;
|
303 |
+
display: block;
|
304 |
+
}
|
305 |
+
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
306 |
+
top: 50%;
|
307 |
+
-webkit-transform: translateY(-50%);
|
308 |
+
-ms-transform: translateY(-50%);
|
309 |
+
transform: translateY(-50%);
|
310 |
+
width: 8px;
|
311 |
+
}
|
312 |
+
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
313 |
+
display: inline-block;
|
314 |
+
-webkit-transition: 200ms top, 200ms -webkit-transform;
|
315 |
+
transition: 200ms top, 200ms -webkit-transform;
|
316 |
+
-o-transition: 200ms transform, 200ms top;
|
317 |
+
transition: 200ms transform, 200ms top;
|
318 |
+
transition: 200ms transform, 200ms top, 200ms -webkit-transform;
|
319 |
+
}
|
320 |
+
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
|
321 |
+
margin: 0 4px;
|
322 |
+
}
|
323 |
+
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
324 |
+
left: 50%;
|
325 |
+
-webkit-transform: translateX(-50%);
|
326 |
+
-ms-transform: translateX(-50%);
|
327 |
+
transform: translateX(-50%);
|
328 |
+
white-space: nowrap;
|
329 |
+
}
|
330 |
+
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
331 |
+
-webkit-transition: 200ms left, 200ms -webkit-transform;
|
332 |
+
transition: 200ms left, 200ms -webkit-transform;
|
333 |
+
-o-transition: 200ms transform, 200ms left;
|
334 |
+
transition: 200ms transform, 200ms left;
|
335 |
+
transition: 200ms transform, 200ms left, 200ms -webkit-transform;
|
336 |
+
}
|
337 |
+
.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
338 |
+
-webkit-transition: 200ms right, 200ms -webkit-transform;
|
339 |
+
transition: 200ms right, 200ms -webkit-transform;
|
340 |
+
-o-transition: 200ms transform, 200ms right;
|
341 |
+
transition: 200ms transform, 200ms right;
|
342 |
+
transition: 200ms transform, 200ms right, 200ms -webkit-transform;
|
343 |
+
}
|
344 |
+
/* Progress */
|
345 |
+
.swiper-pagination-progressbar {
|
346 |
+
background: rgba(0, 0, 0, 0.25);
|
347 |
+
position: absolute;
|
348 |
+
}
|
349 |
+
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
350 |
+
background: #007aff;
|
351 |
+
position: absolute;
|
352 |
+
left: 0;
|
353 |
+
top: 0;
|
354 |
+
width: 100%;
|
355 |
+
height: 100%;
|
356 |
+
-webkit-transform: scale(0);
|
357 |
+
-ms-transform: scale(0);
|
358 |
+
transform: scale(0);
|
359 |
+
-webkit-transform-origin: left top;
|
360 |
+
-ms-transform-origin: left top;
|
361 |
+
transform-origin: left top;
|
362 |
+
}
|
363 |
+
.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
364 |
+
-webkit-transform-origin: right top;
|
365 |
+
-ms-transform-origin: right top;
|
366 |
+
transform-origin: right top;
|
367 |
+
}
|
368 |
+
.swiper-container-horizontal > .swiper-pagination-progressbar,
|
369 |
+
.swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
370 |
+
width: 100%;
|
371 |
+
height: 4px;
|
372 |
+
left: 0;
|
373 |
+
top: 0;
|
374 |
+
}
|
375 |
+
.swiper-container-vertical > .swiper-pagination-progressbar,
|
376 |
+
.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
377 |
+
width: 4px;
|
378 |
+
height: 100%;
|
379 |
+
left: 0;
|
380 |
+
top: 0;
|
381 |
+
}
|
382 |
+
.swiper-pagination-white .swiper-pagination-bullet-active {
|
383 |
+
background: #ffffff;
|
384 |
+
}
|
385 |
+
.swiper-pagination-progressbar.swiper-pagination-white {
|
386 |
+
background: rgba(255, 255, 255, 0.25);
|
387 |
+
}
|
388 |
+
.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill {
|
389 |
+
background: #ffffff;
|
390 |
+
}
|
391 |
+
.swiper-pagination-black .swiper-pagination-bullet-active {
|
392 |
+
background: #000000;
|
393 |
+
}
|
394 |
+
.swiper-pagination-progressbar.swiper-pagination-black {
|
395 |
+
background: rgba(0, 0, 0, 0.25);
|
396 |
+
}
|
397 |
+
.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill {
|
398 |
+
background: #000000;
|
399 |
+
}
|
400 |
+
.swiper-pagination-lock {
|
401 |
+
display: none;
|
402 |
+
}
|
403 |
+
/* Scrollbar */
|
404 |
+
.swiper-scrollbar {
|
405 |
+
border-radius: 10px;
|
406 |
+
position: relative;
|
407 |
+
-ms-touch-action: none;
|
408 |
+
background: rgba(0, 0, 0, 0.1);
|
409 |
+
}
|
410 |
+
.swiper-container-horizontal > .swiper-scrollbar {
|
411 |
+
position: absolute;
|
412 |
+
left: 1%;
|
413 |
+
bottom: 3px;
|
414 |
+
z-index: 50;
|
415 |
+
height: 5px;
|
416 |
+
width: 98%;
|
417 |
+
}
|
418 |
+
.swiper-container-vertical > .swiper-scrollbar {
|
419 |
+
position: absolute;
|
420 |
+
right: 3px;
|
421 |
+
top: 1%;
|
422 |
+
z-index: 50;
|
423 |
+
width: 5px;
|
424 |
+
height: 98%;
|
425 |
+
}
|
426 |
+
.swiper-scrollbar-drag {
|
427 |
+
height: 100%;
|
428 |
+
width: 100%;
|
429 |
+
position: relative;
|
430 |
+
background: rgba(0, 0, 0, 0.5);
|
431 |
+
border-radius: 10px;
|
432 |
+
left: 0;
|
433 |
+
top: 0;
|
434 |
+
}
|
435 |
+
.swiper-scrollbar-cursor-drag {
|
436 |
+
cursor: move;
|
437 |
+
}
|
438 |
+
.swiper-scrollbar-lock {
|
439 |
+
display: none;
|
440 |
+
}
|
441 |
+
.swiper-zoom-container {
|
442 |
+
width: 100%;
|
443 |
+
height: 100%;
|
444 |
+
display: -webkit-box;
|
445 |
+
display: -webkit-flex;
|
446 |
+
display: -ms-flexbox;
|
447 |
+
display: flex;
|
448 |
+
-webkit-box-pack: center;
|
449 |
+
-webkit-justify-content: center;
|
450 |
+
-ms-flex-pack: center;
|
451 |
+
justify-content: center;
|
452 |
+
-webkit-box-align: center;
|
453 |
+
-webkit-align-items: center;
|
454 |
+
-ms-flex-align: center;
|
455 |
+
align-items: center;
|
456 |
+
text-align: center;
|
457 |
+
}
|
458 |
+
.swiper-zoom-container > img,
|
459 |
+
.swiper-zoom-container > svg,
|
460 |
+
.swiper-zoom-container > canvas {
|
461 |
+
max-width: 100%;
|
462 |
+
max-height: 100%;
|
463 |
+
-o-object-fit: contain;
|
464 |
+
object-fit: contain;
|
465 |
+
}
|
466 |
+
.swiper-slide-zoomed {
|
467 |
+
cursor: move;
|
468 |
+
}
|
469 |
+
/* Preloader */
|
470 |
+
.swiper-lazy-preloader {
|
471 |
+
width: 42px;
|
472 |
+
height: 42px;
|
473 |
+
position: absolute;
|
474 |
+
left: 50%;
|
475 |
+
top: 50%;
|
476 |
+
margin-left: -21px;
|
477 |
+
margin-top: -21px;
|
478 |
+
z-index: 10;
|
479 |
+
-webkit-transform-origin: 50%;
|
480 |
+
-ms-transform-origin: 50%;
|
481 |
+
transform-origin: 50%;
|
482 |
+
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
483 |
+
animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
484 |
+
}
|
485 |
+
.swiper-lazy-preloader:after {
|
486 |
+
display: block;
|
487 |
+
content: '';
|
488 |
+
width: 100%;
|
489 |
+
height: 100%;
|
490 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
491 |
+
background-position: 50%;
|
492 |
+
background-size: 100%;
|
493 |
+
background-repeat: no-repeat;
|
494 |
+
}
|
495 |
+
.swiper-lazy-preloader-white:after {
|
496 |
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
497 |
+
}
|
498 |
+
@-webkit-keyframes swiper-preloader-spin {
|
499 |
+
100% {
|
500 |
+
-webkit-transform: rotate(360deg);
|
501 |
+
transform: rotate(360deg);
|
502 |
+
}
|
503 |
+
}
|
504 |
+
@keyframes swiper-preloader-spin {
|
505 |
+
100% {
|
506 |
+
-webkit-transform: rotate(360deg);
|
507 |
+
transform: rotate(360deg);
|
508 |
+
}
|
509 |
+
}
|
510 |
+
/* a11y */
|
511 |
+
.swiper-container .swiper-notification {
|
512 |
+
position: absolute;
|
513 |
+
left: 0;
|
514 |
+
top: 0;
|
515 |
+
pointer-events: none;
|
516 |
+
opacity: 0;
|
517 |
+
z-index: -1000;
|
518 |
+
}
|
519 |
+
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
|
520 |
+
-webkit-transition-timing-function: ease-out;
|
521 |
+
-o-transition-timing-function: ease-out;
|
522 |
+
transition-timing-function: ease-out;
|
523 |
+
}
|
524 |
+
.swiper-container-fade .swiper-slide {
|
525 |
+
pointer-events: none;
|
526 |
+
-webkit-transition-property: opacity;
|
527 |
+
-o-transition-property: opacity;
|
528 |
+
transition-property: opacity;
|
529 |
+
}
|
530 |
+
.swiper-container-fade .swiper-slide .swiper-slide {
|
531 |
+
pointer-events: none;
|
532 |
+
}
|
533 |
+
.swiper-container-fade .swiper-slide-active,
|
534 |
+
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
|
535 |
+
pointer-events: auto;
|
536 |
+
}
|
537 |
+
.swiper-container-cube {
|
538 |
+
overflow: visible;
|
539 |
+
}
|
540 |
+
.swiper-container-cube .swiper-slide {
|
541 |
+
pointer-events: none;
|
542 |
+
-webkit-backface-visibility: hidden;
|
543 |
+
backface-visibility: hidden;
|
544 |
+
z-index: 1;
|
545 |
+
visibility: hidden;
|
546 |
+
-webkit-transform-origin: 0 0;
|
547 |
+
-ms-transform-origin: 0 0;
|
548 |
+
transform-origin: 0 0;
|
549 |
+
width: 100%;
|
550 |
+
height: 100%;
|
551 |
+
}
|
552 |
+
.swiper-container-cube .swiper-slide .swiper-slide {
|
553 |
+
pointer-events: none;
|
554 |
+
}
|
555 |
+
.swiper-container-cube.swiper-container-rtl .swiper-slide {
|
556 |
+
-webkit-transform-origin: 100% 0;
|
557 |
+
-ms-transform-origin: 100% 0;
|
558 |
+
transform-origin: 100% 0;
|
559 |
+
}
|
560 |
+
.swiper-container-cube .swiper-slide-active,
|
561 |
+
.swiper-container-cube .swiper-slide-active .swiper-slide-active {
|
562 |
+
pointer-events: auto;
|
563 |
+
}
|
564 |
+
.swiper-container-cube .swiper-slide-active,
|
565 |
+
.swiper-container-cube .swiper-slide-next,
|
566 |
+
.swiper-container-cube .swiper-slide-prev,
|
567 |
+
.swiper-container-cube .swiper-slide-next + .swiper-slide {
|
568 |
+
pointer-events: auto;
|
569 |
+
visibility: visible;
|
570 |
+
}
|
571 |
+
.swiper-container-cube .swiper-slide-shadow-top,
|
572 |
+
.swiper-container-cube .swiper-slide-shadow-bottom,
|
573 |
+
.swiper-container-cube .swiper-slide-shadow-left,
|
574 |
+
.swiper-container-cube .swiper-slide-shadow-right {
|
575 |
+
z-index: 0;
|
576 |
+
-webkit-backface-visibility: hidden;
|
577 |
+
backface-visibility: hidden;
|
578 |
+
}
|
579 |
+
.swiper-container-cube .swiper-cube-shadow {
|
580 |
+
position: absolute;
|
581 |
+
left: 0;
|
582 |
+
bottom: 0px;
|
583 |
+
width: 100%;
|
584 |
+
height: 100%;
|
585 |
+
background: #000;
|
586 |
+
opacity: 0.6;
|
587 |
+
-webkit-filter: blur(50px);
|
588 |
+
filter: blur(50px);
|
589 |
+
z-index: 0;
|
590 |
+
}
|
591 |
+
.swiper-container-flip {
|
592 |
+
overflow: visible;
|
593 |
+
}
|
594 |
+
.swiper-container-flip .swiper-slide {
|
595 |
+
pointer-events: none;
|
596 |
+
-webkit-backface-visibility: hidden;
|
597 |
+
backface-visibility: hidden;
|
598 |
+
z-index: 1;
|
599 |
+
}
|
600 |
+
.swiper-container-flip .swiper-slide .swiper-slide {
|
601 |
+
pointer-events: none;
|
602 |
+
}
|
603 |
+
.swiper-container-flip .swiper-slide-active,
|
604 |
+
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
|
605 |
+
pointer-events: auto;
|
606 |
+
}
|
607 |
+
.swiper-container-flip .swiper-slide-shadow-top,
|
608 |
+
.swiper-container-flip .swiper-slide-shadow-bottom,
|
609 |
+
.swiper-container-flip .swiper-slide-shadow-left,
|
610 |
+
.swiper-container-flip .swiper-slide-shadow-right {
|
611 |
+
z-index: 0;
|
612 |
+
-webkit-backface-visibility: hidden;
|
613 |
+
backface-visibility: hidden;
|
614 |
+
}
|
615 |
+
.swiper-container-coverflow .swiper-wrapper {
|
616 |
+
/* Windows 8 IE 10 fix */
|
617 |
+
-ms-perspective: 1200px;
|
618 |
+
}
|
includes/swiper/css/swiper.min.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.3.5
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: July 31, 2018
|
11 |
-
*/
|
12 |
.swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-invisible-blank-slide{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
|
1 |
+
/**
|
2 |
+
* Swiper 4.3.5
|
3 |
+
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
+
* http://www.idangero.us/swiper/
|
5 |
+
*
|
6 |
+
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
+
*
|
8 |
+
* Released under the MIT License
|
9 |
+
*
|
10 |
+
* Released on: July 31, 2018
|
11 |
+
*/
|
12 |
.swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-invisible-blank-slide{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
|
includes/swiper/js/swiper.jquery.js
DELETED
@@ -1,4686 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 3.4.2
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
*
|
5 |
-
* http://www.idangero.us/swiper/
|
6 |
-
*
|
7 |
-
* Copyright 2017, Vladimir Kharlampidi
|
8 |
-
* The iDangero.us
|
9 |
-
* http://www.idangero.us/
|
10 |
-
*
|
11 |
-
* Licensed under MIT
|
12 |
-
*
|
13 |
-
* Released on: March 10, 2017
|
14 |
-
*/
|
15 |
-
(function () {
|
16 |
-
'use strict';
|
17 |
-
var $;
|
18 |
-
|
19 |
-
/*===========================
|
20 |
-
Swiper
|
21 |
-
===========================*/
|
22 |
-
var Swiper = function (container, params) {
|
23 |
-
if (!(this instanceof Swiper)) return new Swiper(container, params);
|
24 |
-
|
25 |
-
|
26 |
-
var defaults = {
|
27 |
-
direction: 'horizontal',
|
28 |
-
touchEventsTarget: 'container',
|
29 |
-
initialSlide: 0,
|
30 |
-
speed: 300,
|
31 |
-
// autoplay
|
32 |
-
autoplay: false,
|
33 |
-
autoplayDisableOnInteraction: true,
|
34 |
-
autoplayStopOnLast: false,
|
35 |
-
// To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
|
36 |
-
iOSEdgeSwipeDetection: false,
|
37 |
-
iOSEdgeSwipeThreshold: 20,
|
38 |
-
// Free mode
|
39 |
-
freeMode: false,
|
40 |
-
freeModeMomentum: true,
|
41 |
-
freeModeMomentumRatio: 1,
|
42 |
-
freeModeMomentumBounce: true,
|
43 |
-
freeModeMomentumBounceRatio: 1,
|
44 |
-
freeModeMomentumVelocityRatio: 1,
|
45 |
-
freeModeSticky: false,
|
46 |
-
freeModeMinimumVelocity: 0.02,
|
47 |
-
// Autoheight
|
48 |
-
autoHeight: false,
|
49 |
-
// Set wrapper width
|
50 |
-
setWrapperSize: false,
|
51 |
-
// Virtual Translate
|
52 |
-
virtualTranslate: false,
|
53 |
-
// Effects
|
54 |
-
effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
55 |
-
coverflow: {
|
56 |
-
rotate: 50,
|
57 |
-
stretch: 0,
|
58 |
-
depth: 100,
|
59 |
-
modifier: 1,
|
60 |
-
slideShadows : true
|
61 |
-
},
|
62 |
-
flip: {
|
63 |
-
slideShadows : true,
|
64 |
-
limitRotation: true
|
65 |
-
},
|
66 |
-
cube: {
|
67 |
-
slideShadows: true,
|
68 |
-
shadow: true,
|
69 |
-
shadowOffset: 20,
|
70 |
-
shadowScale: 0.94
|
71 |
-
},
|
72 |
-
fade: {
|
73 |
-
crossFade: false
|
74 |
-
},
|
75 |
-
// Parallax
|
76 |
-
parallax: false,
|
77 |
-
// Zoom
|
78 |
-
zoom: false,
|
79 |
-
zoomMax: 3,
|
80 |
-
zoomMin: 1,
|
81 |
-
zoomToggle: true,
|
82 |
-
// Scrollbar
|
83 |
-
scrollbar: null,
|
84 |
-
scrollbarHide: true,
|
85 |
-
scrollbarDraggable: false,
|
86 |
-
scrollbarSnapOnRelease: false,
|
87 |
-
// Keyboard Mousewheel
|
88 |
-
keyboardControl: false,
|
89 |
-
mousewheelControl: false,
|
90 |
-
mousewheelReleaseOnEdges: false,
|
91 |
-
mousewheelInvert: false,
|
92 |
-
mousewheelForceToAxis: false,
|
93 |
-
mousewheelSensitivity: 1,
|
94 |
-
mousewheelEventsTarged: 'container',
|
95 |
-
// Hash Navigation
|
96 |
-
hashnav: false,
|
97 |
-
hashnavWatchState: false,
|
98 |
-
// History
|
99 |
-
history: false,
|
100 |
-
// Commong Nav State
|
101 |
-
replaceState: false,
|
102 |
-
// Breakpoints
|
103 |
-
breakpoints: undefined,
|
104 |
-
// Slides grid
|
105 |
-
spaceBetween: 0,
|
106 |
-
slidesPerView: 1,
|
107 |
-
slidesPerColumn: 1,
|
108 |
-
slidesPerColumnFill: 'column',
|
109 |
-
slidesPerGroup: 1,
|
110 |
-
centeredSlides: false,
|
111 |
-
slidesOffsetBefore: 0, // in px
|
112 |
-
slidesOffsetAfter: 0, // in px
|
113 |
-
// Round length
|
114 |
-
roundLengths: false,
|
115 |
-
// Touches
|
116 |
-
touchRatio: 1,
|
117 |
-
touchAngle: 45,
|
118 |
-
simulateTouch: true,
|
119 |
-
shortSwipes: true,
|
120 |
-
longSwipes: true,
|
121 |
-
longSwipesRatio: 0.5,
|
122 |
-
longSwipesMs: 300,
|
123 |
-
followFinger: true,
|
124 |
-
onlyExternal: false,
|
125 |
-
threshold: 0,
|
126 |
-
touchMoveStopPropagation: true,
|
127 |
-
touchReleaseOnEdges: false,
|
128 |
-
// Unique Navigation Elements
|
129 |
-
uniqueNavElements: true,
|
130 |
-
// Pagination
|
131 |
-
pagination: null,
|
132 |
-
paginationElement: 'span',
|
133 |
-
paginationClickable: false,
|
134 |
-
paginationHide: false,
|
135 |
-
paginationBulletRender: null,
|
136 |
-
paginationProgressRender: null,
|
137 |
-
paginationFractionRender: null,
|
138 |
-
paginationCustomRender: null,
|
139 |
-
paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'
|
140 |
-
// Resistance
|
141 |
-
resistance: true,
|
142 |
-
resistanceRatio: 0.85,
|
143 |
-
// Next/prev buttons
|
144 |
-
nextButton: null,
|
145 |
-
prevButton: null,
|
146 |
-
// Progress
|
147 |
-
watchSlidesProgress: false,
|
148 |
-
watchSlidesVisibility: false,
|
149 |
-
// Cursor
|
150 |
-
grabCursor: false,
|
151 |
-
// Clicks
|
152 |
-
preventClicks: true,
|
153 |
-
preventClicksPropagation: true,
|
154 |
-
slideToClickedSlide: false,
|
155 |
-
// Lazy Loading
|
156 |
-
lazyLoading: false,
|
157 |
-
lazyLoadingInPrevNext: false,
|
158 |
-
lazyLoadingInPrevNextAmount: 1,
|
159 |
-
lazyLoadingOnTransitionStart: false,
|
160 |
-
// Images
|
161 |
-
preloadImages: true,
|
162 |
-
updateOnImagesReady: true,
|
163 |
-
// loop
|
164 |
-
loop: false,
|
165 |
-
loopAdditionalSlides: 0,
|
166 |
-
loopedSlides: null,
|
167 |
-
// Control
|
168 |
-
control: undefined,
|
169 |
-
controlInverse: false,
|
170 |
-
controlBy: 'slide', //or 'container'
|
171 |
-
normalizeSlideIndex: true,
|
172 |
-
// Swiping/no swiping
|
173 |
-
allowSwipeToPrev: true,
|
174 |
-
allowSwipeToNext: true,
|
175 |
-
swipeHandler: null, //'.swipe-handler',
|
176 |
-
noSwiping: true,
|
177 |
-
noSwipingClass: 'swiper-no-swiping',
|
178 |
-
// Passive Listeners
|
179 |
-
passiveListeners: true,
|
180 |
-
// NS
|
181 |
-
containerModifierClass: 'swiper-container-', // NEW
|
182 |
-
slideClass: 'swiper-slide',
|
183 |
-
slideActiveClass: 'swiper-slide-active',
|
184 |
-
slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
|
185 |
-
slideVisibleClass: 'swiper-slide-visible',
|
186 |
-
slideDuplicateClass: 'swiper-slide-duplicate',
|
187 |
-
slideNextClass: 'swiper-slide-next',
|
188 |
-
slideDuplicateNextClass: 'swiper-slide-duplicate-next',
|
189 |
-
slidePrevClass: 'swiper-slide-prev',
|
190 |
-
slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
|
191 |
-
wrapperClass: 'swiper-wrapper',
|
192 |
-
bulletClass: 'swiper-pagination-bullet',
|
193 |
-
bulletActiveClass: 'swiper-pagination-bullet-active',
|
194 |
-
buttonDisabledClass: 'swiper-button-disabled',
|
195 |
-
paginationCurrentClass: 'swiper-pagination-current',
|
196 |
-
paginationTotalClass: 'swiper-pagination-total',
|
197 |
-
paginationHiddenClass: 'swiper-pagination-hidden',
|
198 |
-
paginationProgressbarClass: 'swiper-pagination-progressbar',
|
199 |
-
paginationClickableClass: 'swiper-pagination-clickable', // NEW
|
200 |
-
paginationModifierClass: 'swiper-pagination-', // NEW
|
201 |
-
lazyLoadingClass: 'swiper-lazy',
|
202 |
-
lazyStatusLoadingClass: 'swiper-lazy-loading',
|
203 |
-
lazyStatusLoadedClass: 'swiper-lazy-loaded',
|
204 |
-
lazyPreloaderClass: 'swiper-lazy-preloader',
|
205 |
-
notificationClass: 'swiper-notification',
|
206 |
-
preloaderClass: 'preloader',
|
207 |
-
zoomContainerClass: 'swiper-zoom-container',
|
208 |
-
|
209 |
-
// Observer
|
210 |
-
observer: false,
|
211 |
-
observeParents: false,
|
212 |
-
// Accessibility
|
213 |
-
a11y: false,
|
214 |
-
prevSlideMessage: 'Previous slide',
|
215 |
-
nextSlideMessage: 'Next slide',
|
216 |
-
firstSlideMessage: 'This is the first slide',
|
217 |
-
lastSlideMessage: 'This is the last slide',
|
218 |
-
paginationBulletMessage: 'Go to slide {{index}}',
|
219 |
-
// Callbacks
|
220 |
-
runCallbacksOnInit: true
|
221 |
-
/*
|
222 |
-
Callbacks:
|
223 |
-
onInit: function (swiper)
|
224 |
-
onDestroy: function (swiper)
|
225 |
-
onBeforeResize: function (swiper)
|
226 |
-
onAfterResize: function (swiper)
|
227 |
-
onClick: function (swiper, e)
|
228 |
-
onTap: function (swiper, e)
|
229 |
-
onDoubleTap: function (swiper, e)
|
230 |
-
onSliderMove: function (swiper, e)
|
231 |
-
onSlideChangeStart: function (swiper)
|
232 |
-
onSlideChangeEnd: function (swiper)
|
233 |
-
onTransitionStart: function (swiper)
|
234 |
-
onTransitionEnd: function (swiper)
|
235 |
-
onImagesReady: function (swiper)
|
236 |
-
onProgress: function (swiper, progress)
|
237 |
-
onTouchStart: function (swiper, e)
|
238 |
-
onTouchMove: function (swiper, e)
|
239 |
-
onTouchMoveOpposite: function (swiper, e)
|
240 |
-
onTouchEnd: function (swiper, e)
|
241 |
-
onReachBeginning: function (swiper)
|
242 |
-
onReachEnd: function (swiper)
|
243 |
-
onSetTransition: function (swiper, duration)
|
244 |
-
onSetTranslate: function (swiper, translate)
|
245 |
-
onAutoplayStart: function (swiper)
|
246 |
-
onAutoplayStop: function (swiper),
|
247 |
-
onLazyImageLoad: function (swiper, slide, image)
|
248 |
-
onLazyImageReady: function (swiper, slide, image)
|
249 |
-
onKeyPress: function (swiper, keyCode)
|
250 |
-
*/
|
251 |
-
|
252 |
-
};
|
253 |
-
var initialVirtualTranslate = params && params.virtualTranslate;
|
254 |
-
|
255 |
-
params = params || {};
|
256 |
-
var originalParams = {};
|
257 |
-
for (var param in params) {
|
258 |
-
if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {
|
259 |
-
originalParams[param] = {};
|
260 |
-
for (var deepParam in params[param]) {
|
261 |
-
originalParams[param][deepParam] = params[param][deepParam];
|
262 |
-
}
|
263 |
-
}
|
264 |
-
else {
|
265 |
-
originalParams[param] = params[param];
|
266 |
-
}
|
267 |
-
}
|
268 |
-
for (var def in defaults) {
|
269 |
-
if (typeof params[def] === 'undefined') {
|
270 |
-
params[def] = defaults[def];
|
271 |
-
}
|
272 |
-
else if (typeof params[def] === 'object') {
|
273 |
-
for (var deepDef in defaults[def]) {
|
274 |
-
if (typeof params[def][deepDef] === 'undefined') {
|
275 |
-
params[def][deepDef] = defaults[def][deepDef];
|
276 |
-
}
|
277 |
-
}
|
278 |
-
}
|
279 |
-
}
|
280 |
-
|
281 |
-
// Swiper
|
282 |
-
var s = this;
|
283 |
-
|
284 |
-
// Params
|
285 |
-
s.params = params;
|
286 |
-
s.originalParams = originalParams;
|
287 |
-
|
288 |
-
// Classname
|
289 |
-
s.classNames = [];
|
290 |
-
/*=========================
|
291 |
-
Dom Library and plugins
|
292 |
-
===========================*/
|
293 |
-
if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){
|
294 |
-
$ = Dom7;
|
295 |
-
}
|
296 |
-
if (typeof $ === 'undefined') {
|
297 |
-
if (typeof Dom7 === 'undefined') {
|
298 |
-
$ = window.Dom7 || window.Zepto || window.jQuery;
|
299 |
-
}
|
300 |
-
else {
|
301 |
-
$ = Dom7;
|
302 |
-
}
|
303 |
-
if (!$) return;
|
304 |
-
}
|
305 |
-
// Export it to Swiper instance
|
306 |
-
s.$ = $;
|
307 |
-
|
308 |
-
/*=========================
|
309 |
-
Breakpoints
|
310 |
-
===========================*/
|
311 |
-
s.currentBreakpoint = undefined;
|
312 |
-
s.getActiveBreakpoint = function () {
|
313 |
-
//Get breakpoint for window width
|
314 |
-
if (!s.params.breakpoints) return false;
|
315 |
-
var breakpoint = false;
|
316 |
-
var points = [], point;
|
317 |
-
for ( point in s.params.breakpoints ) {
|
318 |
-
if (s.params.breakpoints.hasOwnProperty(point)) {
|
319 |
-
points.push(point);
|
320 |
-
}
|
321 |
-
}
|
322 |
-
points.sort(function (a, b) {
|
323 |
-
return parseInt(a, 10) > parseInt(b, 10);
|
324 |
-
});
|
325 |
-
for (var i = 0; i < points.length; i++) {
|
326 |
-
point = points[i];
|
327 |
-
if (point >= window.innerWidth && !breakpoint) {
|
328 |
-
breakpoint = point;
|
329 |
-
}
|
330 |
-
}
|
331 |
-
return breakpoint || 'max';
|
332 |
-
};
|
333 |
-
s.setBreakpoint = function () {
|
334 |
-
//Set breakpoint for window width and update parameters
|
335 |
-
var breakpoint = s.getActiveBreakpoint();
|
336 |
-
if (breakpoint && s.currentBreakpoint !== breakpoint) {
|
337 |
-
var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
|
338 |
-
var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
|
339 |
-
for ( var param in breakPointsParams ) {
|
340 |
-
s.params[param] = breakPointsParams[param];
|
341 |
-
}
|
342 |
-
s.currentBreakpoint = breakpoint;
|
343 |
-
if(needsReLoop && s.destroyLoop) {
|
344 |
-
s.reLoop(true);
|
345 |
-
}
|
346 |
-
}
|
347 |
-
};
|
348 |
-
// Set breakpoint on load
|
349 |
-
if (s.params.breakpoints) {
|
350 |
-
s.setBreakpoint();
|
351 |
-
}
|
352 |
-
|
353 |
-
/*=========================
|
354 |
-
Preparation - Define Container, Wrapper and Pagination
|
355 |
-
===========================*/
|
356 |
-
s.container = $(container);
|
357 |
-
if (s.container.length === 0) return;
|
358 |
-
if (s.container.length > 1) {
|
359 |
-
var swipers = [];
|
360 |
-
s.container.each(function () {
|
361 |
-
var container = this;
|
362 |
-
swipers.push(new Swiper(this, params));
|
363 |
-
});
|
364 |
-
return swipers;
|
365 |
-
}
|
366 |
-
|
367 |
-
// Save instance in container HTML Element and in data
|
368 |
-
s.container[0].swiper = s;
|
369 |
-
s.container.data('swiper', s);
|
370 |
-
|
371 |
-
s.classNames.push(s.params.containerModifierClass + s.params.direction);
|
372 |
-
|
373 |
-
if (s.params.freeMode) {
|
374 |
-
s.classNames.push(s.params.containerModifierClass + 'free-mode');
|
375 |
-
}
|
376 |
-
if (!s.support.flexbox) {
|
377 |
-
s.classNames.push(s.params.containerModifierClass + 'no-flexbox');
|
378 |
-
s.params.slidesPerColumn = 1;
|
379 |
-
}
|
380 |
-
if (s.params.autoHeight) {
|
381 |
-
s.classNames.push(s.params.containerModifierClass + 'autoheight');
|
382 |
-
}
|
383 |
-
// Enable slides progress when required
|
384 |
-
if (s.params.parallax || s.params.watchSlidesVisibility) {
|
385 |
-
s.params.watchSlidesProgress = true;
|
386 |
-
}
|
387 |
-
// Max resistance when touchReleaseOnEdges
|
388 |
-
if (s.params.touchReleaseOnEdges) {
|
389 |
-
s.params.resistanceRatio = 0;
|
390 |
-
}
|
391 |
-
// Coverflow / 3D
|
392 |
-
if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {
|
393 |
-
if (s.support.transforms3d) {
|
394 |
-
s.params.watchSlidesProgress = true;
|
395 |
-
s.classNames.push(s.params.containerModifierClass + '3d');
|
396 |
-
}
|
397 |
-
else {
|
398 |
-
s.params.effect = 'slide';
|
399 |
-
}
|
400 |
-
}
|
401 |
-
if (s.params.effect !== 'slide') {
|
402 |
-
s.classNames.push(s.params.containerModifierClass + s.params.effect);
|
403 |
-
}
|
404 |
-
if (s.params.effect === 'cube') {
|
405 |
-
s.params.resistanceRatio = 0;
|
406 |
-
s.params.slidesPerView = 1;
|
407 |
-
s.params.slidesPerColumn = 1;
|
408 |
-
s.params.slidesPerGroup = 1;
|
409 |
-
s.params.centeredSlides = false;
|
410 |
-
s.params.spaceBetween = 0;
|
411 |
-
s.params.virtualTranslate = true;
|
412 |
-
}
|
413 |
-
if (s.params.effect === 'fade' || s.params.effect === 'flip') {
|
414 |
-
s.params.slidesPerView = 1;
|
415 |
-
s.params.slidesPerColumn = 1;
|
416 |
-
s.params.slidesPerGroup = 1;
|
417 |
-
s.params.watchSlidesProgress = true;
|
418 |
-
s.params.spaceBetween = 0;
|
419 |
-
if (typeof initialVirtualTranslate === 'undefined') {
|
420 |
-
s.params.virtualTranslate = true;
|
421 |
-
}
|
422 |
-
}
|
423 |
-
|
424 |
-
// Grab Cursor
|
425 |
-
if (s.params.grabCursor && s.support.touch) {
|
426 |
-
s.params.grabCursor = false;
|
427 |
-
}
|
428 |
-
|
429 |
-
// Wrapper
|
430 |
-
s.wrapper = s.container.children('.' + s.params.wrapperClass);
|
431 |
-
|
432 |
-
// Pagination
|
433 |
-
if (s.params.pagination) {
|
434 |
-
s.paginationContainer = $(s.params.pagination);
|
435 |
-
if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
|
436 |
-
s.paginationContainer = s.container.find(s.params.pagination);
|
437 |
-
}
|
438 |
-
|
439 |
-
if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
|
440 |
-
s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable');
|
441 |
-
}
|
442 |
-
else {
|
443 |
-
s.params.paginationClickable = false;
|
444 |
-
}
|
445 |
-
s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType);
|
446 |
-
}
|
447 |
-
// Next/Prev Buttons
|
448 |
-
if (s.params.nextButton || s.params.prevButton) {
|
449 |
-
if (s.params.nextButton) {
|
450 |
-
s.nextButton = $(s.params.nextButton);
|
451 |
-
if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
|
452 |
-
s.nextButton = s.container.find(s.params.nextButton);
|
453 |
-
}
|
454 |
-
}
|
455 |
-
if (s.params.prevButton) {
|
456 |
-
s.prevButton = $(s.params.prevButton);
|
457 |
-
if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
|
458 |
-
s.prevButton = s.container.find(s.params.prevButton);
|
459 |
-
}
|
460 |
-
}
|
461 |
-
}
|
462 |
-
|
463 |
-
// Is Horizontal
|
464 |
-
s.isHorizontal = function () {
|
465 |
-
return s.params.direction === 'horizontal';
|
466 |
-
};
|
467 |
-
// s.isH = isH;
|
468 |
-
|
469 |
-
// RTL
|
470 |
-
s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');
|
471 |
-
if (s.rtl) {
|
472 |
-
s.classNames.push(s.params.containerModifierClass + 'rtl');
|
473 |
-
}
|
474 |
-
|
475 |
-
// Wrong RTL support
|
476 |
-
if (s.rtl) {
|
477 |
-
s.wrongRTL = s.wrapper.css('display') === '-webkit-box';
|
478 |
-
}
|
479 |
-
|
480 |
-
// Columns
|
481 |
-
if (s.params.slidesPerColumn > 1) {
|
482 |
-
s.classNames.push(s.params.containerModifierClass + 'multirow');
|
483 |
-
}
|
484 |
-
|
485 |
-
// Check for Android
|
486 |
-
if (s.device.android) {
|
487 |
-
s.classNames.push(s.params.containerModifierClass + 'android');
|
488 |
-
}
|
489 |
-
|
490 |
-
// Add classes
|
491 |
-
s.container.addClass(s.classNames.join(' '));
|
492 |
-
|
493 |
-
// Translate
|
494 |
-
s.translate = 0;
|
495 |
-
|
496 |
-
// Progress
|
497 |
-
s.progress = 0;
|
498 |
-
|
499 |
-
// Velocity
|
500 |
-
s.velocity = 0;
|
501 |
-
|
502 |
-
/*=========================
|
503 |
-
Locks, unlocks
|
504 |
-
===========================*/
|
505 |
-
s.lockSwipeToNext = function () {
|
506 |
-
s.params.allowSwipeToNext = false;
|
507 |
-
if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {
|
508 |
-
s.unsetGrabCursor();
|
509 |
-
}
|
510 |
-
};
|
511 |
-
s.lockSwipeToPrev = function () {
|
512 |
-
s.params.allowSwipeToPrev = false;
|
513 |
-
if (s.params.allowSwipeToNext === false && s.params.grabCursor) {
|
514 |
-
s.unsetGrabCursor();
|
515 |
-
}
|
516 |
-
};
|
517 |
-
s.lockSwipes = function () {
|
518 |
-
s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;
|
519 |
-
if (s.params.grabCursor) s.unsetGrabCursor();
|
520 |
-
};
|
521 |
-
s.unlockSwipeToNext = function () {
|
522 |
-
s.params.allowSwipeToNext = true;
|
523 |
-
if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {
|
524 |
-
s.setGrabCursor();
|
525 |
-
}
|
526 |
-
};
|
527 |
-
s.unlockSwipeToPrev = function () {
|
528 |
-
s.params.allowSwipeToPrev = true;
|
529 |
-
if (s.params.allowSwipeToNext === true && s.params.grabCursor) {
|
530 |
-
s.setGrabCursor();
|
531 |
-
}
|
532 |
-
};
|
533 |
-
s.unlockSwipes = function () {
|
534 |
-
s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;
|
535 |
-
if (s.params.grabCursor) s.setGrabCursor();
|
536 |
-
};
|
537 |
-
|
538 |
-
/*=========================
|
539 |
-
Round helper
|
540 |
-
===========================*/
|
541 |
-
function round(a) {
|
542 |
-
return Math.floor(a);
|
543 |
-
}
|
544 |
-
/*=========================
|
545 |
-
Set grab cursor
|
546 |
-
===========================*/
|
547 |
-
s.setGrabCursor = function(moving) {
|
548 |
-
s.container[0].style.cursor = 'move';
|
549 |
-
s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
550 |
-
s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
551 |
-
s.container[0].style.cursor = moving ? 'grabbing': 'grab';
|
552 |
-
};
|
553 |
-
s.unsetGrabCursor = function () {
|
554 |
-
s.container[0].style.cursor = '';
|
555 |
-
};
|
556 |
-
if (s.params.grabCursor) {
|
557 |
-
s.setGrabCursor();
|
558 |
-
}
|
559 |
-
/*=========================
|
560 |
-
Update on Images Ready
|
561 |
-
===========================*/
|
562 |
-
s.imagesToLoad = [];
|
563 |
-
s.imagesLoaded = 0;
|
564 |
-
|
565 |
-
s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) {
|
566 |
-
var image;
|
567 |
-
function onReady () {
|
568 |
-
if (callback) callback();
|
569 |
-
}
|
570 |
-
if (!imgElement.complete || !checkForComplete) {
|
571 |
-
if (src) {
|
572 |
-
image = new window.Image();
|
573 |
-
image.onload = onReady;
|
574 |
-
image.onerror = onReady;
|
575 |
-
if (sizes) {
|
576 |
-
image.sizes = sizes;
|
577 |
-
}
|
578 |
-
if (srcset) {
|
579 |
-
image.srcset = srcset;
|
580 |
-
}
|
581 |
-
if (src) {
|
582 |
-
image.src = src;
|
583 |
-
}
|
584 |
-
} else {
|
585 |
-
onReady();
|
586 |
-
}
|
587 |
-
|
588 |
-
} else {//image already loaded...
|
589 |
-
onReady();
|
590 |
-
}
|
591 |
-
};
|
592 |
-
s.preloadImages = function () {
|
593 |
-
s.imagesToLoad = s.container.find('img');
|
594 |
-
function _onReady() {
|
595 |
-
if (typeof s === 'undefined' || s === null || !s) return;
|
596 |
-
if (s.imagesLoaded !== undefined) s.imagesLoaded++;
|
597 |
-
if (s.imagesLoaded === s.imagesToLoad.length) {
|
598 |
-
if (s.params.updateOnImagesReady) s.update();
|
599 |
-
s.emit('onImagesReady', s);
|
600 |
-
}
|
601 |
-
}
|
602 |
-
for (var i = 0; i < s.imagesToLoad.length; i++) {
|
603 |
-
s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady);
|
604 |
-
}
|
605 |
-
};
|
606 |
-
|
607 |
-
/*=========================
|
608 |
-
Autoplay
|
609 |
-
===========================*/
|
610 |
-
s.autoplayTimeoutId = undefined;
|
611 |
-
s.autoplaying = false;
|
612 |
-
s.autoplayPaused = false;
|
613 |
-
function autoplay() {
|
614 |
-
var autoplayDelay = s.params.autoplay;
|
615 |
-
var activeSlide = s.slides.eq(s.activeIndex);
|
616 |
-
if (activeSlide.attr('data-swiper-autoplay')) {
|
617 |
-
autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay;
|
618 |
-
}
|
619 |
-
s.autoplayTimeoutId = setTimeout(function () {
|
620 |
-
if (s.params.loop) {
|
621 |
-
s.fixLoop();
|
622 |
-
s._slideNext();
|
623 |
-
s.emit('onAutoplay', s);
|
624 |
-
}
|
625 |
-
else {
|
626 |
-
if (!s.isEnd) {
|
627 |
-
s._slideNext();
|
628 |
-
s.emit('onAutoplay', s);
|
629 |
-
}
|
630 |
-
else {
|
631 |
-
if (!params.autoplayStopOnLast) {
|
632 |
-
s._slideTo(0);
|
633 |
-
s.emit('onAutoplay', s);
|
634 |
-
}
|
635 |
-
else {
|
636 |
-
s.stopAutoplay();
|
637 |
-
}
|
638 |
-
}
|
639 |
-
}
|
640 |
-
}, autoplayDelay);
|
641 |
-
}
|
642 |
-
s.startAutoplay = function () {
|
643 |
-
if (typeof s.autoplayTimeoutId !== 'undefined') return false;
|
644 |
-
if (!s.params.autoplay) return false;
|
645 |
-
if (s.autoplaying) return false;
|
646 |
-
s.autoplaying = true;
|
647 |
-
s.emit('onAutoplayStart', s);
|
648 |
-
autoplay();
|
649 |
-
};
|
650 |
-
s.stopAutoplay = function (internal) {
|
651 |
-
if (!s.autoplayTimeoutId) return;
|
652 |
-
if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
|
653 |
-
s.autoplaying = false;
|
654 |
-
s.autoplayTimeoutId = undefined;
|
655 |
-
s.emit('onAutoplayStop', s);
|
656 |
-
};
|
657 |
-
s.pauseAutoplay = function (speed) {
|
658 |
-
if (s.autoplayPaused) return;
|
659 |
-
if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
|
660 |
-
s.autoplayPaused = true;
|
661 |
-
if (speed === 0) {
|
662 |
-
s.autoplayPaused = false;
|
663 |
-
autoplay();
|
664 |
-
}
|
665 |
-
else {
|
666 |
-
s.wrapper.transitionEnd(function () {
|
667 |
-
if (!s) return;
|
668 |
-
s.autoplayPaused = false;
|
669 |
-
if (!s.autoplaying) {
|
670 |
-
s.stopAutoplay();
|
671 |
-
}
|
672 |
-
else {
|
673 |
-
autoplay();
|
674 |
-
}
|
675 |
-
});
|
676 |
-
}
|
677 |
-
};
|
678 |
-
/*=========================
|
679 |
-
Min/Max Translate
|
680 |
-
===========================*/
|
681 |
-
s.minTranslate = function () {
|
682 |
-
return (-s.snapGrid[0]);
|
683 |
-
};
|
684 |
-
s.maxTranslate = function () {
|
685 |
-
return (-s.snapGrid[s.snapGrid.length - 1]);
|
686 |
-
};
|
687 |
-
/*=========================
|
688 |
-
Slider/slides sizes
|
689 |
-
===========================*/
|
690 |
-
s.updateAutoHeight = function () {
|
691 |
-
var activeSlides = [];
|
692 |
-
var newHeight = 0;
|
693 |
-
var i;
|
694 |
-
|
695 |
-
// Find slides currently in view
|
696 |
-
if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {
|
697 |
-
for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {
|
698 |
-
var index = s.activeIndex + i;
|
699 |
-
if(index > s.slides.length) break;
|
700 |
-
activeSlides.push(s.slides.eq(index)[0]);
|
701 |
-
}
|
702 |
-
} else {
|
703 |
-
activeSlides.push(s.slides.eq(s.activeIndex)[0]);
|
704 |
-
}
|
705 |
-
|
706 |
-
// Find new height from heighest slide in view
|
707 |
-
for (i = 0; i < activeSlides.length; i++) {
|
708 |
-
if (typeof activeSlides[i] !== 'undefined') {
|
709 |
-
var height = activeSlides[i].offsetHeight;
|
710 |
-
newHeight = height > newHeight ? height : newHeight;
|
711 |
-
}
|
712 |
-
}
|
713 |
-
|
714 |
-
// Update Height
|
715 |
-
if (newHeight) s.wrapper.css('height', newHeight + 'px');
|
716 |
-
};
|
717 |
-
s.updateContainerSize = function () {
|
718 |
-
var width, height;
|
719 |
-
if (typeof s.params.width !== 'undefined') {
|
720 |
-
width = s.params.width;
|
721 |
-
}
|
722 |
-
else {
|
723 |
-
width = s.container[0].clientWidth;
|
724 |
-
}
|
725 |
-
if (typeof s.params.height !== 'undefined') {
|
726 |
-
height = s.params.height;
|
727 |
-
}
|
728 |
-
else {
|
729 |
-
height = s.container[0].clientHeight;
|
730 |
-
}
|
731 |
-
if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {
|
732 |
-
return;
|
733 |
-
}
|
734 |
-
|
735 |
-
//Subtract paddings
|
736 |
-
width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);
|
737 |
-
height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);
|
738 |
-
|
739 |
-
// Store values
|
740 |
-
s.width = width;
|
741 |
-
s.height = height;
|
742 |
-
s.size = s.isHorizontal() ? s.width : s.height;
|
743 |
-
};
|
744 |
-
|
745 |
-
s.updateSlidesSize = function () {
|
746 |
-
s.slides = s.wrapper.children('.' + s.params.slideClass);
|
747 |
-
s.snapGrid = [];
|
748 |
-
s.slidesGrid = [];
|
749 |
-
s.slidesSizesGrid = [];
|
750 |
-
|
751 |
-
var spaceBetween = s.params.spaceBetween,
|
752 |
-
slidePosition = -s.params.slidesOffsetBefore,
|
753 |
-
i,
|
754 |
-
prevSlideSize = 0,
|
755 |
-
index = 0;
|
756 |
-
if (typeof s.size === 'undefined') return;
|
757 |
-
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
758 |
-
spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;
|
759 |
-
}
|
760 |
-
|
761 |
-
s.virtualSize = -spaceBetween;
|
762 |
-
// reset margins
|
763 |
-
if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});
|
764 |
-
else s.slides.css({marginRight: '', marginBottom: ''});
|
765 |
-
|
766 |
-
var slidesNumberEvenToRows;
|
767 |
-
if (s.params.slidesPerColumn > 1) {
|
768 |
-
if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {
|
769 |
-
slidesNumberEvenToRows = s.slides.length;
|
770 |
-
}
|
771 |
-
else {
|
772 |
-
slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;
|
773 |
-
}
|
774 |
-
if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {
|
775 |
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);
|
776 |
-
}
|
777 |
-
}
|
778 |
-
|
779 |
-
// Calc slides
|
780 |
-
var slideSize;
|
781 |
-
var slidesPerColumn = s.params.slidesPerColumn;
|
782 |
-
var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
783 |
-
var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);
|
784 |
-
for (i = 0; i < s.slides.length; i++) {
|
785 |
-
slideSize = 0;
|
786 |
-
var slide = s.slides.eq(i);
|
787 |
-
if (s.params.slidesPerColumn > 1) {
|
788 |
-
// Set slides order
|
789 |
-
var newSlideOrderIndex;
|
790 |
-
var column, row;
|
791 |
-
if (s.params.slidesPerColumnFill === 'column') {
|
792 |
-
column = Math.floor(i / slidesPerColumn);
|
793 |
-
row = i - column * slidesPerColumn;
|
794 |
-
if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {
|
795 |
-
if (++row >= slidesPerColumn) {
|
796 |
-
row = 0;
|
797 |
-
column++;
|
798 |
-
}
|
799 |
-
}
|
800 |
-
newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;
|
801 |
-
slide
|
802 |
-
.css({
|
803 |
-
'-webkit-box-ordinal-group': newSlideOrderIndex,
|
804 |
-
'-moz-box-ordinal-group': newSlideOrderIndex,
|
805 |
-
'-ms-flex-order': newSlideOrderIndex,
|
806 |
-
'-webkit-order': newSlideOrderIndex,
|
807 |
-
'order': newSlideOrderIndex
|
808 |
-
});
|
809 |
-
}
|
810 |
-
else {
|
811 |
-
row = Math.floor(i / slidesPerRow);
|
812 |
-
column = i - row * slidesPerRow;
|
813 |
-
}
|
814 |
-
slide
|
815 |
-
.css(
|
816 |
-
'margin-' + (s.isHorizontal() ? 'top' : 'left'),
|
817 |
-
(row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')
|
818 |
-
)
|
819 |
-
.attr('data-swiper-column', column)
|
820 |
-
.attr('data-swiper-row', row);
|
821 |
-
|
822 |
-
}
|
823 |
-
if (slide.css('display') === 'none') continue;
|
824 |
-
if (s.params.slidesPerView === 'auto') {
|
825 |
-
slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);
|
826 |
-
if (s.params.roundLengths) slideSize = round(slideSize);
|
827 |
-
}
|
828 |
-
else {
|
829 |
-
slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;
|
830 |
-
if (s.params.roundLengths) slideSize = round(slideSize);
|
831 |
-
|
832 |
-
if (s.isHorizontal()) {
|
833 |
-
s.slides[i].style.width = slideSize + 'px';
|
834 |
-
}
|
835 |
-
else {
|
836 |
-
s.slides[i].style.height = slideSize + 'px';
|
837 |
-
}
|
838 |
-
}
|
839 |
-
s.slides[i].swiperSlideSize = slideSize;
|
840 |
-
s.slidesSizesGrid.push(slideSize);
|
841 |
-
|
842 |
-
|
843 |
-
if (s.params.centeredSlides) {
|
844 |
-
slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
|
845 |
-
if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;
|
846 |
-
if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;
|
847 |
-
if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
|
848 |
-
if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
|
849 |
-
s.slidesGrid.push(slidePosition);
|
850 |
-
}
|
851 |
-
else {
|
852 |
-
if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);
|
853 |
-
s.slidesGrid.push(slidePosition);
|
854 |
-
slidePosition = slidePosition + slideSize + spaceBetween;
|
855 |
-
}
|
856 |
-
|
857 |
-
s.virtualSize += slideSize + spaceBetween;
|
858 |
-
|
859 |
-
prevSlideSize = slideSize;
|
860 |
-
|
861 |
-
index ++;
|
862 |
-
}
|
863 |
-
s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;
|
864 |
-
var newSlidesGrid;
|
865 |
-
|
866 |
-
if (
|
867 |
-
s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {
|
868 |
-
s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
|
869 |
-
}
|
870 |
-
if (!s.support.flexbox || s.params.setWrapperSize) {
|
871 |
-
if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
|
872 |
-
else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});
|
873 |
-
}
|
874 |
-
|
875 |
-
if (s.params.slidesPerColumn > 1) {
|
876 |
-
s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;
|
877 |
-
s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;
|
878 |
-
if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});
|
879 |
-
else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});
|
880 |
-
if (s.params.centeredSlides) {
|
881 |
-
newSlidesGrid = [];
|
882 |
-
for (i = 0; i < s.snapGrid.length; i++) {
|
883 |
-
if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);
|
884 |
-
}
|
885 |
-
s.snapGrid = newSlidesGrid;
|
886 |
-
}
|
887 |
-
}
|
888 |
-
|
889 |
-
// Remove last grid elements depending on width
|
890 |
-
if (!s.params.centeredSlides) {
|
891 |
-
newSlidesGrid = [];
|
892 |
-
for (i = 0; i < s.snapGrid.length; i++) {
|
893 |
-
if (s.snapGrid[i] <= s.virtualSize - s.size) {
|
894 |
-
newSlidesGrid.push(s.snapGrid[i]);
|
895 |
-
}
|
896 |
-
}
|
897 |
-
s.snapGrid = newSlidesGrid;
|
898 |
-
if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {
|
899 |
-
s.snapGrid.push(s.virtualSize - s.size);
|
900 |
-
}
|
901 |
-
}
|
902 |
-
if (s.snapGrid.length === 0) s.snapGrid = [0];
|
903 |
-
|
904 |
-
if (s.params.spaceBetween !== 0) {
|
905 |
-
if (s.isHorizontal()) {
|
906 |
-
if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});
|
907 |
-
else s.slides.css({marginRight: spaceBetween + 'px'});
|
908 |
-
}
|
909 |
-
else s.slides.css({marginBottom: spaceBetween + 'px'});
|
910 |
-
}
|
911 |
-
if (s.params.watchSlidesProgress) {
|
912 |
-
s.updateSlidesOffset();
|
913 |
-
}
|
914 |
-
};
|
915 |
-
s.updateSlidesOffset = function () {
|
916 |
-
for (var i = 0; i < s.slides.length; i++) {
|
917 |
-
s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;
|
918 |
-
}
|
919 |
-
};
|
920 |
-
|
921 |
-
/*=========================
|
922 |
-
Dynamic Slides Per View
|
923 |
-
===========================*/
|
924 |
-
s.currentSlidesPerView = function () {
|
925 |
-
var spv = 1, i, j;
|
926 |
-
if (s.params.centeredSlides) {
|
927 |
-
var size = s.slides[s.activeIndex].swiperSlideSize;
|
928 |
-
var breakLoop;
|
929 |
-
for (i = s.activeIndex + 1; i < s.slides.length; i++) {
|
930 |
-
if (s.slides[i] && !breakLoop) {
|
931 |
-
size += s.slides[i].swiperSlideSize;
|
932 |
-
spv ++;
|
933 |
-
if (size > s.size) breakLoop = true;
|
934 |
-
}
|
935 |
-
}
|
936 |
-
for (j = s.activeIndex - 1; j >= 0; j--) {
|
937 |
-
if (s.slides[j] && !breakLoop) {
|
938 |
-
size += s.slides[j].swiperSlideSize;
|
939 |
-
spv ++;
|
940 |
-
if (size > s.size) breakLoop = true;
|
941 |
-
}
|
942 |
-
}
|
943 |
-
}
|
944 |
-
else {
|
945 |
-
for (i = s.activeIndex + 1; i < s.slides.length; i++) {
|
946 |
-
if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) {
|
947 |
-
spv++;
|
948 |
-
}
|
949 |
-
}
|
950 |
-
}
|
951 |
-
return spv;
|
952 |
-
};
|
953 |
-
/*=========================
|
954 |
-
Slider/slides progress
|
955 |
-
===========================*/
|
956 |
-
s.updateSlidesProgress = function (translate) {
|
957 |
-
if (typeof translate === 'undefined') {
|
958 |
-
translate = s.translate || 0;
|
959 |
-
}
|
960 |
-
if (s.slides.length === 0) return;
|
961 |
-
if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();
|
962 |
-
|
963 |
-
var offsetCenter = -translate;
|
964 |
-
if (s.rtl) offsetCenter = translate;
|
965 |
-
|
966 |
-
// Visible Slides
|
967 |
-
s.slides.removeClass(s.params.slideVisibleClass);
|
968 |
-
for (var i = 0; i < s.slides.length; i++) {
|
969 |
-
var slide = s.slides[i];
|
970 |
-
var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);
|
971 |
-
if (s.params.watchSlidesVisibility) {
|
972 |
-
var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
|
973 |
-
var slideAfter = slideBefore + s.slidesSizesGrid[i];
|
974 |
-
var isVisible =
|
975 |
-
(slideBefore >= 0 && slideBefore < s.size) ||
|
976 |
-
(slideAfter > 0 && slideAfter <= s.size) ||
|
977 |
-
(slideBefore <= 0 && slideAfter >= s.size);
|
978 |
-
if (isVisible) {
|
979 |
-
s.slides.eq(i).addClass(s.params.slideVisibleClass);
|
980 |
-
}
|
981 |
-
}
|
982 |
-
slide.progress = s.rtl ? -slideProgress : slideProgress;
|
983 |
-
}
|
984 |
-
};
|
985 |
-
s.updateProgress = function (translate) {
|
986 |
-
if (typeof translate === 'undefined') {
|
987 |
-
translate = s.translate || 0;
|
988 |
-
}
|
989 |
-
var translatesDiff = s.maxTranslate() - s.minTranslate();
|
990 |
-
var wasBeginning = s.isBeginning;
|
991 |
-
var wasEnd = s.isEnd;
|
992 |
-
if (translatesDiff === 0) {
|
993 |
-
s.progress = 0;
|
994 |
-
s.isBeginning = s.isEnd = true;
|
995 |
-
}
|
996 |
-
else {
|
997 |
-
s.progress = (translate - s.minTranslate()) / (translatesDiff);
|
998 |
-
s.isBeginning = s.progress <= 0;
|
999 |
-
s.isEnd = s.progress >= 1;
|
1000 |
-
}
|
1001 |
-
if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);
|
1002 |
-
if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);
|
1003 |
-
|
1004 |
-
if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);
|
1005 |
-
s.emit('onProgress', s, s.progress);
|
1006 |
-
};
|
1007 |
-
s.updateActiveIndex = function () {
|
1008 |
-
var translate = s.rtl ? s.translate : -s.translate;
|
1009 |
-
var newActiveIndex, i, snapIndex;
|
1010 |
-
for (i = 0; i < s.slidesGrid.length; i ++) {
|
1011 |
-
if (typeof s.slidesGrid[i + 1] !== 'undefined') {
|
1012 |
-
if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {
|
1013 |
-
newActiveIndex = i;
|
1014 |
-
}
|
1015 |
-
else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {
|
1016 |
-
newActiveIndex = i + 1;
|
1017 |
-
}
|
1018 |
-
}
|
1019 |
-
else {
|
1020 |
-
if (translate >= s.slidesGrid[i]) {
|
1021 |
-
newActiveIndex = i;
|
1022 |
-
}
|
1023 |
-
}
|
1024 |
-
}
|
1025 |
-
// Normalize slideIndex
|
1026 |
-
if(s.params.normalizeSlideIndex){
|
1027 |
-
if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;
|
1028 |
-
}
|
1029 |
-
// for (i = 0; i < s.slidesGrid.length; i++) {
|
1030 |
-
// if (- translate >= s.slidesGrid[i]) {
|
1031 |
-
// newActiveIndex = i;
|
1032 |
-
// }
|
1033 |
-
// }
|
1034 |
-
snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);
|
1035 |
-
if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;
|
1036 |
-
|
1037 |
-
if (newActiveIndex === s.activeIndex) {
|
1038 |
-
return;
|
1039 |
-
}
|
1040 |
-
s.snapIndex = snapIndex;
|
1041 |
-
s.previousIndex = s.activeIndex;
|
1042 |
-
s.activeIndex = newActiveIndex;
|
1043 |
-
s.updateClasses();
|
1044 |
-
s.updateRealIndex();
|
1045 |
-
};
|
1046 |
-
s.updateRealIndex = function(){
|
1047 |
-
s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10);
|
1048 |
-
};
|
1049 |
-
|
1050 |
-
/*=========================
|
1051 |
-
Classes
|
1052 |
-
===========================*/
|
1053 |
-
s.updateClasses = function () {
|
1054 |
-
s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass);
|
1055 |
-
var activeSlide = s.slides.eq(s.activeIndex);
|
1056 |
-
// Active classes
|
1057 |
-
activeSlide.addClass(s.params.slideActiveClass);
|
1058 |
-
if (params.loop) {
|
1059 |
-
// Duplicate to all looped slides
|
1060 |
-
if (activeSlide.hasClass(s.params.slideDuplicateClass)) {
|
1061 |
-
s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass);
|
1062 |
-
}
|
1063 |
-
else {
|
1064 |
-
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass);
|
1065 |
-
}
|
1066 |
-
}
|
1067 |
-
// Next Slide
|
1068 |
-
var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);
|
1069 |
-
if (s.params.loop && nextSlide.length === 0) {
|
1070 |
-
nextSlide = s.slides.eq(0);
|
1071 |
-
nextSlide.addClass(s.params.slideNextClass);
|
1072 |
-
}
|
1073 |
-
// Prev Slide
|
1074 |
-
var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);
|
1075 |
-
if (s.params.loop && prevSlide.length === 0) {
|
1076 |
-
prevSlide = s.slides.eq(-1);
|
1077 |
-
prevSlide.addClass(s.params.slidePrevClass);
|
1078 |
-
}
|
1079 |
-
if (params.loop) {
|
1080 |
-
// Duplicate to all looped slides
|
1081 |
-
if (nextSlide.hasClass(s.params.slideDuplicateClass)) {
|
1082 |
-
s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass);
|
1083 |
-
}
|
1084 |
-
else {
|
1085 |
-
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass);
|
1086 |
-
}
|
1087 |
-
if (prevSlide.hasClass(s.params.slideDuplicateClass)) {
|
1088 |
-
s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass);
|
1089 |
-
}
|
1090 |
-
else {
|
1091 |
-
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass);
|
1092 |
-
}
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
// Pagination
|
1096 |
-
if (s.paginationContainer && s.paginationContainer.length > 0) {
|
1097 |
-
// Current/Total
|
1098 |
-
var current,
|
1099 |
-
total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
|
1100 |
-
if (s.params.loop) {
|
1101 |
-
current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);
|
1102 |
-
if (current > s.slides.length - 1 - s.loopedSlides * 2) {
|
1103 |
-
current = current - (s.slides.length - s.loopedSlides * 2);
|
1104 |
-
}
|
1105 |
-
if (current > total - 1) current = current - total;
|
1106 |
-
if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;
|
1107 |
-
}
|
1108 |
-
else {
|
1109 |
-
if (typeof s.snapIndex !== 'undefined') {
|
1110 |
-
current = s.snapIndex;
|
1111 |
-
}
|
1112 |
-
else {
|
1113 |
-
current = s.activeIndex || 0;
|
1114 |
-
}
|
1115 |
-
}
|
1116 |
-
// Types
|
1117 |
-
if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {
|
1118 |
-
s.bullets.removeClass(s.params.bulletActiveClass);
|
1119 |
-
if (s.paginationContainer.length > 1) {
|
1120 |
-
s.bullets.each(function () {
|
1121 |
-
if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);
|
1122 |
-
});
|
1123 |
-
}
|
1124 |
-
else {
|
1125 |
-
s.bullets.eq(current).addClass(s.params.bulletActiveClass);
|
1126 |
-
}
|
1127 |
-
}
|
1128 |
-
if (s.params.paginationType === 'fraction') {
|
1129 |
-
s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);
|
1130 |
-
s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);
|
1131 |
-
}
|
1132 |
-
if (s.params.paginationType === 'progress') {
|
1133 |
-
var scale = (current + 1) / total,
|
1134 |
-
scaleX = scale,
|
1135 |
-
scaleY = 1;
|
1136 |
-
if (!s.isHorizontal()) {
|
1137 |
-
scaleY = scale;
|
1138 |
-
scaleX = 1;
|
1139 |
-
}
|
1140 |
-
s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);
|
1141 |
-
}
|
1142 |
-
if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {
|
1143 |
-
s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));
|
1144 |
-
s.emit('onPaginationRendered', s, s.paginationContainer[0]);
|
1145 |
-
}
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
// Next/active buttons
|
1149 |
-
if (!s.params.loop) {
|
1150 |
-
if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
|
1151 |
-
if (s.isBeginning) {
|
1152 |
-
s.prevButton.addClass(s.params.buttonDisabledClass);
|
1153 |
-
if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);
|
1154 |
-
}
|
1155 |
-
else {
|
1156 |
-
s.prevButton.removeClass(s.params.buttonDisabledClass);
|
1157 |
-
if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);
|
1158 |
-
}
|
1159 |
-
}
|
1160 |
-
if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
|
1161 |
-
if (s.isEnd) {
|
1162 |
-
s.nextButton.addClass(s.params.buttonDisabledClass);
|
1163 |
-
if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);
|
1164 |
-
}
|
1165 |
-
else {
|
1166 |
-
s.nextButton.removeClass(s.params.buttonDisabledClass);
|
1167 |
-
if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);
|
1168 |
-
}
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
};
|
1172 |
-
|
1173 |
-
/*=========================
|
1174 |
-
Pagination
|
1175 |
-
===========================*/
|
1176 |
-
s.updatePagination = function () {
|
1177 |
-
if (!s.params.pagination) return;
|
1178 |
-
if (s.paginationContainer && s.paginationContainer.length > 0) {
|
1179 |
-
var paginationHTML = '';
|
1180 |
-
if (s.params.paginationType === 'bullets') {
|
1181 |
-
var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
|
1182 |
-
for (var i = 0; i < numberOfBullets; i++) {
|
1183 |
-
if (s.params.paginationBulletRender) {
|
1184 |
-
paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass);
|
1185 |
-
}
|
1186 |
-
else {
|
1187 |
-
paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '"></' + s.params.paginationElement + '>';
|
1188 |
-
}
|
1189 |
-
}
|
1190 |
-
s.paginationContainer.html(paginationHTML);
|
1191 |
-
s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);
|
1192 |
-
if (s.params.paginationClickable && s.params.a11y && s.a11y) {
|
1193 |
-
s.a11y.initPagination();
|
1194 |
-
}
|
1195 |
-
}
|
1196 |
-
if (s.params.paginationType === 'fraction') {
|
1197 |
-
if (s.params.paginationFractionRender) {
|
1198 |
-
paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);
|
1199 |
-
}
|
1200 |
-
else {
|
1201 |
-
paginationHTML =
|
1202 |
-
'<span class="' + s.params.paginationCurrentClass + '"></span>' +
|
1203 |
-
' / ' +
|
1204 |
-
'<span class="' + s.params.paginationTotalClass+'"></span>';
|
1205 |
-
}
|
1206 |
-
s.paginationContainer.html(paginationHTML);
|
1207 |
-
}
|
1208 |
-
if (s.params.paginationType === 'progress') {
|
1209 |
-
if (s.params.paginationProgressRender) {
|
1210 |
-
paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);
|
1211 |
-
}
|
1212 |
-
else {
|
1213 |
-
paginationHTML = '<span class="' + s.params.paginationProgressbarClass + '"></span>';
|
1214 |
-
}
|
1215 |
-
s.paginationContainer.html(paginationHTML);
|
1216 |
-
}
|
1217 |
-
if (s.params.paginationType !== 'custom') {
|
1218 |
-
s.emit('onPaginationRendered', s, s.paginationContainer[0]);
|
1219 |
-
}
|
1220 |
-
}
|
1221 |
-
};
|
1222 |
-
/*=========================
|
1223 |
-
Common update method
|
1224 |
-
===========================*/
|
1225 |
-
s.update = function (updateTranslate) {
|
1226 |
-
if (!s) return;
|
1227 |
-
s.updateContainerSize();
|
1228 |
-
s.updateSlidesSize();
|
1229 |
-
s.updateProgress();
|
1230 |
-
s.updatePagination();
|
1231 |
-
s.updateClasses();
|
1232 |
-
if (s.params.scrollbar && s.scrollbar) {
|
1233 |
-
s.scrollbar.set();
|
1234 |
-
}
|
1235 |
-
var newTranslate;
|
1236 |
-
function forceSetTranslate() {
|
1237 |
-
var translate = s.rtl ? -s.translate : s.translate;
|
1238 |
-
newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
|
1239 |
-
s.setWrapperTranslate(newTranslate);
|
1240 |
-
s.updateActiveIndex();
|
1241 |
-
s.updateClasses();
|
1242 |
-
}
|
1243 |
-
if (updateTranslate) {
|
1244 |
-
var translated;
|
1245 |
-
if (s.controller && s.controller.spline) {
|
1246 |
-
s.controller.spline = undefined;
|
1247 |
-
}
|
1248 |
-
if (s.params.freeMode) {
|
1249 |
-
forceSetTranslate();
|
1250 |
-
if (s.params.autoHeight) {
|
1251 |
-
s.updateAutoHeight();
|
1252 |
-
}
|
1253 |
-
}
|
1254 |
-
else {
|
1255 |
-
if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
|
1256 |
-
translated = s.slideTo(s.slides.length - 1, 0, false, true);
|
1257 |
-
}
|
1258 |
-
else {
|
1259 |
-
translated = s.slideTo(s.activeIndex, 0, false, true);
|
1260 |
-
}
|
1261 |
-
if (!translated) {
|
1262 |
-
forceSetTranslate();
|
1263 |
-
}
|
1264 |
-
}
|
1265 |
-
}
|
1266 |
-
else if (s.params.autoHeight) {
|
1267 |
-
s.updateAutoHeight();
|
1268 |
-
}
|
1269 |
-
};
|
1270 |
-
|
1271 |
-
/*=========================
|
1272 |
-
Resize Handler
|
1273 |
-
===========================*/
|
1274 |
-
s.onResize = function (forceUpdatePagination) {
|
1275 |
-
if (s.params.onBeforeResize) s.params.onBeforeResize(s);
|
1276 |
-
//Breakpoints
|
1277 |
-
if (s.params.breakpoints) {
|
1278 |
-
s.setBreakpoint();
|
1279 |
-
}
|
1280 |
-
|
1281 |
-
// Disable locks on resize
|
1282 |
-
var allowSwipeToPrev = s.params.allowSwipeToPrev;
|
1283 |
-
var allowSwipeToNext = s.params.allowSwipeToNext;
|
1284 |
-
s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;
|
1285 |
-
|
1286 |
-
s.updateContainerSize();
|
1287 |
-
s.updateSlidesSize();
|
1288 |
-
if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();
|
1289 |
-
if (s.params.scrollbar && s.scrollbar) {
|
1290 |
-
s.scrollbar.set();
|
1291 |
-
}
|
1292 |
-
if (s.controller && s.controller.spline) {
|
1293 |
-
s.controller.spline = undefined;
|
1294 |
-
}
|
1295 |
-
var slideChangedBySlideTo = false;
|
1296 |
-
if (s.params.freeMode) {
|
1297 |
-
var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
|
1298 |
-
s.setWrapperTranslate(newTranslate);
|
1299 |
-
s.updateActiveIndex();
|
1300 |
-
s.updateClasses();
|
1301 |
-
|
1302 |
-
if (s.params.autoHeight) {
|
1303 |
-
s.updateAutoHeight();
|
1304 |
-
}
|
1305 |
-
}
|
1306 |
-
else {
|
1307 |
-
s.updateClasses();
|
1308 |
-
if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
|
1309 |
-
slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);
|
1310 |
-
}
|
1311 |
-
else {
|
1312 |
-
slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);
|
1313 |
-
}
|
1314 |
-
}
|
1315 |
-
if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {
|
1316 |
-
s.lazy.load();
|
1317 |
-
}
|
1318 |
-
// Return locks after resize
|
1319 |
-
s.params.allowSwipeToPrev = allowSwipeToPrev;
|
1320 |
-
s.params.allowSwipeToNext = allowSwipeToNext;
|
1321 |
-
if (s.params.onAfterResize) s.params.onAfterResize(s);
|
1322 |
-
};
|
1323 |
-
|
1324 |
-
/*=========================
|
1325 |
-
Events
|
1326 |
-
===========================*/
|
1327 |
-
|
1328 |
-
//Define Touch Events
|
1329 |
-
s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'};
|
1330 |
-
if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'};
|
1331 |
-
else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'};
|
1332 |
-
s.touchEvents = {
|
1333 |
-
start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start,
|
1334 |
-
move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move,
|
1335 |
-
end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end
|
1336 |
-
};
|
1337 |
-
|
1338 |
-
|
1339 |
-
// WP8 Touch Events Fix
|
1340 |
-
if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {
|
1341 |
-
(s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);
|
1342 |
-
}
|
1343 |
-
|
1344 |
-
// Attach/detach events
|
1345 |
-
s.initEvents = function (detach) {
|
1346 |
-
var actionDom = detach ? 'off' : 'on';
|
1347 |
-
var action = detach ? 'removeEventListener' : 'addEventListener';
|
1348 |
-
var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];
|
1349 |
-
var target = s.support.touch ? touchEventsTarget : document;
|
1350 |
-
|
1351 |
-
var moveCapture = s.params.nested ? true : false;
|
1352 |
-
|
1353 |
-
//Touch Events
|
1354 |
-
if (s.browser.ie) {
|
1355 |
-
touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);
|
1356 |
-
target[action](s.touchEvents.move, s.onTouchMove, moveCapture);
|
1357 |
-
target[action](s.touchEvents.end, s.onTouchEnd, false);
|
1358 |
-
}
|
1359 |
-
else {
|
1360 |
-
if (s.support.touch) {
|
1361 |
-
var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;
|
1362 |
-
touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener);
|
1363 |
-
touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);
|
1364 |
-
touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener);
|
1365 |
-
}
|
1366 |
-
if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) {
|
1367 |
-
touchEventsTarget[action]('mousedown', s.onTouchStart, false);
|
1368 |
-
document[action]('mousemove', s.onTouchMove, moveCapture);
|
1369 |
-
document[action]('mouseup', s.onTouchEnd, false);
|
1370 |
-
}
|
1371 |
-
}
|
1372 |
-
window[action]('resize', s.onResize);
|
1373 |
-
|
1374 |
-
// Next, Prev, Index
|
1375 |
-
if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
|
1376 |
-
s.nextButton[actionDom]('click', s.onClickNext);
|
1377 |
-
if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);
|
1378 |
-
}
|
1379 |
-
if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
|
1380 |
-
s.prevButton[actionDom]('click', s.onClickPrev);
|
1381 |
-
if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);
|
1382 |
-
}
|
1383 |
-
if (s.params.pagination && s.params.paginationClickable) {
|
1384 |
-
s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);
|
1385 |
-
if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
// Prevent Links Clicks
|
1389 |
-
if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);
|
1390 |
-
};
|
1391 |
-
s.attachEvents = function () {
|
1392 |
-
s.initEvents();
|
1393 |
-
};
|
1394 |
-
s.detachEvents = function () {
|
1395 |
-
s.initEvents(true);
|
1396 |
-
};
|
1397 |
-
|
1398 |
-
/*=========================
|
1399 |
-
Handle Clicks
|
1400 |
-
===========================*/
|
1401 |
-
// Prevent Clicks
|
1402 |
-
s.allowClick = true;
|
1403 |
-
s.preventClicks = function (e) {
|
1404 |
-
if (!s.allowClick) {
|
1405 |
-
if (s.params.preventClicks) e.preventDefault();
|
1406 |
-
if (s.params.preventClicksPropagation && s.animating) {
|
1407 |
-
e.stopPropagation();
|
1408 |
-
e.stopImmediatePropagation();
|
1409 |
-
}
|
1410 |
-
}
|
1411 |
-
};
|
1412 |
-
// Clicks
|
1413 |
-
s.onClickNext = function (e) {
|
1414 |
-
e.preventDefault();
|
1415 |
-
if (s.isEnd && !s.params.loop) return;
|
1416 |
-
s.slideNext();
|
1417 |
-
};
|
1418 |
-
s.onClickPrev = function (e) {
|
1419 |
-
e.preventDefault();
|
1420 |
-
if (s.isBeginning && !s.params.loop) return;
|
1421 |
-
s.slidePrev();
|
1422 |
-
};
|
1423 |
-
s.onClickIndex = function (e) {
|
1424 |
-
e.preventDefault();
|
1425 |
-
var index = $(this).index() * s.params.slidesPerGroup;
|
1426 |
-
if (s.params.loop) index = index + s.loopedSlides;
|
1427 |
-
s.slideTo(index);
|
1428 |
-
};
|
1429 |
-
|
1430 |
-
/*=========================
|
1431 |
-
Handle Touches
|
1432 |
-
===========================*/
|
1433 |
-
function findElementInEvent(e, selector) {
|
1434 |
-
var el = $(e.target);
|
1435 |
-
if (!el.is(selector)) {
|
1436 |
-
if (typeof selector === 'string') {
|
1437 |
-
el = el.parents(selector);
|
1438 |
-
}
|
1439 |
-
else if (selector.nodeType) {
|
1440 |
-
var found;
|
1441 |
-
el.parents().each(function (index, _el) {
|
1442 |
-
if (_el === selector) found = selector;
|
1443 |
-
});
|
1444 |
-
if (!found) return undefined;
|
1445 |
-
else return selector;
|
1446 |
-
}
|
1447 |
-
}
|
1448 |
-
if (el.length === 0) {
|
1449 |
-
return undefined;
|
1450 |
-
}
|
1451 |
-
return el[0];
|
1452 |
-
}
|
1453 |
-
s.updateClickedSlide = function (e) {
|
1454 |
-
var slide = findElementInEvent(e, '.' + s.params.slideClass);
|
1455 |
-
var slideFound = false;
|
1456 |
-
if (slide) {
|
1457 |
-
for (var i = 0; i < s.slides.length; i++) {
|
1458 |
-
if (s.slides[i] === slide) slideFound = true;
|
1459 |
-
}
|
1460 |
-
}
|
1461 |
-
|
1462 |
-
if (slide && slideFound) {
|
1463 |
-
s.clickedSlide = slide;
|
1464 |
-
s.clickedIndex = $(slide).index();
|
1465 |
-
}
|
1466 |
-
else {
|
1467 |
-
s.clickedSlide = undefined;
|
1468 |
-
s.clickedIndex = undefined;
|
1469 |
-
return;
|
1470 |
-
}
|
1471 |
-
if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {
|
1472 |
-
var slideToIndex = s.clickedIndex,
|
1473 |
-
realIndex,
|
1474 |
-
duplicatedSlides,
|
1475 |
-
slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView;
|
1476 |
-
if (s.params.loop) {
|
1477 |
-
if (s.animating) return;
|
1478 |
-
realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);
|
1479 |
-
if (s.params.centeredSlides) {
|
1480 |
-
if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) {
|
1481 |
-
s.fixLoop();
|
1482 |
-
slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();
|
1483 |
-
setTimeout(function () {
|
1484 |
-
s.slideTo(slideToIndex);
|
1485 |
-
}, 0);
|
1486 |
-
}
|
1487 |
-
else {
|
1488 |
-
s.slideTo(slideToIndex);
|
1489 |
-
}
|
1490 |
-
}
|
1491 |
-
else {
|
1492 |
-
if (slideToIndex > s.slides.length - slidesPerView) {
|
1493 |
-
s.fixLoop();
|
1494 |
-
slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();
|
1495 |
-
setTimeout(function () {
|
1496 |
-
s.slideTo(slideToIndex);
|
1497 |
-
}, 0);
|
1498 |
-
}
|
1499 |
-
else {
|
1500 |
-
s.slideTo(slideToIndex);
|
1501 |
-
}
|
1502 |
-
}
|
1503 |
-
}
|
1504 |
-
else {
|
1505 |
-
s.slideTo(slideToIndex);
|
1506 |
-
}
|
1507 |
-
}
|
1508 |
-
};
|
1509 |
-
|
1510 |
-
var isTouched,
|
1511 |
-
isMoved,
|
1512 |
-
allowTouchCallbacks,
|
1513 |
-
touchStartTime,
|
1514 |
-
isScrolling,
|
1515 |
-
currentTranslate,
|
1516 |
-
startTranslate,
|
1517 |
-
allowThresholdMove,
|
1518 |
-
// Form elements to match
|
1519 |
-
formElements = 'input, select, textarea, button, video',
|
1520 |
-
// Last click time
|
1521 |
-
lastClickTime = Date.now(), clickTimeout,
|
1522 |
-
//Velocities
|
1523 |
-
velocities = [],
|
1524 |
-
allowMomentumBounce;
|
1525 |
-
|
1526 |
-
// Animating Flag
|
1527 |
-
s.animating = false;
|
1528 |
-
|
1529 |
-
// Touches information
|
1530 |
-
s.touches = {
|
1531 |
-
startX: 0,
|
1532 |
-
startY: 0,
|
1533 |
-
currentX: 0,
|
1534 |
-
currentY: 0,
|
1535 |
-
diff: 0
|
1536 |
-
};
|
1537 |
-
|
1538 |
-
// Touch handlers
|
1539 |
-
var isTouchEvent, startMoving;
|
1540 |
-
s.onTouchStart = function (e) {
|
1541 |
-
if (e.originalEvent) e = e.originalEvent;
|
1542 |
-
isTouchEvent = e.type === 'touchstart';
|
1543 |
-
if (!isTouchEvent && 'which' in e && e.which === 3) return;
|
1544 |
-
if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {
|
1545 |
-
s.allowClick = true;
|
1546 |
-
return;
|
1547 |
-
}
|
1548 |
-
if (s.params.swipeHandler) {
|
1549 |
-
if (!findElementInEvent(e, s.params.swipeHandler)) return;
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
1553 |
-
var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
1554 |
-
|
1555 |
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
|
1556 |
-
if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {
|
1557 |
-
return;
|
1558 |
-
}
|
1559 |
-
|
1560 |
-
isTouched = true;
|
1561 |
-
isMoved = false;
|
1562 |
-
allowTouchCallbacks = true;
|
1563 |
-
isScrolling = undefined;
|
1564 |
-
startMoving = undefined;
|
1565 |
-
s.touches.startX = startX;
|
1566 |
-
s.touches.startY = startY;
|
1567 |
-
touchStartTime = Date.now();
|
1568 |
-
s.allowClick = true;
|
1569 |
-
s.updateContainerSize();
|
1570 |
-
s.swipeDirection = undefined;
|
1571 |
-
if (s.params.threshold > 0) allowThresholdMove = false;
|
1572 |
-
if (e.type !== 'touchstart') {
|
1573 |
-
var preventDefault = true;
|
1574 |
-
if ($(e.target).is(formElements)) preventDefault = false;
|
1575 |
-
if (document.activeElement && $(document.activeElement).is(formElements)) {
|
1576 |
-
document.activeElement.blur();
|
1577 |
-
}
|
1578 |
-
if (preventDefault) {
|
1579 |
-
e.preventDefault();
|
1580 |
-
}
|
1581 |
-
}
|
1582 |
-
s.emit('onTouchStart', s, e);
|
1583 |
-
};
|
1584 |
-
|
1585 |
-
s.onTouchMove = function (e) {
|
1586 |
-
if (e.originalEvent) e = e.originalEvent;
|
1587 |
-
if (isTouchEvent && e.type === 'mousemove') return;
|
1588 |
-
if (e.preventedByNestedSwiper) {
|
1589 |
-
s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
1590 |
-
s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
1591 |
-
return;
|
1592 |
-
}
|
1593 |
-
if (s.params.onlyExternal) {
|
1594 |
-
// isMoved = true;
|
1595 |
-
s.allowClick = false;
|
1596 |
-
if (isTouched) {
|
1597 |
-
s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
1598 |
-
s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
1599 |
-
touchStartTime = Date.now();
|
1600 |
-
}
|
1601 |
-
return;
|
1602 |
-
}
|
1603 |
-
if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) {
|
1604 |
-
if (!s.isHorizontal()) {
|
1605 |
-
// Vertical
|
1606 |
-
if (
|
1607 |
-
(s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) ||
|
1608 |
-
(s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate())
|
1609 |
-
) {
|
1610 |
-
return;
|
1611 |
-
}
|
1612 |
-
}
|
1613 |
-
else {
|
1614 |
-
if (
|
1615 |
-
(s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) ||
|
1616 |
-
(s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate())
|
1617 |
-
) {
|
1618 |
-
return;
|
1619 |
-
}
|
1620 |
-
}
|
1621 |
-
}
|
1622 |
-
if (isTouchEvent && document.activeElement) {
|
1623 |
-
if (e.target === document.activeElement && $(e.target).is(formElements)) {
|
1624 |
-
isMoved = true;
|
1625 |
-
s.allowClick = false;
|
1626 |
-
return;
|
1627 |
-
}
|
1628 |
-
}
|
1629 |
-
if (allowTouchCallbacks) {
|
1630 |
-
s.emit('onTouchMove', s, e);
|
1631 |
-
}
|
1632 |
-
if (e.targetTouches && e.targetTouches.length > 1) return;
|
1633 |
-
|
1634 |
-
s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
1635 |
-
s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
1636 |
-
|
1637 |
-
if (typeof isScrolling === 'undefined') {
|
1638 |
-
var touchAngle;
|
1639 |
-
if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) {
|
1640 |
-
isScrolling = false;
|
1641 |
-
}
|
1642 |
-
else {
|
1643 |
-
touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;
|
1644 |
-
isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);
|
1645 |
-
}
|
1646 |
-
}
|
1647 |
-
if (isScrolling) {
|
1648 |
-
s.emit('onTouchMoveOpposite', s, e);
|
1649 |
-
}
|
1650 |
-
if (typeof startMoving === 'undefined') {
|
1651 |
-
if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {
|
1652 |
-
startMoving = true;
|
1653 |
-
}
|
1654 |
-
}
|
1655 |
-
if (!isTouched) return;
|
1656 |
-
if (isScrolling) {
|
1657 |
-
isTouched = false;
|
1658 |
-
return;
|
1659 |
-
}
|
1660 |
-
if (!startMoving) {
|
1661 |
-
return;
|
1662 |
-
}
|
1663 |
-
s.allowClick = false;
|
1664 |
-
s.emit('onSliderMove', s, e);
|
1665 |
-
e.preventDefault();
|
1666 |
-
if (s.params.touchMoveStopPropagation && !s.params.nested) {
|
1667 |
-
e.stopPropagation();
|
1668 |
-
}
|
1669 |
-
|
1670 |
-
if (!isMoved) {
|
1671 |
-
if (params.loop) {
|
1672 |
-
s.fixLoop();
|
1673 |
-
}
|
1674 |
-
startTranslate = s.getWrapperTranslate();
|
1675 |
-
s.setWrapperTransition(0);
|
1676 |
-
if (s.animating) {
|
1677 |
-
s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');
|
1678 |
-
}
|
1679 |
-
if (s.params.autoplay && s.autoplaying) {
|
1680 |
-
if (s.params.autoplayDisableOnInteraction) {
|
1681 |
-
s.stopAutoplay();
|
1682 |
-
}
|
1683 |
-
else {
|
1684 |
-
s.pauseAutoplay();
|
1685 |
-
}
|
1686 |
-
}
|
1687 |
-
allowMomentumBounce = false;
|
1688 |
-
//Grab Cursor
|
1689 |
-
if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {
|
1690 |
-
s.setGrabCursor(true);
|
1691 |
-
}
|
1692 |
-
}
|
1693 |
-
isMoved = true;
|
1694 |
-
|
1695 |
-
var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
|
1696 |
-
|
1697 |
-
diff = diff * s.params.touchRatio;
|
1698 |
-
if (s.rtl) diff = -diff;
|
1699 |
-
|
1700 |
-
s.swipeDirection = diff > 0 ? 'prev' : 'next';
|
1701 |
-
currentTranslate = diff + startTranslate;
|
1702 |
-
|
1703 |
-
var disableParentSwiper = true;
|
1704 |
-
if ((diff > 0 && currentTranslate > s.minTranslate())) {
|
1705 |
-
disableParentSwiper = false;
|
1706 |
-
if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);
|
1707 |
-
}
|
1708 |
-
else if (diff < 0 && currentTranslate < s.maxTranslate()) {
|
1709 |
-
disableParentSwiper = false;
|
1710 |
-
if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);
|
1711 |
-
}
|
1712 |
-
|
1713 |
-
if (disableParentSwiper) {
|
1714 |
-
e.preventedByNestedSwiper = true;
|
1715 |
-
}
|
1716 |
-
|
1717 |
-
// Directions locks
|
1718 |
-
if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {
|
1719 |
-
currentTranslate = startTranslate;
|
1720 |
-
}
|
1721 |
-
if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {
|
1722 |
-
currentTranslate = startTranslate;
|
1723 |
-
}
|
1724 |
-
|
1725 |
-
|
1726 |
-
// Threshold
|
1727 |
-
if (s.params.threshold > 0) {
|
1728 |
-
if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {
|
1729 |
-
if (!allowThresholdMove) {
|
1730 |
-
allowThresholdMove = true;
|
1731 |
-
s.touches.startX = s.touches.currentX;
|
1732 |
-
s.touches.startY = s.touches.currentY;
|
1733 |
-
currentTranslate = startTranslate;
|
1734 |
-
s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;
|
1735 |
-
return;
|
1736 |
-
}
|
1737 |
-
}
|
1738 |
-
else {
|
1739 |
-
currentTranslate = startTranslate;
|
1740 |
-
return;
|
1741 |
-
}
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
if (!s.params.followFinger) return;
|
1745 |
-
|
1746 |
-
// Update active index in free mode
|
1747 |
-
if (s.params.freeMode || s.params.watchSlidesProgress) {
|
1748 |
-
s.updateActiveIndex();
|
1749 |
-
}
|
1750 |
-
if (s.params.freeMode) {
|
1751 |
-
//Velocity
|
1752 |
-
if (velocities.length === 0) {
|
1753 |
-
velocities.push({
|
1754 |
-
position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],
|
1755 |
-
time: touchStartTime
|
1756 |
-
});
|
1757 |
-
}
|
1758 |
-
velocities.push({
|
1759 |
-
position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],
|
1760 |
-
time: (new window.Date()).getTime()
|
1761 |
-
});
|
1762 |
-
}
|
1763 |
-
// Update progress
|
1764 |
-
s.updateProgress(currentTranslate);
|
1765 |
-
// Update translate
|
1766 |
-
s.setWrapperTranslate(currentTranslate);
|
1767 |
-
};
|
1768 |
-
s.onTouchEnd = function (e) {
|
1769 |
-
if (e.originalEvent) e = e.originalEvent;
|
1770 |
-
if (allowTouchCallbacks) {
|
1771 |
-
s.emit('onTouchEnd', s, e);
|
1772 |
-
}
|
1773 |
-
allowTouchCallbacks = false;
|
1774 |
-
if (!isTouched) return;
|
1775 |
-
//Return Grab Cursor
|
1776 |
-
if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {
|
1777 |
-
s.setGrabCursor(false);
|
1778 |
-
}
|
1779 |
-
|
1780 |
-
// Time diff
|
1781 |
-
var touchEndTime = Date.now();
|
1782 |
-
var timeDiff = touchEndTime - touchStartTime;
|
1783 |
-
|
1784 |
-
// Tap, doubleTap, Click
|
1785 |
-
if (s.allowClick) {
|
1786 |
-
s.updateClickedSlide(e);
|
1787 |
-
s.emit('onTap', s, e);
|
1788 |
-
if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {
|
1789 |
-
if (clickTimeout) clearTimeout(clickTimeout);
|
1790 |
-
clickTimeout = setTimeout(function () {
|
1791 |
-
if (!s) return;
|
1792 |
-
if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {
|
1793 |
-
s.paginationContainer.toggleClass(s.params.paginationHiddenClass);
|
1794 |
-
}
|
1795 |
-
s.emit('onClick', s, e);
|
1796 |
-
}, 300);
|
1797 |
-
|
1798 |
-
}
|
1799 |
-
if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {
|
1800 |
-
if (clickTimeout) clearTimeout(clickTimeout);
|
1801 |
-
s.emit('onDoubleTap', s, e);
|
1802 |
-
}
|
1803 |
-
}
|
1804 |
-
|
1805 |
-
lastClickTime = Date.now();
|
1806 |
-
setTimeout(function () {
|
1807 |
-
if (s) s.allowClick = true;
|
1808 |
-
}, 0);
|
1809 |
-
|
1810 |
-
if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {
|
1811 |
-
isTouched = isMoved = false;
|
1812 |
-
return;
|
1813 |
-
}
|
1814 |
-
isTouched = isMoved = false;
|
1815 |
-
|
1816 |
-
var currentPos;
|
1817 |
-
if (s.params.followFinger) {
|
1818 |
-
currentPos = s.rtl ? s.translate : -s.translate;
|
1819 |
-
}
|
1820 |
-
else {
|
1821 |
-
currentPos = -currentTranslate;
|
1822 |
-
}
|
1823 |
-
if (s.params.freeMode) {
|
1824 |
-
if (currentPos < -s.minTranslate()) {
|
1825 |
-
s.slideTo(s.activeIndex);
|
1826 |
-
return;
|
1827 |
-
}
|
1828 |
-
else if (currentPos > -s.maxTranslate()) {
|
1829 |
-
if (s.slides.length < s.snapGrid.length) {
|
1830 |
-
s.slideTo(s.snapGrid.length - 1);
|
1831 |
-
}
|
1832 |
-
else {
|
1833 |
-
s.slideTo(s.slides.length - 1);
|
1834 |
-
}
|
1835 |
-
return;
|
1836 |
-
}
|
1837 |
-
|
1838 |
-
if (s.params.freeModeMomentum) {
|
1839 |
-
if (velocities.length > 1) {
|
1840 |
-
var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();
|
1841 |
-
|
1842 |
-
var distance = lastMoveEvent.position - velocityEvent.position;
|
1843 |
-
var time = lastMoveEvent.time - velocityEvent.time;
|
1844 |
-
s.velocity = distance / time;
|
1845 |
-
s.velocity = s.velocity / 2;
|
1846 |
-
if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {
|
1847 |
-
s.velocity = 0;
|
1848 |
-
}
|
1849 |
-
// this implies that the user stopped moving a finger then released.
|
1850 |
-
// There would be no events with distance zero, so the last event is stale.
|
1851 |
-
if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {
|
1852 |
-
s.velocity = 0;
|
1853 |
-
}
|
1854 |
-
} else {
|
1855 |
-
s.velocity = 0;
|
1856 |
-
}
|
1857 |
-
s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio;
|
1858 |
-
|
1859 |
-
velocities.length = 0;
|
1860 |
-
var momentumDuration = 1000 * s.params.freeModeMomentumRatio;
|
1861 |
-
var momentumDistance = s.velocity * momentumDuration;
|
1862 |
-
|
1863 |
-
var newPosition = s.translate + momentumDistance;
|
1864 |
-
if (s.rtl) newPosition = - newPosition;
|
1865 |
-
var doBounce = false;
|
1866 |
-
var afterBouncePosition;
|
1867 |
-
var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;
|
1868 |
-
if (newPosition < s.maxTranslate()) {
|
1869 |
-
if (s.params.freeModeMomentumBounce) {
|
1870 |
-
if (newPosition + s.maxTranslate() < -bounceAmount) {
|
1871 |
-
newPosition = s.maxTranslate() - bounceAmount;
|
1872 |
-
}
|
1873 |
-
afterBouncePosition = s.maxTranslate();
|
1874 |
-
doBounce = true;
|
1875 |
-
allowMomentumBounce = true;
|
1876 |
-
}
|
1877 |
-
else {
|
1878 |
-
newPosition = s.maxTranslate();
|
1879 |
-
}
|
1880 |
-
}
|
1881 |
-
else if (newPosition > s.minTranslate()) {
|
1882 |
-
if (s.params.freeModeMomentumBounce) {
|
1883 |
-
if (newPosition - s.minTranslate() > bounceAmount) {
|
1884 |
-
newPosition = s.minTranslate() + bounceAmount;
|
1885 |
-
}
|
1886 |
-
afterBouncePosition = s.minTranslate();
|
1887 |
-
doBounce = true;
|
1888 |
-
allowMomentumBounce = true;
|
1889 |
-
}
|
1890 |
-
else {
|
1891 |
-
newPosition = s.minTranslate();
|
1892 |
-
}
|
1893 |
-
}
|
1894 |
-
else if (s.params.freeModeSticky) {
|
1895 |
-
var j = 0,
|
1896 |
-
nextSlide;
|
1897 |
-
for (j = 0; j < s.snapGrid.length; j += 1) {
|
1898 |
-
if (s.snapGrid[j] > -newPosition) {
|
1899 |
-
nextSlide = j;
|
1900 |
-
break;
|
1901 |
-
}
|
1902 |
-
|
1903 |
-
}
|
1904 |
-
if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {
|
1905 |
-
newPosition = s.snapGrid[nextSlide];
|
1906 |
-
} else {
|
1907 |
-
newPosition = s.snapGrid[nextSlide - 1];
|
1908 |
-
}
|
1909 |
-
if (!s.rtl) newPosition = - newPosition;
|
1910 |
-
}
|
1911 |
-
//Fix duration
|
1912 |
-
if (s.velocity !== 0) {
|
1913 |
-
if (s.rtl) {
|
1914 |
-
momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);
|
1915 |
-
}
|
1916 |
-
else {
|
1917 |
-
momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);
|
1918 |
-
}
|
1919 |
-
}
|
1920 |
-
else if (s.params.freeModeSticky) {
|
1921 |
-
s.slideReset();
|
1922 |
-
return;
|
1923 |
-
}
|
1924 |
-
|
1925 |
-
if (s.params.freeModeMomentumBounce && doBounce) {
|
1926 |
-
s.updateProgress(afterBouncePosition);
|
1927 |
-
s.setWrapperTransition(momentumDuration);
|
1928 |
-
s.setWrapperTranslate(newPosition);
|
1929 |
-
s.onTransitionStart();
|
1930 |
-
s.animating = true;
|
1931 |
-
s.wrapper.transitionEnd(function () {
|
1932 |
-
if (!s || !allowMomentumBounce) return;
|
1933 |
-
s.emit('onMomentumBounce', s);
|
1934 |
-
|
1935 |
-
s.setWrapperTransition(s.params.speed);
|
1936 |
-
s.setWrapperTranslate(afterBouncePosition);
|
1937 |
-
s.wrapper.transitionEnd(function () {
|
1938 |
-
if (!s) return;
|
1939 |
-
s.onTransitionEnd();
|
1940 |
-
});
|
1941 |
-
});
|
1942 |
-
} else if (s.velocity) {
|
1943 |
-
s.updateProgress(newPosition);
|
1944 |
-
s.setWrapperTransition(momentumDuration);
|
1945 |
-
s.setWrapperTranslate(newPosition);
|
1946 |
-
s.onTransitionStart();
|
1947 |
-
if (!s.animating) {
|
1948 |
-
s.animating = true;
|
1949 |
-
s.wrapper.transitionEnd(function () {
|
1950 |
-
if (!s) return;
|
1951 |
-
s.onTransitionEnd();
|
1952 |
-
});
|
1953 |
-
}
|
1954 |
-
|
1955 |
-
} else {
|
1956 |
-
s.updateProgress(newPosition);
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
s.updateActiveIndex();
|
1960 |
-
}
|
1961 |
-
if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {
|
1962 |
-
s.updateProgress();
|
1963 |
-
s.updateActiveIndex();
|
1964 |
-
}
|
1965 |
-
return;
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
// Find current slide
|
1969 |
-
var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];
|
1970 |
-
for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {
|
1971 |
-
if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {
|
1972 |
-
if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {
|
1973 |
-
stopIndex = i;
|
1974 |
-
groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];
|
1975 |
-
}
|
1976 |
-
}
|
1977 |
-
else {
|
1978 |
-
if (currentPos >= s.slidesGrid[i]) {
|
1979 |
-
stopIndex = i;
|
1980 |
-
groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];
|
1981 |
-
}
|
1982 |
-
}
|
1983 |
-
}
|
1984 |
-
|
1985 |
-
// Find current slide size
|
1986 |
-
var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;
|
1987 |
-
|
1988 |
-
if (timeDiff > s.params.longSwipesMs) {
|
1989 |
-
// Long touches
|
1990 |
-
if (!s.params.longSwipes) {
|
1991 |
-
s.slideTo(s.activeIndex);
|
1992 |
-
return;
|
1993 |
-
}
|
1994 |
-
if (s.swipeDirection === 'next') {
|
1995 |
-
if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);
|
1996 |
-
else s.slideTo(stopIndex);
|
1997 |
-
|
1998 |
-
}
|
1999 |
-
if (s.swipeDirection === 'prev') {
|
2000 |
-
if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);
|
2001 |
-
else s.slideTo(stopIndex);
|
2002 |
-
}
|
2003 |
-
}
|
2004 |
-
else {
|
2005 |
-
// Short swipes
|
2006 |
-
if (!s.params.shortSwipes) {
|
2007 |
-
s.slideTo(s.activeIndex);
|
2008 |
-
return;
|
2009 |
-
}
|
2010 |
-
if (s.swipeDirection === 'next') {
|
2011 |
-
s.slideTo(stopIndex + s.params.slidesPerGroup);
|
2012 |
-
|
2013 |
-
}
|
2014 |
-
if (s.swipeDirection === 'prev') {
|
2015 |
-
s.slideTo(stopIndex);
|
2016 |
-
}
|
2017 |
-
}
|
2018 |
-
};
|
2019 |
-
/*=========================
|
2020 |
-
Transitions
|
2021 |
-
===========================*/
|
2022 |
-
s._slideTo = function (slideIndex, speed) {
|
2023 |
-
return s.slideTo(slideIndex, speed, true, true);
|
2024 |
-
};
|
2025 |
-
s.slideTo = function (slideIndex, speed, runCallbacks, internal) {
|
2026 |
-
if (typeof runCallbacks === 'undefined') runCallbacks = true;
|
2027 |
-
if (typeof slideIndex === 'undefined') slideIndex = 0;
|
2028 |
-
if (slideIndex < 0) slideIndex = 0;
|
2029 |
-
s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);
|
2030 |
-
if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;
|
2031 |
-
|
2032 |
-
var translate = - s.snapGrid[s.snapIndex];
|
2033 |
-
// Stop autoplay
|
2034 |
-
if (s.params.autoplay && s.autoplaying) {
|
2035 |
-
if (internal || !s.params.autoplayDisableOnInteraction) {
|
2036 |
-
s.pauseAutoplay(speed);
|
2037 |
-
}
|
2038 |
-
else {
|
2039 |
-
s.stopAutoplay();
|
2040 |
-
}
|
2041 |
-
}
|
2042 |
-
// Update progress
|
2043 |
-
s.updateProgress(translate);
|
2044 |
-
|
2045 |
-
// Normalize slideIndex
|
2046 |
-
if(s.params.normalizeSlideIndex){
|
2047 |
-
for (var i = 0; i < s.slidesGrid.length; i++) {
|
2048 |
-
if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {
|
2049 |
-
slideIndex = i;
|
2050 |
-
}
|
2051 |
-
}
|
2052 |
-
}
|
2053 |
-
|
2054 |
-
// Directions locks
|
2055 |
-
if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {
|
2056 |
-
return false;
|
2057 |
-
}
|
2058 |
-
if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {
|
2059 |
-
if ((s.activeIndex || 0) !== slideIndex ) return false;
|
2060 |
-
}
|
2061 |
-
|
2062 |
-
// Update Index
|
2063 |
-
if (typeof speed === 'undefined') speed = s.params.speed;
|
2064 |
-
s.previousIndex = s.activeIndex || 0;
|
2065 |
-
s.activeIndex = slideIndex;
|
2066 |
-
s.updateRealIndex();
|
2067 |
-
if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {
|
2068 |
-
// Update Height
|
2069 |
-
if (s.params.autoHeight) {
|
2070 |
-
s.updateAutoHeight();
|
2071 |
-
}
|
2072 |
-
s.updateClasses();
|
2073 |
-
if (s.params.effect !== 'slide') {
|
2074 |
-
s.setWrapperTranslate(translate);
|
2075 |
-
}
|
2076 |
-
return false;
|
2077 |
-
}
|
2078 |
-
s.updateClasses();
|
2079 |
-
s.onTransitionStart(runCallbacks);
|
2080 |
-
|
2081 |
-
if (speed === 0 || s.browser.lteIE9) {
|
2082 |
-
s.setWrapperTranslate(translate);
|
2083 |
-
s.setWrapperTransition(0);
|
2084 |
-
s.onTransitionEnd(runCallbacks);
|
2085 |
-
}
|
2086 |
-
else {
|
2087 |
-
s.setWrapperTranslate(translate);
|
2088 |
-
s.setWrapperTransition(speed);
|
2089 |
-
if (!s.animating) {
|
2090 |
-
s.animating = true;
|
2091 |
-
s.wrapper.transitionEnd(function () {
|
2092 |
-
if (!s) return;
|
2093 |
-
s.onTransitionEnd(runCallbacks);
|
2094 |
-
});
|
2095 |
-
}
|
2096 |
-
|
2097 |
-
}
|
2098 |
-
|
2099 |
-
return true;
|
2100 |
-
};
|
2101 |
-
|
2102 |
-
s.onTransitionStart = function (runCallbacks) {
|
2103 |
-
if (typeof runCallbacks === 'undefined') runCallbacks = true;
|
2104 |
-
if (s.params.autoHeight) {
|
2105 |
-
s.updateAutoHeight();
|
2106 |
-
}
|
2107 |
-
if (s.lazy) s.lazy.onTransitionStart();
|
2108 |
-
if (runCallbacks) {
|
2109 |
-
s.emit('onTransitionStart', s);
|
2110 |
-
if (s.activeIndex !== s.previousIndex) {
|
2111 |
-
s.emit('onSlideChangeStart', s);
|
2112 |
-
if (s.activeIndex > s.previousIndex) {
|
2113 |
-
s.emit('onSlideNextStart', s);
|
2114 |
-
}
|
2115 |
-
else {
|
2116 |
-
s.emit('onSlidePrevStart', s);
|
2117 |
-
}
|
2118 |
-
}
|
2119 |
-
|
2120 |
-
}
|
2121 |
-
};
|
2122 |
-
s.onTransitionEnd = function (runCallbacks) {
|
2123 |
-
s.animating = false;
|
2124 |
-
s.setWrapperTransition(0);
|
2125 |
-
if (typeof runCallbacks === 'undefined') runCallbacks = true;
|
2126 |
-
if (s.lazy) s.lazy.onTransitionEnd();
|
2127 |
-
if (runCallbacks) {
|
2128 |
-
s.emit('onTransitionEnd', s);
|
2129 |
-
if (s.activeIndex !== s.previousIndex) {
|
2130 |
-
s.emit('onSlideChangeEnd', s);
|
2131 |
-
if (s.activeIndex > s.previousIndex) {
|
2132 |
-
s.emit('onSlideNextEnd', s);
|
2133 |
-
}
|
2134 |
-
else {
|
2135 |
-
s.emit('onSlidePrevEnd', s);
|
2136 |
-
}
|
2137 |
-
}
|
2138 |
-
}
|
2139 |
-
if (s.params.history && s.history) {
|
2140 |
-
s.history.setHistory(s.params.history, s.activeIndex);
|
2141 |
-
}
|
2142 |
-
if (s.params.hashnav && s.hashnav) {
|
2143 |
-
s.hashnav.setHash();
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
};
|
2147 |
-
s.slideNext = function (runCallbacks, speed, internal) {
|
2148 |
-
if (s.params.loop) {
|
2149 |
-
if (s.animating) return false;
|
2150 |
-
s.fixLoop();
|
2151 |
-
var clientLeft = s.container[0].clientLeft;
|
2152 |
-
return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
|
2153 |
-
}
|
2154 |
-
else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);
|
2155 |
-
};
|
2156 |
-
s._slideNext = function (speed) {
|
2157 |
-
return s.slideNext(true, speed, true);
|
2158 |
-
};
|
2159 |
-
s.slidePrev = function (runCallbacks, speed, internal) {
|
2160 |
-
if (s.params.loop) {
|
2161 |
-
if (s.animating) return false;
|
2162 |
-
s.fixLoop();
|
2163 |
-
var clientLeft = s.container[0].clientLeft;
|
2164 |
-
return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
|
2165 |
-
}
|
2166 |
-
else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);
|
2167 |
-
};
|
2168 |
-
s._slidePrev = function (speed) {
|
2169 |
-
return s.slidePrev(true, speed, true);
|
2170 |
-
};
|
2171 |
-
s.slideReset = function (runCallbacks, speed, internal) {
|
2172 |
-
return s.slideTo(s.activeIndex, speed, runCallbacks);
|
2173 |
-
};
|
2174 |
-
|
2175 |
-
s.disableTouchControl = function () {
|
2176 |
-
s.params.onlyExternal = true;
|
2177 |
-
return true;
|
2178 |
-
};
|
2179 |
-
s.enableTouchControl = function () {
|
2180 |
-
s.params.onlyExternal = false;
|
2181 |
-
return true;
|
2182 |
-
};
|
2183 |
-
|
2184 |
-
/*=========================
|
2185 |
-
Translate/transition helpers
|
2186 |
-
===========================*/
|
2187 |
-
s.setWrapperTransition = function (duration, byController) {
|
2188 |
-
s.wrapper.transition(duration);
|
2189 |
-
if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
|
2190 |
-
s.effects[s.params.effect].setTransition(duration);
|
2191 |
-
}
|
2192 |
-
if (s.params.parallax && s.parallax) {
|
2193 |
-
s.parallax.setTransition(duration);
|
2194 |
-
}
|
2195 |
-
if (s.params.scrollbar && s.scrollbar) {
|
2196 |
-
s.scrollbar.setTransition(duration);
|
2197 |
-
}
|
2198 |
-
if (s.params.control && s.controller) {
|
2199 |
-
s.controller.setTransition(duration, byController);
|
2200 |
-
}
|
2201 |
-
s.emit('onSetTransition', s, duration);
|
2202 |
-
};
|
2203 |
-
s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {
|
2204 |
-
var x = 0, y = 0, z = 0;
|
2205 |
-
if (s.isHorizontal()) {
|
2206 |
-
x = s.rtl ? -translate : translate;
|
2207 |
-
}
|
2208 |
-
else {
|
2209 |
-
y = translate;
|
2210 |
-
}
|
2211 |
-
|
2212 |
-
if (s.params.roundLengths) {
|
2213 |
-
x = round(x);
|
2214 |
-
y = round(y);
|
2215 |
-
}
|
2216 |
-
|
2217 |
-
if (!s.params.virtualTranslate) {
|
2218 |
-
if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');
|
2219 |
-
else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');
|
2220 |
-
}
|
2221 |
-
|
2222 |
-
s.translate = s.isHorizontal() ? x : y;
|
2223 |
-
|
2224 |
-
// Check if we need to update progress
|
2225 |
-
var progress;
|
2226 |
-
var translatesDiff = s.maxTranslate() - s.minTranslate();
|
2227 |
-
if (translatesDiff === 0) {
|
2228 |
-
progress = 0;
|
2229 |
-
}
|
2230 |
-
else {
|
2231 |
-
progress = (translate - s.minTranslate()) / (translatesDiff);
|
2232 |
-
}
|
2233 |
-
if (progress !== s.progress) {
|
2234 |
-
s.updateProgress(translate);
|
2235 |
-
}
|
2236 |
-
|
2237 |
-
if (updateActiveIndex) s.updateActiveIndex();
|
2238 |
-
if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
|
2239 |
-
s.effects[s.params.effect].setTranslate(s.translate);
|
2240 |
-
}
|
2241 |
-
if (s.params.parallax && s.parallax) {
|
2242 |
-
s.parallax.setTranslate(s.translate);
|
2243 |
-
}
|
2244 |
-
if (s.params.scrollbar && s.scrollbar) {
|
2245 |
-
s.scrollbar.setTranslate(s.translate);
|
2246 |
-
}
|
2247 |
-
if (s.params.control && s.controller) {
|
2248 |
-
s.controller.setTranslate(s.translate, byController);
|
2249 |
-
}
|
2250 |
-
s.emit('onSetTranslate', s, s.translate);
|
2251 |
-
};
|
2252 |
-
|
2253 |
-
s.getTranslate = function (el, axis) {
|
2254 |
-
var matrix, curTransform, curStyle, transformMatrix;
|
2255 |
-
|
2256 |
-
// automatic axis detection
|
2257 |
-
if (typeof axis === 'undefined') {
|
2258 |
-
axis = 'x';
|
2259 |
-
}
|
2260 |
-
|
2261 |
-
if (s.params.virtualTranslate) {
|
2262 |
-
return s.rtl ? -s.translate : s.translate;
|
2263 |
-
}
|
2264 |
-
|
2265 |
-
curStyle = window.getComputedStyle(el, null);
|
2266 |
-
if (window.WebKitCSSMatrix) {
|
2267 |
-
curTransform = curStyle.transform || curStyle.webkitTransform;
|
2268 |
-
if (curTransform.split(',').length > 6) {
|
2269 |
-
curTransform = curTransform.split(', ').map(function(a){
|
2270 |
-
return a.replace(',','.');
|
2271 |
-
}).join(', ');
|
2272 |
-
}
|
2273 |
-
// Some old versions of Webkit choke when 'none' is passed; pass
|
2274 |
-
// empty string instead in this case
|
2275 |
-
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
2276 |
-
}
|
2277 |
-
else {
|
2278 |
-
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
2279 |
-
matrix = transformMatrix.toString().split(',');
|
2280 |
-
}
|
2281 |
-
|
2282 |
-
if (axis === 'x') {
|
2283 |
-
//Latest Chrome and webkits Fix
|
2284 |
-
if (window.WebKitCSSMatrix)
|
2285 |
-
curTransform = transformMatrix.m41;
|
2286 |
-
//Crazy IE10 Matrix
|
2287 |
-
else if (matrix.length === 16)
|
2288 |
-
curTransform = parseFloat(matrix[12]);
|
2289 |
-
//Normal Browsers
|
2290 |
-
else
|
2291 |
-
curTransform = parseFloat(matrix[4]);
|
2292 |
-
}
|
2293 |
-
if (axis === 'y') {
|
2294 |
-
//Latest Chrome and webkits Fix
|
2295 |
-
if (window.WebKitCSSMatrix)
|
2296 |
-
curTransform = transformMatrix.m42;
|
2297 |
-
//Crazy IE10 Matrix
|
2298 |
-
else if (matrix.length === 16)
|
2299 |
-
curTransform = parseFloat(matrix[13]);
|
2300 |
-
//Normal Browsers
|
2301 |
-
else
|
2302 |
-
curTransform = parseFloat(matrix[5]);
|
2303 |
-
}
|
2304 |
-
if (s.rtl && curTransform) curTransform = -curTransform;
|
2305 |
-
return curTransform || 0;
|
2306 |
-
};
|
2307 |
-
s.getWrapperTranslate = function (axis) {
|
2308 |
-
if (typeof axis === 'undefined') {
|
2309 |
-
axis = s.isHorizontal() ? 'x' : 'y';
|
2310 |
-
}
|
2311 |
-
return s.getTranslate(s.wrapper[0], axis);
|
2312 |
-
};
|
2313 |
-
|
2314 |
-
/*=========================
|
2315 |
-
Observer
|
2316 |
-
===========================*/
|
2317 |
-
s.observers = [];
|
2318 |
-
function initObserver(target, options) {
|
2319 |
-
options = options || {};
|
2320 |
-
// create an observer instance
|
2321 |
-
var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
|
2322 |
-
var observer = new ObserverFunc(function (mutations) {
|
2323 |
-
mutations.forEach(function (mutation) {
|
2324 |
-
s.onResize(true);
|
2325 |
-
s.emit('onObserverUpdate', s, mutation);
|
2326 |
-
});
|
2327 |
-
});
|
2328 |
-
|
2329 |
-
observer.observe(target, {
|
2330 |
-
attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
|
2331 |
-
childList: typeof options.childList === 'undefined' ? true : options.childList,
|
2332 |
-
characterData: typeof options.characterData === 'undefined' ? true : options.characterData
|
2333 |
-
});
|
2334 |
-
|
2335 |
-
s.observers.push(observer);
|
2336 |
-
}
|
2337 |
-
s.initObservers = function () {
|
2338 |
-
if (s.params.observeParents) {
|
2339 |
-
var containerParents = s.container.parents();
|
2340 |
-
for (var i = 0; i < containerParents.length; i++) {
|
2341 |
-
initObserver(containerParents[i]);
|
2342 |
-
}
|
2343 |
-
}
|
2344 |
-
|
2345 |
-
// Observe container
|
2346 |
-
initObserver(s.container[0], {childList: false});
|
2347 |
-
|
2348 |
-
// Observe wrapper
|
2349 |
-
initObserver(s.wrapper[0], {attributes: false});
|
2350 |
-
};
|
2351 |
-
s.disconnectObservers = function () {
|
2352 |
-
for (var i = 0; i < s.observers.length; i++) {
|
2353 |
-
s.observers[i].disconnect();
|
2354 |
-
}
|
2355 |
-
s.observers = [];
|
2356 |
-
};
|
2357 |
-
/*=========================
|
2358 |
-
Loop
|
2359 |
-
===========================*/
|
2360 |
-
// Create looped slides
|
2361 |
-
s.createLoop = function () {
|
2362 |
-
// Remove duplicated slides
|
2363 |
-
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
|
2364 |
-
|
2365 |
-
var slides = s.wrapper.children('.' + s.params.slideClass);
|
2366 |
-
|
2367 |
-
if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;
|
2368 |
-
|
2369 |
-
s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);
|
2370 |
-
s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;
|
2371 |
-
if (s.loopedSlides > slides.length) {
|
2372 |
-
s.loopedSlides = slides.length;
|
2373 |
-
}
|
2374 |
-
|
2375 |
-
var prependSlides = [], appendSlides = [], i;
|
2376 |
-
slides.each(function (index, el) {
|
2377 |
-
var slide = $(this);
|
2378 |
-
if (index < s.loopedSlides) appendSlides.push(el);
|
2379 |
-
if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);
|
2380 |
-
slide.attr('data-swiper-slide-index', index);
|
2381 |
-
});
|
2382 |
-
for (i = 0; i < appendSlides.length; i++) {
|
2383 |
-
s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
|
2384 |
-
}
|
2385 |
-
for (i = prependSlides.length - 1; i >= 0; i--) {
|
2386 |
-
s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
|
2387 |
-
}
|
2388 |
-
};
|
2389 |
-
s.destroyLoop = function () {
|
2390 |
-
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
|
2391 |
-
s.slides.removeAttr('data-swiper-slide-index');
|
2392 |
-
};
|
2393 |
-
s.reLoop = function (updatePosition) {
|
2394 |
-
var oldIndex = s.activeIndex - s.loopedSlides;
|
2395 |
-
s.destroyLoop();
|
2396 |
-
s.createLoop();
|
2397 |
-
s.updateSlidesSize();
|
2398 |
-
if (updatePosition) {
|
2399 |
-
s.slideTo(oldIndex + s.loopedSlides, 0, false);
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
};
|
2403 |
-
s.fixLoop = function () {
|
2404 |
-
var newIndex;
|
2405 |
-
//Fix For Negative Oversliding
|
2406 |
-
if (s.activeIndex < s.loopedSlides) {
|
2407 |
-
newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;
|
2408 |
-
newIndex = newIndex + s.loopedSlides;
|
2409 |
-
s.slideTo(newIndex, 0, false, true);
|
2410 |
-
}
|
2411 |
-
//Fix For Positive Oversliding
|
2412 |
-
else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {
|
2413 |
-
newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;
|
2414 |
-
newIndex = newIndex + s.loopedSlides;
|
2415 |
-
s.slideTo(newIndex, 0, false, true);
|
2416 |
-
}
|
2417 |
-
};
|
2418 |
-
/*=========================
|
2419 |
-
Append/Prepend/Remove Slides
|
2420 |
-
===========================*/
|
2421 |
-
s.appendSlide = function (slides) {
|
2422 |
-
if (s.params.loop) {
|
2423 |
-
s.destroyLoop();
|
2424 |
-
}
|
2425 |
-
if (typeof slides === 'object' && slides.length) {
|
2426 |
-
for (var i = 0; i < slides.length; i++) {
|
2427 |
-
if (slides[i]) s.wrapper.append(slides[i]);
|
2428 |
-
}
|
2429 |
-
}
|
2430 |
-
else {
|
2431 |
-
s.wrapper.append(slides);
|
2432 |
-
}
|
2433 |
-
if (s.params.loop) {
|
2434 |
-
s.createLoop();
|
2435 |
-
}
|
2436 |
-
if (!(s.params.observer && s.support.observer)) {
|
2437 |
-
s.update(true);
|
2438 |
-
}
|
2439 |
-
};
|
2440 |
-
s.prependSlide = function (slides) {
|
2441 |
-
if (s.params.loop) {
|
2442 |
-
s.destroyLoop();
|
2443 |
-
}
|
2444 |
-
var newActiveIndex = s.activeIndex + 1;
|
2445 |
-
if (typeof slides === 'object' && slides.length) {
|
2446 |
-
for (var i = 0; i < slides.length; i++) {
|
2447 |
-
if (slides[i]) s.wrapper.prepend(slides[i]);
|
2448 |
-
}
|
2449 |
-
newActiveIndex = s.activeIndex + slides.length;
|
2450 |
-
}
|
2451 |
-
else {
|
2452 |
-
s.wrapper.prepend(slides);
|
2453 |
-
}
|
2454 |
-
if (s.params.loop) {
|
2455 |
-
s.createLoop();
|
2456 |
-
}
|
2457 |
-
if (!(s.params.observer && s.support.observer)) {
|
2458 |
-
s.update(true);
|
2459 |
-
}
|
2460 |
-
s.slideTo(newActiveIndex, 0, false);
|
2461 |
-
};
|
2462 |
-
s.removeSlide = function (slidesIndexes) {
|
2463 |
-
if (s.params.loop) {
|
2464 |
-
s.destroyLoop();
|
2465 |
-
s.slides = s.wrapper.children('.' + s.params.slideClass);
|
2466 |
-
}
|
2467 |
-
var newActiveIndex = s.activeIndex,
|
2468 |
-
indexToRemove;
|
2469 |
-
if (typeof slidesIndexes === 'object' && slidesIndexes.length) {
|
2470 |
-
for (var i = 0; i < slidesIndexes.length; i++) {
|
2471 |
-
indexToRemove = slidesIndexes[i];
|
2472 |
-
if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
|
2473 |
-
if (indexToRemove < newActiveIndex) newActiveIndex--;
|
2474 |
-
}
|
2475 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2476 |
-
}
|
2477 |
-
else {
|
2478 |
-
indexToRemove = slidesIndexes;
|
2479 |
-
if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();
|
2480 |
-
if (indexToRemove < newActiveIndex) newActiveIndex--;
|
2481 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
if (s.params.loop) {
|
2485 |
-
s.createLoop();
|
2486 |
-
}
|
2487 |
-
|
2488 |
-
if (!(s.params.observer && s.support.observer)) {
|
2489 |
-
s.update(true);
|
2490 |
-
}
|
2491 |
-
if (s.params.loop) {
|
2492 |
-
s.slideTo(newActiveIndex + s.loopedSlides, 0, false);
|
2493 |
-
}
|
2494 |
-
else {
|
2495 |
-
s.slideTo(newActiveIndex, 0, false);
|
2496 |
-
}
|
2497 |
-
|
2498 |
-
};
|
2499 |
-
s.removeAllSlides = function () {
|
2500 |
-
var slidesIndexes = [];
|
2501 |
-
for (var i = 0; i < s.slides.length; i++) {
|
2502 |
-
slidesIndexes.push(i);
|
2503 |
-
}
|
2504 |
-
s.removeSlide(slidesIndexes);
|
2505 |
-
};
|
2506 |
-
|
2507 |
-
|
2508 |
-
/*=========================
|
2509 |
-
Effects
|
2510 |
-
===========================*/
|
2511 |
-
s.effects = {
|
2512 |
-
fade: {
|
2513 |
-
setTranslate: function () {
|
2514 |
-
for (var i = 0; i < s.slides.length; i++) {
|
2515 |
-
var slide = s.slides.eq(i);
|
2516 |
-
var offset = slide[0].swiperSlideOffset;
|
2517 |
-
var tx = -offset;
|
2518 |
-
if (!s.params.virtualTranslate) tx = tx - s.translate;
|
2519 |
-
var ty = 0;
|
2520 |
-
if (!s.isHorizontal()) {
|
2521 |
-
ty = tx;
|
2522 |
-
tx = 0;
|
2523 |
-
}
|
2524 |
-
var slideOpacity = s.params.fade.crossFade ?
|
2525 |
-
Math.max(1 - Math.abs(slide[0].progress), 0) :
|
2526 |
-
1 + Math.min(Math.max(slide[0].progress, -1), 0);
|
2527 |
-
slide
|
2528 |
-
.css({
|
2529 |
-
opacity: slideOpacity
|
2530 |
-
})
|
2531 |
-
.transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');
|
2532 |
-
|
2533 |
-
}
|
2534 |
-
|
2535 |
-
},
|
2536 |
-
setTransition: function (duration) {
|
2537 |
-
s.slides.transition(duration);
|
2538 |
-
if (s.params.virtualTranslate && duration !== 0) {
|
2539 |
-
var eventTriggered = false;
|
2540 |
-
s.slides.transitionEnd(function () {
|
2541 |
-
if (eventTriggered) return;
|
2542 |
-
if (!s) return;
|
2543 |
-
eventTriggered = true;
|
2544 |
-
s.animating = false;
|
2545 |
-
var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
|
2546 |
-
for (var i = 0; i < triggerEvents.length; i++) {
|
2547 |
-
s.wrapper.trigger(triggerEvents[i]);
|
2548 |
-
}
|
2549 |
-
});
|
2550 |
-
}
|
2551 |
-
}
|
2552 |
-
},
|
2553 |
-
flip: {
|
2554 |
-
setTranslate: function () {
|
2555 |
-
for (var i = 0; i < s.slides.length; i++) {
|
2556 |
-
var slide = s.slides.eq(i);
|
2557 |
-
var progress = slide[0].progress;
|
2558 |
-
if (s.params.flip.limitRotation) {
|
2559 |
-
progress = Math.max(Math.min(slide[0].progress, 1), -1);
|
2560 |
-
}
|
2561 |
-
var offset = slide[0].swiperSlideOffset;
|
2562 |
-
var rotate = -180 * progress,
|
2563 |
-
rotateY = rotate,
|
2564 |
-
rotateX = 0,
|
2565 |
-
tx = -offset,
|
2566 |
-
ty = 0;
|
2567 |
-
if (!s.isHorizontal()) {
|
2568 |
-
ty = tx;
|
2569 |
-
tx = 0;
|
2570 |
-
rotateX = -rotateY;
|
2571 |
-
rotateY = 0;
|
2572 |
-
}
|
2573 |
-
else if (s.rtl) {
|
2574 |
-
rotateY = -rotateY;
|
2575 |
-
}
|
2576 |
-
|
2577 |
-
slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;
|
2578 |
-
|
2579 |
-
if (s.params.flip.slideShadows) {
|
2580 |
-
//Set shadows
|
2581 |
-
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
2582 |
-
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
2583 |
-
if (shadowBefore.length === 0) {
|
2584 |
-
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
2585 |
-
slide.append(shadowBefore);
|
2586 |
-
}
|
2587 |
-
if (shadowAfter.length === 0) {
|
2588 |
-
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
2589 |
-
slide.append(shadowAfter);
|
2590 |
-
}
|
2591 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
2592 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
2593 |
-
}
|
2594 |
-
|
2595 |
-
slide
|
2596 |
-
.transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');
|
2597 |
-
}
|
2598 |
-
},
|
2599 |
-
setTransition: function (duration) {
|
2600 |
-
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
2601 |
-
if (s.params.virtualTranslate && duration !== 0) {
|
2602 |
-
var eventTriggered = false;
|
2603 |
-
s.slides.eq(s.activeIndex).transitionEnd(function () {
|
2604 |
-
if (eventTriggered) return;
|
2605 |
-
if (!s) return;
|
2606 |
-
if (!$(this).hasClass(s.params.slideActiveClass)) return;
|
2607 |
-
eventTriggered = true;
|
2608 |
-
s.animating = false;
|
2609 |
-
var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];
|
2610 |
-
for (var i = 0; i < triggerEvents.length; i++) {
|
2611 |
-
s.wrapper.trigger(triggerEvents[i]);
|
2612 |
-
}
|
2613 |
-
});
|
2614 |
-
}
|
2615 |
-
}
|
2616 |
-
},
|
2617 |
-
cube: {
|
2618 |
-
setTranslate: function () {
|
2619 |
-
var wrapperRotate = 0, cubeShadow;
|
2620 |
-
if (s.params.cube.shadow) {
|
2621 |
-
if (s.isHorizontal()) {
|
2622 |
-
cubeShadow = s.wrapper.find('.swiper-cube-shadow');
|
2623 |
-
if (cubeShadow.length === 0) {
|
2624 |
-
cubeShadow = $('<div class="swiper-cube-shadow"></div>');
|
2625 |
-
s.wrapper.append(cubeShadow);
|
2626 |
-
}
|
2627 |
-
cubeShadow.css({height: s.width + 'px'});
|
2628 |
-
}
|
2629 |
-
else {
|
2630 |
-
cubeShadow = s.container.find('.swiper-cube-shadow');
|
2631 |
-
if (cubeShadow.length === 0) {
|
2632 |
-
cubeShadow = $('<div class="swiper-cube-shadow"></div>');
|
2633 |
-
s.container.append(cubeShadow);
|
2634 |
-
}
|
2635 |
-
}
|
2636 |
-
}
|
2637 |
-
for (var i = 0; i < s.slides.length; i++) {
|
2638 |
-
var slide = s.slides.eq(i);
|
2639 |
-
var slideAngle = i * 90;
|
2640 |
-
var round = Math.floor(slideAngle / 360);
|
2641 |
-
if (s.rtl) {
|
2642 |
-
slideAngle = -slideAngle;
|
2643 |
-
round = Math.floor(-slideAngle / 360);
|
2644 |
-
}
|
2645 |
-
var progress = Math.max(Math.min(slide[0].progress, 1), -1);
|
2646 |
-
var tx = 0, ty = 0, tz = 0;
|
2647 |
-
if (i % 4 === 0) {
|
2648 |
-
tx = - round * 4 * s.size;
|
2649 |
-
tz = 0;
|
2650 |
-
}
|
2651 |
-
else if ((i - 1) % 4 === 0) {
|
2652 |
-
tx = 0;
|
2653 |
-
tz = - round * 4 * s.size;
|
2654 |
-
}
|
2655 |
-
else if ((i - 2) % 4 === 0) {
|
2656 |
-
tx = s.size + round * 4 * s.size;
|
2657 |
-
tz = s.size;
|
2658 |
-
}
|
2659 |
-
else if ((i - 3) % 4 === 0) {
|
2660 |
-
tx = - s.size;
|
2661 |
-
tz = 3 * s.size + s.size * 4 * round;
|
2662 |
-
}
|
2663 |
-
if (s.rtl) {
|
2664 |
-
tx = -tx;
|
2665 |
-
}
|
2666 |
-
|
2667 |
-
if (!s.isHorizontal()) {
|
2668 |
-
ty = tx;
|
2669 |
-
tx = 0;
|
2670 |
-
}
|
2671 |
-
|
2672 |
-
var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';
|
2673 |
-
if (progress <= 1 && progress > -1) {
|
2674 |
-
wrapperRotate = i * 90 + progress * 90;
|
2675 |
-
if (s.rtl) wrapperRotate = -i * 90 - progress * 90;
|
2676 |
-
}
|
2677 |
-
slide.transform(transform);
|
2678 |
-
if (s.params.cube.slideShadows) {
|
2679 |
-
//Set shadows
|
2680 |
-
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
2681 |
-
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
2682 |
-
if (shadowBefore.length === 0) {
|
2683 |
-
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
2684 |
-
slide.append(shadowBefore);
|
2685 |
-
}
|
2686 |
-
if (shadowAfter.length === 0) {
|
2687 |
-
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
2688 |
-
slide.append(shadowAfter);
|
2689 |
-
}
|
2690 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
2691 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
2692 |
-
}
|
2693 |
-
}
|
2694 |
-
s.wrapper.css({
|
2695 |
-
'-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
2696 |
-
'-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
2697 |
-
'-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',
|
2698 |
-
'transform-origin': '50% 50% -' + (s.size / 2) + 'px'
|
2699 |
-
});
|
2700 |
-
|
2701 |
-
if (s.params.cube.shadow) {
|
2702 |
-
if (s.isHorizontal()) {
|
2703 |
-
cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');
|
2704 |
-
}
|
2705 |
-
else {
|
2706 |
-
var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
|
2707 |
-
var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
|
2708 |
-
var scale1 = s.params.cube.shadowScale,
|
2709 |
-
scale2 = s.params.cube.shadowScale / multiplier,
|
2710 |
-
offset = s.params.cube.shadowOffset;
|
2711 |
-
cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');
|
2712 |
-
}
|
2713 |
-
}
|
2714 |
-
var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;
|
2715 |
-
s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');
|
2716 |
-
},
|
2717 |
-
setTransition: function (duration) {
|
2718 |
-
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
2719 |
-
if (s.params.cube.shadow && !s.isHorizontal()) {
|
2720 |
-
s.container.find('.swiper-cube-shadow').transition(duration);
|
2721 |
-
}
|
2722 |
-
}
|
2723 |
-
},
|
2724 |
-
coverflow: {
|
2725 |
-
setTranslate: function () {
|
2726 |
-
var transform = s.translate;
|
2727 |
-
var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;
|
2728 |
-
var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;
|
2729 |
-
var translate = s.params.coverflow.depth;
|
2730 |
-
//Each slide offset from center
|
2731 |
-
for (var i = 0, length = s.slides.length; i < length; i++) {
|
2732 |
-
var slide = s.slides.eq(i);
|
2733 |
-
var slideSize = s.slidesSizesGrid[i];
|
2734 |
-
var slideOffset = slide[0].swiperSlideOffset;
|
2735 |
-
var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;
|
2736 |
-
|
2737 |
-
var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;
|
2738 |
-
var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;
|
2739 |
-
// var rotateZ = 0
|
2740 |
-
var translateZ = -translate * Math.abs(offsetMultiplier);
|
2741 |
-
|
2742 |
-
var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);
|
2743 |
-
var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;
|
2744 |
-
|
2745 |
-
//Fix for ultra small values
|
2746 |
-
if (Math.abs(translateX) < 0.001) translateX = 0;
|
2747 |
-
if (Math.abs(translateY) < 0.001) translateY = 0;
|
2748 |
-
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
2749 |
-
if (Math.abs(rotateY) < 0.001) rotateY = 0;
|
2750 |
-
if (Math.abs(rotateX) < 0.001) rotateX = 0;
|
2751 |
-
|
2752 |
-
var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';
|
2753 |
-
|
2754 |
-
slide.transform(slideTransform);
|
2755 |
-
slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
2756 |
-
if (s.params.coverflow.slideShadows) {
|
2757 |
-
//Set shadows
|
2758 |
-
var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');
|
2759 |
-
var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');
|
2760 |
-
if (shadowBefore.length === 0) {
|
2761 |
-
shadowBefore = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'left' : 'top') + '"></div>');
|
2762 |
-
slide.append(shadowBefore);
|
2763 |
-
}
|
2764 |
-
if (shadowAfter.length === 0) {
|
2765 |
-
shadowAfter = $('<div class="swiper-slide-shadow-' + (s.isHorizontal() ? 'right' : 'bottom') + '"></div>');
|
2766 |
-
slide.append(shadowAfter);
|
2767 |
-
}
|
2768 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
|
2769 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
|
2770 |
-
}
|
2771 |
-
}
|
2772 |
-
|
2773 |
-
//Set correct perspective for IE10
|
2774 |
-
if (s.browser.ie) {
|
2775 |
-
var ws = s.wrapper[0].style;
|
2776 |
-
ws.perspectiveOrigin = center + 'px 50%';
|
2777 |
-
}
|
2778 |
-
},
|
2779 |
-
setTransition: function (duration) {
|
2780 |
-
s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);
|
2781 |
-
}
|
2782 |
-
}
|
2783 |
-
};
|
2784 |
-
|
2785 |
-
|
2786 |
-
/*=========================
|
2787 |
-
Images Lazy Loading
|
2788 |
-
===========================*/
|
2789 |
-
s.lazy = {
|
2790 |
-
initialImageLoaded: false,
|
2791 |
-
loadImageInSlide: function (index, loadInDuplicate) {
|
2792 |
-
if (typeof index === 'undefined') return;
|
2793 |
-
if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;
|
2794 |
-
if (s.slides.length === 0) return;
|
2795 |
-
|
2796 |
-
var slide = s.slides.eq(index);
|
2797 |
-
var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')');
|
2798 |
-
if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) {
|
2799 |
-
img = img.add(slide[0]);
|
2800 |
-
}
|
2801 |
-
if (img.length === 0) return;
|
2802 |
-
|
2803 |
-
img.each(function () {
|
2804 |
-
var _img = $(this);
|
2805 |
-
_img.addClass(s.params.lazyStatusLoadingClass);
|
2806 |
-
var background = _img.attr('data-background');
|
2807 |
-
var src = _img.attr('data-src'),
|
2808 |
-
srcset = _img.attr('data-srcset'),
|
2809 |
-
sizes = _img.attr('data-sizes');
|
2810 |
-
s.loadImage(_img[0], (src || background), srcset, sizes, false, function () {
|
2811 |
-
if (typeof s === 'undefined' || s === null || !s) return;
|
2812 |
-
if (background) {
|
2813 |
-
_img.css('background-image', 'url("' + background + '")');
|
2814 |
-
_img.removeAttr('data-background');
|
2815 |
-
}
|
2816 |
-
else {
|
2817 |
-
if (srcset) {
|
2818 |
-
_img.attr('srcset', srcset);
|
2819 |
-
_img.removeAttr('data-srcset');
|
2820 |
-
}
|
2821 |
-
if (sizes) {
|
2822 |
-
_img.attr('sizes', sizes);
|
2823 |
-
_img.removeAttr('data-sizes');
|
2824 |
-
}
|
2825 |
-
if (src) {
|
2826 |
-
_img.attr('src', src);
|
2827 |
-
_img.removeAttr('data-src');
|
2828 |
-
}
|
2829 |
-
|
2830 |
-
}
|
2831 |
-
|
2832 |
-
_img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);
|
2833 |
-
slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove();
|
2834 |
-
if (s.params.loop && loadInDuplicate) {
|
2835 |
-
var slideOriginalIndex = slide.attr('data-swiper-slide-index');
|
2836 |
-
if (slide.hasClass(s.params.slideDuplicateClass)) {
|
2837 |
-
var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')');
|
2838 |
-
s.lazy.loadImageInSlide(originalSlide.index(), false);
|
2839 |
-
}
|
2840 |
-
else {
|
2841 |
-
var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]');
|
2842 |
-
s.lazy.loadImageInSlide(duplicatedSlide.index(), false);
|
2843 |
-
}
|
2844 |
-
}
|
2845 |
-
s.emit('onLazyImageReady', s, slide[0], _img[0]);
|
2846 |
-
});
|
2847 |
-
|
2848 |
-
s.emit('onLazyImageLoad', s, slide[0], _img[0]);
|
2849 |
-
});
|
2850 |
-
|
2851 |
-
},
|
2852 |
-
load: function () {
|
2853 |
-
var i;
|
2854 |
-
var slidesPerView = s.params.slidesPerView;
|
2855 |
-
if (slidesPerView === 'auto') {
|
2856 |
-
slidesPerView = 0;
|
2857 |
-
}
|
2858 |
-
if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true;
|
2859 |
-
if (s.params.watchSlidesVisibility) {
|
2860 |
-
s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {
|
2861 |
-
s.lazy.loadImageInSlide($(this).index());
|
2862 |
-
});
|
2863 |
-
}
|
2864 |
-
else {
|
2865 |
-
if (slidesPerView > 1) {
|
2866 |
-
for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) {
|
2867 |
-
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
2868 |
-
}
|
2869 |
-
}
|
2870 |
-
else {
|
2871 |
-
s.lazy.loadImageInSlide(s.activeIndex);
|
2872 |
-
}
|
2873 |
-
}
|
2874 |
-
if (s.params.lazyLoadingInPrevNext) {
|
2875 |
-
if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {
|
2876 |
-
var amount = s.params.lazyLoadingInPrevNextAmount;
|
2877 |
-
var spv = slidesPerView;
|
2878 |
-
var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);
|
2879 |
-
var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);
|
2880 |
-
// Next Slides
|
2881 |
-
for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) {
|
2882 |
-
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
2883 |
-
}
|
2884 |
-
// Prev Slides
|
2885 |
-
for (i = minIndex; i < s.activeIndex ; i++) {
|
2886 |
-
if (s.slides[i]) s.lazy.loadImageInSlide(i);
|
2887 |
-
}
|
2888 |
-
}
|
2889 |
-
else {
|
2890 |
-
var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);
|
2891 |
-
if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());
|
2892 |
-
|
2893 |
-
var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);
|
2894 |
-
if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());
|
2895 |
-
}
|
2896 |
-
}
|
2897 |
-
},
|
2898 |
-
onTransitionStart: function () {
|
2899 |
-
if (s.params.lazyLoading) {
|
2900 |
-
if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {
|
2901 |
-
s.lazy.load();
|
2902 |
-
}
|
2903 |
-
}
|
2904 |
-
},
|
2905 |
-
onTransitionEnd: function () {
|
2906 |
-
if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {
|
2907 |
-
s.lazy.load();
|
2908 |
-
}
|
2909 |
-
}
|
2910 |
-
};
|
2911 |
-
|
2912 |
-
|
2913 |
-
/*=========================
|
2914 |
-
Scrollbar
|
2915 |
-
===========================*/
|
2916 |
-
s.scrollbar = {
|
2917 |
-
isTouched: false,
|
2918 |
-
setDragPosition: function (e) {
|
2919 |
-
var sb = s.scrollbar;
|
2920 |
-
var x = 0, y = 0;
|
2921 |
-
var translate;
|
2922 |
-
var pointerPosition = s.isHorizontal() ?
|
2923 |
-
((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :
|
2924 |
-
((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;
|
2925 |
-
var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;
|
2926 |
-
var positionMin = -s.minTranslate() * sb.moveDivider;
|
2927 |
-
var positionMax = -s.maxTranslate() * sb.moveDivider;
|
2928 |
-
if (position < positionMin) {
|
2929 |
-
position = positionMin;
|
2930 |
-
}
|
2931 |
-
else if (position > positionMax) {
|
2932 |
-
position = positionMax;
|
2933 |
-
}
|
2934 |
-
position = -position / sb.moveDivider;
|
2935 |
-
s.updateProgress(position);
|
2936 |
-
s.setWrapperTranslate(position, true);
|
2937 |
-
},
|
2938 |
-
dragStart: function (e) {
|
2939 |
-
var sb = s.scrollbar;
|
2940 |
-
sb.isTouched = true;
|
2941 |
-
e.preventDefault();
|
2942 |
-
e.stopPropagation();
|
2943 |
-
|
2944 |
-
sb.setDragPosition(e);
|
2945 |
-
clearTimeout(sb.dragTimeout);
|
2946 |
-
|
2947 |
-
sb.track.transition(0);
|
2948 |
-
if (s.params.scrollbarHide) {
|
2949 |
-
sb.track.css('opacity', 1);
|
2950 |
-
}
|
2951 |
-
s.wrapper.transition(100);
|
2952 |
-
sb.drag.transition(100);
|
2953 |
-
s.emit('onScrollbarDragStart', s);
|
2954 |
-
},
|
2955 |
-
dragMove: function (e) {
|
2956 |
-
var sb = s.scrollbar;
|
2957 |
-
if (!sb.isTouched) return;
|
2958 |
-
if (e.preventDefault) e.preventDefault();
|
2959 |
-
else e.returnValue = false;
|
2960 |
-
sb.setDragPosition(e);
|
2961 |
-
s.wrapper.transition(0);
|
2962 |
-
sb.track.transition(0);
|
2963 |
-
sb.drag.transition(0);
|
2964 |
-
s.emit('onScrollbarDragMove', s);
|
2965 |
-
},
|
2966 |
-
dragEnd: function (e) {
|
2967 |
-
var sb = s.scrollbar;
|
2968 |
-
if (!sb.isTouched) return;
|
2969 |
-
sb.isTouched = false;
|
2970 |
-
if (s.params.scrollbarHide) {
|
2971 |
-
clearTimeout(sb.dragTimeout);
|
2972 |
-
sb.dragTimeout = setTimeout(function () {
|
2973 |
-
sb.track.css('opacity', 0);
|
2974 |
-
sb.track.transition(400);
|
2975 |
-
}, 1000);
|
2976 |
-
|
2977 |
-
}
|
2978 |
-
s.emit('onScrollbarDragEnd', s);
|
2979 |
-
if (s.params.scrollbarSnapOnRelease) {
|
2980 |
-
s.slideReset();
|
2981 |
-
}
|
2982 |
-
},
|
2983 |
-
draggableEvents: (function () {
|
2984 |
-
if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop;
|
2985 |
-
else return s.touchEvents;
|
2986 |
-
})(),
|
2987 |
-
enableDraggable: function () {
|
2988 |
-
var sb = s.scrollbar;
|
2989 |
-
var target = s.support.touch ? sb.track : document;
|
2990 |
-
$(sb.track).on(sb.draggableEvents.start, sb.dragStart);
|
2991 |
-
$(target).on(sb.draggableEvents.move, sb.dragMove);
|
2992 |
-
$(target).on(sb.draggableEvents.end, sb.dragEnd);
|
2993 |
-
},
|
2994 |
-
disableDraggable: function () {
|
2995 |
-
var sb = s.scrollbar;
|
2996 |
-
var target = s.support.touch ? sb.track : document;
|
2997 |
-
$(sb.track).off(sb.draggableEvents.start, sb.dragStart);
|
2998 |
-
$(target).off(sb.draggableEvents.move, sb.dragMove);
|
2999 |
-
$(target).off(sb.draggableEvents.end, sb.dragEnd);
|
3000 |
-
},
|
3001 |
-
set: function () {
|
3002 |
-
if (!s.params.scrollbar) return;
|
3003 |
-
var sb = s.scrollbar;
|
3004 |
-
sb.track = $(s.params.scrollbar);
|
3005 |
-
if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {
|
3006 |
-
sb.track = s.container.find(s.params.scrollbar);
|
3007 |
-
}
|
3008 |
-
sb.drag = sb.track.find('.swiper-scrollbar-drag');
|
3009 |
-
if (sb.drag.length === 0) {
|
3010 |
-
sb.drag = $('<div class="swiper-scrollbar-drag"></div>');
|
3011 |
-
sb.track.append(sb.drag);
|
3012 |
-
}
|
3013 |
-
sb.drag[0].style.width = '';
|
3014 |
-
sb.drag[0].style.height = '';
|
3015 |
-
sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;
|
3016 |
-
|
3017 |
-
sb.divider = s.size / s.virtualSize;
|
3018 |
-
sb.moveDivider = sb.divider * (sb.trackSize / s.size);
|
3019 |
-
sb.dragSize = sb.trackSize * sb.divider;
|
3020 |
-
|
3021 |
-
if (s.isHorizontal()) {
|
3022 |
-
sb.drag[0].style.width = sb.dragSize + 'px';
|
3023 |
-
}
|
3024 |
-
else {
|
3025 |
-
sb.drag[0].style.height = sb.dragSize + 'px';
|
3026 |
-
}
|
3027 |
-
|
3028 |
-
if (sb.divider >= 1) {
|
3029 |
-
sb.track[0].style.display = 'none';
|
3030 |
-
}
|
3031 |
-
else {
|
3032 |
-
sb.track[0].style.display = '';
|
3033 |
-
}
|
3034 |
-
if (s.params.scrollbarHide) {
|
3035 |
-
sb.track[0].style.opacity = 0;
|
3036 |
-
}
|
3037 |
-
},
|
3038 |
-
setTranslate: function () {
|
3039 |
-
if (!s.params.scrollbar) return;
|
3040 |
-
var diff;
|
3041 |
-
var sb = s.scrollbar;
|
3042 |
-
var translate = s.translate || 0;
|
3043 |
-
var newPos;
|
3044 |
-
|
3045 |
-
var newSize = sb.dragSize;
|
3046 |
-
newPos = (sb.trackSize - sb.dragSize) * s.progress;
|
3047 |
-
if (s.rtl && s.isHorizontal()) {
|
3048 |
-
newPos = -newPos;
|
3049 |
-
if (newPos > 0) {
|
3050 |
-
newSize = sb.dragSize - newPos;
|
3051 |
-
newPos = 0;
|
3052 |
-
}
|
3053 |
-
else if (-newPos + sb.dragSize > sb.trackSize) {
|
3054 |
-
newSize = sb.trackSize + newPos;
|
3055 |
-
}
|
3056 |
-
}
|
3057 |
-
else {
|
3058 |
-
if (newPos < 0) {
|
3059 |
-
newSize = sb.dragSize + newPos;
|
3060 |
-
newPos = 0;
|
3061 |
-
}
|
3062 |
-
else if (newPos + sb.dragSize > sb.trackSize) {
|
3063 |
-
newSize = sb.trackSize - newPos;
|
3064 |
-
}
|
3065 |
-
}
|
3066 |
-
if (s.isHorizontal()) {
|
3067 |
-
if (s.support.transforms3d) {
|
3068 |
-
sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');
|
3069 |
-
}
|
3070 |
-
else {
|
3071 |
-
sb.drag.transform('translateX(' + (newPos) + 'px)');
|
3072 |
-
}
|
3073 |
-
sb.drag[0].style.width = newSize + 'px';
|
3074 |
-
}
|
3075 |
-
else {
|
3076 |
-
if (s.support.transforms3d) {
|
3077 |
-
sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');
|
3078 |
-
}
|
3079 |
-
else {
|
3080 |
-
sb.drag.transform('translateY(' + (newPos) + 'px)');
|
3081 |
-
}
|
3082 |
-
sb.drag[0].style.height = newSize + 'px';
|
3083 |
-
}
|
3084 |
-
if (s.params.scrollbarHide) {
|
3085 |
-
clearTimeout(sb.timeout);
|
3086 |
-
sb.track[0].style.opacity = 1;
|
3087 |
-
sb.timeout = setTimeout(function () {
|
3088 |
-
sb.track[0].style.opacity = 0;
|
3089 |
-
sb.track.transition(400);
|
3090 |
-
}, 1000);
|
3091 |
-
}
|
3092 |
-
},
|
3093 |
-
setTransition: function (duration) {
|
3094 |
-
if (!s.params.scrollbar) return;
|
3095 |
-
s.scrollbar.drag.transition(duration);
|
3096 |
-
}
|
3097 |
-
};
|
3098 |
-
|
3099 |
-
|
3100 |
-
/*=========================
|
3101 |
-
Controller
|
3102 |
-
===========================*/
|
3103 |
-
s.controller = {
|
3104 |
-
LinearSpline: function (x, y) {
|
3105 |
-
var binarySearch = (function() {
|
3106 |
-
var maxIndex, minIndex, guess;
|
3107 |
-
return function(array, val) {
|
3108 |
-
minIndex = -1;
|
3109 |
-
maxIndex = array.length;
|
3110 |
-
while (maxIndex - minIndex > 1)
|
3111 |
-
if (array[guess = maxIndex + minIndex >> 1] <= val) {
|
3112 |
-
minIndex = guess;
|
3113 |
-
} else {
|
3114 |
-
maxIndex = guess;
|
3115 |
-
}
|
3116 |
-
return maxIndex;
|
3117 |
-
};
|
3118 |
-
})();
|
3119 |
-
this.x = x;
|
3120 |
-
this.y = y;
|
3121 |
-
this.lastIndex = x.length - 1;
|
3122 |
-
// Given an x value (x2), return the expected y2 value:
|
3123 |
-
// (x1,y1) is the known point before given value,
|
3124 |
-
// (x3,y3) is the known point after given value.
|
3125 |
-
var i1, i3;
|
3126 |
-
var l = this.x.length;
|
3127 |
-
|
3128 |
-
this.interpolate = function (x2) {
|
3129 |
-
if (!x2) return 0;
|
3130 |
-
|
3131 |
-
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
3132 |
-
i3 = binarySearch(this.x, x2);
|
3133 |
-
i1 = i3 - 1;
|
3134 |
-
|
3135 |
-
// We have our indexes i1 & i3, so we can calculate already:
|
3136 |
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
3137 |
-
return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];
|
3138 |
-
};
|
3139 |
-
},
|
3140 |
-
//xxx: for now i will just save one spline function to to
|
3141 |
-
getInterpolateFunction: function(c){
|
3142 |
-
if(!s.controller.spline) s.controller.spline = s.params.loop ?
|
3143 |
-
new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :
|
3144 |
-
new s.controller.LinearSpline(s.snapGrid, c.snapGrid);
|
3145 |
-
},
|
3146 |
-
setTranslate: function (translate, byController) {
|
3147 |
-
var controlled = s.params.control;
|
3148 |
-
var multiplier, controlledTranslate;
|
3149 |
-
function setControlledTranslate(c) {
|
3150 |
-
// this will create an Interpolate function based on the snapGrids
|
3151 |
-
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
3152 |
-
// it makes sense to create this only once and recall it for the interpolation
|
3153 |
-
// the function does a lot of value caching for performance
|
3154 |
-
translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;
|
3155 |
-
if (s.params.controlBy === 'slide') {
|
3156 |
-
s.controller.getInterpolateFunction(c);
|
3157 |
-
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
3158 |
-
// but it did not work out
|
3159 |
-
controlledTranslate = -s.controller.spline.interpolate(-translate);
|
3160 |
-
}
|
3161 |
-
|
3162 |
-
if(!controlledTranslate || s.params.controlBy === 'container'){
|
3163 |
-
multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());
|
3164 |
-
controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();
|
3165 |
-
}
|
3166 |
-
|
3167 |
-
if (s.params.controlInverse) {
|
3168 |
-
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
3169 |
-
}
|
3170 |
-
c.updateProgress(controlledTranslate);
|
3171 |
-
c.setWrapperTranslate(controlledTranslate, false, s);
|
3172 |
-
c.updateActiveIndex();
|
3173 |
-
}
|
3174 |
-
if (Array.isArray(controlled)) {
|
3175 |
-
for (var i = 0; i < controlled.length; i++) {
|
3176 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
3177 |
-
setControlledTranslate(controlled[i]);
|
3178 |
-
}
|
3179 |
-
}
|
3180 |
-
}
|
3181 |
-
else if (controlled instanceof Swiper && byController !== controlled) {
|
3182 |
-
|
3183 |
-
setControlledTranslate(controlled);
|
3184 |
-
}
|
3185 |
-
},
|
3186 |
-
setTransition: function (duration, byController) {
|
3187 |
-
var controlled = s.params.control;
|
3188 |
-
var i;
|
3189 |
-
function setControlledTransition(c) {
|
3190 |
-
c.setWrapperTransition(duration, s);
|
3191 |
-
if (duration !== 0) {
|
3192 |
-
c.onTransitionStart();
|
3193 |
-
c.wrapper.transitionEnd(function(){
|
3194 |
-
if (!controlled) return;
|
3195 |
-
if (c.params.loop && s.params.controlBy === 'slide') {
|
3196 |
-
c.fixLoop();
|
3197 |
-
}
|
3198 |
-
c.onTransitionEnd();
|
3199 |
-
|
3200 |
-
});
|
3201 |
-
}
|
3202 |
-
}
|
3203 |
-
if (Array.isArray(controlled)) {
|
3204 |
-
for (i = 0; i < controlled.length; i++) {
|
3205 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
3206 |
-
setControlledTransition(controlled[i]);
|
3207 |
-
}
|
3208 |
-
}
|
3209 |
-
}
|
3210 |
-
else if (controlled instanceof Swiper && byController !== controlled) {
|
3211 |
-
setControlledTransition(controlled);
|
3212 |
-
}
|
3213 |
-
}
|
3214 |
-
};
|
3215 |
-
|
3216 |
-
|
3217 |
-
/*=========================
|
3218 |
-
Hash Navigation
|
3219 |
-
===========================*/
|
3220 |
-
s.hashnav = {
|
3221 |
-
onHashCange: function (e, a) {
|
3222 |
-
var newHash = document.location.hash.replace('#', '');
|
3223 |
-
var activeSlideHash = s.slides.eq(s.activeIndex).attr('data-hash');
|
3224 |
-
if (newHash !== activeSlideHash) {
|
3225 |
-
s.slideTo(s.wrapper.children('.' + s.params.slideClass + '[data-hash="' + (newHash) + '"]').index());
|
3226 |
-
}
|
3227 |
-
},
|
3228 |
-
attachEvents: function (detach) {
|
3229 |
-
var action = detach ? 'off' : 'on';
|
3230 |
-
$(window)[action]('hashchange', s.hashnav.onHashCange);
|
3231 |
-
},
|
3232 |
-
setHash: function () {
|
3233 |
-
if (!s.hashnav.initialized || !s.params.hashnav) return;
|
3234 |
-
if (s.params.replaceState && window.history && window.history.replaceState) {
|
3235 |
-
window.history.replaceState(null, null, ('#' + s.slides.eq(s.activeIndex).attr('data-hash') || ''));
|
3236 |
-
} else {
|
3237 |
-
var slide = s.slides.eq(s.activeIndex);
|
3238 |
-
var hash = slide.attr('data-hash') || slide.attr('data-history');
|
3239 |
-
document.location.hash = hash || '';
|
3240 |
-
}
|
3241 |
-
},
|
3242 |
-
init: function () {
|
3243 |
-
if (!s.params.hashnav || s.params.history) return;
|
3244 |
-
s.hashnav.initialized = true;
|
3245 |
-
var hash = document.location.hash.replace('#', '');
|
3246 |
-
if (hash) {
|
3247 |
-
var speed = 0;
|
3248 |
-
for (var i = 0, length = s.slides.length; i < length; i++) {
|
3249 |
-
var slide = s.slides.eq(i);
|
3250 |
-
var slideHash = slide.attr('data-hash') || slide.attr('data-history');
|
3251 |
-
if (slideHash === hash && !slide.hasClass(s.params.slideDuplicateClass)) {
|
3252 |
-
var index = slide.index();
|
3253 |
-
s.slideTo(index, speed, s.params.runCallbacksOnInit, true);
|
3254 |
-
}
|
3255 |
-
}
|
3256 |
-
}
|
3257 |
-
if (s.params.hashnavWatchState) s.hashnav.attachEvents();
|
3258 |
-
},
|
3259 |
-
destroy: function () {
|
3260 |
-
if (s.params.hashnavWatchState) s.hashnav.attachEvents(true);
|
3261 |
-
}
|
3262 |
-
};
|
3263 |
-
|
3264 |
-
|
3265 |
-
/*=========================
|
3266 |
-
History Api with fallback to Hashnav
|
3267 |
-
===========================*/
|
3268 |
-
s.history = {
|
3269 |
-
init: function () {
|
3270 |
-
if (!s.params.history) return;
|
3271 |
-
if (!window.history || !window.history.pushState) {
|
3272 |
-
s.params.history = false;
|
3273 |
-
s.params.hashnav = true;
|
3274 |
-
return;
|
3275 |
-
}
|
3276 |
-
s.history.initialized = true;
|
3277 |
-
this.paths = this.getPathValues();
|
3278 |
-
if (!this.paths.key && !this.paths.value) return;
|
3279 |
-
this.scrollToSlide(0, this.paths.value, s.params.runCallbacksOnInit);
|
3280 |
-
if (!s.params.replaceState) {
|
3281 |
-
window.addEventListener('popstate', this.setHistoryPopState);
|
3282 |
-
}
|
3283 |
-
},
|
3284 |
-
setHistoryPopState: function() {
|
3285 |
-
s.history.paths = s.history.getPathValues();
|
3286 |
-
s.history.scrollToSlide(s.params.speed, s.history.paths.value, false);
|
3287 |
-
},
|
3288 |
-
getPathValues: function() {
|
3289 |
-
var pathArray = window.location.pathname.slice(1).split('/');
|
3290 |
-
var total = pathArray.length;
|
3291 |
-
var key = pathArray[total - 2];
|
3292 |
-
var value = pathArray[total - 1];
|
3293 |
-
return { key: key, value: value };
|
3294 |
-
},
|
3295 |
-
setHistory: function (key, index) {
|
3296 |
-
if (!s.history.initialized || !s.params.history) return;
|
3297 |
-
var slide = s.slides.eq(index);
|
3298 |
-
var value = this.slugify(slide.attr('data-history'));
|
3299 |
-
if (!window.location.pathname.includes(key)) {
|
3300 |
-
value = key + '/' + value;
|
3301 |
-
}
|
3302 |
-
if (s.params.replaceState) {
|
3303 |
-
window.history.replaceState(null, null, value);
|
3304 |
-
} else {
|
3305 |
-
window.history.pushState(null, null, value);
|
3306 |
-
}
|
3307 |
-
},
|
3308 |
-
slugify: function(text) {
|
3309 |
-
return text.toString().toLowerCase()
|
3310 |
-
.replace(/\s+/g, '-')
|
3311 |
-
.replace(/[^\w\-]+/g, '')
|
3312 |
-
.replace(/\-\-+/g, '-')
|
3313 |
-
.replace(/^-+/, '')
|
3314 |
-
.replace(/-+$/, '');
|
3315 |
-
},
|
3316 |
-
scrollToSlide: function(speed, value, runCallbacks) {
|
3317 |
-
if (value) {
|
3318 |
-
for (var i = 0, length = s.slides.length; i < length; i++) {
|
3319 |
-
var slide = s.slides.eq(i);
|
3320 |
-
var slideHistory = this.slugify(slide.attr('data-history'));
|
3321 |
-
if (slideHistory === value && !slide.hasClass(s.params.slideDuplicateClass)) {
|
3322 |
-
var index = slide.index();
|
3323 |
-
s.slideTo(index, speed, runCallbacks);
|
3324 |
-
}
|
3325 |
-
}
|
3326 |
-
} else {
|
3327 |
-
s.slideTo(0, speed, runCallbacks);
|
3328 |
-
}
|
3329 |
-
}
|
3330 |
-
};
|
3331 |
-
|
3332 |
-
|
3333 |
-
/*=========================
|
3334 |
-
Keyboard Control
|
3335 |
-
===========================*/
|
3336 |
-
function handleKeyboard(e) {
|
3337 |
-
if (e.originalEvent) e = e.originalEvent; //jquery fix
|
3338 |
-
var kc = e.keyCode || e.charCode;
|
3339 |
-
// Directions locks
|
3340 |
-
if (!s.params.allowSwipeToNext && (s.isHorizontal() && kc === 39 || !s.isHorizontal() && kc === 40)) {
|
3341 |
-
return false;
|
3342 |
-
}
|
3343 |
-
if (!s.params.allowSwipeToPrev && (s.isHorizontal() && kc === 37 || !s.isHorizontal() && kc === 38)) {
|
3344 |
-
return false;
|
3345 |
-
}
|
3346 |
-
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
3347 |
-
return;
|
3348 |
-
}
|
3349 |
-
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
3350 |
-
return;
|
3351 |
-
}
|
3352 |
-
if (kc === 37 || kc === 39 || kc === 38 || kc === 40) {
|
3353 |
-
var inView = false;
|
3354 |
-
//Check that swiper should be inside of visible area of window
|
3355 |
-
if (s.container.parents('.' + s.params.slideClass).length > 0 && s.container.parents('.' + s.params.slideActiveClass).length === 0) {
|
3356 |
-
return;
|
3357 |
-
}
|
3358 |
-
var windowScroll = {
|
3359 |
-
left: window.pageXOffset,
|
3360 |
-
top: window.pageYOffset
|
3361 |
-
};
|
3362 |
-
var windowWidth = window.innerWidth;
|
3363 |
-
var windowHeight = window.innerHeight;
|
3364 |
-
var swiperOffset = s.container.offset();
|
3365 |
-
if (s.rtl) swiperOffset.left = swiperOffset.left - s.container[0].scrollLeft;
|
3366 |
-
var swiperCoord = [
|
3367 |
-
[swiperOffset.left, swiperOffset.top],
|
3368 |
-
[swiperOffset.left + s.width, swiperOffset.top],
|
3369 |
-
[swiperOffset.left, swiperOffset.top + s.height],
|
3370 |
-
[swiperOffset.left + s.width, swiperOffset.top + s.height]
|
3371 |
-
];
|
3372 |
-
for (var i = 0; i < swiperCoord.length; i++) {
|
3373 |
-
var point = swiperCoord[i];
|
3374 |
-
if (
|
3375 |
-
point[0] >= windowScroll.left && point[0] <= windowScroll.left + windowWidth &&
|
3376 |
-
point[1] >= windowScroll.top && point[1] <= windowScroll.top + windowHeight
|
3377 |
-
) {
|
3378 |
-
inView = true;
|
3379 |
-
}
|
3380 |
-
|
3381 |
-
}
|
3382 |
-
if (!inView) return;
|
3383 |
-
}
|
3384 |
-
if (s.isHorizontal()) {
|
3385 |
-
if (kc === 37 || kc === 39) {
|
3386 |
-
if (e.preventDefault) e.preventDefault();
|
3387 |
-
else e.returnValue = false;
|
3388 |
-
}
|
3389 |
-
if ((kc === 39 && !s.rtl) || (kc === 37 && s.rtl)) s.slideNext();
|
3390 |
-
if ((kc === 37 && !s.rtl) || (kc === 39 && s.rtl)) s.slidePrev();
|
3391 |
-
}
|
3392 |
-
else {
|
3393 |
-
if (kc === 38 || kc === 40) {
|
3394 |
-
if (e.preventDefault) e.preventDefault();
|
3395 |
-
else e.returnValue = false;
|
3396 |
-
}
|
3397 |
-
if (kc === 40) s.slideNext();
|
3398 |
-
if (kc === 38) s.slidePrev();
|
3399 |
-
}
|
3400 |
-
s.emit('onKeyPress', s, kc);
|
3401 |
-
}
|
3402 |
-
s.disableKeyboardControl = function () {
|
3403 |
-
s.params.keyboardControl = false;
|
3404 |
-
$(document).off('keydown', handleKeyboard);
|
3405 |
-
};
|
3406 |
-
s.enableKeyboardControl = function () {
|
3407 |
-
s.params.keyboardControl = true;
|
3408 |
-
$(document).on('keydown', handleKeyboard);
|
3409 |
-
};
|
3410 |
-
|
3411 |
-
|
3412 |
-
/*=========================
|
3413 |
-
Mousewheel Control
|
3414 |
-
===========================*/
|
3415 |
-
s.mousewheel = {
|
3416 |
-
event: false,
|
3417 |
-
lastScrollTime: (new window.Date()).getTime()
|
3418 |
-
};
|
3419 |
-
function isEventSupported() {
|
3420 |
-
var eventName = 'onwheel';
|
3421 |
-
var isSupported = eventName in document;
|
3422 |
-
|
3423 |
-
if (!isSupported) {
|
3424 |
-
var element = document.createElement('div');
|
3425 |
-
element.setAttribute(eventName, 'return;');
|
3426 |
-
isSupported = typeof element[eventName] === 'function';
|
3427 |
-
}
|
3428 |
-
|
3429 |
-
if (!isSupported &&
|
3430 |
-
document.implementation &&
|
3431 |
-
document.implementation.hasFeature &&
|
3432 |
-
// always returns true in newer browsers as per the standard.
|
3433 |
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
3434 |
-
document.implementation.hasFeature('', '') !== true ) {
|
3435 |
-
// This is the only way to test support for the `wheel` event in IE9+.
|
3436 |
-
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
3437 |
-
}
|
3438 |
-
|
3439 |
-
return isSupported;
|
3440 |
-
}
|
3441 |
-
/**
|
3442 |
-
* Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
|
3443 |
-
* complicated, thus this doc is long and (hopefully) detailed enough to answer
|
3444 |
-
* your questions.
|
3445 |
-
*
|
3446 |
-
* If you need to react to the mouse wheel in a predictable way, this code is
|
3447 |
-
* like your bestest friend. * hugs *
|
3448 |
-
*
|
3449 |
-
* As of today, there are 4 DOM event types you can listen to:
|
3450 |
-
*
|
3451 |
-
* 'wheel' -- Chrome(31+), FF(17+), IE(9+)
|
3452 |
-
* 'mousewheel' -- Chrome, IE(6+), Opera, Safari
|
3453 |
-
* 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
|
3454 |
-
* 'DOMMouseScroll' -- FF(0.9.7+) since 2003
|
3455 |
-
*
|
3456 |
-
* So what to do? The is the best:
|
3457 |
-
*
|
3458 |
-
* normalizeWheel.getEventType();
|
3459 |
-
*
|
3460 |
-
* In your event callback, use this code to get sane interpretation of the
|
3461 |
-
* deltas. This code will return an object with properties:
|
3462 |
-
*
|
3463 |
-
* spinX -- normalized spin speed (use for zoom) - x plane
|
3464 |
-
* spinY -- " - y plane
|
3465 |
-
* pixelX -- normalized distance (to pixels) - x plane
|
3466 |
-
* pixelY -- " - y plane
|
3467 |
-
*
|
3468 |
-
* Wheel values are provided by the browser assuming you are using the wheel to
|
3469 |
-
* scroll a web page by a number of lines or pixels (or pages). Values can vary
|
3470 |
-
* significantly on different platforms and browsers, forgetting that you can
|
3471 |
-
* scroll at different speeds. Some devices (like trackpads) emit more events
|
3472 |
-
* at smaller increments with fine granularity, and some emit massive jumps with
|
3473 |
-
* linear speed or acceleration.
|
3474 |
-
*
|
3475 |
-
* This code does its best to normalize the deltas for you:
|
3476 |
-
*
|
3477 |
-
* - spin is trying to normalize how far the wheel was spun (or trackpad
|
3478 |
-
* dragged). This is super useful for zoom support where you want to
|
3479 |
-
* throw away the chunky scroll steps on the PC and make those equal to
|
3480 |
-
* the slow and smooth tiny steps on the Mac. Key data: This code tries to
|
3481 |
-
* resolve a single slow step on a wheel to 1.
|
3482 |
-
*
|
3483 |
-
* - pixel is normalizing the desired scroll delta in pixel units. You'll
|
3484 |
-
* get the crazy differences between browsers, but at least it'll be in
|
3485 |
-
* pixels!
|
3486 |
-
*
|
3487 |
-
* - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
|
3488 |
-
* should translate to positive value zooming IN, negative zooming OUT.
|
3489 |
-
* This matches the newer 'wheel' event.
|
3490 |
-
*
|
3491 |
-
* Why are there spinX, spinY (or pixels)?
|
3492 |
-
*
|
3493 |
-
* - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
|
3494 |
-
* with a mouse. It results in side-scrolling in the browser by default.
|
3495 |
-
*
|
3496 |
-
* - spinY is what you expect -- it's the classic axis of a mouse wheel.
|
3497 |
-
*
|
3498 |
-
* - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
|
3499 |
-
* probably is by browsers in conjunction with fancy 3D controllers .. but
|
3500 |
-
* you know.
|
3501 |
-
*
|
3502 |
-
* Implementation info:
|
3503 |
-
*
|
3504 |
-
* Examples of 'wheel' event if you scroll slowly (down) by one step with an
|
3505 |
-
* average mouse:
|
3506 |
-
*
|
3507 |
-
* OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
|
3508 |
-
* OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
|
3509 |
-
* OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
|
3510 |
-
* Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
|
3511 |
-
* Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
|
3512 |
-
*
|
3513 |
-
* On the trackpad:
|
3514 |
-
*
|
3515 |
-
* OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
|
3516 |
-
* OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
|
3517 |
-
*
|
3518 |
-
* On other/older browsers.. it's more complicated as there can be multiple and
|
3519 |
-
* also missing delta values.
|
3520 |
-
*
|
3521 |
-
* The 'wheel' event is more standard:
|
3522 |
-
*
|
3523 |
-
* http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
|
3524 |
-
*
|
3525 |
-
* The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
|
3526 |
-
* deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
|
3527 |
-
* backward compatibility with older events. Those other values help us
|
3528 |
-
* better normalize spin speed. Example of what the browsers provide:
|
3529 |
-
*
|
3530 |
-
* | event.wheelDelta | event.detail
|
3531 |
-
* ------------------+------------------+--------------
|
3532 |
-
* Safari v5/OS X | -120 | 0
|
3533 |
-
* Safari v5/Win7 | -120 | 0
|
3534 |
-
* Chrome v17/OS X | -120 | 0
|
3535 |
-
* Chrome v17/Win7 | -120 | 0
|
3536 |
-
* IE9/Win7 | -120 | undefined
|
3537 |
-
* Firefox v4/OS X | undefined | 1
|
3538 |
-
* Firefox v4/Win7 | undefined | 3
|
3539 |
-
*
|
3540 |
-
*/
|
3541 |
-
function normalizeWheel( /*object*/ event ) /*object*/ {
|
3542 |
-
// Reasonable defaults
|
3543 |
-
var PIXEL_STEP = 10;
|
3544 |
-
var LINE_HEIGHT = 40;
|
3545 |
-
var PAGE_HEIGHT = 800;
|
3546 |
-
|
3547 |
-
var sX = 0, sY = 0, // spinX, spinY
|
3548 |
-
pX = 0, pY = 0; // pixelX, pixelY
|
3549 |
-
|
3550 |
-
// Legacy
|
3551 |
-
if( 'detail' in event ) {
|
3552 |
-
sY = event.detail;
|
3553 |
-
}
|
3554 |
-
if( 'wheelDelta' in event ) {
|
3555 |
-
sY = -event.wheelDelta / 120;
|
3556 |
-
}
|
3557 |
-
if( 'wheelDeltaY' in event ) {
|
3558 |
-
sY = -event.wheelDeltaY / 120;
|
3559 |
-
}
|
3560 |
-
if( 'wheelDeltaX' in event ) {
|
3561 |
-
sX = -event.wheelDeltaX / 120;
|
3562 |
-
}
|
3563 |
-
|
3564 |
-
// side scrolling on FF with DOMMouseScroll
|
3565 |
-
if( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
|
3566 |
-
sX = sY;
|
3567 |
-
sY = 0;
|
3568 |
-
}
|
3569 |
-
|
3570 |
-
pX = sX * PIXEL_STEP;
|
3571 |
-
pY = sY * PIXEL_STEP;
|
3572 |
-
|
3573 |
-
if( 'deltaY' in event ) {
|
3574 |
-
pY = event.deltaY;
|
3575 |
-
}
|
3576 |
-
if( 'deltaX' in event ) {
|
3577 |
-
pX = event.deltaX;
|
3578 |
-
}
|
3579 |
-
|
3580 |
-
if( (pX || pY) && event.deltaMode ) {
|
3581 |
-
if( event.deltaMode === 1 ) { // delta in LINE units
|
3582 |
-
pX *= LINE_HEIGHT;
|
3583 |
-
pY *= LINE_HEIGHT;
|
3584 |
-
} else { // delta in PAGE units
|
3585 |
-
pX *= PAGE_HEIGHT;
|
3586 |
-
pY *= PAGE_HEIGHT;
|
3587 |
-
}
|
3588 |
-
}
|
3589 |
-
|
3590 |
-
// Fall-back if spin cannot be determined
|
3591 |
-
if( pX && !sX ) {
|
3592 |
-
sX = (pX < 1) ? -1 : 1;
|
3593 |
-
}
|
3594 |
-
if( pY && !sY ) {
|
3595 |
-
sY = (pY < 1) ? -1 : 1;
|
3596 |
-
}
|
3597 |
-
|
3598 |
-
return {
|
3599 |
-
spinX: sX,
|
3600 |
-
spinY: sY,
|
3601 |
-
pixelX: pX,
|
3602 |
-
pixelY: pY
|
3603 |
-
};
|
3604 |
-
}
|
3605 |
-
if (s.params.mousewheelControl) {
|
3606 |
-
/**
|
3607 |
-
* The best combination if you prefer spinX + spinY normalization. It favors
|
3608 |
-
* the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
|
3609 |
-
* 'wheel' event, making spin speed determination impossible.
|
3610 |
-
*/
|
3611 |
-
s.mousewheel.event = (navigator.userAgent.indexOf('firefox') > -1) ?
|
3612 |
-
'DOMMouseScroll' :
|
3613 |
-
isEventSupported() ?
|
3614 |
-
'wheel' : 'mousewheel';
|
3615 |
-
}
|
3616 |
-
function handleMousewheel(e) {
|
3617 |
-
if (e.originalEvent) e = e.originalEvent; //jquery fix
|
3618 |
-
var delta = 0;
|
3619 |
-
var rtlFactor = s.rtl ? -1 : 1;
|
3620 |
-
|
3621 |
-
var data = normalizeWheel( e );
|
3622 |
-
|
3623 |
-
if (s.params.mousewheelForceToAxis) {
|
3624 |
-
if (s.isHorizontal()) {
|
3625 |
-
if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = data.pixelX * rtlFactor;
|
3626 |
-
else return;
|
3627 |
-
}
|
3628 |
-
else {
|
3629 |
-
if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = data.pixelY;
|
3630 |
-
else return;
|
3631 |
-
}
|
3632 |
-
}
|
3633 |
-
else {
|
3634 |
-
delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? - data.pixelX * rtlFactor : - data.pixelY;
|
3635 |
-
}
|
3636 |
-
|
3637 |
-
if (delta === 0) return;
|
3638 |
-
|
3639 |
-
if (s.params.mousewheelInvert) delta = -delta;
|
3640 |
-
|
3641 |
-
if (!s.params.freeMode) {
|
3642 |
-
if ((new window.Date()).getTime() - s.mousewheel.lastScrollTime > 60) {
|
3643 |
-
if (delta < 0) {
|
3644 |
-
if ((!s.isEnd || s.params.loop) && !s.animating) {
|
3645 |
-
s.slideNext();
|
3646 |
-
s.emit('onScroll', s, e);
|
3647 |
-
}
|
3648 |
-
else if (s.params.mousewheelReleaseOnEdges) return true;
|
3649 |
-
}
|
3650 |
-
else {
|
3651 |
-
if ((!s.isBeginning || s.params.loop) && !s.animating) {
|
3652 |
-
s.slidePrev();
|
3653 |
-
s.emit('onScroll', s, e);
|
3654 |
-
}
|
3655 |
-
else if (s.params.mousewheelReleaseOnEdges) return true;
|
3656 |
-
}
|
3657 |
-
}
|
3658 |
-
s.mousewheel.lastScrollTime = (new window.Date()).getTime();
|
3659 |
-
|
3660 |
-
}
|
3661 |
-
else {
|
3662 |
-
//Freemode or scrollContainer:
|
3663 |
-
var position = s.getWrapperTranslate() + delta * s.params.mousewheelSensitivity;
|
3664 |
-
var wasBeginning = s.isBeginning,
|
3665 |
-
wasEnd = s.isEnd;
|
3666 |
-
|
3667 |
-
if (position >= s.minTranslate()) position = s.minTranslate();
|
3668 |
-
if (position <= s.maxTranslate()) position = s.maxTranslate();
|
3669 |
-
|
3670 |
-
s.setWrapperTransition(0);
|
3671 |
-
s.setWrapperTranslate(position);
|
3672 |
-
s.updateProgress();
|
3673 |
-
s.updateActiveIndex();
|
3674 |
-
|
3675 |
-
if (!wasBeginning && s.isBeginning || !wasEnd && s.isEnd) {
|
3676 |
-
s.updateClasses();
|
3677 |
-
}
|
3678 |
-
|
3679 |
-
if (s.params.freeModeSticky) {
|
3680 |
-
clearTimeout(s.mousewheel.timeout);
|
3681 |
-
s.mousewheel.timeout = setTimeout(function () {
|
3682 |
-
s.slideReset();
|
3683 |
-
}, 300);
|
3684 |
-
}
|
3685 |
-
else {
|
3686 |
-
if (s.params.lazyLoading && s.lazy) {
|
3687 |
-
s.lazy.load();
|
3688 |
-
}
|
3689 |
-
}
|
3690 |
-
// Emit event
|
3691 |
-
s.emit('onScroll', s, e);
|
3692 |
-
|
3693 |
-
// Stop autoplay
|
3694 |
-
if (s.params.autoplay && s.params.autoplayDisableOnInteraction) s.stopAutoplay();
|
3695 |
-
|
3696 |
-
// Return page scroll on edge positions
|
3697 |
-
if (position === 0 || position === s.maxTranslate()) return;
|
3698 |
-
}
|
3699 |
-
|
3700 |
-
if (e.preventDefault) e.preventDefault();
|
3701 |
-
else e.returnValue = false;
|
3702 |
-
return false;
|
3703 |
-
}
|
3704 |
-
s.disableMousewheelControl = function () {
|
3705 |
-
if (!s.mousewheel.event) return false;
|
3706 |
-
var target = s.container;
|
3707 |
-
if (s.params.mousewheelEventsTarged !== 'container') {
|
3708 |
-
target = $(s.params.mousewheelEventsTarged);
|
3709 |
-
}
|
3710 |
-
target.off(s.mousewheel.event, handleMousewheel);
|
3711 |
-
s.params.mousewheelControl = false;
|
3712 |
-
return true;
|
3713 |
-
};
|
3714 |
-
|
3715 |
-
s.enableMousewheelControl = function () {
|
3716 |
-
if (!s.mousewheel.event) return false;
|
3717 |
-
var target = s.container;
|
3718 |
-
if (s.params.mousewheelEventsTarged !== 'container') {
|
3719 |
-
target = $(s.params.mousewheelEventsTarged);
|
3720 |
-
}
|
3721 |
-
target.on(s.mousewheel.event, handleMousewheel);
|
3722 |
-
s.params.mousewheelControl = true;
|
3723 |
-
return true;
|
3724 |
-
};
|
3725 |
-
|
3726 |
-
|
3727 |
-
/*=========================
|
3728 |
-
Parallax
|
3729 |
-
===========================*/
|
3730 |
-
function setParallaxTransform(el, progress) {
|
3731 |
-
el = $(el);
|
3732 |
-
var p, pX, pY;
|
3733 |
-
var rtlFactor = s.rtl ? -1 : 1;
|
3734 |
-
|
3735 |
-
p = el.attr('data-swiper-parallax') || '0';
|
3736 |
-
pX = el.attr('data-swiper-parallax-x');
|
3737 |
-
pY = el.attr('data-swiper-parallax-y');
|
3738 |
-
if (pX || pY) {
|
3739 |
-
pX = pX || '0';
|
3740 |
-
pY = pY || '0';
|
3741 |
-
}
|
3742 |
-
else {
|
3743 |
-
if (s.isHorizontal()) {
|
3744 |
-
pX = p;
|
3745 |
-
pY = '0';
|
3746 |
-
}
|
3747 |
-
else {
|
3748 |
-
pY = p;
|
3749 |
-
pX = '0';
|
3750 |
-
}
|
3751 |
-
}
|
3752 |
-
|
3753 |
-
if ((pX).indexOf('%') >= 0) {
|
3754 |
-
pX = parseInt(pX, 10) * progress * rtlFactor + '%';
|
3755 |
-
}
|
3756 |
-
else {
|
3757 |
-
pX = pX * progress * rtlFactor + 'px' ;
|
3758 |
-
}
|
3759 |
-
if ((pY).indexOf('%') >= 0) {
|
3760 |
-
pY = parseInt(pY, 10) * progress + '%';
|
3761 |
-
}
|
3762 |
-
else {
|
3763 |
-
pY = pY * progress + 'px' ;
|
3764 |
-
}
|
3765 |
-
|
3766 |
-
el.transform('translate3d(' + pX + ', ' + pY + ',0px)');
|
3767 |
-
}
|
3768 |
-
s.parallax = {
|
3769 |
-
setTranslate: function () {
|
3770 |
-
s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
|
3771 |
-
setParallaxTransform(this, s.progress);
|
3772 |
-
|
3773 |
-
});
|
3774 |
-
s.slides.each(function () {
|
3775 |
-
var slide = $(this);
|
3776 |
-
slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {
|
3777 |
-
var progress = Math.min(Math.max(slide[0].progress, -1), 1);
|
3778 |
-
setParallaxTransform(this, progress);
|
3779 |
-
});
|
3780 |
-
});
|
3781 |
-
},
|
3782 |
-
setTransition: function (duration) {
|
3783 |
-
if (typeof duration === 'undefined') duration = s.params.speed;
|
3784 |
-
s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){
|
3785 |
-
var el = $(this);
|
3786 |
-
var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;
|
3787 |
-
if (duration === 0) parallaxDuration = 0;
|
3788 |
-
el.transition(parallaxDuration);
|
3789 |
-
});
|
3790 |
-
}
|
3791 |
-
};
|
3792 |
-
|
3793 |
-
|
3794 |
-
/*=========================
|
3795 |
-
Zoom
|
3796 |
-
===========================*/
|
3797 |
-
s.zoom = {
|
3798 |
-
// "Global" Props
|
3799 |
-
scale: 1,
|
3800 |
-
currentScale: 1,
|
3801 |
-
isScaling: false,
|
3802 |
-
gesture: {
|
3803 |
-
slide: undefined,
|
3804 |
-
slideWidth: undefined,
|
3805 |
-
slideHeight: undefined,
|
3806 |
-
image: undefined,
|
3807 |
-
imageWrap: undefined,
|
3808 |
-
zoomMax: s.params.zoomMax
|
3809 |
-
},
|
3810 |
-
image: {
|
3811 |
-
isTouched: undefined,
|
3812 |
-
isMoved: undefined,
|
3813 |
-
currentX: undefined,
|
3814 |
-
currentY: undefined,
|
3815 |
-
minX: undefined,
|
3816 |
-
minY: undefined,
|
3817 |
-
maxX: undefined,
|
3818 |
-
maxY: undefined,
|
3819 |
-
width: undefined,
|
3820 |
-
height: undefined,
|
3821 |
-
startX: undefined,
|
3822 |
-
startY: undefined,
|
3823 |
-
touchesStart: {},
|
3824 |
-
touchesCurrent: {}
|
3825 |
-
},
|
3826 |
-
velocity: {
|
3827 |
-
x: undefined,
|
3828 |
-
y: undefined,
|
3829 |
-
prevPositionX: undefined,
|
3830 |
-
prevPositionY: undefined,
|
3831 |
-
prevTime: undefined
|
3832 |
-
},
|
3833 |
-
// Calc Scale From Multi-touches
|
3834 |
-
getDistanceBetweenTouches: function (e) {
|
3835 |
-
if (e.targetTouches.length < 2) return 1;
|
3836 |
-
var x1 = e.targetTouches[0].pageX,
|
3837 |
-
y1 = e.targetTouches[0].pageY,
|
3838 |
-
x2 = e.targetTouches[1].pageX,
|
3839 |
-
y2 = e.targetTouches[1].pageY;
|
3840 |
-
var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
|
3841 |
-
return distance;
|
3842 |
-
},
|
3843 |
-
// Events
|
3844 |
-
onGestureStart: function (e) {
|
3845 |
-
var z = s.zoom;
|
3846 |
-
if (!s.support.gestures) {
|
3847 |
-
if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {
|
3848 |
-
return;
|
3849 |
-
}
|
3850 |
-
z.gesture.scaleStart = z.getDistanceBetweenTouches(e);
|
3851 |
-
}
|
3852 |
-
if (!z.gesture.slide || !z.gesture.slide.length) {
|
3853 |
-
z.gesture.slide = $(this);
|
3854 |
-
if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex);
|
3855 |
-
z.gesture.image = z.gesture.slide.find('img, svg, canvas');
|
3856 |
-
z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);
|
3857 |
-
z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ;
|
3858 |
-
if (z.gesture.imageWrap.length === 0) {
|
3859 |
-
z.gesture.image = undefined;
|
3860 |
-
return;
|
3861 |
-
}
|
3862 |
-
}
|
3863 |
-
z.gesture.image.transition(0);
|
3864 |
-
z.isScaling = true;
|
3865 |
-
},
|
3866 |
-
onGestureChange: function (e) {
|
3867 |
-
var z = s.zoom;
|
3868 |
-
if (!s.support.gestures) {
|
3869 |
-
if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {
|
3870 |
-
return;
|
3871 |
-
}
|
3872 |
-
z.gesture.scaleMove = z.getDistanceBetweenTouches(e);
|
3873 |
-
}
|
3874 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
3875 |
-
if (s.support.gestures) {
|
3876 |
-
z.scale = e.scale * z.currentScale;
|
3877 |
-
}
|
3878 |
-
else {
|
3879 |
-
z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale;
|
3880 |
-
}
|
3881 |
-
if (z.scale > z.gesture.zoomMax) {
|
3882 |
-
z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5);
|
3883 |
-
}
|
3884 |
-
if (z.scale < s.params.zoomMin) {
|
3885 |
-
z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5);
|
3886 |
-
}
|
3887 |
-
z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')');
|
3888 |
-
},
|
3889 |
-
onGestureEnd: function (e) {
|
3890 |
-
var z = s.zoom;
|
3891 |
-
if (!s.support.gestures) {
|
3892 |
-
if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) {
|
3893 |
-
return;
|
3894 |
-
}
|
3895 |
-
}
|
3896 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
3897 |
-
z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin);
|
3898 |
-
z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')');
|
3899 |
-
z.currentScale = z.scale;
|
3900 |
-
z.isScaling = false;
|
3901 |
-
if (z.scale === 1) z.gesture.slide = undefined;
|
3902 |
-
},
|
3903 |
-
onTouchStart: function (s, e) {
|
3904 |
-
var z = s.zoom;
|
3905 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
3906 |
-
if (z.image.isTouched) return;
|
3907 |
-
if (s.device.os === 'android') e.preventDefault();
|
3908 |
-
z.image.isTouched = true;
|
3909 |
-
z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
3910 |
-
z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
3911 |
-
},
|
3912 |
-
onTouchMove: function (e) {
|
3913 |
-
var z = s.zoom;
|
3914 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
3915 |
-
s.allowClick = false;
|
3916 |
-
if (!z.image.isTouched || !z.gesture.slide) return;
|
3917 |
-
|
3918 |
-
if (!z.image.isMoved) {
|
3919 |
-
z.image.width = z.gesture.image[0].offsetWidth;
|
3920 |
-
z.image.height = z.gesture.image[0].offsetHeight;
|
3921 |
-
z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0;
|
3922 |
-
z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0;
|
3923 |
-
z.gesture.slideWidth = z.gesture.slide[0].offsetWidth;
|
3924 |
-
z.gesture.slideHeight = z.gesture.slide[0].offsetHeight;
|
3925 |
-
z.gesture.imageWrap.transition(0);
|
3926 |
-
if (s.rtl) z.image.startX = -z.image.startX;
|
3927 |
-
if (s.rtl) z.image.startY = -z.image.startY;
|
3928 |
-
}
|
3929 |
-
// Define if we need image drag
|
3930 |
-
var scaledWidth = z.image.width * z.scale;
|
3931 |
-
var scaledHeight = z.image.height * z.scale;
|
3932 |
-
|
3933 |
-
if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return;
|
3934 |
-
|
3935 |
-
z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);
|
3936 |
-
z.image.maxX = -z.image.minX;
|
3937 |
-
z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);
|
3938 |
-
z.image.maxY = -z.image.minY;
|
3939 |
-
|
3940 |
-
z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
3941 |
-
z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
3942 |
-
|
3943 |
-
if (!z.image.isMoved && !z.isScaling) {
|
3944 |
-
if (s.isHorizontal() &&
|
3945 |
-
(Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) ||
|
3946 |
-
(Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x)
|
3947 |
-
) {
|
3948 |
-
z.image.isTouched = false;
|
3949 |
-
return;
|
3950 |
-
}
|
3951 |
-
else if (!s.isHorizontal() &&
|
3952 |
-
(Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) ||
|
3953 |
-
(Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y)
|
3954 |
-
) {
|
3955 |
-
z.image.isTouched = false;
|
3956 |
-
return;
|
3957 |
-
}
|
3958 |
-
}
|
3959 |
-
e.preventDefault();
|
3960 |
-
e.stopPropagation();
|
3961 |
-
|
3962 |
-
z.image.isMoved = true;
|
3963 |
-
z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX;
|
3964 |
-
z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY;
|
3965 |
-
|
3966 |
-
if (z.image.currentX < z.image.minX) {
|
3967 |
-
z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8);
|
3968 |
-
}
|
3969 |
-
if (z.image.currentX > z.image.maxX) {
|
3970 |
-
z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8);
|
3971 |
-
}
|
3972 |
-
|
3973 |
-
if (z.image.currentY < z.image.minY) {
|
3974 |
-
z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8);
|
3975 |
-
}
|
3976 |
-
if (z.image.currentY > z.image.maxY) {
|
3977 |
-
z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8);
|
3978 |
-
}
|
3979 |
-
|
3980 |
-
//Velocity
|
3981 |
-
if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x;
|
3982 |
-
if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y;
|
3983 |
-
if (!z.velocity.prevTime) z.velocity.prevTime = Date.now();
|
3984 |
-
z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2;
|
3985 |
-
z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2;
|
3986 |
-
if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0;
|
3987 |
-
if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0;
|
3988 |
-
z.velocity.prevPositionX = z.image.touchesCurrent.x;
|
3989 |
-
z.velocity.prevPositionY = z.image.touchesCurrent.y;
|
3990 |
-
z.velocity.prevTime = Date.now();
|
3991 |
-
|
3992 |
-
z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');
|
3993 |
-
},
|
3994 |
-
onTouchEnd: function (s, e) {
|
3995 |
-
var z = s.zoom;
|
3996 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
3997 |
-
if (!z.image.isTouched || !z.image.isMoved) {
|
3998 |
-
z.image.isTouched = false;
|
3999 |
-
z.image.isMoved = false;
|
4000 |
-
return;
|
4001 |
-
}
|
4002 |
-
z.image.isTouched = false;
|
4003 |
-
z.image.isMoved = false;
|
4004 |
-
var momentumDurationX = 300;
|
4005 |
-
var momentumDurationY = 300;
|
4006 |
-
var momentumDistanceX = z.velocity.x * momentumDurationX;
|
4007 |
-
var newPositionX = z.image.currentX + momentumDistanceX;
|
4008 |
-
var momentumDistanceY = z.velocity.y * momentumDurationY;
|
4009 |
-
var newPositionY = z.image.currentY + momentumDistanceY;
|
4010 |
-
|
4011 |
-
//Fix duration
|
4012 |
-
if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x);
|
4013 |
-
if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y);
|
4014 |
-
var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
4015 |
-
|
4016 |
-
z.image.currentX = newPositionX;
|
4017 |
-
z.image.currentY = newPositionY;
|
4018 |
-
|
4019 |
-
// Define if we need image drag
|
4020 |
-
var scaledWidth = z.image.width * z.scale;
|
4021 |
-
var scaledHeight = z.image.height * z.scale;
|
4022 |
-
z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);
|
4023 |
-
z.image.maxX = -z.image.minX;
|
4024 |
-
z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);
|
4025 |
-
z.image.maxY = -z.image.minY;
|
4026 |
-
z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX);
|
4027 |
-
z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY);
|
4028 |
-
|
4029 |
-
z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');
|
4030 |
-
},
|
4031 |
-
onTransitionEnd: function (s) {
|
4032 |
-
var z = s.zoom;
|
4033 |
-
if (z.gesture.slide && s.previousIndex !== s.activeIndex) {
|
4034 |
-
z.gesture.image.transform('translate3d(0,0,0) scale(1)');
|
4035 |
-
z.gesture.imageWrap.transform('translate3d(0,0,0)');
|
4036 |
-
z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined;
|
4037 |
-
z.scale = z.currentScale = 1;
|
4038 |
-
}
|
4039 |
-
},
|
4040 |
-
// Toggle Zoom
|
4041 |
-
toggleZoom: function (s, e) {
|
4042 |
-
var z = s.zoom;
|
4043 |
-
if (!z.gesture.slide) {
|
4044 |
-
z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex);
|
4045 |
-
z.gesture.image = z.gesture.slide.find('img, svg, canvas');
|
4046 |
-
z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);
|
4047 |
-
}
|
4048 |
-
if (!z.gesture.image || z.gesture.image.length === 0) return;
|
4049 |
-
|
4050 |
-
var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight;
|
4051 |
-
|
4052 |
-
if (typeof z.image.touchesStart.x === 'undefined' && e) {
|
4053 |
-
touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
|
4054 |
-
touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
|
4055 |
-
}
|
4056 |
-
else {
|
4057 |
-
touchX = z.image.touchesStart.x;
|
4058 |
-
touchY = z.image.touchesStart.y;
|
4059 |
-
}
|
4060 |
-
|
4061 |
-
if (z.scale && z.scale !== 1) {
|
4062 |
-
// Zoom Out
|
4063 |
-
z.scale = z.currentScale = 1;
|
4064 |
-
z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');
|
4065 |
-
z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');
|
4066 |
-
z.gesture.slide = undefined;
|
4067 |
-
}
|
4068 |
-
else {
|
4069 |
-
// Zoom In
|
4070 |
-
z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax;
|
4071 |
-
if (e) {
|
4072 |
-
slideWidth = z.gesture.slide[0].offsetWidth;
|
4073 |
-
slideHeight = z.gesture.slide[0].offsetHeight;
|
4074 |
-
offsetX = z.gesture.slide.offset().left;
|
4075 |
-
offsetY = z.gesture.slide.offset().top;
|
4076 |
-
diffX = offsetX + slideWidth/2 - touchX;
|
4077 |
-
diffY = offsetY + slideHeight/2 - touchY;
|
4078 |
-
|
4079 |
-
imageWidth = z.gesture.image[0].offsetWidth;
|
4080 |
-
imageHeight = z.gesture.image[0].offsetHeight;
|
4081 |
-
scaledWidth = imageWidth * z.scale;
|
4082 |
-
scaledHeight = imageHeight * z.scale;
|
4083 |
-
|
4084 |
-
translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0);
|
4085 |
-
translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0);
|
4086 |
-
translateMaxX = -translateMinX;
|
4087 |
-
translateMaxY = -translateMinY;
|
4088 |
-
|
4089 |
-
translateX = diffX * z.scale;
|
4090 |
-
translateY = diffY * z.scale;
|
4091 |
-
|
4092 |
-
if (translateX < translateMinX) {
|
4093 |
-
translateX = translateMinX;
|
4094 |
-
}
|
4095 |
-
if (translateX > translateMaxX) {
|
4096 |
-
translateX = translateMaxX;
|
4097 |
-
}
|
4098 |
-
|
4099 |
-
if (translateY < translateMinY) {
|
4100 |
-
translateY = translateMinY;
|
4101 |
-
}
|
4102 |
-
if (translateY > translateMaxY) {
|
4103 |
-
translateY = translateMaxY;
|
4104 |
-
}
|
4105 |
-
}
|
4106 |
-
else {
|
4107 |
-
translateX = 0;
|
4108 |
-
translateY = 0;
|
4109 |
-
}
|
4110 |
-
z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)');
|
4111 |
-
z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')');
|
4112 |
-
}
|
4113 |
-
},
|
4114 |
-
// Attach/Detach Events
|
4115 |
-
attachEvents: function (detach) {
|
4116 |
-
var action = detach ? 'off' : 'on';
|
4117 |
-
|
4118 |
-
if (s.params.zoom) {
|
4119 |
-
var target = s.slides;
|
4120 |
-
var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;
|
4121 |
-
// Scale image
|
4122 |
-
if (s.support.gestures) {
|
4123 |
-
s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);
|
4124 |
-
s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);
|
4125 |
-
s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);
|
4126 |
-
}
|
4127 |
-
else if (s.touchEvents.start === 'touchstart') {
|
4128 |
-
s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);
|
4129 |
-
s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);
|
4130 |
-
s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);
|
4131 |
-
}
|
4132 |
-
|
4133 |
-
// Move image
|
4134 |
-
s[action]('touchStart', s.zoom.onTouchStart);
|
4135 |
-
s.slides.each(function (index, slide){
|
4136 |
-
if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {
|
4137 |
-
$(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);
|
4138 |
-
}
|
4139 |
-
});
|
4140 |
-
s[action]('touchEnd', s.zoom.onTouchEnd);
|
4141 |
-
|
4142 |
-
// Scale Out
|
4143 |
-
s[action]('transitionEnd', s.zoom.onTransitionEnd);
|
4144 |
-
if (s.params.zoomToggle) {
|
4145 |
-
s.on('doubleTap', s.zoom.toggleZoom);
|
4146 |
-
}
|
4147 |
-
}
|
4148 |
-
},
|
4149 |
-
init: function () {
|
4150 |
-
s.zoom.attachEvents();
|
4151 |
-
},
|
4152 |
-
destroy: function () {
|
4153 |
-
s.zoom.attachEvents(true);
|
4154 |
-
}
|
4155 |
-
};
|
4156 |
-
|
4157 |
-
|
4158 |
-
/*=========================
|
4159 |
-
Plugins API. Collect all and init all plugins
|
4160 |
-
===========================*/
|
4161 |
-
s._plugins = [];
|
4162 |
-
for (var plugin in s.plugins) {
|
4163 |
-
var p = s.plugins[plugin](s, s.params[plugin]);
|
4164 |
-
if (p) s._plugins.push(p);
|
4165 |
-
}
|
4166 |
-
// Method to call all plugins event/method
|
4167 |
-
s.callPlugins = function (eventName) {
|
4168 |
-
for (var i = 0; i < s._plugins.length; i++) {
|
4169 |
-
if (eventName in s._plugins[i]) {
|
4170 |
-
s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
4171 |
-
}
|
4172 |
-
}
|
4173 |
-
};
|
4174 |
-
|
4175 |
-
|
4176 |
-
/*=========================
|
4177 |
-
Events/Callbacks/Plugins Emitter
|
4178 |
-
===========================*/
|
4179 |
-
function normalizeEventName (eventName) {
|
4180 |
-
if (eventName.indexOf('on') !== 0) {
|
4181 |
-
if (eventName[0] !== eventName[0].toUpperCase()) {
|
4182 |
-
eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);
|
4183 |
-
}
|
4184 |
-
else {
|
4185 |
-
eventName = 'on' + eventName;
|
4186 |
-
}
|
4187 |
-
}
|
4188 |
-
return eventName;
|
4189 |
-
}
|
4190 |
-
s.emitterEventListeners = {
|
4191 |
-
|
4192 |
-
};
|
4193 |
-
s.emit = function (eventName) {
|
4194 |
-
// Trigger callbacks
|
4195 |
-
if (s.params[eventName]) {
|
4196 |
-
s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
4197 |
-
}
|
4198 |
-
var i;
|
4199 |
-
// Trigger events
|
4200 |
-
if (s.emitterEventListeners[eventName]) {
|
4201 |
-
for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
|
4202 |
-
s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
4203 |
-
}
|
4204 |
-
}
|
4205 |
-
// Trigger plugins
|
4206 |
-
if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
|
4207 |
-
};
|
4208 |
-
s.on = function (eventName, handler) {
|
4209 |
-
eventName = normalizeEventName(eventName);
|
4210 |
-
if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];
|
4211 |
-
s.emitterEventListeners[eventName].push(handler);
|
4212 |
-
return s;
|
4213 |
-
};
|
4214 |
-
s.off = function (eventName, handler) {
|
4215 |
-
var i;
|
4216 |
-
eventName = normalizeEventName(eventName);
|
4217 |
-
if (typeof handler === 'undefined') {
|
4218 |
-
// Remove all handlers for such event
|
4219 |
-
s.emitterEventListeners[eventName] = [];
|
4220 |
-
return s;
|
4221 |
-
}
|
4222 |
-
if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;
|
4223 |
-
for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {
|
4224 |
-
if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);
|
4225 |
-
}
|
4226 |
-
return s;
|
4227 |
-
};
|
4228 |
-
s.once = function (eventName, handler) {
|
4229 |
-
eventName = normalizeEventName(eventName);
|
4230 |
-
var _handler = function () {
|
4231 |
-
handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);
|
4232 |
-
s.off(eventName, _handler);
|
4233 |
-
};
|
4234 |
-
s.on(eventName, _handler);
|
4235 |
-
return s;
|
4236 |
-
};
|
4237 |
-
|
4238 |
-
|
4239 |
-
// Accessibility tools
|
4240 |
-
s.a11y = {
|
4241 |
-
makeFocusable: function ($el) {
|
4242 |
-
$el.attr('tabIndex', '0');
|
4243 |
-
return $el;
|
4244 |
-
},
|
4245 |
-
addRole: function ($el, role) {
|
4246 |
-
$el.attr('role', role);
|
4247 |
-
return $el;
|
4248 |
-
},
|
4249 |
-
|
4250 |
-
addLabel: function ($el, label) {
|
4251 |
-
$el.attr('aria-label', label);
|
4252 |
-
return $el;
|
4253 |
-
},
|
4254 |
-
|
4255 |
-
disable: function ($el) {
|
4256 |
-
$el.attr('aria-disabled', true);
|
4257 |
-
return $el;
|
4258 |
-
},
|
4259 |
-
|
4260 |
-
enable: function ($el) {
|
4261 |
-
$el.attr('aria-disabled', false);
|
4262 |
-
return $el;
|
4263 |
-
},
|
4264 |
-
|
4265 |
-
onEnterKey: function (event) {
|
4266 |
-
if (event.keyCode !== 13) return;
|
4267 |
-
if ($(event.target).is(s.params.nextButton)) {
|
4268 |
-
s.onClickNext(event);
|
4269 |
-
if (s.isEnd) {
|
4270 |
-
s.a11y.notify(s.params.lastSlideMessage);
|
4271 |
-
}
|
4272 |
-
else {
|
4273 |
-
s.a11y.notify(s.params.nextSlideMessage);
|
4274 |
-
}
|
4275 |
-
}
|
4276 |
-
else if ($(event.target).is(s.params.prevButton)) {
|
4277 |
-
s.onClickPrev(event);
|
4278 |
-
if (s.isBeginning) {
|
4279 |
-
s.a11y.notify(s.params.firstSlideMessage);
|
4280 |
-
}
|
4281 |
-
else {
|
4282 |
-
s.a11y.notify(s.params.prevSlideMessage);
|
4283 |
-
}
|
4284 |
-
}
|
4285 |
-
if ($(event.target).is('.' + s.params.bulletClass)) {
|
4286 |
-
$(event.target)[0].click();
|
4287 |
-
}
|
4288 |
-
},
|
4289 |
-
|
4290 |
-
liveRegion: $('<span class="' + s.params.notificationClass + '" aria-live="assertive" aria-atomic="true"></span>'),
|
4291 |
-
|
4292 |
-
notify: function (message) {
|
4293 |
-
var notification = s.a11y.liveRegion;
|
4294 |
-
if (notification.length === 0) return;
|
4295 |
-
notification.html('');
|
4296 |
-
notification.html(message);
|
4297 |
-
},
|
4298 |
-
init: function () {
|
4299 |
-
// Setup accessibility
|
4300 |
-
if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
|
4301 |
-
s.a11y.makeFocusable(s.nextButton);
|
4302 |
-
s.a11y.addRole(s.nextButton, 'button');
|
4303 |
-
s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);
|
4304 |
-
}
|
4305 |
-
if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
|
4306 |
-
s.a11y.makeFocusable(s.prevButton);
|
4307 |
-
s.a11y.addRole(s.prevButton, 'button');
|
4308 |
-
s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);
|
4309 |
-
}
|
4310 |
-
|
4311 |
-
$(s.container).append(s.a11y.liveRegion);
|
4312 |
-
},
|
4313 |
-
initPagination: function () {
|
4314 |
-
if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {
|
4315 |
-
s.bullets.each(function () {
|
4316 |
-
var bullet = $(this);
|
4317 |
-
s.a11y.makeFocusable(bullet);
|
4318 |
-
s.a11y.addRole(bullet, 'button');
|
4319 |
-
s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));
|
4320 |
-
});
|
4321 |
-
}
|
4322 |
-
},
|
4323 |
-
destroy: function () {
|
4324 |
-
if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();
|
4325 |
-
}
|
4326 |
-
};
|
4327 |
-
|
4328 |
-
|
4329 |
-
/*=========================
|
4330 |
-
Init/Destroy
|
4331 |
-
===========================*/
|
4332 |
-
s.init = function () {
|
4333 |
-
if (s.params.loop) s.createLoop();
|
4334 |
-
s.updateContainerSize();
|
4335 |
-
s.updateSlidesSize();
|
4336 |
-
s.updatePagination();
|
4337 |
-
if (s.params.scrollbar && s.scrollbar) {
|
4338 |
-
s.scrollbar.set();
|
4339 |
-
if (s.params.scrollbarDraggable) {
|
4340 |
-
s.scrollbar.enableDraggable();
|
4341 |
-
}
|
4342 |
-
}
|
4343 |
-
if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {
|
4344 |
-
if (!s.params.loop) s.updateProgress();
|
4345 |
-
s.effects[s.params.effect].setTranslate();
|
4346 |
-
}
|
4347 |
-
if (s.params.loop) {
|
4348 |
-
s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);
|
4349 |
-
}
|
4350 |
-
else {
|
4351 |
-
s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);
|
4352 |
-
if (s.params.initialSlide === 0) {
|
4353 |
-
if (s.parallax && s.params.parallax) s.parallax.setTranslate();
|
4354 |
-
if (s.lazy && s.params.lazyLoading) {
|
4355 |
-
s.lazy.load();
|
4356 |
-
s.lazy.initialImageLoaded = true;
|
4357 |
-
}
|
4358 |
-
}
|
4359 |
-
}
|
4360 |
-
s.attachEvents();
|
4361 |
-
if (s.params.observer && s.support.observer) {
|
4362 |
-
s.initObservers();
|
4363 |
-
}
|
4364 |
-
if (s.params.preloadImages && !s.params.lazyLoading) {
|
4365 |
-
s.preloadImages();
|
4366 |
-
}
|
4367 |
-
if (s.params.zoom && s.zoom) {
|
4368 |
-
s.zoom.init();
|
4369 |
-
}
|
4370 |
-
if (s.params.autoplay) {
|
4371 |
-
s.startAutoplay();
|
4372 |
-
}
|
4373 |
-
if (s.params.keyboardControl) {
|
4374 |
-
if (s.enableKeyboardControl) s.enableKeyboardControl();
|
4375 |
-
}
|
4376 |
-
if (s.params.mousewheelControl) {
|
4377 |
-
if (s.enableMousewheelControl) s.enableMousewheelControl();
|
4378 |
-
}
|
4379 |
-
// Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history
|
4380 |
-
if (s.params.hashnavReplaceState) {
|
4381 |
-
s.params.replaceState = s.params.hashnavReplaceState;
|
4382 |
-
}
|
4383 |
-
if (s.params.history) {
|
4384 |
-
if (s.history) s.history.init();
|
4385 |
-
}
|
4386 |
-
if (s.params.hashnav) {
|
4387 |
-
if (s.hashnav) s.hashnav.init();
|
4388 |
-
}
|
4389 |
-
if (s.params.a11y && s.a11y) s.a11y.init();
|
4390 |
-
s.emit('onInit', s);
|
4391 |
-
};
|
4392 |
-
|
4393 |
-
// Cleanup dynamic styles
|
4394 |
-
s.cleanupStyles = function () {
|
4395 |
-
// Container
|
4396 |
-
s.container.removeClass(s.classNames.join(' ')).removeAttr('style');
|
4397 |
-
|
4398 |
-
// Wrapper
|
4399 |
-
s.wrapper.removeAttr('style');
|
4400 |
-
|
4401 |
-
// Slides
|
4402 |
-
if (s.slides && s.slides.length) {
|
4403 |
-
s.slides
|
4404 |
-
.removeClass([
|
4405 |
-
s.params.slideVisibleClass,
|
4406 |
-
s.params.slideActiveClass,
|
4407 |
-
s.params.slideNextClass,
|
4408 |
-
s.params.slidePrevClass
|
4409 |
-
].join(' '))
|
4410 |
-
.removeAttr('style')
|
4411 |
-
.removeAttr('data-swiper-column')
|
4412 |
-
.removeAttr('data-swiper-row');
|
4413 |
-
}
|
4414 |
-
|
4415 |
-
// Pagination/Bullets
|
4416 |
-
if (s.paginationContainer && s.paginationContainer.length) {
|
4417 |
-
s.paginationContainer.removeClass(s.params.paginationHiddenClass);
|
4418 |
-
}
|
4419 |
-
if (s.bullets && s.bullets.length) {
|
4420 |
-
s.bullets.removeClass(s.params.bulletActiveClass);
|
4421 |
-
}
|
4422 |
-
|
4423 |
-
// Buttons
|
4424 |
-
if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);
|
4425 |
-
if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);
|
4426 |
-
|
4427 |
-
// Scrollbar
|
4428 |
-
if (s.params.scrollbar && s.scrollbar) {
|
4429 |
-
if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');
|
4430 |
-
if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');
|
4431 |
-
}
|
4432 |
-
};
|
4433 |
-
|
4434 |
-
// Destroy
|
4435 |
-
s.destroy = function (deleteInstance, cleanupStyles) {
|
4436 |
-
// Detach evebts
|
4437 |
-
s.detachEvents();
|
4438 |
-
// Stop autoplay
|
4439 |
-
s.stopAutoplay();
|
4440 |
-
// Disable draggable
|
4441 |
-
if (s.params.scrollbar && s.scrollbar) {
|
4442 |
-
if (s.params.scrollbarDraggable) {
|
4443 |
-
s.scrollbar.disableDraggable();
|
4444 |
-
}
|
4445 |
-
}
|
4446 |
-
// Destroy loop
|
4447 |
-
if (s.params.loop) {
|
4448 |
-
s.destroyLoop();
|
4449 |
-
}
|
4450 |
-
// Cleanup styles
|
4451 |
-
if (cleanupStyles) {
|
4452 |
-
s.cleanupStyles();
|
4453 |
-
}
|
4454 |
-
// Disconnect observer
|
4455 |
-
s.disconnectObservers();
|
4456 |
-
|
4457 |
-
// Destroy zoom
|
4458 |
-
if (s.params.zoom && s.zoom) {
|
4459 |
-
s.zoom.destroy();
|
4460 |
-
}
|
4461 |
-
// Disable keyboard/mousewheel
|
4462 |
-
if (s.params.keyboardControl) {
|
4463 |
-
if (s.disableKeyboardControl) s.disableKeyboardControl();
|
4464 |
-
}
|
4465 |
-
if (s.params.mousewheelControl) {
|
4466 |
-
if (s.disableMousewheelControl) s.disableMousewheelControl();
|
4467 |
-
}
|
4468 |
-
// Disable a11y
|
4469 |
-
if (s.params.a11y && s.a11y) s.a11y.destroy();
|
4470 |
-
// Delete history popstate
|
4471 |
-
if (s.params.history && !s.params.replaceState) {
|
4472 |
-
window.removeEventListener('popstate', s.history.setHistoryPopState);
|
4473 |
-
}
|
4474 |
-
if (s.params.hashnav && s.hashnav) {
|
4475 |
-
s.hashnav.destroy();
|
4476 |
-
}
|
4477 |
-
// Destroy callback
|
4478 |
-
s.emit('onDestroy');
|
4479 |
-
// Delete instance
|
4480 |
-
if (deleteInstance !== false) s = null;
|
4481 |
-
};
|
4482 |
-
|
4483 |
-
s.init();
|
4484 |
-
|
4485 |
-
|
4486 |
-
|
4487 |
-
// Return swiper instance
|
4488 |
-
return s;
|
4489 |
-
};
|
4490 |
-
|
4491 |
-
|
4492 |
-
/*==================================================
|
4493 |
-
Prototype
|
4494 |
-
====================================================*/
|
4495 |
-
Swiper.prototype = {
|
4496 |
-
isSafari: (function () {
|
4497 |
-
var ua = window.navigator.userAgent.toLowerCase();
|
4498 |
-
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
4499 |
-
})(),
|
4500 |
-
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
|
4501 |
-
isArray: function (arr) {
|
4502 |
-
return Object.prototype.toString.apply(arr) === '[object Array]';
|
4503 |
-
},
|
4504 |
-
/*==================================================
|
4505 |
-
Browser
|
4506 |
-
====================================================*/
|
4507 |
-
browser: {
|
4508 |
-
ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
|
4509 |
-
ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1),
|
4510 |
-
lteIE9: (function() {
|
4511 |
-
// create temporary DIV
|
4512 |
-
var div = document.createElement('div');
|
4513 |
-
// add content to tmp DIV which is wrapped into the IE HTML conditional statement
|
4514 |
-
div.innerHTML = '<!--[if lte IE 9]><i></i><![endif]-->';
|
4515 |
-
// return true / false value based on what will browser render
|
4516 |
-
return div.getElementsByTagName('i').length === 1;
|
4517 |
-
})()
|
4518 |
-
},
|
4519 |
-
/*==================================================
|
4520 |
-
Devices
|
4521 |
-
====================================================*/
|
4522 |
-
device: (function () {
|
4523 |
-
var ua = window.navigator.userAgent;
|
4524 |
-
var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/);
|
4525 |
-
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
4526 |
-
var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
4527 |
-
var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
4528 |
-
return {
|
4529 |
-
ios: ipad || iphone || ipod,
|
4530 |
-
android: android
|
4531 |
-
};
|
4532 |
-
})(),
|
4533 |
-
/*==================================================
|
4534 |
-
Feature Detection
|
4535 |
-
====================================================*/
|
4536 |
-
support: {
|
4537 |
-
touch : (window.Modernizr && Modernizr.touch === true) || (function () {
|
4538 |
-
return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);
|
4539 |
-
})(),
|
4540 |
-
|
4541 |
-
transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {
|
4542 |
-
var div = document.createElement('div').style;
|
4543 |
-
return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);
|
4544 |
-
})(),
|
4545 |
-
|
4546 |
-
flexbox: (function () {
|
4547 |
-
var div = document.createElement('div').style;
|
4548 |
-
var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
4549 |
-
for (var i = 0; i < styles.length; i++) {
|
4550 |
-
if (styles[i] in div) return true;
|
4551 |
-
}
|
4552 |
-
})(),
|
4553 |
-
|
4554 |
-
observer: (function () {
|
4555 |
-
return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
|
4556 |
-
})(),
|
4557 |
-
|
4558 |
-
passiveListener: (function () {
|
4559 |
-
var supportsPassive = false;
|
4560 |
-
try {
|
4561 |
-
var opts = Object.defineProperty({}, 'passive', {
|
4562 |
-
get: function() {
|
4563 |
-
supportsPassive = true;
|
4564 |
-
}
|
4565 |
-
});
|
4566 |
-
window.addEventListener('testPassiveListener', null, opts);
|
4567 |
-
} catch (e) {}
|
4568 |
-
return supportsPassive;
|
4569 |
-
})(),
|
4570 |
-
|
4571 |
-
gestures: (function () {
|
4572 |
-
return 'ongesturestart' in window;
|
4573 |
-
})()
|
4574 |
-
},
|
4575 |
-
/*==================================================
|
4576 |
-
Plugins
|
4577 |
-
====================================================*/
|
4578 |
-
plugins: {}
|
4579 |
-
};
|
4580 |
-
|
4581 |
-
|
4582 |
-
/*===========================
|
4583 |
-
Get Dom libraries
|
4584 |
-
===========================*/
|
4585 |
-
var swiperDomPlugins = ['jQuery', 'Zepto', 'Dom7'];
|
4586 |
-
for (var i = 0; i < swiperDomPlugins.length; i++) {
|
4587 |
-
if (window[swiperDomPlugins[i]]) {
|
4588 |
-
addLibraryPlugin(window[swiperDomPlugins[i]]);
|
4589 |
-
}
|
4590 |
-
}
|
4591 |
-
// Required DOM Plugins
|
4592 |
-
var domLib;
|
4593 |
-
if (typeof Dom7 === 'undefined') {
|
4594 |
-
domLib = window.Dom7 || window.Zepto || window.jQuery;
|
4595 |
-
}
|
4596 |
-
else {
|
4597 |
-
domLib = Dom7;
|
4598 |
-
}
|
4599 |
-
|
4600 |
-
|
4601 |
-
/*===========================
|
4602 |
-
Add .swiper plugin from Dom libraries
|
4603 |
-
===========================*/
|
4604 |
-
function addLibraryPlugin(lib) {
|
4605 |
-
lib.fn.swiper = function (params) {
|
4606 |
-
var firstInstance;
|
4607 |
-
lib(this).each(function () {
|
4608 |
-
var s = new Swiper(this, params);
|
4609 |
-
if (!firstInstance) firstInstance = s;
|
4610 |
-
});
|
4611 |
-
return firstInstance;
|
4612 |
-
};
|
4613 |
-
}
|
4614 |
-
|
4615 |
-
if (domLib) {
|
4616 |
-
if (!('transitionEnd' in domLib.fn)) {
|
4617 |
-
domLib.fn.transitionEnd = function (callback) {
|
4618 |
-
var events = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'],
|
4619 |
-
i, j, dom = this;
|
4620 |
-
function fireCallBack(e) {
|
4621 |
-
/*jshint validthis:true */
|
4622 |
-
if (e.target !== this) return;
|
4623 |
-
callback.call(this, e);
|
4624 |
-
for (i = 0; i < events.length; i++) {
|
4625 |
-
dom.off(events[i], fireCallBack);
|
4626 |
-
}
|
4627 |
-
}
|
4628 |
-
if (callback) {
|
4629 |
-
for (i = 0; i < events.length; i++) {
|
4630 |
-
dom.on(events[i], fireCallBack);
|
4631 |
-
}
|
4632 |
-
}
|
4633 |
-
return this;
|
4634 |
-
};
|
4635 |
-
}
|
4636 |
-
if (!('transform' in domLib.fn)) {
|
4637 |
-
domLib.fn.transform = function (transform) {
|
4638 |
-
for (var i = 0; i < this.length; i++) {
|
4639 |
-
var elStyle = this[i].style;
|
4640 |
-
elStyle.webkitTransform = elStyle.MsTransform = elStyle.msTransform = elStyle.MozTransform = elStyle.OTransform = elStyle.transform = transform;
|
4641 |
-
}
|
4642 |
-
return this;
|
4643 |
-
};
|
4644 |
-
}
|
4645 |
-
if (!('transition' in domLib.fn)) {
|
4646 |
-
domLib.fn.transition = function (duration) {
|
4647 |
-
if (typeof duration !== 'string') {
|
4648 |
-
duration = duration + 'ms';
|
4649 |
-
}
|
4650 |
-
for (var i = 0; i < this.length; i++) {
|
4651 |
-
var elStyle = this[i].style;
|
4652 |
-
elStyle.webkitTransitionDuration = elStyle.MsTransitionDuration = elStyle.msTransitionDuration = elStyle.MozTransitionDuration = elStyle.OTransitionDuration = elStyle.transitionDuration = duration;
|
4653 |
-
}
|
4654 |
-
return this;
|
4655 |
-
};
|
4656 |
-
}
|
4657 |
-
if (!('outerWidth' in domLib.fn)) {
|
4658 |
-
domLib.fn.outerWidth = function (includeMargins) {
|
4659 |
-
if (this.length > 0) {
|
4660 |
-
if (includeMargins)
|
4661 |
-
return this[0].offsetWidth + parseFloat(this.css('margin-right')) + parseFloat(this.css('margin-left'));
|
4662 |
-
else
|
4663 |
-
return this[0].offsetWidth;
|
4664 |
-
}
|
4665 |
-
else return null;
|
4666 |
-
};
|
4667 |
-
}
|
4668 |
-
}
|
4669 |
-
|
4670 |
-
|
4671 |
-
window.Swiper = Swiper;
|
4672 |
-
})();
|
4673 |
-
|
4674 |
-
/*===========================
|
4675 |
-
Swiper AMD Export
|
4676 |
-
===========================*/
|
4677 |
-
if (typeof(module) !== 'undefined')
|
4678 |
-
{
|
4679 |
-
module.exports = window.Swiper;
|
4680 |
-
}
|
4681 |
-
else if (typeof define === 'function' && define.amd) {
|
4682 |
-
define([], function () {
|
4683 |
-
'use strict';
|
4684 |
-
return window.Swiper;
|
4685 |
-
});
|
4686 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/swiper/js/swiper.jquery.min.js
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 3.4.2
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
*
|
5 |
-
* http://www.idangero.us/swiper/
|
6 |
-
*
|
7 |
-
* Copyright 2017, Vladimir Kharlampidi
|
8 |
-
* The iDangero.us
|
9 |
-
* http://www.idangero.us/
|
10 |
-
*
|
11 |
-
* Licensed under MIT
|
12 |
-
*
|
13 |
-
* Released on: March 10, 2017
|
14 |
-
*/
|
15 |
-
!function(){"use strict";var e,a=function(t,s){function r(e){return Math.floor(e)}function i(){var e=x.params.autoplay,a=x.slides.eq(x.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||x.params.autoplay),x.autoplayTimeoutId=setTimeout(function(){x.params.loop?(x.fixLoop(),x._slideNext(),x.emit("onAutoplay",x)):x.isEnd?s.autoplayStopOnLast?x.stopAutoplay():(x._slideTo(0),x.emit("onAutoplay",x)):(x._slideNext(),x.emit("onAutoplay",x))},e)}function n(a,t){var s=e(a.target);if(!s.is(t))if("string"==typeof t)s=s.parents(t);else if(t.nodeType){var r;return s.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==s.length)return s[0]}function o(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,s=new t(function(e){e.forEach(function(e){x.onResize(!0),x.emit("onObserverUpdate",x,e)})});s.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),x.observers.push(s)}function l(e){e.originalEvent&&(e=e.originalEvent);var a=e.keyCode||e.charCode;if(!x.params.allowSwipeToNext&&(x.isHorizontal()&&39===a||!x.isHorizontal()&&40===a))return!1;if(!x.params.allowSwipeToPrev&&(x.isHorizontal()&&37===a||!x.isHorizontal()&&38===a))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||document.activeElement&&document.activeElement.nodeName&&("input"===document.activeElement.nodeName.toLowerCase()||"textarea"===document.activeElement.nodeName.toLowerCase()))){if(37===a||39===a||38===a||40===a){var t=!1;if(x.container.parents("."+x.params.slideClass).length>0&&0===x.container.parents("."+x.params.slideActiveClass).length)return;var s={left:window.pageXOffset,top:window.pageYOffset},r=window.innerWidth,i=window.innerHeight,n=x.container.offset();x.rtl&&(n.left=n.left-x.container[0].scrollLeft);for(var o=[[n.left,n.top],[n.left+x.width,n.top],[n.left,n.top+x.height],[n.left+x.width,n.top+x.height]],l=0;l<o.length;l++){var p=o[l];p[0]>=s.left&&p[0]<=s.left+r&&p[1]>=s.top&&p[1]<=s.top+i&&(t=!0)}if(!t)return}x.isHorizontal()?(37!==a&&39!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===a&&!x.rtl||37===a&&x.rtl)&&x.slideNext(),(37===a&&!x.rtl||39===a&&x.rtl)&&x.slidePrev()):(38!==a&&40!==a||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===a&&x.slideNext(),38===a&&x.slidePrev()),x.emit("onKeyPress",x,a)}}function p(e){var a=0,t=0,s=0,r=0;return"detail"in e&&(t=e.detail),"wheelDelta"in e&&(t=-e.wheelDelta/120),"wheelDeltaY"in e&&(t=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(a=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(a=t,t=0),s=10*a,r=10*t,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(s=e.deltaX),(s||r)&&e.deltaMode&&(1===e.deltaMode?(s*=40,r*=40):(s*=800,r*=800)),s&&!a&&(a=s<1?-1:1),r&&!t&&(t=r<1?-1:1),{spinX:a,spinY:t,pixelX:s,pixelY:r}}function d(e){e.originalEvent&&(e=e.originalEvent);var a=0,t=x.rtl?-1:1,s=p(e);if(x.params.mousewheelForceToAxis)if(x.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return;a=s.pixelX*t}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return;a=s.pixelY}else a=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*t:-s.pixelY;if(0!==a){if(x.params.mousewheelInvert&&(a=-a),x.params.freeMode){var r=x.getWrapperTranslate()+a*x.params.mousewheelSensitivity,i=x.isBeginning,n=x.isEnd;if(r>=x.minTranslate()&&(r=x.minTranslate()),r<=x.maxTranslate()&&(r=x.maxTranslate()),x.setWrapperTransition(0),x.setWrapperTranslate(r),x.updateProgress(),x.updateActiveIndex(),(!i&&x.isBeginning||!n&&x.isEnd)&&x.updateClasses(),x.params.freeModeSticky?(clearTimeout(x.mousewheel.timeout),x.mousewheel.timeout=setTimeout(function(){x.slideReset()},300)):x.params.lazyLoading&&x.lazy&&x.lazy.load(),x.emit("onScroll",x,e),x.params.autoplay&&x.params.autoplayDisableOnInteraction&&x.stopAutoplay(),0===r||r===x.maxTranslate())return}else{if((new window.Date).getTime()-x.mousewheel.lastScrollTime>60)if(a<0)if(x.isEnd&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slideNext(),x.emit("onScroll",x,e);else if(x.isBeginning&&!x.params.loop||x.animating){if(x.params.mousewheelReleaseOnEdges)return!0}else x.slidePrev(),x.emit("onScroll",x,e);x.mousewheel.lastScrollTime=(new window.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1}}function m(a,t){a=e(a);var s,r,i,n=x.rtl?-1:1;s=a.attr("data-swiper-parallax")||"0",r=a.attr("data-swiper-parallax-x"),i=a.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):x.isHorizontal()?(r=s,i="0"):(i=s,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*n+"%":r*t*n+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",a.transform("translate3d("+r+", "+i+",0px)")}function u(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof a))return new a(t,s);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},g=s&&s.virtualTranslate;s=s||{};var h={};for(var v in s)if("object"!=typeof s[v]||null===s[v]||(s[v].nodeType||s[v]===window||s[v]===document||"undefined"!=typeof Dom7&&s[v]instanceof Dom7||"undefined"!=typeof jQuery&&s[v]instanceof jQuery))h[v]=s[v];else{h[v]={};for(var f in s[v])h[v][f]=s[v][f]}for(var w in c)if(void 0===s[w])s[w]=c[w];else if("object"==typeof s[w])for(var y in c[w])void 0===s[w][y]&&(s[w][y]=c[w][y]);var x=this;if(x.params=s,x.originalParams=h,x.classNames=[],void 0!==e&&"undefined"!=typeof Dom7&&(e=Dom7),(void 0!==e||(e="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(x.$=e,x.currentBreakpoint=void 0,x.getActiveBreakpoint=function(){if(!x.params.breakpoints)return!1;var e,a=!1,t=[];for(e in x.params.breakpoints)x.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var s=0;s<t.length;s++)(e=t[s])>=window.innerWidth&&!a&&(a=e);return a||"max"},x.setBreakpoint=function(){var e=x.getActiveBreakpoint();if(e&&x.currentBreakpoint!==e){var a=e in x.params.breakpoints?x.params.breakpoints[e]:x.originalParams,t=x.params.loop&&a.slidesPerView!==x.params.slidesPerView;for(var s in a)x.params[s]=a[s];x.currentBreakpoint=e,t&&x.destroyLoop&&x.reLoop(!0)}},x.params.breakpoints&&x.setBreakpoint(),x.container=e(t),0!==x.container.length)){if(x.container.length>1){var T=[];return x.container.each(function(){T.push(new a(this,s))}),T}x.container[0].swiper=x,x.container.data("swiper",x),x.classNames.push(x.params.containerModifierClass+x.params.direction),x.params.freeMode&&x.classNames.push(x.params.containerModifierClass+"free-mode"),x.support.flexbox||(x.classNames.push(x.params.containerModifierClass+"no-flexbox"),x.params.slidesPerColumn=1),x.params.autoHeight&&x.classNames.push(x.params.containerModifierClass+"autoheight"),(x.params.parallax||x.params.watchSlidesVisibility)&&(x.params.watchSlidesProgress=!0),x.params.touchReleaseOnEdges&&(x.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(x.params.effect)>=0&&(x.support.transforms3d?(x.params.watchSlidesProgress=!0,x.classNames.push(x.params.containerModifierClass+"3d")):x.params.effect="slide"),"slide"!==x.params.effect&&x.classNames.push(x.params.containerModifierClass+x.params.effect),"cube"===x.params.effect&&(x.params.resistanceRatio=0,x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.centeredSlides=!1,x.params.spaceBetween=0,x.params.virtualTranslate=!0),"fade"!==x.params.effect&&"flip"!==x.params.effect||(x.params.slidesPerView=1,x.params.slidesPerColumn=1,x.params.slidesPerGroup=1,x.params.watchSlidesProgress=!0,x.params.spaceBetween=0,void 0===g&&(x.params.virtualTranslate=!0)),x.params.grabCursor&&x.support.touch&&(x.params.grabCursor=!1),x.wrapper=x.container.children("."+x.params.wrapperClass),x.params.pagination&&(x.paginationContainer=e(x.params.pagination),x.params.uniqueNavElements&&"string"==typeof x.params.pagination&&x.paginationContainer.length>1&&1===x.container.find(x.params.pagination).length&&(x.paginationContainer=x.container.find(x.params.pagination)),"bullets"===x.params.paginationType&&x.params.paginationClickable?x.paginationContainer.addClass(x.params.paginationModifierClass+"clickable"):x.params.paginationClickable=!1,x.paginationContainer.addClass(x.params.paginationModifierClass+x.params.paginationType)),(x.params.nextButton||x.params.prevButton)&&(x.params.nextButton&&(x.nextButton=e(x.params.nextButton),x.params.uniqueNavElements&&"string"==typeof x.params.nextButton&&x.nextButton.length>1&&1===x.container.find(x.params.nextButton).length&&(x.nextButton=x.container.find(x.params.nextButton))),x.params.prevButton&&(x.prevButton=e(x.params.prevButton),x.params.uniqueNavElements&&"string"==typeof x.params.prevButton&&x.prevButton.length>1&&1===x.container.find(x.params.prevButton).length&&(x.prevButton=x.container.find(x.params.prevButton)))),x.isHorizontal=function(){return"horizontal"===x.params.direction},x.rtl=x.isHorizontal()&&("rtl"===x.container[0].dir.toLowerCase()||"rtl"===x.container.css("direction")),x.rtl&&x.classNames.push(x.params.containerModifierClass+"rtl"),x.rtl&&(x.wrongRTL="-webkit-box"===x.wrapper.css("display")),x.params.slidesPerColumn>1&&x.classNames.push(x.params.containerModifierClass+"multirow"),x.device.android&&x.classNames.push(x.params.containerModifierClass+"android"),x.container.addClass(x.classNames.join(" ")),x.translate=0,x.progress=0,x.velocity=0,x.lockSwipeToNext=function(){x.params.allowSwipeToNext=!1,x.params.allowSwipeToPrev===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipeToPrev=function(){x.params.allowSwipeToPrev=!1,x.params.allowSwipeToNext===!1&&x.params.grabCursor&&x.unsetGrabCursor()},x.lockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!1,x.params.grabCursor&&x.unsetGrabCursor()},x.unlockSwipeToNext=function(){x.params.allowSwipeToNext=!0,x.params.allowSwipeToPrev===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipeToPrev=function(){x.params.allowSwipeToPrev=!0,x.params.allowSwipeToNext===!0&&x.params.grabCursor&&x.setGrabCursor()},x.unlockSwipes=function(){x.params.allowSwipeToNext=x.params.allowSwipeToPrev=!0,x.params.grabCursor&&x.setGrabCursor()},x.setGrabCursor=function(e){x.container[0].style.cursor="move",x.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",x.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",x.container[0].style.cursor=e?"grabbing":"grab"},x.unsetGrabCursor=function(){x.container[0].style.cursor=""},x.params.grabCursor&&x.setGrabCursor(),x.imagesToLoad=[],x.imagesLoaded=0,x.loadImage=function(e,a,t,s,r,i){function n(){i&&i()}var o;e.complete&&r?n():a?(o=new window.Image,o.onload=n,o.onerror=n,s&&(o.sizes=s),t&&(o.srcset=t),a&&(o.src=a)):n()},x.preloadImages=function(){function e(){void 0!==x&&null!==x&&x&&(void 0!==x.imagesLoaded&&x.imagesLoaded++,x.imagesLoaded===x.imagesToLoad.length&&(x.params.updateOnImagesReady&&x.update(),x.emit("onImagesReady",x)))}x.imagesToLoad=x.container.find("img");for(var a=0;a<x.imagesToLoad.length;a++)x.loadImage(x.imagesToLoad[a],x.imagesToLoad[a].currentSrc||x.imagesToLoad[a].getAttribute("src"),x.imagesToLoad[a].srcset||x.imagesToLoad[a].getAttribute("srcset"),x.imagesToLoad[a].sizes||x.imagesToLoad[a].getAttribute("sizes"),!0,e)},x.autoplayTimeoutId=void 0,x.autoplaying=!1,x.autoplayPaused=!1,x.startAutoplay=function(){return void 0===x.autoplayTimeoutId&&(!!x.params.autoplay&&(!x.autoplaying&&(x.autoplaying=!0,x.emit("onAutoplayStart",x),void i())))},x.stopAutoplay=function(e){x.autoplayTimeoutId&&(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplaying=!1,x.autoplayTimeoutId=void 0,x.emit("onAutoplayStop",x))},x.pauseAutoplay=function(e){x.autoplayPaused||(x.autoplayTimeoutId&&clearTimeout(x.autoplayTimeoutId),x.autoplayPaused=!0,0===e?(x.autoplayPaused=!1,i()):x.wrapper.transitionEnd(function(){x&&(x.autoplayPaused=!1,x.autoplaying?i():x.stopAutoplay())}))},x.minTranslate=function(){return-x.snapGrid[0]},x.maxTranslate=function(){return-x.snapGrid[x.snapGrid.length-1]},x.updateAutoHeight=function(){var e,a=[],t=0;if("auto"!==x.params.slidesPerView&&x.params.slidesPerView>1)for(e=0;e<Math.ceil(x.params.slidesPerView);e++){var s=x.activeIndex+e;if(s>x.slides.length)break;a.push(x.slides.eq(s)[0])}else a.push(x.slides.eq(x.activeIndex)[0]);for(e=0;e<a.length;e++)if(void 0!==a[e]){var r=a[e].offsetHeight;t=r>t?r:t}t&&x.wrapper.css("height",t+"px")},x.updateContainerSize=function(){var e,a;e=void 0!==x.params.width?x.params.width:x.container[0].clientWidth,a=void 0!==x.params.height?x.params.height:x.container[0].clientHeight,0===e&&x.isHorizontal()||0===a&&!x.isHorizontal()||(e=e-parseInt(x.container.css("padding-left"),10)-parseInt(x.container.css("padding-right"),10),a=a-parseInt(x.container.css("padding-top"),10)-parseInt(x.container.css("padding-bottom"),10),x.width=e,x.height=a,x.size=x.isHorizontal()?x.width:x.height)},x.updateSlidesSize=function(){x.slides=x.wrapper.children("."+x.params.slideClass),x.snapGrid=[],x.slidesGrid=[],x.slidesSizesGrid=[];var e,a=x.params.spaceBetween,t=-x.params.slidesOffsetBefore,s=0,i=0;if(void 0!==x.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*x.size),x.virtualSize=-a,x.rtl?x.slides.css({marginLeft:"",marginTop:""}):x.slides.css({marginRight:"",marginBottom:""});var n;x.params.slidesPerColumn>1&&(n=Math.floor(x.slides.length/x.params.slidesPerColumn)===x.slides.length/x.params.slidesPerColumn?x.slides.length:Math.ceil(x.slides.length/x.params.slidesPerColumn)*x.params.slidesPerColumn,"auto"!==x.params.slidesPerView&&"row"===x.params.slidesPerColumnFill&&(n=Math.max(n,x.params.slidesPerView*x.params.slidesPerColumn)));var o,l=x.params.slidesPerColumn,p=n/l,d=p-(x.params.slidesPerColumn*p-x.slides.length);for(e=0;e<x.slides.length;e++){o=0;var m=x.slides.eq(e);if(x.params.slidesPerColumn>1){var u,c,g;"column"===x.params.slidesPerColumnFill?(c=Math.floor(e/l),g=e-c*l,(c>d||c===d&&g===l-1)&&++g>=l&&(g=0,c++),u=c+g*n/l,m.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(g=Math.floor(e/p),c=e-g*p),m.css("margin-"+(x.isHorizontal()?"top":"left"),0!==g&&x.params.spaceBetween&&x.params.spaceBetween+"px").attr("data-swiper-column",c).attr("data-swiper-row",g)}"none"!==m.css("display")&&("auto"===x.params.slidesPerView?(o=x.isHorizontal()?m.outerWidth(!0):m.outerHeight(!0),x.params.roundLengths&&(o=r(o))):(o=(x.size-(x.params.slidesPerView-1)*a)/x.params.slidesPerView,x.params.roundLengths&&(o=r(o)),x.isHorizontal()?x.slides[e].style.width=o+"px":x.slides[e].style.height=o+"px"),x.slides[e].swiperSlideSize=o,x.slidesSizesGrid.push(o),x.params.centeredSlides?(t=t+o/2+s/2+a,0===s&&0!==e&&(t=t-x.size/2-a),0===e&&(t=t-x.size/2-a),Math.abs(t)<.001&&(t=0),i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t)):(i%x.params.slidesPerGroup==0&&x.snapGrid.push(t),x.slidesGrid.push(t),t=t+o+a),x.virtualSize+=o+a,s=o,i++)}x.virtualSize=Math.max(x.virtualSize,x.size)+x.params.slidesOffsetAfter;var h;if(x.rtl&&x.wrongRTL&&("slide"===x.params.effect||"coverflow"===x.params.effect)&&x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}),x.support.flexbox&&!x.params.setWrapperSize||(x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"})),x.params.slidesPerColumn>1&&(x.virtualSize=(o+x.params.spaceBetween)*n,x.virtualSize=Math.ceil(x.virtualSize/x.params.slidesPerColumn)-x.params.spaceBetween,x.isHorizontal()?x.wrapper.css({width:x.virtualSize+x.params.spaceBetween+"px"}):x.wrapper.css({height:x.virtualSize+x.params.spaceBetween+"px"}),x.params.centeredSlides)){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<x.virtualSize+x.snapGrid[0]&&h.push(x.snapGrid[e]);x.snapGrid=h}if(!x.params.centeredSlides){for(h=[],e=0;e<x.snapGrid.length;e++)x.snapGrid[e]<=x.virtualSize-x.size&&h.push(x.snapGrid[e]);x.snapGrid=h,Math.floor(x.virtualSize-x.size)-Math.floor(x.snapGrid[x.snapGrid.length-1])>1&&x.snapGrid.push(x.virtualSize-x.size)}0===x.snapGrid.length&&(x.snapGrid=[0]),0!==x.params.spaceBetween&&(x.isHorizontal()?x.rtl?x.slides.css({marginLeft:a+"px"}):x.slides.css({marginRight:a+"px"}):x.slides.css({marginBottom:a+"px"})),x.params.watchSlidesProgress&&x.updateSlidesOffset()}},x.updateSlidesOffset=function(){for(var e=0;e<x.slides.length;e++)x.slides[e].swiperSlideOffset=x.isHorizontal()?x.slides[e].offsetLeft:x.slides[e].offsetTop},x.currentSlidesPerView=function(){var e,a,t=1;if(x.params.centeredSlides){var s,r=x.slides[x.activeIndex].swiperSlideSize;for(e=x.activeIndex+1;e<x.slides.length;e++)x.slides[e]&&!s&&(r+=x.slides[e].swiperSlideSize,t++,r>x.size&&(s=!0));for(a=x.activeIndex-1;a>=0;a--)x.slides[a]&&!s&&(r+=x.slides[a].swiperSlideSize,t++,r>x.size&&(s=!0))}else for(e=x.activeIndex+1;e<x.slides.length;e++)x.slidesGrid[e]-x.slidesGrid[x.activeIndex]<x.size&&t++;return t},x.updateSlidesProgress=function(e){if(void 0===e&&(e=x.translate||0),0!==x.slides.length){void 0===x.slides[0].swiperSlideOffset&&x.updateSlidesOffset();var a=-e;x.rtl&&(a=e),x.slides.removeClass(x.params.slideVisibleClass);for(var t=0;t<x.slides.length;t++){var s=x.slides[t],r=(a+(x.params.centeredSlides?x.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+x.params.spaceBetween);if(x.params.watchSlidesVisibility){var i=-(a-s.swiperSlideOffset),n=i+x.slidesSizesGrid[t];(i>=0&&i<x.size||n>0&&n<=x.size||i<=0&&n>=x.size)&&x.slides.eq(t).addClass(x.params.slideVisibleClass)}s.progress=x.rtl?-r:r}}},x.updateProgress=function(e){void 0===e&&(e=x.translate||0);var a=x.maxTranslate()-x.minTranslate(),t=x.isBeginning,s=x.isEnd;0===a?(x.progress=0,x.isBeginning=x.isEnd=!0):(x.progress=(e-x.minTranslate())/a,x.isBeginning=x.progress<=0,x.isEnd=x.progress>=1),x.isBeginning&&!t&&x.emit("onReachBeginning",x),x.isEnd&&!s&&x.emit("onReachEnd",x),x.params.watchSlidesProgress&&x.updateSlidesProgress(e),x.emit("onProgress",x,x.progress)},x.updateActiveIndex=function(){var e,a,t,s=x.rtl?x.translate:-x.translate;for(a=0;a<x.slidesGrid.length;a++)void 0!==x.slidesGrid[a+1]?s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]-(x.slidesGrid[a+1]-x.slidesGrid[a])/2?e=a:s>=x.slidesGrid[a]&&s<x.slidesGrid[a+1]&&(e=a+1):s>=x.slidesGrid[a]&&(e=a);x.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/x.params.slidesPerGroup),t>=x.snapGrid.length&&(t=x.snapGrid.length-1),e!==x.activeIndex&&(x.snapIndex=t,x.previousIndex=x.activeIndex,x.activeIndex=e,x.updateClasses(),x.updateRealIndex())},x.updateRealIndex=function(){x.realIndex=parseInt(x.slides.eq(x.activeIndex).attr("data-swiper-slide-index")||x.activeIndex,10)},x.updateClasses=function(){x.slides.removeClass(x.params.slideActiveClass+" "+x.params.slideNextClass+" "+x.params.slidePrevClass+" "+x.params.slideDuplicateActiveClass+" "+x.params.slideDuplicateNextClass+" "+x.params.slideDuplicatePrevClass);var a=x.slides.eq(x.activeIndex);a.addClass(x.params.slideActiveClass),s.loop&&(a.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+x.realIndex+'"]').addClass(x.params.slideDuplicateActiveClass));var t=a.next("."+x.params.slideClass).addClass(x.params.slideNextClass);x.params.loop&&0===t.length&&(t=x.slides.eq(0),t.addClass(x.params.slideNextClass));var r=a.prev("."+x.params.slideClass).addClass(x.params.slidePrevClass);if(x.params.loop&&0===r.length&&(r=x.slides.eq(-1),r.addClass(x.params.slidePrevClass)),s.loop&&(t.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicateNextClass),r.hasClass(x.params.slideDuplicateClass)?x.wrapper.children("."+x.params.slideClass+":not(."+x.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass):x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(x.params.slideDuplicatePrevClass)),x.paginationContainer&&x.paginationContainer.length>0){var i,n=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length;if(x.params.loop?(i=Math.ceil((x.activeIndex-x.loopedSlides)/x.params.slidesPerGroup),i>x.slides.length-1-2*x.loopedSlides&&(i-=x.slides.length-2*x.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==x.params.paginationType&&(i=n+i)):i=void 0!==x.snapIndex?x.snapIndex:x.activeIndex||0,"bullets"===x.params.paginationType&&x.bullets&&x.bullets.length>0&&(x.bullets.removeClass(x.params.bulletActiveClass),x.paginationContainer.length>1?x.bullets.each(function(){e(this).index()===i&&e(this).addClass(x.params.bulletActiveClass)}):x.bullets.eq(i).addClass(x.params.bulletActiveClass)),"fraction"===x.params.paginationType&&(x.paginationContainer.find("."+x.params.paginationCurrentClass).text(i+1),x.paginationContainer.find("."+x.params.paginationTotalClass).text(n)),"progress"===x.params.paginationType){var o=(i+1)/n,l=o,p=1;x.isHorizontal()||(p=o,l=1),x.paginationContainer.find("."+x.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(x.params.speed)}"custom"===x.params.paginationType&&x.params.paginationCustomRender&&(x.paginationContainer.html(x.params.paginationCustomRender(x,i+1,n)),x.emit("onPaginationRendered",x,x.paginationContainer[0]))}x.params.loop||(x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.isBeginning?(x.prevButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.prevButton)):(x.prevButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.prevButton))),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.isEnd?(x.nextButton.addClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.disable(x.nextButton)):(x.nextButton.removeClass(x.params.buttonDisabledClass),x.params.a11y&&x.a11y&&x.a11y.enable(x.nextButton))))},x.updatePagination=function(){if(x.params.pagination&&x.paginationContainer&&x.paginationContainer.length>0){var e="";if("bullets"===x.params.paginationType){for(var a=x.params.loop?Math.ceil((x.slides.length-2*x.loopedSlides)/x.params.slidesPerGroup):x.snapGrid.length,t=0;t<a;t++)e+=x.params.paginationBulletRender?x.params.paginationBulletRender(x,t,x.params.bulletClass):"<"+x.params.paginationElement+' class="'+x.params.bulletClass+'"></'+x.params.paginationElement+">";x.paginationContainer.html(e),x.bullets=x.paginationContainer.find("."+x.params.bulletClass),x.params.paginationClickable&&x.params.a11y&&x.a11y&&x.a11y.initPagination()}"fraction"===x.params.paginationType&&(e=x.params.paginationFractionRender?x.params.paginationFractionRender(x,x.params.paginationCurrentClass,x.params.paginationTotalClass):'<span class="'+x.params.paginationCurrentClass+'"></span> / <span class="'+x.params.paginationTotalClass+'"></span>',x.paginationContainer.html(e)),"progress"===x.params.paginationType&&(e=x.params.paginationProgressRender?x.params.paginationProgressRender(x,x.params.paginationProgressbarClass):'<span class="'+x.params.paginationProgressbarClass+'"></span>',x.paginationContainer.html(e)),"custom"!==x.params.paginationType&&x.emit("onPaginationRendered",x,x.paginationContainer[0])}},x.update=function(e){function a(){x.rtl,x.translate;t=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate()),x.setWrapperTranslate(t),x.updateActiveIndex(),x.updateClasses()}if(x){x.updateContainerSize(),x.updateSlidesSize(),x.updateProgress(),x.updatePagination(),x.updateClasses(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set();var t;if(e){x.controller&&x.controller.spline&&(x.controller.spline=void 0),x.params.freeMode?(a(),x.params.autoHeight&&x.updateAutoHeight()):(("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0))||a()}else x.params.autoHeight&&x.updateAutoHeight()}},x.onResize=function(e){x.params.onBeforeResize&&x.params.onBeforeResize(x),x.params.breakpoints&&x.setBreakpoint();var a=x.params.allowSwipeToPrev,t=x.params.allowSwipeToNext;x.params.allowSwipeToPrev=x.params.allowSwipeToNext=!0,x.updateContainerSize(),x.updateSlidesSize(),("auto"===x.params.slidesPerView||x.params.freeMode||e)&&x.updatePagination(),x.params.scrollbar&&x.scrollbar&&x.scrollbar.set(),x.controller&&x.controller.spline&&(x.controller.spline=void 0);var s=!1;if(x.params.freeMode){var r=Math.min(Math.max(x.translate,x.maxTranslate()),x.minTranslate());x.setWrapperTranslate(r),x.updateActiveIndex(),x.updateClasses(),x.params.autoHeight&&x.updateAutoHeight()}else x.updateClasses(),s=("auto"===x.params.slidesPerView||x.params.slidesPerView>1)&&x.isEnd&&!x.params.centeredSlides?x.slideTo(x.slides.length-1,0,!1,!0):x.slideTo(x.activeIndex,0,!1,!0);x.params.lazyLoading&&!s&&x.lazy&&x.lazy.load(),x.params.allowSwipeToPrev=a,x.params.allowSwipeToNext=t,x.params.onAfterResize&&x.params.onAfterResize(x)},x.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?x.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(x.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),x.touchEvents={start:x.support.touch||!x.params.simulateTouch?"touchstart":x.touchEventsDesktop.start,move:x.support.touch||!x.params.simulateTouch?"touchmove":x.touchEventsDesktop.move,end:x.support.touch||!x.params.simulateTouch?"touchend":x.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===x.params.touchEventsTarget?x.container:x.wrapper).addClass("swiper-wp8-"+x.params.direction),x.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===x.params.touchEventsTarget?x.container[0]:x.wrapper[0],i=x.support.touch?r:document,n=!!x.params.nested;if(x.browser.ie)r[t](x.touchEvents.start,x.onTouchStart,!1),i[t](x.touchEvents.move,x.onTouchMove,n),i[t](x.touchEvents.end,x.onTouchEnd,!1);else{if(x.support.touch){var o=!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1};r[t](x.touchEvents.start,x.onTouchStart,o),r[t](x.touchEvents.move,x.onTouchMove,n),r[t](x.touchEvents.end,x.onTouchEnd,o)}(s.simulateTouch&&!x.device.ios&&!x.device.android||s.simulateTouch&&!x.support.touch&&x.device.ios)&&(r[t]("mousedown",x.onTouchStart,!1),document[t]("mousemove",x.onTouchMove,n),document[t]("mouseup",x.onTouchEnd,!1))}window[t]("resize",x.onResize),x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.nextButton[a]("click",x.onClickNext),x.params.a11y&&x.a11y&&x.nextButton[a]("keydown",x.a11y.onEnterKey)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.prevButton[a]("click",x.onClickPrev),x.params.a11y&&x.a11y&&x.prevButton[a]("keydown",x.a11y.onEnterKey)),x.params.pagination&&x.params.paginationClickable&&(x.paginationContainer[a]("click","."+x.params.bulletClass,x.onClickIndex),x.params.a11y&&x.a11y&&x.paginationContainer[a]("keydown","."+x.params.bulletClass,x.a11y.onEnterKey)),(x.params.preventClicks||x.params.preventClicksPropagation)&&r[t]("click",x.preventClicks,!0)},x.attachEvents=function(){x.initEvents()},x.detachEvents=function(){x.initEvents(!0)},x.allowClick=!0,x.preventClicks=function(e){x.allowClick||(x.params.preventClicks&&e.preventDefault(),x.params.preventClicksPropagation&&x.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},x.onClickNext=function(e){e.preventDefault(),x.isEnd&&!x.params.loop||x.slideNext()},x.onClickPrev=function(e){e.preventDefault(),x.isBeginning&&!x.params.loop||x.slidePrev()},x.onClickIndex=function(a){a.preventDefault();var t=e(this).index()*x.params.slidesPerGroup
|
16 |
-
;x.params.loop&&(t+=x.loopedSlides),x.slideTo(t)},x.updateClickedSlide=function(a){var t=n(a,"."+x.params.slideClass),s=!1;if(t)for(var r=0;r<x.slides.length;r++)x.slides[r]===t&&(s=!0);if(!t||!s)return x.clickedSlide=void 0,void(x.clickedIndex=void 0);if(x.clickedSlide=t,x.clickedIndex=e(t).index(),x.params.slideToClickedSlide&&void 0!==x.clickedIndex&&x.clickedIndex!==x.activeIndex){var i,o=x.clickedIndex,l="auto"===x.params.slidesPerView?x.currentSlidesPerView():x.params.slidesPerView;if(x.params.loop){if(x.animating)return;i=parseInt(e(x.clickedSlide).attr("data-swiper-slide-index"),10),x.params.centeredSlides?o<x.loopedSlides-l/2||o>x.slides.length-x.loopedSlides+l/2?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o):o>x.slides.length-l?(x.fixLoop(),o=x.wrapper.children("."+x.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+x.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){x.slideTo(o)},0)):x.slideTo(o)}else x.slideTo(o)}};var b,C,S,z,M,P,E,I,k,D,L="input, select, textarea, button, video",B=Date.now(),H=[];x.animating=!1,x.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var G,X;x.onTouchStart=function(a){if(a.originalEvent&&(a=a.originalEvent),(G="touchstart"===a.type)||!("which"in a)||3!==a.which){if(x.params.noSwiping&&n(a,"."+x.params.noSwipingClass))return void(x.allowClick=!0);if(!x.params.swipeHandler||n(a,x.params.swipeHandler)){var t=x.touches.currentX="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,s=x.touches.currentY="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY;if(!(x.device.ios&&x.params.iOSEdgeSwipeDetection&&t<=x.params.iOSEdgeSwipeThreshold)){if(b=!0,C=!1,S=!0,M=void 0,X=void 0,x.touches.startX=t,x.touches.startY=s,z=Date.now(),x.allowClick=!0,x.updateContainerSize(),x.swipeDirection=void 0,x.params.threshold>0&&(I=!1),"touchstart"!==a.type){var r=!0;e(a.target).is(L)&&(r=!1),document.activeElement&&e(document.activeElement).is(L)&&document.activeElement.blur(),r&&a.preventDefault()}x.emit("onTouchStart",x,a)}}}},x.onTouchMove=function(a){if(a.originalEvent&&(a=a.originalEvent),!G||"mousemove"!==a.type){if(a.preventedByNestedSwiper)return x.touches.startX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,void(x.touches.startY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY);if(x.params.onlyExternal)return x.allowClick=!1,void(b&&(x.touches.startX=x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.startY=x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,z=Date.now()));if(G&&x.params.touchReleaseOnEdges&&!x.params.loop)if(x.isHorizontal()){if(x.touches.currentX<x.touches.startX&&x.translate<=x.maxTranslate()||x.touches.currentX>x.touches.startX&&x.translate>=x.minTranslate())return}else if(x.touches.currentY<x.touches.startY&&x.translate<=x.maxTranslate()||x.touches.currentY>x.touches.startY&&x.translate>=x.minTranslate())return;if(G&&document.activeElement&&a.target===document.activeElement&&e(a.target).is(L))return C=!0,void(x.allowClick=!1);if(S&&x.emit("onTouchMove",x,a),!(a.targetTouches&&a.targetTouches.length>1)){if(x.touches.currentX="touchmove"===a.type?a.targetTouches[0].pageX:a.pageX,x.touches.currentY="touchmove"===a.type?a.targetTouches[0].pageY:a.pageY,void 0===M){var t;x.isHorizontal()&&x.touches.currentY===x.touches.startY||!x.isHorizontal()&&x.touches.currentX===x.touches.startX?M=!1:(t=180*Math.atan2(Math.abs(x.touches.currentY-x.touches.startY),Math.abs(x.touches.currentX-x.touches.startX))/Math.PI,M=x.isHorizontal()?t>x.params.touchAngle:90-t>x.params.touchAngle)}if(M&&x.emit("onTouchMoveOpposite",x,a),void 0===X&&(x.touches.currentX===x.touches.startX&&x.touches.currentY===x.touches.startY||(X=!0)),b){if(M)return void(b=!1);if(X){x.allowClick=!1,x.emit("onSliderMove",x,a),a.preventDefault(),x.params.touchMoveStopPropagation&&!x.params.nested&&a.stopPropagation(),C||(s.loop&&x.fixLoop(),E=x.getWrapperTranslate(),x.setWrapperTransition(0),x.animating&&x.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),x.params.autoplay&&x.autoplaying&&(x.params.autoplayDisableOnInteraction?x.stopAutoplay():x.pauseAutoplay()),D=!1,!x.params.grabCursor||x.params.allowSwipeToNext!==!0&&x.params.allowSwipeToPrev!==!0||x.setGrabCursor(!0)),C=!0;var r=x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY;r*=x.params.touchRatio,x.rtl&&(r=-r),x.swipeDirection=r>0?"prev":"next",P=r+E;var i=!0;if(r>0&&P>x.minTranslate()?(i=!1,x.params.resistance&&(P=x.minTranslate()-1+Math.pow(-x.minTranslate()+E+r,x.params.resistanceRatio))):r<0&&P<x.maxTranslate()&&(i=!1,x.params.resistance&&(P=x.maxTranslate()+1-Math.pow(x.maxTranslate()-E-r,x.params.resistanceRatio))),i&&(a.preventedByNestedSwiper=!0),!x.params.allowSwipeToNext&&"next"===x.swipeDirection&&P<E&&(P=E),!x.params.allowSwipeToPrev&&"prev"===x.swipeDirection&&P>E&&(P=E),x.params.threshold>0){if(!(Math.abs(r)>x.params.threshold||I))return void(P=E);if(!I)return I=!0,x.touches.startX=x.touches.currentX,x.touches.startY=x.touches.currentY,P=E,void(x.touches.diff=x.isHorizontal()?x.touches.currentX-x.touches.startX:x.touches.currentY-x.touches.startY)}x.params.followFinger&&((x.params.freeMode||x.params.watchSlidesProgress)&&x.updateActiveIndex(),x.params.freeMode&&(0===H.length&&H.push({position:x.touches[x.isHorizontal()?"startX":"startY"],time:z}),H.push({position:x.touches[x.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),x.updateProgress(P),x.setWrapperTranslate(P))}}}}},x.onTouchEnd=function(a){if(a.originalEvent&&(a=a.originalEvent),S&&x.emit("onTouchEnd",x,a),S=!1,b){x.params.grabCursor&&C&&b&&(x.params.allowSwipeToNext===!0||x.params.allowSwipeToPrev===!0)&&x.setGrabCursor(!1);var t=Date.now(),s=t-z;if(x.allowClick&&(x.updateClickedSlide(a),x.emit("onTap",x,a),s<300&&t-B>300&&(k&&clearTimeout(k),k=setTimeout(function(){x&&(x.params.paginationHide&&x.paginationContainer.length>0&&!e(a.target).hasClass(x.params.bulletClass)&&x.paginationContainer.toggleClass(x.params.paginationHiddenClass),x.emit("onClick",x,a))},300)),s<300&&t-B<300&&(k&&clearTimeout(k),x.emit("onDoubleTap",x,a))),B=Date.now(),setTimeout(function(){x&&(x.allowClick=!0)},0),!b||!C||!x.swipeDirection||0===x.touches.diff||P===E)return void(b=C=!1);b=C=!1;var r;if(r=x.params.followFinger?x.rtl?x.translate:-x.translate:-P,x.params.freeMode){if(r<-x.minTranslate())return void x.slideTo(x.activeIndex);if(r>-x.maxTranslate())return void(x.slides.length<x.snapGrid.length?x.slideTo(x.snapGrid.length-1):x.slideTo(x.slides.length-1));if(x.params.freeModeMomentum){if(H.length>1){var i=H.pop(),n=H.pop(),o=i.position-n.position,l=i.time-n.time;x.velocity=o/l,x.velocity=x.velocity/2,Math.abs(x.velocity)<x.params.freeModeMinimumVelocity&&(x.velocity=0),(l>150||(new window.Date).getTime()-i.time>300)&&(x.velocity=0)}else x.velocity=0;x.velocity=x.velocity*x.params.freeModeMomentumVelocityRatio,H.length=0;var p=1e3*x.params.freeModeMomentumRatio,d=x.velocity*p,m=x.translate+d;x.rtl&&(m=-m);var u,c=!1,g=20*Math.abs(x.velocity)*x.params.freeModeMomentumBounceRatio;if(m<x.maxTranslate())x.params.freeModeMomentumBounce?(m+x.maxTranslate()<-g&&(m=x.maxTranslate()-g),u=x.maxTranslate(),c=!0,D=!0):m=x.maxTranslate();else if(m>x.minTranslate())x.params.freeModeMomentumBounce?(m-x.minTranslate()>g&&(m=x.minTranslate()+g),u=x.minTranslate(),c=!0,D=!0):m=x.minTranslate();else if(x.params.freeModeSticky){var h,v=0;for(v=0;v<x.snapGrid.length;v+=1)if(x.snapGrid[v]>-m){h=v;break}m=Math.abs(x.snapGrid[h]-m)<Math.abs(x.snapGrid[h-1]-m)||"next"===x.swipeDirection?x.snapGrid[h]:x.snapGrid[h-1],x.rtl||(m=-m)}if(0!==x.velocity)p=x.rtl?Math.abs((-m-x.translate)/x.velocity):Math.abs((m-x.translate)/x.velocity);else if(x.params.freeModeSticky)return void x.slideReset();x.params.freeModeMomentumBounce&&c?(x.updateProgress(u),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating=!0,x.wrapper.transitionEnd(function(){x&&D&&(x.emit("onMomentumBounce",x),x.setWrapperTransition(x.params.speed),x.setWrapperTranslate(u),x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))})):x.velocity?(x.updateProgress(m),x.setWrapperTransition(p),x.setWrapperTranslate(m),x.onTransitionStart(),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd()}))):x.updateProgress(m),x.updateActiveIndex()}return void((!x.params.freeModeMomentum||s>=x.params.longSwipesMs)&&(x.updateProgress(),x.updateActiveIndex()))}var f,w=0,y=x.slidesSizesGrid[0];for(f=0;f<x.slidesGrid.length;f+=x.params.slidesPerGroup)void 0!==x.slidesGrid[f+x.params.slidesPerGroup]?r>=x.slidesGrid[f]&&r<x.slidesGrid[f+x.params.slidesPerGroup]&&(w=f,y=x.slidesGrid[f+x.params.slidesPerGroup]-x.slidesGrid[f]):r>=x.slidesGrid[f]&&(w=f,y=x.slidesGrid[x.slidesGrid.length-1]-x.slidesGrid[x.slidesGrid.length-2]);var T=(r-x.slidesGrid[w])/y;if(s>x.params.longSwipesMs){if(!x.params.longSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&(T>=x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w)),"prev"===x.swipeDirection&&(T>1-x.params.longSwipesRatio?x.slideTo(w+x.params.slidesPerGroup):x.slideTo(w))}else{if(!x.params.shortSwipes)return void x.slideTo(x.activeIndex);"next"===x.swipeDirection&&x.slideTo(w+x.params.slidesPerGroup),"prev"===x.swipeDirection&&x.slideTo(w)}}},x._slideTo=function(e,a){return x.slideTo(e,a,!0,!0)},x.slideTo=function(e,a,t,s){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),x.snapIndex=Math.floor(e/x.params.slidesPerGroup),x.snapIndex>=x.snapGrid.length&&(x.snapIndex=x.snapGrid.length-1);var r=-x.snapGrid[x.snapIndex];if(x.params.autoplay&&x.autoplaying&&(s||!x.params.autoplayDisableOnInteraction?x.pauseAutoplay(a):x.stopAutoplay()),x.updateProgress(r),x.params.normalizeSlideIndex)for(var i=0;i<x.slidesGrid.length;i++)-Math.floor(100*r)>=Math.floor(100*x.slidesGrid[i])&&(e=i);return!(!x.params.allowSwipeToNext&&r<x.translate&&r<x.minTranslate())&&(!(!x.params.allowSwipeToPrev&&r>x.translate&&r>x.maxTranslate()&&(x.activeIndex||0)!==e)&&(void 0===a&&(a=x.params.speed),x.previousIndex=x.activeIndex||0,x.activeIndex=e,x.updateRealIndex(),x.rtl&&-r===x.translate||!x.rtl&&r===x.translate?(x.params.autoHeight&&x.updateAutoHeight(),x.updateClasses(),"slide"!==x.params.effect&&x.setWrapperTranslate(r),!1):(x.updateClasses(),x.onTransitionStart(t),0===a||x.browser.lteIE9?(x.setWrapperTranslate(r),x.setWrapperTransition(0),x.onTransitionEnd(t)):(x.setWrapperTranslate(r),x.setWrapperTransition(a),x.animating||(x.animating=!0,x.wrapper.transitionEnd(function(){x&&x.onTransitionEnd(t)}))),!0)))},x.onTransitionStart=function(e){void 0===e&&(e=!0),x.params.autoHeight&&x.updateAutoHeight(),x.lazy&&x.lazy.onTransitionStart(),e&&(x.emit("onTransitionStart",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeStart",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextStart",x):x.emit("onSlidePrevStart",x)))},x.onTransitionEnd=function(e){x.animating=!1,x.setWrapperTransition(0),void 0===e&&(e=!0),x.lazy&&x.lazy.onTransitionEnd(),e&&(x.emit("onTransitionEnd",x),x.activeIndex!==x.previousIndex&&(x.emit("onSlideChangeEnd",x),x.activeIndex>x.previousIndex?x.emit("onSlideNextEnd",x):x.emit("onSlidePrevEnd",x))),x.params.history&&x.history&&x.history.setHistory(x.params.history,x.activeIndex),x.params.hashnav&&x.hashnav&&x.hashnav.setHash()},x.slideNext=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)}return x.slideTo(x.activeIndex+x.params.slidesPerGroup,a,e,t)},x._slideNext=function(e){return x.slideNext(!0,e,!0)},x.slidePrev=function(e,a,t){if(x.params.loop){if(x.animating)return!1;x.fixLoop();x.container[0].clientLeft;return x.slideTo(x.activeIndex-1,a,e,t)}return x.slideTo(x.activeIndex-1,a,e,t)},x._slidePrev=function(e){return x.slidePrev(!0,e,!0)},x.slideReset=function(e,a,t){return x.slideTo(x.activeIndex,a,e)},x.disableTouchControl=function(){return x.params.onlyExternal=!0,!0},x.enableTouchControl=function(){return x.params.onlyExternal=!1,!0},x.setWrapperTransition=function(e,a){x.wrapper.transition(e),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTransition(e),x.params.parallax&&x.parallax&&x.parallax.setTransition(e),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTransition(e),x.params.control&&x.controller&&x.controller.setTransition(e,a),x.emit("onSetTransition",x,e)},x.setWrapperTranslate=function(e,a,t){var s=0,i=0;x.isHorizontal()?s=x.rtl?-e:e:i=e,x.params.roundLengths&&(s=r(s),i=r(i)),x.params.virtualTranslate||(x.support.transforms3d?x.wrapper.transform("translate3d("+s+"px, "+i+"px, 0px)"):x.wrapper.transform("translate("+s+"px, "+i+"px)")),x.translate=x.isHorizontal()?s:i;var n,o=x.maxTranslate()-x.minTranslate();n=0===o?0:(e-x.minTranslate())/o,n!==x.progress&&x.updateProgress(e),a&&x.updateActiveIndex(),"slide"!==x.params.effect&&x.effects[x.params.effect]&&x.effects[x.params.effect].setTranslate(x.translate),x.params.parallax&&x.parallax&&x.parallax.setTranslate(x.translate),x.params.scrollbar&&x.scrollbar&&x.scrollbar.setTranslate(x.translate),x.params.control&&x.controller&&x.controller.setTranslate(x.translate,t),x.emit("onSetTranslate",x,x.translate)},x.getTranslate=function(e,a){var t,s,r,i;return void 0===a&&(a="x"),x.params.virtualTranslate?x.rtl?-x.translate:x.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(s=r.transform||r.webkitTransform,s.split(",").length>6&&(s=s.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===s?"":s)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(s=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(s=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),x.rtl&&s&&(s=-s),s||0)},x.getWrapperTranslate=function(e){return void 0===e&&(e=x.isHorizontal()?"x":"y"),x.getTranslate(x.wrapper[0],e)},x.observers=[],x.initObservers=function(){if(x.params.observeParents)for(var e=x.container.parents(),a=0;a<e.length;a++)o(e[a]);o(x.container[0],{childList:!1}),o(x.wrapper[0],{attributes:!1})},x.disconnectObservers=function(){for(var e=0;e<x.observers.length;e++)x.observers[e].disconnect();x.observers=[]},x.createLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove();var a=x.wrapper.children("."+x.params.slideClass);"auto"!==x.params.slidesPerView||x.params.loopedSlides||(x.params.loopedSlides=a.length),x.loopedSlides=parseInt(x.params.loopedSlides||x.params.slidesPerView,10),x.loopedSlides=x.loopedSlides+x.params.loopAdditionalSlides,x.loopedSlides>a.length&&(x.loopedSlides=a.length);var t,s=[],r=[];for(a.each(function(t,i){var n=e(this);t<x.loopedSlides&&r.push(i),t<a.length&&t>=a.length-x.loopedSlides&&s.push(i),n.attr("data-swiper-slide-index",t)}),t=0;t<r.length;t++)x.wrapper.append(e(r[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass));for(t=s.length-1;t>=0;t--)x.wrapper.prepend(e(s[t].cloneNode(!0)).addClass(x.params.slideDuplicateClass))},x.destroyLoop=function(){x.wrapper.children("."+x.params.slideClass+"."+x.params.slideDuplicateClass).remove(),x.slides.removeAttr("data-swiper-slide-index")},x.reLoop=function(e){var a=x.activeIndex-x.loopedSlides;x.destroyLoop(),x.createLoop(),x.updateSlidesSize(),e&&x.slideTo(a+x.loopedSlides,0,!1)},x.fixLoop=function(){var e;x.activeIndex<x.loopedSlides?(e=x.slides.length-3*x.loopedSlides+x.activeIndex,e+=x.loopedSlides,x.slideTo(e,0,!1,!0)):("auto"===x.params.slidesPerView&&x.activeIndex>=2*x.loopedSlides||x.activeIndex>x.slides.length-2*x.params.slidesPerView)&&(e=-x.slides.length+x.activeIndex+x.loopedSlides,e+=x.loopedSlides,x.slideTo(e,0,!1,!0))},x.appendSlide=function(e){if(x.params.loop&&x.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a<e.length;a++)e[a]&&x.wrapper.append(e[a]);else x.wrapper.append(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0)},x.prependSlide=function(e){x.params.loop&&x.destroyLoop();var a=x.activeIndex+1;if("object"==typeof e&&e.length){for(var t=0;t<e.length;t++)e[t]&&x.wrapper.prepend(e[t]);a=x.activeIndex+e.length}else x.wrapper.prepend(e);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.slideTo(a,0,!1)},x.removeSlide=function(e){x.params.loop&&(x.destroyLoop(),x.slides=x.wrapper.children("."+x.params.slideClass));var a,t=x.activeIndex;if("object"==typeof e&&e.length){for(var s=0;s<e.length;s++)a=e[s],x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--;t=Math.max(t,0)}else a=e,x.slides[a]&&x.slides.eq(a).remove(),a<t&&t--,t=Math.max(t,0);x.params.loop&&x.createLoop(),x.params.observer&&x.support.observer||x.update(!0),x.params.loop?x.slideTo(t+x.loopedSlides,0,!1):x.slideTo(t,0,!1)},x.removeAllSlides=function(){for(var e=[],a=0;a<x.slides.length;a++)e.push(a);x.removeSlide(e)},x.effects={fade:{setTranslate:function(){for(var e=0;e<x.slides.length;e++){var a=x.slides.eq(e),t=a[0].swiperSlideOffset,s=-t;x.params.virtualTranslate||(s-=x.translate);var r=0;x.isHorizontal()||(r=s,s=0);var i=x.params.fade.crossFade?Math.max(1-Math.abs(a[0].progress),0):1+Math.min(Math.max(a[0].progress,-1),0);a.css({opacity:i}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){if(x.slides.transition(e),x.params.virtualTranslate&&0!==e){var a=!1;x.slides.transitionEnd(function(){if(!a&&x){a=!0,x.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t<e.length;t++)x.wrapper.trigger(e[t])}})}}},flip:{setTranslate:function(){for(var a=0;a<x.slides.length;a++){var t=x.slides.eq(a),s=t[0].progress;x.params.flip.limitRotation&&(s=Math.max(Math.min(t[0].progress,1),-1));var r=t[0].swiperSlideOffset,i=-180*s,n=i,o=0,l=-r,p=0;if(x.isHorizontal()?x.rtl&&(n=-n):(p=l,l=0,o=-n,n=0),t[0].style.zIndex=-Math.abs(Math.round(s))+x.slides.length,x.params.flip.slideShadows){var d=x.isHorizontal()?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),m=x.isHorizontal()?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===d.length&&(d=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),t.append(d)),0===m.length&&(m=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),t.append(m)),d.length&&(d[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(a){if(x.slides.transition(a).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(a),x.params.virtualTranslate&&0!==a){var t=!1;x.slides.eq(x.activeIndex).transitionEnd(function(){if(!t&&x&&e(this).hasClass(x.params.slideActiveClass)){t=!0,x.animating=!1;for(var a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],s=0;s<a.length;s++)x.wrapper.trigger(a[s])}})}}},cube:{setTranslate:function(){var a,t=0;x.params.cube.shadow&&(x.isHorizontal()?(a=x.wrapper.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.wrapper.append(a)),a.css({height:x.width+"px"})):(a=x.container.find(".swiper-cube-shadow"),0===a.length&&(a=e('<div class="swiper-cube-shadow"></div>'),x.container.append(a))));for(var s=0;s<x.slides.length;s++){var r=x.slides.eq(s),i=90*s,n=Math.floor(i/360);x.rtl&&(i=-i,n=Math.floor(-i/360));var o=Math.max(Math.min(r[0].progress,1),-1),l=0,p=0,d=0;s%4==0?(l=4*-n*x.size,d=0):(s-1)%4==0?(l=0,d=4*-n*x.size):(s-2)%4==0?(l=x.size+4*n*x.size,d=x.size):(s-3)%4==0&&(l=-x.size,d=3*x.size+4*x.size*n),x.rtl&&(l=-l),x.isHorizontal()||(p=l,l=0);var m="rotateX("+(x.isHorizontal()?0:-i)+"deg) rotateY("+(x.isHorizontal()?i:0)+"deg) translate3d("+l+"px, "+p+"px, "+d+"px)";if(o<=1&&o>-1&&(t=90*s+90*o,x.rtl&&(t=90*-s-90*o)),r.transform(m),x.params.cube.slideShadows){var u=x.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),c=x.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),r.append(u)),0===c.length&&(c=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),r.append(c)),u.length&&(u[0].style.opacity=Math.max(-o,0)),c.length&&(c[0].style.opacity=Math.max(o,0))}}if(x.wrapper.css({"-webkit-transform-origin":"50% 50% -"+x.size/2+"px","-moz-transform-origin":"50% 50% -"+x.size/2+"px","-ms-transform-origin":"50% 50% -"+x.size/2+"px","transform-origin":"50% 50% -"+x.size/2+"px"}),x.params.cube.shadow)if(x.isHorizontal())a.transform("translate3d(0px, "+(x.width/2+x.params.cube.shadowOffset)+"px, "+-x.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+x.params.cube.shadowScale+")");else{var g=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*g*Math.PI/360)/2+Math.cos(2*g*Math.PI/360)/2),v=x.params.cube.shadowScale,f=x.params.cube.shadowScale/h,w=x.params.cube.shadowOffset;a.transform("scale3d("+v+", 1, "+f+") translate3d(0px, "+(x.height/2+w)+"px, "+-x.height/2/f+"px) rotateX(-90deg)")}var y=x.isSafari||x.isUiWebView?-x.size/2:0;x.wrapper.transform("translate3d(0px,0,"+y+"px) rotateX("+(x.isHorizontal()?0:t)+"deg) rotateY("+(x.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),x.params.cube.shadow&&!x.isHorizontal()&&x.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var a=x.translate,t=x.isHorizontal()?-a+x.width/2:-a+x.height/2,s=x.isHorizontal()?x.params.coverflow.rotate:-x.params.coverflow.rotate,r=x.params.coverflow.depth,i=0,n=x.slides.length;i<n;i++){var o=x.slides.eq(i),l=x.slidesSizesGrid[i],p=o[0].swiperSlideOffset,d=(t-p-l/2)/l*x.params.coverflow.modifier,m=x.isHorizontal()?s*d:0,u=x.isHorizontal()?0:s*d,c=-r*Math.abs(d),g=x.isHorizontal()?0:x.params.coverflow.stretch*d,h=x.isHorizontal()?x.params.coverflow.stretch*d:0;Math.abs(h)<.001&&(h=0),Math.abs(g)<.001&&(g=0),Math.abs(c)<.001&&(c=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0);var v="translate3d("+h+"px,"+g+"px,"+c+"px) rotateX("+u+"deg) rotateY("+m+"deg)";if(o.transform(v),o[0].style.zIndex=1-Math.abs(Math.round(d)),x.params.coverflow.slideShadows){var f=x.isHorizontal()?o.find(".swiper-slide-shadow-left"):o.find(".swiper-slide-shadow-top"),w=x.isHorizontal()?o.find(".swiper-slide-shadow-right"):o.find(".swiper-slide-shadow-bottom");0===f.length&&(f=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"left":"top")+'"></div>'),o.append(f)),0===w.length&&(w=e('<div class="swiper-slide-shadow-'+(x.isHorizontal()?"right":"bottom")+'"></div>'),o.append(w)),f.length&&(f[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(x.browser.ie){x.wrapper[0].style.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){x.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},x.lazy={initialImageLoaded:!1,loadImageInSlide:function(a,t){if(void 0!==a&&(void 0===t&&(t=!0),0!==x.slides.length)){var s=x.slides.eq(a),r=s.find("."+x.params.lazyLoadingClass+":not(."+x.params.lazyStatusLoadedClass+"):not(."+x.params.lazyStatusLoadingClass+")");!s.hasClass(x.params.lazyLoadingClass)||s.hasClass(x.params.lazyStatusLoadedClass)||s.hasClass(x.params.lazyStatusLoadingClass)||(r=r.add(s[0])),0!==r.length&&r.each(function(){var a=e(this);a.addClass(x.params.lazyStatusLoadingClass);var r=a.attr("data-background"),i=a.attr("data-src"),n=a.attr("data-srcset"),o=a.attr("data-sizes");x.loadImage(a[0],i||r,n,o,!1,function(){if(void 0!==x&&null!==x&&x){if(r?(a.css("background-image",'url("'+r+'")'),a.removeAttr("data-background")):(n&&(a.attr("srcset",n),a.removeAttr("data-srcset")),o&&(a.attr("sizes",o),a.removeAttr("data-sizes")),i&&(a.attr("src",i),a.removeAttr("data-src"))),a.addClass(x.params.lazyStatusLoadedClass).removeClass(x.params.lazyStatusLoadingClass),s.find("."+x.params.lazyPreloaderClass+", ."+x.params.preloaderClass).remove(),x.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(x.params.slideDuplicateClass)){var l=x.wrapper.children('[data-swiper-slide-index="'+e+'"]:not(.'+x.params.slideDuplicateClass+")");x.lazy.loadImageInSlide(l.index(),!1)}else{var p=x.wrapper.children("."+x.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');x.lazy.loadImageInSlide(p.index(),!1)}}x.emit("onLazyImageReady",x,s[0],a[0])}}),x.emit("onLazyImageLoad",x,s[0],a[0])})}},load:function(){var a,t=x.params.slidesPerView;if("auto"===t&&(t=0),x.lazy.initialImageLoaded||(x.lazy.initialImageLoaded=!0),x.params.watchSlidesVisibility)x.wrapper.children("."+x.params.slideVisibleClass).each(function(){x.lazy.loadImageInSlide(e(this).index())});else if(t>1)for(a=x.activeIndex;a<x.activeIndex+t;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);else x.lazy.loadImageInSlide(x.activeIndex);if(x.params.lazyLoadingInPrevNext)if(t>1||x.params.lazyLoadingInPrevNextAmount&&x.params.lazyLoadingInPrevNextAmount>1){var s=x.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(x.activeIndex+r+Math.max(s,r),x.slides.length),n=Math.max(x.activeIndex-Math.max(r,s),0);for(a=x.activeIndex+t;a<i;a++)x.slides[a]&&x.lazy.loadImageInSlide(a);for(a=n;a<x.activeIndex;a++)x.slides[a]&&x.lazy.loadImageInSlide(a)}else{var o=x.wrapper.children("."+x.params.slideNextClass);o.length>0&&x.lazy.loadImageInSlide(o.index());var l=x.wrapper.children("."+x.params.slidePrevClass);l.length>0&&x.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){x.params.lazyLoading&&(x.params.lazyLoadingOnTransitionStart||!x.params.lazyLoadingOnTransitionStart&&!x.lazy.initialImageLoaded)&&x.lazy.load()},onTransitionEnd:function(){x.params.lazyLoading&&!x.params.lazyLoadingOnTransitionStart&&x.lazy.load()}},x.scrollbar={isTouched:!1,setDragPosition:function(e){var a=x.scrollbar,t=x.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,s=t-a.track.offset()[x.isHorizontal()?"left":"top"]-a.dragSize/2,r=-x.minTranslate()*a.moveDivider,i=-x.maxTranslate()*a.moveDivider;s<r?s=r:s>i&&(s=i),s=-s/a.moveDivider,x.updateProgress(s),x.setWrapperTranslate(s,!0)},dragStart:function(e){var a=x.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),x.params.scrollbarHide&&a.track.css("opacity",1),x.wrapper.transition(100),a.drag.transition(100),x.emit("onScrollbarDragStart",x)},dragMove:function(e){var a=x.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),x.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),x.emit("onScrollbarDragMove",x))},dragEnd:function(e){var a=x.scrollbar;a.isTouched&&(a.isTouched=!1,x.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),x.emit("onScrollbarDragEnd",x),x.params.scrollbarSnapOnRelease&&x.slideReset())},draggableEvents:function(){return x.params.simulateTouch!==!1||x.support.touch?x.touchEvents:x.touchEventsDesktop}(),enableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).on(a.draggableEvents.start,a.dragStart),e(t).on(a.draggableEvents.move,a.dragMove),e(t).on(a.draggableEvents.end,a.dragEnd)},disableDraggable:function(){var a=x.scrollbar,t=x.support.touch?a.track:document;e(a.track).off(a.draggableEvents.start,a.dragStart),e(t).off(a.draggableEvents.move,a.dragMove),e(t).off(a.draggableEvents.end,a.dragEnd)},set:function(){if(x.params.scrollbar){var a=x.scrollbar;a.track=e(x.params.scrollbar),x.params.uniqueNavElements&&"string"==typeof x.params.scrollbar&&a.track.length>1&&1===x.container.find(x.params.scrollbar).length&&(a.track=x.container.find(x.params.scrollbar)),a.drag=a.track.find(".swiper-scrollbar-drag"),0===a.drag.length&&(a.drag=e('<div class="swiper-scrollbar-drag"></div>'),a.track.append(a.drag)),a.drag[0].style.width="",a.drag[0].style.height="",a.trackSize=x.isHorizontal()?a.track[0].offsetWidth:a.track[0].offsetHeight,a.divider=x.size/x.virtualSize,a.moveDivider=a.divider*(a.trackSize/x.size),a.dragSize=a.trackSize*a.divider,x.isHorizontal()?a.drag[0].style.width=a.dragSize+"px":a.drag[0].style.height=a.dragSize+"px",a.divider>=1?a.track[0].style.display="none":a.track[0].style.display="",x.params.scrollbarHide&&(a.track[0].style.opacity=0)}},setTranslate:function(){if(x.params.scrollbar){var e,a=x.scrollbar,t=(x.translate,a.dragSize);e=(a.trackSize-a.dragSize)*x.progress,x.rtl&&x.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),x.isHorizontal()?(x.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(x.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),x.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){x.params.scrollbar&&x.scrollbar.drag.transition(e)}},x.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(s,r){for(a=-1,e=s.length;e-a>1;)s[t=e+a>>1]<=r?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var s,r;this.x.length;this.interpolate=function(e){return e?(r=t(this.x,e),s=r-1,(e-this.x[s])*(this.y[r]-this.y[s])/(this.x[r]-this.x[s])+this.y[s]):0}},getInterpolateFunction:function(e){x.controller.spline||(x.controller.spline=x.params.loop?new x.controller.LinearSpline(x.slidesGrid,e.slidesGrid):new x.controller.LinearSpline(x.snapGrid,e.snapGrid))},setTranslate:function(e,t){function s(a){e=a.rtl&&"horizontal"===a.params.direction?-x.translate:x.translate,"slide"===x.params.controlBy&&(x.controller.getInterpolateFunction(a),i=-x.controller.spline.interpolate(-e)),i&&"container"!==x.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(x.maxTranslate()-x.minTranslate()),i=(e-x.minTranslate())*r+a.minTranslate()),x.params.controlInverse&&(i=a.maxTranslate()-i),a.updateProgress(i),a.setWrapperTranslate(i,!1,x),a.updateActiveIndex()}var r,i,n=x.params.control;if(Array.isArray(n))for(var o=0;o<n.length;o++)n[o]!==t&&n[o]instanceof a&&s(n[o]);else n instanceof a&&t!==n&&s(n)},setTransition:function(e,t){function s(a){a.setWrapperTransition(e,x),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){i&&(a.params.loop&&"slide"===x.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var r,i=x.params.control;if(Array.isArray(i))for(r=0;r<i.length;r++)i[r]!==t&&i[r]instanceof a&&s(i[r]);else i instanceof a&&t!==i&&s(i)}},x.hashnav={onHashCange:function(e,a){var t=document.location.hash.replace("#","");t!==x.slides.eq(x.activeIndex).attr("data-hash")&&x.slideTo(x.wrapper.children("."+x.params.slideClass+'[data-hash="'+t+'"]').index())},attachEvents:function(a){var t=a?"off":"on";e(window)[t]("hashchange",x.hashnav.onHashCange)},setHash:function(){
|
17 |
-
if(x.hashnav.initialized&&x.params.hashnav)if(x.params.replaceState&&window.history&&window.history.replaceState)window.history.replaceState(null,null,"#"+x.slides.eq(x.activeIndex).attr("data-hash")||"");else{var e=x.slides.eq(x.activeIndex),a=e.attr("data-hash")||e.attr("data-history");document.location.hash=a||""}},init:function(){if(x.params.hashnav&&!x.params.history){x.hashnav.initialized=!0;var e=document.location.hash.replace("#","");if(e)for(var a=0,t=x.slides.length;a<t;a++){var s=x.slides.eq(a),r=s.attr("data-hash")||s.attr("data-history");if(r===e&&!s.hasClass(x.params.slideDuplicateClass)){var i=s.index();x.slideTo(i,0,x.params.runCallbacksOnInit,!0)}}x.params.hashnavWatchState&&x.hashnav.attachEvents()}},destroy:function(){x.params.hashnavWatchState&&x.hashnav.attachEvents(!0)}},x.history={init:function(){if(x.params.history){if(!window.history||!window.history.pushState)return x.params.history=!1,void(x.params.hashnav=!0);x.history.initialized=!0,this.paths=this.getPathValues(),(this.paths.key||this.paths.value)&&(this.scrollToSlide(0,this.paths.value,x.params.runCallbacksOnInit),x.params.replaceState||window.addEventListener("popstate",this.setHistoryPopState))}},setHistoryPopState:function(){x.history.paths=x.history.getPathValues(),x.history.scrollToSlide(x.params.speed,x.history.paths.value,!1)},getPathValues:function(){var e=window.location.pathname.slice(1).split("/"),a=e.length;return{key:e[a-2],value:e[a-1]}},setHistory:function(e,a){if(x.history.initialized&&x.params.history){var t=x.slides.eq(a),s=this.slugify(t.attr("data-history"));window.location.pathname.includes(e)||(s=e+"/"+s),x.params.replaceState?window.history.replaceState(null,null,s):window.history.pushState(null,null,s)}},slugify:function(e){return e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,a,t){if(a)for(var s=0,r=x.slides.length;s<r;s++){var i=x.slides.eq(s),n=this.slugify(i.attr("data-history"));if(n===a&&!i.hasClass(x.params.slideDuplicateClass)){var o=i.index();x.slideTo(o,e,t)}}else x.slideTo(0,e,t)}},x.disableKeyboardControl=function(){x.params.keyboardControl=!1,e(document).off("keydown",l)},x.enableKeyboardControl=function(){x.params.keyboardControl=!0,e(document).on("keydown",l)},x.mousewheel={event:!1,lastScrollTime:(new window.Date).getTime()},x.params.mousewheelControl&&(x.mousewheel.event=navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e="onwheel"in document;if(!e){var a=document.createElement("div");a.setAttribute("onwheel","return;"),e="function"==typeof a.onwheel}return!e&&document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"),x.disableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.off(x.mousewheel.event,d),x.params.mousewheelControl=!1,!0},x.enableMousewheelControl=function(){if(!x.mousewheel.event)return!1;var a=x.container;return"container"!==x.params.mousewheelEventsTarged&&(a=e(x.params.mousewheelEventsTarged)),a.on(x.mousewheel.event,d),x.params.mousewheelControl=!0,!0},x.parallax={setTranslate:function(){x.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,x.progress)}),x.slides.each(function(){var a=e(this);a.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){m(this,Math.min(Math.max(a[0].progress,-1),1))})})},setTransition:function(a){void 0===a&&(a=x.params.speed),x.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=e(this),s=parseInt(t.attr("data-swiper-parallax-duration"),10)||a;0===a&&(s=0),t.transition(s)})}},x.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:x.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-a,2)+Math.pow(r-t,2))},onGestureStart:function(a){var t=x.zoom;if(!x.support.gestures){if("touchstart"!==a.type||"touchstart"===a.type&&a.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(a)}if(!(t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=e(this),0===t.gesture.slide.length&&(t.gesture.slide=x.slides.eq(x.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+x.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||x.params.zoomMax,0!==t.gesture.imageWrap.length)))return void(t.gesture.image=void 0);t.gesture.image.transition(0),t.isScaling=!0},onGestureChange:function(e){var a=x.zoom;if(!x.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(x.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<x.params.zoomMin&&(a.scale=x.params.zoomMin+1-Math.pow(x.params.zoomMin-a.scale+1,.5)),a.gesture.image.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var a=x.zoom;!x.support.gestures&&("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2)||a.gesture.image&&0!==a.gesture.image.length&&(a.scale=Math.max(Math.min(a.scale,a.gesture.zoomMax),x.params.zoomMin),a.gesture.image.transition(x.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(a.gesture.slide=void 0))},onTouchStart:function(e,a){var t=e.zoom;t.gesture.image&&0!==t.gesture.image.length&&(t.image.isTouched||("android"===e.device.os&&a.preventDefault(),t.image.isTouched=!0,t.image.touchesStart.x="touchstart"===a.type?a.targetTouches[0].pageX:a.pageX,t.image.touchesStart.y="touchstart"===a.type?a.targetTouches[0].pageY:a.pageY))},onTouchMove:function(e){var a=x.zoom;if(a.gesture.image&&0!==a.gesture.image.length&&(x.allowClick=!1,a.image.isTouched&&a.gesture.slide)){a.image.isMoved||(a.image.width=a.gesture.image[0].offsetWidth,a.image.height=a.gesture.image[0].offsetHeight,a.image.startX=x.getTranslate(a.gesture.imageWrap[0],"x")||0,a.image.startY=x.getTranslate(a.gesture.imageWrap[0],"y")||0,a.gesture.slideWidth=a.gesture.slide[0].offsetWidth,a.gesture.slideHeight=a.gesture.slide[0].offsetHeight,a.gesture.imageWrap.transition(0),x.rtl&&(a.image.startX=-a.image.startX),x.rtl&&(a.image.startY=-a.image.startY));var t=a.image.width*a.scale,s=a.image.height*a.scale;if(!(t<a.gesture.slideWidth&&s<a.gesture.slideHeight)){if(a.image.minX=Math.min(a.gesture.slideWidth/2-t/2,0),a.image.maxX=-a.image.minX,a.image.minY=Math.min(a.gesture.slideHeight/2-s/2,0),a.image.maxY=-a.image.minY,a.image.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.image.isMoved&&!a.isScaling){if(x.isHorizontal()&&Math.floor(a.image.minX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x<a.image.touchesStart.x||Math.floor(a.image.maxX)===Math.floor(a.image.startX)&&a.image.touchesCurrent.x>a.image.touchesStart.x)return void(a.image.isTouched=!1);if(!x.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y<a.image.touchesStart.y||Math.floor(a.image.maxY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.y>a.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentX<a.image.minX&&(a.image.currentX=a.image.minX+1-Math.pow(a.image.minX-a.image.currentX+1,.8)),a.image.currentX>a.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentY<a.image.minY&&(a.image.currentY=a.image.minY+1-Math.pow(a.image.minY-a.image.currentY+1,.8)),a.image.currentY>a.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var s=300,r=300,i=t.velocity.x*s,n=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(s=Math.abs((n-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(s,r);t.image.currentX=n,t.image.currentY=l;var d=t.image.width*t.scale,m=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-m/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(a,t){var s=a.zoom;if(s.gesture.slide||(s.gesture.slide=a.clickedSlide?e(a.clickedSlide):a.slides.eq(a.activeIndex),s.gesture.image=s.gesture.slide.find("img, svg, canvas"),s.gesture.imageWrap=s.gesture.image.parent("."+a.params.zoomContainerClass)),s.gesture.image&&0!==s.gesture.image.length){var r,i,n,o,l,p,d,m,u,c,g,h,v,f,w,y,x,T;void 0===s.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=s.image.touchesStart.x,i=s.image.touchesStart.y),s.scale&&1!==s.scale?(s.scale=s.currentScale=1,s.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),s.gesture.slide=void 0):(s.scale=s.currentScale=s.gesture.imageWrap.attr("data-swiper-zoom")||a.params.zoomMax,t?(x=s.gesture.slide[0].offsetWidth,T=s.gesture.slide[0].offsetHeight,n=s.gesture.slide.offset().left,o=s.gesture.slide.offset().top,l=n+x/2-r,p=o+T/2-i,u=s.gesture.image[0].offsetWidth,c=s.gesture.image[0].offsetHeight,g=u*s.scale,h=c*s.scale,v=Math.min(x/2-g/2,0),f=Math.min(T/2-h/2,0),w=-v,y=-f,d=l*s.scale,m=p*s.scale,d<v&&(d=v),d>w&&(d=w),m<f&&(m=f),m>y&&(m=y)):(d=0,m=0),s.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+m+"px,0)"),s.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+s.scale+")"))}},attachEvents:function(a){var t=a?"off":"on";if(x.params.zoom){var s=(x.slides,!("touchstart"!==x.touchEvents.start||!x.support.passiveListener||!x.params.passiveListeners)&&{passive:!0,capture:!1});x.support.gestures?(x.slides[t]("gesturestart",x.zoom.onGestureStart,s),x.slides[t]("gesturechange",x.zoom.onGestureChange,s),x.slides[t]("gestureend",x.zoom.onGestureEnd,s)):"touchstart"===x.touchEvents.start&&(x.slides[t](x.touchEvents.start,x.zoom.onGestureStart,s),x.slides[t](x.touchEvents.move,x.zoom.onGestureChange,s),x.slides[t](x.touchEvents.end,x.zoom.onGestureEnd,s)),x[t]("touchStart",x.zoom.onTouchStart),x.slides.each(function(a,s){e(s).find("."+x.params.zoomContainerClass).length>0&&e(s)[t](x.touchEvents.move,x.zoom.onTouchMove)}),x[t]("touchEnd",x.zoom.onTouchEnd),x[t]("transitionEnd",x.zoom.onTransitionEnd),x.params.zoomToggle&&x.on("doubleTap",x.zoom.toggleZoom)}},init:function(){x.zoom.attachEvents()},destroy:function(){x.zoom.attachEvents(!0)}},x._plugins=[];for(var Y in x.plugins){var A=x.plugins[Y](x,x.params[Y]);A&&x._plugins.push(A)}return x.callPlugins=function(e){for(var a=0;a<x._plugins.length;a++)e in x._plugins[a]&&x._plugins[a][e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.emitterEventListeners={},x.emit=function(e){x.params[e]&&x.params[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);var a;if(x.emitterEventListeners[e])for(a=0;a<x.emitterEventListeners[e].length;a++)x.emitterEventListeners[e][a](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);x.callPlugins&&x.callPlugins(e,arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},x.on=function(e,a){return e=u(e),x.emitterEventListeners[e]||(x.emitterEventListeners[e]=[]),x.emitterEventListeners[e].push(a),x},x.off=function(e,a){var t;if(e=u(e),void 0===a)return x.emitterEventListeners[e]=[],x;if(x.emitterEventListeners[e]&&0!==x.emitterEventListeners[e].length){for(t=0;t<x.emitterEventListeners[e].length;t++)x.emitterEventListeners[e][t]===a&&x.emitterEventListeners[e].splice(t,1);return x}},x.once=function(e,a){e=u(e);var t=function(){a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4]),x.off(e,t)};return x.on(e,t),x},x.a11y={makeFocusable:function(e){return e.attr("tabIndex","0"),e},addRole:function(e,a){return e.attr("role",a),e},addLabel:function(e,a){return e.attr("aria-label",a),e},disable:function(e){return e.attr("aria-disabled",!0),e},enable:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(a){13===a.keyCode&&(e(a.target).is(x.params.nextButton)?(x.onClickNext(a),x.isEnd?x.a11y.notify(x.params.lastSlideMessage):x.a11y.notify(x.params.nextSlideMessage)):e(a.target).is(x.params.prevButton)&&(x.onClickPrev(a),x.isBeginning?x.a11y.notify(x.params.firstSlideMessage):x.a11y.notify(x.params.prevSlideMessage)),e(a.target).is("."+x.params.bulletClass)&&e(a.target)[0].click())},liveRegion:e('<span class="'+x.params.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>'),notify:function(e){var a=x.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){x.params.nextButton&&x.nextButton&&x.nextButton.length>0&&(x.a11y.makeFocusable(x.nextButton),x.a11y.addRole(x.nextButton,"button"),x.a11y.addLabel(x.nextButton,x.params.nextSlideMessage)),x.params.prevButton&&x.prevButton&&x.prevButton.length>0&&(x.a11y.makeFocusable(x.prevButton),x.a11y.addRole(x.prevButton,"button"),x.a11y.addLabel(x.prevButton,x.params.prevSlideMessage)),e(x.container).append(x.a11y.liveRegion)},initPagination:function(){x.params.pagination&&x.params.paginationClickable&&x.bullets&&x.bullets.length&&x.bullets.each(function(){var a=e(this);x.a11y.makeFocusable(a),x.a11y.addRole(a,"button"),x.a11y.addLabel(a,x.params.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},destroy:function(){x.a11y.liveRegion&&x.a11y.liveRegion.length>0&&x.a11y.liveRegion.remove()}},x.init=function(){x.params.loop&&x.createLoop(),x.updateContainerSize(),x.updateSlidesSize(),x.updatePagination(),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.set(),x.params.scrollbarDraggable&&x.scrollbar.enableDraggable()),"slide"!==x.params.effect&&x.effects[x.params.effect]&&(x.params.loop||x.updateProgress(),x.effects[x.params.effect].setTranslate()),x.params.loop?x.slideTo(x.params.initialSlide+x.loopedSlides,0,x.params.runCallbacksOnInit):(x.slideTo(x.params.initialSlide,0,x.params.runCallbacksOnInit),0===x.params.initialSlide&&(x.parallax&&x.params.parallax&&x.parallax.setTranslate(),x.lazy&&x.params.lazyLoading&&(x.lazy.load(),x.lazy.initialImageLoaded=!0))),x.attachEvents(),x.params.observer&&x.support.observer&&x.initObservers(),x.params.preloadImages&&!x.params.lazyLoading&&x.preloadImages(),x.params.zoom&&x.zoom&&x.zoom.init(),x.params.autoplay&&x.startAutoplay(),x.params.keyboardControl&&x.enableKeyboardControl&&x.enableKeyboardControl(),x.params.mousewheelControl&&x.enableMousewheelControl&&x.enableMousewheelControl(),x.params.hashnavReplaceState&&(x.params.replaceState=x.params.hashnavReplaceState),x.params.history&&x.history&&x.history.init(),x.params.hashnav&&x.hashnav&&x.hashnav.init(),x.params.a11y&&x.a11y&&x.a11y.init(),x.emit("onInit",x)},x.cleanupStyles=function(){x.container.removeClass(x.classNames.join(" ")).removeAttr("style"),x.wrapper.removeAttr("style"),x.slides&&x.slides.length&&x.slides.removeClass([x.params.slideVisibleClass,x.params.slideActiveClass,x.params.slideNextClass,x.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),x.paginationContainer&&x.paginationContainer.length&&x.paginationContainer.removeClass(x.params.paginationHiddenClass),x.bullets&&x.bullets.length&&x.bullets.removeClass(x.params.bulletActiveClass),x.params.prevButton&&e(x.params.prevButton).removeClass(x.params.buttonDisabledClass),x.params.nextButton&&e(x.params.nextButton).removeClass(x.params.buttonDisabledClass),x.params.scrollbar&&x.scrollbar&&(x.scrollbar.track&&x.scrollbar.track.length&&x.scrollbar.track.removeAttr("style"),x.scrollbar.drag&&x.scrollbar.drag.length&&x.scrollbar.drag.removeAttr("style"))},x.destroy=function(e,a){x.detachEvents(),x.stopAutoplay(),x.params.scrollbar&&x.scrollbar&&x.params.scrollbarDraggable&&x.scrollbar.disableDraggable(),x.params.loop&&x.destroyLoop(),a&&x.cleanupStyles(),x.disconnectObservers(),x.params.zoom&&x.zoom&&x.zoom.destroy(),x.params.keyboardControl&&x.disableKeyboardControl&&x.disableKeyboardControl(),x.params.mousewheelControl&&x.disableMousewheelControl&&x.disableMousewheelControl(),x.params.a11y&&x.a11y&&x.a11y.destroy(),x.params.history&&!x.params.replaceState&&window.removeEventListener("popstate",x.history.setHistoryPopState),x.params.hashnav&&x.hashnav&&x.hashnav.destroy(),x.emit("onDestroy"),e!==!1&&(x=null)},x.init(),x}};a.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}()},device:function(){var e=window.navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),s=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);return{ios:t||r||s,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t<a.length;t++)if(a[t]in e)return!0}(),observer:function(){return"MutationObserver"in window||"WebkitMutationObserver"in window}(),passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:function(){return"ongesturestart"in window}()},plugins:{}};for(var t=["jQuery","Zepto","Dom7"],s=0;s<t.length;s++)window[t[s]]&&function(e){e.fn.swiper=function(t){var s;return e(this).each(function(){var e=new a(this,t);s||(s=e)}),s}}(window[t[s]]);var r;r="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7,r&&("transitionEnd"in r.fn||(r.fn.transitionEnd=function(e){function a(i){if(i.target===this)for(e.call(this,i),t=0;t<s.length;t++)r.off(s[t],a)}var t,s=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],r=this;if(e)for(t=0;t<s.length;t++)r.on(s[t],a);return this}),"transform"in r.fn||(r.fn.transform=function(e){for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransform=t.MsTransform=t.msTransform=t.MozTransform=t.OTransform=t.transform=e}return this}),"transition"in r.fn||(r.fn.transition=function(e){"string"!=typeof e&&(e+="ms");for(var a=0;a<this.length;a++){var t=this[a].style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e}return this}),"outerWidth"in r.fn||(r.fn.outerWidth=function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null})),window.Swiper=a}(),"undefined"!=typeof module?module.exports=window.Swiper:"function"==typeof define&&define.amd&&define([],function(){"use strict";return window.Swiper});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/swiper/js/swiper.js
CHANGED
@@ -1,7740 +1,7740 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.3.5
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: July 31, 2018
|
11 |
-
*/
|
12 |
-
|
13 |
-
(function (global, factory) {
|
14 |
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
15 |
-
typeof define === 'function' && define.amd ? define(factory) :
|
16 |
-
(global.Swiper = factory());
|
17 |
-
}(this, (function () { 'use strict';
|
18 |
-
|
19 |
-
/**
|
20 |
-
* SSR Window 1.0.1
|
21 |
-
* Better handling for window object in SSR environment
|
22 |
-
* https://github.com/nolimits4web/ssr-window
|
23 |
-
*
|
24 |
-
* Copyright 2018, Vladimir Kharlampidi
|
25 |
-
*
|
26 |
-
* Licensed under MIT
|
27 |
-
*
|
28 |
-
* Released on: July 18, 2018
|
29 |
-
*/
|
30 |
-
var doc = (typeof document === 'undefined') ? {
|
31 |
-
body: {},
|
32 |
-
addEventListener: function addEventListener() {},
|
33 |
-
removeEventListener: function removeEventListener() {},
|
34 |
-
activeElement: {
|
35 |
-
blur: function blur() {},
|
36 |
-
nodeName: '',
|
37 |
-
},
|
38 |
-
querySelector: function querySelector() {
|
39 |
-
return null;
|
40 |
-
},
|
41 |
-
querySelectorAll: function querySelectorAll() {
|
42 |
-
return [];
|
43 |
-
},
|
44 |
-
getElementById: function getElementById() {
|
45 |
-
return null;
|
46 |
-
},
|
47 |
-
createEvent: function createEvent() {
|
48 |
-
return {
|
49 |
-
initEvent: function initEvent() {},
|
50 |
-
};
|
51 |
-
},
|
52 |
-
createElement: function createElement() {
|
53 |
-
return {
|
54 |
-
children: [],
|
55 |
-
childNodes: [],
|
56 |
-
style: {},
|
57 |
-
setAttribute: function setAttribute() {},
|
58 |
-
getElementsByTagName: function getElementsByTagName() {
|
59 |
-
return [];
|
60 |
-
},
|
61 |
-
};
|
62 |
-
},
|
63 |
-
location: { hash: '' },
|
64 |
-
} : document; // eslint-disable-line
|
65 |
-
|
66 |
-
var win = (typeof window === 'undefined') ? {
|
67 |
-
document: doc,
|
68 |
-
navigator: {
|
69 |
-
userAgent: '',
|
70 |
-
},
|
71 |
-
location: {},
|
72 |
-
history: {},
|
73 |
-
CustomEvent: function CustomEvent() {
|
74 |
-
return this;
|
75 |
-
},
|
76 |
-
addEventListener: function addEventListener() {},
|
77 |
-
removeEventListener: function removeEventListener() {},
|
78 |
-
getComputedStyle: function getComputedStyle() {
|
79 |
-
return {
|
80 |
-
getPropertyValue: function getPropertyValue() {
|
81 |
-
return '';
|
82 |
-
},
|
83 |
-
};
|
84 |
-
},
|
85 |
-
Image: function Image() {},
|
86 |
-
Date: function Date() {},
|
87 |
-
screen: {},
|
88 |
-
setTimeout: function setTimeout() {},
|
89 |
-
clearTimeout: function clearTimeout() {},
|
90 |
-
} : window; // eslint-disable-line
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Dom7 2.0.7
|
94 |
-
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
95 |
-
* http://framework7.io/docs/dom.html
|
96 |
-
*
|
97 |
-
* Copyright 2018, Vladimir Kharlampidi
|
98 |
-
* The iDangero.us
|
99 |
-
* http://www.idangero.us/
|
100 |
-
*
|
101 |
-
* Licensed under MIT
|
102 |
-
*
|
103 |
-
* Released on: June 14, 2018
|
104 |
-
*/
|
105 |
-
|
106 |
-
var Dom7 = function Dom7(arr) {
|
107 |
-
var self = this;
|
108 |
-
// Create array-like object
|
109 |
-
for (var i = 0; i < arr.length; i += 1) {
|
110 |
-
self[i] = arr[i];
|
111 |
-
}
|
112 |
-
self.length = arr.length;
|
113 |
-
// Return collection with methods
|
114 |
-
return this;
|
115 |
-
};
|
116 |
-
|
117 |
-
function $(selector, context) {
|
118 |
-
var arr = [];
|
119 |
-
var i = 0;
|
120 |
-
if (selector && !context) {
|
121 |
-
if (selector instanceof Dom7) {
|
122 |
-
return selector;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
if (selector) {
|
126 |
-
// String
|
127 |
-
if (typeof selector === 'string') {
|
128 |
-
var els;
|
129 |
-
var tempParent;
|
130 |
-
var html = selector.trim();
|
131 |
-
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
|
132 |
-
var toCreate = 'div';
|
133 |
-
if (html.indexOf('<li') === 0) { toCreate = 'ul'; }
|
134 |
-
if (html.indexOf('<tr') === 0) { toCreate = 'tbody'; }
|
135 |
-
if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) { toCreate = 'tr'; }
|
136 |
-
if (html.indexOf('<tbody') === 0) { toCreate = 'table'; }
|
137 |
-
if (html.indexOf('<option') === 0) { toCreate = 'select'; }
|
138 |
-
tempParent = doc.createElement(toCreate);
|
139 |
-
tempParent.innerHTML = html;
|
140 |
-
for (i = 0; i < tempParent.childNodes.length; i += 1) {
|
141 |
-
arr.push(tempParent.childNodes[i]);
|
142 |
-
}
|
143 |
-
} else {
|
144 |
-
if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
|
145 |
-
// Pure ID selector
|
146 |
-
els = [doc.getElementById(selector.trim().split('#')[1])];
|
147 |
-
} else {
|
148 |
-
// Other selectors
|
149 |
-
els = (context || doc).querySelectorAll(selector.trim());
|
150 |
-
}
|
151 |
-
for (i = 0; i < els.length; i += 1) {
|
152 |
-
if (els[i]) { arr.push(els[i]); }
|
153 |
-
}
|
154 |
-
}
|
155 |
-
} else if (selector.nodeType || selector === win || selector === doc) {
|
156 |
-
// Node/element
|
157 |
-
arr.push(selector);
|
158 |
-
} else if (selector.length > 0 && selector[0].nodeType) {
|
159 |
-
// Array of elements or instance of Dom
|
160 |
-
for (i = 0; i < selector.length; i += 1) {
|
161 |
-
arr.push(selector[i]);
|
162 |
-
}
|
163 |
-
}
|
164 |
-
}
|
165 |
-
return new Dom7(arr);
|
166 |
-
}
|
167 |
-
|
168 |
-
$.fn = Dom7.prototype;
|
169 |
-
$.Class = Dom7;
|
170 |
-
$.Dom7 = Dom7;
|
171 |
-
|
172 |
-
function unique(arr) {
|
173 |
-
var uniqueArray = [];
|
174 |
-
for (var i = 0; i < arr.length; i += 1) {
|
175 |
-
if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }
|
176 |
-
}
|
177 |
-
return uniqueArray;
|
178 |
-
}
|
179 |
-
|
180 |
-
// Classes and attributes
|
181 |
-
function addClass(className) {
|
182 |
-
var this$1 = this;
|
183 |
-
|
184 |
-
if (typeof className === 'undefined') {
|
185 |
-
return this;
|
186 |
-
}
|
187 |
-
var classes = className.split(' ');
|
188 |
-
for (var i = 0; i < classes.length; i += 1) {
|
189 |
-
for (var j = 0; j < this.length; j += 1) {
|
190 |
-
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }
|
191 |
-
}
|
192 |
-
}
|
193 |
-
return this;
|
194 |
-
}
|
195 |
-
function removeClass(className) {
|
196 |
-
var this$1 = this;
|
197 |
-
|
198 |
-
var classes = className.split(' ');
|
199 |
-
for (var i = 0; i < classes.length; i += 1) {
|
200 |
-
for (var j = 0; j < this.length; j += 1) {
|
201 |
-
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }
|
202 |
-
}
|
203 |
-
}
|
204 |
-
return this;
|
205 |
-
}
|
206 |
-
function hasClass(className) {
|
207 |
-
if (!this[0]) { return false; }
|
208 |
-
return this[0].classList.contains(className);
|
209 |
-
}
|
210 |
-
function toggleClass(className) {
|
211 |
-
var this$1 = this;
|
212 |
-
|
213 |
-
var classes = className.split(' ');
|
214 |
-
for (var i = 0; i < classes.length; i += 1) {
|
215 |
-
for (var j = 0; j < this.length; j += 1) {
|
216 |
-
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }
|
217 |
-
}
|
218 |
-
}
|
219 |
-
return this;
|
220 |
-
}
|
221 |
-
function attr(attrs, value) {
|
222 |
-
var arguments$1 = arguments;
|
223 |
-
var this$1 = this;
|
224 |
-
|
225 |
-
if (arguments.length === 1 && typeof attrs === 'string') {
|
226 |
-
// Get attr
|
227 |
-
if (this[0]) { return this[0].getAttribute(attrs); }
|
228 |
-
return undefined;
|
229 |
-
}
|
230 |
-
|
231 |
-
// Set attrs
|
232 |
-
for (var i = 0; i < this.length; i += 1) {
|
233 |
-
if (arguments$1.length === 2) {
|
234 |
-
// String
|
235 |
-
this$1[i].setAttribute(attrs, value);
|
236 |
-
} else {
|
237 |
-
// Object
|
238 |
-
// eslint-disable-next-line
|
239 |
-
for (var attrName in attrs) {
|
240 |
-
this$1[i][attrName] = attrs[attrName];
|
241 |
-
this$1[i].setAttribute(attrName, attrs[attrName]);
|
242 |
-
}
|
243 |
-
}
|
244 |
-
}
|
245 |
-
return this;
|
246 |
-
}
|
247 |
-
// eslint-disable-next-line
|
248 |
-
function removeAttr(attr) {
|
249 |
-
var this$1 = this;
|
250 |
-
|
251 |
-
for (var i = 0; i < this.length; i += 1) {
|
252 |
-
this$1[i].removeAttribute(attr);
|
253 |
-
}
|
254 |
-
return this;
|
255 |
-
}
|
256 |
-
function data(key, value) {
|
257 |
-
var this$1 = this;
|
258 |
-
|
259 |
-
var el;
|
260 |
-
if (typeof value === 'undefined') {
|
261 |
-
el = this[0];
|
262 |
-
// Get value
|
263 |
-
if (el) {
|
264 |
-
if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {
|
265 |
-
return el.dom7ElementDataStorage[key];
|
266 |
-
}
|
267 |
-
|
268 |
-
var dataKey = el.getAttribute(("data-" + key));
|
269 |
-
if (dataKey) {
|
270 |
-
return dataKey;
|
271 |
-
}
|
272 |
-
return undefined;
|
273 |
-
}
|
274 |
-
return undefined;
|
275 |
-
}
|
276 |
-
|
277 |
-
// Set value
|
278 |
-
for (var i = 0; i < this.length; i += 1) {
|
279 |
-
el = this$1[i];
|
280 |
-
if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }
|
281 |
-
el.dom7ElementDataStorage[key] = value;
|
282 |
-
}
|
283 |
-
return this;
|
284 |
-
}
|
285 |
-
// Transforms
|
286 |
-
// eslint-disable-next-line
|
287 |
-
function transform(transform) {
|
288 |
-
var this$1 = this;
|
289 |
-
|
290 |
-
for (var i = 0; i < this.length; i += 1) {
|
291 |
-
var elStyle = this$1[i].style;
|
292 |
-
elStyle.webkitTransform = transform;
|
293 |
-
elStyle.transform = transform;
|
294 |
-
}
|
295 |
-
return this;
|
296 |
-
}
|
297 |
-
function transition(duration) {
|
298 |
-
var this$1 = this;
|
299 |
-
|
300 |
-
if (typeof duration !== 'string') {
|
301 |
-
duration = duration + "ms"; // eslint-disable-line
|
302 |
-
}
|
303 |
-
for (var i = 0; i < this.length; i += 1) {
|
304 |
-
var elStyle = this$1[i].style;
|
305 |
-
elStyle.webkitTransitionDuration = duration;
|
306 |
-
elStyle.transitionDuration = duration;
|
307 |
-
}
|
308 |
-
return this;
|
309 |
-
}
|
310 |
-
// Events
|
311 |
-
function on() {
|
312 |
-
var this$1 = this;
|
313 |
-
var assign;
|
314 |
-
|
315 |
-
var args = [], len = arguments.length;
|
316 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
317 |
-
var eventType = args[0];
|
318 |
-
var targetSelector = args[1];
|
319 |
-
var listener = args[2];
|
320 |
-
var capture = args[3];
|
321 |
-
if (typeof args[1] === 'function') {
|
322 |
-
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
323 |
-
targetSelector = undefined;
|
324 |
-
}
|
325 |
-
if (!capture) { capture = false; }
|
326 |
-
|
327 |
-
function handleLiveEvent(e) {
|
328 |
-
var target = e.target;
|
329 |
-
if (!target) { return; }
|
330 |
-
var eventData = e.target.dom7EventData || [];
|
331 |
-
if (eventData.indexOf(e) < 0) {
|
332 |
-
eventData.unshift(e);
|
333 |
-
}
|
334 |
-
if ($(target).is(targetSelector)) { listener.apply(target, eventData); }
|
335 |
-
else {
|
336 |
-
var parents = $(target).parents(); // eslint-disable-line
|
337 |
-
for (var k = 0; k < parents.length; k += 1) {
|
338 |
-
if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }
|
339 |
-
}
|
340 |
-
}
|
341 |
-
}
|
342 |
-
function handleEvent(e) {
|
343 |
-
var eventData = e && e.target ? e.target.dom7EventData || [] : [];
|
344 |
-
if (eventData.indexOf(e) < 0) {
|
345 |
-
eventData.unshift(e);
|
346 |
-
}
|
347 |
-
listener.apply(this, eventData);
|
348 |
-
}
|
349 |
-
var events = eventType.split(' ');
|
350 |
-
var j;
|
351 |
-
for (var i = 0; i < this.length; i += 1) {
|
352 |
-
var el = this$1[i];
|
353 |
-
if (!targetSelector) {
|
354 |
-
for (j = 0; j < events.length; j += 1) {
|
355 |
-
var event = events[j];
|
356 |
-
if (!el.dom7Listeners) { el.dom7Listeners = {}; }
|
357 |
-
if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; }
|
358 |
-
el.dom7Listeners[event].push({
|
359 |
-
listener: listener,
|
360 |
-
proxyListener: handleEvent,
|
361 |
-
});
|
362 |
-
el.addEventListener(event, handleEvent, capture);
|
363 |
-
}
|
364 |
-
} else {
|
365 |
-
// Live events
|
366 |
-
for (j = 0; j < events.length; j += 1) {
|
367 |
-
var event$1 = events[j];
|
368 |
-
if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; }
|
369 |
-
if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; }
|
370 |
-
el.dom7LiveListeners[event$1].push({
|
371 |
-
listener: listener,
|
372 |
-
proxyListener: handleLiveEvent,
|
373 |
-
});
|
374 |
-
el.addEventListener(event$1, handleLiveEvent, capture);
|
375 |
-
}
|
376 |
-
}
|
377 |
-
}
|
378 |
-
return this;
|
379 |
-
}
|
380 |
-
function off() {
|
381 |
-
var this$1 = this;
|
382 |
-
var assign;
|
383 |
-
|
384 |
-
var args = [], len = arguments.length;
|
385 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
386 |
-
var eventType = args[0];
|
387 |
-
var targetSelector = args[1];
|
388 |
-
var listener = args[2];
|
389 |
-
var capture = args[3];
|
390 |
-
if (typeof args[1] === 'function') {
|
391 |
-
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
392 |
-
targetSelector = undefined;
|
393 |
-
}
|
394 |
-
if (!capture) { capture = false; }
|
395 |
-
|
396 |
-
var events = eventType.split(' ');
|
397 |
-
for (var i = 0; i < events.length; i += 1) {
|
398 |
-
var event = events[i];
|
399 |
-
for (var j = 0; j < this.length; j += 1) {
|
400 |
-
var el = this$1[j];
|
401 |
-
var handlers = (void 0);
|
402 |
-
if (!targetSelector && el.dom7Listeners) {
|
403 |
-
handlers = el.dom7Listeners[event];
|
404 |
-
} else if (targetSelector && el.dom7LiveListeners) {
|
405 |
-
handlers = el.dom7LiveListeners[event];
|
406 |
-
}
|
407 |
-
if (handlers && handlers.length) {
|
408 |
-
for (var k = handlers.length - 1; k >= 0; k -= 1) {
|
409 |
-
var handler = handlers[k];
|
410 |
-
if (listener && handler.listener === listener) {
|
411 |
-
el.removeEventListener(event, handler.proxyListener, capture);
|
412 |
-
handlers.splice(k, 1);
|
413 |
-
} else if (!listener) {
|
414 |
-
el.removeEventListener(event, handler.proxyListener, capture);
|
415 |
-
handlers.splice(k, 1);
|
416 |
-
}
|
417 |
-
}
|
418 |
-
}
|
419 |
-
}
|
420 |
-
}
|
421 |
-
return this;
|
422 |
-
}
|
423 |
-
function trigger() {
|
424 |
-
var this$1 = this;
|
425 |
-
var args = [], len = arguments.length;
|
426 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
427 |
-
|
428 |
-
var events = args[0].split(' ');
|
429 |
-
var eventData = args[1];
|
430 |
-
for (var i = 0; i < events.length; i += 1) {
|
431 |
-
var event = events[i];
|
432 |
-
for (var j = 0; j < this.length; j += 1) {
|
433 |
-
var el = this$1[j];
|
434 |
-
var evt = (void 0);
|
435 |
-
try {
|
436 |
-
evt = new win.CustomEvent(event, {
|
437 |
-
detail: eventData,
|
438 |
-
bubbles: true,
|
439 |
-
cancelable: true,
|
440 |
-
});
|
441 |
-
} catch (e) {
|
442 |
-
evt = doc.createEvent('Event');
|
443 |
-
evt.initEvent(event, true, true);
|
444 |
-
evt.detail = eventData;
|
445 |
-
}
|
446 |
-
// eslint-disable-next-line
|
447 |
-
el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });
|
448 |
-
el.dispatchEvent(evt);
|
449 |
-
el.dom7EventData = [];
|
450 |
-
delete el.dom7EventData;
|
451 |
-
}
|
452 |
-
}
|
453 |
-
return this;
|
454 |
-
}
|
455 |
-
function transitionEnd(callback) {
|
456 |
-
var events = ['webkitTransitionEnd', 'transitionend'];
|
457 |
-
var dom = this;
|
458 |
-
var i;
|
459 |
-
function fireCallBack(e) {
|
460 |
-
/* jshint validthis:true */
|
461 |
-
if (e.target !== this) { return; }
|
462 |
-
callback.call(this, e);
|
463 |
-
for (i = 0; i < events.length; i += 1) {
|
464 |
-
dom.off(events[i], fireCallBack);
|
465 |
-
}
|
466 |
-
}
|
467 |
-
if (callback) {
|
468 |
-
for (i = 0; i < events.length; i += 1) {
|
469 |
-
dom.on(events[i], fireCallBack);
|
470 |
-
}
|
471 |
-
}
|
472 |
-
return this;
|
473 |
-
}
|
474 |
-
function outerWidth(includeMargins) {
|
475 |
-
if (this.length > 0) {
|
476 |
-
if (includeMargins) {
|
477 |
-
// eslint-disable-next-line
|
478 |
-
var styles = this.styles();
|
479 |
-
return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
|
480 |
-
}
|
481 |
-
return this[0].offsetWidth;
|
482 |
-
}
|
483 |
-
return null;
|
484 |
-
}
|
485 |
-
function outerHeight(includeMargins) {
|
486 |
-
if (this.length > 0) {
|
487 |
-
if (includeMargins) {
|
488 |
-
// eslint-disable-next-line
|
489 |
-
var styles = this.styles();
|
490 |
-
return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
|
491 |
-
}
|
492 |
-
return this[0].offsetHeight;
|
493 |
-
}
|
494 |
-
return null;
|
495 |
-
}
|
496 |
-
function offset() {
|
497 |
-
if (this.length > 0) {
|
498 |
-
var el = this[0];
|
499 |
-
var box = el.getBoundingClientRect();
|
500 |
-
var body = doc.body;
|
501 |
-
var clientTop = el.clientTop || body.clientTop || 0;
|
502 |
-
var clientLeft = el.clientLeft || body.clientLeft || 0;
|
503 |
-
var scrollTop = el === win ? win.scrollY : el.scrollTop;
|
504 |
-
var scrollLeft = el === win ? win.scrollX : el.scrollLeft;
|
505 |
-
return {
|
506 |
-
top: (box.top + scrollTop) - clientTop,
|
507 |
-
left: (box.left + scrollLeft) - clientLeft,
|
508 |
-
};
|
509 |
-
}
|
510 |
-
|
511 |
-
return null;
|
512 |
-
}
|
513 |
-
function styles() {
|
514 |
-
if (this[0]) { return win.getComputedStyle(this[0], null); }
|
515 |
-
return {};
|
516 |
-
}
|
517 |
-
function css(props, value) {
|
518 |
-
var this$1 = this;
|
519 |
-
|
520 |
-
var i;
|
521 |
-
if (arguments.length === 1) {
|
522 |
-
if (typeof props === 'string') {
|
523 |
-
if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); }
|
524 |
-
} else {
|
525 |
-
for (i = 0; i < this.length; i += 1) {
|
526 |
-
// eslint-disable-next-line
|
527 |
-
for (var prop in props) {
|
528 |
-
this$1[i].style[prop] = props[prop];
|
529 |
-
}
|
530 |
-
}
|
531 |
-
return this;
|
532 |
-
}
|
533 |
-
}
|
534 |
-
if (arguments.length === 2 && typeof props === 'string') {
|
535 |
-
for (i = 0; i < this.length; i += 1) {
|
536 |
-
this$1[i].style[props] = value;
|
537 |
-
}
|
538 |
-
return this;
|
539 |
-
}
|
540 |
-
return this;
|
541 |
-
}
|
542 |
-
// Iterate over the collection passing elements to `callback`
|
543 |
-
function each(callback) {
|
544 |
-
var this$1 = this;
|
545 |
-
|
546 |
-
// Don't bother continuing without a callback
|
547 |
-
if (!callback) { return this; }
|
548 |
-
// Iterate over
|
549 |
-
for (var i = 0; i < this.length; i += 1) {
|
550 |
-
// If the callback returns false
|
551 |
-
if (callback.call(this$1[i], i, this$1[i]) === false) {
|
552 |
-
// End the loop early
|
553 |
-
return this$1;
|
554 |
-
}
|
555 |
-
}
|
556 |
-
// Return `this` to allow chained DOM operations
|
557 |
-
return this;
|
558 |
-
}
|
559 |
-
// eslint-disable-next-line
|
560 |
-
function html(html) {
|
561 |
-
var this$1 = this;
|
562 |
-
|
563 |
-
if (typeof html === 'undefined') {
|
564 |
-
return this[0] ? this[0].innerHTML : undefined;
|
565 |
-
}
|
566 |
-
|
567 |
-
for (var i = 0; i < this.length; i += 1) {
|
568 |
-
this$1[i].innerHTML = html;
|
569 |
-
}
|
570 |
-
return this;
|
571 |
-
}
|
572 |
-
// eslint-disable-next-line
|
573 |
-
function text(text) {
|
574 |
-
var this$1 = this;
|
575 |
-
|
576 |
-
if (typeof text === 'undefined') {
|
577 |
-
if (this[0]) {
|
578 |
-
return this[0].textContent.trim();
|
579 |
-
}
|
580 |
-
return null;
|
581 |
-
}
|
582 |
-
|
583 |
-
for (var i = 0; i < this.length; i += 1) {
|
584 |
-
this$1[i].textContent = text;
|
585 |
-
}
|
586 |
-
return this;
|
587 |
-
}
|
588 |
-
function is(selector) {
|
589 |
-
var el = this[0];
|
590 |
-
var compareWith;
|
591 |
-
var i;
|
592 |
-
if (!el || typeof selector === 'undefined') { return false; }
|
593 |
-
if (typeof selector === 'string') {
|
594 |
-
if (el.matches) { return el.matches(selector); }
|
595 |
-
else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }
|
596 |
-
else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }
|
597 |
-
|
598 |
-
compareWith = $(selector);
|
599 |
-
for (i = 0; i < compareWith.length; i += 1) {
|
600 |
-
if (compareWith[i] === el) { return true; }
|
601 |
-
}
|
602 |
-
return false;
|
603 |
-
} else if (selector === doc) { return el === doc; }
|
604 |
-
else if (selector === win) { return el === win; }
|
605 |
-
|
606 |
-
if (selector.nodeType || selector instanceof Dom7) {
|
607 |
-
compareWith = selector.nodeType ? [selector] : selector;
|
608 |
-
for (i = 0; i < compareWith.length; i += 1) {
|
609 |
-
if (compareWith[i] === el) { return true; }
|
610 |
-
}
|
611 |
-
return false;
|
612 |
-
}
|
613 |
-
return false;
|
614 |
-
}
|
615 |
-
function index() {
|
616 |
-
var child = this[0];
|
617 |
-
var i;
|
618 |
-
if (child) {
|
619 |
-
i = 0;
|
620 |
-
// eslint-disable-next-line
|
621 |
-
while ((child = child.previousSibling) !== null) {
|
622 |
-
if (child.nodeType === 1) { i += 1; }
|
623 |
-
}
|
624 |
-
return i;
|
625 |
-
}
|
626 |
-
return undefined;
|
627 |
-
}
|
628 |
-
// eslint-disable-next-line
|
629 |
-
function eq(index) {
|
630 |
-
if (typeof index === 'undefined') { return this; }
|
631 |
-
var length = this.length;
|
632 |
-
var returnIndex;
|
633 |
-
if (index > length - 1) {
|
634 |
-
return new Dom7([]);
|
635 |
-
}
|
636 |
-
if (index < 0) {
|
637 |
-
returnIndex = length + index;
|
638 |
-
if (returnIndex < 0) { return new Dom7([]); }
|
639 |
-
return new Dom7([this[returnIndex]]);
|
640 |
-
}
|
641 |
-
return new Dom7([this[index]]);
|
642 |
-
}
|
643 |
-
function append() {
|
644 |
-
var this$1 = this;
|
645 |
-
var args = [], len = arguments.length;
|
646 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
647 |
-
|
648 |
-
var newChild;
|
649 |
-
|
650 |
-
for (var k = 0; k < args.length; k += 1) {
|
651 |
-
newChild = args[k];
|
652 |
-
for (var i = 0; i < this.length; i += 1) {
|
653 |
-
if (typeof newChild === 'string') {
|
654 |
-
var tempDiv = doc.createElement('div');
|
655 |
-
tempDiv.innerHTML = newChild;
|
656 |
-
while (tempDiv.firstChild) {
|
657 |
-
this$1[i].appendChild(tempDiv.firstChild);
|
658 |
-
}
|
659 |
-
} else if (newChild instanceof Dom7) {
|
660 |
-
for (var j = 0; j < newChild.length; j += 1) {
|
661 |
-
this$1[i].appendChild(newChild[j]);
|
662 |
-
}
|
663 |
-
} else {
|
664 |
-
this$1[i].appendChild(newChild);
|
665 |
-
}
|
666 |
-
}
|
667 |
-
}
|
668 |
-
|
669 |
-
return this;
|
670 |
-
}
|
671 |
-
function prepend(newChild) {
|
672 |
-
var this$1 = this;
|
673 |
-
|
674 |
-
var i;
|
675 |
-
var j;
|
676 |
-
for (i = 0; i < this.length; i += 1) {
|
677 |
-
if (typeof newChild === 'string') {
|
678 |
-
var tempDiv = doc.createElement('div');
|
679 |
-
tempDiv.innerHTML = newChild;
|
680 |
-
for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {
|
681 |
-
this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]);
|
682 |
-
}
|
683 |
-
} else if (newChild instanceof Dom7) {
|
684 |
-
for (j = 0; j < newChild.length; j += 1) {
|
685 |
-
this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]);
|
686 |
-
}
|
687 |
-
} else {
|
688 |
-
this$1[i].insertBefore(newChild, this$1[i].childNodes[0]);
|
689 |
-
}
|
690 |
-
}
|
691 |
-
return this;
|
692 |
-
}
|
693 |
-
function next(selector) {
|
694 |
-
if (this.length > 0) {
|
695 |
-
if (selector) {
|
696 |
-
if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {
|
697 |
-
return new Dom7([this[0].nextElementSibling]);
|
698 |
-
}
|
699 |
-
return new Dom7([]);
|
700 |
-
}
|
701 |
-
|
702 |
-
if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }
|
703 |
-
return new Dom7([]);
|
704 |
-
}
|
705 |
-
return new Dom7([]);
|
706 |
-
}
|
707 |
-
function nextAll(selector) {
|
708 |
-
var nextEls = [];
|
709 |
-
var el = this[0];
|
710 |
-
if (!el) { return new Dom7([]); }
|
711 |
-
while (el.nextElementSibling) {
|
712 |
-
var next = el.nextElementSibling; // eslint-disable-line
|
713 |
-
if (selector) {
|
714 |
-
if ($(next).is(selector)) { nextEls.push(next); }
|
715 |
-
} else { nextEls.push(next); }
|
716 |
-
el = next;
|
717 |
-
}
|
718 |
-
return new Dom7(nextEls);
|
719 |
-
}
|
720 |
-
function prev(selector) {
|
721 |
-
if (this.length > 0) {
|
722 |
-
var el = this[0];
|
723 |
-
if (selector) {
|
724 |
-
if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {
|
725 |
-
return new Dom7([el.previousElementSibling]);
|
726 |
-
}
|
727 |
-
return new Dom7([]);
|
728 |
-
}
|
729 |
-
|
730 |
-
if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }
|
731 |
-
return new Dom7([]);
|
732 |
-
}
|
733 |
-
return new Dom7([]);
|
734 |
-
}
|
735 |
-
function prevAll(selector) {
|
736 |
-
var prevEls = [];
|
737 |
-
var el = this[0];
|
738 |
-
if (!el) { return new Dom7([]); }
|
739 |
-
while (el.previousElementSibling) {
|
740 |
-
var prev = el.previousElementSibling; // eslint-disable-line
|
741 |
-
if (selector) {
|
742 |
-
if ($(prev).is(selector)) { prevEls.push(prev); }
|
743 |
-
} else { prevEls.push(prev); }
|
744 |
-
el = prev;
|
745 |
-
}
|
746 |
-
return new Dom7(prevEls);
|
747 |
-
}
|
748 |
-
function parent(selector) {
|
749 |
-
var this$1 = this;
|
750 |
-
|
751 |
-
var parents = []; // eslint-disable-line
|
752 |
-
for (var i = 0; i < this.length; i += 1) {
|
753 |
-
if (this$1[i].parentNode !== null) {
|
754 |
-
if (selector) {
|
755 |
-
if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); }
|
756 |
-
} else {
|
757 |
-
parents.push(this$1[i].parentNode);
|
758 |
-
}
|
759 |
-
}
|
760 |
-
}
|
761 |
-
return $(unique(parents));
|
762 |
-
}
|
763 |
-
function parents(selector) {
|
764 |
-
var this$1 = this;
|
765 |
-
|
766 |
-
var parents = []; // eslint-disable-line
|
767 |
-
for (var i = 0; i < this.length; i += 1) {
|
768 |
-
var parent = this$1[i].parentNode; // eslint-disable-line
|
769 |
-
while (parent) {
|
770 |
-
if (selector) {
|
771 |
-
if ($(parent).is(selector)) { parents.push(parent); }
|
772 |
-
} else {
|
773 |
-
parents.push(parent);
|
774 |
-
}
|
775 |
-
parent = parent.parentNode;
|
776 |
-
}
|
777 |
-
}
|
778 |
-
return $(unique(parents));
|
779 |
-
}
|
780 |
-
function closest(selector) {
|
781 |
-
var closest = this; // eslint-disable-line
|
782 |
-
if (typeof selector === 'undefined') {
|
783 |
-
return new Dom7([]);
|
784 |
-
}
|
785 |
-
if (!closest.is(selector)) {
|
786 |
-
closest = closest.parents(selector).eq(0);
|
787 |
-
}
|
788 |
-
return closest;
|
789 |
-
}
|
790 |
-
function find(selector) {
|
791 |
-
var this$1 = this;
|
792 |
-
|
793 |
-
var foundElements = [];
|
794 |
-
for (var i = 0; i < this.length; i += 1) {
|
795 |
-
var found = this$1[i].querySelectorAll(selector);
|
796 |
-
for (var j = 0; j < found.length; j += 1) {
|
797 |
-
foundElements.push(found[j]);
|
798 |
-
}
|
799 |
-
}
|
800 |
-
return new Dom7(foundElements);
|
801 |
-
}
|
802 |
-
function children(selector) {
|
803 |
-
var this$1 = this;
|
804 |
-
|
805 |
-
var children = []; // eslint-disable-line
|
806 |
-
for (var i = 0; i < this.length; i += 1) {
|
807 |
-
var childNodes = this$1[i].childNodes;
|
808 |
-
|
809 |
-
for (var j = 0; j < childNodes.length; j += 1) {
|
810 |
-
if (!selector) {
|
811 |
-
if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }
|
812 |
-
} else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {
|
813 |
-
children.push(childNodes[j]);
|
814 |
-
}
|
815 |
-
}
|
816 |
-
}
|
817 |
-
return new Dom7(unique(children));
|
818 |
-
}
|
819 |
-
function remove() {
|
820 |
-
var this$1 = this;
|
821 |
-
|
822 |
-
for (var i = 0; i < this.length; i += 1) {
|
823 |
-
if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); }
|
824 |
-
}
|
825 |
-
return this;
|
826 |
-
}
|
827 |
-
function add() {
|
828 |
-
var args = [], len = arguments.length;
|
829 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
830 |
-
|
831 |
-
var dom = this;
|
832 |
-
var i;
|
833 |
-
var j;
|
834 |
-
for (i = 0; i < args.length; i += 1) {
|
835 |
-
var toAdd = $(args[i]);
|
836 |
-
for (j = 0; j < toAdd.length; j += 1) {
|
837 |
-
dom[dom.length] = toAdd[j];
|
838 |
-
dom.length += 1;
|
839 |
-
}
|
840 |
-
}
|
841 |
-
return dom;
|
842 |
-
}
|
843 |
-
|
844 |
-
var Methods = {
|
845 |
-
addClass: addClass,
|
846 |
-
removeClass: removeClass,
|
847 |
-
hasClass: hasClass,
|
848 |
-
toggleClass: toggleClass,
|
849 |
-
attr: attr,
|
850 |
-
removeAttr: removeAttr,
|
851 |
-
data: data,
|
852 |
-
transform: transform,
|
853 |
-
transition: transition,
|
854 |
-
on: on,
|
855 |
-
off: off,
|
856 |
-
trigger: trigger,
|
857 |
-
transitionEnd: transitionEnd,
|
858 |
-
outerWidth: outerWidth,
|
859 |
-
outerHeight: outerHeight,
|
860 |
-
offset: offset,
|
861 |
-
css: css,
|
862 |
-
each: each,
|
863 |
-
html: html,
|
864 |
-
text: text,
|
865 |
-
is: is,
|
866 |
-
index: index,
|
867 |
-
eq: eq,
|
868 |
-
append: append,
|
869 |
-
prepend: prepend,
|
870 |
-
next: next,
|
871 |
-
nextAll: nextAll,
|
872 |
-
prev: prev,
|
873 |
-
prevAll: prevAll,
|
874 |
-
parent: parent,
|
875 |
-
parents: parents,
|
876 |
-
closest: closest,
|
877 |
-
find: find,
|
878 |
-
children: children,
|
879 |
-
remove: remove,
|
880 |
-
add: add,
|
881 |
-
styles: styles,
|
882 |
-
};
|
883 |
-
|
884 |
-
Object.keys(Methods).forEach(function (methodName) {
|
885 |
-
$.fn[methodName] = Methods[methodName];
|
886 |
-
});
|
887 |
-
|
888 |
-
var Utils = {
|
889 |
-
deleteProps: function deleteProps(obj) {
|
890 |
-
var object = obj;
|
891 |
-
Object.keys(object).forEach(function (key) {
|
892 |
-
try {
|
893 |
-
object[key] = null;
|
894 |
-
} catch (e) {
|
895 |
-
// no getter for object
|
896 |
-
}
|
897 |
-
try {
|
898 |
-
delete object[key];
|
899 |
-
} catch (e) {
|
900 |
-
// something got wrong
|
901 |
-
}
|
902 |
-
});
|
903 |
-
},
|
904 |
-
nextTick: function nextTick(callback, delay) {
|
905 |
-
if ( delay === void 0 ) delay = 0;
|
906 |
-
|
907 |
-
return setTimeout(callback, delay);
|
908 |
-
},
|
909 |
-
now: function now() {
|
910 |
-
return Date.now();
|
911 |
-
},
|
912 |
-
getTranslate: function getTranslate(el, axis) {
|
913 |
-
if ( axis === void 0 ) axis = 'x';
|
914 |
-
|
915 |
-
var matrix;
|
916 |
-
var curTransform;
|
917 |
-
var transformMatrix;
|
918 |
-
|
919 |
-
var curStyle = win.getComputedStyle(el, null);
|
920 |
-
|
921 |
-
if (win.WebKitCSSMatrix) {
|
922 |
-
curTransform = curStyle.transform || curStyle.webkitTransform;
|
923 |
-
if (curTransform.split(',').length > 6) {
|
924 |
-
curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', ');
|
925 |
-
}
|
926 |
-
// Some old versions of Webkit choke when 'none' is passed; pass
|
927 |
-
// empty string instead in this case
|
928 |
-
transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
929 |
-
} else {
|
930 |
-
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
931 |
-
matrix = transformMatrix.toString().split(',');
|
932 |
-
}
|
933 |
-
|
934 |
-
if (axis === 'x') {
|
935 |
-
// Latest Chrome and webkits Fix
|
936 |
-
if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }
|
937 |
-
// Crazy IE10 Matrix
|
938 |
-
else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }
|
939 |
-
// Normal Browsers
|
940 |
-
else { curTransform = parseFloat(matrix[4]); }
|
941 |
-
}
|
942 |
-
if (axis === 'y') {
|
943 |
-
// Latest Chrome and webkits Fix
|
944 |
-
if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }
|
945 |
-
// Crazy IE10 Matrix
|
946 |
-
else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }
|
947 |
-
// Normal Browsers
|
948 |
-
else { curTransform = parseFloat(matrix[5]); }
|
949 |
-
}
|
950 |
-
return curTransform || 0;
|
951 |
-
},
|
952 |
-
parseUrlQuery: function parseUrlQuery(url) {
|
953 |
-
var query = {};
|
954 |
-
var urlToParse = url || win.location.href;
|
955 |
-
var i;
|
956 |
-
var params;
|
957 |
-
var param;
|
958 |
-
var length;
|
959 |
-
if (typeof urlToParse === 'string' && urlToParse.length) {
|
960 |
-
urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
|
961 |
-
params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });
|
962 |
-
length = params.length;
|
963 |
-
|
964 |
-
for (i = 0; i < length; i += 1) {
|
965 |
-
param = params[i].replace(/#\S+/g, '').split('=');
|
966 |
-
query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
|
967 |
-
}
|
968 |
-
}
|
969 |
-
return query;
|
970 |
-
},
|
971 |
-
isObject: function isObject(o) {
|
972 |
-
return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
|
973 |
-
},
|
974 |
-
extend: function extend() {
|
975 |
-
var args = [], len$1 = arguments.length;
|
976 |
-
while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];
|
977 |
-
|
978 |
-
var to = Object(args[0]);
|
979 |
-
for (var i = 1; i < args.length; i += 1) {
|
980 |
-
var nextSource = args[i];
|
981 |
-
if (nextSource !== undefined && nextSource !== null) {
|
982 |
-
var keysArray = Object.keys(Object(nextSource));
|
983 |
-
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
984 |
-
var nextKey = keysArray[nextIndex];
|
985 |
-
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
986 |
-
if (desc !== undefined && desc.enumerable) {
|
987 |
-
if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
988 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
989 |
-
} else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
990 |
-
to[nextKey] = {};
|
991 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
992 |
-
} else {
|
993 |
-
to[nextKey] = nextSource[nextKey];
|
994 |
-
}
|
995 |
-
}
|
996 |
-
}
|
997 |
-
}
|
998 |
-
}
|
999 |
-
return to;
|
1000 |
-
},
|
1001 |
-
};
|
1002 |
-
|
1003 |
-
var Support = (function Support() {
|
1004 |
-
var testDiv = doc.createElement('div');
|
1005 |
-
return {
|
1006 |
-
touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() {
|
1007 |
-
return !!(('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
|
1008 |
-
}()),
|
1009 |
-
|
1010 |
-
pointerEvents: !!(win.navigator.pointerEnabled || win.PointerEvent),
|
1011 |
-
prefixedPointerEvents: !!win.navigator.msPointerEnabled,
|
1012 |
-
|
1013 |
-
transition: (function checkTransition() {
|
1014 |
-
var style = testDiv.style;
|
1015 |
-
return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
|
1016 |
-
}()),
|
1017 |
-
transforms3d: (win.Modernizr && win.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
|
1018 |
-
var style = testDiv.style;
|
1019 |
-
return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
|
1020 |
-
}()),
|
1021 |
-
|
1022 |
-
flexbox: (function checkFlexbox() {
|
1023 |
-
var style = testDiv.style;
|
1024 |
-
var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
1025 |
-
for (var i = 0; i < styles.length; i += 1) {
|
1026 |
-
if (styles[i] in style) { return true; }
|
1027 |
-
}
|
1028 |
-
return false;
|
1029 |
-
}()),
|
1030 |
-
|
1031 |
-
observer: (function checkObserver() {
|
1032 |
-
return ('MutationObserver' in win || 'WebkitMutationObserver' in win);
|
1033 |
-
}()),
|
1034 |
-
|
1035 |
-
passiveListener: (function checkPassiveListener() {
|
1036 |
-
var supportsPassive = false;
|
1037 |
-
try {
|
1038 |
-
var opts = Object.defineProperty({}, 'passive', {
|
1039 |
-
// eslint-disable-next-line
|
1040 |
-
get: function get() {
|
1041 |
-
supportsPassive = true;
|
1042 |
-
},
|
1043 |
-
});
|
1044 |
-
win.addEventListener('testPassiveListener', null, opts);
|
1045 |
-
} catch (e) {
|
1046 |
-
// No support
|
1047 |
-
}
|
1048 |
-
return supportsPassive;
|
1049 |
-
}()),
|
1050 |
-
|
1051 |
-
gestures: (function checkGestures() {
|
1052 |
-
return 'ongesturestart' in win;
|
1053 |
-
}()),
|
1054 |
-
};
|
1055 |
-
}());
|
1056 |
-
|
1057 |
-
var SwiperClass = function SwiperClass(params) {
|
1058 |
-
if ( params === void 0 ) params = {};
|
1059 |
-
|
1060 |
-
var self = this;
|
1061 |
-
self.params = params;
|
1062 |
-
|
1063 |
-
// Events
|
1064 |
-
self.eventsListeners = {};
|
1065 |
-
|
1066 |
-
if (self.params && self.params.on) {
|
1067 |
-
Object.keys(self.params.on).forEach(function (eventName) {
|
1068 |
-
self.on(eventName, self.params.on[eventName]);
|
1069 |
-
});
|
1070 |
-
}
|
1071 |
-
};
|
1072 |
-
|
1073 |
-
var staticAccessors = { components: { configurable: true } };
|
1074 |
-
|
1075 |
-
SwiperClass.prototype.on = function on (events, handler, priority) {
|
1076 |
-
var self = this;
|
1077 |
-
if (typeof handler !== 'function') { return self; }
|
1078 |
-
var method = priority ? 'unshift' : 'push';
|
1079 |
-
events.split(' ').forEach(function (event) {
|
1080 |
-
if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; }
|
1081 |
-
self.eventsListeners[event][method](handler);
|
1082 |
-
});
|
1083 |
-
return self;
|
1084 |
-
};
|
1085 |
-
|
1086 |
-
SwiperClass.prototype.once = function once (events, handler, priority) {
|
1087 |
-
var self = this;
|
1088 |
-
if (typeof handler !== 'function') { return self; }
|
1089 |
-
function onceHandler() {
|
1090 |
-
var args = [], len = arguments.length;
|
1091 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
1092 |
-
|
1093 |
-
handler.apply(self, args);
|
1094 |
-
self.off(events, onceHandler);
|
1095 |
-
}
|
1096 |
-
return self.on(events, onceHandler, priority);
|
1097 |
-
};
|
1098 |
-
|
1099 |
-
SwiperClass.prototype.off = function off (events, handler) {
|
1100 |
-
var self = this;
|
1101 |
-
if (!self.eventsListeners) { return self; }
|
1102 |
-
events.split(' ').forEach(function (event) {
|
1103 |
-
if (typeof handler === 'undefined') {
|
1104 |
-
self.eventsListeners[event] = [];
|
1105 |
-
} else {
|
1106 |
-
self.eventsListeners[event].forEach(function (eventHandler, index) {
|
1107 |
-
if (eventHandler === handler) {
|
1108 |
-
self.eventsListeners[event].splice(index, 1);
|
1109 |
-
}
|
1110 |
-
});
|
1111 |
-
}
|
1112 |
-
});
|
1113 |
-
return self;
|
1114 |
-
};
|
1115 |
-
|
1116 |
-
SwiperClass.prototype.emit = function emit () {
|
1117 |
-
var args = [], len = arguments.length;
|
1118 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
1119 |
-
|
1120 |
-
var self = this;
|
1121 |
-
if (!self.eventsListeners) { return self; }
|
1122 |
-
var events;
|
1123 |
-
var data;
|
1124 |
-
var context;
|
1125 |
-
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
1126 |
-
events = args[0];
|
1127 |
-
data = args.slice(1, args.length);
|
1128 |
-
context = self;
|
1129 |
-
} else {
|
1130 |
-
events = args[0].events;
|
1131 |
-
data = args[0].data;
|
1132 |
-
context = args[0].context || self;
|
1133 |
-
}
|
1134 |
-
var eventsArray = Array.isArray(events) ? events : events.split(' ');
|
1135 |
-
eventsArray.forEach(function (event) {
|
1136 |
-
if (self.eventsListeners && self.eventsListeners[event]) {
|
1137 |
-
var handlers = [];
|
1138 |
-
self.eventsListeners[event].forEach(function (eventHandler) {
|
1139 |
-
handlers.push(eventHandler);
|
1140 |
-
});
|
1141 |
-
handlers.forEach(function (eventHandler) {
|
1142 |
-
eventHandler.apply(context, data);
|
1143 |
-
});
|
1144 |
-
}
|
1145 |
-
});
|
1146 |
-
return self;
|
1147 |
-
};
|
1148 |
-
|
1149 |
-
SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) {
|
1150 |
-
var instance = this;
|
1151 |
-
if (!instance.modules) { return; }
|
1152 |
-
Object.keys(instance.modules).forEach(function (moduleName) {
|
1153 |
-
var module = instance.modules[moduleName];
|
1154 |
-
// Extend params
|
1155 |
-
if (module.params) {
|
1156 |
-
Utils.extend(instanceParams, module.params);
|
1157 |
-
}
|
1158 |
-
});
|
1159 |
-
};
|
1160 |
-
|
1161 |
-
SwiperClass.prototype.useModules = function useModules (modulesParams) {
|
1162 |
-
if ( modulesParams === void 0 ) modulesParams = {};
|
1163 |
-
|
1164 |
-
var instance = this;
|
1165 |
-
if (!instance.modules) { return; }
|
1166 |
-
Object.keys(instance.modules).forEach(function (moduleName) {
|
1167 |
-
var module = instance.modules[moduleName];
|
1168 |
-
var moduleParams = modulesParams[moduleName] || {};
|
1169 |
-
// Extend instance methods and props
|
1170 |
-
if (module.instance) {
|
1171 |
-
Object.keys(module.instance).forEach(function (modulePropName) {
|
1172 |
-
var moduleProp = module.instance[modulePropName];
|
1173 |
-
if (typeof moduleProp === 'function') {
|
1174 |
-
instance[modulePropName] = moduleProp.bind(instance);
|
1175 |
-
} else {
|
1176 |
-
instance[modulePropName] = moduleProp;
|
1177 |
-
}
|
1178 |
-
});
|
1179 |
-
}
|
1180 |
-
// Add event listeners
|
1181 |
-
if (module.on && instance.on) {
|
1182 |
-
Object.keys(module.on).forEach(function (moduleEventName) {
|
1183 |
-
instance.on(moduleEventName, module.on[moduleEventName]);
|
1184 |
-
});
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
// Module create callback
|
1188 |
-
if (module.create) {
|
1189 |
-
module.create.bind(instance)(moduleParams);
|
1190 |
-
}
|
1191 |
-
});
|
1192 |
-
};
|
1193 |
-
|
1194 |
-
staticAccessors.components.set = function (components) {
|
1195 |
-
var Class = this;
|
1196 |
-
if (!Class.use) { return; }
|
1197 |
-
Class.use(components);
|
1198 |
-
};
|
1199 |
-
|
1200 |
-
SwiperClass.installModule = function installModule (module) {
|
1201 |
-
var params = [], len = arguments.length - 1;
|
1202 |
-
while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
|
1203 |
-
|
1204 |
-
var Class = this;
|
1205 |
-
if (!Class.prototype.modules) { Class.prototype.modules = {}; }
|
1206 |
-
var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now())));
|
1207 |
-
Class.prototype.modules[name] = module;
|
1208 |
-
// Prototype
|
1209 |
-
if (module.proto) {
|
1210 |
-
Object.keys(module.proto).forEach(function (key) {
|
1211 |
-
Class.prototype[key] = module.proto[key];
|
1212 |
-
});
|
1213 |
-
}
|
1214 |
-
// Class
|
1215 |
-
if (module.static) {
|
1216 |
-
Object.keys(module.static).forEach(function (key) {
|
1217 |
-
Class[key] = module.static[key];
|
1218 |
-
});
|
1219 |
-
}
|
1220 |
-
// Callback
|
1221 |
-
if (module.install) {
|
1222 |
-
module.install.apply(Class, params);
|
1223 |
-
}
|
1224 |
-
return Class;
|
1225 |
-
};
|
1226 |
-
|
1227 |
-
SwiperClass.use = function use (module) {
|
1228 |
-
var params = [], len = arguments.length - 1;
|
1229 |
-
while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
|
1230 |
-
|
1231 |
-
var Class = this;
|
1232 |
-
if (Array.isArray(module)) {
|
1233 |
-
module.forEach(function (m) { return Class.installModule(m); });
|
1234 |
-
return Class;
|
1235 |
-
}
|
1236 |
-
return Class.installModule.apply(Class, [ module ].concat( params ));
|
1237 |
-
};
|
1238 |
-
|
1239 |
-
Object.defineProperties( SwiperClass, staticAccessors );
|
1240 |
-
|
1241 |
-
function updateSize () {
|
1242 |
-
var swiper = this;
|
1243 |
-
var width;
|
1244 |
-
var height;
|
1245 |
-
var $el = swiper.$el;
|
1246 |
-
if (typeof swiper.params.width !== 'undefined') {
|
1247 |
-
width = swiper.params.width;
|
1248 |
-
} else {
|
1249 |
-
width = $el[0].clientWidth;
|
1250 |
-
}
|
1251 |
-
if (typeof swiper.params.height !== 'undefined') {
|
1252 |
-
height = swiper.params.height;
|
1253 |
-
} else {
|
1254 |
-
height = $el[0].clientHeight;
|
1255 |
-
}
|
1256 |
-
if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
|
1257 |
-
return;
|
1258 |
-
}
|
1259 |
-
|
1260 |
-
// Subtract paddings
|
1261 |
-
width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
|
1262 |
-
height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
|
1263 |
-
|
1264 |
-
Utils.extend(swiper, {
|
1265 |
-
width: width,
|
1266 |
-
height: height,
|
1267 |
-
size: swiper.isHorizontal() ? width : height,
|
1268 |
-
});
|
1269 |
-
}
|
1270 |
-
|
1271 |
-
function updateSlides () {
|
1272 |
-
var swiper = this;
|
1273 |
-
var params = swiper.params;
|
1274 |
-
|
1275 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1276 |
-
var swiperSize = swiper.size;
|
1277 |
-
var rtl = swiper.rtlTranslate;
|
1278 |
-
var wrongRTL = swiper.wrongRTL;
|
1279 |
-
var isVirtual = swiper.virtual && params.virtual.enabled;
|
1280 |
-
var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
|
1281 |
-
var slides = $wrapperEl.children(("." + (swiper.params.slideClass)));
|
1282 |
-
var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
|
1283 |
-
var snapGrid = [];
|
1284 |
-
var slidesGrid = [];
|
1285 |
-
var slidesSizesGrid = [];
|
1286 |
-
|
1287 |
-
var offsetBefore = params.slidesOffsetBefore;
|
1288 |
-
if (typeof offsetBefore === 'function') {
|
1289 |
-
offsetBefore = params.slidesOffsetBefore.call(swiper);
|
1290 |
-
}
|
1291 |
-
|
1292 |
-
var offsetAfter = params.slidesOffsetAfter;
|
1293 |
-
if (typeof offsetAfter === 'function') {
|
1294 |
-
offsetAfter = params.slidesOffsetAfter.call(swiper);
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
var previousSnapGridLength = swiper.snapGrid.length;
|
1298 |
-
var previousSlidesGridLength = swiper.snapGrid.length;
|
1299 |
-
|
1300 |
-
var spaceBetween = params.spaceBetween;
|
1301 |
-
var slidePosition = -offsetBefore;
|
1302 |
-
var prevSlideSize = 0;
|
1303 |
-
var index = 0;
|
1304 |
-
if (typeof swiperSize === 'undefined') {
|
1305 |
-
return;
|
1306 |
-
}
|
1307 |
-
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
1308 |
-
spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
swiper.virtualSize = -spaceBetween;
|
1312 |
-
|
1313 |
-
// reset margins
|
1314 |
-
if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); }
|
1315 |
-
else { slides.css({ marginRight: '', marginBottom: '' }); }
|
1316 |
-
|
1317 |
-
var slidesNumberEvenToRows;
|
1318 |
-
if (params.slidesPerColumn > 1) {
|
1319 |
-
if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
|
1320 |
-
slidesNumberEvenToRows = slidesLength;
|
1321 |
-
} else {
|
1322 |
-
slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
|
1323 |
-
}
|
1324 |
-
if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
|
1325 |
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
|
1326 |
-
}
|
1327 |
-
}
|
1328 |
-
|
1329 |
-
// Calc slides
|
1330 |
-
var slideSize;
|
1331 |
-
var slidesPerColumn = params.slidesPerColumn;
|
1332 |
-
var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
1333 |
-
var numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength);
|
1334 |
-
for (var i = 0; i < slidesLength; i += 1) {
|
1335 |
-
slideSize = 0;
|
1336 |
-
var slide = slides.eq(i);
|
1337 |
-
if (params.slidesPerColumn > 1) {
|
1338 |
-
// Set slides order
|
1339 |
-
var newSlideOrderIndex = (void 0);
|
1340 |
-
var column = (void 0);
|
1341 |
-
var row = (void 0);
|
1342 |
-
if (params.slidesPerColumnFill === 'column') {
|
1343 |
-
column = Math.floor(i / slidesPerColumn);
|
1344 |
-
row = i - (column * slidesPerColumn);
|
1345 |
-
if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
|
1346 |
-
row += 1;
|
1347 |
-
if (row >= slidesPerColumn) {
|
1348 |
-
row = 0;
|
1349 |
-
column += 1;
|
1350 |
-
}
|
1351 |
-
}
|
1352 |
-
newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
|
1353 |
-
slide
|
1354 |
-
.css({
|
1355 |
-
'-webkit-box-ordinal-group': newSlideOrderIndex,
|
1356 |
-
'-moz-box-ordinal-group': newSlideOrderIndex,
|
1357 |
-
'-ms-flex-order': newSlideOrderIndex,
|
1358 |
-
'-webkit-order': newSlideOrderIndex,
|
1359 |
-
order: newSlideOrderIndex,
|
1360 |
-
});
|
1361 |
-
} else {
|
1362 |
-
row = Math.floor(i / slidesPerRow);
|
1363 |
-
column = i - (row * slidesPerRow);
|
1364 |
-
}
|
1365 |
-
slide
|
1366 |
-
.css(
|
1367 |
-
("margin-" + (swiper.isHorizontal() ? 'top' : 'left')),
|
1368 |
-
(row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px"))
|
1369 |
-
)
|
1370 |
-
.attr('data-swiper-column', column)
|
1371 |
-
.attr('data-swiper-row', row);
|
1372 |
-
}
|
1373 |
-
if (slide.css('display') === 'none') { continue; } // eslint-disable-line
|
1374 |
-
|
1375 |
-
if (params.slidesPerView === 'auto') {
|
1376 |
-
var slideStyles = win.getComputedStyle(slide[0], null);
|
1377 |
-
var currentTransform = slide[0].style.transform;
|
1378 |
-
var currentWebKitTransform = slide[0].style.webkitTransform;
|
1379 |
-
if (currentTransform) {
|
1380 |
-
slide[0].style.transform = 'none';
|
1381 |
-
}
|
1382 |
-
if (currentWebKitTransform) {
|
1383 |
-
slide[0].style.webkitTransform = 'none';
|
1384 |
-
}
|
1385 |
-
if (swiper.isHorizontal()) {
|
1386 |
-
slideSize = slide[0].getBoundingClientRect().width
|
1387 |
-
+ parseFloat(slideStyles.getPropertyValue('margin-left'))
|
1388 |
-
+ parseFloat(slideStyles.getPropertyValue('margin-right'));
|
1389 |
-
} else {
|
1390 |
-
slideSize = slide[0].getBoundingClientRect().height
|
1391 |
-
+ parseFloat(slideStyles.getPropertyValue('margin-top'))
|
1392 |
-
+ parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
1393 |
-
}
|
1394 |
-
if (currentTransform) {
|
1395 |
-
slide[0].style.transform = currentTransform;
|
1396 |
-
}
|
1397 |
-
if (currentWebKitTransform) {
|
1398 |
-
slide[0].style.webkitTransform = currentWebKitTransform;
|
1399 |
-
}
|
1400 |
-
if (params.roundLengths) { slideSize = Math.floor(slideSize); }
|
1401 |
-
} else {
|
1402 |
-
slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
|
1403 |
-
if (params.roundLengths) { slideSize = Math.floor(slideSize); }
|
1404 |
-
|
1405 |
-
if (slides[i]) {
|
1406 |
-
if (swiper.isHorizontal()) {
|
1407 |
-
slides[i].style.width = slideSize + "px";
|
1408 |
-
} else {
|
1409 |
-
slides[i].style.height = slideSize + "px";
|
1410 |
-
}
|
1411 |
-
}
|
1412 |
-
}
|
1413 |
-
if (slides[i]) {
|
1414 |
-
slides[i].swiperSlideSize = slideSize;
|
1415 |
-
}
|
1416 |
-
slidesSizesGrid.push(slideSize);
|
1417 |
-
|
1418 |
-
|
1419 |
-
if (params.centeredSlides) {
|
1420 |
-
slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
|
1421 |
-
if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
|
1422 |
-
if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
|
1423 |
-
if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; }
|
1424 |
-
if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
|
1425 |
-
if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
|
1426 |
-
slidesGrid.push(slidePosition);
|
1427 |
-
} else {
|
1428 |
-
if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
|
1429 |
-
if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
|
1430 |
-
slidesGrid.push(slidePosition);
|
1431 |
-
slidePosition = slidePosition + slideSize + spaceBetween;
|
1432 |
-
}
|
1433 |
-
|
1434 |
-
swiper.virtualSize += slideSize + spaceBetween;
|
1435 |
-
|
1436 |
-
prevSlideSize = slideSize;
|
1437 |
-
|
1438 |
-
index += 1;
|
1439 |
-
}
|
1440 |
-
swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
|
1441 |
-
var newSlidesGrid;
|
1442 |
-
|
1443 |
-
if (
|
1444 |
-
rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
|
1445 |
-
$wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") });
|
1446 |
-
}
|
1447 |
-
if (!Support.flexbox || params.setWrapperSize) {
|
1448 |
-
if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1449 |
-
else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1450 |
-
}
|
1451 |
-
|
1452 |
-
if (params.slidesPerColumn > 1) {
|
1453 |
-
swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
|
1454 |
-
swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
|
1455 |
-
if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1456 |
-
else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1457 |
-
if (params.centeredSlides) {
|
1458 |
-
newSlidesGrid = [];
|
1459 |
-
for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) {
|
1460 |
-
var slidesGridItem = snapGrid[i$1];
|
1461 |
-
if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); }
|
1462 |
-
if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); }
|
1463 |
-
}
|
1464 |
-
snapGrid = newSlidesGrid;
|
1465 |
-
}
|
1466 |
-
}
|
1467 |
-
|
1468 |
-
// Remove last grid elements depending on width
|
1469 |
-
if (!params.centeredSlides) {
|
1470 |
-
newSlidesGrid = [];
|
1471 |
-
for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) {
|
1472 |
-
var slidesGridItem$1 = snapGrid[i$2];
|
1473 |
-
if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); }
|
1474 |
-
if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) {
|
1475 |
-
newSlidesGrid.push(slidesGridItem$1);
|
1476 |
-
}
|
1477 |
-
}
|
1478 |
-
snapGrid = newSlidesGrid;
|
1479 |
-
if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
|
1480 |
-
snapGrid.push(swiper.virtualSize - swiperSize);
|
1481 |
-
}
|
1482 |
-
}
|
1483 |
-
if (snapGrid.length === 0) { snapGrid = [0]; }
|
1484 |
-
|
1485 |
-
if (params.spaceBetween !== 0) {
|
1486 |
-
if (swiper.isHorizontal()) {
|
1487 |
-
if (rtl) { slides.css({ marginLeft: (spaceBetween + "px") }); }
|
1488 |
-
else { slides.css({ marginRight: (spaceBetween + "px") }); }
|
1489 |
-
} else { slides.css({ marginBottom: (spaceBetween + "px") }); }
|
1490 |
-
}
|
1491 |
-
|
1492 |
-
Utils.extend(swiper, {
|
1493 |
-
slides: slides,
|
1494 |
-
snapGrid: snapGrid,
|
1495 |
-
slidesGrid: slidesGrid,
|
1496 |
-
slidesSizesGrid: slidesSizesGrid,
|
1497 |
-
});
|
1498 |
-
|
1499 |
-
if (slidesLength !== previousSlidesLength) {
|
1500 |
-
swiper.emit('slidesLengthChange');
|
1501 |
-
}
|
1502 |
-
if (snapGrid.length !== previousSnapGridLength) {
|
1503 |
-
if (swiper.params.watchOverflow) { swiper.checkOverflow(); }
|
1504 |
-
swiper.emit('snapGridLengthChange');
|
1505 |
-
}
|
1506 |
-
if (slidesGrid.length !== previousSlidesGridLength) {
|
1507 |
-
swiper.emit('slidesGridLengthChange');
|
1508 |
-
}
|
1509 |
-
|
1510 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) {
|
1511 |
-
swiper.updateSlidesOffset();
|
1512 |
-
}
|
1513 |
-
}
|
1514 |
-
|
1515 |
-
function updateAutoHeight (speed) {
|
1516 |
-
var swiper = this;
|
1517 |
-
var activeSlides = [];
|
1518 |
-
var newHeight = 0;
|
1519 |
-
var i;
|
1520 |
-
if (typeof speed === 'number') {
|
1521 |
-
swiper.setTransition(speed);
|
1522 |
-
} else if (speed === true) {
|
1523 |
-
swiper.setTransition(swiper.params.speed);
|
1524 |
-
}
|
1525 |
-
// Find slides currently in view
|
1526 |
-
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
1527 |
-
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
|
1528 |
-
var index = swiper.activeIndex + i;
|
1529 |
-
if (index > swiper.slides.length) { break; }
|
1530 |
-
activeSlides.push(swiper.slides.eq(index)[0]);
|
1531 |
-
}
|
1532 |
-
} else {
|
1533 |
-
activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
|
1534 |
-
}
|
1535 |
-
|
1536 |
-
// Find new height from highest slide in view
|
1537 |
-
for (i = 0; i < activeSlides.length; i += 1) {
|
1538 |
-
if (typeof activeSlides[i] !== 'undefined') {
|
1539 |
-
var height = activeSlides[i].offsetHeight;
|
1540 |
-
newHeight = height > newHeight ? height : newHeight;
|
1541 |
-
}
|
1542 |
-
}
|
1543 |
-
|
1544 |
-
// Update Height
|
1545 |
-
if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); }
|
1546 |
-
}
|
1547 |
-
|
1548 |
-
function updateSlidesOffset () {
|
1549 |
-
var swiper = this;
|
1550 |
-
var slides = swiper.slides;
|
1551 |
-
for (var i = 0; i < slides.length; i += 1) {
|
1552 |
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
1553 |
-
}
|
1554 |
-
}
|
1555 |
-
|
1556 |
-
function updateSlidesProgress (translate) {
|
1557 |
-
if ( translate === void 0 ) translate = (this && this.translate) || 0;
|
1558 |
-
|
1559 |
-
var swiper = this;
|
1560 |
-
var params = swiper.params;
|
1561 |
-
|
1562 |
-
var slides = swiper.slides;
|
1563 |
-
var rtl = swiper.rtlTranslate;
|
1564 |
-
|
1565 |
-
if (slides.length === 0) { return; }
|
1566 |
-
if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); }
|
1567 |
-
|
1568 |
-
var offsetCenter = -translate;
|
1569 |
-
if (rtl) { offsetCenter = translate; }
|
1570 |
-
|
1571 |
-
// Visible Slides
|
1572 |
-
slides.removeClass(params.slideVisibleClass);
|
1573 |
-
|
1574 |
-
for (var i = 0; i < slides.length; i += 1) {
|
1575 |
-
var slide = slides[i];
|
1576 |
-
var slideProgress = (
|
1577 |
-
(offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
|
1578 |
-
) / (slide.swiperSlideSize + params.spaceBetween);
|
1579 |
-
if (params.watchSlidesVisibility) {
|
1580 |
-
var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
|
1581 |
-
var slideAfter = slideBefore + swiper.slidesSizesGrid[i];
|
1582 |
-
var isVisible = (slideBefore >= 0 && slideBefore < swiper.size)
|
1583 |
-
|| (slideAfter > 0 && slideAfter <= swiper.size)
|
1584 |
-
|| (slideBefore <= 0 && slideAfter >= swiper.size);
|
1585 |
-
if (isVisible) {
|
1586 |
-
slides.eq(i).addClass(params.slideVisibleClass);
|
1587 |
-
}
|
1588 |
-
}
|
1589 |
-
slide.progress = rtl ? -slideProgress : slideProgress;
|
1590 |
-
}
|
1591 |
-
}
|
1592 |
-
|
1593 |
-
function updateProgress (translate) {
|
1594 |
-
if ( translate === void 0 ) translate = (this && this.translate) || 0;
|
1595 |
-
|
1596 |
-
var swiper = this;
|
1597 |
-
var params = swiper.params;
|
1598 |
-
|
1599 |
-
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1600 |
-
var progress = swiper.progress;
|
1601 |
-
var isBeginning = swiper.isBeginning;
|
1602 |
-
var isEnd = swiper.isEnd;
|
1603 |
-
var wasBeginning = isBeginning;
|
1604 |
-
var wasEnd = isEnd;
|
1605 |
-
if (translatesDiff === 0) {
|
1606 |
-
progress = 0;
|
1607 |
-
isBeginning = true;
|
1608 |
-
isEnd = true;
|
1609 |
-
} else {
|
1610 |
-
progress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1611 |
-
isBeginning = progress <= 0;
|
1612 |
-
isEnd = progress >= 1;
|
1613 |
-
}
|
1614 |
-
Utils.extend(swiper, {
|
1615 |
-
progress: progress,
|
1616 |
-
isBeginning: isBeginning,
|
1617 |
-
isEnd: isEnd,
|
1618 |
-
});
|
1619 |
-
|
1620 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); }
|
1621 |
-
|
1622 |
-
if (isBeginning && !wasBeginning) {
|
1623 |
-
swiper.emit('reachBeginning toEdge');
|
1624 |
-
}
|
1625 |
-
if (isEnd && !wasEnd) {
|
1626 |
-
swiper.emit('reachEnd toEdge');
|
1627 |
-
}
|
1628 |
-
if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
|
1629 |
-
swiper.emit('fromEdge');
|
1630 |
-
}
|
1631 |
-
|
1632 |
-
swiper.emit('progress', progress);
|
1633 |
-
}
|
1634 |
-
|
1635 |
-
function updateSlidesClasses () {
|
1636 |
-
var swiper = this;
|
1637 |
-
|
1638 |
-
var slides = swiper.slides;
|
1639 |
-
var params = swiper.params;
|
1640 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1641 |
-
var activeIndex = swiper.activeIndex;
|
1642 |
-
var realIndex = swiper.realIndex;
|
1643 |
-
var isVirtual = swiper.virtual && params.virtual.enabled;
|
1644 |
-
|
1645 |
-
slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass)));
|
1646 |
-
|
1647 |
-
var activeSlide;
|
1648 |
-
if (isVirtual) {
|
1649 |
-
activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]"));
|
1650 |
-
} else {
|
1651 |
-
activeSlide = slides.eq(activeIndex);
|
1652 |
-
}
|
1653 |
-
|
1654 |
-
// Active classes
|
1655 |
-
activeSlide.addClass(params.slideActiveClass);
|
1656 |
-
|
1657 |
-
if (params.loop) {
|
1658 |
-
// Duplicate to all looped slides
|
1659 |
-
if (activeSlide.hasClass(params.slideDuplicateClass)) {
|
1660 |
-
$wrapperEl
|
1661 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]"))
|
1662 |
-
.addClass(params.slideDuplicateActiveClass);
|
1663 |
-
} else {
|
1664 |
-
$wrapperEl
|
1665 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]"))
|
1666 |
-
.addClass(params.slideDuplicateActiveClass);
|
1667 |
-
}
|
1668 |
-
}
|
1669 |
-
// Next Slide
|
1670 |
-
var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass);
|
1671 |
-
if (params.loop && nextSlide.length === 0) {
|
1672 |
-
nextSlide = slides.eq(0);
|
1673 |
-
nextSlide.addClass(params.slideNextClass);
|
1674 |
-
}
|
1675 |
-
// Prev Slide
|
1676 |
-
var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass);
|
1677 |
-
if (params.loop && prevSlide.length === 0) {
|
1678 |
-
prevSlide = slides.eq(-1);
|
1679 |
-
prevSlide.addClass(params.slidePrevClass);
|
1680 |
-
}
|
1681 |
-
if (params.loop) {
|
1682 |
-
// Duplicate to all looped slides
|
1683 |
-
if (nextSlide.hasClass(params.slideDuplicateClass)) {
|
1684 |
-
$wrapperEl
|
1685 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1686 |
-
.addClass(params.slideDuplicateNextClass);
|
1687 |
-
} else {
|
1688 |
-
$wrapperEl
|
1689 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1690 |
-
.addClass(params.slideDuplicateNextClass);
|
1691 |
-
}
|
1692 |
-
if (prevSlide.hasClass(params.slideDuplicateClass)) {
|
1693 |
-
$wrapperEl
|
1694 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1695 |
-
.addClass(params.slideDuplicatePrevClass);
|
1696 |
-
} else {
|
1697 |
-
$wrapperEl
|
1698 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1699 |
-
.addClass(params.slideDuplicatePrevClass);
|
1700 |
-
}
|
1701 |
-
}
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
function updateActiveIndex (newActiveIndex) {
|
1705 |
-
var swiper = this;
|
1706 |
-
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
1707 |
-
var slidesGrid = swiper.slidesGrid;
|
1708 |
-
var snapGrid = swiper.snapGrid;
|
1709 |
-
var params = swiper.params;
|
1710 |
-
var previousIndex = swiper.activeIndex;
|
1711 |
-
var previousRealIndex = swiper.realIndex;
|
1712 |
-
var previousSnapIndex = swiper.snapIndex;
|
1713 |
-
var activeIndex = newActiveIndex;
|
1714 |
-
var snapIndex;
|
1715 |
-
if (typeof activeIndex === 'undefined') {
|
1716 |
-
for (var i = 0; i < slidesGrid.length; i += 1) {
|
1717 |
-
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
1718 |
-
if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
|
1719 |
-
activeIndex = i;
|
1720 |
-
} else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
|
1721 |
-
activeIndex = i + 1;
|
1722 |
-
}
|
1723 |
-
} else if (translate >= slidesGrid[i]) {
|
1724 |
-
activeIndex = i;
|
1725 |
-
}
|
1726 |
-
}
|
1727 |
-
// Normalize slideIndex
|
1728 |
-
if (params.normalizeSlideIndex) {
|
1729 |
-
if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; }
|
1730 |
-
}
|
1731 |
-
}
|
1732 |
-
if (snapGrid.indexOf(translate) >= 0) {
|
1733 |
-
snapIndex = snapGrid.indexOf(translate);
|
1734 |
-
} else {
|
1735 |
-
snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
|
1736 |
-
}
|
1737 |
-
if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
|
1738 |
-
if (activeIndex === previousIndex) {
|
1739 |
-
if (snapIndex !== previousSnapIndex) {
|
1740 |
-
swiper.snapIndex = snapIndex;
|
1741 |
-
swiper.emit('snapIndexChange');
|
1742 |
-
}
|
1743 |
-
return;
|
1744 |
-
}
|
1745 |
-
|
1746 |
-
// Get real index
|
1747 |
-
var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
|
1748 |
-
|
1749 |
-
Utils.extend(swiper, {
|
1750 |
-
snapIndex: snapIndex,
|
1751 |
-
realIndex: realIndex,
|
1752 |
-
previousIndex: previousIndex,
|
1753 |
-
activeIndex: activeIndex,
|
1754 |
-
});
|
1755 |
-
swiper.emit('activeIndexChange');
|
1756 |
-
swiper.emit('snapIndexChange');
|
1757 |
-
if (previousRealIndex !== realIndex) {
|
1758 |
-
swiper.emit('realIndexChange');
|
1759 |
-
}
|
1760 |
-
swiper.emit('slideChange');
|
1761 |
-
}
|
1762 |
-
|
1763 |
-
function updateClickedSlide (e) {
|
1764 |
-
var swiper = this;
|
1765 |
-
var params = swiper.params;
|
1766 |
-
var slide = $(e.target).closest(("." + (params.slideClass)))[0];
|
1767 |
-
var slideFound = false;
|
1768 |
-
if (slide) {
|
1769 |
-
for (var i = 0; i < swiper.slides.length; i += 1) {
|
1770 |
-
if (swiper.slides[i] === slide) { slideFound = true; }
|
1771 |
-
}
|
1772 |
-
}
|
1773 |
-
|
1774 |
-
if (slide && slideFound) {
|
1775 |
-
swiper.clickedSlide = slide;
|
1776 |
-
if (swiper.virtual && swiper.params.virtual.enabled) {
|
1777 |
-
swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
|
1778 |
-
} else {
|
1779 |
-
swiper.clickedIndex = $(slide).index();
|
1780 |
-
}
|
1781 |
-
} else {
|
1782 |
-
swiper.clickedSlide = undefined;
|
1783 |
-
swiper.clickedIndex = undefined;
|
1784 |
-
return;
|
1785 |
-
}
|
1786 |
-
if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
|
1787 |
-
swiper.slideToClickedSlide();
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
|
1791 |
-
var update = {
|
1792 |
-
updateSize: updateSize,
|
1793 |
-
updateSlides: updateSlides,
|
1794 |
-
updateAutoHeight: updateAutoHeight,
|
1795 |
-
updateSlidesOffset: updateSlidesOffset,
|
1796 |
-
updateSlidesProgress: updateSlidesProgress,
|
1797 |
-
updateProgress: updateProgress,
|
1798 |
-
updateSlidesClasses: updateSlidesClasses,
|
1799 |
-
updateActiveIndex: updateActiveIndex,
|
1800 |
-
updateClickedSlide: updateClickedSlide,
|
1801 |
-
};
|
1802 |
-
|
1803 |
-
function getTranslate (axis) {
|
1804 |
-
if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y';
|
1805 |
-
|
1806 |
-
var swiper = this;
|
1807 |
-
|
1808 |
-
var params = swiper.params;
|
1809 |
-
var rtl = swiper.rtlTranslate;
|
1810 |
-
var translate = swiper.translate;
|
1811 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1812 |
-
|
1813 |
-
if (params.virtualTranslate) {
|
1814 |
-
return rtl ? -translate : translate;
|
1815 |
-
}
|
1816 |
-
|
1817 |
-
var currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
|
1818 |
-
if (rtl) { currentTranslate = -currentTranslate; }
|
1819 |
-
|
1820 |
-
return currentTranslate || 0;
|
1821 |
-
}
|
1822 |
-
|
1823 |
-
function setTranslate (translate, byController) {
|
1824 |
-
var swiper = this;
|
1825 |
-
var rtl = swiper.rtlTranslate;
|
1826 |
-
var params = swiper.params;
|
1827 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1828 |
-
var progress = swiper.progress;
|
1829 |
-
var x = 0;
|
1830 |
-
var y = 0;
|
1831 |
-
var z = 0;
|
1832 |
-
|
1833 |
-
if (swiper.isHorizontal()) {
|
1834 |
-
x = rtl ? -translate : translate;
|
1835 |
-
} else {
|
1836 |
-
y = translate;
|
1837 |
-
}
|
1838 |
-
|
1839 |
-
if (params.roundLengths) {
|
1840 |
-
x = Math.floor(x);
|
1841 |
-
y = Math.floor(y);
|
1842 |
-
}
|
1843 |
-
|
1844 |
-
if (!params.virtualTranslate) {
|
1845 |
-
if (Support.transforms3d) { $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); }
|
1846 |
-
else { $wrapperEl.transform(("translate(" + x + "px, " + y + "px)")); }
|
1847 |
-
}
|
1848 |
-
swiper.previousTranslate = swiper.translate;
|
1849 |
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
1850 |
-
|
1851 |
-
// Check if we need to update progress
|
1852 |
-
var newProgress;
|
1853 |
-
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1854 |
-
if (translatesDiff === 0) {
|
1855 |
-
newProgress = 0;
|
1856 |
-
} else {
|
1857 |
-
newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1858 |
-
}
|
1859 |
-
if (newProgress !== progress) {
|
1860 |
-
swiper.updateProgress(translate);
|
1861 |
-
}
|
1862 |
-
|
1863 |
-
swiper.emit('setTranslate', swiper.translate, byController);
|
1864 |
-
}
|
1865 |
-
|
1866 |
-
function minTranslate () {
|
1867 |
-
return (-this.snapGrid[0]);
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
function maxTranslate () {
|
1871 |
-
return (-this.snapGrid[this.snapGrid.length - 1]);
|
1872 |
-
}
|
1873 |
-
|
1874 |
-
var translate = {
|
1875 |
-
getTranslate: getTranslate,
|
1876 |
-
setTranslate: setTranslate,
|
1877 |
-
minTranslate: minTranslate,
|
1878 |
-
maxTranslate: maxTranslate,
|
1879 |
-
};
|
1880 |
-
|
1881 |
-
function setTransition (duration, byController) {
|
1882 |
-
var swiper = this;
|
1883 |
-
|
1884 |
-
swiper.$wrapperEl.transition(duration);
|
1885 |
-
|
1886 |
-
swiper.emit('setTransition', duration, byController);
|
1887 |
-
}
|
1888 |
-
|
1889 |
-
function transitionStart (runCallbacks, direction) {
|
1890 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1891 |
-
|
1892 |
-
var swiper = this;
|
1893 |
-
var activeIndex = swiper.activeIndex;
|
1894 |
-
var params = swiper.params;
|
1895 |
-
var previousIndex = swiper.previousIndex;
|
1896 |
-
if (params.autoHeight) {
|
1897 |
-
swiper.updateAutoHeight();
|
1898 |
-
}
|
1899 |
-
|
1900 |
-
var dir = direction;
|
1901 |
-
if (!dir) {
|
1902 |
-
if (activeIndex > previousIndex) { dir = 'next'; }
|
1903 |
-
else if (activeIndex < previousIndex) { dir = 'prev'; }
|
1904 |
-
else { dir = 'reset'; }
|
1905 |
-
}
|
1906 |
-
|
1907 |
-
swiper.emit('transitionStart');
|
1908 |
-
|
1909 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1910 |
-
if (dir === 'reset') {
|
1911 |
-
swiper.emit('slideResetTransitionStart');
|
1912 |
-
return;
|
1913 |
-
}
|
1914 |
-
swiper.emit('slideChangeTransitionStart');
|
1915 |
-
if (dir === 'next') {
|
1916 |
-
swiper.emit('slideNextTransitionStart');
|
1917 |
-
} else {
|
1918 |
-
swiper.emit('slidePrevTransitionStart');
|
1919 |
-
}
|
1920 |
-
}
|
1921 |
-
}
|
1922 |
-
|
1923 |
-
function transitionEnd$1 (runCallbacks, direction) {
|
1924 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1925 |
-
|
1926 |
-
var swiper = this;
|
1927 |
-
var activeIndex = swiper.activeIndex;
|
1928 |
-
var previousIndex = swiper.previousIndex;
|
1929 |
-
swiper.animating = false;
|
1930 |
-
swiper.setTransition(0);
|
1931 |
-
|
1932 |
-
var dir = direction;
|
1933 |
-
if (!dir) {
|
1934 |
-
if (activeIndex > previousIndex) { dir = 'next'; }
|
1935 |
-
else if (activeIndex < previousIndex) { dir = 'prev'; }
|
1936 |
-
else { dir = 'reset'; }
|
1937 |
-
}
|
1938 |
-
|
1939 |
-
swiper.emit('transitionEnd');
|
1940 |
-
|
1941 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1942 |
-
if (dir === 'reset') {
|
1943 |
-
swiper.emit('slideResetTransitionEnd');
|
1944 |
-
return;
|
1945 |
-
}
|
1946 |
-
swiper.emit('slideChangeTransitionEnd');
|
1947 |
-
if (dir === 'next') {
|
1948 |
-
swiper.emit('slideNextTransitionEnd');
|
1949 |
-
} else {
|
1950 |
-
swiper.emit('slidePrevTransitionEnd');
|
1951 |
-
}
|
1952 |
-
}
|
1953 |
-
}
|
1954 |
-
|
1955 |
-
var transition$1 = {
|
1956 |
-
setTransition: setTransition,
|
1957 |
-
transitionStart: transitionStart,
|
1958 |
-
transitionEnd: transitionEnd$1,
|
1959 |
-
};
|
1960 |
-
|
1961 |
-
function slideTo (index, speed, runCallbacks, internal) {
|
1962 |
-
if ( index === void 0 ) index = 0;
|
1963 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
1964 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1965 |
-
|
1966 |
-
var swiper = this;
|
1967 |
-
var slideIndex = index;
|
1968 |
-
if (slideIndex < 0) { slideIndex = 0; }
|
1969 |
-
|
1970 |
-
var params = swiper.params;
|
1971 |
-
var snapGrid = swiper.snapGrid;
|
1972 |
-
var slidesGrid = swiper.slidesGrid;
|
1973 |
-
var previousIndex = swiper.previousIndex;
|
1974 |
-
var activeIndex = swiper.activeIndex;
|
1975 |
-
var rtl = swiper.rtlTranslate;
|
1976 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1977 |
-
return false;
|
1978 |
-
}
|
1979 |
-
|
1980 |
-
var snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
|
1981 |
-
if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
|
1982 |
-
|
1983 |
-
if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
|
1984 |
-
swiper.emit('beforeSlideChangeStart');
|
1985 |
-
}
|
1986 |
-
|
1987 |
-
var translate = -snapGrid[snapIndex];
|
1988 |
-
|
1989 |
-
// Update progress
|
1990 |
-
swiper.updateProgress(translate);
|
1991 |
-
|
1992 |
-
// Normalize slideIndex
|
1993 |
-
if (params.normalizeSlideIndex) {
|
1994 |
-
for (var i = 0; i < slidesGrid.length; i += 1) {
|
1995 |
-
if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
|
1996 |
-
slideIndex = i;
|
1997 |
-
}
|
1998 |
-
}
|
1999 |
-
}
|
2000 |
-
// Directions locks
|
2001 |
-
if (swiper.initialized && slideIndex !== activeIndex) {
|
2002 |
-
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
2003 |
-
return false;
|
2004 |
-
}
|
2005 |
-
if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
|
2006 |
-
if ((activeIndex || 0) !== slideIndex) { return false; }
|
2007 |
-
}
|
2008 |
-
}
|
2009 |
-
|
2010 |
-
var direction;
|
2011 |
-
if (slideIndex > activeIndex) { direction = 'next'; }
|
2012 |
-
else if (slideIndex < activeIndex) { direction = 'prev'; }
|
2013 |
-
else { direction = 'reset'; }
|
2014 |
-
|
2015 |
-
|
2016 |
-
// Update Index
|
2017 |
-
if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
|
2018 |
-
swiper.updateActiveIndex(slideIndex);
|
2019 |
-
// Update Height
|
2020 |
-
if (params.autoHeight) {
|
2021 |
-
swiper.updateAutoHeight();
|
2022 |
-
}
|
2023 |
-
swiper.updateSlidesClasses();
|
2024 |
-
if (params.effect !== 'slide') {
|
2025 |
-
swiper.setTranslate(translate);
|
2026 |
-
}
|
2027 |
-
if (direction !== 'reset') {
|
2028 |
-
swiper.transitionStart(runCallbacks, direction);
|
2029 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2030 |
-
}
|
2031 |
-
return false;
|
2032 |
-
}
|
2033 |
-
|
2034 |
-
if (speed === 0 || !Support.transition) {
|
2035 |
-
swiper.setTransition(0);
|
2036 |
-
swiper.setTranslate(translate);
|
2037 |
-
swiper.updateActiveIndex(slideIndex);
|
2038 |
-
swiper.updateSlidesClasses();
|
2039 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
2040 |
-
swiper.transitionStart(runCallbacks, direction);
|
2041 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2042 |
-
} else {
|
2043 |
-
swiper.setTransition(speed);
|
2044 |
-
swiper.setTranslate(translate);
|
2045 |
-
swiper.updateActiveIndex(slideIndex);
|
2046 |
-
swiper.updateSlidesClasses();
|
2047 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
2048 |
-
swiper.transitionStart(runCallbacks, direction);
|
2049 |
-
if (!swiper.animating) {
|
2050 |
-
swiper.animating = true;
|
2051 |
-
if (!swiper.onSlideToWrapperTransitionEnd) {
|
2052 |
-
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
2053 |
-
if (!swiper || swiper.destroyed) { return; }
|
2054 |
-
if (e.target !== this) { return; }
|
2055 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
2056 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
2057 |
-
swiper.onSlideToWrapperTransitionEnd = null;
|
2058 |
-
delete swiper.onSlideToWrapperTransitionEnd;
|
2059 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2060 |
-
};
|
2061 |
-
}
|
2062 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
2063 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
2064 |
-
}
|
2065 |
-
}
|
2066 |
-
|
2067 |
-
return true;
|
2068 |
-
}
|
2069 |
-
|
2070 |
-
function slideToLoop (index, speed, runCallbacks, internal) {
|
2071 |
-
if ( index === void 0 ) index = 0;
|
2072 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2073 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2074 |
-
|
2075 |
-
var swiper = this;
|
2076 |
-
var newIndex = index;
|
2077 |
-
if (swiper.params.loop) {
|
2078 |
-
newIndex += swiper.loopedSlides;
|
2079 |
-
}
|
2080 |
-
|
2081 |
-
return swiper.slideTo(newIndex, speed, runCallbacks, internal);
|
2082 |
-
}
|
2083 |
-
|
2084 |
-
/* eslint no-unused-vars: "off" */
|
2085 |
-
function slideNext (speed, runCallbacks, internal) {
|
2086 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2087 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2088 |
-
|
2089 |
-
var swiper = this;
|
2090 |
-
var params = swiper.params;
|
2091 |
-
var animating = swiper.animating;
|
2092 |
-
if (params.loop) {
|
2093 |
-
if (animating) { return false; }
|
2094 |
-
swiper.loopFix();
|
2095 |
-
// eslint-disable-next-line
|
2096 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
2097 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
2098 |
-
}
|
2099 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
2100 |
-
}
|
2101 |
-
|
2102 |
-
/* eslint no-unused-vars: "off" */
|
2103 |
-
function slidePrev (speed, runCallbacks, internal) {
|
2104 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2105 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2106 |
-
|
2107 |
-
var swiper = this;
|
2108 |
-
var params = swiper.params;
|
2109 |
-
var animating = swiper.animating;
|
2110 |
-
var snapGrid = swiper.snapGrid;
|
2111 |
-
var slidesGrid = swiper.slidesGrid;
|
2112 |
-
var rtlTranslate = swiper.rtlTranslate;
|
2113 |
-
|
2114 |
-
if (params.loop) {
|
2115 |
-
if (animating) { return false; }
|
2116 |
-
swiper.loopFix();
|
2117 |
-
// eslint-disable-next-line
|
2118 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
2119 |
-
}
|
2120 |
-
var translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
2121 |
-
function normalize(val) {
|
2122 |
-
if (val < 0) { return -Math.floor(Math.abs(val)); }
|
2123 |
-
return Math.floor(val);
|
2124 |
-
}
|
2125 |
-
var normalizedTranslate = normalize(translate);
|
2126 |
-
var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); });
|
2127 |
-
var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); });
|
2128 |
-
|
2129 |
-
var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
|
2130 |
-
var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
|
2131 |
-
var prevIndex;
|
2132 |
-
if (typeof prevSnap !== 'undefined') {
|
2133 |
-
prevIndex = slidesGrid.indexOf(prevSnap);
|
2134 |
-
if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; }
|
2135 |
-
}
|
2136 |
-
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
2137 |
-
}
|
2138 |
-
|
2139 |
-
/* eslint no-unused-vars: "off" */
|
2140 |
-
function slideReset (speed, runCallbacks, internal) {
|
2141 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2142 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2143 |
-
|
2144 |
-
var swiper = this;
|
2145 |
-
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
2146 |
-
}
|
2147 |
-
|
2148 |
-
/* eslint no-unused-vars: "off" */
|
2149 |
-
function slideToClosest (speed, runCallbacks, internal) {
|
2150 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2151 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2152 |
-
|
2153 |
-
var swiper = this;
|
2154 |
-
var index = swiper.activeIndex;
|
2155 |
-
var snapIndex = Math.floor(index / swiper.params.slidesPerGroup);
|
2156 |
-
|
2157 |
-
if (snapIndex < swiper.snapGrid.length - 1) {
|
2158 |
-
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
2159 |
-
|
2160 |
-
var currentSnap = swiper.snapGrid[snapIndex];
|
2161 |
-
var nextSnap = swiper.snapGrid[snapIndex + 1];
|
2162 |
-
|
2163 |
-
if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
|
2164 |
-
index = swiper.params.slidesPerGroup;
|
2165 |
-
}
|
2166 |
-
}
|
2167 |
-
|
2168 |
-
return swiper.slideTo(index, speed, runCallbacks, internal);
|
2169 |
-
}
|
2170 |
-
|
2171 |
-
function slideToClickedSlide () {
|
2172 |
-
var swiper = this;
|
2173 |
-
var params = swiper.params;
|
2174 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2175 |
-
|
2176 |
-
var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
|
2177 |
-
var slideToIndex = swiper.clickedIndex;
|
2178 |
-
var realIndex;
|
2179 |
-
if (params.loop) {
|
2180 |
-
if (swiper.animating) { return; }
|
2181 |
-
realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
2182 |
-
if (params.centeredSlides) {
|
2183 |
-
if (
|
2184 |
-
(slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
|
2185 |
-
|| (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
|
2186 |
-
) {
|
2187 |
-
swiper.loopFix();
|
2188 |
-
slideToIndex = $wrapperEl
|
2189 |
-
.children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
|
2190 |
-
.eq(0)
|
2191 |
-
.index();
|
2192 |
-
|
2193 |
-
Utils.nextTick(function () {
|
2194 |
-
swiper.slideTo(slideToIndex);
|
2195 |
-
});
|
2196 |
-
} else {
|
2197 |
-
swiper.slideTo(slideToIndex);
|
2198 |
-
}
|
2199 |
-
} else if (slideToIndex > swiper.slides.length - slidesPerView) {
|
2200 |
-
swiper.loopFix();
|
2201 |
-
slideToIndex = $wrapperEl
|
2202 |
-
.children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
|
2203 |
-
.eq(0)
|
2204 |
-
.index();
|
2205 |
-
|
2206 |
-
Utils.nextTick(function () {
|
2207 |
-
swiper.slideTo(slideToIndex);
|
2208 |
-
});
|
2209 |
-
} else {
|
2210 |
-
swiper.slideTo(slideToIndex);
|
2211 |
-
}
|
2212 |
-
} else {
|
2213 |
-
swiper.slideTo(slideToIndex);
|
2214 |
-
}
|
2215 |
-
}
|
2216 |
-
|
2217 |
-
var slide = {
|
2218 |
-
slideTo: slideTo,
|
2219 |
-
slideToLoop: slideToLoop,
|
2220 |
-
slideNext: slideNext,
|
2221 |
-
slidePrev: slidePrev,
|
2222 |
-
slideReset: slideReset,
|
2223 |
-
slideToClosest: slideToClosest,
|
2224 |
-
slideToClickedSlide: slideToClickedSlide,
|
2225 |
-
};
|
2226 |
-
|
2227 |
-
function loopCreate () {
|
2228 |
-
var swiper = this;
|
2229 |
-
var params = swiper.params;
|
2230 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2231 |
-
// Remove duplicated slides
|
2232 |
-
$wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
|
2233 |
-
|
2234 |
-
var slides = $wrapperEl.children(("." + (params.slideClass)));
|
2235 |
-
|
2236 |
-
if (params.loopFillGroupWithBlank) {
|
2237 |
-
var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
|
2238 |
-
if (blankSlidesNum !== params.slidesPerGroup) {
|
2239 |
-
for (var i = 0; i < blankSlidesNum; i += 1) {
|
2240 |
-
var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass)));
|
2241 |
-
$wrapperEl.append(blankNode);
|
2242 |
-
}
|
2243 |
-
slides = $wrapperEl.children(("." + (params.slideClass)));
|
2244 |
-
}
|
2245 |
-
}
|
2246 |
-
|
2247 |
-
if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; }
|
2248 |
-
|
2249 |
-
swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
|
2250 |
-
swiper.loopedSlides += params.loopAdditionalSlides;
|
2251 |
-
if (swiper.loopedSlides > slides.length) {
|
2252 |
-
swiper.loopedSlides = slides.length;
|
2253 |
-
}
|
2254 |
-
|
2255 |
-
var prependSlides = [];
|
2256 |
-
var appendSlides = [];
|
2257 |
-
slides.each(function (index, el) {
|
2258 |
-
var slide = $(el);
|
2259 |
-
if (index < swiper.loopedSlides) { appendSlides.push(el); }
|
2260 |
-
if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); }
|
2261 |
-
slide.attr('data-swiper-slide-index', index);
|
2262 |
-
});
|
2263 |
-
for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) {
|
2264 |
-
$wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass));
|
2265 |
-
}
|
2266 |
-
for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) {
|
2267 |
-
$wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass));
|
2268 |
-
}
|
2269 |
-
}
|
2270 |
-
|
2271 |
-
function loopFix () {
|
2272 |
-
var swiper = this;
|
2273 |
-
var params = swiper.params;
|
2274 |
-
var activeIndex = swiper.activeIndex;
|
2275 |
-
var slides = swiper.slides;
|
2276 |
-
var loopedSlides = swiper.loopedSlides;
|
2277 |
-
var allowSlidePrev = swiper.allowSlidePrev;
|
2278 |
-
var allowSlideNext = swiper.allowSlideNext;
|
2279 |
-
var snapGrid = swiper.snapGrid;
|
2280 |
-
var rtl = swiper.rtlTranslate;
|
2281 |
-
var newIndex;
|
2282 |
-
swiper.allowSlidePrev = true;
|
2283 |
-
swiper.allowSlideNext = true;
|
2284 |
-
|
2285 |
-
var snapTranslate = -snapGrid[activeIndex];
|
2286 |
-
var diff = snapTranslate - swiper.getTranslate();
|
2287 |
-
|
2288 |
-
|
2289 |
-
// Fix For Negative Oversliding
|
2290 |
-
if (activeIndex < loopedSlides) {
|
2291 |
-
newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
|
2292 |
-
newIndex += loopedSlides;
|
2293 |
-
var slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
2294 |
-
if (slideChanged && diff !== 0) {
|
2295 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
2296 |
-
}
|
2297 |
-
} else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
|
2298 |
-
// Fix For Positive Oversliding
|
2299 |
-
newIndex = -slides.length + activeIndex + loopedSlides;
|
2300 |
-
newIndex += loopedSlides;
|
2301 |
-
var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true);
|
2302 |
-
if (slideChanged$1 && diff !== 0) {
|
2303 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
2304 |
-
}
|
2305 |
-
}
|
2306 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
2307 |
-
swiper.allowSlideNext = allowSlideNext;
|
2308 |
-
}
|
2309 |
-
|
2310 |
-
function loopDestroy () {
|
2311 |
-
var swiper = this;
|
2312 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2313 |
-
var params = swiper.params;
|
2314 |
-
var slides = swiper.slides;
|
2315 |
-
$wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
|
2316 |
-
slides.removeAttr('data-swiper-slide-index');
|
2317 |
-
}
|
2318 |
-
|
2319 |
-
var loop = {
|
2320 |
-
loopCreate: loopCreate,
|
2321 |
-
loopFix: loopFix,
|
2322 |
-
loopDestroy: loopDestroy,
|
2323 |
-
};
|
2324 |
-
|
2325 |
-
function setGrabCursor (moving) {
|
2326 |
-
var swiper = this;
|
2327 |
-
if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
|
2328 |
-
var el = swiper.el;
|
2329 |
-
el.style.cursor = 'move';
|
2330 |
-
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
2331 |
-
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
2332 |
-
el.style.cursor = moving ? 'grabbing' : 'grab';
|
2333 |
-
}
|
2334 |
-
|
2335 |
-
function unsetGrabCursor () {
|
2336 |
-
var swiper = this;
|
2337 |
-
if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
|
2338 |
-
swiper.el.style.cursor = '';
|
2339 |
-
}
|
2340 |
-
|
2341 |
-
var grabCursor = {
|
2342 |
-
setGrabCursor: setGrabCursor,
|
2343 |
-
unsetGrabCursor: unsetGrabCursor,
|
2344 |
-
};
|
2345 |
-
|
2346 |
-
function appendSlide (slides) {
|
2347 |
-
var swiper = this;
|
2348 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2349 |
-
var params = swiper.params;
|
2350 |
-
if (params.loop) {
|
2351 |
-
swiper.loopDestroy();
|
2352 |
-
}
|
2353 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2354 |
-
for (var i = 0; i < slides.length; i += 1) {
|
2355 |
-
if (slides[i]) { $wrapperEl.append(slides[i]); }
|
2356 |
-
}
|
2357 |
-
} else {
|
2358 |
-
$wrapperEl.append(slides);
|
2359 |
-
}
|
2360 |
-
if (params.loop) {
|
2361 |
-
swiper.loopCreate();
|
2362 |
-
}
|
2363 |
-
if (!(params.observer && Support.observer)) {
|
2364 |
-
swiper.update();
|
2365 |
-
}
|
2366 |
-
}
|
2367 |
-
|
2368 |
-
function prependSlide (slides) {
|
2369 |
-
var swiper = this;
|
2370 |
-
var params = swiper.params;
|
2371 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2372 |
-
var activeIndex = swiper.activeIndex;
|
2373 |
-
|
2374 |
-
if (params.loop) {
|
2375 |
-
swiper.loopDestroy();
|
2376 |
-
}
|
2377 |
-
var newActiveIndex = activeIndex + 1;
|
2378 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2379 |
-
for (var i = 0; i < slides.length; i += 1) {
|
2380 |
-
if (slides[i]) { $wrapperEl.prepend(slides[i]); }
|
2381 |
-
}
|
2382 |
-
newActiveIndex = activeIndex + slides.length;
|
2383 |
-
} else {
|
2384 |
-
$wrapperEl.prepend(slides);
|
2385 |
-
}
|
2386 |
-
if (params.loop) {
|
2387 |
-
swiper.loopCreate();
|
2388 |
-
}
|
2389 |
-
if (!(params.observer && Support.observer)) {
|
2390 |
-
swiper.update();
|
2391 |
-
}
|
2392 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2393 |
-
}
|
2394 |
-
|
2395 |
-
function addSlide (index, slides) {
|
2396 |
-
var swiper = this;
|
2397 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2398 |
-
var params = swiper.params;
|
2399 |
-
var activeIndex = swiper.activeIndex;
|
2400 |
-
var activeIndexBuffer = activeIndex;
|
2401 |
-
if (params.loop) {
|
2402 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
2403 |
-
swiper.loopDestroy();
|
2404 |
-
swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
|
2405 |
-
}
|
2406 |
-
var baseLength = swiper.slides.length;
|
2407 |
-
if (index <= 0) {
|
2408 |
-
swiper.prependSlide(slides);
|
2409 |
-
return;
|
2410 |
-
}
|
2411 |
-
if (index >= baseLength) {
|
2412 |
-
swiper.appendSlide(slides);
|
2413 |
-
return;
|
2414 |
-
}
|
2415 |
-
var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
|
2416 |
-
|
2417 |
-
var slidesBuffer = [];
|
2418 |
-
for (var i = baseLength - 1; i >= index; i -= 1) {
|
2419 |
-
var currentSlide = swiper.slides.eq(i);
|
2420 |
-
currentSlide.remove();
|
2421 |
-
slidesBuffer.unshift(currentSlide);
|
2422 |
-
}
|
2423 |
-
|
2424 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2425 |
-
for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
|
2426 |
-
if (slides[i$1]) { $wrapperEl.append(slides[i$1]); }
|
2427 |
-
}
|
2428 |
-
newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
|
2429 |
-
} else {
|
2430 |
-
$wrapperEl.append(slides);
|
2431 |
-
}
|
2432 |
-
|
2433 |
-
for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) {
|
2434 |
-
$wrapperEl.append(slidesBuffer[i$2]);
|
2435 |
-
}
|
2436 |
-
|
2437 |
-
if (params.loop) {
|
2438 |
-
swiper.loopCreate();
|
2439 |
-
}
|
2440 |
-
if (!(params.observer && Support.observer)) {
|
2441 |
-
swiper.update();
|
2442 |
-
}
|
2443 |
-
if (params.loop) {
|
2444 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
2445 |
-
} else {
|
2446 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2447 |
-
}
|
2448 |
-
}
|
2449 |
-
|
2450 |
-
function removeSlide (slidesIndexes) {
|
2451 |
-
var swiper = this;
|
2452 |
-
var params = swiper.params;
|
2453 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2454 |
-
var activeIndex = swiper.activeIndex;
|
2455 |
-
|
2456 |
-
var activeIndexBuffer = activeIndex;
|
2457 |
-
if (params.loop) {
|
2458 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
2459 |
-
swiper.loopDestroy();
|
2460 |
-
swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
|
2461 |
-
}
|
2462 |
-
var newActiveIndex = activeIndexBuffer;
|
2463 |
-
var indexToRemove;
|
2464 |
-
|
2465 |
-
if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
|
2466 |
-
for (var i = 0; i < slidesIndexes.length; i += 1) {
|
2467 |
-
indexToRemove = slidesIndexes[i];
|
2468 |
-
if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
|
2469 |
-
if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
|
2470 |
-
}
|
2471 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2472 |
-
} else {
|
2473 |
-
indexToRemove = slidesIndexes;
|
2474 |
-
if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
|
2475 |
-
if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
|
2476 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2477 |
-
}
|
2478 |
-
|
2479 |
-
if (params.loop) {
|
2480 |
-
swiper.loopCreate();
|
2481 |
-
}
|
2482 |
-
|
2483 |
-
if (!(params.observer && Support.observer)) {
|
2484 |
-
swiper.update();
|
2485 |
-
}
|
2486 |
-
if (params.loop) {
|
2487 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
2488 |
-
} else {
|
2489 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2490 |
-
}
|
2491 |
-
}
|
2492 |
-
|
2493 |
-
function removeAllSlides () {
|
2494 |
-
var swiper = this;
|
2495 |
-
|
2496 |
-
var slidesIndexes = [];
|
2497 |
-
for (var i = 0; i < swiper.slides.length; i += 1) {
|
2498 |
-
slidesIndexes.push(i);
|
2499 |
-
}
|
2500 |
-
swiper.removeSlide(slidesIndexes);
|
2501 |
-
}
|
2502 |
-
|
2503 |
-
var manipulation = {
|
2504 |
-
appendSlide: appendSlide,
|
2505 |
-
prependSlide: prependSlide,
|
2506 |
-
addSlide: addSlide,
|
2507 |
-
removeSlide: removeSlide,
|
2508 |
-
removeAllSlides: removeAllSlides,
|
2509 |
-
};
|
2510 |
-
|
2511 |
-
var Device = (function Device() {
|
2512 |
-
var ua = win.navigator.userAgent;
|
2513 |
-
|
2514 |
-
var device = {
|
2515 |
-
ios: false,
|
2516 |
-
android: false,
|
2517 |
-
androidChrome: false,
|
2518 |
-
desktop: false,
|
2519 |
-
windows: false,
|
2520 |
-
iphone: false,
|
2521 |
-
ipod: false,
|
2522 |
-
ipad: false,
|
2523 |
-
cordova: win.cordova || win.phonegap,
|
2524 |
-
phonegap: win.cordova || win.phonegap,
|
2525 |
-
};
|
2526 |
-
|
2527 |
-
var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
2528 |
-
var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
2529 |
-
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
2530 |
-
var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
2531 |
-
var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
2532 |
-
|
2533 |
-
|
2534 |
-
// Windows
|
2535 |
-
if (windows) {
|
2536 |
-
device.os = 'windows';
|
2537 |
-
device.osVersion = windows[2];
|
2538 |
-
device.windows = true;
|
2539 |
-
}
|
2540 |
-
// Android
|
2541 |
-
if (android && !windows) {
|
2542 |
-
device.os = 'android';
|
2543 |
-
device.osVersion = android[2];
|
2544 |
-
device.android = true;
|
2545 |
-
device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
|
2546 |
-
}
|
2547 |
-
if (ipad || iphone || ipod) {
|
2548 |
-
device.os = 'ios';
|
2549 |
-
device.ios = true;
|
2550 |
-
}
|
2551 |
-
// iOS
|
2552 |
-
if (iphone && !ipod) {
|
2553 |
-
device.osVersion = iphone[2].replace(/_/g, '.');
|
2554 |
-
device.iphone = true;
|
2555 |
-
}
|
2556 |
-
if (ipad) {
|
2557 |
-
device.osVersion = ipad[2].replace(/_/g, '.');
|
2558 |
-
device.ipad = true;
|
2559 |
-
}
|
2560 |
-
if (ipod) {
|
2561 |
-
device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
|
2562 |
-
device.iphone = true;
|
2563 |
-
}
|
2564 |
-
// iOS 8+ changed UA
|
2565 |
-
if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
|
2566 |
-
if (device.osVersion.split('.')[0] === '10') {
|
2567 |
-
device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
|
2568 |
-
}
|
2569 |
-
}
|
2570 |
-
|
2571 |
-
// Desktop
|
2572 |
-
device.desktop = !(device.os || device.android || device.webView);
|
2573 |
-
|
2574 |
-
// Webview
|
2575 |
-
device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
|
2576 |
-
|
2577 |
-
// Minimal UI
|
2578 |
-
if (device.os && device.os === 'ios') {
|
2579 |
-
var osVersionArr = device.osVersion.split('.');
|
2580 |
-
var metaViewport = doc.querySelector('meta[name="viewport"]');
|
2581 |
-
device.minimalUi = !device.webView
|
2582 |
-
&& (ipod || iphone)
|
2583 |
-
&& (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7)
|
2584 |
-
&& metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
|
2585 |
-
}
|
2586 |
-
|
2587 |
-
// Pixel Ratio
|
2588 |
-
device.pixelRatio = win.devicePixelRatio || 1;
|
2589 |
-
|
2590 |
-
// Export object
|
2591 |
-
return device;
|
2592 |
-
}());
|
2593 |
-
|
2594 |
-
function onTouchStart (event) {
|
2595 |
-
var swiper = this;
|
2596 |
-
var data = swiper.touchEventsData;
|
2597 |
-
var params = swiper.params;
|
2598 |
-
var touches = swiper.touches;
|
2599 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
2600 |
-
return;
|
2601 |
-
}
|
2602 |
-
var e = event;
|
2603 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2604 |
-
data.isTouchEvent = e.type === 'touchstart';
|
2605 |
-
if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; }
|
2606 |
-
if (data.isTouched && data.isMoved) { return; }
|
2607 |
-
if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) {
|
2608 |
-
swiper.allowClick = true;
|
2609 |
-
return;
|
2610 |
-
}
|
2611 |
-
if (params.swipeHandler) {
|
2612 |
-
if (!$(e).closest(params.swipeHandler)[0]) { return; }
|
2613 |
-
}
|
2614 |
-
|
2615 |
-
touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
2616 |
-
touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
2617 |
-
var startX = touches.currentX;
|
2618 |
-
var startY = touches.currentY;
|
2619 |
-
|
2620 |
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
|
2621 |
-
|
2622 |
-
var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
2623 |
-
var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
2624 |
-
if (
|
2625 |
-
edgeSwipeDetection
|
2626 |
-
&& ((startX <= edgeSwipeThreshold)
|
2627 |
-
|| (startX >= win.screen.width - edgeSwipeThreshold))
|
2628 |
-
) {
|
2629 |
-
return;
|
2630 |
-
}
|
2631 |
-
|
2632 |
-
Utils.extend(data, {
|
2633 |
-
isTouched: true,
|
2634 |
-
isMoved: false,
|
2635 |
-
allowTouchCallbacks: true,
|
2636 |
-
isScrolling: undefined,
|
2637 |
-
startMoving: undefined,
|
2638 |
-
});
|
2639 |
-
|
2640 |
-
touches.startX = startX;
|
2641 |
-
touches.startY = startY;
|
2642 |
-
data.touchStartTime = Utils.now();
|
2643 |
-
swiper.allowClick = true;
|
2644 |
-
swiper.updateSize();
|
2645 |
-
swiper.swipeDirection = undefined;
|
2646 |
-
if (params.threshold > 0) { data.allowThresholdMove = false; }
|
2647 |
-
if (e.type !== 'touchstart') {
|
2648 |
-
var preventDefault = true;
|
2649 |
-
if ($(e.target).is(data.formElements)) { preventDefault = false; }
|
2650 |
-
if (
|
2651 |
-
doc.activeElement
|
2652 |
-
&& $(doc.activeElement).is(data.formElements)
|
2653 |
-
&& doc.activeElement !== e.target
|
2654 |
-
) {
|
2655 |
-
doc.activeElement.blur();
|
2656 |
-
}
|
2657 |
-
if (preventDefault && swiper.allowTouchMove) {
|
2658 |
-
e.preventDefault();
|
2659 |
-
}
|
2660 |
-
}
|
2661 |
-
swiper.emit('touchStart', e);
|
2662 |
-
}
|
2663 |
-
|
2664 |
-
function onTouchMove (event) {
|
2665 |
-
var swiper = this;
|
2666 |
-
var data = swiper.touchEventsData;
|
2667 |
-
var params = swiper.params;
|
2668 |
-
var touches = swiper.touches;
|
2669 |
-
var rtl = swiper.rtlTranslate;
|
2670 |
-
var e = event;
|
2671 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2672 |
-
if (!data.isTouched) {
|
2673 |
-
if (data.startMoving && data.isScrolling) {
|
2674 |
-
swiper.emit('touchMoveOpposite', e);
|
2675 |
-
}
|
2676 |
-
return;
|
2677 |
-
}
|
2678 |
-
if (data.isTouchEvent && e.type === 'mousemove') { return; }
|
2679 |
-
var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
2680 |
-
var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
2681 |
-
if (e.preventedByNestedSwiper) {
|
2682 |
-
touches.startX = pageX;
|
2683 |
-
touches.startY = pageY;
|
2684 |
-
return;
|
2685 |
-
}
|
2686 |
-
if (!swiper.allowTouchMove) {
|
2687 |
-
// isMoved = true;
|
2688 |
-
swiper.allowClick = false;
|
2689 |
-
if (data.isTouched) {
|
2690 |
-
Utils.extend(touches, {
|
2691 |
-
startX: pageX,
|
2692 |
-
startY: pageY,
|
2693 |
-
currentX: pageX,
|
2694 |
-
currentY: pageY,
|
2695 |
-
});
|
2696 |
-
data.touchStartTime = Utils.now();
|
2697 |
-
}
|
2698 |
-
return;
|
2699 |
-
}
|
2700 |
-
if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
|
2701 |
-
if (swiper.isVertical()) {
|
2702 |
-
// Vertical
|
2703 |
-
if (
|
2704 |
-
(pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
|
2705 |
-
|| (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
|
2706 |
-
) {
|
2707 |
-
data.isTouched = false;
|
2708 |
-
data.isMoved = false;
|
2709 |
-
return;
|
2710 |
-
}
|
2711 |
-
} else if (
|
2712 |
-
(pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
|
2713 |
-
|| (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
|
2714 |
-
) {
|
2715 |
-
return;
|
2716 |
-
}
|
2717 |
-
}
|
2718 |
-
if (data.isTouchEvent && doc.activeElement) {
|
2719 |
-
if (e.target === doc.activeElement && $(e.target).is(data.formElements)) {
|
2720 |
-
data.isMoved = true;
|
2721 |
-
swiper.allowClick = false;
|
2722 |
-
return;
|
2723 |
-
}
|
2724 |
-
}
|
2725 |
-
if (data.allowTouchCallbacks) {
|
2726 |
-
swiper.emit('touchMove', e);
|
2727 |
-
}
|
2728 |
-
if (e.targetTouches && e.targetTouches.length > 1) { return; }
|
2729 |
-
|
2730 |
-
touches.currentX = pageX;
|
2731 |
-
touches.currentY = pageY;
|
2732 |
-
|
2733 |
-
var diffX = touches.currentX - touches.startX;
|
2734 |
-
var diffY = touches.currentY - touches.startY;
|
2735 |
-
if (swiper.params.threshold && Math.sqrt((Math.pow( diffX, 2 )) + (Math.pow( diffY, 2 ))) < swiper.params.threshold) { return; }
|
2736 |
-
|
2737 |
-
if (typeof data.isScrolling === 'undefined') {
|
2738 |
-
var touchAngle;
|
2739 |
-
if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
|
2740 |
-
data.isScrolling = false;
|
2741 |
-
} else {
|
2742 |
-
// eslint-disable-next-line
|
2743 |
-
if ((diffX * diffX) + (diffY * diffY) >= 25) {
|
2744 |
-
touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
|
2745 |
-
data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
|
2746 |
-
}
|
2747 |
-
}
|
2748 |
-
}
|
2749 |
-
if (data.isScrolling) {
|
2750 |
-
swiper.emit('touchMoveOpposite', e);
|
2751 |
-
}
|
2752 |
-
if (typeof data.startMoving === 'undefined') {
|
2753 |
-
if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
|
2754 |
-
data.startMoving = true;
|
2755 |
-
}
|
2756 |
-
}
|
2757 |
-
if (data.isScrolling) {
|
2758 |
-
data.isTouched = false;
|
2759 |
-
return;
|
2760 |
-
}
|
2761 |
-
if (!data.startMoving) {
|
2762 |
-
return;
|
2763 |
-
}
|
2764 |
-
swiper.allowClick = false;
|
2765 |
-
e.preventDefault();
|
2766 |
-
if (params.touchMoveStopPropagation && !params.nested) {
|
2767 |
-
e.stopPropagation();
|
2768 |
-
}
|
2769 |
-
|
2770 |
-
if (!data.isMoved) {
|
2771 |
-
if (params.loop) {
|
2772 |
-
swiper.loopFix();
|
2773 |
-
}
|
2774 |
-
data.startTranslate = swiper.getTranslate();
|
2775 |
-
swiper.setTransition(0);
|
2776 |
-
if (swiper.animating) {
|
2777 |
-
swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
|
2778 |
-
}
|
2779 |
-
data.allowMomentumBounce = false;
|
2780 |
-
// Grab Cursor
|
2781 |
-
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2782 |
-
swiper.setGrabCursor(true);
|
2783 |
-
}
|
2784 |
-
swiper.emit('sliderFirstMove', e);
|
2785 |
-
}
|
2786 |
-
swiper.emit('sliderMove', e);
|
2787 |
-
data.isMoved = true;
|
2788 |
-
|
2789 |
-
var diff = swiper.isHorizontal() ? diffX : diffY;
|
2790 |
-
touches.diff = diff;
|
2791 |
-
|
2792 |
-
diff *= params.touchRatio;
|
2793 |
-
if (rtl) { diff = -diff; }
|
2794 |
-
|
2795 |
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
2796 |
-
data.currentTranslate = diff + data.startTranslate;
|
2797 |
-
|
2798 |
-
var disableParentSwiper = true;
|
2799 |
-
var resistanceRatio = params.resistanceRatio;
|
2800 |
-
if (params.touchReleaseOnEdges) {
|
2801 |
-
resistanceRatio = 0;
|
2802 |
-
}
|
2803 |
-
if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
|
2804 |
-
disableParentSwiper = false;
|
2805 |
-
if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); }
|
2806 |
-
} else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
|
2807 |
-
disableParentSwiper = false;
|
2808 |
-
if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); }
|
2809 |
-
}
|
2810 |
-
|
2811 |
-
if (disableParentSwiper) {
|
2812 |
-
e.preventedByNestedSwiper = true;
|
2813 |
-
}
|
2814 |
-
|
2815 |
-
// Directions locks
|
2816 |
-
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
|
2817 |
-
data.currentTranslate = data.startTranslate;
|
2818 |
-
}
|
2819 |
-
if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
|
2820 |
-
data.currentTranslate = data.startTranslate;
|
2821 |
-
}
|
2822 |
-
|
2823 |
-
|
2824 |
-
// Threshold
|
2825 |
-
if (params.threshold > 0) {
|
2826 |
-
if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
|
2827 |
-
if (!data.allowThresholdMove) {
|
2828 |
-
data.allowThresholdMove = true;
|
2829 |
-
touches.startX = touches.currentX;
|
2830 |
-
touches.startY = touches.currentY;
|
2831 |
-
data.currentTranslate = data.startTranslate;
|
2832 |
-
touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
|
2833 |
-
return;
|
2834 |
-
}
|
2835 |
-
} else {
|
2836 |
-
data.currentTranslate = data.startTranslate;
|
2837 |
-
return;
|
2838 |
-
}
|
2839 |
-
}
|
2840 |
-
|
2841 |
-
if (!params.followFinger) { return; }
|
2842 |
-
|
2843 |
-
// Update active index in free mode
|
2844 |
-
if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
|
2845 |
-
swiper.updateActiveIndex();
|
2846 |
-
swiper.updateSlidesClasses();
|
2847 |
-
}
|
2848 |
-
if (params.freeMode) {
|
2849 |
-
// Velocity
|
2850 |
-
if (data.velocities.length === 0) {
|
2851 |
-
data.velocities.push({
|
2852 |
-
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
2853 |
-
time: data.touchStartTime,
|
2854 |
-
});
|
2855 |
-
}
|
2856 |
-
data.velocities.push({
|
2857 |
-
position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
|
2858 |
-
time: Utils.now(),
|
2859 |
-
});
|
2860 |
-
}
|
2861 |
-
// Update progress
|
2862 |
-
swiper.updateProgress(data.currentTranslate);
|
2863 |
-
// Update translate
|
2864 |
-
swiper.setTranslate(data.currentTranslate);
|
2865 |
-
}
|
2866 |
-
|
2867 |
-
function onTouchEnd (event) {
|
2868 |
-
var swiper = this;
|
2869 |
-
var data = swiper.touchEventsData;
|
2870 |
-
|
2871 |
-
var params = swiper.params;
|
2872 |
-
var touches = swiper.touches;
|
2873 |
-
var rtl = swiper.rtlTranslate;
|
2874 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2875 |
-
var slidesGrid = swiper.slidesGrid;
|
2876 |
-
var snapGrid = swiper.snapGrid;
|
2877 |
-
var e = event;
|
2878 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2879 |
-
if (data.allowTouchCallbacks) {
|
2880 |
-
swiper.emit('touchEnd', e);
|
2881 |
-
}
|
2882 |
-
data.allowTouchCallbacks = false;
|
2883 |
-
if (!data.isTouched) {
|
2884 |
-
if (data.isMoved && params.grabCursor) {
|
2885 |
-
swiper.setGrabCursor(false);
|
2886 |
-
}
|
2887 |
-
data.isMoved = false;
|
2888 |
-
data.startMoving = false;
|
2889 |
-
return;
|
2890 |
-
}
|
2891 |
-
// Return Grab Cursor
|
2892 |
-
if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2893 |
-
swiper.setGrabCursor(false);
|
2894 |
-
}
|
2895 |
-
|
2896 |
-
// Time diff
|
2897 |
-
var touchEndTime = Utils.now();
|
2898 |
-
var timeDiff = touchEndTime - data.touchStartTime;
|
2899 |
-
|
2900 |
-
// Tap, doubleTap, Click
|
2901 |
-
if (swiper.allowClick) {
|
2902 |
-
swiper.updateClickedSlide(e);
|
2903 |
-
swiper.emit('tap', e);
|
2904 |
-
if (timeDiff < 300 && (touchEndTime - data.lastClickTime) > 300) {
|
2905 |
-
if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
|
2906 |
-
data.clickTimeout = Utils.nextTick(function () {
|
2907 |
-
if (!swiper || swiper.destroyed) { return; }
|
2908 |
-
swiper.emit('click', e);
|
2909 |
-
}, 300);
|
2910 |
-
}
|
2911 |
-
if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
|
2912 |
-
if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
|
2913 |
-
swiper.emit('doubleTap', e);
|
2914 |
-
}
|
2915 |
-
}
|
2916 |
-
|
2917 |
-
data.lastClickTime = Utils.now();
|
2918 |
-
Utils.nextTick(function () {
|
2919 |
-
if (!swiper.destroyed) { swiper.allowClick = true; }
|
2920 |
-
});
|
2921 |
-
|
2922 |
-
if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
|
2923 |
-
data.isTouched = false;
|
2924 |
-
data.isMoved = false;
|
2925 |
-
data.startMoving = false;
|
2926 |
-
return;
|
2927 |
-
}
|
2928 |
-
data.isTouched = false;
|
2929 |
-
data.isMoved = false;
|
2930 |
-
data.startMoving = false;
|
2931 |
-
|
2932 |
-
var currentPos;
|
2933 |
-
if (params.followFinger) {
|
2934 |
-
currentPos = rtl ? swiper.translate : -swiper.translate;
|
2935 |
-
} else {
|
2936 |
-
currentPos = -data.currentTranslate;
|
2937 |
-
}
|
2938 |
-
|
2939 |
-
if (params.freeMode) {
|
2940 |
-
if (currentPos < -swiper.minTranslate()) {
|
2941 |
-
swiper.slideTo(swiper.activeIndex);
|
2942 |
-
return;
|
2943 |
-
}
|
2944 |
-
if (currentPos > -swiper.maxTranslate()) {
|
2945 |
-
if (swiper.slides.length < snapGrid.length) {
|
2946 |
-
swiper.slideTo(snapGrid.length - 1);
|
2947 |
-
} else {
|
2948 |
-
swiper.slideTo(swiper.slides.length - 1);
|
2949 |
-
}
|
2950 |
-
return;
|
2951 |
-
}
|
2952 |
-
|
2953 |
-
if (params.freeModeMomentum) {
|
2954 |
-
if (data.velocities.length > 1) {
|
2955 |
-
var lastMoveEvent = data.velocities.pop();
|
2956 |
-
var velocityEvent = data.velocities.pop();
|
2957 |
-
|
2958 |
-
var distance = lastMoveEvent.position - velocityEvent.position;
|
2959 |
-
var time = lastMoveEvent.time - velocityEvent.time;
|
2960 |
-
swiper.velocity = distance / time;
|
2961 |
-
swiper.velocity /= 2;
|
2962 |
-
if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
|
2963 |
-
swiper.velocity = 0;
|
2964 |
-
}
|
2965 |
-
// this implies that the user stopped moving a finger then released.
|
2966 |
-
// There would be no events with distance zero, so the last event is stale.
|
2967 |
-
if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
|
2968 |
-
swiper.velocity = 0;
|
2969 |
-
}
|
2970 |
-
} else {
|
2971 |
-
swiper.velocity = 0;
|
2972 |
-
}
|
2973 |
-
swiper.velocity *= params.freeModeMomentumVelocityRatio;
|
2974 |
-
|
2975 |
-
data.velocities.length = 0;
|
2976 |
-
var momentumDuration = 1000 * params.freeModeMomentumRatio;
|
2977 |
-
var momentumDistance = swiper.velocity * momentumDuration;
|
2978 |
-
|
2979 |
-
var newPosition = swiper.translate + momentumDistance;
|
2980 |
-
if (rtl) { newPosition = -newPosition; }
|
2981 |
-
|
2982 |
-
var doBounce = false;
|
2983 |
-
var afterBouncePosition;
|
2984 |
-
var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
|
2985 |
-
var needsLoopFix;
|
2986 |
-
if (newPosition < swiper.maxTranslate()) {
|
2987 |
-
if (params.freeModeMomentumBounce) {
|
2988 |
-
if (newPosition + swiper.maxTranslate() < -bounceAmount) {
|
2989 |
-
newPosition = swiper.maxTranslate() - bounceAmount;
|
2990 |
-
}
|
2991 |
-
afterBouncePosition = swiper.maxTranslate();
|
2992 |
-
doBounce = true;
|
2993 |
-
data.allowMomentumBounce = true;
|
2994 |
-
} else {
|
2995 |
-
newPosition = swiper.maxTranslate();
|
2996 |
-
}
|
2997 |
-
if (params.loop && params.centeredSlides) { needsLoopFix = true; }
|
2998 |
-
} else if (newPosition > swiper.minTranslate()) {
|
2999 |
-
if (params.freeModeMomentumBounce) {
|
3000 |
-
if (newPosition - swiper.minTranslate() > bounceAmount) {
|
3001 |
-
newPosition = swiper.minTranslate() + bounceAmount;
|
3002 |
-
}
|
3003 |
-
afterBouncePosition = swiper.minTranslate();
|
3004 |
-
doBounce = true;
|
3005 |
-
data.allowMomentumBounce = true;
|
3006 |
-
} else {
|
3007 |
-
newPosition = swiper.minTranslate();
|
3008 |
-
}
|
3009 |
-
if (params.loop && params.centeredSlides) { needsLoopFix = true; }
|
3010 |
-
} else if (params.freeModeSticky) {
|
3011 |
-
var nextSlide;
|
3012 |
-
for (var j = 0; j < snapGrid.length; j += 1) {
|
3013 |
-
if (snapGrid[j] > -newPosition) {
|
3014 |
-
nextSlide = j;
|
3015 |
-
break;
|
3016 |
-
}
|
3017 |
-
}
|
3018 |
-
|
3019 |
-
if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
|
3020 |
-
newPosition = snapGrid[nextSlide];
|
3021 |
-
} else {
|
3022 |
-
newPosition = snapGrid[nextSlide - 1];
|
3023 |
-
}
|
3024 |
-
newPosition = -newPosition;
|
3025 |
-
}
|
3026 |
-
if (needsLoopFix) {
|
3027 |
-
swiper.once('transitionEnd', function () {
|
3028 |
-
swiper.loopFix();
|
3029 |
-
});
|
3030 |
-
}
|
3031 |
-
// Fix duration
|
3032 |
-
if (swiper.velocity !== 0) {
|
3033 |
-
if (rtl) {
|
3034 |
-
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
3035 |
-
} else {
|
3036 |
-
momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
|
3037 |
-
}
|
3038 |
-
} else if (params.freeModeSticky) {
|
3039 |
-
swiper.slideToClosest();
|
3040 |
-
return;
|
3041 |
-
}
|
3042 |
-
|
3043 |
-
if (params.freeModeMomentumBounce && doBounce) {
|
3044 |
-
swiper.updateProgress(afterBouncePosition);
|
3045 |
-
swiper.setTransition(momentumDuration);
|
3046 |
-
swiper.setTranslate(newPosition);
|
3047 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
3048 |
-
swiper.animating = true;
|
3049 |
-
$wrapperEl.transitionEnd(function () {
|
3050 |
-
if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; }
|
3051 |
-
swiper.emit('momentumBounce');
|
3052 |
-
|
3053 |
-
swiper.setTransition(params.speed);
|
3054 |
-
swiper.setTranslate(afterBouncePosition);
|
3055 |
-
$wrapperEl.transitionEnd(function () {
|
3056 |
-
if (!swiper || swiper.destroyed) { return; }
|
3057 |
-
swiper.transitionEnd();
|
3058 |
-
});
|
3059 |
-
});
|
3060 |
-
} else if (swiper.velocity) {
|
3061 |
-
swiper.updateProgress(newPosition);
|
3062 |
-
swiper.setTransition(momentumDuration);
|
3063 |
-
swiper.setTranslate(newPosition);
|
3064 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
3065 |
-
if (!swiper.animating) {
|
3066 |
-
swiper.animating = true;
|
3067 |
-
$wrapperEl.transitionEnd(function () {
|
3068 |
-
if (!swiper || swiper.destroyed) { return; }
|
3069 |
-
swiper.transitionEnd();
|
3070 |
-
});
|
3071 |
-
}
|
3072 |
-
} else {
|
3073 |
-
swiper.updateProgress(newPosition);
|
3074 |
-
}
|
3075 |
-
|
3076 |
-
swiper.updateActiveIndex();
|
3077 |
-
swiper.updateSlidesClasses();
|
3078 |
-
} else if (params.freeModeSticky) {
|
3079 |
-
swiper.slideToClosest();
|
3080 |
-
return;
|
3081 |
-
}
|
3082 |
-
|
3083 |
-
if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
|
3084 |
-
swiper.updateProgress();
|
3085 |
-
swiper.updateActiveIndex();
|
3086 |
-
swiper.updateSlidesClasses();
|
3087 |
-
}
|
3088 |
-
return;
|
3089 |
-
}
|
3090 |
-
|
3091 |
-
// Find current slide
|
3092 |
-
var stopIndex = 0;
|
3093 |
-
var groupSize = swiper.slidesSizesGrid[0];
|
3094 |
-
for (var i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
|
3095 |
-
if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
|
3096 |
-
if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
|
3097 |
-
stopIndex = i;
|
3098 |
-
groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
|
3099 |
-
}
|
3100 |
-
} else if (currentPos >= slidesGrid[i]) {
|
3101 |
-
stopIndex = i;
|
3102 |
-
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
3103 |
-
}
|
3104 |
-
}
|
3105 |
-
|
3106 |
-
// Find current slide size
|
3107 |
-
var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
3108 |
-
|
3109 |
-
if (timeDiff > params.longSwipesMs) {
|
3110 |
-
// Long touches
|
3111 |
-
if (!params.longSwipes) {
|
3112 |
-
swiper.slideTo(swiper.activeIndex);
|
3113 |
-
return;
|
3114 |
-
}
|
3115 |
-
if (swiper.swipeDirection === 'next') {
|
3116 |
-
if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
|
3117 |
-
else { swiper.slideTo(stopIndex); }
|
3118 |
-
}
|
3119 |
-
if (swiper.swipeDirection === 'prev') {
|
3120 |
-
if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
|
3121 |
-
else { swiper.slideTo(stopIndex); }
|
3122 |
-
}
|
3123 |
-
} else {
|
3124 |
-
// Short swipes
|
3125 |
-
if (!params.shortSwipes) {
|
3126 |
-
swiper.slideTo(swiper.activeIndex);
|
3127 |
-
return;
|
3128 |
-
}
|
3129 |
-
if (swiper.swipeDirection === 'next') {
|
3130 |
-
swiper.slideTo(stopIndex + params.slidesPerGroup);
|
3131 |
-
}
|
3132 |
-
if (swiper.swipeDirection === 'prev') {
|
3133 |
-
swiper.slideTo(stopIndex);
|
3134 |
-
}
|
3135 |
-
}
|
3136 |
-
}
|
3137 |
-
|
3138 |
-
function onResize () {
|
3139 |
-
var swiper = this;
|
3140 |
-
|
3141 |
-
var params = swiper.params;
|
3142 |
-
var el = swiper.el;
|
3143 |
-
|
3144 |
-
if (el && el.offsetWidth === 0) { return; }
|
3145 |
-
|
3146 |
-
// Breakpoints
|
3147 |
-
if (params.breakpoints) {
|
3148 |
-
swiper.setBreakpoint();
|
3149 |
-
}
|
3150 |
-
|
3151 |
-
// Save locks
|
3152 |
-
var allowSlideNext = swiper.allowSlideNext;
|
3153 |
-
var allowSlidePrev = swiper.allowSlidePrev;
|
3154 |
-
var snapGrid = swiper.snapGrid;
|
3155 |
-
|
3156 |
-
// Disable locks on resize
|
3157 |
-
swiper.allowSlideNext = true;
|
3158 |
-
swiper.allowSlidePrev = true;
|
3159 |
-
|
3160 |
-
swiper.updateSize();
|
3161 |
-
swiper.updateSlides();
|
3162 |
-
|
3163 |
-
if (params.freeMode) {
|
3164 |
-
var newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
|
3165 |
-
swiper.setTranslate(newTranslate);
|
3166 |
-
swiper.updateActiveIndex();
|
3167 |
-
swiper.updateSlidesClasses();
|
3168 |
-
|
3169 |
-
if (params.autoHeight) {
|
3170 |
-
swiper.updateAutoHeight();
|
3171 |
-
}
|
3172 |
-
} else {
|
3173 |
-
swiper.updateSlidesClasses();
|
3174 |
-
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3175 |
-
swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3176 |
-
} else {
|
3177 |
-
swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3178 |
-
}
|
3179 |
-
}
|
3180 |
-
// Return locks after resize
|
3181 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
3182 |
-
swiper.allowSlideNext = allowSlideNext;
|
3183 |
-
|
3184 |
-
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3185 |
-
swiper.checkOverflow();
|
3186 |
-
}
|
3187 |
-
}
|
3188 |
-
|
3189 |
-
function onClick (e) {
|
3190 |
-
var swiper = this;
|
3191 |
-
if (!swiper.allowClick) {
|
3192 |
-
if (swiper.params.preventClicks) { e.preventDefault(); }
|
3193 |
-
if (swiper.params.preventClicksPropagation && swiper.animating) {
|
3194 |
-
e.stopPropagation();
|
3195 |
-
e.stopImmediatePropagation();
|
3196 |
-
}
|
3197 |
-
}
|
3198 |
-
}
|
3199 |
-
|
3200 |
-
function attachEvents() {
|
3201 |
-
var swiper = this;
|
3202 |
-
var params = swiper.params;
|
3203 |
-
var touchEvents = swiper.touchEvents;
|
3204 |
-
var el = swiper.el;
|
3205 |
-
var wrapperEl = swiper.wrapperEl;
|
3206 |
-
|
3207 |
-
{
|
3208 |
-
swiper.onTouchStart = onTouchStart.bind(swiper);
|
3209 |
-
swiper.onTouchMove = onTouchMove.bind(swiper);
|
3210 |
-
swiper.onTouchEnd = onTouchEnd.bind(swiper);
|
3211 |
-
}
|
3212 |
-
|
3213 |
-
swiper.onClick = onClick.bind(swiper);
|
3214 |
-
|
3215 |
-
var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
3216 |
-
var capture = !!params.nested;
|
3217 |
-
|
3218 |
-
// Touch Events
|
3219 |
-
{
|
3220 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3221 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
|
3222 |
-
doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3223 |
-
doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
3224 |
-
} else {
|
3225 |
-
if (Support.touch) {
|
3226 |
-
var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
3227 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
3228 |
-
target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture);
|
3229 |
-
target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
3230 |
-
}
|
3231 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
3232 |
-
target.addEventListener('mousedown', swiper.onTouchStart, false);
|
3233 |
-
doc.addEventListener('mousemove', swiper.onTouchMove, capture);
|
3234 |
-
doc.addEventListener('mouseup', swiper.onTouchEnd, false);
|
3235 |
-
}
|
3236 |
-
}
|
3237 |
-
// Prevent Links Clicks
|
3238 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
3239 |
-
target.addEventListener('click', swiper.onClick, true);
|
3240 |
-
}
|
3241 |
-
}
|
3242 |
-
|
3243 |
-
// Resize handler
|
3244 |
-
swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
|
3245 |
-
}
|
3246 |
-
|
3247 |
-
function detachEvents() {
|
3248 |
-
var swiper = this;
|
3249 |
-
|
3250 |
-
var params = swiper.params;
|
3251 |
-
var touchEvents = swiper.touchEvents;
|
3252 |
-
var el = swiper.el;
|
3253 |
-
var wrapperEl = swiper.wrapperEl;
|
3254 |
-
|
3255 |
-
var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
3256 |
-
var capture = !!params.nested;
|
3257 |
-
|
3258 |
-
// Touch Events
|
3259 |
-
{
|
3260 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3261 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
|
3262 |
-
doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3263 |
-
doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
3264 |
-
} else {
|
3265 |
-
if (Support.touch) {
|
3266 |
-
var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
3267 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
3268 |
-
target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3269 |
-
target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
3270 |
-
}
|
3271 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
3272 |
-
target.removeEventListener('mousedown', swiper.onTouchStart, false);
|
3273 |
-
doc.removeEventListener('mousemove', swiper.onTouchMove, capture);
|
3274 |
-
doc.removeEventListener('mouseup', swiper.onTouchEnd, false);
|
3275 |
-
}
|
3276 |
-
}
|
3277 |
-
// Prevent Links Clicks
|
3278 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
3279 |
-
target.removeEventListener('click', swiper.onClick, true);
|
3280 |
-
}
|
3281 |
-
}
|
3282 |
-
|
3283 |
-
// Resize handler
|
3284 |
-
swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
|
3285 |
-
}
|
3286 |
-
|
3287 |
-
var events = {
|
3288 |
-
attachEvents: attachEvents,
|
3289 |
-
detachEvents: detachEvents,
|
3290 |
-
};
|
3291 |
-
|
3292 |
-
function setBreakpoint () {
|
3293 |
-
var swiper = this;
|
3294 |
-
var activeIndex = swiper.activeIndex;
|
3295 |
-
var initialized = swiper.initialized;
|
3296 |
-
var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0;
|
3297 |
-
var params = swiper.params;
|
3298 |
-
var breakpoints = params.breakpoints;
|
3299 |
-
if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; }
|
3300 |
-
// Set breakpoint for window width and update parameters
|
3301 |
-
var breakpoint = swiper.getBreakpoint(breakpoints);
|
3302 |
-
if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
|
3303 |
-
var breakPointsParams = breakpoint in breakpoints ? breakpoints[breakpoint] : swiper.originalParams;
|
3304 |
-
var needsReLoop = params.loop && (breakPointsParams.slidesPerView !== params.slidesPerView);
|
3305 |
-
|
3306 |
-
Utils.extend(swiper.params, breakPointsParams);
|
3307 |
-
|
3308 |
-
Utils.extend(swiper, {
|
3309 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
3310 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
3311 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
3312 |
-
});
|
3313 |
-
|
3314 |
-
swiper.currentBreakpoint = breakpoint;
|
3315 |
-
|
3316 |
-
if (needsReLoop && initialized) {
|
3317 |
-
swiper.loopDestroy();
|
3318 |
-
swiper.loopCreate();
|
3319 |
-
swiper.updateSlides();
|
3320 |
-
swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
|
3321 |
-
}
|
3322 |
-
swiper.emit('breakpoint', breakPointsParams);
|
3323 |
-
}
|
3324 |
-
}
|
3325 |
-
|
3326 |
-
function getBreakpoint (breakpoints) {
|
3327 |
-
// Get breakpoint for window width
|
3328 |
-
if (!breakpoints) { return undefined; }
|
3329 |
-
var breakpoint = false;
|
3330 |
-
var points = [];
|
3331 |
-
Object.keys(breakpoints).forEach(function (point) {
|
3332 |
-
points.push(point);
|
3333 |
-
});
|
3334 |
-
points.sort(function (a, b) { return parseInt(a, 10) - parseInt(b, 10); });
|
3335 |
-
for (var i = 0; i < points.length; i += 1) {
|
3336 |
-
var point = points[i];
|
3337 |
-
if (point >= win.innerWidth && !breakpoint) {
|
3338 |
-
breakpoint = point;
|
3339 |
-
}
|
3340 |
-
}
|
3341 |
-
return breakpoint || 'max';
|
3342 |
-
}
|
3343 |
-
|
3344 |
-
var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint };
|
3345 |
-
|
3346 |
-
var Browser = (function Browser() {
|
3347 |
-
function isSafari() {
|
3348 |
-
var ua = win.navigator.userAgent.toLowerCase();
|
3349 |
-
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
3350 |
-
}
|
3351 |
-
return {
|
3352 |
-
isIE: !!win.navigator.userAgent.match(/Trident/g) || !!win.navigator.userAgent.match(/MSIE/g),
|
3353 |
-
isSafari: isSafari(),
|
3354 |
-
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent),
|
3355 |
-
};
|
3356 |
-
}());
|
3357 |
-
|
3358 |
-
function addClasses () {
|
3359 |
-
var swiper = this;
|
3360 |
-
var classNames = swiper.classNames;
|
3361 |
-
var params = swiper.params;
|
3362 |
-
var rtl = swiper.rtl;
|
3363 |
-
var $el = swiper.$el;
|
3364 |
-
var suffixes = [];
|
3365 |
-
|
3366 |
-
suffixes.push(params.direction);
|
3367 |
-
|
3368 |
-
if (params.freeMode) {
|
3369 |
-
suffixes.push('free-mode');
|
3370 |
-
}
|
3371 |
-
if (!Support.flexbox) {
|
3372 |
-
suffixes.push('no-flexbox');
|
3373 |
-
}
|
3374 |
-
if (params.autoHeight) {
|
3375 |
-
suffixes.push('autoheight');
|
3376 |
-
}
|
3377 |
-
if (rtl) {
|
3378 |
-
suffixes.push('rtl');
|
3379 |
-
}
|
3380 |
-
if (params.slidesPerColumn > 1) {
|
3381 |
-
suffixes.push('multirow');
|
3382 |
-
}
|
3383 |
-
if (Device.android) {
|
3384 |
-
suffixes.push('android');
|
3385 |
-
}
|
3386 |
-
if (Device.ios) {
|
3387 |
-
suffixes.push('ios');
|
3388 |
-
}
|
3389 |
-
// WP8 Touch Events Fix
|
3390 |
-
if (Browser.isIE && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3391 |
-
suffixes.push(("wp8-" + (params.direction)));
|
3392 |
-
}
|
3393 |
-
|
3394 |
-
suffixes.forEach(function (suffix) {
|
3395 |
-
classNames.push(params.containerModifierClass + suffix);
|
3396 |
-
});
|
3397 |
-
|
3398 |
-
$el.addClass(classNames.join(' '));
|
3399 |
-
}
|
3400 |
-
|
3401 |
-
function removeClasses () {
|
3402 |
-
var swiper = this;
|
3403 |
-
var $el = swiper.$el;
|
3404 |
-
var classNames = swiper.classNames;
|
3405 |
-
|
3406 |
-
$el.removeClass(classNames.join(' '));
|
3407 |
-
}
|
3408 |
-
|
3409 |
-
var classes = { addClasses: addClasses, removeClasses: removeClasses };
|
3410 |
-
|
3411 |
-
function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
|
3412 |
-
var image;
|
3413 |
-
function onReady() {
|
3414 |
-
if (callback) { callback(); }
|
3415 |
-
}
|
3416 |
-
if (!imageEl.complete || !checkForComplete) {
|
3417 |
-
if (src) {
|
3418 |
-
image = new win.Image();
|
3419 |
-
image.onload = onReady;
|
3420 |
-
image.onerror = onReady;
|
3421 |
-
if (sizes) {
|
3422 |
-
image.sizes = sizes;
|
3423 |
-
}
|
3424 |
-
if (srcset) {
|
3425 |
-
image.srcset = srcset;
|
3426 |
-
}
|
3427 |
-
if (src) {
|
3428 |
-
image.src = src;
|
3429 |
-
}
|
3430 |
-
} else {
|
3431 |
-
onReady();
|
3432 |
-
}
|
3433 |
-
} else {
|
3434 |
-
// image already loaded...
|
3435 |
-
onReady();
|
3436 |
-
}
|
3437 |
-
}
|
3438 |
-
|
3439 |
-
function preloadImages () {
|
3440 |
-
var swiper = this;
|
3441 |
-
swiper.imagesToLoad = swiper.$el.find('img');
|
3442 |
-
function onReady() {
|
3443 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; }
|
3444 |
-
if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; }
|
3445 |
-
if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
|
3446 |
-
if (swiper.params.updateOnImagesReady) { swiper.update(); }
|
3447 |
-
swiper.emit('imagesReady');
|
3448 |
-
}
|
3449 |
-
}
|
3450 |
-
for (var i = 0; i < swiper.imagesToLoad.length; i += 1) {
|
3451 |
-
var imageEl = swiper.imagesToLoad[i];
|
3452 |
-
swiper.loadImage(
|
3453 |
-
imageEl,
|
3454 |
-
imageEl.currentSrc || imageEl.getAttribute('src'),
|
3455 |
-
imageEl.srcset || imageEl.getAttribute('srcset'),
|
3456 |
-
imageEl.sizes || imageEl.getAttribute('sizes'),
|
3457 |
-
true,
|
3458 |
-
onReady
|
3459 |
-
);
|
3460 |
-
}
|
3461 |
-
}
|
3462 |
-
|
3463 |
-
var images = {
|
3464 |
-
loadImage: loadImage,
|
3465 |
-
preloadImages: preloadImages,
|
3466 |
-
};
|
3467 |
-
|
3468 |
-
function checkOverflow() {
|
3469 |
-
var swiper = this;
|
3470 |
-
var wasLocked = swiper.isLocked;
|
3471 |
-
|
3472 |
-
swiper.isLocked = swiper.snapGrid.length === 1;
|
3473 |
-
swiper.allowSlideNext = !swiper.isLocked;
|
3474 |
-
swiper.allowSlidePrev = !swiper.isLocked;
|
3475 |
-
|
3476 |
-
// events
|
3477 |
-
if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); }
|
3478 |
-
|
3479 |
-
if (wasLocked && wasLocked !== swiper.isLocked) {
|
3480 |
-
swiper.isEnd = false;
|
3481 |
-
swiper.navigation.update();
|
3482 |
-
}
|
3483 |
-
}
|
3484 |
-
|
3485 |
-
var checkOverflow$1 = { checkOverflow: checkOverflow };
|
3486 |
-
|
3487 |
-
var defaults = {
|
3488 |
-
init: true,
|
3489 |
-
direction: 'horizontal',
|
3490 |
-
touchEventsTarget: 'container',
|
3491 |
-
initialSlide: 0,
|
3492 |
-
speed: 300,
|
3493 |
-
//
|
3494 |
-
preventInteractionOnTransition: false,
|
3495 |
-
|
3496 |
-
// To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
|
3497 |
-
edgeSwipeDetection: false,
|
3498 |
-
edgeSwipeThreshold: 20,
|
3499 |
-
|
3500 |
-
// Free mode
|
3501 |
-
freeMode: false,
|
3502 |
-
freeModeMomentum: true,
|
3503 |
-
freeModeMomentumRatio: 1,
|
3504 |
-
freeModeMomentumBounce: true,
|
3505 |
-
freeModeMomentumBounceRatio: 1,
|
3506 |
-
freeModeMomentumVelocityRatio: 1,
|
3507 |
-
freeModeSticky: false,
|
3508 |
-
freeModeMinimumVelocity: 0.02,
|
3509 |
-
|
3510 |
-
// Autoheight
|
3511 |
-
autoHeight: false,
|
3512 |
-
|
3513 |
-
// Set wrapper width
|
3514 |
-
setWrapperSize: false,
|
3515 |
-
|
3516 |
-
// Virtual Translate
|
3517 |
-
virtualTranslate: false,
|
3518 |
-
|
3519 |
-
// Effects
|
3520 |
-
effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
3521 |
-
|
3522 |
-
// Breakpoints
|
3523 |
-
breakpoints: undefined,
|
3524 |
-
|
3525 |
-
// Slides grid
|
3526 |
-
spaceBetween: 0,
|
3527 |
-
slidesPerView: 1,
|
3528 |
-
slidesPerColumn: 1,
|
3529 |
-
slidesPerColumnFill: 'column',
|
3530 |
-
slidesPerGroup: 1,
|
3531 |
-
centeredSlides: false,
|
3532 |
-
slidesOffsetBefore: 0, // in px
|
3533 |
-
slidesOffsetAfter: 0, // in px
|
3534 |
-
normalizeSlideIndex: true,
|
3535 |
-
|
3536 |
-
// Disable swiper and hide navigation when container not overflow
|
3537 |
-
watchOverflow: false,
|
3538 |
-
|
3539 |
-
// Round length
|
3540 |
-
roundLengths: false,
|
3541 |
-
|
3542 |
-
// Touches
|
3543 |
-
touchRatio: 1,
|
3544 |
-
touchAngle: 45,
|
3545 |
-
simulateTouch: true,
|
3546 |
-
shortSwipes: true,
|
3547 |
-
longSwipes: true,
|
3548 |
-
longSwipesRatio: 0.5,
|
3549 |
-
longSwipesMs: 300,
|
3550 |
-
followFinger: true,
|
3551 |
-
allowTouchMove: true,
|
3552 |
-
threshold: 0,
|
3553 |
-
touchMoveStopPropagation: true,
|
3554 |
-
touchReleaseOnEdges: false,
|
3555 |
-
|
3556 |
-
// Unique Navigation Elements
|
3557 |
-
uniqueNavElements: true,
|
3558 |
-
|
3559 |
-
// Resistance
|
3560 |
-
resistance: true,
|
3561 |
-
resistanceRatio: 0.85,
|
3562 |
-
|
3563 |
-
// Progress
|
3564 |
-
watchSlidesProgress: false,
|
3565 |
-
watchSlidesVisibility: false,
|
3566 |
-
|
3567 |
-
// Cursor
|
3568 |
-
grabCursor: false,
|
3569 |
-
|
3570 |
-
// Clicks
|
3571 |
-
preventClicks: true,
|
3572 |
-
preventClicksPropagation: true,
|
3573 |
-
slideToClickedSlide: false,
|
3574 |
-
|
3575 |
-
// Images
|
3576 |
-
preloadImages: true,
|
3577 |
-
updateOnImagesReady: true,
|
3578 |
-
|
3579 |
-
// loop
|
3580 |
-
loop: false,
|
3581 |
-
loopAdditionalSlides: 0,
|
3582 |
-
loopedSlides: null,
|
3583 |
-
loopFillGroupWithBlank: false,
|
3584 |
-
|
3585 |
-
// Swiping/no swiping
|
3586 |
-
allowSlidePrev: true,
|
3587 |
-
allowSlideNext: true,
|
3588 |
-
swipeHandler: null, // '.swipe-handler',
|
3589 |
-
noSwiping: true,
|
3590 |
-
noSwipingClass: 'swiper-no-swiping',
|
3591 |
-
noSwipingSelector: null,
|
3592 |
-
|
3593 |
-
// Passive Listeners
|
3594 |
-
passiveListeners: true,
|
3595 |
-
|
3596 |
-
// NS
|
3597 |
-
containerModifierClass: 'swiper-container-', // NEW
|
3598 |
-
slideClass: 'swiper-slide',
|
3599 |
-
slideBlankClass: 'swiper-slide-invisible-blank',
|
3600 |
-
slideActiveClass: 'swiper-slide-active',
|
3601 |
-
slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
|
3602 |
-
slideVisibleClass: 'swiper-slide-visible',
|
3603 |
-
slideDuplicateClass: 'swiper-slide-duplicate',
|
3604 |
-
slideNextClass: 'swiper-slide-next',
|
3605 |
-
slideDuplicateNextClass: 'swiper-slide-duplicate-next',
|
3606 |
-
slidePrevClass: 'swiper-slide-prev',
|
3607 |
-
slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
|
3608 |
-
wrapperClass: 'swiper-wrapper',
|
3609 |
-
|
3610 |
-
// Callbacks
|
3611 |
-
runCallbacksOnInit: true,
|
3612 |
-
};
|
3613 |
-
|
3614 |
-
var prototypes = {
|
3615 |
-
update: update,
|
3616 |
-
translate: translate,
|
3617 |
-
transition: transition$1,
|
3618 |
-
slide: slide,
|
3619 |
-
loop: loop,
|
3620 |
-
grabCursor: grabCursor,
|
3621 |
-
manipulation: manipulation,
|
3622 |
-
events: events,
|
3623 |
-
breakpoints: breakpoints,
|
3624 |
-
checkOverflow: checkOverflow$1,
|
3625 |
-
classes: classes,
|
3626 |
-
images: images,
|
3627 |
-
};
|
3628 |
-
|
3629 |
-
var extendedDefaults = {};
|
3630 |
-
|
3631 |
-
var Swiper = (function (SwiperClass$$1) {
|
3632 |
-
function Swiper() {
|
3633 |
-
var assign;
|
3634 |
-
|
3635 |
-
var args = [], len = arguments.length;
|
3636 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
3637 |
-
var el;
|
3638 |
-
var params;
|
3639 |
-
if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
|
3640 |
-
params = args[0];
|
3641 |
-
} else {
|
3642 |
-
(assign = args, el = assign[0], params = assign[1]);
|
3643 |
-
}
|
3644 |
-
if (!params) { params = {}; }
|
3645 |
-
|
3646 |
-
params = Utils.extend({}, params);
|
3647 |
-
if (el && !params.el) { params.el = el; }
|
3648 |
-
|
3649 |
-
SwiperClass$$1.call(this, params);
|
3650 |
-
|
3651 |
-
Object.keys(prototypes).forEach(function (prototypeGroup) {
|
3652 |
-
Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) {
|
3653 |
-
if (!Swiper.prototype[protoMethod]) {
|
3654 |
-
Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
|
3655 |
-
}
|
3656 |
-
});
|
3657 |
-
});
|
3658 |
-
|
3659 |
-
// Swiper Instance
|
3660 |
-
var swiper = this;
|
3661 |
-
if (typeof swiper.modules === 'undefined') {
|
3662 |
-
swiper.modules = {};
|
3663 |
-
}
|
3664 |
-
Object.keys(swiper.modules).forEach(function (moduleName) {
|
3665 |
-
var module = swiper.modules[moduleName];
|
3666 |
-
if (module.params) {
|
3667 |
-
var moduleParamName = Object.keys(module.params)[0];
|
3668 |
-
var moduleParams = module.params[moduleParamName];
|
3669 |
-
if (typeof moduleParams !== 'object') { return; }
|
3670 |
-
if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; }
|
3671 |
-
if (params[moduleParamName] === true) {
|
3672 |
-
params[moduleParamName] = { enabled: true };
|
3673 |
-
}
|
3674 |
-
if (
|
3675 |
-
typeof params[moduleParamName] === 'object'
|
3676 |
-
&& !('enabled' in params[moduleParamName])
|
3677 |
-
) {
|
3678 |
-
params[moduleParamName].enabled = true;
|
3679 |
-
}
|
3680 |
-
if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; }
|
3681 |
-
}
|
3682 |
-
});
|
3683 |
-
|
3684 |
-
// Extend defaults with modules params
|
3685 |
-
var swiperParams = Utils.extend({}, defaults);
|
3686 |
-
swiper.useModulesParams(swiperParams);
|
3687 |
-
|
3688 |
-
// Extend defaults with passed params
|
3689 |
-
swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
|
3690 |
-
swiper.originalParams = Utils.extend({}, swiper.params);
|
3691 |
-
swiper.passedParams = Utils.extend({}, params);
|
3692 |
-
|
3693 |
-
// Save Dom lib
|
3694 |
-
swiper.$ = $;
|
3695 |
-
|
3696 |
-
// Find el
|
3697 |
-
var $el = $(swiper.params.el);
|
3698 |
-
el = $el[0];
|
3699 |
-
|
3700 |
-
if (!el) {
|
3701 |
-
return undefined;
|
3702 |
-
}
|
3703 |
-
|
3704 |
-
if ($el.length > 1) {
|
3705 |
-
var swipers = [];
|
3706 |
-
$el.each(function (index, containerEl) {
|
3707 |
-
var newParams = Utils.extend({}, params, { el: containerEl });
|
3708 |
-
swipers.push(new Swiper(newParams));
|
3709 |
-
});
|
3710 |
-
return swipers;
|
3711 |
-
}
|
3712 |
-
|
3713 |
-
el.swiper = swiper;
|
3714 |
-
$el.data('swiper', swiper);
|
3715 |
-
|
3716 |
-
// Find Wrapper
|
3717 |
-
var $wrapperEl = $el.children(("." + (swiper.params.wrapperClass)));
|
3718 |
-
|
3719 |
-
// Extend Swiper
|
3720 |
-
Utils.extend(swiper, {
|
3721 |
-
$el: $el,
|
3722 |
-
el: el,
|
3723 |
-
$wrapperEl: $wrapperEl,
|
3724 |
-
wrapperEl: $wrapperEl[0],
|
3725 |
-
|
3726 |
-
// Classes
|
3727 |
-
classNames: [],
|
3728 |
-
|
3729 |
-
// Slides
|
3730 |
-
slides: $(),
|
3731 |
-
slidesGrid: [],
|
3732 |
-
snapGrid: [],
|
3733 |
-
slidesSizesGrid: [],
|
3734 |
-
|
3735 |
-
// isDirection
|
3736 |
-
isHorizontal: function isHorizontal() {
|
3737 |
-
return swiper.params.direction === 'horizontal';
|
3738 |
-
},
|
3739 |
-
isVertical: function isVertical() {
|
3740 |
-
return swiper.params.direction === 'vertical';
|
3741 |
-
},
|
3742 |
-
// RTL
|
3743 |
-
rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
3744 |
-
rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
3745 |
-
wrongRTL: $wrapperEl.css('display') === '-webkit-box',
|
3746 |
-
|
3747 |
-
// Indexes
|
3748 |
-
activeIndex: 0,
|
3749 |
-
realIndex: 0,
|
3750 |
-
|
3751 |
-
//
|
3752 |
-
isBeginning: true,
|
3753 |
-
isEnd: false,
|
3754 |
-
|
3755 |
-
// Props
|
3756 |
-
translate: 0,
|
3757 |
-
previousTranslate: 0,
|
3758 |
-
progress: 0,
|
3759 |
-
velocity: 0,
|
3760 |
-
animating: false,
|
3761 |
-
|
3762 |
-
// Locks
|
3763 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
3764 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
3765 |
-
|
3766 |
-
// Touch Events
|
3767 |
-
touchEvents: (function touchEvents() {
|
3768 |
-
var touch = ['touchstart', 'touchmove', 'touchend'];
|
3769 |
-
var desktop = ['mousedown', 'mousemove', 'mouseup'];
|
3770 |
-
if (Support.pointerEvents) {
|
3771 |
-
desktop = ['pointerdown', 'pointermove', 'pointerup'];
|
3772 |
-
} else if (Support.prefixedPointerEvents) {
|
3773 |
-
desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
|
3774 |
-
}
|
3775 |
-
swiper.touchEventsTouch = {
|
3776 |
-
start: touch[0],
|
3777 |
-
move: touch[1],
|
3778 |
-
end: touch[2],
|
3779 |
-
};
|
3780 |
-
swiper.touchEventsDesktop = {
|
3781 |
-
start: desktop[0],
|
3782 |
-
move: desktop[1],
|
3783 |
-
end: desktop[2],
|
3784 |
-
};
|
3785 |
-
return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
|
3786 |
-
}()),
|
3787 |
-
touchEventsData: {
|
3788 |
-
isTouched: undefined,
|
3789 |
-
isMoved: undefined,
|
3790 |
-
allowTouchCallbacks: undefined,
|
3791 |
-
touchStartTime: undefined,
|
3792 |
-
isScrolling: undefined,
|
3793 |
-
currentTranslate: undefined,
|
3794 |
-
startTranslate: undefined,
|
3795 |
-
allowThresholdMove: undefined,
|
3796 |
-
// Form elements to match
|
3797 |
-
formElements: 'input, select, option, textarea, button, video',
|
3798 |
-
// Last click time
|
3799 |
-
lastClickTime: Utils.now(),
|
3800 |
-
clickTimeout: undefined,
|
3801 |
-
// Velocities
|
3802 |
-
velocities: [],
|
3803 |
-
allowMomentumBounce: undefined,
|
3804 |
-
isTouchEvent: undefined,
|
3805 |
-
startMoving: undefined,
|
3806 |
-
},
|
3807 |
-
|
3808 |
-
// Clicks
|
3809 |
-
allowClick: true,
|
3810 |
-
|
3811 |
-
// Touches
|
3812 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
3813 |
-
|
3814 |
-
touches: {
|
3815 |
-
startX: 0,
|
3816 |
-
startY: 0,
|
3817 |
-
currentX: 0,
|
3818 |
-
currentY: 0,
|
3819 |
-
diff: 0,
|
3820 |
-
},
|
3821 |
-
|
3822 |
-
// Images
|
3823 |
-
imagesToLoad: [],
|
3824 |
-
imagesLoaded: 0,
|
3825 |
-
|
3826 |
-
});
|
3827 |
-
|
3828 |
-
// Install Modules
|
3829 |
-
swiper.useModules();
|
3830 |
-
|
3831 |
-
// Init
|
3832 |
-
if (swiper.params.init) {
|
3833 |
-
swiper.init();
|
3834 |
-
}
|
3835 |
-
|
3836 |
-
// Return app instance
|
3837 |
-
return swiper;
|
3838 |
-
}
|
3839 |
-
|
3840 |
-
if ( SwiperClass$$1 ) Swiper.__proto__ = SwiperClass$$1;
|
3841 |
-
Swiper.prototype = Object.create( SwiperClass$$1 && SwiperClass$$1.prototype );
|
3842 |
-
Swiper.prototype.constructor = Swiper;
|
3843 |
-
|
3844 |
-
var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } };
|
3845 |
-
|
3846 |
-
Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () {
|
3847 |
-
var swiper = this;
|
3848 |
-
var params = swiper.params;
|
3849 |
-
var slides = swiper.slides;
|
3850 |
-
var slidesGrid = swiper.slidesGrid;
|
3851 |
-
var swiperSize = swiper.size;
|
3852 |
-
var activeIndex = swiper.activeIndex;
|
3853 |
-
var spv = 1;
|
3854 |
-
if (params.centeredSlides) {
|
3855 |
-
var slideSize = slides[activeIndex].swiperSlideSize;
|
3856 |
-
var breakLoop;
|
3857 |
-
for (var i = activeIndex + 1; i < slides.length; i += 1) {
|
3858 |
-
if (slides[i] && !breakLoop) {
|
3859 |
-
slideSize += slides[i].swiperSlideSize;
|
3860 |
-
spv += 1;
|
3861 |
-
if (slideSize > swiperSize) { breakLoop = true; }
|
3862 |
-
}
|
3863 |
-
}
|
3864 |
-
for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) {
|
3865 |
-
if (slides[i$1] && !breakLoop) {
|
3866 |
-
slideSize += slides[i$1].swiperSlideSize;
|
3867 |
-
spv += 1;
|
3868 |
-
if (slideSize > swiperSize) { breakLoop = true; }
|
3869 |
-
}
|
3870 |
-
}
|
3871 |
-
} else {
|
3872 |
-
for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) {
|
3873 |
-
if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) {
|
3874 |
-
spv += 1;
|
3875 |
-
}
|
3876 |
-
}
|
3877 |
-
}
|
3878 |
-
return spv;
|
3879 |
-
};
|
3880 |
-
|
3881 |
-
Swiper.prototype.update = function update$$1 () {
|
3882 |
-
var swiper = this;
|
3883 |
-
if (!swiper || swiper.destroyed) { return; }
|
3884 |
-
var snapGrid = swiper.snapGrid;
|
3885 |
-
var params = swiper.params;
|
3886 |
-
// Breakpoints
|
3887 |
-
if (params.breakpoints) {
|
3888 |
-
swiper.setBreakpoint();
|
3889 |
-
}
|
3890 |
-
swiper.updateSize();
|
3891 |
-
swiper.updateSlides();
|
3892 |
-
swiper.updateProgress();
|
3893 |
-
swiper.updateSlidesClasses();
|
3894 |
-
|
3895 |
-
function setTranslate() {
|
3896 |
-
var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
|
3897 |
-
var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
|
3898 |
-
swiper.setTranslate(newTranslate);
|
3899 |
-
swiper.updateActiveIndex();
|
3900 |
-
swiper.updateSlidesClasses();
|
3901 |
-
}
|
3902 |
-
var translated;
|
3903 |
-
if (swiper.params.freeMode) {
|
3904 |
-
setTranslate();
|
3905 |
-
if (swiper.params.autoHeight) {
|
3906 |
-
swiper.updateAutoHeight();
|
3907 |
-
}
|
3908 |
-
} else {
|
3909 |
-
if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3910 |
-
translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3911 |
-
} else {
|
3912 |
-
translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3913 |
-
}
|
3914 |
-
if (!translated) {
|
3915 |
-
setTranslate();
|
3916 |
-
}
|
3917 |
-
}
|
3918 |
-
if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3919 |
-
swiper.checkOverflow();
|
3920 |
-
}
|
3921 |
-
swiper.emit('update');
|
3922 |
-
};
|
3923 |
-
|
3924 |
-
Swiper.prototype.init = function init () {
|
3925 |
-
var swiper = this;
|
3926 |
-
if (swiper.initialized) { return; }
|
3927 |
-
|
3928 |
-
swiper.emit('beforeInit');
|
3929 |
-
|
3930 |
-
// Set breakpoint
|
3931 |
-
if (swiper.params.breakpoints) {
|
3932 |
-
swiper.setBreakpoint();
|
3933 |
-
}
|
3934 |
-
|
3935 |
-
// Add Classes
|
3936 |
-
swiper.addClasses();
|
3937 |
-
|
3938 |
-
// Create loop
|
3939 |
-
if (swiper.params.loop) {
|
3940 |
-
swiper.loopCreate();
|
3941 |
-
}
|
3942 |
-
|
3943 |
-
// Update size
|
3944 |
-
swiper.updateSize();
|
3945 |
-
|
3946 |
-
// Update slides
|
3947 |
-
swiper.updateSlides();
|
3948 |
-
|
3949 |
-
if (swiper.params.watchOverflow) {
|
3950 |
-
swiper.checkOverflow();
|
3951 |
-
}
|
3952 |
-
|
3953 |
-
// Set Grab Cursor
|
3954 |
-
if (swiper.params.grabCursor) {
|
3955 |
-
swiper.setGrabCursor();
|
3956 |
-
}
|
3957 |
-
|
3958 |
-
if (swiper.params.preloadImages) {
|
3959 |
-
swiper.preloadImages();
|
3960 |
-
}
|
3961 |
-
|
3962 |
-
// Slide To Initial Slide
|
3963 |
-
if (swiper.params.loop) {
|
3964 |
-
swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
|
3965 |
-
} else {
|
3966 |
-
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
|
3967 |
-
}
|
3968 |
-
|
3969 |
-
// Attach events
|
3970 |
-
swiper.attachEvents();
|
3971 |
-
|
3972 |
-
// Init Flag
|
3973 |
-
swiper.initialized = true;
|
3974 |
-
|
3975 |
-
// Emit
|
3976 |
-
swiper.emit('init');
|
3977 |
-
};
|
3978 |
-
|
3979 |
-
Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) {
|
3980 |
-
if ( deleteInstance === void 0 ) deleteInstance = true;
|
3981 |
-
if ( cleanStyles === void 0 ) cleanStyles = true;
|
3982 |
-
|
3983 |
-
var swiper = this;
|
3984 |
-
var params = swiper.params;
|
3985 |
-
var $el = swiper.$el;
|
3986 |
-
var $wrapperEl = swiper.$wrapperEl;
|
3987 |
-
var slides = swiper.slides;
|
3988 |
-
|
3989 |
-
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
3990 |
-
return null;
|
3991 |
-
}
|
3992 |
-
|
3993 |
-
swiper.emit('beforeDestroy');
|
3994 |
-
|
3995 |
-
// Init Flag
|
3996 |
-
swiper.initialized = false;
|
3997 |
-
|
3998 |
-
// Detach events
|
3999 |
-
swiper.detachEvents();
|
4000 |
-
|
4001 |
-
// Destroy loop
|
4002 |
-
if (params.loop) {
|
4003 |
-
swiper.loopDestroy();
|
4004 |
-
}
|
4005 |
-
|
4006 |
-
// Cleanup styles
|
4007 |
-
if (cleanStyles) {
|
4008 |
-
swiper.removeClasses();
|
4009 |
-
$el.removeAttr('style');
|
4010 |
-
$wrapperEl.removeAttr('style');
|
4011 |
-
if (slides && slides.length) {
|
4012 |
-
slides
|
4013 |
-
.removeClass([
|
4014 |
-
params.slideVisibleClass,
|
4015 |
-
params.slideActiveClass,
|
4016 |
-
params.slideNextClass,
|
4017 |
-
params.slidePrevClass ].join(' '))
|
4018 |
-
.removeAttr('style')
|
4019 |
-
.removeAttr('data-swiper-slide-index')
|
4020 |
-
.removeAttr('data-swiper-column')
|
4021 |
-
.removeAttr('data-swiper-row');
|
4022 |
-
}
|
4023 |
-
}
|
4024 |
-
|
4025 |
-
swiper.emit('destroy');
|
4026 |
-
|
4027 |
-
// Detach emitter events
|
4028 |
-
Object.keys(swiper.eventsListeners).forEach(function (eventName) {
|
4029 |
-
swiper.off(eventName);
|
4030 |
-
});
|
4031 |
-
|
4032 |
-
if (deleteInstance !== false) {
|
4033 |
-
swiper.$el[0].swiper = null;
|
4034 |
-
swiper.$el.data('swiper', null);
|
4035 |
-
Utils.deleteProps(swiper);
|
4036 |
-
}
|
4037 |
-
swiper.destroyed = true;
|
4038 |
-
|
4039 |
-
return null;
|
4040 |
-
};
|
4041 |
-
|
4042 |
-
Swiper.extendDefaults = function extendDefaults (newDefaults) {
|
4043 |
-
Utils.extend(extendedDefaults, newDefaults);
|
4044 |
-
};
|
4045 |
-
|
4046 |
-
staticAccessors.extendedDefaults.get = function () {
|
4047 |
-
return extendedDefaults;
|
4048 |
-
};
|
4049 |
-
|
4050 |
-
staticAccessors.defaults.get = function () {
|
4051 |
-
return defaults;
|
4052 |
-
};
|
4053 |
-
|
4054 |
-
staticAccessors.Class.get = function () {
|
4055 |
-
return SwiperClass$$1;
|
4056 |
-
};
|
4057 |
-
|
4058 |
-
staticAccessors.$.get = function () {
|
4059 |
-
return $;
|
4060 |
-
};
|
4061 |
-
|
4062 |
-
Object.defineProperties( Swiper, staticAccessors );
|
4063 |
-
|
4064 |
-
return Swiper;
|
4065 |
-
}(SwiperClass));
|
4066 |
-
|
4067 |
-
var Device$1 = {
|
4068 |
-
name: 'device',
|
4069 |
-
proto: {
|
4070 |
-
device: Device,
|
4071 |
-
},
|
4072 |
-
static: {
|
4073 |
-
device: Device,
|
4074 |
-
},
|
4075 |
-
};
|
4076 |
-
|
4077 |
-
var Support$1 = {
|
4078 |
-
name: 'support',
|
4079 |
-
proto: {
|
4080 |
-
support: Support,
|
4081 |
-
},
|
4082 |
-
static: {
|
4083 |
-
support: Support,
|
4084 |
-
},
|
4085 |
-
};
|
4086 |
-
|
4087 |
-
var Browser$1 = {
|
4088 |
-
name: 'browser',
|
4089 |
-
proto: {
|
4090 |
-
browser: Browser,
|
4091 |
-
},
|
4092 |
-
static: {
|
4093 |
-
browser: Browser,
|
4094 |
-
},
|
4095 |
-
};
|
4096 |
-
|
4097 |
-
var Resize = {
|
4098 |
-
name: 'resize',
|
4099 |
-
create: function create() {
|
4100 |
-
var swiper = this;
|
4101 |
-
Utils.extend(swiper, {
|
4102 |
-
resize: {
|
4103 |
-
resizeHandler: function resizeHandler() {
|
4104 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
|
4105 |
-
swiper.emit('beforeResize');
|
4106 |
-
swiper.emit('resize');
|
4107 |
-
},
|
4108 |
-
orientationChangeHandler: function orientationChangeHandler() {
|
4109 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
|
4110 |
-
swiper.emit('orientationchange');
|
4111 |
-
},
|
4112 |
-
},
|
4113 |
-
});
|
4114 |
-
},
|
4115 |
-
on: {
|
4116 |
-
init: function init() {
|
4117 |
-
var swiper = this;
|
4118 |
-
// Emit resize
|
4119 |
-
win.addEventListener('resize', swiper.resize.resizeHandler);
|
4120 |
-
|
4121 |
-
// Emit orientationchange
|
4122 |
-
win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
4123 |
-
},
|
4124 |
-
destroy: function destroy() {
|
4125 |
-
var swiper = this;
|
4126 |
-
win.removeEventListener('resize', swiper.resize.resizeHandler);
|
4127 |
-
win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
4128 |
-
},
|
4129 |
-
},
|
4130 |
-
};
|
4131 |
-
|
4132 |
-
var Observer = {
|
4133 |
-
func: win.MutationObserver || win.WebkitMutationObserver,
|
4134 |
-
attach: function attach(target, options) {
|
4135 |
-
if ( options === void 0 ) options = {};
|
4136 |
-
|
4137 |
-
var swiper = this;
|
4138 |
-
|
4139 |
-
var ObserverFunc = Observer.func;
|
4140 |
-
var observer = new ObserverFunc(function (mutations) {
|
4141 |
-
// The observerUpdate event should only be triggered
|
4142 |
-
// once despite the number of mutations. Additional
|
4143 |
-
// triggers are redundant and are very costly
|
4144 |
-
if (mutations.length === 1) {
|
4145 |
-
swiper.emit('observerUpdate', mutations[0]);
|
4146 |
-
return;
|
4147 |
-
}
|
4148 |
-
var observerUpdate = function observerUpdate() {
|
4149 |
-
swiper.emit('observerUpdate', mutations[0]);
|
4150 |
-
};
|
4151 |
-
|
4152 |
-
if (win.requestAnimationFrame) {
|
4153 |
-
win.requestAnimationFrame(observerUpdate);
|
4154 |
-
} else {
|
4155 |
-
win.setTimeout(observerUpdate, 0);
|
4156 |
-
}
|
4157 |
-
});
|
4158 |
-
|
4159 |
-
observer.observe(target, {
|
4160 |
-
attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
|
4161 |
-
childList: typeof options.childList === 'undefined' ? true : options.childList,
|
4162 |
-
characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
|
4163 |
-
});
|
4164 |
-
|
4165 |
-
swiper.observer.observers.push(observer);
|
4166 |
-
},
|
4167 |
-
init: function init() {
|
4168 |
-
var swiper = this;
|
4169 |
-
if (!Support.observer || !swiper.params.observer) { return; }
|
4170 |
-
if (swiper.params.observeParents) {
|
4171 |
-
var containerParents = swiper.$el.parents();
|
4172 |
-
for (var i = 0; i < containerParents.length; i += 1) {
|
4173 |
-
swiper.observer.attach(containerParents[i]);
|
4174 |
-
}
|
4175 |
-
}
|
4176 |
-
// Observe container
|
4177 |
-
swiper.observer.attach(swiper.$el[0], { childList: false });
|
4178 |
-
|
4179 |
-
// Observe wrapper
|
4180 |
-
swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
|
4181 |
-
},
|
4182 |
-
destroy: function destroy() {
|
4183 |
-
var swiper = this;
|
4184 |
-
swiper.observer.observers.forEach(function (observer) {
|
4185 |
-
observer.disconnect();
|
4186 |
-
});
|
4187 |
-
swiper.observer.observers = [];
|
4188 |
-
},
|
4189 |
-
};
|
4190 |
-
|
4191 |
-
var Observer$1 = {
|
4192 |
-
name: 'observer',
|
4193 |
-
params: {
|
4194 |
-
observer: false,
|
4195 |
-
observeParents: false,
|
4196 |
-
},
|
4197 |
-
create: function create() {
|
4198 |
-
var swiper = this;
|
4199 |
-
Utils.extend(swiper, {
|
4200 |
-
observer: {
|
4201 |
-
init: Observer.init.bind(swiper),
|
4202 |
-
attach: Observer.attach.bind(swiper),
|
4203 |
-
destroy: Observer.destroy.bind(swiper),
|
4204 |
-
observers: [],
|
4205 |
-
},
|
4206 |
-
});
|
4207 |
-
},
|
4208 |
-
on: {
|
4209 |
-
init: function init() {
|
4210 |
-
var swiper = this;
|
4211 |
-
swiper.observer.init();
|
4212 |
-
},
|
4213 |
-
destroy: function destroy() {
|
4214 |
-
var swiper = this;
|
4215 |
-
swiper.observer.destroy();
|
4216 |
-
},
|
4217 |
-
},
|
4218 |
-
};
|
4219 |
-
|
4220 |
-
var Virtual = {
|
4221 |
-
update: function update(force) {
|
4222 |
-
var swiper = this;
|
4223 |
-
var ref = swiper.params;
|
4224 |
-
var slidesPerView = ref.slidesPerView;
|
4225 |
-
var slidesPerGroup = ref.slidesPerGroup;
|
4226 |
-
var centeredSlides = ref.centeredSlides;
|
4227 |
-
var ref$1 = swiper.virtual;
|
4228 |
-
var previousFrom = ref$1.from;
|
4229 |
-
var previousTo = ref$1.to;
|
4230 |
-
var slides = ref$1.slides;
|
4231 |
-
var previousSlidesGrid = ref$1.slidesGrid;
|
4232 |
-
var renderSlide = ref$1.renderSlide;
|
4233 |
-
var previousOffset = ref$1.offset;
|
4234 |
-
swiper.updateActiveIndex();
|
4235 |
-
var activeIndex = swiper.activeIndex || 0;
|
4236 |
-
|
4237 |
-
var offsetProp;
|
4238 |
-
if (swiper.rtlTranslate) { offsetProp = 'right'; }
|
4239 |
-
else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; }
|
4240 |
-
|
4241 |
-
var slidesAfter;
|
4242 |
-
var slidesBefore;
|
4243 |
-
if (centeredSlides) {
|
4244 |
-
slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup;
|
4245 |
-
slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup;
|
4246 |
-
} else {
|
4247 |
-
slidesAfter = slidesPerView + (slidesPerGroup - 1);
|
4248 |
-
slidesBefore = slidesPerGroup;
|
4249 |
-
}
|
4250 |
-
var from = Math.max((activeIndex || 0) - slidesBefore, 0);
|
4251 |
-
var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
|
4252 |
-
var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
|
4253 |
-
|
4254 |
-
Utils.extend(swiper.virtual, {
|
4255 |
-
from: from,
|
4256 |
-
to: to,
|
4257 |
-
offset: offset,
|
4258 |
-
slidesGrid: swiper.slidesGrid,
|
4259 |
-
});
|
4260 |
-
|
4261 |
-
function onRendered() {
|
4262 |
-
swiper.updateSlides();
|
4263 |
-
swiper.updateProgress();
|
4264 |
-
swiper.updateSlidesClasses();
|
4265 |
-
if (swiper.lazy && swiper.params.lazy.enabled) {
|
4266 |
-
swiper.lazy.load();
|
4267 |
-
}
|
4268 |
-
}
|
4269 |
-
|
4270 |
-
if (previousFrom === from && previousTo === to && !force) {
|
4271 |
-
if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
|
4272 |
-
swiper.slides.css(offsetProp, (offset + "px"));
|
4273 |
-
}
|
4274 |
-
swiper.updateProgress();
|
4275 |
-
return;
|
4276 |
-
}
|
4277 |
-
if (swiper.params.virtual.renderExternal) {
|
4278 |
-
swiper.params.virtual.renderExternal.call(swiper, {
|
4279 |
-
offset: offset,
|
4280 |
-
from: from,
|
4281 |
-
to: to,
|
4282 |
-
slides: (function getSlides() {
|
4283 |
-
var slidesToRender = [];
|
4284 |
-
for (var i = from; i <= to; i += 1) {
|
4285 |
-
slidesToRender.push(slides[i]);
|
4286 |
-
}
|
4287 |
-
return slidesToRender;
|
4288 |
-
}()),
|
4289 |
-
});
|
4290 |
-
onRendered();
|
4291 |
-
return;
|
4292 |
-
}
|
4293 |
-
var prependIndexes = [];
|
4294 |
-
var appendIndexes = [];
|
4295 |
-
if (force) {
|
4296 |
-
swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove();
|
4297 |
-
} else {
|
4298 |
-
for (var i = previousFrom; i <= previousTo; i += 1) {
|
4299 |
-
if (i < from || i > to) {
|
4300 |
-
swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove();
|
4301 |
-
}
|
4302 |
-
}
|
4303 |
-
}
|
4304 |
-
for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
|
4305 |
-
if (i$1 >= from && i$1 <= to) {
|
4306 |
-
if (typeof previousTo === 'undefined' || force) {
|
4307 |
-
appendIndexes.push(i$1);
|
4308 |
-
} else {
|
4309 |
-
if (i$1 > previousTo) { appendIndexes.push(i$1); }
|
4310 |
-
if (i$1 < previousFrom) { prependIndexes.push(i$1); }
|
4311 |
-
}
|
4312 |
-
}
|
4313 |
-
}
|
4314 |
-
appendIndexes.forEach(function (index) {
|
4315 |
-
swiper.$wrapperEl.append(renderSlide(slides[index], index));
|
4316 |
-
});
|
4317 |
-
prependIndexes.sort(function (a, b) { return a < b; }).forEach(function (index) {
|
4318 |
-
swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
|
4319 |
-
});
|
4320 |
-
swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px"));
|
4321 |
-
onRendered();
|
4322 |
-
},
|
4323 |
-
renderSlide: function renderSlide(slide, index) {
|
4324 |
-
var swiper = this;
|
4325 |
-
var params = swiper.params.virtual;
|
4326 |
-
if (params.cache && swiper.virtual.cache[index]) {
|
4327 |
-
return swiper.virtual.cache[index];
|
4328 |
-
}
|
4329 |
-
var $slideEl = params.renderSlide
|
4330 |
-
? $(params.renderSlide.call(swiper, slide, index))
|
4331 |
-
: $(("<div class=\"" + (swiper.params.slideClass) + "\" data-swiper-slide-index=\"" + index + "\">" + slide + "</div>"));
|
4332 |
-
if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); }
|
4333 |
-
if (params.cache) { swiper.virtual.cache[index] = $slideEl; }
|
4334 |
-
return $slideEl;
|
4335 |
-
},
|
4336 |
-
appendSlide: function appendSlide(slide) {
|
4337 |
-
var swiper = this;
|
4338 |
-
swiper.virtual.slides.push(slide);
|
4339 |
-
swiper.virtual.update(true);
|
4340 |
-
},
|
4341 |
-
prependSlide: function prependSlide(slide) {
|
4342 |
-
var swiper = this;
|
4343 |
-
swiper.virtual.slides.unshift(slide);
|
4344 |
-
if (swiper.params.virtual.cache) {
|
4345 |
-
var cache = swiper.virtual.cache;
|
4346 |
-
var newCache = {};
|
4347 |
-
Object.keys(cache).forEach(function (cachedIndex) {
|
4348 |
-
newCache[cachedIndex + 1] = cache[cachedIndex];
|
4349 |
-
});
|
4350 |
-
swiper.virtual.cache = newCache;
|
4351 |
-
}
|
4352 |
-
swiper.virtual.update(true);
|
4353 |
-
swiper.slideNext(0);
|
4354 |
-
},
|
4355 |
-
};
|
4356 |
-
|
4357 |
-
var Virtual$1 = {
|
4358 |
-
name: 'virtual',
|
4359 |
-
params: {
|
4360 |
-
virtual: {
|
4361 |
-
enabled: false,
|
4362 |
-
slides: [],
|
4363 |
-
cache: true,
|
4364 |
-
renderSlide: null,
|
4365 |
-
renderExternal: null,
|
4366 |
-
},
|
4367 |
-
},
|
4368 |
-
create: function create() {
|
4369 |
-
var swiper = this;
|
4370 |
-
Utils.extend(swiper, {
|
4371 |
-
virtual: {
|
4372 |
-
update: Virtual.update.bind(swiper),
|
4373 |
-
appendSlide: Virtual.appendSlide.bind(swiper),
|
4374 |
-
prependSlide: Virtual.prependSlide.bind(swiper),
|
4375 |
-
renderSlide: Virtual.renderSlide.bind(swiper),
|
4376 |
-
slides: swiper.params.virtual.slides,
|
4377 |
-
cache: {},
|
4378 |
-
},
|
4379 |
-
});
|
4380 |
-
},
|
4381 |
-
on: {
|
4382 |
-
beforeInit: function beforeInit() {
|
4383 |
-
var swiper = this;
|
4384 |
-
if (!swiper.params.virtual.enabled) { return; }
|
4385 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual"));
|
4386 |
-
var overwriteParams = {
|
4387 |
-
watchSlidesProgress: true,
|
4388 |
-
};
|
4389 |
-
Utils.extend(swiper.params, overwriteParams);
|
4390 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
4391 |
-
|
4392 |
-
swiper.virtual.update();
|
4393 |
-
},
|
4394 |
-
setTranslate: function setTranslate() {
|
4395 |
-
var swiper = this;
|
4396 |
-
if (!swiper.params.virtual.enabled) { return; }
|
4397 |
-
swiper.virtual.update();
|
4398 |
-
},
|
4399 |
-
},
|
4400 |
-
};
|
4401 |
-
|
4402 |
-
var Keyboard = {
|
4403 |
-
handle: function handle(event) {
|
4404 |
-
var swiper = this;
|
4405 |
-
var rtl = swiper.rtlTranslate;
|
4406 |
-
var e = event;
|
4407 |
-
if (e.originalEvent) { e = e.originalEvent; } // jquery fix
|
4408 |
-
var kc = e.keyCode || e.charCode;
|
4409 |
-
// Directions locks
|
4410 |
-
if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
|
4411 |
-
return false;
|
4412 |
-
}
|
4413 |
-
if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
|
4414 |
-
return false;
|
4415 |
-
}
|
4416 |
-
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
4417 |
-
return undefined;
|
4418 |
-
}
|
4419 |
-
if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
4420 |
-
return undefined;
|
4421 |
-
}
|
4422 |
-
if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
|
4423 |
-
var inView = false;
|
4424 |
-
// Check that swiper should be inside of visible area of window
|
4425 |
-
if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) {
|
4426 |
-
return undefined;
|
4427 |
-
}
|
4428 |
-
var windowWidth = win.innerWidth;
|
4429 |
-
var windowHeight = win.innerHeight;
|
4430 |
-
var swiperOffset = swiper.$el.offset();
|
4431 |
-
if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; }
|
4432 |
-
var swiperCoord = [
|
4433 |
-
[swiperOffset.left, swiperOffset.top],
|
4434 |
-
[swiperOffset.left + swiper.width, swiperOffset.top],
|
4435 |
-
[swiperOffset.left, swiperOffset.top + swiper.height],
|
4436 |
-
[swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ];
|
4437 |
-
for (var i = 0; i < swiperCoord.length; i += 1) {
|
4438 |
-
var point = swiperCoord[i];
|
4439 |
-
if (
|
4440 |
-
point[0] >= 0 && point[0] <= windowWidth
|
4441 |
-
&& point[1] >= 0 && point[1] <= windowHeight
|
4442 |
-
) {
|
4443 |
-
inView = true;
|
4444 |
-
}
|
4445 |
-
}
|
4446 |
-
if (!inView) { return undefined; }
|
4447 |
-
}
|
4448 |
-
if (swiper.isHorizontal()) {
|
4449 |
-
if (kc === 37 || kc === 39) {
|
4450 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4451 |
-
else { e.returnValue = false; }
|
4452 |
-
}
|
4453 |
-
if ((kc === 39 && !rtl) || (kc === 37 && rtl)) { swiper.slideNext(); }
|
4454 |
-
if ((kc === 37 && !rtl) || (kc === 39 && rtl)) { swiper.slidePrev(); }
|
4455 |
-
} else {
|
4456 |
-
if (kc === 38 || kc === 40) {
|
4457 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4458 |
-
else { e.returnValue = false; }
|
4459 |
-
}
|
4460 |
-
if (kc === 40) { swiper.slideNext(); }
|
4461 |
-
if (kc === 38) { swiper.slidePrev(); }
|
4462 |
-
}
|
4463 |
-
swiper.emit('keyPress', kc);
|
4464 |
-
return undefined;
|
4465 |
-
},
|
4466 |
-
enable: function enable() {
|
4467 |
-
var swiper = this;
|
4468 |
-
if (swiper.keyboard.enabled) { return; }
|
4469 |
-
$(doc).on('keydown', swiper.keyboard.handle);
|
4470 |
-
swiper.keyboard.enabled = true;
|
4471 |
-
},
|
4472 |
-
disable: function disable() {
|
4473 |
-
var swiper = this;
|
4474 |
-
if (!swiper.keyboard.enabled) { return; }
|
4475 |
-
$(doc).off('keydown', swiper.keyboard.handle);
|
4476 |
-
swiper.keyboard.enabled = false;
|
4477 |
-
},
|
4478 |
-
};
|
4479 |
-
|
4480 |
-
var Keyboard$1 = {
|
4481 |
-
name: 'keyboard',
|
4482 |
-
params: {
|
4483 |
-
keyboard: {
|
4484 |
-
enabled: false,
|
4485 |
-
onlyInViewport: true,
|
4486 |
-
},
|
4487 |
-
},
|
4488 |
-
create: function create() {
|
4489 |
-
var swiper = this;
|
4490 |
-
Utils.extend(swiper, {
|
4491 |
-
keyboard: {
|
4492 |
-
enabled: false,
|
4493 |
-
enable: Keyboard.enable.bind(swiper),
|
4494 |
-
disable: Keyboard.disable.bind(swiper),
|
4495 |
-
handle: Keyboard.handle.bind(swiper),
|
4496 |
-
},
|
4497 |
-
});
|
4498 |
-
},
|
4499 |
-
on: {
|
4500 |
-
init: function init() {
|
4501 |
-
var swiper = this;
|
4502 |
-
if (swiper.params.keyboard.enabled) {
|
4503 |
-
swiper.keyboard.enable();
|
4504 |
-
}
|
4505 |
-
},
|
4506 |
-
destroy: function destroy() {
|
4507 |
-
var swiper = this;
|
4508 |
-
if (swiper.keyboard.enabled) {
|
4509 |
-
swiper.keyboard.disable();
|
4510 |
-
}
|
4511 |
-
},
|
4512 |
-
},
|
4513 |
-
};
|
4514 |
-
|
4515 |
-
function isEventSupported() {
|
4516 |
-
var eventName = 'onwheel';
|
4517 |
-
var isSupported = eventName in doc;
|
4518 |
-
|
4519 |
-
if (!isSupported) {
|
4520 |
-
var element = doc.createElement('div');
|
4521 |
-
element.setAttribute(eventName, 'return;');
|
4522 |
-
isSupported = typeof element[eventName] === 'function';
|
4523 |
-
}
|
4524 |
-
|
4525 |
-
if (!isSupported
|
4526 |
-
&& doc.implementation
|
4527 |
-
&& doc.implementation.hasFeature
|
4528 |
-
// always returns true in newer browsers as per the standard.
|
4529 |
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
4530 |
-
&& doc.implementation.hasFeature('', '') !== true
|
4531 |
-
) {
|
4532 |
-
// This is the only way to test support for the `wheel` event in IE9+.
|
4533 |
-
isSupported = doc.implementation.hasFeature('Events.wheel', '3.0');
|
4534 |
-
}
|
4535 |
-
|
4536 |
-
return isSupported;
|
4537 |
-
}
|
4538 |
-
var Mousewheel = {
|
4539 |
-
lastScrollTime: Utils.now(),
|
4540 |
-
event: (function getEvent() {
|
4541 |
-
if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; }
|
4542 |
-
return isEventSupported() ? 'wheel' : 'mousewheel';
|
4543 |
-
}()),
|
4544 |
-
normalize: function normalize(e) {
|
4545 |
-
// Reasonable defaults
|
4546 |
-
var PIXEL_STEP = 10;
|
4547 |
-
var LINE_HEIGHT = 40;
|
4548 |
-
var PAGE_HEIGHT = 800;
|
4549 |
-
|
4550 |
-
var sX = 0;
|
4551 |
-
var sY = 0; // spinX, spinY
|
4552 |
-
var pX = 0;
|
4553 |
-
var pY = 0; // pixelX, pixelY
|
4554 |
-
|
4555 |
-
// Legacy
|
4556 |
-
if ('detail' in e) {
|
4557 |
-
sY = e.detail;
|
4558 |
-
}
|
4559 |
-
if ('wheelDelta' in e) {
|
4560 |
-
sY = -e.wheelDelta / 120;
|
4561 |
-
}
|
4562 |
-
if ('wheelDeltaY' in e) {
|
4563 |
-
sY = -e.wheelDeltaY / 120;
|
4564 |
-
}
|
4565 |
-
if ('wheelDeltaX' in e) {
|
4566 |
-
sX = -e.wheelDeltaX / 120;
|
4567 |
-
}
|
4568 |
-
|
4569 |
-
// side scrolling on FF with DOMMouseScroll
|
4570 |
-
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
4571 |
-
sX = sY;
|
4572 |
-
sY = 0;
|
4573 |
-
}
|
4574 |
-
|
4575 |
-
pX = sX * PIXEL_STEP;
|
4576 |
-
pY = sY * PIXEL_STEP;
|
4577 |
-
|
4578 |
-
if ('deltaY' in e) {
|
4579 |
-
pY = e.deltaY;
|
4580 |
-
}
|
4581 |
-
if ('deltaX' in e) {
|
4582 |
-
pX = e.deltaX;
|
4583 |
-
}
|
4584 |
-
|
4585 |
-
if ((pX || pY) && e.deltaMode) {
|
4586 |
-
if (e.deltaMode === 1) { // delta in LINE units
|
4587 |
-
pX *= LINE_HEIGHT;
|
4588 |
-
pY *= LINE_HEIGHT;
|
4589 |
-
} else { // delta in PAGE units
|
4590 |
-
pX *= PAGE_HEIGHT;
|
4591 |
-
pY *= PAGE_HEIGHT;
|
4592 |
-
}
|
4593 |
-
}
|
4594 |
-
|
4595 |
-
// Fall-back if spin cannot be determined
|
4596 |
-
if (pX && !sX) {
|
4597 |
-
sX = (pX < 1) ? -1 : 1;
|
4598 |
-
}
|
4599 |
-
if (pY && !sY) {
|
4600 |
-
sY = (pY < 1) ? -1 : 1;
|
4601 |
-
}
|
4602 |
-
|
4603 |
-
return {
|
4604 |
-
spinX: sX,
|
4605 |
-
spinY: sY,
|
4606 |
-
pixelX: pX,
|
4607 |
-
pixelY: pY,
|
4608 |
-
};
|
4609 |
-
},
|
4610 |
-
handleMouseEnter: function handleMouseEnter() {
|
4611 |
-
var swiper = this;
|
4612 |
-
swiper.mouseEntered = true;
|
4613 |
-
},
|
4614 |
-
handleMouseLeave: function handleMouseLeave() {
|
4615 |
-
var swiper = this;
|
4616 |
-
swiper.mouseEntered = false;
|
4617 |
-
},
|
4618 |
-
handle: function handle(event) {
|
4619 |
-
var e = event;
|
4620 |
-
var swiper = this;
|
4621 |
-
var params = swiper.params.mousewheel;
|
4622 |
-
|
4623 |
-
if (!swiper.mouseEntered && !params.releaseOnEdges) { return true; }
|
4624 |
-
|
4625 |
-
if (e.originalEvent) { e = e.originalEvent; } // jquery fix
|
4626 |
-
var delta = 0;
|
4627 |
-
var rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
4628 |
-
|
4629 |
-
var data = Mousewheel.normalize(e);
|
4630 |
-
|
4631 |
-
if (params.forceToAxis) {
|
4632 |
-
if (swiper.isHorizontal()) {
|
4633 |
-
if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; }
|
4634 |
-
else { return true; }
|
4635 |
-
} else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; }
|
4636 |
-
else { return true; }
|
4637 |
-
} else {
|
4638 |
-
delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
|
4639 |
-
}
|
4640 |
-
|
4641 |
-
if (delta === 0) { return true; }
|
4642 |
-
|
4643 |
-
if (params.invert) { delta = -delta; }
|
4644 |
-
|
4645 |
-
if (!swiper.params.freeMode) {
|
4646 |
-
if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
|
4647 |
-
if (delta < 0) {
|
4648 |
-
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
4649 |
-
swiper.slideNext();
|
4650 |
-
swiper.emit('scroll', e);
|
4651 |
-
} else if (params.releaseOnEdges) { return true; }
|
4652 |
-
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
4653 |
-
swiper.slidePrev();
|
4654 |
-
swiper.emit('scroll', e);
|
4655 |
-
} else if (params.releaseOnEdges) { return true; }
|
4656 |
-
}
|
4657 |
-
swiper.mousewheel.lastScrollTime = (new win.Date()).getTime();
|
4658 |
-
} else {
|
4659 |
-
// Freemode or scrollContainer:
|
4660 |
-
if (swiper.params.loop) {
|
4661 |
-
swiper.loopFix();
|
4662 |
-
}
|
4663 |
-
var position = swiper.getTranslate() + (delta * params.sensitivity);
|
4664 |
-
var wasBeginning = swiper.isBeginning;
|
4665 |
-
var wasEnd = swiper.isEnd;
|
4666 |
-
|
4667 |
-
if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); }
|
4668 |
-
if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); }
|
4669 |
-
|
4670 |
-
swiper.setTransition(0);
|
4671 |
-
swiper.setTranslate(position);
|
4672 |
-
swiper.updateProgress();
|
4673 |
-
swiper.updateActiveIndex();
|
4674 |
-
swiper.updateSlidesClasses();
|
4675 |
-
|
4676 |
-
if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
|
4677 |
-
swiper.updateSlidesClasses();
|
4678 |
-
}
|
4679 |
-
|
4680 |
-
if (swiper.params.freeModeSticky) {
|
4681 |
-
clearTimeout(swiper.mousewheel.timeout);
|
4682 |
-
swiper.mousewheel.timeout = Utils.nextTick(function () {
|
4683 |
-
swiper.slideToClosest();
|
4684 |
-
}, 300);
|
4685 |
-
}
|
4686 |
-
// Emit event
|
4687 |
-
swiper.emit('scroll', e);
|
4688 |
-
|
4689 |
-
// Stop autoplay
|
4690 |
-
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); }
|
4691 |
-
// Return page scroll on edge positions
|
4692 |
-
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; }
|
4693 |
-
}
|
4694 |
-
|
4695 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4696 |
-
else { e.returnValue = false; }
|
4697 |
-
return false;
|
4698 |
-
},
|
4699 |
-
enable: function enable() {
|
4700 |
-
var swiper = this;
|
4701 |
-
if (!Mousewheel.event) { return false; }
|
4702 |
-
if (swiper.mousewheel.enabled) { return false; }
|
4703 |
-
var target = swiper.$el;
|
4704 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
4705 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
4706 |
-
}
|
4707 |
-
target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
|
4708 |
-
target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
|
4709 |
-
target.on(Mousewheel.event, swiper.mousewheel.handle);
|
4710 |
-
swiper.mousewheel.enabled = true;
|
4711 |
-
return true;
|
4712 |
-
},
|
4713 |
-
disable: function disable() {
|
4714 |
-
var swiper = this;
|
4715 |
-
if (!Mousewheel.event) { return false; }
|
4716 |
-
if (!swiper.mousewheel.enabled) { return false; }
|
4717 |
-
var target = swiper.$el;
|
4718 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
4719 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
4720 |
-
}
|
4721 |
-
target.off(Mousewheel.event, swiper.mousewheel.handle);
|
4722 |
-
swiper.mousewheel.enabled = false;
|
4723 |
-
return true;
|
4724 |
-
},
|
4725 |
-
};
|
4726 |
-
|
4727 |
-
var Mousewheel$1 = {
|
4728 |
-
name: 'mousewheel',
|
4729 |
-
params: {
|
4730 |
-
mousewheel: {
|
4731 |
-
enabled: false,
|
4732 |
-
releaseOnEdges: false,
|
4733 |
-
invert: false,
|
4734 |
-
forceToAxis: false,
|
4735 |
-
sensitivity: 1,
|
4736 |
-
eventsTarged: 'container',
|
4737 |
-
},
|
4738 |
-
},
|
4739 |
-
create: function create() {
|
4740 |
-
var swiper = this;
|
4741 |
-
Utils.extend(swiper, {
|
4742 |
-
mousewheel: {
|
4743 |
-
enabled: false,
|
4744 |
-
enable: Mousewheel.enable.bind(swiper),
|
4745 |
-
disable: Mousewheel.disable.bind(swiper),
|
4746 |
-
handle: Mousewheel.handle.bind(swiper),
|
4747 |
-
handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
|
4748 |
-
handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
|
4749 |
-
lastScrollTime: Utils.now(),
|
4750 |
-
},
|
4751 |
-
});
|
4752 |
-
},
|
4753 |
-
on: {
|
4754 |
-
init: function init() {
|
4755 |
-
var swiper = this;
|
4756 |
-
if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); }
|
4757 |
-
},
|
4758 |
-
destroy: function destroy() {
|
4759 |
-
var swiper = this;
|
4760 |
-
if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); }
|
4761 |
-
},
|
4762 |
-
},
|
4763 |
-
};
|
4764 |
-
|
4765 |
-
var Navigation = {
|
4766 |
-
update: function update() {
|
4767 |
-
// Update Navigation Buttons
|
4768 |
-
var swiper = this;
|
4769 |
-
var params = swiper.params.navigation;
|
4770 |
-
|
4771 |
-
if (swiper.params.loop) { return; }
|
4772 |
-
var ref = swiper.navigation;
|
4773 |
-
var $nextEl = ref.$nextEl;
|
4774 |
-
var $prevEl = ref.$prevEl;
|
4775 |
-
|
4776 |
-
if ($prevEl && $prevEl.length > 0) {
|
4777 |
-
if (swiper.isBeginning) {
|
4778 |
-
$prevEl.addClass(params.disabledClass);
|
4779 |
-
} else {
|
4780 |
-
$prevEl.removeClass(params.disabledClass);
|
4781 |
-
}
|
4782 |
-
$prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4783 |
-
}
|
4784 |
-
if ($nextEl && $nextEl.length > 0) {
|
4785 |
-
if (swiper.isEnd) {
|
4786 |
-
$nextEl.addClass(params.disabledClass);
|
4787 |
-
} else {
|
4788 |
-
$nextEl.removeClass(params.disabledClass);
|
4789 |
-
}
|
4790 |
-
$nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4791 |
-
}
|
4792 |
-
},
|
4793 |
-
init: function init() {
|
4794 |
-
var swiper = this;
|
4795 |
-
var params = swiper.params.navigation;
|
4796 |
-
if (!(params.nextEl || params.prevEl)) { return; }
|
4797 |
-
|
4798 |
-
var $nextEl;
|
4799 |
-
var $prevEl;
|
4800 |
-
if (params.nextEl) {
|
4801 |
-
$nextEl = $(params.nextEl);
|
4802 |
-
if (
|
4803 |
-
swiper.params.uniqueNavElements
|
4804 |
-
&& typeof params.nextEl === 'string'
|
4805 |
-
&& $nextEl.length > 1
|
4806 |
-
&& swiper.$el.find(params.nextEl).length === 1
|
4807 |
-
) {
|
4808 |
-
$nextEl = swiper.$el.find(params.nextEl);
|
4809 |
-
}
|
4810 |
-
}
|
4811 |
-
if (params.prevEl) {
|
4812 |
-
$prevEl = $(params.prevEl);
|
4813 |
-
if (
|
4814 |
-
swiper.params.uniqueNavElements
|
4815 |
-
&& typeof params.prevEl === 'string'
|
4816 |
-
&& $prevEl.length > 1
|
4817 |
-
&& swiper.$el.find(params.prevEl).length === 1
|
4818 |
-
) {
|
4819 |
-
$prevEl = swiper.$el.find(params.prevEl);
|
4820 |
-
}
|
4821 |
-
}
|
4822 |
-
|
4823 |
-
if ($nextEl && $nextEl.length > 0) {
|
4824 |
-
$nextEl.on('click', function (e) {
|
4825 |
-
e.preventDefault();
|
4826 |
-
if (swiper.isEnd && !swiper.params.loop) { return; }
|
4827 |
-
swiper.slideNext();
|
4828 |
-
});
|
4829 |
-
}
|
4830 |
-
if ($prevEl && $prevEl.length > 0) {
|
4831 |
-
$prevEl.on('click', function (e) {
|
4832 |
-
e.preventDefault();
|
4833 |
-
if (swiper.isBeginning && !swiper.params.loop) { return; }
|
4834 |
-
swiper.slidePrev();
|
4835 |
-
});
|
4836 |
-
}
|
4837 |
-
|
4838 |
-
Utils.extend(swiper.navigation, {
|
4839 |
-
$nextEl: $nextEl,
|
4840 |
-
nextEl: $nextEl && $nextEl[0],
|
4841 |
-
$prevEl: $prevEl,
|
4842 |
-
prevEl: $prevEl && $prevEl[0],
|
4843 |
-
});
|
4844 |
-
},
|
4845 |
-
destroy: function destroy() {
|
4846 |
-
var swiper = this;
|
4847 |
-
var ref = swiper.navigation;
|
4848 |
-
var $nextEl = ref.$nextEl;
|
4849 |
-
var $prevEl = ref.$prevEl;
|
4850 |
-
if ($nextEl && $nextEl.length) {
|
4851 |
-
$nextEl.off('click');
|
4852 |
-
$nextEl.removeClass(swiper.params.navigation.disabledClass);
|
4853 |
-
}
|
4854 |
-
if ($prevEl && $prevEl.length) {
|
4855 |
-
$prevEl.off('click');
|
4856 |
-
$prevEl.removeClass(swiper.params.navigation.disabledClass);
|
4857 |
-
}
|
4858 |
-
},
|
4859 |
-
};
|
4860 |
-
|
4861 |
-
var Navigation$1 = {
|
4862 |
-
name: 'navigation',
|
4863 |
-
params: {
|
4864 |
-
navigation: {
|
4865 |
-
nextEl: null,
|
4866 |
-
prevEl: null,
|
4867 |
-
|
4868 |
-
hideOnClick: false,
|
4869 |
-
disabledClass: 'swiper-button-disabled',
|
4870 |
-
hiddenClass: 'swiper-button-hidden',
|
4871 |
-
lockClass: 'swiper-button-lock',
|
4872 |
-
},
|
4873 |
-
},
|
4874 |
-
create: function create() {
|
4875 |
-
var swiper = this;
|
4876 |
-
Utils.extend(swiper, {
|
4877 |
-
navigation: {
|
4878 |
-
init: Navigation.init.bind(swiper),
|
4879 |
-
update: Navigation.update.bind(swiper),
|
4880 |
-
destroy: Navigation.destroy.bind(swiper),
|
4881 |
-
},
|
4882 |
-
});
|
4883 |
-
},
|
4884 |
-
on: {
|
4885 |
-
init: function init() {
|
4886 |
-
var swiper = this;
|
4887 |
-
swiper.navigation.init();
|
4888 |
-
swiper.navigation.update();
|
4889 |
-
},
|
4890 |
-
toEdge: function toEdge() {
|
4891 |
-
var swiper = this;
|
4892 |
-
swiper.navigation.update();
|
4893 |
-
},
|
4894 |
-
fromEdge: function fromEdge() {
|
4895 |
-
var swiper = this;
|
4896 |
-
swiper.navigation.update();
|
4897 |
-
},
|
4898 |
-
destroy: function destroy() {
|
4899 |
-
var swiper = this;
|
4900 |
-
swiper.navigation.destroy();
|
4901 |
-
},
|
4902 |
-
click: function click(e) {
|
4903 |
-
var swiper = this;
|
4904 |
-
var ref = swiper.navigation;
|
4905 |
-
var $nextEl = ref.$nextEl;
|
4906 |
-
var $prevEl = ref.$prevEl;
|
4907 |
-
if (
|
4908 |
-
swiper.params.navigation.hideOnClick
|
4909 |
-
&& !$(e.target).is($prevEl)
|
4910 |
-
&& !$(e.target).is($nextEl)
|
4911 |
-
) {
|
4912 |
-
if ($nextEl) { $nextEl.toggleClass(swiper.params.navigation.hiddenClass); }
|
4913 |
-
if ($prevEl) { $prevEl.toggleClass(swiper.params.navigation.hiddenClass); }
|
4914 |
-
}
|
4915 |
-
},
|
4916 |
-
},
|
4917 |
-
};
|
4918 |
-
|
4919 |
-
var Pagination = {
|
4920 |
-
update: function update() {
|
4921 |
-
// Render || Update Pagination bullets/items
|
4922 |
-
var swiper = this;
|
4923 |
-
var rtl = swiper.rtl;
|
4924 |
-
var params = swiper.params.pagination;
|
4925 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
4926 |
-
var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4927 |
-
var $el = swiper.pagination.$el;
|
4928 |
-
// Current/Total
|
4929 |
-
var current;
|
4930 |
-
var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4931 |
-
if (swiper.params.loop) {
|
4932 |
-
current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
|
4933 |
-
if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
|
4934 |
-
current -= (slidesLength - (swiper.loopedSlides * 2));
|
4935 |
-
}
|
4936 |
-
if (current > total - 1) { current -= total; }
|
4937 |
-
if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; }
|
4938 |
-
} else if (typeof swiper.snapIndex !== 'undefined') {
|
4939 |
-
current = swiper.snapIndex;
|
4940 |
-
} else {
|
4941 |
-
current = swiper.activeIndex || 0;
|
4942 |
-
}
|
4943 |
-
// Types
|
4944 |
-
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
4945 |
-
var bullets = swiper.pagination.bullets;
|
4946 |
-
var firstIndex;
|
4947 |
-
var lastIndex;
|
4948 |
-
var midIndex;
|
4949 |
-
if (params.dynamicBullets) {
|
4950 |
-
swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
|
4951 |
-
$el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px"));
|
4952 |
-
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
4953 |
-
swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
|
4954 |
-
if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
|
4955 |
-
swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
|
4956 |
-
} else if (swiper.pagination.dynamicBulletIndex < 0) {
|
4957 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
4958 |
-
}
|
4959 |
-
}
|
4960 |
-
firstIndex = current - swiper.pagination.dynamicBulletIndex;
|
4961 |
-
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
4962 |
-
midIndex = (lastIndex + firstIndex) / 2;
|
4963 |
-
}
|
4964 |
-
bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main"));
|
4965 |
-
if ($el.length > 1) {
|
4966 |
-
bullets.each(function (index, bullet) {
|
4967 |
-
var $bullet = $(bullet);
|
4968 |
-
var bulletIndex = $bullet.index();
|
4969 |
-
if (bulletIndex === current) {
|
4970 |
-
$bullet.addClass(params.bulletActiveClass);
|
4971 |
-
}
|
4972 |
-
if (params.dynamicBullets) {
|
4973 |
-
if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
|
4974 |
-
$bullet.addClass(((params.bulletActiveClass) + "-main"));
|
4975 |
-
}
|
4976 |
-
if (bulletIndex === firstIndex) {
|
4977 |
-
$bullet
|
4978 |
-
.prev()
|
4979 |
-
.addClass(((params.bulletActiveClass) + "-prev"))
|
4980 |
-
.prev()
|
4981 |
-
.addClass(((params.bulletActiveClass) + "-prev-prev"));
|
4982 |
-
}
|
4983 |
-
if (bulletIndex === lastIndex) {
|
4984 |
-
$bullet
|
4985 |
-
.next()
|
4986 |
-
.addClass(((params.bulletActiveClass) + "-next"))
|
4987 |
-
.next()
|
4988 |
-
.addClass(((params.bulletActiveClass) + "-next-next"));
|
4989 |
-
}
|
4990 |
-
}
|
4991 |
-
});
|
4992 |
-
} else {
|
4993 |
-
var $bullet = bullets.eq(current);
|
4994 |
-
$bullet.addClass(params.bulletActiveClass);
|
4995 |
-
if (params.dynamicBullets) {
|
4996 |
-
var $firstDisplayedBullet = bullets.eq(firstIndex);
|
4997 |
-
var $lastDisplayedBullet = bullets.eq(lastIndex);
|
4998 |
-
for (var i = firstIndex; i <= lastIndex; i += 1) {
|
4999 |
-
bullets.eq(i).addClass(((params.bulletActiveClass) + "-main"));
|
5000 |
-
}
|
5001 |
-
$firstDisplayedBullet
|
5002 |
-
.prev()
|
5003 |
-
.addClass(((params.bulletActiveClass) + "-prev"))
|
5004 |
-
.prev()
|
5005 |
-
.addClass(((params.bulletActiveClass) + "-prev-prev"));
|
5006 |
-
$lastDisplayedBullet
|
5007 |
-
.next()
|
5008 |
-
.addClass(((params.bulletActiveClass) + "-next"))
|
5009 |
-
.next()
|
5010 |
-
.addClass(((params.bulletActiveClass) + "-next-next"));
|
5011 |
-
}
|
5012 |
-
}
|
5013 |
-
if (params.dynamicBullets) {
|
5014 |
-
var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
|
5015 |
-
var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
|
5016 |
-
var offsetProp = rtl ? 'right' : 'left';
|
5017 |
-
bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px"));
|
5018 |
-
}
|
5019 |
-
}
|
5020 |
-
if (params.type === 'fraction') {
|
5021 |
-
$el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1));
|
5022 |
-
$el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total));
|
5023 |
-
}
|
5024 |
-
if (params.type === 'progressbar') {
|
5025 |
-
var progressbarDirection;
|
5026 |
-
if (params.progressbarOpposite) {
|
5027 |
-
progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
|
5028 |
-
} else {
|
5029 |
-
progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
|
5030 |
-
}
|
5031 |
-
var scale = (current + 1) / total;
|
5032 |
-
var scaleX = 1;
|
5033 |
-
var scaleY = 1;
|
5034 |
-
if (progressbarDirection === 'horizontal') {
|
5035 |
-
scaleX = scale;
|
5036 |
-
} else {
|
5037 |
-
scaleY = scale;
|
5038 |
-
}
|
5039 |
-
$el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed);
|
5040 |
-
}
|
5041 |
-
if (params.type === 'custom' && params.renderCustom) {
|
5042 |
-
$el.html(params.renderCustom(swiper, current + 1, total));
|
5043 |
-
swiper.emit('paginationRender', swiper, $el[0]);
|
5044 |
-
} else {
|
5045 |
-
swiper.emit('paginationUpdate', swiper, $el[0]);
|
5046 |
-
}
|
5047 |
-
$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
5048 |
-
},
|
5049 |
-
render: function render() {
|
5050 |
-
// Render Container
|
5051 |
-
var swiper = this;
|
5052 |
-
var params = swiper.params.pagination;
|
5053 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
5054 |
-
var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
5055 |
-
|
5056 |
-
var $el = swiper.pagination.$el;
|
5057 |
-
var paginationHTML = '';
|
5058 |
-
if (params.type === 'bullets') {
|
5059 |
-
var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
5060 |
-
for (var i = 0; i < numberOfBullets; i += 1) {
|
5061 |
-
if (params.renderBullet) {
|
5062 |
-
paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
|
5063 |
-
} else {
|
5064 |
-
paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\"></" + (params.bulletElement) + ">";
|
5065 |
-
}
|
5066 |
-
}
|
5067 |
-
$el.html(paginationHTML);
|
5068 |
-
swiper.pagination.bullets = $el.find(("." + (params.bulletClass)));
|
5069 |
-
}
|
5070 |
-
if (params.type === 'fraction') {
|
5071 |
-
if (params.renderFraction) {
|
5072 |
-
paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
|
5073 |
-
} else {
|
5074 |
-
paginationHTML = "<span class=\"" + (params.currentClass) + "\"></span>"
|
5075 |
-
+ ' / '
|
5076 |
-
+ "<span class=\"" + (params.totalClass) + "\"></span>";
|
5077 |
-
}
|
5078 |
-
$el.html(paginationHTML);
|
5079 |
-
}
|
5080 |
-
if (params.type === 'progressbar') {
|
5081 |
-
if (params.renderProgressbar) {
|
5082 |
-
paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
|
5083 |
-
} else {
|
5084 |
-
paginationHTML = "<span class=\"" + (params.progressbarFillClass) + "\"></span>";
|
5085 |
-
}
|
5086 |
-
$el.html(paginationHTML);
|
5087 |
-
}
|
5088 |
-
if (params.type !== 'custom') {
|
5089 |
-
swiper.emit('paginationRender', swiper.pagination.$el[0]);
|
5090 |
-
}
|
5091 |
-
},
|
5092 |
-
init: function init() {
|
5093 |
-
var swiper = this;
|
5094 |
-
var params = swiper.params.pagination;
|
5095 |
-
if (!params.el) { return; }
|
5096 |
-
|
5097 |
-
var $el = $(params.el);
|
5098 |
-
if ($el.length === 0) { return; }
|
5099 |
-
|
5100 |
-
if (
|
5101 |
-
swiper.params.uniqueNavElements
|
5102 |
-
&& typeof params.el === 'string'
|
5103 |
-
&& $el.length > 1
|
5104 |
-
&& swiper.$el.find(params.el).length === 1
|
5105 |
-
) {
|
5106 |
-
$el = swiper.$el.find(params.el);
|
5107 |
-
}
|
5108 |
-
|
5109 |
-
if (params.type === 'bullets' && params.clickable) {
|
5110 |
-
$el.addClass(params.clickableClass);
|
5111 |
-
}
|
5112 |
-
|
5113 |
-
$el.addClass(params.modifierClass + params.type);
|
5114 |
-
|
5115 |
-
if (params.type === 'bullets' && params.dynamicBullets) {
|
5116 |
-
$el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic"));
|
5117 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
5118 |
-
if (params.dynamicMainBullets < 1) {
|
5119 |
-
params.dynamicMainBullets = 1;
|
5120 |
-
}
|
5121 |
-
}
|
5122 |
-
if (params.type === 'progressbar' && params.progressbarOpposite) {
|
5123 |
-
$el.addClass(params.progressbarOppositeClass);
|
5124 |
-
}
|
5125 |
-
|
5126 |
-
if (params.clickable) {
|
5127 |
-
$el.on('click', ("." + (params.bulletClass)), function onClick(e) {
|
5128 |
-
e.preventDefault();
|
5129 |
-
var index = $(this).index() * swiper.params.slidesPerGroup;
|
5130 |
-
if (swiper.params.loop) { index += swiper.loopedSlides; }
|
5131 |
-
swiper.slideTo(index);
|
5132 |
-
});
|
5133 |
-
}
|
5134 |
-
|
5135 |
-
Utils.extend(swiper.pagination, {
|
5136 |
-
$el: $el,
|
5137 |
-
el: $el[0],
|
5138 |
-
});
|
5139 |
-
},
|
5140 |
-
destroy: function destroy() {
|
5141 |
-
var swiper = this;
|
5142 |
-
var params = swiper.params.pagination;
|
5143 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
5144 |
-
var $el = swiper.pagination.$el;
|
5145 |
-
|
5146 |
-
$el.removeClass(params.hiddenClass);
|
5147 |
-
$el.removeClass(params.modifierClass + params.type);
|
5148 |
-
if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); }
|
5149 |
-
if (params.clickable) {
|
5150 |
-
$el.off('click', ("." + (params.bulletClass)));
|
5151 |
-
}
|
5152 |
-
},
|
5153 |
-
};
|
5154 |
-
|
5155 |
-
var Pagination$1 = {
|
5156 |
-
name: 'pagination',
|
5157 |
-
params: {
|
5158 |
-
pagination: {
|
5159 |
-
el: null,
|
5160 |
-
bulletElement: 'span',
|
5161 |
-
clickable: false,
|
5162 |
-
hideOnClick: false,
|
5163 |
-
renderBullet: null,
|
5164 |
-
renderProgressbar: null,
|
5165 |
-
renderFraction: null,
|
5166 |
-
renderCustom: null,
|
5167 |
-
progressbarOpposite: false,
|
5168 |
-
type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
5169 |
-
dynamicBullets: false,
|
5170 |
-
dynamicMainBullets: 1,
|
5171 |
-
formatFractionCurrent: function (number) { return number; },
|
5172 |
-
formatFractionTotal: function (number) { return number; },
|
5173 |
-
bulletClass: 'swiper-pagination-bullet',
|
5174 |
-
bulletActiveClass: 'swiper-pagination-bullet-active',
|
5175 |
-
modifierClass: 'swiper-pagination-', // NEW
|
5176 |
-
currentClass: 'swiper-pagination-current',
|
5177 |
-
totalClass: 'swiper-pagination-total',
|
5178 |
-
hiddenClass: 'swiper-pagination-hidden',
|
5179 |
-
progressbarFillClass: 'swiper-pagination-progressbar-fill',
|
5180 |
-
progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
|
5181 |
-
clickableClass: 'swiper-pagination-clickable', // NEW
|
5182 |
-
lockClass: 'swiper-pagination-lock',
|
5183 |
-
},
|
5184 |
-
},
|
5185 |
-
create: function create() {
|
5186 |
-
var swiper = this;
|
5187 |
-
Utils.extend(swiper, {
|
5188 |
-
pagination: {
|
5189 |
-
init: Pagination.init.bind(swiper),
|
5190 |
-
render: Pagination.render.bind(swiper),
|
5191 |
-
update: Pagination.update.bind(swiper),
|
5192 |
-
destroy: Pagination.destroy.bind(swiper),
|
5193 |
-
dynamicBulletIndex: 0,
|
5194 |
-
},
|
5195 |
-
});
|
5196 |
-
},
|
5197 |
-
on: {
|
5198 |
-
init: function init() {
|
5199 |
-
var swiper = this;
|
5200 |
-
swiper.pagination.init();
|
5201 |
-
swiper.pagination.render();
|
5202 |
-
swiper.pagination.update();
|
5203 |
-
},
|
5204 |
-
activeIndexChange: function activeIndexChange() {
|
5205 |
-
var swiper = this;
|
5206 |
-
if (swiper.params.loop) {
|
5207 |
-
swiper.pagination.update();
|
5208 |
-
} else if (typeof swiper.snapIndex === 'undefined') {
|
5209 |
-
swiper.pagination.update();
|
5210 |
-
}
|
5211 |
-
},
|
5212 |
-
snapIndexChange: function snapIndexChange() {
|
5213 |
-
var swiper = this;
|
5214 |
-
if (!swiper.params.loop) {
|
5215 |
-
swiper.pagination.update();
|
5216 |
-
}
|
5217 |
-
},
|
5218 |
-
slidesLengthChange: function slidesLengthChange() {
|
5219 |
-
var swiper = this;
|
5220 |
-
if (swiper.params.loop) {
|
5221 |
-
swiper.pagination.render();
|
5222 |
-
swiper.pagination.update();
|
5223 |
-
}
|
5224 |
-
},
|
5225 |
-
snapGridLengthChange: function snapGridLengthChange() {
|
5226 |
-
var swiper = this;
|
5227 |
-
if (!swiper.params.loop) {
|
5228 |
-
swiper.pagination.render();
|
5229 |
-
swiper.pagination.update();
|
5230 |
-
}
|
5231 |
-
},
|
5232 |
-
destroy: function destroy() {
|
5233 |
-
var swiper = this;
|
5234 |
-
swiper.pagination.destroy();
|
5235 |
-
},
|
5236 |
-
click: function click(e) {
|
5237 |
-
var swiper = this;
|
5238 |
-
if (
|
5239 |
-
swiper.params.pagination.el
|
5240 |
-
&& swiper.params.pagination.hideOnClick
|
5241 |
-
&& swiper.pagination.$el.length > 0
|
5242 |
-
&& !$(e.target).hasClass(swiper.params.pagination.bulletClass)
|
5243 |
-
) {
|
5244 |
-
swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
|
5245 |
-
}
|
5246 |
-
},
|
5247 |
-
},
|
5248 |
-
};
|
5249 |
-
|
5250 |
-
var Scrollbar = {
|
5251 |
-
setTranslate: function setTranslate() {
|
5252 |
-
var swiper = this;
|
5253 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5254 |
-
var scrollbar = swiper.scrollbar;
|
5255 |
-
var rtl = swiper.rtlTranslate;
|
5256 |
-
var progress = swiper.progress;
|
5257 |
-
var dragSize = scrollbar.dragSize;
|
5258 |
-
var trackSize = scrollbar.trackSize;
|
5259 |
-
var $dragEl = scrollbar.$dragEl;
|
5260 |
-
var $el = scrollbar.$el;
|
5261 |
-
var params = swiper.params.scrollbar;
|
5262 |
-
|
5263 |
-
var newSize = dragSize;
|
5264 |
-
var newPos = (trackSize - dragSize) * progress;
|
5265 |
-
if (rtl) {
|
5266 |
-
newPos = -newPos;
|
5267 |
-
if (newPos > 0) {
|
5268 |
-
newSize = dragSize - newPos;
|
5269 |
-
newPos = 0;
|
5270 |
-
} else if (-newPos + dragSize > trackSize) {
|
5271 |
-
newSize = trackSize + newPos;
|
5272 |
-
}
|
5273 |
-
} else if (newPos < 0) {
|
5274 |
-
newSize = dragSize + newPos;
|
5275 |
-
newPos = 0;
|
5276 |
-
} else if (newPos + dragSize > trackSize) {
|
5277 |
-
newSize = trackSize - newPos;
|
5278 |
-
}
|
5279 |
-
if (swiper.isHorizontal()) {
|
5280 |
-
if (Support.transforms3d) {
|
5281 |
-
$dragEl.transform(("translate3d(" + newPos + "px, 0, 0)"));
|
5282 |
-
} else {
|
5283 |
-
$dragEl.transform(("translateX(" + newPos + "px)"));
|
5284 |
-
}
|
5285 |
-
$dragEl[0].style.width = newSize + "px";
|
5286 |
-
} else {
|
5287 |
-
if (Support.transforms3d) {
|
5288 |
-
$dragEl.transform(("translate3d(0px, " + newPos + "px, 0)"));
|
5289 |
-
} else {
|
5290 |
-
$dragEl.transform(("translateY(" + newPos + "px)"));
|
5291 |
-
}
|
5292 |
-
$dragEl[0].style.height = newSize + "px";
|
5293 |
-
}
|
5294 |
-
if (params.hide) {
|
5295 |
-
clearTimeout(swiper.scrollbar.timeout);
|
5296 |
-
$el[0].style.opacity = 1;
|
5297 |
-
swiper.scrollbar.timeout = setTimeout(function () {
|
5298 |
-
$el[0].style.opacity = 0;
|
5299 |
-
$el.transition(400);
|
5300 |
-
}, 1000);
|
5301 |
-
}
|
5302 |
-
},
|
5303 |
-
setTransition: function setTransition(duration) {
|
5304 |
-
var swiper = this;
|
5305 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5306 |
-
swiper.scrollbar.$dragEl.transition(duration);
|
5307 |
-
},
|
5308 |
-
updateSize: function updateSize() {
|
5309 |
-
var swiper = this;
|
5310 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5311 |
-
|
5312 |
-
var scrollbar = swiper.scrollbar;
|
5313 |
-
var $dragEl = scrollbar.$dragEl;
|
5314 |
-
var $el = scrollbar.$el;
|
5315 |
-
|
5316 |
-
$dragEl[0].style.width = '';
|
5317 |
-
$dragEl[0].style.height = '';
|
5318 |
-
var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
|
5319 |
-
|
5320 |
-
var divider = swiper.size / swiper.virtualSize;
|
5321 |
-
var moveDivider = divider * (trackSize / swiper.size);
|
5322 |
-
var dragSize;
|
5323 |
-
if (swiper.params.scrollbar.dragSize === 'auto') {
|
5324 |
-
dragSize = trackSize * divider;
|
5325 |
-
} else {
|
5326 |
-
dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
|
5327 |
-
}
|
5328 |
-
|
5329 |
-
if (swiper.isHorizontal()) {
|
5330 |
-
$dragEl[0].style.width = dragSize + "px";
|
5331 |
-
} else {
|
5332 |
-
$dragEl[0].style.height = dragSize + "px";
|
5333 |
-
}
|
5334 |
-
|
5335 |
-
if (divider >= 1) {
|
5336 |
-
$el[0].style.display = 'none';
|
5337 |
-
} else {
|
5338 |
-
$el[0].style.display = '';
|
5339 |
-
}
|
5340 |
-
if (swiper.params.scrollbarHide) {
|
5341 |
-
$el[0].style.opacity = 0;
|
5342 |
-
}
|
5343 |
-
Utils.extend(scrollbar, {
|
5344 |
-
trackSize: trackSize,
|
5345 |
-
divider: divider,
|
5346 |
-
moveDivider: moveDivider,
|
5347 |
-
dragSize: dragSize,
|
5348 |
-
});
|
5349 |
-
scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
|
5350 |
-
},
|
5351 |
-
setDragPosition: function setDragPosition(e) {
|
5352 |
-
var swiper = this;
|
5353 |
-
var scrollbar = swiper.scrollbar;
|
5354 |
-
var rtl = swiper.rtlTranslate;
|
5355 |
-
var $el = scrollbar.$el;
|
5356 |
-
var dragSize = scrollbar.dragSize;
|
5357 |
-
var trackSize = scrollbar.trackSize;
|
5358 |
-
|
5359 |
-
var pointerPosition;
|
5360 |
-
if (swiper.isHorizontal()) {
|
5361 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
|
5362 |
-
} else {
|
5363 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
|
5364 |
-
}
|
5365 |
-
var positionRatio;
|
5366 |
-
positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
|
5367 |
-
positionRatio = Math.max(Math.min(positionRatio, 1), 0);
|
5368 |
-
if (rtl) {
|
5369 |
-
positionRatio = 1 - positionRatio;
|
5370 |
-
}
|
5371 |
-
|
5372 |
-
var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
|
5373 |
-
|
5374 |
-
swiper.updateProgress(position);
|
5375 |
-
swiper.setTranslate(position);
|
5376 |
-
swiper.updateActiveIndex();
|
5377 |
-
swiper.updateSlidesClasses();
|
5378 |
-
},
|
5379 |
-
onDragStart: function onDragStart(e) {
|
5380 |
-
var swiper = this;
|
5381 |
-
var params = swiper.params.scrollbar;
|
5382 |
-
var scrollbar = swiper.scrollbar;
|
5383 |
-
var $wrapperEl = swiper.$wrapperEl;
|
5384 |
-
var $el = scrollbar.$el;
|
5385 |
-
var $dragEl = scrollbar.$dragEl;
|
5386 |
-
swiper.scrollbar.isTouched = true;
|
5387 |
-
e.preventDefault();
|
5388 |
-
e.stopPropagation();
|
5389 |
-
|
5390 |
-
$wrapperEl.transition(100);
|
5391 |
-
$dragEl.transition(100);
|
5392 |
-
scrollbar.setDragPosition(e);
|
5393 |
-
|
5394 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
5395 |
-
|
5396 |
-
$el.transition(0);
|
5397 |
-
if (params.hide) {
|
5398 |
-
$el.css('opacity', 1);
|
5399 |
-
}
|
5400 |
-
swiper.emit('scrollbarDragStart', e);
|
5401 |
-
},
|
5402 |
-
onDragMove: function onDragMove(e) {
|
5403 |
-
var swiper = this;
|
5404 |
-
var scrollbar = swiper.scrollbar;
|
5405 |
-
var $wrapperEl = swiper.$wrapperEl;
|
5406 |
-
var $el = scrollbar.$el;
|
5407 |
-
var $dragEl = scrollbar.$dragEl;
|
5408 |
-
|
5409 |
-
if (!swiper.scrollbar.isTouched) { return; }
|
5410 |
-
if (e.preventDefault) { e.preventDefault(); }
|
5411 |
-
else { e.returnValue = false; }
|
5412 |
-
scrollbar.setDragPosition(e);
|
5413 |
-
$wrapperEl.transition(0);
|
5414 |
-
$el.transition(0);
|
5415 |
-
$dragEl.transition(0);
|
5416 |
-
swiper.emit('scrollbarDragMove', e);
|
5417 |
-
},
|
5418 |
-
onDragEnd: function onDragEnd(e) {
|
5419 |
-
var swiper = this;
|
5420 |
-
|
5421 |
-
var params = swiper.params.scrollbar;
|
5422 |
-
var scrollbar = swiper.scrollbar;
|
5423 |
-
var $el = scrollbar.$el;
|
5424 |
-
|
5425 |
-
if (!swiper.scrollbar.isTouched) { return; }
|
5426 |
-
swiper.scrollbar.isTouched = false;
|
5427 |
-
if (params.hide) {
|
5428 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
5429 |
-
swiper.scrollbar.dragTimeout = Utils.nextTick(function () {
|
5430 |
-
$el.css('opacity', 0);
|
5431 |
-
$el.transition(400);
|
5432 |
-
}, 1000);
|
5433 |
-
}
|
5434 |
-
swiper.emit('scrollbarDragEnd', e);
|
5435 |
-
if (params.snapOnRelease) {
|
5436 |
-
swiper.slideToClosest();
|
5437 |
-
}
|
5438 |
-
},
|
5439 |
-
enableDraggable: function enableDraggable() {
|
5440 |
-
var swiper = this;
|
5441 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5442 |
-
var scrollbar = swiper.scrollbar;
|
5443 |
-
var touchEvents = swiper.touchEvents;
|
5444 |
-
var touchEventsDesktop = swiper.touchEventsDesktop;
|
5445 |
-
var params = swiper.params;
|
5446 |
-
var $el = scrollbar.$el;
|
5447 |
-
var target = $el[0];
|
5448 |
-
var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
5449 |
-
var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
5450 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
5451 |
-
target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
5452 |
-
doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
5453 |
-
doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5454 |
-
} else {
|
5455 |
-
if (Support.touch) {
|
5456 |
-
target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
|
5457 |
-
target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
|
5458 |
-
target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5459 |
-
}
|
5460 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
5461 |
-
target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
|
5462 |
-
doc.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
|
5463 |
-
doc.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
|
5464 |
-
}
|
5465 |
-
}
|
5466 |
-
},
|
5467 |
-
disableDraggable: function disableDraggable() {
|
5468 |
-
var swiper = this;
|
5469 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5470 |
-
var scrollbar = swiper.scrollbar;
|
5471 |
-
var touchEvents = swiper.touchEvents;
|
5472 |
-
var touchEventsDesktop = swiper.touchEventsDesktop;
|
5473 |
-
var params = swiper.params;
|
5474 |
-
var $el = scrollbar.$el;
|
5475 |
-
var target = $el[0];
|
5476 |
-
var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
5477 |
-
var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
5478 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
5479 |
-
target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
5480 |
-
doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
5481 |
-
doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5482 |
-
} else {
|
5483 |
-
if (Support.touch) {
|
5484 |
-
target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
|
5485 |
-
target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
|
5486 |
-
target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5487 |
-
}
|
5488 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
5489 |
-
target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
|
5490 |
-
doc.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
|
5491 |
-
doc.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
|
5492 |
-
}
|
5493 |
-
}
|
5494 |
-
},
|
5495 |
-
init: function init() {
|
5496 |
-
var swiper = this;
|
5497 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5498 |
-
var scrollbar = swiper.scrollbar;
|
5499 |
-
var $swiperEl = swiper.$el;
|
5500 |
-
var params = swiper.params.scrollbar;
|
5501 |
-
|
5502 |
-
var $el = $(params.el);
|
5503 |
-
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
|
5504 |
-
$el = $swiperEl.find(params.el);
|
5505 |
-
}
|
5506 |
-
|
5507 |
-
var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass)));
|
5508 |
-
if ($dragEl.length === 0) {
|
5509 |
-
$dragEl = $(("<div class=\"" + (swiper.params.scrollbar.dragClass) + "\"></div>"));
|
5510 |
-
$el.append($dragEl);
|
5511 |
-
}
|
5512 |
-
|
5513 |
-
Utils.extend(scrollbar, {
|
5514 |
-
$el: $el,
|
5515 |
-
el: $el[0],
|
5516 |
-
$dragEl: $dragEl,
|
5517 |
-
dragEl: $dragEl[0],
|
5518 |
-
});
|
5519 |
-
|
5520 |
-
if (params.draggable) {
|
5521 |
-
scrollbar.enableDraggable();
|
5522 |
-
}
|
5523 |
-
},
|
5524 |
-
destroy: function destroy() {
|
5525 |
-
var swiper = this;
|
5526 |
-
swiper.scrollbar.disableDraggable();
|
5527 |
-
},
|
5528 |
-
};
|
5529 |
-
|
5530 |
-
var Scrollbar$1 = {
|
5531 |
-
name: 'scrollbar',
|
5532 |
-
params: {
|
5533 |
-
scrollbar: {
|
5534 |
-
el: null,
|
5535 |
-
dragSize: 'auto',
|
5536 |
-
hide: false,
|
5537 |
-
draggable: false,
|
5538 |
-
snapOnRelease: true,
|
5539 |
-
lockClass: 'swiper-scrollbar-lock',
|
5540 |
-
dragClass: 'swiper-scrollbar-drag',
|
5541 |
-
},
|
5542 |
-
},
|
5543 |
-
create: function create() {
|
5544 |
-
var swiper = this;
|
5545 |
-
Utils.extend(swiper, {
|
5546 |
-
scrollbar: {
|
5547 |
-
init: Scrollbar.init.bind(swiper),
|
5548 |
-
destroy: Scrollbar.destroy.bind(swiper),
|
5549 |
-
updateSize: Scrollbar.updateSize.bind(swiper),
|
5550 |
-
setTranslate: Scrollbar.setTranslate.bind(swiper),
|
5551 |
-
setTransition: Scrollbar.setTransition.bind(swiper),
|
5552 |
-
enableDraggable: Scrollbar.enableDraggable.bind(swiper),
|
5553 |
-
disableDraggable: Scrollbar.disableDraggable.bind(swiper),
|
5554 |
-
setDragPosition: Scrollbar.setDragPosition.bind(swiper),
|
5555 |
-
onDragStart: Scrollbar.onDragStart.bind(swiper),
|
5556 |
-
onDragMove: Scrollbar.onDragMove.bind(swiper),
|
5557 |
-
onDragEnd: Scrollbar.onDragEnd.bind(swiper),
|
5558 |
-
isTouched: false,
|
5559 |
-
timeout: null,
|
5560 |
-
dragTimeout: null,
|
5561 |
-
},
|
5562 |
-
});
|
5563 |
-
},
|
5564 |
-
on: {
|
5565 |
-
init: function init() {
|
5566 |
-
var swiper = this;
|
5567 |
-
swiper.scrollbar.init();
|
5568 |
-
swiper.scrollbar.updateSize();
|
5569 |
-
swiper.scrollbar.setTranslate();
|
5570 |
-
},
|
5571 |
-
update: function update() {
|
5572 |
-
var swiper = this;
|
5573 |
-
swiper.scrollbar.updateSize();
|
5574 |
-
},
|
5575 |
-
resize: function resize() {
|
5576 |
-
var swiper = this;
|
5577 |
-
swiper.scrollbar.updateSize();
|
5578 |
-
},
|
5579 |
-
observerUpdate: function observerUpdate() {
|
5580 |
-
var swiper = this;
|
5581 |
-
swiper.scrollbar.updateSize();
|
5582 |
-
},
|
5583 |
-
setTranslate: function setTranslate() {
|
5584 |
-
var swiper = this;
|
5585 |
-
swiper.scrollbar.setTranslate();
|
5586 |
-
},
|
5587 |
-
setTransition: function setTransition(duration) {
|
5588 |
-
var swiper = this;
|
5589 |
-
swiper.scrollbar.setTransition(duration);
|
5590 |
-
},
|
5591 |
-
destroy: function destroy() {
|
5592 |
-
var swiper = this;
|
5593 |
-
swiper.scrollbar.destroy();
|
5594 |
-
},
|
5595 |
-
},
|
5596 |
-
};
|
5597 |
-
|
5598 |
-
var Parallax = {
|
5599 |
-
setTransform: function setTransform(el, progress) {
|
5600 |
-
var swiper = this;
|
5601 |
-
var rtl = swiper.rtl;
|
5602 |
-
|
5603 |
-
var $el = $(el);
|
5604 |
-
var rtlFactor = rtl ? -1 : 1;
|
5605 |
-
|
5606 |
-
var p = $el.attr('data-swiper-parallax') || '0';
|
5607 |
-
var x = $el.attr('data-swiper-parallax-x');
|
5608 |
-
var y = $el.attr('data-swiper-parallax-y');
|
5609 |
-
var scale = $el.attr('data-swiper-parallax-scale');
|
5610 |
-
var opacity = $el.attr('data-swiper-parallax-opacity');
|
5611 |
-
|
5612 |
-
if (x || y) {
|
5613 |
-
x = x || '0';
|
5614 |
-
y = y || '0';
|
5615 |
-
} else if (swiper.isHorizontal()) {
|
5616 |
-
x = p;
|
5617 |
-
y = '0';
|
5618 |
-
} else {
|
5619 |
-
y = p;
|
5620 |
-
x = '0';
|
5621 |
-
}
|
5622 |
-
|
5623 |
-
if ((x).indexOf('%') >= 0) {
|
5624 |
-
x = (parseInt(x, 10) * progress * rtlFactor) + "%";
|
5625 |
-
} else {
|
5626 |
-
x = (x * progress * rtlFactor) + "px";
|
5627 |
-
}
|
5628 |
-
if ((y).indexOf('%') >= 0) {
|
5629 |
-
y = (parseInt(y, 10) * progress) + "%";
|
5630 |
-
} else {
|
5631 |
-
y = (y * progress) + "px";
|
5632 |
-
}
|
5633 |
-
|
5634 |
-
if (typeof opacity !== 'undefined' && opacity !== null) {
|
5635 |
-
var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
|
5636 |
-
$el[0].style.opacity = currentOpacity;
|
5637 |
-
}
|
5638 |
-
if (typeof scale === 'undefined' || scale === null) {
|
5639 |
-
$el.transform(("translate3d(" + x + ", " + y + ", 0px)"));
|
5640 |
-
} else {
|
5641 |
-
var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
|
5642 |
-
$el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")"));
|
5643 |
-
}
|
5644 |
-
},
|
5645 |
-
setTranslate: function setTranslate() {
|
5646 |
-
var swiper = this;
|
5647 |
-
var $el = swiper.$el;
|
5648 |
-
var slides = swiper.slides;
|
5649 |
-
var progress = swiper.progress;
|
5650 |
-
var snapGrid = swiper.snapGrid;
|
5651 |
-
$el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5652 |
-
.each(function (index, el) {
|
5653 |
-
swiper.parallax.setTransform(el, progress);
|
5654 |
-
});
|
5655 |
-
slides.each(function (slideIndex, slideEl) {
|
5656 |
-
var slideProgress = slideEl.progress;
|
5657 |
-
if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
|
5658 |
-
slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
|
5659 |
-
}
|
5660 |
-
slideProgress = Math.min(Math.max(slideProgress, -1), 1);
|
5661 |
-
$(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5662 |
-
.each(function (index, el) {
|
5663 |
-
swiper.parallax.setTransform(el, slideProgress);
|
5664 |
-
});
|
5665 |
-
});
|
5666 |
-
},
|
5667 |
-
setTransition: function setTransition(duration) {
|
5668 |
-
if ( duration === void 0 ) duration = this.params.speed;
|
5669 |
-
|
5670 |
-
var swiper = this;
|
5671 |
-
var $el = swiper.$el;
|
5672 |
-
$el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5673 |
-
.each(function (index, parallaxEl) {
|
5674 |
-
var $parallaxEl = $(parallaxEl);
|
5675 |
-
var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
|
5676 |
-
if (duration === 0) { parallaxDuration = 0; }
|
5677 |
-
$parallaxEl.transition(parallaxDuration);
|
5678 |
-
});
|
5679 |
-
},
|
5680 |
-
};
|
5681 |
-
|
5682 |
-
var Parallax$1 = {
|
5683 |
-
name: 'parallax',
|
5684 |
-
params: {
|
5685 |
-
parallax: {
|
5686 |
-
enabled: false,
|
5687 |
-
},
|
5688 |
-
},
|
5689 |
-
create: function create() {
|
5690 |
-
var swiper = this;
|
5691 |
-
Utils.extend(swiper, {
|
5692 |
-
parallax: {
|
5693 |
-
setTransform: Parallax.setTransform.bind(swiper),
|
5694 |
-
setTranslate: Parallax.setTranslate.bind(swiper),
|
5695 |
-
setTransition: Parallax.setTransition.bind(swiper),
|
5696 |
-
},
|
5697 |
-
});
|
5698 |
-
},
|
5699 |
-
on: {
|
5700 |
-
beforeInit: function beforeInit() {
|
5701 |
-
var swiper = this;
|
5702 |
-
if (!swiper.params.parallax.enabled) { return; }
|
5703 |
-
swiper.params.watchSlidesProgress = true;
|
5704 |
-
},
|
5705 |
-
init: function init() {
|
5706 |
-
var swiper = this;
|
5707 |
-
if (!swiper.params.parallax) { return; }
|
5708 |
-
swiper.parallax.setTranslate();
|
5709 |
-
},
|
5710 |
-
setTranslate: function setTranslate() {
|
5711 |
-
var swiper = this;
|
5712 |
-
if (!swiper.params.parallax) { return; }
|
5713 |
-
swiper.parallax.setTranslate();
|
5714 |
-
},
|
5715 |
-
setTransition: function setTransition(duration) {
|
5716 |
-
var swiper = this;
|
5717 |
-
if (!swiper.params.parallax) { return; }
|
5718 |
-
swiper.parallax.setTransition(duration);
|
5719 |
-
},
|
5720 |
-
},
|
5721 |
-
};
|
5722 |
-
|
5723 |
-
var Zoom = {
|
5724 |
-
// Calc Scale From Multi-touches
|
5725 |
-
getDistanceBetweenTouches: function getDistanceBetweenTouches(e) {
|
5726 |
-
if (e.targetTouches.length < 2) { return 1; }
|
5727 |
-
var x1 = e.targetTouches[0].pageX;
|
5728 |
-
var y1 = e.targetTouches[0].pageY;
|
5729 |
-
var x2 = e.targetTouches[1].pageX;
|
5730 |
-
var y2 = e.targetTouches[1].pageY;
|
5731 |
-
var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 )));
|
5732 |
-
return distance;
|
5733 |
-
},
|
5734 |
-
// Events
|
5735 |
-
onGestureStart: function onGestureStart(e) {
|
5736 |
-
var swiper = this;
|
5737 |
-
var params = swiper.params.zoom;
|
5738 |
-
var zoom = swiper.zoom;
|
5739 |
-
var gesture = zoom.gesture;
|
5740 |
-
zoom.fakeGestureTouched = false;
|
5741 |
-
zoom.fakeGestureMoved = false;
|
5742 |
-
if (!Support.gestures) {
|
5743 |
-
if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
|
5744 |
-
return;
|
5745 |
-
}
|
5746 |
-
zoom.fakeGestureTouched = true;
|
5747 |
-
gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
|
5748 |
-
}
|
5749 |
-
if (!gesture.$slideEl || !gesture.$slideEl.length) {
|
5750 |
-
gesture.$slideEl = $(e.target).closest('.swiper-slide');
|
5751 |
-
if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); }
|
5752 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5753 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
5754 |
-
gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5755 |
-
if (gesture.$imageWrapEl.length === 0) {
|
5756 |
-
gesture.$imageEl = undefined;
|
5757 |
-
return;
|
5758 |
-
}
|
5759 |
-
}
|
5760 |
-
gesture.$imageEl.transition(0);
|
5761 |
-
swiper.zoom.isScaling = true;
|
5762 |
-
},
|
5763 |
-
onGestureChange: function onGestureChange(e) {
|
5764 |
-
var swiper = this;
|
5765 |
-
var params = swiper.params.zoom;
|
5766 |
-
var zoom = swiper.zoom;
|
5767 |
-
var gesture = zoom.gesture;
|
5768 |
-
if (!Support.gestures) {
|
5769 |
-
if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
|
5770 |
-
return;
|
5771 |
-
}
|
5772 |
-
zoom.fakeGestureMoved = true;
|
5773 |
-
gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
|
5774 |
-
}
|
5775 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5776 |
-
if (Support.gestures) {
|
5777 |
-
swiper.zoom.scale = e.scale * zoom.currentScale;
|
5778 |
-
} else {
|
5779 |
-
zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
|
5780 |
-
}
|
5781 |
-
if (zoom.scale > gesture.maxRatio) {
|
5782 |
-
zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 ));
|
5783 |
-
}
|
5784 |
-
if (zoom.scale < params.minRatio) {
|
5785 |
-
zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 ));
|
5786 |
-
}
|
5787 |
-
gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
5788 |
-
},
|
5789 |
-
onGestureEnd: function onGestureEnd(e) {
|
5790 |
-
var swiper = this;
|
5791 |
-
var params = swiper.params.zoom;
|
5792 |
-
var zoom = swiper.zoom;
|
5793 |
-
var gesture = zoom.gesture;
|
5794 |
-
if (!Support.gestures) {
|
5795 |
-
if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
|
5796 |
-
return;
|
5797 |
-
}
|
5798 |
-
if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
|
5799 |
-
return;
|
5800 |
-
}
|
5801 |
-
zoom.fakeGestureTouched = false;
|
5802 |
-
zoom.fakeGestureMoved = false;
|
5803 |
-
}
|
5804 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5805 |
-
zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
|
5806 |
-
gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
5807 |
-
zoom.currentScale = zoom.scale;
|
5808 |
-
zoom.isScaling = false;
|
5809 |
-
if (zoom.scale === 1) { gesture.$slideEl = undefined; }
|
5810 |
-
},
|
5811 |
-
onTouchStart: function onTouchStart(e) {
|
5812 |
-
var swiper = this;
|
5813 |
-
var zoom = swiper.zoom;
|
5814 |
-
var gesture = zoom.gesture;
|
5815 |
-
var image = zoom.image;
|
5816 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5817 |
-
if (image.isTouched) { return; }
|
5818 |
-
if (Device.android) { e.preventDefault(); }
|
5819 |
-
image.isTouched = true;
|
5820 |
-
image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
5821 |
-
image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
5822 |
-
},
|
5823 |
-
onTouchMove: function onTouchMove(e) {
|
5824 |
-
var swiper = this;
|
5825 |
-
var zoom = swiper.zoom;
|
5826 |
-
var gesture = zoom.gesture;
|
5827 |
-
var image = zoom.image;
|
5828 |
-
var velocity = zoom.velocity;
|
5829 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5830 |
-
swiper.allowClick = false;
|
5831 |
-
if (!image.isTouched || !gesture.$slideEl) { return; }
|
5832 |
-
|
5833 |
-
if (!image.isMoved) {
|
5834 |
-
image.width = gesture.$imageEl[0].offsetWidth;
|
5835 |
-
image.height = gesture.$imageEl[0].offsetHeight;
|
5836 |
-
image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
|
5837 |
-
image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
|
5838 |
-
gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
|
5839 |
-
gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
|
5840 |
-
gesture.$imageWrapEl.transition(0);
|
5841 |
-
if (swiper.rtl) {
|
5842 |
-
image.startX = -image.startX;
|
5843 |
-
image.startY = -image.startY;
|
5844 |
-
}
|
5845 |
-
}
|
5846 |
-
// Define if we need image drag
|
5847 |
-
var scaledWidth = image.width * zoom.scale;
|
5848 |
-
var scaledHeight = image.height * zoom.scale;
|
5849 |
-
|
5850 |
-
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; }
|
5851 |
-
|
5852 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5853 |
-
image.maxX = -image.minX;
|
5854 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5855 |
-
image.maxY = -image.minY;
|
5856 |
-
|
5857 |
-
image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
5858 |
-
image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
5859 |
-
|
5860 |
-
if (!image.isMoved && !zoom.isScaling) {
|
5861 |
-
if (
|
5862 |
-
swiper.isHorizontal()
|
5863 |
-
&& (
|
5864 |
-
(Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
|
5865 |
-
|| (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
|
5866 |
-
)
|
5867 |
-
) {
|
5868 |
-
image.isTouched = false;
|
5869 |
-
return;
|
5870 |
-
} if (
|
5871 |
-
!swiper.isHorizontal()
|
5872 |
-
&& (
|
5873 |
-
(Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
|
5874 |
-
|| (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
|
5875 |
-
)
|
5876 |
-
) {
|
5877 |
-
image.isTouched = false;
|
5878 |
-
return;
|
5879 |
-
}
|
5880 |
-
}
|
5881 |
-
e.preventDefault();
|
5882 |
-
e.stopPropagation();
|
5883 |
-
|
5884 |
-
image.isMoved = true;
|
5885 |
-
image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
|
5886 |
-
image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
|
5887 |
-
|
5888 |
-
if (image.currentX < image.minX) {
|
5889 |
-
image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 ));
|
5890 |
-
}
|
5891 |
-
if (image.currentX > image.maxX) {
|
5892 |
-
image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 ));
|
5893 |
-
}
|
5894 |
-
|
5895 |
-
if (image.currentY < image.minY) {
|
5896 |
-
image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 ));
|
5897 |
-
}
|
5898 |
-
if (image.currentY > image.maxY) {
|
5899 |
-
image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 ));
|
5900 |
-
}
|
5901 |
-
|
5902 |
-
// Velocity
|
5903 |
-
if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; }
|
5904 |
-
if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; }
|
5905 |
-
if (!velocity.prevTime) { velocity.prevTime = Date.now(); }
|
5906 |
-
velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
|
5907 |
-
velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
|
5908 |
-
if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; }
|
5909 |
-
if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; }
|
5910 |
-
velocity.prevPositionX = image.touchesCurrent.x;
|
5911 |
-
velocity.prevPositionY = image.touchesCurrent.y;
|
5912 |
-
velocity.prevTime = Date.now();
|
5913 |
-
|
5914 |
-
gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
|
5915 |
-
},
|
5916 |
-
onTouchEnd: function onTouchEnd() {
|
5917 |
-
var swiper = this;
|
5918 |
-
var zoom = swiper.zoom;
|
5919 |
-
var gesture = zoom.gesture;
|
5920 |
-
var image = zoom.image;
|
5921 |
-
var velocity = zoom.velocity;
|
5922 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5923 |
-
if (!image.isTouched || !image.isMoved) {
|
5924 |
-
image.isTouched = false;
|
5925 |
-
image.isMoved = false;
|
5926 |
-
return;
|
5927 |
-
}
|
5928 |
-
image.isTouched = false;
|
5929 |
-
image.isMoved = false;
|
5930 |
-
var momentumDurationX = 300;
|
5931 |
-
var momentumDurationY = 300;
|
5932 |
-
var momentumDistanceX = velocity.x * momentumDurationX;
|
5933 |
-
var newPositionX = image.currentX + momentumDistanceX;
|
5934 |
-
var momentumDistanceY = velocity.y * momentumDurationY;
|
5935 |
-
var newPositionY = image.currentY + momentumDistanceY;
|
5936 |
-
|
5937 |
-
// Fix duration
|
5938 |
-
if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); }
|
5939 |
-
if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); }
|
5940 |
-
var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
5941 |
-
|
5942 |
-
image.currentX = newPositionX;
|
5943 |
-
image.currentY = newPositionY;
|
5944 |
-
|
5945 |
-
// Define if we need image drag
|
5946 |
-
var scaledWidth = image.width * zoom.scale;
|
5947 |
-
var scaledHeight = image.height * zoom.scale;
|
5948 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5949 |
-
image.maxX = -image.minX;
|
5950 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5951 |
-
image.maxY = -image.minY;
|
5952 |
-
image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
|
5953 |
-
image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
|
5954 |
-
|
5955 |
-
gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
|
5956 |
-
},
|
5957 |
-
onTransitionEnd: function onTransitionEnd() {
|
5958 |
-
var swiper = this;
|
5959 |
-
var zoom = swiper.zoom;
|
5960 |
-
var gesture = zoom.gesture;
|
5961 |
-
if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
|
5962 |
-
gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
|
5963 |
-
gesture.$imageWrapEl.transform('translate3d(0,0,0)');
|
5964 |
-
gesture.$slideEl = undefined;
|
5965 |
-
gesture.$imageEl = undefined;
|
5966 |
-
gesture.$imageWrapEl = undefined;
|
5967 |
-
|
5968 |
-
zoom.scale = 1;
|
5969 |
-
zoom.currentScale = 1;
|
5970 |
-
}
|
5971 |
-
},
|
5972 |
-
// Toggle Zoom
|
5973 |
-
toggle: function toggle(e) {
|
5974 |
-
var swiper = this;
|
5975 |
-
var zoom = swiper.zoom;
|
5976 |
-
|
5977 |
-
if (zoom.scale && zoom.scale !== 1) {
|
5978 |
-
// Zoom Out
|
5979 |
-
zoom.out();
|
5980 |
-
} else {
|
5981 |
-
// Zoom In
|
5982 |
-
zoom.in(e);
|
5983 |
-
}
|
5984 |
-
},
|
5985 |
-
in: function in$1(e) {
|
5986 |
-
var swiper = this;
|
5987 |
-
|
5988 |
-
var zoom = swiper.zoom;
|
5989 |
-
var params = swiper.params.zoom;
|
5990 |
-
var gesture = zoom.gesture;
|
5991 |
-
var image = zoom.image;
|
5992 |
-
|
5993 |
-
if (!gesture.$slideEl) {
|
5994 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
5995 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5996 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
5997 |
-
}
|
5998 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5999 |
-
|
6000 |
-
gesture.$slideEl.addClass(("" + (params.zoomedSlideClass)));
|
6001 |
-
|
6002 |
-
var touchX;
|
6003 |
-
var touchY;
|
6004 |
-
var offsetX;
|
6005 |
-
var offsetY;
|
6006 |
-
var diffX;
|
6007 |
-
var diffY;
|
6008 |
-
var translateX;
|
6009 |
-
var translateY;
|
6010 |
-
var imageWidth;
|
6011 |
-
var imageHeight;
|
6012 |
-
var scaledWidth;
|
6013 |
-
var scaledHeight;
|
6014 |
-
var translateMinX;
|
6015 |
-
var translateMinY;
|
6016 |
-
var translateMaxX;
|
6017 |
-
var translateMaxY;
|
6018 |
-
var slideWidth;
|
6019 |
-
var slideHeight;
|
6020 |
-
|
6021 |
-
if (typeof image.touchesStart.x === 'undefined' && e) {
|
6022 |
-
touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
|
6023 |
-
touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
|
6024 |
-
} else {
|
6025 |
-
touchX = image.touchesStart.x;
|
6026 |
-
touchY = image.touchesStart.y;
|
6027 |
-
}
|
6028 |
-
|
6029 |
-
zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
6030 |
-
zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
6031 |
-
if (e) {
|
6032 |
-
slideWidth = gesture.$slideEl[0].offsetWidth;
|
6033 |
-
slideHeight = gesture.$slideEl[0].offsetHeight;
|
6034 |
-
offsetX = gesture.$slideEl.offset().left;
|
6035 |
-
offsetY = gesture.$slideEl.offset().top;
|
6036 |
-
diffX = (offsetX + (slideWidth / 2)) - touchX;
|
6037 |
-
diffY = (offsetY + (slideHeight / 2)) - touchY;
|
6038 |
-
|
6039 |
-
imageWidth = gesture.$imageEl[0].offsetWidth;
|
6040 |
-
imageHeight = gesture.$imageEl[0].offsetHeight;
|
6041 |
-
scaledWidth = imageWidth * zoom.scale;
|
6042 |
-
scaledHeight = imageHeight * zoom.scale;
|
6043 |
-
|
6044 |
-
translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
|
6045 |
-
translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
|
6046 |
-
translateMaxX = -translateMinX;
|
6047 |
-
translateMaxY = -translateMinY;
|
6048 |
-
|
6049 |
-
translateX = diffX * zoom.scale;
|
6050 |
-
translateY = diffY * zoom.scale;
|
6051 |
-
|
6052 |
-
if (translateX < translateMinX) {
|
6053 |
-
translateX = translateMinX;
|
6054 |
-
}
|
6055 |
-
if (translateX > translateMaxX) {
|
6056 |
-
translateX = translateMaxX;
|
6057 |
-
}
|
6058 |
-
|
6059 |
-
if (translateY < translateMinY) {
|
6060 |
-
translateY = translateMinY;
|
6061 |
-
}
|
6062 |
-
if (translateY > translateMaxY) {
|
6063 |
-
translateY = translateMaxY;
|
6064 |
-
}
|
6065 |
-
} else {
|
6066 |
-
translateX = 0;
|
6067 |
-
translateY = 0;
|
6068 |
-
}
|
6069 |
-
gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)"));
|
6070 |
-
gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
6071 |
-
},
|
6072 |
-
out: function out() {
|
6073 |
-
var swiper = this;
|
6074 |
-
|
6075 |
-
var zoom = swiper.zoom;
|
6076 |
-
var params = swiper.params.zoom;
|
6077 |
-
var gesture = zoom.gesture;
|
6078 |
-
|
6079 |
-
if (!gesture.$slideEl) {
|
6080 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
6081 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
6082 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
6083 |
-
}
|
6084 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
6085 |
-
|
6086 |
-
zoom.scale = 1;
|
6087 |
-
zoom.currentScale = 1;
|
6088 |
-
gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
|
6089 |
-
gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
|
6090 |
-
gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass)));
|
6091 |
-
gesture.$slideEl = undefined;
|
6092 |
-
},
|
6093 |
-
// Attach/Detach Events
|
6094 |
-
enable: function enable() {
|
6095 |
-
var swiper = this;
|
6096 |
-
var zoom = swiper.zoom;
|
6097 |
-
if (zoom.enabled) { return; }
|
6098 |
-
zoom.enabled = true;
|
6099 |
-
|
6100 |
-
var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
6101 |
-
|
6102 |
-
// Scale image
|
6103 |
-
if (Support.gestures) {
|
6104 |
-
swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6105 |
-
swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6106 |
-
swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6107 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
6108 |
-
swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6109 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6110 |
-
swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6111 |
-
}
|
6112 |
-
|
6113 |
-
// Move image
|
6114 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
|
6115 |
-
},
|
6116 |
-
disable: function disable() {
|
6117 |
-
var swiper = this;
|
6118 |
-
var zoom = swiper.zoom;
|
6119 |
-
if (!zoom.enabled) { return; }
|
6120 |
-
|
6121 |
-
swiper.zoom.enabled = false;
|
6122 |
-
|
6123 |
-
var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
6124 |
-
|
6125 |
-
// Scale image
|
6126 |
-
if (Support.gestures) {
|
6127 |
-
swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6128 |
-
swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6129 |
-
swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6130 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
6131 |
-
swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6132 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6133 |
-
swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6134 |
-
}
|
6135 |
-
|
6136 |
-
// Move image
|
6137 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
|
6138 |
-
},
|
6139 |
-
};
|
6140 |
-
|
6141 |
-
var Zoom$1 = {
|
6142 |
-
name: 'zoom',
|
6143 |
-
params: {
|
6144 |
-
zoom: {
|
6145 |
-
enabled: false,
|
6146 |
-
maxRatio: 3,
|
6147 |
-
minRatio: 1,
|
6148 |
-
toggle: true,
|
6149 |
-
containerClass: 'swiper-zoom-container',
|
6150 |
-
zoomedSlideClass: 'swiper-slide-zoomed',
|
6151 |
-
},
|
6152 |
-
},
|
6153 |
-
create: function create() {
|
6154 |
-
var swiper = this;
|
6155 |
-
var zoom = {
|
6156 |
-
enabled: false,
|
6157 |
-
scale: 1,
|
6158 |
-
currentScale: 1,
|
6159 |
-
isScaling: false,
|
6160 |
-
gesture: {
|
6161 |
-
$slideEl: undefined,
|
6162 |
-
slideWidth: undefined,
|
6163 |
-
slideHeight: undefined,
|
6164 |
-
$imageEl: undefined,
|
6165 |
-
$imageWrapEl: undefined,
|
6166 |
-
maxRatio: 3,
|
6167 |
-
},
|
6168 |
-
image: {
|
6169 |
-
isTouched: undefined,
|
6170 |
-
isMoved: undefined,
|
6171 |
-
currentX: undefined,
|
6172 |
-
currentY: undefined,
|
6173 |
-
minX: undefined,
|
6174 |
-
minY: undefined,
|
6175 |
-
maxX: undefined,
|
6176 |
-
maxY: undefined,
|
6177 |
-
width: undefined,
|
6178 |
-
height: undefined,
|
6179 |
-
startX: undefined,
|
6180 |
-
startY: undefined,
|
6181 |
-
touchesStart: {},
|
6182 |
-
touchesCurrent: {},
|
6183 |
-
},
|
6184 |
-
velocity: {
|
6185 |
-
x: undefined,
|
6186 |
-
y: undefined,
|
6187 |
-
prevPositionX: undefined,
|
6188 |
-
prevPositionY: undefined,
|
6189 |
-
prevTime: undefined,
|
6190 |
-
},
|
6191 |
-
};
|
6192 |
-
('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) {
|
6193 |
-
zoom[methodName] = Zoom[methodName].bind(swiper);
|
6194 |
-
});
|
6195 |
-
Utils.extend(swiper, {
|
6196 |
-
zoom: zoom,
|
6197 |
-
});
|
6198 |
-
},
|
6199 |
-
on: {
|
6200 |
-
init: function init() {
|
6201 |
-
var swiper = this;
|
6202 |
-
if (swiper.params.zoom.enabled) {
|
6203 |
-
swiper.zoom.enable();
|
6204 |
-
}
|
6205 |
-
},
|
6206 |
-
destroy: function destroy() {
|
6207 |
-
var swiper = this;
|
6208 |
-
swiper.zoom.disable();
|
6209 |
-
},
|
6210 |
-
touchStart: function touchStart(e) {
|
6211 |
-
var swiper = this;
|
6212 |
-
if (!swiper.zoom.enabled) { return; }
|
6213 |
-
swiper.zoom.onTouchStart(e);
|
6214 |
-
},
|
6215 |
-
touchEnd: function touchEnd(e) {
|
6216 |
-
var swiper = this;
|
6217 |
-
if (!swiper.zoom.enabled) { return; }
|
6218 |
-
swiper.zoom.onTouchEnd(e);
|
6219 |
-
},
|
6220 |
-
doubleTap: function doubleTap(e) {
|
6221 |
-
var swiper = this;
|
6222 |
-
if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
|
6223 |
-
swiper.zoom.toggle(e);
|
6224 |
-
}
|
6225 |
-
},
|
6226 |
-
transitionEnd: function transitionEnd() {
|
6227 |
-
var swiper = this;
|
6228 |
-
if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
|
6229 |
-
swiper.zoom.onTransitionEnd();
|
6230 |
-
}
|
6231 |
-
},
|
6232 |
-
},
|
6233 |
-
};
|
6234 |
-
|
6235 |
-
var Lazy = {
|
6236 |
-
loadInSlide: function loadInSlide(index, loadInDuplicate) {
|
6237 |
-
if ( loadInDuplicate === void 0 ) loadInDuplicate = true;
|
6238 |
-
|
6239 |
-
var swiper = this;
|
6240 |
-
var params = swiper.params.lazy;
|
6241 |
-
if (typeof index === 'undefined') { return; }
|
6242 |
-
if (swiper.slides.length === 0) { return; }
|
6243 |
-
var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
6244 |
-
|
6245 |
-
var $slideEl = isVirtual
|
6246 |
-
? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]"))
|
6247 |
-
: swiper.slides.eq(index);
|
6248 |
-
|
6249 |
-
var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")"));
|
6250 |
-
if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
|
6251 |
-
$images = $images.add($slideEl[0]);
|
6252 |
-
}
|
6253 |
-
if ($images.length === 0) { return; }
|
6254 |
-
|
6255 |
-
$images.each(function (imageIndex, imageEl) {
|
6256 |
-
var $imageEl = $(imageEl);
|
6257 |
-
$imageEl.addClass(params.loadingClass);
|
6258 |
-
|
6259 |
-
var background = $imageEl.attr('data-background');
|
6260 |
-
var src = $imageEl.attr('data-src');
|
6261 |
-
var srcset = $imageEl.attr('data-srcset');
|
6262 |
-
var sizes = $imageEl.attr('data-sizes');
|
6263 |
-
|
6264 |
-
swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () {
|
6265 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; }
|
6266 |
-
if (background) {
|
6267 |
-
$imageEl.css('background-image', ("url(\"" + background + "\")"));
|
6268 |
-
$imageEl.removeAttr('data-background');
|
6269 |
-
} else {
|
6270 |
-
if (srcset) {
|
6271 |
-
$imageEl.attr('srcset', srcset);
|
6272 |
-
$imageEl.removeAttr('data-srcset');
|
6273 |
-
}
|
6274 |
-
if (sizes) {
|
6275 |
-
$imageEl.attr('sizes', sizes);
|
6276 |
-
$imageEl.removeAttr('data-sizes');
|
6277 |
-
}
|
6278 |
-
if (src) {
|
6279 |
-
$imageEl.attr('src', src);
|
6280 |
-
$imageEl.removeAttr('data-src');
|
6281 |
-
}
|
6282 |
-
}
|
6283 |
-
|
6284 |
-
$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
|
6285 |
-
$slideEl.find(("." + (params.preloaderClass))).remove();
|
6286 |
-
if (swiper.params.loop && loadInDuplicate) {
|
6287 |
-
var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
|
6288 |
-
if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
|
6289 |
-
var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")"));
|
6290 |
-
swiper.lazy.loadInSlide(originalSlide.index(), false);
|
6291 |
-
} else {
|
6292 |
-
var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]"));
|
6293 |
-
swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
|
6294 |
-
}
|
6295 |
-
}
|
6296 |
-
swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
|
6297 |
-
});
|
6298 |
-
|
6299 |
-
swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
|
6300 |
-
});
|
6301 |
-
},
|
6302 |
-
load: function load() {
|
6303 |
-
var swiper = this;
|
6304 |
-
var $wrapperEl = swiper.$wrapperEl;
|
6305 |
-
var swiperParams = swiper.params;
|
6306 |
-
var slides = swiper.slides;
|
6307 |
-
var activeIndex = swiper.activeIndex;
|
6308 |
-
var isVirtual = swiper.virtual && swiperParams.virtual.enabled;
|
6309 |
-
var params = swiperParams.lazy;
|
6310 |
-
|
6311 |
-
var slidesPerView = swiperParams.slidesPerView;
|
6312 |
-
if (slidesPerView === 'auto') {
|
6313 |
-
slidesPerView = 0;
|
6314 |
-
}
|
6315 |
-
|
6316 |
-
function slideExist(index) {
|
6317 |
-
if (isVirtual) {
|
6318 |
-
if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) {
|
6319 |
-
return true;
|
6320 |
-
}
|
6321 |
-
} else if (slides[index]) { return true; }
|
6322 |
-
return false;
|
6323 |
-
}
|
6324 |
-
function slideIndex(slideEl) {
|
6325 |
-
if (isVirtual) {
|
6326 |
-
return $(slideEl).attr('data-swiper-slide-index');
|
6327 |
-
}
|
6328 |
-
return $(slideEl).index();
|
6329 |
-
}
|
6330 |
-
|
6331 |
-
if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; }
|
6332 |
-
if (swiper.params.watchSlidesVisibility) {
|
6333 |
-
$wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) {
|
6334 |
-
var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
|
6335 |
-
swiper.lazy.loadInSlide(index);
|
6336 |
-
});
|
6337 |
-
} else if (slidesPerView > 1) {
|
6338 |
-
for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
|
6339 |
-
if (slideExist(i)) { swiper.lazy.loadInSlide(i); }
|
6340 |
-
}
|
6341 |
-
} else {
|
6342 |
-
swiper.lazy.loadInSlide(activeIndex);
|
6343 |
-
}
|
6344 |
-
if (params.loadPrevNext) {
|
6345 |
-
if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
|
6346 |
-
var amount = params.loadPrevNextAmount;
|
6347 |
-
var spv = slidesPerView;
|
6348 |
-
var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
|
6349 |
-
var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
|
6350 |
-
// Next Slides
|
6351 |
-
for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) {
|
6352 |
-
if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); }
|
6353 |
-
}
|
6354 |
-
// Prev Slides
|
6355 |
-
for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) {
|
6356 |
-
if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); }
|
6357 |
-
}
|
6358 |
-
} else {
|
6359 |
-
var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass)));
|
6360 |
-
if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); }
|
6361 |
-
|
6362 |
-
var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass)));
|
6363 |
-
if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); }
|
6364 |
-
}
|
6365 |
-
}
|
6366 |
-
},
|
6367 |
-
};
|
6368 |
-
|
6369 |
-
var Lazy$1 = {
|
6370 |
-
name: 'lazy',
|
6371 |
-
params: {
|
6372 |
-
lazy: {
|
6373 |
-
enabled: false,
|
6374 |
-
loadPrevNext: false,
|
6375 |
-
loadPrevNextAmount: 1,
|
6376 |
-
loadOnTransitionStart: false,
|
6377 |
-
|
6378 |
-
elementClass: 'swiper-lazy',
|
6379 |
-
loadingClass: 'swiper-lazy-loading',
|
6380 |
-
loadedClass: 'swiper-lazy-loaded',
|
6381 |
-
preloaderClass: 'swiper-lazy-preloader',
|
6382 |
-
},
|
6383 |
-
},
|
6384 |
-
create: function create() {
|
6385 |
-
var swiper = this;
|
6386 |
-
Utils.extend(swiper, {
|
6387 |
-
lazy: {
|
6388 |
-
initialImageLoaded: false,
|
6389 |
-
load: Lazy.load.bind(swiper),
|
6390 |
-
loadInSlide: Lazy.loadInSlide.bind(swiper),
|
6391 |
-
},
|
6392 |
-
});
|
6393 |
-
},
|
6394 |
-
on: {
|
6395 |
-
beforeInit: function beforeInit() {
|
6396 |
-
var swiper = this;
|
6397 |
-
if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
|
6398 |
-
swiper.params.preloadImages = false;
|
6399 |
-
}
|
6400 |
-
},
|
6401 |
-
init: function init() {
|
6402 |
-
var swiper = this;
|
6403 |
-
if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
|
6404 |
-
swiper.lazy.load();
|
6405 |
-
}
|
6406 |
-
},
|
6407 |
-
scroll: function scroll() {
|
6408 |
-
var swiper = this;
|
6409 |
-
if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
|
6410 |
-
swiper.lazy.load();
|
6411 |
-
}
|
6412 |
-
},
|
6413 |
-
resize: function resize() {
|
6414 |
-
var swiper = this;
|
6415 |
-
if (swiper.params.lazy.enabled) {
|
6416 |
-
swiper.lazy.load();
|
6417 |
-
}
|
6418 |
-
},
|
6419 |
-
scrollbarDragMove: function scrollbarDragMove() {
|
6420 |
-
var swiper = this;
|
6421 |
-
if (swiper.params.lazy.enabled) {
|
6422 |
-
swiper.lazy.load();
|
6423 |
-
}
|
6424 |
-
},
|
6425 |
-
transitionStart: function transitionStart() {
|
6426 |
-
var swiper = this;
|
6427 |
-
if (swiper.params.lazy.enabled) {
|
6428 |
-
if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
|
6429 |
-
swiper.lazy.load();
|
6430 |
-
}
|
6431 |
-
}
|
6432 |
-
},
|
6433 |
-
transitionEnd: function transitionEnd() {
|
6434 |
-
var swiper = this;
|
6435 |
-
if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
|
6436 |
-
swiper.lazy.load();
|
6437 |
-
}
|
6438 |
-
},
|
6439 |
-
},
|
6440 |
-
};
|
6441 |
-
|
6442 |
-
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
6443 |
-
|
6444 |
-
var Controller = {
|
6445 |
-
LinearSpline: function LinearSpline(x, y) {
|
6446 |
-
var binarySearch = (function search() {
|
6447 |
-
var maxIndex;
|
6448 |
-
var minIndex;
|
6449 |
-
var guess;
|
6450 |
-
return function (array, val) {
|
6451 |
-
minIndex = -1;
|
6452 |
-
maxIndex = array.length;
|
6453 |
-
while (maxIndex - minIndex > 1) {
|
6454 |
-
guess = maxIndex + minIndex >> 1;
|
6455 |
-
if (array[guess] <= val) {
|
6456 |
-
minIndex = guess;
|
6457 |
-
} else {
|
6458 |
-
maxIndex = guess;
|
6459 |
-
}
|
6460 |
-
}
|
6461 |
-
return maxIndex;
|
6462 |
-
};
|
6463 |
-
}());
|
6464 |
-
this.x = x;
|
6465 |
-
this.y = y;
|
6466 |
-
this.lastIndex = x.length - 1;
|
6467 |
-
// Given an x value (x2), return the expected y2 value:
|
6468 |
-
// (x1,y1) is the known point before given value,
|
6469 |
-
// (x3,y3) is the known point after given value.
|
6470 |
-
var i1;
|
6471 |
-
var i3;
|
6472 |
-
|
6473 |
-
this.interpolate = function interpolate(x2) {
|
6474 |
-
if (!x2) { return 0; }
|
6475 |
-
|
6476 |
-
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
6477 |
-
i3 = binarySearch(this.x, x2);
|
6478 |
-
i1 = i3 - 1;
|
6479 |
-
|
6480 |
-
// We have our indexes i1 & i3, so we can calculate already:
|
6481 |
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
6482 |
-
return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
|
6483 |
-
};
|
6484 |
-
return this;
|
6485 |
-
},
|
6486 |
-
// xxx: for now i will just save one spline function to to
|
6487 |
-
getInterpolateFunction: function getInterpolateFunction(c) {
|
6488 |
-
var swiper = this;
|
6489 |
-
if (!swiper.controller.spline) {
|
6490 |
-
swiper.controller.spline = swiper.params.loop
|
6491 |
-
? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
|
6492 |
-
: new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
|
6493 |
-
}
|
6494 |
-
},
|
6495 |
-
setTranslate: function setTranslate(setTranslate$1, byController) {
|
6496 |
-
var swiper = this;
|
6497 |
-
var controlled = swiper.controller.control;
|
6498 |
-
var multiplier;
|
6499 |
-
var controlledTranslate;
|
6500 |
-
function setControlledTranslate(c) {
|
6501 |
-
// this will create an Interpolate function based on the snapGrids
|
6502 |
-
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
6503 |
-
// it makes sense to create this only once and recall it for the interpolation
|
6504 |
-
// the function does a lot of value caching for performance
|
6505 |
-
var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
6506 |
-
if (swiper.params.controller.by === 'slide') {
|
6507 |
-
swiper.controller.getInterpolateFunction(c);
|
6508 |
-
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
6509 |
-
// but it did not work out
|
6510 |
-
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
6511 |
-
}
|
6512 |
-
|
6513 |
-
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
6514 |
-
multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
|
6515 |
-
controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
|
6516 |
-
}
|
6517 |
-
|
6518 |
-
if (swiper.params.controller.inverse) {
|
6519 |
-
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
6520 |
-
}
|
6521 |
-
c.updateProgress(controlledTranslate);
|
6522 |
-
c.setTranslate(controlledTranslate, swiper);
|
6523 |
-
c.updateActiveIndex();
|
6524 |
-
c.updateSlidesClasses();
|
6525 |
-
}
|
6526 |
-
if (Array.isArray(controlled)) {
|
6527 |
-
for (var i = 0; i < controlled.length; i += 1) {
|
6528 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
6529 |
-
setControlledTranslate(controlled[i]);
|
6530 |
-
}
|
6531 |
-
}
|
6532 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
6533 |
-
setControlledTranslate(controlled);
|
6534 |
-
}
|
6535 |
-
},
|
6536 |
-
setTransition: function setTransition(duration, byController) {
|
6537 |
-
var swiper = this;
|
6538 |
-
var controlled = swiper.controller.control;
|
6539 |
-
var i;
|
6540 |
-
function setControlledTransition(c) {
|
6541 |
-
c.setTransition(duration, swiper);
|
6542 |
-
if (duration !== 0) {
|
6543 |
-
c.transitionStart();
|
6544 |
-
if (c.params.autoHeight) {
|
6545 |
-
Utils.nextTick(function () {
|
6546 |
-
c.updateAutoHeight();
|
6547 |
-
});
|
6548 |
-
}
|
6549 |
-
c.$wrapperEl.transitionEnd(function () {
|
6550 |
-
if (!controlled) { return; }
|
6551 |
-
if (c.params.loop && swiper.params.controller.by === 'slide') {
|
6552 |
-
c.loopFix();
|
6553 |
-
}
|
6554 |
-
c.transitionEnd();
|
6555 |
-
});
|
6556 |
-
}
|
6557 |
-
}
|
6558 |
-
if (Array.isArray(controlled)) {
|
6559 |
-
for (i = 0; i < controlled.length; i += 1) {
|
6560 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
6561 |
-
setControlledTransition(controlled[i]);
|
6562 |
-
}
|
6563 |
-
}
|
6564 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
6565 |
-
setControlledTransition(controlled);
|
6566 |
-
}
|
6567 |
-
},
|
6568 |
-
};
|
6569 |
-
var Controller$1 = {
|
6570 |
-
name: 'controller',
|
6571 |
-
params: {
|
6572 |
-
controller: {
|
6573 |
-
control: undefined,
|
6574 |
-
inverse: false,
|
6575 |
-
by: 'slide', // or 'container'
|
6576 |
-
},
|
6577 |
-
},
|
6578 |
-
create: function create() {
|
6579 |
-
var swiper = this;
|
6580 |
-
Utils.extend(swiper, {
|
6581 |
-
controller: {
|
6582 |
-
control: swiper.params.controller.control,
|
6583 |
-
getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
|
6584 |
-
setTranslate: Controller.setTranslate.bind(swiper),
|
6585 |
-
setTransition: Controller.setTransition.bind(swiper),
|
6586 |
-
},
|
6587 |
-
});
|
6588 |
-
},
|
6589 |
-
on: {
|
6590 |
-
update: function update() {
|
6591 |
-
var swiper = this;
|
6592 |
-
if (!swiper.controller.control) { return; }
|
6593 |
-
if (swiper.controller.spline) {
|
6594 |
-
swiper.controller.spline = undefined;
|
6595 |
-
delete swiper.controller.spline;
|
6596 |
-
}
|
6597 |
-
},
|
6598 |
-
resize: function resize() {
|
6599 |
-
var swiper = this;
|
6600 |
-
if (!swiper.controller.control) { return; }
|
6601 |
-
if (swiper.controller.spline) {
|
6602 |
-
swiper.controller.spline = undefined;
|
6603 |
-
delete swiper.controller.spline;
|
6604 |
-
}
|
6605 |
-
},
|
6606 |
-
observerUpdate: function observerUpdate() {
|
6607 |
-
var swiper = this;
|
6608 |
-
if (!swiper.controller.control) { return; }
|
6609 |
-
if (swiper.controller.spline) {
|
6610 |
-
swiper.controller.spline = undefined;
|
6611 |
-
delete swiper.controller.spline;
|
6612 |
-
}
|
6613 |
-
},
|
6614 |
-
setTranslate: function setTranslate(translate, byController) {
|
6615 |
-
var swiper = this;
|
6616 |
-
if (!swiper.controller.control) { return; }
|
6617 |
-
swiper.controller.setTranslate(translate, byController);
|
6618 |
-
},
|
6619 |
-
setTransition: function setTransition(duration, byController) {
|
6620 |
-
var swiper = this;
|
6621 |
-
if (!swiper.controller.control) { return; }
|
6622 |
-
swiper.controller.setTransition(duration, byController);
|
6623 |
-
},
|
6624 |
-
},
|
6625 |
-
};
|
6626 |
-
|
6627 |
-
var a11y = {
|
6628 |
-
makeElFocusable: function makeElFocusable($el) {
|
6629 |
-
$el.attr('tabIndex', '0');
|
6630 |
-
return $el;
|
6631 |
-
},
|
6632 |
-
addElRole: function addElRole($el, role) {
|
6633 |
-
$el.attr('role', role);
|
6634 |
-
return $el;
|
6635 |
-
},
|
6636 |
-
addElLabel: function addElLabel($el, label) {
|
6637 |
-
$el.attr('aria-label', label);
|
6638 |
-
return $el;
|
6639 |
-
},
|
6640 |
-
disableEl: function disableEl($el) {
|
6641 |
-
$el.attr('aria-disabled', true);
|
6642 |
-
return $el;
|
6643 |
-
},
|
6644 |
-
enableEl: function enableEl($el) {
|
6645 |
-
$el.attr('aria-disabled', false);
|
6646 |
-
return $el;
|
6647 |
-
},
|
6648 |
-
onEnterKey: function onEnterKey(e) {
|
6649 |
-
var swiper = this;
|
6650 |
-
var params = swiper.params.a11y;
|
6651 |
-
if (e.keyCode !== 13) { return; }
|
6652 |
-
var $targetEl = $(e.target);
|
6653 |
-
if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
|
6654 |
-
if (!(swiper.isEnd && !swiper.params.loop)) {
|
6655 |
-
swiper.slideNext();
|
6656 |
-
}
|
6657 |
-
if (swiper.isEnd) {
|
6658 |
-
swiper.a11y.notify(params.lastSlideMessage);
|
6659 |
-
} else {
|
6660 |
-
swiper.a11y.notify(params.nextSlideMessage);
|
6661 |
-
}
|
6662 |
-
}
|
6663 |
-
if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
|
6664 |
-
if (!(swiper.isBeginning && !swiper.params.loop)) {
|
6665 |
-
swiper.slidePrev();
|
6666 |
-
}
|
6667 |
-
if (swiper.isBeginning) {
|
6668 |
-
swiper.a11y.notify(params.firstSlideMessage);
|
6669 |
-
} else {
|
6670 |
-
swiper.a11y.notify(params.prevSlideMessage);
|
6671 |
-
}
|
6672 |
-
}
|
6673 |
-
if (swiper.pagination && $targetEl.is(("." + (swiper.params.pagination.bulletClass)))) {
|
6674 |
-
$targetEl[0].click();
|
6675 |
-
}
|
6676 |
-
},
|
6677 |
-
notify: function notify(message) {
|
6678 |
-
var swiper = this;
|
6679 |
-
var notification = swiper.a11y.liveRegion;
|
6680 |
-
if (notification.length === 0) { return; }
|
6681 |
-
notification.html('');
|
6682 |
-
notification.html(message);
|
6683 |
-
},
|
6684 |
-
updateNavigation: function updateNavigation() {
|
6685 |
-
var swiper = this;
|
6686 |
-
|
6687 |
-
if (swiper.params.loop) { return; }
|
6688 |
-
var ref = swiper.navigation;
|
6689 |
-
var $nextEl = ref.$nextEl;
|
6690 |
-
var $prevEl = ref.$prevEl;
|
6691 |
-
|
6692 |
-
if ($prevEl && $prevEl.length > 0) {
|
6693 |
-
if (swiper.isBeginning) {
|
6694 |
-
swiper.a11y.disableEl($prevEl);
|
6695 |
-
} else {
|
6696 |
-
swiper.a11y.enableEl($prevEl);
|
6697 |
-
}
|
6698 |
-
}
|
6699 |
-
if ($nextEl && $nextEl.length > 0) {
|
6700 |
-
if (swiper.isEnd) {
|
6701 |
-
swiper.a11y.disableEl($nextEl);
|
6702 |
-
} else {
|
6703 |
-
swiper.a11y.enableEl($nextEl);
|
6704 |
-
}
|
6705 |
-
}
|
6706 |
-
},
|
6707 |
-
updatePagination: function updatePagination() {
|
6708 |
-
var swiper = this;
|
6709 |
-
var params = swiper.params.a11y;
|
6710 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
6711 |
-
swiper.pagination.bullets.each(function (bulletIndex, bulletEl) {
|
6712 |
-
var $bulletEl = $(bulletEl);
|
6713 |
-
swiper.a11y.makeElFocusable($bulletEl);
|
6714 |
-
swiper.a11y.addElRole($bulletEl, 'button');
|
6715 |
-
swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
|
6716 |
-
});
|
6717 |
-
}
|
6718 |
-
},
|
6719 |
-
init: function init() {
|
6720 |
-
var swiper = this;
|
6721 |
-
|
6722 |
-
swiper.$el.append(swiper.a11y.liveRegion);
|
6723 |
-
|
6724 |
-
// Navigation
|
6725 |
-
var params = swiper.params.a11y;
|
6726 |
-
var $nextEl;
|
6727 |
-
var $prevEl;
|
6728 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
6729 |
-
$nextEl = swiper.navigation.$nextEl;
|
6730 |
-
}
|
6731 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
6732 |
-
$prevEl = swiper.navigation.$prevEl;
|
6733 |
-
}
|
6734 |
-
if ($nextEl) {
|
6735 |
-
swiper.a11y.makeElFocusable($nextEl);
|
6736 |
-
swiper.a11y.addElRole($nextEl, 'button');
|
6737 |
-
swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
|
6738 |
-
$nextEl.on('keydown', swiper.a11y.onEnterKey);
|
6739 |
-
}
|
6740 |
-
if ($prevEl) {
|
6741 |
-
swiper.a11y.makeElFocusable($prevEl);
|
6742 |
-
swiper.a11y.addElRole($prevEl, 'button');
|
6743 |
-
swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
|
6744 |
-
$prevEl.on('keydown', swiper.a11y.onEnterKey);
|
6745 |
-
}
|
6746 |
-
|
6747 |
-
// Pagination
|
6748 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
6749 |
-
swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
|
6750 |
-
}
|
6751 |
-
},
|
6752 |
-
destroy: function destroy() {
|
6753 |
-
var swiper = this;
|
6754 |
-
if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); }
|
6755 |
-
|
6756 |
-
var $nextEl;
|
6757 |
-
var $prevEl;
|
6758 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
6759 |
-
$nextEl = swiper.navigation.$nextEl;
|
6760 |
-
}
|
6761 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
6762 |
-
$prevEl = swiper.navigation.$prevEl;
|
6763 |
-
}
|
6764 |
-
if ($nextEl) {
|
6765 |
-
$nextEl.off('keydown', swiper.a11y.onEnterKey);
|
6766 |
-
}
|
6767 |
-
if ($prevEl) {
|
6768 |
-
$prevEl.off('keydown', swiper.a11y.onEnterKey);
|
6769 |
-
}
|
6770 |
-
|
6771 |
-
// Pagination
|
6772 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
6773 |
-
swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
|
6774 |
-
}
|
6775 |
-
},
|
6776 |
-
};
|
6777 |
-
var A11y = {
|
6778 |
-
name: 'a11y',
|
6779 |
-
params: {
|
6780 |
-
a11y: {
|
6781 |
-
enabled: true,
|
6782 |
-
notificationClass: 'swiper-notification',
|
6783 |
-
prevSlideMessage: 'Previous slide',
|
6784 |
-
nextSlideMessage: 'Next slide',
|
6785 |
-
firstSlideMessage: 'This is the first slide',
|
6786 |
-
lastSlideMessage: 'This is the last slide',
|
6787 |
-
paginationBulletMessage: 'Go to slide {{index}}',
|
6788 |
-
},
|
6789 |
-
},
|
6790 |
-
create: function create() {
|
6791 |
-
var swiper = this;
|
6792 |
-
Utils.extend(swiper, {
|
6793 |
-
a11y: {
|
6794 |
-
liveRegion: $(("<span class=\"" + (swiper.params.a11y.notificationClass) + "\" aria-live=\"assertive\" aria-atomic=\"true\"></span>")),
|
6795 |
-
},
|
6796 |
-
});
|
6797 |
-
Object.keys(a11y).forEach(function (methodName) {
|
6798 |
-
swiper.a11y[methodName] = a11y[methodName].bind(swiper);
|
6799 |
-
});
|
6800 |
-
},
|
6801 |
-
on: {
|
6802 |
-
init: function init() {
|
6803 |
-
var swiper = this;
|
6804 |
-
if (!swiper.params.a11y.enabled) { return; }
|
6805 |
-
swiper.a11y.init();
|
6806 |
-
swiper.a11y.updateNavigation();
|
6807 |
-
},
|
6808 |
-
toEdge: function toEdge() {
|
6809 |
-
var swiper = this;
|
6810 |
-
if (!swiper.params.a11y.enabled) { return; }
|
6811 |
-
swiper.a11y.updateNavigation();
|
6812 |
-
},
|
6813 |
-
fromEdge: function fromEdge() {
|
6814 |
-
var swiper = this;
|
6815 |
-
if (!swiper.params.a11y.enabled) { return; }
|
6816 |
-
swiper.a11y.updateNavigation();
|
6817 |
-
},
|
6818 |
-
paginationUpdate: function paginationUpdate() {
|
6819 |
-
var swiper = this;
|
6820 |
-
if (!swiper.params.a11y.enabled) { return; }
|
6821 |
-
swiper.a11y.updatePagination();
|
6822 |
-
},
|
6823 |
-
destroy: function destroy() {
|
6824 |
-
var swiper = this;
|
6825 |
-
if (!swiper.params.a11y.enabled) { return; }
|
6826 |
-
swiper.a11y.destroy();
|
6827 |
-
},
|
6828 |
-
},
|
6829 |
-
};
|
6830 |
-
|
6831 |
-
var History = {
|
6832 |
-
init: function init() {
|
6833 |
-
var swiper = this;
|
6834 |
-
if (!swiper.params.history) { return; }
|
6835 |
-
if (!win.history || !win.history.pushState) {
|
6836 |
-
swiper.params.history.enabled = false;
|
6837 |
-
swiper.params.hashNavigation.enabled = true;
|
6838 |
-
return;
|
6839 |
-
}
|
6840 |
-
var history = swiper.history;
|
6841 |
-
history.initialized = true;
|
6842 |
-
history.paths = History.getPathValues();
|
6843 |
-
if (!history.paths.key && !history.paths.value) { return; }
|
6844 |
-
history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
|
6845 |
-
if (!swiper.params.history.replaceState) {
|
6846 |
-
win.addEventListener('popstate', swiper.history.setHistoryPopState);
|
6847 |
-
}
|
6848 |
-
},
|
6849 |
-
destroy: function destroy() {
|
6850 |
-
var swiper = this;
|
6851 |
-
if (!swiper.params.history.replaceState) {
|
6852 |
-
win.removeEventListener('popstate', swiper.history.setHistoryPopState);
|
6853 |
-
}
|
6854 |
-
},
|
6855 |
-
setHistoryPopState: function setHistoryPopState() {
|
6856 |
-
var swiper = this;
|
6857 |
-
swiper.history.paths = History.getPathValues();
|
6858 |
-
swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
|
6859 |
-
},
|
6860 |
-
getPathValues: function getPathValues() {
|
6861 |
-
var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; });
|
6862 |
-
var total = pathArray.length;
|
6863 |
-
var key = pathArray[total - 2];
|
6864 |
-
var value = pathArray[total - 1];
|
6865 |
-
return { key: key, value: value };
|
6866 |
-
},
|
6867 |
-
setHistory: function setHistory(key, index) {
|
6868 |
-
var swiper = this;
|
6869 |
-
if (!swiper.history.initialized || !swiper.params.history.enabled) { return; }
|
6870 |
-
var slide = swiper.slides.eq(index);
|
6871 |
-
var value = History.slugify(slide.attr('data-history'));
|
6872 |
-
if (!win.location.pathname.includes(key)) {
|
6873 |
-
value = key + "/" + value;
|
6874 |
-
}
|
6875 |
-
var currentState = win.history.state;
|
6876 |
-
if (currentState && currentState.value === value) {
|
6877 |
-
return;
|
6878 |
-
}
|
6879 |
-
if (swiper.params.history.replaceState) {
|
6880 |
-
win.history.replaceState({ value: value }, null, value);
|
6881 |
-
} else {
|
6882 |
-
win.history.pushState({ value: value }, null, value);
|
6883 |
-
}
|
6884 |
-
},
|
6885 |
-
slugify: function slugify(text) {
|
6886 |
-
return text.toString().toLowerCase()
|
6887 |
-
.replace(/\s+/g, '-')
|
6888 |
-
.replace(/[^\w-]+/g, '')
|
6889 |
-
.replace(/--+/g, '-')
|
6890 |
-
.replace(/^-+/, '')
|
6891 |
-
.replace(/-+$/, '');
|
6892 |
-
},
|
6893 |
-
scrollToSlide: function scrollToSlide(speed, value, runCallbacks) {
|
6894 |
-
var swiper = this;
|
6895 |
-
if (value) {
|
6896 |
-
for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
|
6897 |
-
var slide = swiper.slides.eq(i);
|
6898 |
-
var slideHistory = History.slugify(slide.attr('data-history'));
|
6899 |
-
if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6900 |
-
var index = slide.index();
|
6901 |
-
swiper.slideTo(index, speed, runCallbacks);
|
6902 |
-
}
|
6903 |
-
}
|
6904 |
-
} else {
|
6905 |
-
swiper.slideTo(0, speed, runCallbacks);
|
6906 |
-
}
|
6907 |
-
},
|
6908 |
-
};
|
6909 |
-
|
6910 |
-
var History$1 = {
|
6911 |
-
name: 'history',
|
6912 |
-
params: {
|
6913 |
-
history: {
|
6914 |
-
enabled: false,
|
6915 |
-
replaceState: false,
|
6916 |
-
key: 'slides',
|
6917 |
-
},
|
6918 |
-
},
|
6919 |
-
create: function create() {
|
6920 |
-
var swiper = this;
|
6921 |
-
Utils.extend(swiper, {
|
6922 |
-
history: {
|
6923 |
-
init: History.init.bind(swiper),
|
6924 |
-
setHistory: History.setHistory.bind(swiper),
|
6925 |
-
setHistoryPopState: History.setHistoryPopState.bind(swiper),
|
6926 |
-
scrollToSlide: History.scrollToSlide.bind(swiper),
|
6927 |
-
destroy: History.destroy.bind(swiper),
|
6928 |
-
},
|
6929 |
-
});
|
6930 |
-
},
|
6931 |
-
on: {
|
6932 |
-
init: function init() {
|
6933 |
-
var swiper = this;
|
6934 |
-
if (swiper.params.history.enabled) {
|
6935 |
-
swiper.history.init();
|
6936 |
-
}
|
6937 |
-
},
|
6938 |
-
destroy: function destroy() {
|
6939 |
-
var swiper = this;
|
6940 |
-
if (swiper.params.history.enabled) {
|
6941 |
-
swiper.history.destroy();
|
6942 |
-
}
|
6943 |
-
},
|
6944 |
-
transitionEnd: function transitionEnd() {
|
6945 |
-
var swiper = this;
|
6946 |
-
if (swiper.history.initialized) {
|
6947 |
-
swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
|
6948 |
-
}
|
6949 |
-
},
|
6950 |
-
},
|
6951 |
-
};
|
6952 |
-
|
6953 |
-
var HashNavigation = {
|
6954 |
-
onHashCange: function onHashCange() {
|
6955 |
-
var swiper = this;
|
6956 |
-
var newHash = doc.location.hash.replace('#', '');
|
6957 |
-
var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
|
6958 |
-
if (newHash !== activeSlideHash) {
|
6959 |
-
swiper.slideTo(swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-hash=\"" + newHash + "\"]")).index());
|
6960 |
-
}
|
6961 |
-
},
|
6962 |
-
setHash: function setHash() {
|
6963 |
-
var swiper = this;
|
6964 |
-
if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) { return; }
|
6965 |
-
if (swiper.params.hashNavigation.replaceState && win.history && win.history.replaceState) {
|
6966 |
-
win.history.replaceState(null, null, (("#" + (swiper.slides.eq(swiper.activeIndex).attr('data-hash'))) || ''));
|
6967 |
-
} else {
|
6968 |
-
var slide = swiper.slides.eq(swiper.activeIndex);
|
6969 |
-
var hash = slide.attr('data-hash') || slide.attr('data-history');
|
6970 |
-
doc.location.hash = hash || '';
|
6971 |
-
}
|
6972 |
-
},
|
6973 |
-
init: function init() {
|
6974 |
-
var swiper = this;
|
6975 |
-
if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) { return; }
|
6976 |
-
swiper.hashNavigation.initialized = true;
|
6977 |
-
var hash = doc.location.hash.replace('#', '');
|
6978 |
-
if (hash) {
|
6979 |
-
var speed = 0;
|
6980 |
-
for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
|
6981 |
-
var slide = swiper.slides.eq(i);
|
6982 |
-
var slideHash = slide.attr('data-hash') || slide.attr('data-history');
|
6983 |
-
if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6984 |
-
var index = slide.index();
|
6985 |
-
swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);
|
6986 |
-
}
|
6987 |
-
}
|
6988 |
-
}
|
6989 |
-
if (swiper.params.hashNavigation.watchState) {
|
6990 |
-
$(win).on('hashchange', swiper.hashNavigation.onHashCange);
|
6991 |
-
}
|
6992 |
-
},
|
6993 |
-
destroy: function destroy() {
|
6994 |
-
var swiper = this;
|
6995 |
-
if (swiper.params.hashNavigation.watchState) {
|
6996 |
-
$(win).off('hashchange', swiper.hashNavigation.onHashCange);
|
6997 |
-
}
|
6998 |
-
},
|
6999 |
-
};
|
7000 |
-
var HashNavigation$1 = {
|
7001 |
-
name: 'hash-navigation',
|
7002 |
-
params: {
|
7003 |
-
hashNavigation: {
|
7004 |
-
enabled: false,
|
7005 |
-
replaceState: false,
|
7006 |
-
watchState: false,
|
7007 |
-
},
|
7008 |
-
},
|
7009 |
-
create: function create() {
|
7010 |
-
var swiper = this;
|
7011 |
-
Utils.extend(swiper, {
|
7012 |
-
hashNavigation: {
|
7013 |
-
initialized: false,
|
7014 |
-
init: HashNavigation.init.bind(swiper),
|
7015 |
-
destroy: HashNavigation.destroy.bind(swiper),
|
7016 |
-
setHash: HashNavigation.setHash.bind(swiper),
|
7017 |
-
onHashCange: HashNavigation.onHashCange.bind(swiper),
|
7018 |
-
},
|
7019 |
-
});
|
7020 |
-
},
|
7021 |
-
on: {
|
7022 |
-
init: function init() {
|
7023 |
-
var swiper = this;
|
7024 |
-
if (swiper.params.hashNavigation.enabled) {
|
7025 |
-
swiper.hashNavigation.init();
|
7026 |
-
}
|
7027 |
-
},
|
7028 |
-
destroy: function destroy() {
|
7029 |
-
var swiper = this;
|
7030 |
-
if (swiper.params.hashNavigation.enabled) {
|
7031 |
-
swiper.hashNavigation.destroy();
|
7032 |
-
}
|
7033 |
-
},
|
7034 |
-
transitionEnd: function transitionEnd() {
|
7035 |
-
var swiper = this;
|
7036 |
-
if (swiper.hashNavigation.initialized) {
|
7037 |
-
swiper.hashNavigation.setHash();
|
7038 |
-
}
|
7039 |
-
},
|
7040 |
-
},
|
7041 |
-
};
|
7042 |
-
|
7043 |
-
/* eslint no-underscore-dangle: "off" */
|
7044 |
-
|
7045 |
-
var Autoplay = {
|
7046 |
-
run: function run() {
|
7047 |
-
var swiper = this;
|
7048 |
-
var $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
|
7049 |
-
var delay = swiper.params.autoplay.delay;
|
7050 |
-
if ($activeSlideEl.attr('data-swiper-autoplay')) {
|
7051 |
-
delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
|
7052 |
-
}
|
7053 |
-
swiper.autoplay.timeout = Utils.nextTick(function () {
|
7054 |
-
if (swiper.params.autoplay.reverseDirection) {
|
7055 |
-
if (swiper.params.loop) {
|
7056 |
-
swiper.loopFix();
|
7057 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
7058 |
-
swiper.emit('autoplay');
|
7059 |
-
} else if (!swiper.isBeginning) {
|
7060 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
7061 |
-
swiper.emit('autoplay');
|
7062 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
7063 |
-
swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
|
7064 |
-
swiper.emit('autoplay');
|
7065 |
-
} else {
|
7066 |
-
swiper.autoplay.stop();
|
7067 |
-
}
|
7068 |
-
} else if (swiper.params.loop) {
|
7069 |
-
swiper.loopFix();
|
7070 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
7071 |
-
swiper.emit('autoplay');
|
7072 |
-
} else if (!swiper.isEnd) {
|
7073 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
7074 |
-
swiper.emit('autoplay');
|
7075 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
7076 |
-
swiper.slideTo(0, swiper.params.speed, true, true);
|
7077 |
-
swiper.emit('autoplay');
|
7078 |
-
} else {
|
7079 |
-
swiper.autoplay.stop();
|
7080 |
-
}
|
7081 |
-
}, delay);
|
7082 |
-
},
|
7083 |
-
start: function start() {
|
7084 |
-
var swiper = this;
|
7085 |
-
if (typeof swiper.autoplay.timeout !== 'undefined') { return false; }
|
7086 |
-
if (swiper.autoplay.running) { return false; }
|
7087 |
-
swiper.autoplay.running = true;
|
7088 |
-
swiper.emit('autoplayStart');
|
7089 |
-
swiper.autoplay.run();
|
7090 |
-
return true;
|
7091 |
-
},
|
7092 |
-
stop: function stop() {
|
7093 |
-
var swiper = this;
|
7094 |
-
if (!swiper.autoplay.running) { return false; }
|
7095 |
-
if (typeof swiper.autoplay.timeout === 'undefined') { return false; }
|
7096 |
-
|
7097 |
-
if (swiper.autoplay.timeout) {
|
7098 |
-
clearTimeout(swiper.autoplay.timeout);
|
7099 |
-
swiper.autoplay.timeout = undefined;
|
7100 |
-
}
|
7101 |
-
swiper.autoplay.running = false;
|
7102 |
-
swiper.emit('autoplayStop');
|
7103 |
-
return true;
|
7104 |
-
},
|
7105 |
-
pause: function pause(speed) {
|
7106 |
-
var swiper = this;
|
7107 |
-
if (!swiper.autoplay.running) { return; }
|
7108 |
-
if (swiper.autoplay.paused) { return; }
|
7109 |
-
if (swiper.autoplay.timeout) { clearTimeout(swiper.autoplay.timeout); }
|
7110 |
-
swiper.autoplay.paused = true;
|
7111 |
-
if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
|
7112 |
-
swiper.autoplay.paused = false;
|
7113 |
-
swiper.autoplay.run();
|
7114 |
-
} else {
|
7115 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
7116 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
7117 |
-
}
|
7118 |
-
},
|
7119 |
-
};
|
7120 |
-
|
7121 |
-
var Autoplay$1 = {
|
7122 |
-
name: 'autoplay',
|
7123 |
-
params: {
|
7124 |
-
autoplay: {
|
7125 |
-
enabled: false,
|
7126 |
-
delay: 3000,
|
7127 |
-
waitForTransition: true,
|
7128 |
-
disableOnInteraction: true,
|
7129 |
-
stopOnLastSlide: false,
|
7130 |
-
reverseDirection: false,
|
7131 |
-
},
|
7132 |
-
},
|
7133 |
-
create: function create() {
|
7134 |
-
var swiper = this;
|
7135 |
-
Utils.extend(swiper, {
|
7136 |
-
autoplay: {
|
7137 |
-
running: false,
|
7138 |
-
paused: false,
|
7139 |
-
run: Autoplay.run.bind(swiper),
|
7140 |
-
start: Autoplay.start.bind(swiper),
|
7141 |
-
stop: Autoplay.stop.bind(swiper),
|
7142 |
-
pause: Autoplay.pause.bind(swiper),
|
7143 |
-
onTransitionEnd: function onTransitionEnd(e) {
|
7144 |
-
if (!swiper || swiper.destroyed || !swiper.$wrapperEl) { return; }
|
7145 |
-
if (e.target !== this) { return; }
|
7146 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
7147 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
7148 |
-
swiper.autoplay.paused = false;
|
7149 |
-
if (!swiper.autoplay.running) {
|
7150 |
-
swiper.autoplay.stop();
|
7151 |
-
} else {
|
7152 |
-
swiper.autoplay.run();
|
7153 |
-
}
|
7154 |
-
},
|
7155 |
-
},
|
7156 |
-
});
|
7157 |
-
},
|
7158 |
-
on: {
|
7159 |
-
init: function init() {
|
7160 |
-
var swiper = this;
|
7161 |
-
if (swiper.params.autoplay.enabled) {
|
7162 |
-
swiper.autoplay.start();
|
7163 |
-
}
|
7164 |
-
},
|
7165 |
-
beforeTransitionStart: function beforeTransitionStart(speed, internal) {
|
7166 |
-
var swiper = this;
|
7167 |
-
if (swiper.autoplay.running) {
|
7168 |
-
if (internal || !swiper.params.autoplay.disableOnInteraction) {
|
7169 |
-
swiper.autoplay.pause(speed);
|
7170 |
-
} else {
|
7171 |
-
swiper.autoplay.stop();
|
7172 |
-
}
|
7173 |
-
}
|
7174 |
-
},
|
7175 |
-
sliderFirstMove: function sliderFirstMove() {
|
7176 |
-
var swiper = this;
|
7177 |
-
if (swiper.autoplay.running) {
|
7178 |
-
if (swiper.params.autoplay.disableOnInteraction) {
|
7179 |
-
swiper.autoplay.stop();
|
7180 |
-
} else {
|
7181 |
-
swiper.autoplay.pause();
|
7182 |
-
}
|
7183 |
-
}
|
7184 |
-
},
|
7185 |
-
destroy: function destroy() {
|
7186 |
-
var swiper = this;
|
7187 |
-
if (swiper.autoplay.running) {
|
7188 |
-
swiper.autoplay.stop();
|
7189 |
-
}
|
7190 |
-
},
|
7191 |
-
},
|
7192 |
-
};
|
7193 |
-
|
7194 |
-
var Fade = {
|
7195 |
-
setTranslate: function setTranslate() {
|
7196 |
-
var swiper = this;
|
7197 |
-
var slides = swiper.slides;
|
7198 |
-
for (var i = 0; i < slides.length; i += 1) {
|
7199 |
-
var $slideEl = swiper.slides.eq(i);
|
7200 |
-
var offset = $slideEl[0].swiperSlideOffset;
|
7201 |
-
var tx = -offset;
|
7202 |
-
if (!swiper.params.virtualTranslate) { tx -= swiper.translate; }
|
7203 |
-
var ty = 0;
|
7204 |
-
if (!swiper.isHorizontal()) {
|
7205 |
-
ty = tx;
|
7206 |
-
tx = 0;
|
7207 |
-
}
|
7208 |
-
var slideOpacity = swiper.params.fadeEffect.crossFade
|
7209 |
-
? Math.max(1 - Math.abs($slideEl[0].progress), 0)
|
7210 |
-
: 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
|
7211 |
-
$slideEl
|
7212 |
-
.css({
|
7213 |
-
opacity: slideOpacity,
|
7214 |
-
})
|
7215 |
-
.transform(("translate3d(" + tx + "px, " + ty + "px, 0px)"));
|
7216 |
-
}
|
7217 |
-
},
|
7218 |
-
setTransition: function setTransition(duration) {
|
7219 |
-
var swiper = this;
|
7220 |
-
var slides = swiper.slides;
|
7221 |
-
var $wrapperEl = swiper.$wrapperEl;
|
7222 |
-
slides.transition(duration);
|
7223 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
7224 |
-
var eventTriggered = false;
|
7225 |
-
slides.transitionEnd(function () {
|
7226 |
-
if (eventTriggered) { return; }
|
7227 |
-
if (!swiper || swiper.destroyed) { return; }
|
7228 |
-
eventTriggered = true;
|
7229 |
-
swiper.animating = false;
|
7230 |
-
var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
7231 |
-
for (var i = 0; i < triggerEvents.length; i += 1) {
|
7232 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
7233 |
-
}
|
7234 |
-
});
|
7235 |
-
}
|
7236 |
-
},
|
7237 |
-
};
|
7238 |
-
|
7239 |
-
var EffectFade = {
|
7240 |
-
name: 'effect-fade',
|
7241 |
-
params: {
|
7242 |
-
fadeEffect: {
|
7243 |
-
crossFade: false,
|
7244 |
-
},
|
7245 |
-
},
|
7246 |
-
create: function create() {
|
7247 |
-
var swiper = this;
|
7248 |
-
Utils.extend(swiper, {
|
7249 |
-
fadeEffect: {
|
7250 |
-
setTranslate: Fade.setTranslate.bind(swiper),
|
7251 |
-
setTransition: Fade.setTransition.bind(swiper),
|
7252 |
-
},
|
7253 |
-
});
|
7254 |
-
},
|
7255 |
-
on: {
|
7256 |
-
beforeInit: function beforeInit() {
|
7257 |
-
var swiper = this;
|
7258 |
-
if (swiper.params.effect !== 'fade') { return; }
|
7259 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "fade"));
|
7260 |
-
var overwriteParams = {
|
7261 |
-
slidesPerView: 1,
|
7262 |
-
slidesPerColumn: 1,
|
7263 |
-
slidesPerGroup: 1,
|
7264 |
-
watchSlidesProgress: true,
|
7265 |
-
spaceBetween: 0,
|
7266 |
-
virtualTranslate: true,
|
7267 |
-
};
|
7268 |
-
Utils.extend(swiper.params, overwriteParams);
|
7269 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
7270 |
-
},
|
7271 |
-
setTranslate: function setTranslate() {
|
7272 |
-
var swiper = this;
|
7273 |
-
if (swiper.params.effect !== 'fade') { return; }
|
7274 |
-
swiper.fadeEffect.setTranslate();
|
7275 |
-
},
|
7276 |
-
setTransition: function setTransition(duration) {
|
7277 |
-
var swiper = this;
|
7278 |
-
if (swiper.params.effect !== 'fade') { return; }
|
7279 |
-
swiper.fadeEffect.setTransition(duration);
|
7280 |
-
},
|
7281 |
-
},
|
7282 |
-
};
|
7283 |
-
|
7284 |
-
var Cube = {
|
7285 |
-
setTranslate: function setTranslate() {
|
7286 |
-
var swiper = this;
|
7287 |
-
var $el = swiper.$el;
|
7288 |
-
var $wrapperEl = swiper.$wrapperEl;
|
7289 |
-
var slides = swiper.slides;
|
7290 |
-
var swiperWidth = swiper.width;
|
7291 |
-
var swiperHeight = swiper.height;
|
7292 |
-
var rtl = swiper.rtlTranslate;
|
7293 |
-
var swiperSize = swiper.size;
|
7294 |
-
var params = swiper.params.cubeEffect;
|
7295 |
-
var isHorizontal = swiper.isHorizontal();
|
7296 |
-
var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
7297 |
-
var wrapperRotate = 0;
|
7298 |
-
var $cubeShadowEl;
|
7299 |
-
if (params.shadow) {
|
7300 |
-
if (isHorizontal) {
|
7301 |
-
$cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
|
7302 |
-
if ($cubeShadowEl.length === 0) {
|
7303 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
7304 |
-
$wrapperEl.append($cubeShadowEl);
|
7305 |
-
}
|
7306 |
-
$cubeShadowEl.css({ height: (swiperWidth + "px") });
|
7307 |
-
} else {
|
7308 |
-
$cubeShadowEl = $el.find('.swiper-cube-shadow');
|
7309 |
-
if ($cubeShadowEl.length === 0) {
|
7310 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
7311 |
-
$el.append($cubeShadowEl);
|
7312 |
-
}
|
7313 |
-
}
|
7314 |
-
}
|
7315 |
-
for (var i = 0; i < slides.length; i += 1) {
|
7316 |
-
var $slideEl = slides.eq(i);
|
7317 |
-
var slideIndex = i;
|
7318 |
-
if (isVirtual) {
|
7319 |
-
slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
|
7320 |
-
}
|
7321 |
-
var slideAngle = slideIndex * 90;
|
7322 |
-
var round = Math.floor(slideAngle / 360);
|
7323 |
-
if (rtl) {
|
7324 |
-
slideAngle = -slideAngle;
|
7325 |
-
round = Math.floor(-slideAngle / 360);
|
7326 |
-
}
|
7327 |
-
var progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
7328 |
-
var tx = 0;
|
7329 |
-
var ty = 0;
|
7330 |
-
var tz = 0;
|
7331 |
-
if (slideIndex % 4 === 0) {
|
7332 |
-
tx = -round * 4 * swiperSize;
|
7333 |
-
tz = 0;
|
7334 |
-
} else if ((slideIndex - 1) % 4 === 0) {
|
7335 |
-
tx = 0;
|
7336 |
-
tz = -round * 4 * swiperSize;
|
7337 |
-
} else if ((slideIndex - 2) % 4 === 0) {
|
7338 |
-
tx = swiperSize + (round * 4 * swiperSize);
|
7339 |
-
tz = swiperSize;
|
7340 |
-
} else if ((slideIndex - 3) % 4 === 0) {
|
7341 |
-
tx = -swiperSize;
|
7342 |
-
tz = (3 * swiperSize) + (swiperSize * 4 * round);
|
7343 |
-
}
|
7344 |
-
if (rtl) {
|
7345 |
-
tx = -tx;
|
7346 |
-
}
|
7347 |
-
|
7348 |
-
if (!isHorizontal) {
|
7349 |
-
ty = tx;
|
7350 |
-
tx = 0;
|
7351 |
-
}
|
7352 |
-
|
7353 |
-
var transform = "rotateX(" + (isHorizontal ? 0 : -slideAngle) + "deg) rotateY(" + (isHorizontal ? slideAngle : 0) + "deg) translate3d(" + tx + "px, " + ty + "px, " + tz + "px)";
|
7354 |
-
if (progress <= 1 && progress > -1) {
|
7355 |
-
wrapperRotate = (slideIndex * 90) + (progress * 90);
|
7356 |
-
if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); }
|
7357 |
-
}
|
7358 |
-
$slideEl.transform(transform);
|
7359 |
-
if (params.slideShadows) {
|
7360 |
-
// Set shadows
|
7361 |
-
var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
7362 |
-
var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
7363 |
-
if (shadowBefore.length === 0) {
|
7364 |
-
shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
|
7365 |
-
$slideEl.append(shadowBefore);
|
7366 |
-
}
|
7367 |
-
if (shadowAfter.length === 0) {
|
7368 |
-
shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
|
7369 |
-
$slideEl.append(shadowAfter);
|
7370 |
-
}
|
7371 |
-
if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
|
7372 |
-
if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
|
7373 |
-
}
|
7374 |
-
}
|
7375 |
-
$wrapperEl.css({
|
7376 |
-
'-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
|
7377 |
-
'-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
|
7378 |
-
'-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
|
7379 |
-
'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
|
7380 |
-
});
|
7381 |
-
|
7382 |
-
if (params.shadow) {
|
7383 |
-
if (isHorizontal) {
|
7384 |
-
$cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")"));
|
7385 |
-
} else {
|
7386 |
-
var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
|
7387 |
-
var multiplier = 1.5 - (
|
7388 |
-
(Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
|
7389 |
-
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
|
7390 |
-
);
|
7391 |
-
var scale1 = params.shadowScale;
|
7392 |
-
var scale2 = params.shadowScale / multiplier;
|
7393 |
-
var offset = params.shadowOffset;
|
7394 |
-
$cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)"));
|
7395 |
-
}
|
7396 |
-
}
|
7397 |
-
var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
|
7398 |
-
$wrapperEl
|
7399 |
-
.transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)"));
|
7400 |
-
},
|
7401 |
-
setTransition: function setTransition(duration) {
|
7402 |
-
var swiper = this;
|
7403 |
-
var $el = swiper.$el;
|
7404 |
-
var slides = swiper.slides;
|
7405 |
-
slides
|
7406 |
-
.transition(duration)
|
7407 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
7408 |
-
.transition(duration);
|
7409 |
-
if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
|
7410 |
-
$el.find('.swiper-cube-shadow').transition(duration);
|
7411 |
-
}
|
7412 |
-
},
|
7413 |
-
};
|
7414 |
-
|
7415 |
-
var EffectCube = {
|
7416 |
-
name: 'effect-cube',
|
7417 |
-
params: {
|
7418 |
-
cubeEffect: {
|
7419 |
-
slideShadows: true,
|
7420 |
-
shadow: true,
|
7421 |
-
shadowOffset: 20,
|
7422 |
-
shadowScale: 0.94,
|
7423 |
-
},
|
7424 |
-
},
|
7425 |
-
create: function create() {
|
7426 |
-
var swiper = this;
|
7427 |
-
Utils.extend(swiper, {
|
7428 |
-
cubeEffect: {
|
7429 |
-
setTranslate: Cube.setTranslate.bind(swiper),
|
7430 |
-
setTransition: Cube.setTransition.bind(swiper),
|
7431 |
-
},
|
7432 |
-
});
|
7433 |
-
},
|
7434 |
-
on: {
|
7435 |
-
beforeInit: function beforeInit() {
|
7436 |
-
var swiper = this;
|
7437 |
-
if (swiper.params.effect !== 'cube') { return; }
|
7438 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "cube"));
|
7439 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
|
7440 |
-
var overwriteParams = {
|
7441 |
-
slidesPerView: 1,
|
7442 |
-
slidesPerColumn: 1,
|
7443 |
-
slidesPerGroup: 1,
|
7444 |
-
watchSlidesProgress: true,
|
7445 |
-
resistanceRatio: 0,
|
7446 |
-
spaceBetween: 0,
|
7447 |
-
centeredSlides: false,
|
7448 |
-
virtualTranslate: true,
|
7449 |
-
};
|
7450 |
-
Utils.extend(swiper.params, overwriteParams);
|
7451 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
7452 |
-
},
|
7453 |
-
setTranslate: function setTranslate() {
|
7454 |
-
var swiper = this;
|
7455 |
-
if (swiper.params.effect !== 'cube') { return; }
|
7456 |
-
swiper.cubeEffect.setTranslate();
|
7457 |
-
},
|
7458 |
-
setTransition: function setTransition(duration) {
|
7459 |
-
var swiper = this;
|
7460 |
-
if (swiper.params.effect !== 'cube') { return; }
|
7461 |
-
swiper.cubeEffect.setTransition(duration);
|
7462 |
-
},
|
7463 |
-
},
|
7464 |
-
};
|
7465 |
-
|
7466 |
-
var Flip = {
|
7467 |
-
setTranslate: function setTranslate() {
|
7468 |
-
var swiper = this;
|
7469 |
-
var slides = swiper.slides;
|
7470 |
-
var rtl = swiper.rtlTranslate;
|
7471 |
-
for (var i = 0; i < slides.length; i += 1) {
|
7472 |
-
var $slideEl = slides.eq(i);
|
7473 |
-
var progress = $slideEl[0].progress;
|
7474 |
-
if (swiper.params.flipEffect.limitRotation) {
|
7475 |
-
progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
7476 |
-
}
|
7477 |
-
var offset = $slideEl[0].swiperSlideOffset;
|
7478 |
-
var rotate = -180 * progress;
|
7479 |
-
var rotateY = rotate;
|
7480 |
-
var rotateX = 0;
|
7481 |
-
var tx = -offset;
|
7482 |
-
var ty = 0;
|
7483 |
-
if (!swiper.isHorizontal()) {
|
7484 |
-
ty = tx;
|
7485 |
-
tx = 0;
|
7486 |
-
rotateX = -rotateY;
|
7487 |
-
rotateY = 0;
|
7488 |
-
} else if (rtl) {
|
7489 |
-
rotateY = -rotateY;
|
7490 |
-
}
|
7491 |
-
|
7492 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
|
7493 |
-
|
7494 |
-
if (swiper.params.flipEffect.slideShadows) {
|
7495 |
-
// Set shadows
|
7496 |
-
var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
7497 |
-
var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
7498 |
-
if (shadowBefore.length === 0) {
|
7499 |
-
shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'left' : 'top') + "\"></div>"));
|
7500 |
-
$slideEl.append(shadowBefore);
|
7501 |
-
}
|
7502 |
-
if (shadowAfter.length === 0) {
|
7503 |
-
shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'right' : 'bottom') + "\"></div>"));
|
7504 |
-
$slideEl.append(shadowAfter);
|
7505 |
-
}
|
7506 |
-
if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
|
7507 |
-
if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
|
7508 |
-
}
|
7509 |
-
$slideEl
|
7510 |
-
.transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)"));
|
7511 |
-
}
|
7512 |
-
},
|
7513 |
-
setTransition: function setTransition(duration) {
|
7514 |
-
var swiper = this;
|
7515 |
-
var slides = swiper.slides;
|
7516 |
-
var activeIndex = swiper.activeIndex;
|
7517 |
-
var $wrapperEl = swiper.$wrapperEl;
|
7518 |
-
slides
|
7519 |
-
.transition(duration)
|
7520 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
7521 |
-
.transition(duration);
|
7522 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
7523 |
-
var eventTriggered = false;
|
7524 |
-
// eslint-disable-next-line
|
7525 |
-
slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
|
7526 |
-
if (eventTriggered) { return; }
|
7527 |
-
if (!swiper || swiper.destroyed) { return; }
|
7528 |
-
// if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
|
7529 |
-
eventTriggered = true;
|
7530 |
-
swiper.animating = false;
|
7531 |
-
var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
7532 |
-
for (var i = 0; i < triggerEvents.length; i += 1) {
|
7533 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
7534 |
-
}
|
7535 |
-
});
|
7536 |
-
}
|
7537 |
-
},
|
7538 |
-
};
|
7539 |
-
|
7540 |
-
var EffectFlip = {
|
7541 |
-
name: 'effect-flip',
|
7542 |
-
params: {
|
7543 |
-
flipEffect: {
|
7544 |
-
slideShadows: true,
|
7545 |
-
limitRotation: true,
|
7546 |
-
},
|
7547 |
-
},
|
7548 |
-
create: function create() {
|
7549 |
-
var swiper = this;
|
7550 |
-
Utils.extend(swiper, {
|
7551 |
-
flipEffect: {
|
7552 |
-
setTranslate: Flip.setTranslate.bind(swiper),
|
7553 |
-
setTransition: Flip.setTransition.bind(swiper),
|
7554 |
-
},
|
7555 |
-
});
|
7556 |
-
},
|
7557 |
-
on: {
|
7558 |
-
beforeInit: function beforeInit() {
|
7559 |
-
var swiper = this;
|
7560 |
-
if (swiper.params.effect !== 'flip') { return; }
|
7561 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "flip"));
|
7562 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
|
7563 |
-
var overwriteParams = {
|
7564 |
-
slidesPerView: 1,
|
7565 |
-
slidesPerColumn: 1,
|
7566 |
-
slidesPerGroup: 1,
|
7567 |
-
watchSlidesProgress: true,
|
7568 |
-
spaceBetween: 0,
|
7569 |
-
virtualTranslate: true,
|
7570 |
-
};
|
7571 |
-
Utils.extend(swiper.params, overwriteParams);
|
7572 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
7573 |
-
},
|
7574 |
-
setTranslate: function setTranslate() {
|
7575 |
-
var swiper = this;
|
7576 |
-
if (swiper.params.effect !== 'flip') { return; }
|
7577 |
-
swiper.flipEffect.setTranslate();
|
7578 |
-
},
|
7579 |
-
setTransition: function setTransition(duration) {
|
7580 |
-
var swiper = this;
|
7581 |
-
if (swiper.params.effect !== 'flip') { return; }
|
7582 |
-
swiper.flipEffect.setTransition(duration);
|
7583 |
-
},
|
7584 |
-
},
|
7585 |
-
};
|
7586 |
-
|
7587 |
-
var Coverflow = {
|
7588 |
-
setTranslate: function setTranslate() {
|
7589 |
-
var swiper = this;
|
7590 |
-
var swiperWidth = swiper.width;
|
7591 |
-
var swiperHeight = swiper.height;
|
7592 |
-
var slides = swiper.slides;
|
7593 |
-
var $wrapperEl = swiper.$wrapperEl;
|
7594 |
-
var slidesSizesGrid = swiper.slidesSizesGrid;
|
7595 |
-
var params = swiper.params.coverflowEffect;
|
7596 |
-
var isHorizontal = swiper.isHorizontal();
|
7597 |
-
var transform = swiper.translate;
|
7598 |
-
var center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2);
|
7599 |
-
var rotate = isHorizontal ? params.rotate : -params.rotate;
|
7600 |
-
var translate = params.depth;
|
7601 |
-
// Each slide offset from center
|
7602 |
-
for (var i = 0, length = slides.length; i < length; i += 1) {
|
7603 |
-
var $slideEl = slides.eq(i);
|
7604 |
-
var slideSize = slidesSizesGrid[i];
|
7605 |
-
var slideOffset = $slideEl[0].swiperSlideOffset;
|
7606 |
-
var offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
|
7607 |
-
|
7608 |
-
var rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
7609 |
-
var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
7610 |
-
// var rotateZ = 0
|
7611 |
-
var translateZ = -translate * Math.abs(offsetMultiplier);
|
7612 |
-
|
7613 |
-
var translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
|
7614 |
-
var translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
|
7615 |
-
|
7616 |
-
// Fix for ultra small values
|
7617 |
-
if (Math.abs(translateX) < 0.001) { translateX = 0; }
|
7618 |
-
if (Math.abs(translateY) < 0.001) { translateY = 0; }
|
7619 |
-
if (Math.abs(translateZ) < 0.001) { translateZ = 0; }
|
7620 |
-
if (Math.abs(rotateY) < 0.001) { rotateY = 0; }
|
7621 |
-
if (Math.abs(rotateX) < 0.001) { rotateX = 0; }
|
7622 |
-
|
7623 |
-
var slideTransform = "translate3d(" + translateX + "px," + translateY + "px," + translateZ + "px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)";
|
7624 |
-
|
7625 |
-
$slideEl.transform(slideTransform);
|
7626 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
7627 |
-
if (params.slideShadows) {
|
7628 |
-
// Set shadows
|
7629 |
-
var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
7630 |
-
var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
7631 |
-
if ($shadowBeforeEl.length === 0) {
|
7632 |
-
$shadowBeforeEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
|
7633 |
-
$slideEl.append($shadowBeforeEl);
|
7634 |
-
}
|
7635 |
-
if ($shadowAfterEl.length === 0) {
|
7636 |
-
$shadowAfterEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
|
7637 |
-
$slideEl.append($shadowAfterEl);
|
7638 |
-
}
|
7639 |
-
if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; }
|
7640 |
-
if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; }
|
7641 |
-
}
|
7642 |
-
}
|
7643 |
-
|
7644 |
-
// Set correct perspective for IE10
|
7645 |
-
if (Support.pointerEvents || Support.prefixedPointerEvents) {
|
7646 |
-
var ws = $wrapperEl[0].style;
|
7647 |
-
ws.perspectiveOrigin = center + "px 50%";
|
7648 |
-
}
|
7649 |
-
},
|
7650 |
-
setTransition: function setTransition(duration) {
|
7651 |
-
var swiper = this;
|
7652 |
-
swiper.slides
|
7653 |
-
.transition(duration)
|
7654 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
7655 |
-
.transition(duration);
|
7656 |
-
},
|
7657 |
-
};
|
7658 |
-
|
7659 |
-
var EffectCoverflow = {
|
7660 |
-
name: 'effect-coverflow',
|
7661 |
-
params: {
|
7662 |
-
coverflowEffect: {
|
7663 |
-
rotate: 50,
|
7664 |
-
stretch: 0,
|
7665 |
-
depth: 100,
|
7666 |
-
modifier: 1,
|
7667 |
-
slideShadows: true,
|
7668 |
-
},
|
7669 |
-
},
|
7670 |
-
create: function create() {
|
7671 |
-
var swiper = this;
|
7672 |
-
Utils.extend(swiper, {
|
7673 |
-
coverflowEffect: {
|
7674 |
-
setTranslate: Coverflow.setTranslate.bind(swiper),
|
7675 |
-
setTransition: Coverflow.setTransition.bind(swiper),
|
7676 |
-
},
|
7677 |
-
});
|
7678 |
-
},
|
7679 |
-
on: {
|
7680 |
-
beforeInit: function beforeInit() {
|
7681 |
-
var swiper = this;
|
7682 |
-
if (swiper.params.effect !== 'coverflow') { return; }
|
7683 |
-
|
7684 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow"));
|
7685 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
|
7686 |
-
|
7687 |
-
swiper.params.watchSlidesProgress = true;
|
7688 |
-
swiper.originalParams.watchSlidesProgress = true;
|
7689 |
-
},
|
7690 |
-
setTranslate: function setTranslate() {
|
7691 |
-
var swiper = this;
|
7692 |
-
if (swiper.params.effect !== 'coverflow') { return; }
|
7693 |
-
swiper.coverflowEffect.setTranslate();
|
7694 |
-
},
|
7695 |
-
setTransition: function setTransition(duration) {
|
7696 |
-
var swiper = this;
|
7697 |
-
if (swiper.params.effect !== 'coverflow') { return; }
|
7698 |
-
swiper.coverflowEffect.setTransition(duration);
|
7699 |
-
},
|
7700 |
-
},
|
7701 |
-
};
|
7702 |
-
|
7703 |
-
// Swiper Class
|
7704 |
-
|
7705 |
-
var components = [
|
7706 |
-
Device$1,
|
7707 |
-
Support$1,
|
7708 |
-
Browser$1,
|
7709 |
-
Resize,
|
7710 |
-
Observer$1,
|
7711 |
-
Virtual$1,
|
7712 |
-
Keyboard$1,
|
7713 |
-
Mousewheel$1,
|
7714 |
-
Navigation$1,
|
7715 |
-
Pagination$1,
|
7716 |
-
Scrollbar$1,
|
7717 |
-
Parallax$1,
|
7718 |
-
Zoom$1,
|
7719 |
-
Lazy$1,
|
7720 |
-
Controller$1,
|
7721 |
-
A11y,
|
7722 |
-
History$1,
|
7723 |
-
HashNavigation$1,
|
7724 |
-
Autoplay$1,
|
7725 |
-
EffectFade,
|
7726 |
-
EffectCube,
|
7727 |
-
EffectFlip,
|
7728 |
-
EffectCoverflow
|
7729 |
-
];
|
7730 |
-
|
7731 |
-
if (typeof Swiper.use === 'undefined') {
|
7732 |
-
Swiper.use = Swiper.Class.use;
|
7733 |
-
Swiper.installModule = Swiper.Class.installModule;
|
7734 |
-
}
|
7735 |
-
|
7736 |
-
Swiper.use(components);
|
7737 |
-
|
7738 |
-
return Swiper;
|
7739 |
-
|
7740 |
-
})));
|
1 |
+
/**
|
2 |
+
* Swiper 4.3.5
|
3 |
+
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
+
* http://www.idangero.us/swiper/
|
5 |
+
*
|
6 |
+
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
+
*
|
8 |
+
* Released under the MIT License
|
9 |
+
*
|
10 |
+
* Released on: July 31, 2018
|
11 |
+
*/
|
12 |
+
|
13 |
+
(function (global, factory) {
|
14 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
15 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
16 |
+
(global.Swiper = factory());
|
17 |
+
}(this, (function () { 'use strict';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* SSR Window 1.0.1
|
21 |
+
* Better handling for window object in SSR environment
|
22 |
+
* https://github.com/nolimits4web/ssr-window
|
23 |
+
*
|
24 |
+
* Copyright 2018, Vladimir Kharlampidi
|
25 |
+
*
|
26 |
+
* Licensed under MIT
|
27 |
+
*
|
28 |
+
* Released on: July 18, 2018
|
29 |
+
*/
|
30 |
+
var doc = (typeof document === 'undefined') ? {
|
31 |
+
body: {},
|
32 |
+
addEventListener: function addEventListener() {},
|
33 |
+
removeEventListener: function removeEventListener() {},
|
34 |
+
activeElement: {
|
35 |
+
blur: function blur() {},
|
36 |
+
nodeName: '',
|
37 |
+
},
|
38 |
+
querySelector: function querySelector() {
|
39 |
+
return null;
|
40 |
+
},
|
41 |
+
querySelectorAll: function querySelectorAll() {
|
42 |
+
return [];
|
43 |
+
},
|
44 |
+
getElementById: function getElementById() {
|
45 |
+
return null;
|
46 |
+
},
|
47 |
+
createEvent: function createEvent() {
|
48 |
+
return {
|
49 |
+
initEvent: function initEvent() {},
|
50 |
+
};
|
51 |
+
},
|
52 |
+
createElement: function createElement() {
|
53 |
+
return {
|
54 |
+
children: [],
|
55 |
+
childNodes: [],
|
56 |
+
style: {},
|
57 |
+
setAttribute: function setAttribute() {},
|
58 |
+
getElementsByTagName: function getElementsByTagName() {
|
59 |
+
return [];
|
60 |
+
},
|
61 |
+
};
|
62 |
+
},
|
63 |
+
location: { hash: '' },
|
64 |
+
} : document; // eslint-disable-line
|
65 |
+
|
66 |
+
var win = (typeof window === 'undefined') ? {
|
67 |
+
document: doc,
|
68 |
+
navigator: {
|
69 |
+
userAgent: '',
|
70 |
+
},
|
71 |
+
location: {},
|
72 |
+
history: {},
|
73 |
+
CustomEvent: function CustomEvent() {
|
74 |
+
return this;
|
75 |
+
},
|
76 |
+
addEventListener: function addEventListener() {},
|
77 |
+
removeEventListener: function removeEventListener() {},
|
78 |
+
getComputedStyle: function getComputedStyle() {
|
79 |
+
return {
|
80 |
+
getPropertyValue: function getPropertyValue() {
|
81 |
+
return '';
|
82 |
+
},
|
83 |
+
};
|
84 |
+
},
|
85 |
+
Image: function Image() {},
|
86 |
+
Date: function Date() {},
|
87 |
+
screen: {},
|
88 |
+
setTimeout: function setTimeout() {},
|
89 |
+
clearTimeout: function clearTimeout() {},
|
90 |
+
} : window; // eslint-disable-line
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Dom7 2.0.7
|
94 |
+
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
95 |
+
* http://framework7.io/docs/dom.html
|
96 |
+
*
|
97 |
+
* Copyright 2018, Vladimir Kharlampidi
|
98 |
+
* The iDangero.us
|
99 |
+
* http://www.idangero.us/
|
100 |
+
*
|
101 |
+
* Licensed under MIT
|
102 |
+
*
|
103 |
+
* Released on: June 14, 2018
|
104 |
+
*/
|
105 |
+
|
106 |
+
var Dom7 = function Dom7(arr) {
|
107 |
+
var self = this;
|
108 |
+
// Create array-like object
|
109 |
+
for (var i = 0; i < arr.length; i += 1) {
|
110 |
+
self[i] = arr[i];
|
111 |
+
}
|
112 |
+
self.length = arr.length;
|
113 |
+
// Return collection with methods
|
114 |
+
return this;
|
115 |
+
};
|
116 |
+
|
117 |
+
function $(selector, context) {
|
118 |
+
var arr = [];
|
119 |
+
var i = 0;
|
120 |
+
if (selector && !context) {
|
121 |
+
if (selector instanceof Dom7) {
|
122 |
+
return selector;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
if (selector) {
|
126 |
+
// String
|
127 |
+
if (typeof selector === 'string') {
|
128 |
+
var els;
|
129 |
+
var tempParent;
|
130 |
+
var html = selector.trim();
|
131 |
+
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
|
132 |
+
var toCreate = 'div';
|
133 |
+
if (html.indexOf('<li') === 0) { toCreate = 'ul'; }
|
134 |
+
if (html.indexOf('<tr') === 0) { toCreate = 'tbody'; }
|
135 |
+
if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) { toCreate = 'tr'; }
|
136 |
+
if (html.indexOf('<tbody') === 0) { toCreate = 'table'; }
|
137 |
+
if (html.indexOf('<option') === 0) { toCreate = 'select'; }
|
138 |
+
tempParent = doc.createElement(toCreate);
|
139 |
+
tempParent.innerHTML = html;
|
140 |
+
for (i = 0; i < tempParent.childNodes.length; i += 1) {
|
141 |
+
arr.push(tempParent.childNodes[i]);
|
142 |
+
}
|
143 |
+
} else {
|
144 |
+
if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
|
145 |
+
// Pure ID selector
|
146 |
+
els = [doc.getElementById(selector.trim().split('#')[1])];
|
147 |
+
} else {
|
148 |
+
// Other selectors
|
149 |
+
els = (context || doc).querySelectorAll(selector.trim());
|
150 |
+
}
|
151 |
+
for (i = 0; i < els.length; i += 1) {
|
152 |
+
if (els[i]) { arr.push(els[i]); }
|
153 |
+
}
|
154 |
+
}
|
155 |
+
} else if (selector.nodeType || selector === win || selector === doc) {
|
156 |
+
// Node/element
|
157 |
+
arr.push(selector);
|
158 |
+
} else if (selector.length > 0 && selector[0].nodeType) {
|
159 |
+
// Array of elements or instance of Dom
|
160 |
+
for (i = 0; i < selector.length; i += 1) {
|
161 |
+
arr.push(selector[i]);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
return new Dom7(arr);
|
166 |
+
}
|
167 |
+
|
168 |
+
$.fn = Dom7.prototype;
|
169 |
+
$.Class = Dom7;
|
170 |
+
$.Dom7 = Dom7;
|
171 |
+
|
172 |
+
function unique(arr) {
|
173 |
+
var uniqueArray = [];
|
174 |
+
for (var i = 0; i < arr.length; i += 1) {
|
175 |
+
if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }
|
176 |
+
}
|
177 |
+
return uniqueArray;
|
178 |
+
}
|
179 |
+
|
180 |
+
// Classes and attributes
|
181 |
+
function addClass(className) {
|
182 |
+
var this$1 = this;
|
183 |
+
|
184 |
+
if (typeof className === 'undefined') {
|
185 |
+
return this;
|
186 |
+
}
|
187 |
+
var classes = className.split(' ');
|
188 |
+
for (var i = 0; i < classes.length; i += 1) {
|
189 |
+
for (var j = 0; j < this.length; j += 1) {
|
190 |
+
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }
|
191 |
+
}
|
192 |
+
}
|
193 |
+
return this;
|
194 |
+
}
|
195 |
+
function removeClass(className) {
|
196 |
+
var this$1 = this;
|
197 |
+
|
198 |
+
var classes = className.split(' ');
|
199 |
+
for (var i = 0; i < classes.length; i += 1) {
|
200 |
+
for (var j = 0; j < this.length; j += 1) {
|
201 |
+
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }
|
202 |
+
}
|
203 |
+
}
|
204 |
+
return this;
|
205 |
+
}
|
206 |
+
function hasClass(className) {
|
207 |
+
if (!this[0]) { return false; }
|
208 |
+
return this[0].classList.contains(className);
|
209 |
+
}
|
210 |
+
function toggleClass(className) {
|
211 |
+
var this$1 = this;
|
212 |
+
|
213 |
+
var classes = className.split(' ');
|
214 |
+
for (var i = 0; i < classes.length; i += 1) {
|
215 |
+
for (var j = 0; j < this.length; j += 1) {
|
216 |
+
if (typeof this$1[j] !== 'undefined' && typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }
|
217 |
+
}
|
218 |
+
}
|
219 |
+
return this;
|
220 |
+
}
|
221 |
+
function attr(attrs, value) {
|
222 |
+
var arguments$1 = arguments;
|
223 |
+
var this$1 = this;
|
224 |
+
|
225 |
+
if (arguments.length === 1 && typeof attrs === 'string') {
|
226 |
+
// Get attr
|
227 |
+
if (this[0]) { return this[0].getAttribute(attrs); }
|
228 |
+
return undefined;
|
229 |
+
}
|
230 |
+
|
231 |
+
// Set attrs
|
232 |
+
for (var i = 0; i < this.length; i += 1) {
|
233 |
+
if (arguments$1.length === 2) {
|
234 |
+
// String
|
235 |
+
this$1[i].setAttribute(attrs, value);
|
236 |
+
} else {
|
237 |
+
// Object
|
238 |
+
// eslint-disable-next-line
|
239 |
+
for (var attrName in attrs) {
|
240 |
+
this$1[i][attrName] = attrs[attrName];
|
241 |
+
this$1[i].setAttribute(attrName, attrs[attrName]);
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
+
return this;
|
246 |
+
}
|
247 |
+
// eslint-disable-next-line
|
248 |
+
function removeAttr(attr) {
|
249 |
+
var this$1 = this;
|
250 |
+
|
251 |
+
for (var i = 0; i < this.length; i += 1) {
|
252 |
+
this$1[i].removeAttribute(attr);
|
253 |
+
}
|
254 |
+
return this;
|
255 |
+
}
|
256 |
+
function data(key, value) {
|
257 |
+
var this$1 = this;
|
258 |
+
|
259 |
+
var el;
|
260 |
+
if (typeof value === 'undefined') {
|
261 |
+
el = this[0];
|
262 |
+
// Get value
|
263 |
+
if (el) {
|
264 |
+
if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {
|
265 |
+
return el.dom7ElementDataStorage[key];
|
266 |
+
}
|
267 |
+
|
268 |
+
var dataKey = el.getAttribute(("data-" + key));
|
269 |
+
if (dataKey) {
|
270 |
+
return dataKey;
|
271 |
+
}
|
272 |
+
return undefined;
|
273 |
+
}
|
274 |
+
return undefined;
|
275 |
+
}
|
276 |
+
|
277 |
+
// Set value
|
278 |
+
for (var i = 0; i < this.length; i += 1) {
|
279 |
+
el = this$1[i];
|
280 |
+
if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }
|
281 |
+
el.dom7ElementDataStorage[key] = value;
|
282 |
+
}
|
283 |
+
return this;
|
284 |
+
}
|
285 |
+
// Transforms
|
286 |
+
// eslint-disable-next-line
|
287 |
+
function transform(transform) {
|
288 |
+
var this$1 = this;
|
289 |
+
|
290 |
+
for (var i = 0; i < this.length; i += 1) {
|
291 |
+
var elStyle = this$1[i].style;
|
292 |
+
elStyle.webkitTransform = transform;
|
293 |
+
elStyle.transform = transform;
|
294 |
+
}
|
295 |
+
return this;
|
296 |
+
}
|
297 |
+
function transition(duration) {
|
298 |
+
var this$1 = this;
|
299 |
+
|
300 |
+
if (typeof duration !== 'string') {
|
301 |
+
duration = duration + "ms"; // eslint-disable-line
|
302 |
+
}
|
303 |
+
for (var i = 0; i < this.length; i += 1) {
|
304 |
+
var elStyle = this$1[i].style;
|
305 |
+
elStyle.webkitTransitionDuration = duration;
|
306 |
+
elStyle.transitionDuration = duration;
|
307 |
+
}
|
308 |
+
return this;
|
309 |
+
}
|
310 |
+
// Events
|
311 |
+
function on() {
|
312 |
+
var this$1 = this;
|
313 |
+
var assign;
|
314 |
+
|
315 |
+
var args = [], len = arguments.length;
|
316 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
317 |
+
var eventType = args[0];
|
318 |
+
var targetSelector = args[1];
|
319 |
+
var listener = args[2];
|
320 |
+
var capture = args[3];
|
321 |
+
if (typeof args[1] === 'function') {
|
322 |
+
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
323 |
+
targetSelector = undefined;
|
324 |
+
}
|
325 |
+
if (!capture) { capture = false; }
|
326 |
+
|
327 |
+
function handleLiveEvent(e) {
|
328 |
+
var target = e.target;
|
329 |
+
if (!target) { return; }
|
330 |
+
var eventData = e.target.dom7EventData || [];
|
331 |
+
if (eventData.indexOf(e) < 0) {
|
332 |
+
eventData.unshift(e);
|
333 |
+
}
|
334 |
+
if ($(target).is(targetSelector)) { listener.apply(target, eventData); }
|
335 |
+
else {
|
336 |
+
var parents = $(target).parents(); // eslint-disable-line
|
337 |
+
for (var k = 0; k < parents.length; k += 1) {
|
338 |
+
if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }
|
339 |
+
}
|
340 |
+
}
|
341 |
+
}
|
342 |
+
function handleEvent(e) {
|
343 |
+
var eventData = e && e.target ? e.target.dom7EventData || [] : [];
|
344 |
+
if (eventData.indexOf(e) < 0) {
|
345 |
+
eventData.unshift(e);
|
346 |
+
}
|
347 |
+
listener.apply(this, eventData);
|
348 |
+
}
|
349 |
+
var events = eventType.split(' ');
|
350 |
+
var j;
|
351 |
+
for (var i = 0; i < this.length; i += 1) {
|
352 |
+
var el = this$1[i];
|
353 |
+
if (!targetSelector) {
|
354 |
+
for (j = 0; j < events.length; j += 1) {
|
355 |
+
var event = events[j];
|
356 |
+
if (!el.dom7Listeners) { el.dom7Listeners = {}; }
|
357 |
+
if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; }
|
358 |
+
el.dom7Listeners[event].push({
|
359 |
+
listener: listener,
|
360 |
+
proxyListener: handleEvent,
|
361 |
+
});
|
362 |
+
el.addEventListener(event, handleEvent, capture);
|
363 |
+
}
|
364 |
+
} else {
|
365 |
+
// Live events
|
366 |
+
for (j = 0; j < events.length; j += 1) {
|
367 |
+
var event$1 = events[j];
|
368 |
+
if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; }
|
369 |
+
if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; }
|
370 |
+
el.dom7LiveListeners[event$1].push({
|
371 |
+
listener: listener,
|
372 |
+
proxyListener: handleLiveEvent,
|
373 |
+
});
|
374 |
+
el.addEventListener(event$1, handleLiveEvent, capture);
|
375 |
+
}
|
376 |
+
}
|
377 |
+
}
|
378 |
+
return this;
|
379 |
+
}
|
380 |
+
function off() {
|
381 |
+
var this$1 = this;
|
382 |
+
var assign;
|
383 |
+
|
384 |
+
var args = [], len = arguments.length;
|
385 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
386 |
+
var eventType = args[0];
|
387 |
+
var targetSelector = args[1];
|
388 |
+
var listener = args[2];
|
389 |
+
var capture = args[3];
|
390 |
+
if (typeof args[1] === 'function') {
|
391 |
+
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
392 |
+
targetSelector = undefined;
|
393 |
+
}
|
394 |
+
if (!capture) { capture = false; }
|
395 |
+
|
396 |
+
var events = eventType.split(' ');
|
397 |
+
for (var i = 0; i < events.length; i += 1) {
|
398 |
+
var event = events[i];
|
399 |
+
for (var j = 0; j < this.length; j += 1) {
|
400 |
+
var el = this$1[j];
|
401 |
+
var handlers = (void 0);
|
402 |
+
if (!targetSelector && el.dom7Listeners) {
|
403 |
+
handlers = el.dom7Listeners[event];
|
404 |
+
} else if (targetSelector && el.dom7LiveListeners) {
|
405 |
+
handlers = el.dom7LiveListeners[event];
|
406 |
+
}
|
407 |
+
if (handlers && handlers.length) {
|
408 |
+
for (var k = handlers.length - 1; k >= 0; k -= 1) {
|
409 |
+
var handler = handlers[k];
|
410 |
+
if (listener && handler.listener === listener) {
|
411 |
+
el.removeEventListener(event, handler.proxyListener, capture);
|
412 |
+
handlers.splice(k, 1);
|
413 |
+
} else if (!listener) {
|
414 |
+
el.removeEventListener(event, handler.proxyListener, capture);
|
415 |
+
handlers.splice(k, 1);
|
416 |
+
}
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
}
|
421 |
+
return this;
|
422 |
+
}
|
423 |
+
function trigger() {
|
424 |
+
var this$1 = this;
|
425 |
+
var args = [], len = arguments.length;
|
426 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
427 |
+
|
428 |
+
var events = args[0].split(' ');
|
429 |
+
var eventData = args[1];
|
430 |
+
for (var i = 0; i < events.length; i += 1) {
|
431 |
+
var event = events[i];
|
432 |
+
for (var j = 0; j < this.length; j += 1) {
|
433 |
+
var el = this$1[j];
|
434 |
+
var evt = (void 0);
|
435 |
+
try {
|
436 |
+
evt = new win.CustomEvent(event, {
|
437 |
+
detail: eventData,
|
438 |
+
bubbles: true,
|
439 |
+
cancelable: true,
|
440 |
+
});
|
441 |
+
} catch (e) {
|
442 |
+
evt = doc.createEvent('Event');
|
443 |
+
evt.initEvent(event, true, true);
|
444 |
+
evt.detail = eventData;
|
445 |
+
}
|
446 |
+
// eslint-disable-next-line
|
447 |
+
el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });
|
448 |
+
el.dispatchEvent(evt);
|
449 |
+
el.dom7EventData = [];
|
450 |
+
delete el.dom7EventData;
|
451 |
+
}
|
452 |
+
}
|
453 |
+
return this;
|
454 |
+
}
|
455 |
+
function transitionEnd(callback) {
|
456 |
+
var events = ['webkitTransitionEnd', 'transitionend'];
|
457 |
+
var dom = this;
|
458 |
+
var i;
|
459 |
+
function fireCallBack(e) {
|
460 |
+
/* jshint validthis:true */
|
461 |
+
if (e.target !== this) { return; }
|
462 |
+
callback.call(this, e);
|
463 |
+
for (i = 0; i < events.length; i += 1) {
|
464 |
+
dom.off(events[i], fireCallBack);
|
465 |
+
}
|
466 |
+
}
|
467 |
+
if (callback) {
|
468 |
+
for (i = 0; i < events.length; i += 1) {
|
469 |
+
dom.on(events[i], fireCallBack);
|
470 |
+
}
|
471 |
+
}
|
472 |
+
return this;
|
473 |
+
}
|
474 |
+
function outerWidth(includeMargins) {
|
475 |
+
if (this.length > 0) {
|
476 |
+
if (includeMargins) {
|
477 |
+
// eslint-disable-next-line
|
478 |
+
var styles = this.styles();
|
479 |
+
return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
|
480 |
+
}
|
481 |
+
return this[0].offsetWidth;
|
482 |
+
}
|
483 |
+
return null;
|
484 |
+
}
|
485 |
+
function outerHeight(includeMargins) {
|
486 |
+
if (this.length > 0) {
|
487 |
+
if (includeMargins) {
|
488 |
+
// eslint-disable-next-line
|
489 |
+
var styles = this.styles();
|
490 |
+
return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
|
491 |
+
}
|
492 |
+
return this[0].offsetHeight;
|
493 |
+
}
|
494 |
+
return null;
|
495 |
+
}
|
496 |
+
function offset() {
|
497 |
+
if (this.length > 0) {
|
498 |
+
var el = this[0];
|
499 |
+
var box = el.getBoundingClientRect();
|
500 |
+
var body = doc.body;
|
501 |
+
var clientTop = el.clientTop || body.clientTop || 0;
|
502 |
+
var clientLeft = el.clientLeft || body.clientLeft || 0;
|
503 |
+
var scrollTop = el === win ? win.scrollY : el.scrollTop;
|
504 |
+
var scrollLeft = el === win ? win.scrollX : el.scrollLeft;
|
505 |
+
return {
|
506 |
+
top: (box.top + scrollTop) - clientTop,
|
507 |
+
left: (box.left + scrollLeft) - clientLeft,
|
508 |
+
};
|
509 |
+
}
|
510 |
+
|
511 |
+
return null;
|
512 |
+
}
|
513 |
+
function styles() {
|
514 |
+
if (this[0]) { return win.getComputedStyle(this[0], null); }
|
515 |
+
return {};
|
516 |
+
}
|
517 |
+
function css(props, value) {
|
518 |
+
var this$1 = this;
|
519 |
+
|
520 |
+
var i;
|
521 |
+
if (arguments.length === 1) {
|
522 |
+
if (typeof props === 'string') {
|
523 |
+
if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); }
|
524 |
+
} else {
|
525 |
+
for (i = 0; i < this.length; i += 1) {
|
526 |
+
// eslint-disable-next-line
|
527 |
+
for (var prop in props) {
|
528 |
+
this$1[i].style[prop] = props[prop];
|
529 |
+
}
|
530 |
+
}
|
531 |
+
return this;
|
532 |
+
}
|
533 |
+
}
|
534 |
+
if (arguments.length === 2 && typeof props === 'string') {
|
535 |
+
for (i = 0; i < this.length; i += 1) {
|
536 |
+
this$1[i].style[props] = value;
|
537 |
+
}
|
538 |
+
return this;
|
539 |
+
}
|
540 |
+
return this;
|
541 |
+
}
|
542 |
+
// Iterate over the collection passing elements to `callback`
|
543 |
+
function each(callback) {
|
544 |
+
var this$1 = this;
|
545 |
+
|
546 |
+
// Don't bother continuing without a callback
|
547 |
+
if (!callback) { return this; }
|
548 |
+
// Iterate over t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|