Version Description
:- 2019-04-02 :- Low priority = * Added shortcode attribute classname * Fixed Custom CSS classes in Gutenberg editor not being applied
Download this release
Release Info
Developer | perryrylance |
Plugin | WP Google Maps |
Version | 7.11.17 |
Comparing to | |
See all releases |
Code changes from version 7.11.16 to 7.11.17
- includes/3rd-party-integration/class.gutenberg.php +10 -1
- includes/build.log +283 -283
- includes/class.crud.php +1 -1
- includes/class.crud.php.bak +638 -0
- includes/class.marker.php +14 -0
- includes/class.marker.php.bak +157 -0
- includes/class.rest-api.php.bak +2 -2
- includes/class.strings.php +8 -1
- includes/class.strings.php.bak +5 -2
- includes/tables/class.admin-marker-datatable.php +1 -1
- includes/tables/class.admin-marker-datatable.php.bak +106 -0
- js/v8/tables/admin-marker-datatable.js +1 -1
- js/v8/tables/admin-marker-datatable.js.bak +75 -0
- js/v8/wp-google-maps.combined.js +1 -1
- js/v8/wp-google-maps.min.js +1 -1
- legacy-core.php +5 -2
- readme.txt +4 -0
- wpGoogleMaps.php +5 -1
includes/3rd-party-integration/class.gutenberg.php
CHANGED
@@ -88,6 +88,15 @@ class Gutenberg extends \WPGMZA\Factory
|
|
88 |
{
|
89 |
extract($attr);
|
90 |
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
}
|
88 |
{
|
89 |
extract($attr);
|
90 |
|
91 |
+
$attributes = array_merge(array('id' => 1), $attr);
|
92 |
+
|
93 |
+
$str = "[wpgmza";
|
94 |
+
|
95 |
+
foreach($attributes as $name => $value)
|
96 |
+
$str .= " $name=\"" . addslashes($value) . "\"";
|
97 |
+
|
98 |
+
$str .= "]";
|
99 |
+
|
100 |
+
return $str;
|
101 |
}
|
102 |
}
|
includes/build.log
CHANGED
@@ -1,283 +1,283 @@
|
|
1 |
-
2019-
|
2 |
-
2019-
|
3 |
-
2019-
|
4 |
-
2019-
|
5 |
-
2019-
|
6 |
-
2019-
|
7 |
-
2019-
|
8 |
-
2019-
|
9 |
-
2019-
|
10 |
-
2019-
|
11 |
-
2019-
|
12 |
-
2019-
|
13 |
-
2019-
|
14 |
-
2019-
|
15 |
-
2019-
|
16 |
-
2019-
|
17 |
-
2019-
|
18 |
-
2019-
|
19 |
-
2019-
|
20 |
-
2019-
|
21 |
-
2019-
|
22 |
-
2019-
|
23 |
-
2019-
|
24 |
-
2019-
|
25 |
-
2019-
|
26 |
-
2019-
|
27 |
-
2019-
|
28 |
-
2019-
|
29 |
-
2019-
|
30 |
-
2019-
|
31 |
-
2019-
|
32 |
-
2019-
|
33 |
-
2019-
|
34 |
-
2019-
|
35 |
-
2019-
|
36 |
-
2019-
|
37 |
-
2019-
|
38 |
-
2019-
|
39 |
-
2019-
|
40 |
-
2019-
|
41 |
-
2019-
|
42 |
-
2019-
|
43 |
-
2019-
|
44 |
-
2019-
|
45 |
-
2019-
|
46 |
-
2019-
|
47 |
-
2019-
|
48 |
-
2019-
|
49 |
-
2019-
|
50 |
-
2019-
|
51 |
-
2019-
|
52 |
-
2019-
|
53 |
-
2019-
|
54 |
-
2019-
|
55 |
-
2019-
|
56 |
-
2019-
|
57 |
-
2019-
|
58 |
-
2019-
|
59 |
-
2019-
|
60 |
-
2019-
|
61 |
-
2019-
|
62 |
-
2019-
|
63 |
-
2019-
|
64 |
-
2019-
|
65 |
-
2019-
|
66 |
-
2019-
|
67 |
-
2019-
|
68 |
-
2019-
|
69 |
-
2019-
|
70 |
-
2019-
|
71 |
-
2019-
|
72 |
-
2019-
|
73 |
-
2019-
|
74 |
-
2019-
|
75 |
-
2019-
|
76 |
-
2019-
|
77 |
-
2019-
|
78 |
-
2019-
|
79 |
-
2019-
|
80 |
-
2019-
|
81 |
-
2019-
|
82 |
-
2019-
|
83 |
-
2019-
|
84 |
-
2019-
|
85 |
-
2019-
|
86 |
-
2019-
|
87 |
-
2019-
|
88 |
-
2019-
|
89 |
-
2019-
|
90 |
-
2019-
|
91 |
-
2019-
|
92 |
-
2019-
|
93 |
-
2019-
|
94 |
-
2019-
|
95 |
-
2019-
|
96 |
-
2019-
|
97 |
-
2019-
|
98 |
-
2019-
|
99 |
-
2019-
|
100 |
-
2019-
|
101 |
-
2019-
|
102 |
-
2019-
|
103 |
-
2019-
|
104 |
-
2019-
|
105 |
-
2019-
|
106 |
-
2019-
|
107 |
-
2019-
|
108 |
-
2019-
|
109 |
-
2019-
|
110 |
-
2019-
|
111 |
-
2019-
|
112 |
-
2019-
|
113 |
-
2019-
|
114 |
-
2019-
|
115 |
-
2019-
|
116 |
-
2019-
|
117 |
-
2019-
|
118 |
-
2019-
|
119 |
-
2019-
|
120 |
-
2019-
|
121 |
-
2019-
|
122 |
-
2019-
|
123 |
-
2019-
|
124 |
-
2019-
|
125 |
-
2019-
|
126 |
-
2019-
|
127 |
-
2019-
|
128 |
-
2019-
|
129 |
-
2019-
|
130 |
-
2019-
|
131 |
-
2019-
|
132 |
-
2019-
|
133 |
-
2019-
|
134 |
-
2019-
|
135 |
-
2019-
|
136 |
-
2019-
|
137 |
-
2019-
|
138 |
-
2019-
|
139 |
-
2019-
|
140 |
-
2019-
|
141 |
-
2019-
|
142 |
-
2019-
|
143 |
-
2019-
|
144 |
-
2019-
|
145 |
-
2019-
|
146 |
-
2019-
|
147 |
-
2019-
|
148 |
-
2019-
|
149 |
-
2019-
|
150 |
-
2019-
|
151 |
-
2019-
|
152 |
-
2019-
|
153 |
-
2019-
|
154 |
-
2019-
|
155 |
-
2019-
|
156 |
-
2019-
|
157 |
-
2019-
|
158 |
-
2019-
|
159 |
-
2019-
|
160 |
-
2019-
|
161 |
-
2019-
|
162 |
-
2019-
|
163 |
-
2019-
|
164 |
-
2019-
|
165 |
-
2019-
|
166 |
-
2019-
|
167 |
-
2019-
|
168 |
-
2019-
|
169 |
-
2019-
|
170 |
-
2019-
|
171 |
-
2019-
|
172 |
-
2019-
|
173 |
-
2019-
|
174 |
-
2019-
|
175 |
-
2019-
|
176 |
-
2019-
|
177 |
-
2019-
|
178 |
-
2019-
|
179 |
-
2019-
|
180 |
-
2019-
|
181 |
-
2019-
|
182 |
-
2019-
|
183 |
-
2019-
|
184 |
-
2019-
|
185 |
-
2019-
|
186 |
-
2019-
|
187 |
-
2019-
|
188 |
-
2019-
|
189 |
-
2019-
|
190 |
-
2019-
|
191 |
-
2019-
|
192 |
-
2019-
|
193 |
-
2019-
|
194 |
-
2019-
|
195 |
-
2019-
|
196 |
-
2019-
|
197 |
-
2019-
|
198 |
-
2019-
|
199 |
-
2019-
|
200 |
-
2019-
|
201 |
-
2019-
|
202 |
-
2019-
|
203 |
-
2019-
|
204 |
-
2019-
|
205 |
-
2019-
|
206 |
-
2019-
|
207 |
-
2019-
|
208 |
-
2019-
|
209 |
-
2019-
|
210 |
-
2019-
|
211 |
-
2019-
|
212 |
-
2019-
|
213 |
-
2019-
|
214 |
-
2019-
|
215 |
-
2019-
|
216 |
-
2019-
|
217 |
-
2019-
|
218 |
-
2019-
|
219 |
-
2019-
|
220 |
-
2019-
|
221 |
-
2019-
|
222 |
-
2019-
|
223 |
-
2019-
|
224 |
-
2019-
|
225 |
-
2019-
|
226 |
-
2019-
|
227 |
-
2019-
|
228 |
-
2019-
|
229 |
-
2019-
|
230 |
-
2019-
|
231 |
-
2019-
|
232 |
-
2019-
|
233 |
-
2019-
|
234 |
-
2019-
|
235 |
-
2019-
|
236 |
-
2019-
|
237 |
-
2019-
|
238 |
-
2019-
|
239 |
-
2019-
|
240 |
-
2019-
|
241 |
-
2019-
|
242 |
-
2019-
|
243 |
-
2019-
|
244 |
-
2019-
|
245 |
-
2019-
|
246 |
-
2019-
|
247 |
-
2019-
|
248 |
-
2019-
|
249 |
-
2019-
|
250 |
-
2019-
|
251 |
-
2019-
|
252 |
-
2019-
|
253 |
-
2019-
|
254 |
-
2019-
|
255 |
-
2019-
|
256 |
-
2019-
|
257 |
-
2019-
|
258 |
-
2019-
|
259 |
-
2019-
|
260 |
-
2019-
|
261 |
-
2019-
|
262 |
-
2019-
|
263 |
-
2019-
|
264 |
-
2019-
|
265 |
-
2019-
|
266 |
-
2019-
|
267 |
-
2019-
|
268 |
-
2019-
|
269 |
-
2019-
|
270 |
-
2019-
|
271 |
-
2019-
|
272 |
-
2019-
|
273 |
-
2019-
|
274 |
-
2019-
|
275 |
-
2019-
|
276 |
-
2019-
|
277 |
-
2019-
|
278 |
-
2019-
|
279 |
-
2019-
|
280 |
-
2019-
|
281 |
-
2019-
|
282 |
-
2019-
|
283 |
-
2019-
|
1 |
+
2019-04-02 06:54:05 :- Scanning dependencies
|
2 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/circle.js
|
3 |
+
2019-04-02 06:54:05 :- Found wpgmza-circle
|
4 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map-object
|
5 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/compatibility.js
|
6 |
+
2019-04-02 06:54:05 :- Found wpgmza-compatibility
|
7 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
8 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/core.js
|
9 |
+
2019-04-02 06:54:05 :- Found wpgmza
|
10 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/css-escape.js
|
11 |
+
2019-04-02 06:54:05 :- Found wpgmza-css
|
12 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
13 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/distance.js
|
14 |
+
2019-04-02 06:54:05 :- Found wpgmza-distance
|
15 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
16 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/event-dispatcher.js
|
17 |
+
2019-04-02 06:54:05 :- Found wpgmza-event-dispatcher
|
18 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
19 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/event.js
|
20 |
+
2019-04-02 06:54:05 :- Found wpgmza-event
|
21 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
22 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/friendly-error.js
|
23 |
+
2019-04-02 06:54:05 :- Found wpgmza-friendly-error
|
24 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
25 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/geocoder.js
|
26 |
+
2019-04-02 06:54:05 :- Found wpgmza-geocoder
|
27 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
28 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-api-error-handler.js
|
29 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-api-error-handler
|
30 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
31 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/info-window.js
|
32 |
+
2019-04-02 06:54:05 :- Found wpgmza-info-window
|
33 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
34 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/latlng.js
|
35 |
+
2019-04-02 06:54:05 :- Found wpgmza-lat-lng
|
36 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
37 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/latlngbounds.js
|
38 |
+
2019-04-02 06:54:05 :- Found wpgmza-lat-lng-bounds
|
39 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
40 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/map-object.js
|
41 |
+
2019-04-02 06:54:05 :- Found wpgmza-map-object
|
42 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
43 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/map-settings-page.js
|
44 |
+
2019-04-02 06:54:05 :- Found wpgmza-map-settings-page
|
45 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
46 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/map-settings.js
|
47 |
+
2019-04-02 06:54:05 :- Found wpgmza-map-settings
|
48 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
49 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/map.js
|
50 |
+
2019-04-02 06:54:05 :- Found wpgmza-map
|
51 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
52 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/maps-engine-dialog.js
|
53 |
+
2019-04-02 06:54:05 :- Found wpgmza-maps-engine-dialog
|
54 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
55 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/marker-filter.js
|
56 |
+
2019-04-02 06:54:05 :- Found wpgmza-marker-filter
|
57 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
58 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/marker.js
|
59 |
+
2019-04-02 06:54:05 :- Found wpgmza-marker
|
60 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
61 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/modern-store-locator-circle.js
|
62 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-store-locator-circle
|
63 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
64 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/modern-store-locator.js
|
65 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-store-locator
|
66 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
67 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-use-my-location-button
|
68 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/native-maps-icon.js
|
69 |
+
2019-04-02 06:54:05 :- Found wpgmza-native-maps-app-icon
|
70 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
71 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/polygon.js
|
72 |
+
2019-04-02 06:54:05 :- Found wpgmza-polygon
|
73 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map-object
|
74 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/polyline.js
|
75 |
+
2019-04-02 06:54:05 :- Found wpgmza-polyline
|
76 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map-object
|
77 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/popout-panel.js
|
78 |
+
2019-04-02 06:54:05 :- Found wpgmza-popout-panel
|
79 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
80 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/rest-api.js
|
81 |
+
2019-04-02 06:54:05 :- Found wpgmza-wpgmza-rest-api
|
82 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
83 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/store-locator.js
|
84 |
+
2019-04-02 06:54:05 :- Found wpgmza-store-locator
|
85 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
86 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/text.js
|
87 |
+
2019-04-02 06:54:05 :- Found wpgmza-text
|
88 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
89 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/v7-custom-script.js
|
90 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/version.js
|
91 |
+
2019-04-02 06:54:05 :- Found wpgmza-version
|
92 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
93 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/3rd-party-integration/integration.js
|
94 |
+
2019-04-02 06:54:05 :- Found wpgmza-integration
|
95 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
96 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/3rd-party-integration/gutenberg/dist/gutenberg.js
|
97 |
+
2019-04-02 06:54:05 :- Found wpgmza-gutenberg
|
98 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-integration
|
99 |
+
2019-04-02 06:54:05 :- Adding dependency wp-i18n
|
100 |
+
2019-04-02 06:54:05 :- Adding dependency wp-blocks
|
101 |
+
2019-04-02 06:54:05 :- Adding dependency wp-editor
|
102 |
+
2019-04-02 06:54:05 :- Adding dependency wp-components
|
103 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/compatibility/google-ui-compatibility.js
|
104 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-ui-compatibility
|
105 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
106 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-circle.js
|
107 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-circle
|
108 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-circle
|
109 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-geocoder.js
|
110 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-geocoder
|
111 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-geocoder
|
112 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-html-overlay.js
|
113 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-html-overlay
|
114 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
115 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-info-window.js
|
116 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-info-window
|
117 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-info-window
|
118 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-info-window
|
119 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-map.js
|
120 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-map
|
121 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map
|
122 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-map
|
123 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-marker.js
|
124 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-marker
|
125 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker
|
126 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-marker
|
127 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-modern-store-locator-circle.js
|
128 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-modern-store-locator-circle
|
129 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-modern-store-locator-circle
|
130 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-modern-store-locator.js
|
131 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-modern-store-locator
|
132 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-modern-store-locator
|
133 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-polygon.js
|
134 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-polygon
|
135 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-polygon
|
136 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-polygon
|
137 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-polyline.js
|
138 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-polyline
|
139 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-polyline
|
140 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-text-overlay.js
|
141 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-text-overlay
|
142 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-text
|
143 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-text.js
|
144 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-text
|
145 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-text
|
146 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/google-maps/google-vertex-context-menu.js
|
147 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-vertex-context-menu
|
148 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza_api_call
|
149 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-circle.js
|
150 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-circle
|
151 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-circle
|
152 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-geocoder.js
|
153 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-geocoder
|
154 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-geocoder
|
155 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-info-window.js
|
156 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-info-window
|
157 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-info-window
|
158 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-info-window
|
159 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-map.js
|
160 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-map
|
161 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map
|
162 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-map
|
163 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-marker.js
|
164 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-marker
|
165 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker
|
166 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-marker
|
167 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-modern-store-locator-circle.js
|
168 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-modern-store-locator-circle
|
169 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-modern-store-locator-circle
|
170 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-modern-store-locator.js
|
171 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-modern-store-locator
|
172 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-modern-store-locator
|
173 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-polygon.js
|
174 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-polygon
|
175 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-polygon
|
176 |
+
2019-04-02 06:54:05 :- Adding Pro dependency wpgmza-pro-polygon
|
177 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-polyline.js
|
178 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-polyline
|
179 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-polyline
|
180 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/open-layers/ol-text.js
|
181 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-text
|
182 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-text
|
183 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/tables/admin-marker-datatable.js
|
184 |
+
2019-04-02 06:54:05 :- Found wpgmza-admin-marker-data-table
|
185 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-data-table
|
186 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps/js/v8/tables/datatable.js
|
187 |
+
2019-04-02 06:54:05 :- Found wpgmza-data-table
|
188 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
189 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/content-editor-map-button.js
|
190 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/custom-field-filter-controller.js
|
191 |
+
2019-04-02 06:54:05 :- Found wpgmza-custom-field-filter-controller
|
192 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
193 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/custom-field-filter-widget.js
|
194 |
+
2019-04-02 06:54:05 :- Found wpgmza-custom-field-filter-widget
|
195 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
196 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/heatmap.js
|
197 |
+
2019-04-02 06:54:05 :- Found wpgmza-heatmap
|
198 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map-object
|
199 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/modern-directions-box.js
|
200 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-directions-box
|
201 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-popout-panel
|
202 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/modern-directions-result-box.js
|
203 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-directions-result-box
|
204 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-popout-panel
|
205 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/modern-marker-listing-marker-view.js
|
206 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-marker-listing-marker-view
|
207 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-popout-panel
|
208 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/modern-marker-listing.js
|
209 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-marker-listing
|
210 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-popout-panel
|
211 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-info-window.js
|
212 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-info-window
|
213 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-info-window
|
214 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-map.js
|
215 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-map
|
216 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-map
|
217 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-marker-filter.js
|
218 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-marker-filter
|
219 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker-filter
|
220 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-marker.js
|
221 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-marker
|
222 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker
|
223 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-polygon.js
|
224 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-polygon
|
225 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-polygon
|
226 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/pro-store-locator.js
|
227 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-store-locator
|
228 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-store-locator
|
229 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/use-my-location-button.js
|
230 |
+
2019-04-02 06:54:05 :- Found wpgmza-use-my-location-button
|
231 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-event-dispatcher
|
232 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/xml-cache-converter.js
|
233 |
+
2019-04-02 06:54:05 :- Found wpgmza-xml-cache-converter
|
234 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
235 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/3rd-party-integration/gutenberg/dist/pro-gutenberg.js
|
236 |
+
2019-04-02 06:54:05 :- Found wpgmza-pro-gutenberg
|
237 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-gutenberg
|
238 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/google-maps/google-heatmap.js
|
239 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-heatmap
|
240 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-heatmap
|
241 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/google-maps/google-pro-info-window.js
|
242 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-pro-info-window
|
243 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-google-info-window
|
244 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/google-maps/google-pro-map.js
|
245 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-pro-map
|
246 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-google-map
|
247 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/google-maps/google-pro-marker.js
|
248 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-pro-marker
|
249 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-google-marker
|
250 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/google-maps/google-pro-polygon.js
|
251 |
+
2019-04-02 06:54:05 :- Found wpgmza-google-pro-polygon
|
252 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-google-polygon
|
253 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/marker-listings/advanced-table-datatable.js
|
254 |
+
2019-04-02 06:54:05 :- Found wpgmza-advanced-table-data-table
|
255 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-data-table
|
256 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/marker-listings/advanced-table-marker-listing.js
|
257 |
+
2019-04-02 06:54:05 :- Found wpgmza-advanced-table-marker-listing
|
258 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker-listing
|
259 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/marker-listings/carousel-marker-listing.js
|
260 |
+
2019-04-02 06:54:05 :- Found wpgmza-carousel-marker-listing
|
261 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker-listing
|
262 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/marker-listings/marker-listing.js
|
263 |
+
2019-04-02 06:54:05 :- Found wpgmza-marker-listing
|
264 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza
|
265 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/marker-listings/modern-marker-listing.js
|
266 |
+
2019-04-02 06:54:05 :- Found wpgmza-modern-marker-listing
|
267 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-marker-listing
|
268 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-popout-panel
|
269 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/open-layers/ol-heatmap.js
|
270 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-heatmap
|
271 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-heatmap
|
272 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/open-layers/ol-pro-info-window.js
|
273 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-pro-info-window
|
274 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-ol-info-window
|
275 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/open-layers/ol-pro-map.js
|
276 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-pro-map
|
277 |
+
2019-04-02 06:54:05 :- Adding dependency wpgmza-ol-map
|
278 |
+
2019-04-02 06:54:05 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/open-layers/ol-pro-marker.js
|
279 |
+
2019-04-02 06:54:05 :- Found wpgmza-ol-pro-marker
|
280 |
+
2019-04-02 06:54:06 :- Adding dependency wpgmza-ol-marker
|
281 |
+
2019-04-02 06:54:06 :- Reading E:\Programming\Code Cabin\htdocs-7.11.00\wp-content\plugins\wp-google-maps-pro/js/v8/open-layers/ol-pro-polygon.js
|
282 |
+
2019-04-02 06:54:06 :- Found wpgmza-ol-pro-polygon
|
283 |
+
2019-04-02 06:54:06 :- Adding dependency wpgmza-ol-polygon
|
includes/class.crud.php
CHANGED
@@ -629,7 +629,7 @@ class Crud extends Factory implements \IteratorAggregate, \JsonSerializable
|
|
629 |
$column_names = $this->get_column_names();
|
630 |
|
631 |
if(array_search($name, $column_names) !== false)
|
632 |
-
throw \Exception('Only arbitrary data can be unset. Columns must be set to NULL instead');
|
633 |
|
634 |
unset($this->fields[$name]);
|
635 |
|
629 |
$column_names = $this->get_column_names();
|
630 |
|
631 |
if(array_search($name, $column_names) !== false)
|
632 |
+
throw new \Exception('Only arbitrary data can be unset. Columns must be set to NULL instead');
|
633 |
|
634 |
unset($this->fields[$name]);
|
635 |
|
includes/class.crud.php.bak
ADDED
@@ -0,0 +1,638 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGMZA;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* The CRUD class is a base class which acts as an interface between any
|
7 |
+
* objects which are stored on in the database and represented in server
|
8 |
+
* side logic, for example Map, Marker, Polygon
|
9 |
+
*/
|
10 |
+
class Crud extends Factory implements \IteratorAggregate, \JsonSerializable
|
11 |
+
{
|
12 |
+
const SINGLE_READ = "single-read";
|
13 |
+
const BULK_READ = "bulk-read";
|
14 |
+
|
15 |
+
private static $cached_columns_by_table_name;
|
16 |
+
private static $cached_column_name_map_by_table_name;
|
17 |
+
|
18 |
+
private $id;
|
19 |
+
private $table_name;
|
20 |
+
private $fields;
|
21 |
+
private $modified;
|
22 |
+
|
23 |
+
private $trashed = false;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Constructor
|
27 |
+
* @param string $table_name The table name for this object type
|
28 |
+
* @param int|array|object $id_or_fields The ID of the object to read, or an object or array of data to insert.
|
29 |
+
*/
|
30 |
+
public function __construct($table_name, $id_or_fields=-1, $read_mode=Crud::SINGLE_READ)
|
31 |
+
{
|
32 |
+
global $wpdb;
|
33 |
+
|
34 |
+
$this->fields = array();
|
35 |
+
|
36 |
+
if(is_object($id_or_fields) || is_array($id_or_fields))
|
37 |
+
{
|
38 |
+
foreach($id_or_fields as $key => $value)
|
39 |
+
$this->fields[$key] = $value;
|
40 |
+
|
41 |
+
if($read_mode == Crud::BULK_READ)
|
42 |
+
{
|
43 |
+
$obj = (object)$id_or_fields;
|
44 |
+
|
45 |
+
if(!isset($obj->id))
|
46 |
+
throw new \Exception('Cannot bulk read without ID');
|
47 |
+
|
48 |
+
$this->id = $obj->id;
|
49 |
+
}
|
50 |
+
|
51 |
+
if($read_mode != Crud::BULK_READ)
|
52 |
+
$id = -1;
|
53 |
+
}
|
54 |
+
else if(preg_match('/^-?\d+$/', $id_or_fields))
|
55 |
+
$id = (int)$id_or_fields;
|
56 |
+
else
|
57 |
+
throw new \Exception('Invalid ID');
|
58 |
+
|
59 |
+
$this->table_name = $table_name;
|
60 |
+
|
61 |
+
$this->id = $id;
|
62 |
+
|
63 |
+
if(!isset(Crud::$cached_columns_by_table_name))
|
64 |
+
Crud::$cached_columns_by_table_name = array();
|
65 |
+
|
66 |
+
if(!isset(Crud::$cached_columns_by_table_name[$table_name]))
|
67 |
+
{
|
68 |
+
$columns = $wpdb->get_results("SHOW COLUMNS FROM $table_name");
|
69 |
+
|
70 |
+
Crud::$cached_column_name_map_by_table_name[$table_name] = array();
|
71 |
+
foreach($columns as $col)
|
72 |
+
Crud::$cached_column_name_map_by_table_name[$table_name][$col->Field] = true;
|
73 |
+
|
74 |
+
Crud::$cached_columns_by_table_name[$table_name] = $columns;
|
75 |
+
}
|
76 |
+
|
77 |
+
if($this->id == -1)
|
78 |
+
$this->create();
|
79 |
+
else
|
80 |
+
$this->read(Marker::SINGLE_READ);
|
81 |
+
}
|
82 |
+
|
83 |
+
public static function bulk_read($data, $constructor)
|
84 |
+
{
|
85 |
+
if(!is_array($data))
|
86 |
+
throw new \Exception('Argument must be an array of objects');
|
87 |
+
|
88 |
+
$result = array();
|
89 |
+
|
90 |
+
foreach($data as $row)
|
91 |
+
$result[] = new $constructor($row, Crud::BULK_READ);
|
92 |
+
|
93 |
+
return $result;
|
94 |
+
}
|
95 |
+
|
96 |
+
public static function bulk_trash($ids)
|
97 |
+
{
|
98 |
+
global $wpdb;
|
99 |
+
|
100 |
+
if(!is_array($ids))
|
101 |
+
throw new \Exception('Arugment must be an array of integer IDs');
|
102 |
+
|
103 |
+
if(empty($ids))
|
104 |
+
return;
|
105 |
+
|
106 |
+
$table_name = static::get_table_name_static();
|
107 |
+
|
108 |
+
$count = count($ids);
|
109 |
+
$placeholders = implode(',', array_fill(0, $count, '%d'));
|
110 |
+
$stmt = $wpdb->prepare("DELETE FROM `{$table_name}` WHERE id IN ($placeholders)", $ids);
|
111 |
+
$wpdb->query($stmt);
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Gets the table name for this object type
|
116 |
+
* @return string
|
117 |
+
*/
|
118 |
+
public function get_table_name()
|
119 |
+
{
|
120 |
+
return $this->table_name;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Gets the column information (name, type, etc.)
|
125 |
+
* @return array
|
126 |
+
*/
|
127 |
+
public function get_columns()
|
128 |
+
{
|
129 |
+
return Crud::$cached_columns_by_table_name[$this->table_name];
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Returns an array of the column names represented as strings
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
public function get_column_names()
|
137 |
+
{
|
138 |
+
return array_keys( Crud::$cached_column_name_map_by_table_name[$this->table_name] );
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Return the SQL field type of the specified column
|
143 |
+
* @return string
|
144 |
+
*/
|
145 |
+
public function get_column_type($name)
|
146 |
+
{
|
147 |
+
$columns = $this->get_columns();
|
148 |
+
|
149 |
+
foreach($columns as $index => $column)
|
150 |
+
{
|
151 |
+
if($column->Field == $name)
|
152 |
+
return $column->Type;
|
153 |
+
}
|
154 |
+
|
155 |
+
return Crud::$cached_columns_by_table_name[$this->table_name];
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Gets the placeholder for a prepared statement based on the SQL column type specified.
|
160 |
+
* @param string $type The SQL data type
|
161 |
+
* @return string A placeholder, such as %s, %d or %f
|
162 |
+
*/
|
163 |
+
protected function get_placeholder_by_type($type)
|
164 |
+
{
|
165 |
+
$type = strtolower(preg_replace('/\(\d+\)$/', '', $type));
|
166 |
+
|
167 |
+
switch($type)
|
168 |
+
{
|
169 |
+
case 'tinyint':
|
170 |
+
case 'smallint':
|
171 |
+
case 'mediumint':
|
172 |
+
case 'int':
|
173 |
+
case 'bigint':
|
174 |
+
case 'bit':
|
175 |
+
case 'boolean':
|
176 |
+
$placeholder = '%d';
|
177 |
+
break;
|
178 |
+
|
179 |
+
case 'decimal':
|
180 |
+
case 'float':
|
181 |
+
case 'double':
|
182 |
+
case 'real':
|
183 |
+
$placeholder = '%f';
|
184 |
+
break;
|
185 |
+
|
186 |
+
/*case 'geometry':
|
187 |
+
case 'point':
|
188 |
+
case 'linestring':
|
189 |
+
case 'polygon':
|
190 |
+
case 'multipoint':
|
191 |
+
case 'multilinestring':
|
192 |
+
case 'multipolygon':
|
193 |
+
case 'geometrycollection':
|
194 |
+
$placeholders[] = 'NULL';
|
195 |
+
|
196 |
+
// This can be implemented in a subclass
|
197 |
+
|
198 |
+
break;*/
|
199 |
+
|
200 |
+
default:
|
201 |
+
$placeholder = '%s';
|
202 |
+
break;
|
203 |
+
}
|
204 |
+
|
205 |
+
return $placeholder;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Gets the parameter to be passed to a prepared statement, from this object, by the name of the DB column given.
|
210 |
+
* @param string $name The database column name
|
211 |
+
* @return mixed The value of the specified field name from this object
|
212 |
+
*/
|
213 |
+
protected function get_column_parameter($name)
|
214 |
+
{
|
215 |
+
if(array_key_exists($name, $this->fields))
|
216 |
+
return $this->fields[$name];
|
217 |
+
|
218 |
+
return '';
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Gets all the placeholders for a prepared statement
|
223 |
+
* @return array An array of string placeholders
|
224 |
+
*/
|
225 |
+
protected function get_column_placeholders()
|
226 |
+
{
|
227 |
+
$columns = $this->get_columns();
|
228 |
+
$placeholders = array();
|
229 |
+
|
230 |
+
foreach($columns as $index => $column)
|
231 |
+
{
|
232 |
+
if($column->Field == 'id')
|
233 |
+
continue;
|
234 |
+
|
235 |
+
$placeholders[] = $this->get_placeholder_by_type($column->Type);
|
236 |
+
}
|
237 |
+
|
238 |
+
return $placeholders;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Gets all the values to be passed to a prepared statement from this object
|
243 |
+
* @return array An array of the values from this object
|
244 |
+
*/
|
245 |
+
protected function get_column_parameters()
|
246 |
+
{
|
247 |
+
$columns = $this->get_columns();
|
248 |
+
$params = array();
|
249 |
+
|
250 |
+
foreach($columns as $index => $column)
|
251 |
+
{
|
252 |
+
if($column->Field == 'id')
|
253 |
+
continue;
|
254 |
+
|
255 |
+
$params[] = $this->get_column_parameter($column->Field);
|
256 |
+
}
|
257 |
+
|
258 |
+
return $params;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Gets the column name used to store arbitrary data, for instance, other_data, or NULL for tables which do not have such a field.
|
263 |
+
* @return string The name of the column used to store arbitrary data
|
264 |
+
*/
|
265 |
+
protected function get_arbitrary_data_column_name()
|
266 |
+
{
|
267 |
+
return null;
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Asserts that this object hasn't been trashed and throws an exception if it has
|
272 |
+
* @throws \Exception
|
273 |
+
* @return void
|
274 |
+
*/
|
275 |
+
protected function assert_not_trashed()
|
276 |
+
{
|
277 |
+
if($this->trashed)
|
278 |
+
throw new \Exception('Operation on trashed map object');
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Returns true if the named column exists on this map objects table
|
283 |
+
* @return bool
|
284 |
+
*/
|
285 |
+
protected function column_exists($name)
|
286 |
+
{
|
287 |
+
return isset($cached_column_name_map_by_table_name[$this->table_name]);
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Parses arbitrary data following a DB read, for example by unserializing strings or decoding JSON.
|
292 |
+
* @return void
|
293 |
+
*/
|
294 |
+
protected function parse_arbitrary_data($data)
|
295 |
+
{
|
296 |
+
if(!$this->get_arbitrary_data_column_name())
|
297 |
+
throw new \Exception('No arbitrary data field on this table');
|
298 |
+
|
299 |
+
$data = maybe_unserialize($data);
|
300 |
+
|
301 |
+
if(!is_object($data) && !is_array($data))
|
302 |
+
return;
|
303 |
+
|
304 |
+
foreach($data as $key => $value)
|
305 |
+
$this->fields[$key] = $value;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Stores arbitrary data. This is not currently used.
|
310 |
+
* @return void
|
311 |
+
*/
|
312 |
+
protected function store_arbitrary_data($key, $value)
|
313 |
+
{
|
314 |
+
if(!$this->get_arbitrary_data_column_name())
|
315 |
+
throw new \Exception('No arbitrary data field on this table');
|
316 |
+
|
317 |
+
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Creates the map object in the database
|
322 |
+
* @throws \Exception The object has been trashed
|
323 |
+
* @return void
|
324 |
+
*/
|
325 |
+
protected function create()
|
326 |
+
{
|
327 |
+
global $wpdb;
|
328 |
+
|
329 |
+
$this->assert_not_trashed();
|
330 |
+
|
331 |
+
// TODO: Support arbitrary data
|
332 |
+
|
333 |
+
$column_names = array_flip( $this->get_column_names() );
|
334 |
+
unset($column_names['id']);
|
335 |
+
$column_names = implode(',', array_keys($column_names));
|
336 |
+
|
337 |
+
$placeholders = implode(',', $this->get_column_placeholders());
|
338 |
+
$parameters = $this->get_column_parameters();
|
339 |
+
|
340 |
+
$qstr = "INSERT INTO `{$this->table_name}` ($column_names) VALUES ($placeholders)";
|
341 |
+
$stmt = $wpdb->prepare($qstr, $parameters);
|
342 |
+
$wpdb->query($stmt);
|
343 |
+
|
344 |
+
$this->id = $wpdb->insert_id;
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Reads the data from the database into this object
|
349 |
+
* @throws \Exception The object has been trashed
|
350 |
+
* @return void
|
351 |
+
*/
|
352 |
+
protected function read($mode)
|
353 |
+
{
|
354 |
+
global $wpdb;
|
355 |
+
|
356 |
+
$this->assert_not_trashed();
|
357 |
+
|
358 |
+
$stmt = $wpdb->prepare("SELECT * FROM " . $this->get_table_name() . " WHERE id = %d", array($this->id));
|
359 |
+
$results = $wpdb->get_results($stmt);
|
360 |
+
|
361 |
+
if(empty($results))
|
362 |
+
throw new \Exception('Map object not found');
|
363 |
+
|
364 |
+
$this->fields = (array)$results[0];
|
365 |
+
unset($this->fields['id']);
|
366 |
+
|
367 |
+
$arbitrary_data_column_name = $this->get_arbitrary_data_column_name();
|
368 |
+
|
369 |
+
if($arbitrary_data_column_name && isset($this->fields[$arbitrary_data_column_name]))
|
370 |
+
{
|
371 |
+
$this->parse_arbitrary_data($this->fields[$arbitrary_data_column_name]);
|
372 |
+
unset($this->fields[$arbitrary_data_column_name]);
|
373 |
+
}
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Returns true if the specified property is read only
|
378 |
+
* @return bool Whether or not the property is read only
|
379 |
+
*/
|
380 |
+
protected function is_read_only($key)
|
381 |
+
{
|
382 |
+
switch($key)
|
383 |
+
{
|
384 |
+
case 'id':
|
385 |
+
case 'table_name':
|
386 |
+
case 'fields':
|
387 |
+
case 'modified':
|
388 |
+
case 'trashed':
|
389 |
+
return true;
|
390 |
+
break;
|
391 |
+
}
|
392 |
+
|
393 |
+
return false;
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Updates the map object in the database
|
398 |
+
* @throws \Exception The object has been trashed
|
399 |
+
* @return $this
|
400 |
+
*/
|
401 |
+
public function update()
|
402 |
+
{
|
403 |
+
global $wpdb;
|
404 |
+
|
405 |
+
$this->assert_not_trashed();
|
406 |
+
|
407 |
+
$column_names = array_flip( $this->get_column_names() );
|
408 |
+
unset($column_names['id']);
|
409 |
+
$column_names = array_keys($column_names);
|
410 |
+
|
411 |
+
$placeholders = $this->get_column_placeholders();
|
412 |
+
$parameters = $this->get_column_parameters();
|
413 |
+
|
414 |
+
$assignments = array();
|
415 |
+
for($i = 0; $i < count($column_names); $i++)
|
416 |
+
$assignments[] = $column_names[$i] . '=' . $placeholders[$i];
|
417 |
+
$assignments = implode(',', $assignments);
|
418 |
+
|
419 |
+
$parameters[] = $this->id;
|
420 |
+
|
421 |
+
$qstr = "UPDATE {$this->table_name} SET $assignments WHERE id=%d";
|
422 |
+
$stmt = $wpdb->prepare($qstr, $parameters);
|
423 |
+
$wpdb->query($stmt);
|
424 |
+
|
425 |
+
// Arbitrary data
|
426 |
+
$data = array();
|
427 |
+
|
428 |
+
foreach($this->fields as $key => $value)
|
429 |
+
{
|
430 |
+
if(array_search($key, $column_names) !== false)
|
431 |
+
continue;
|
432 |
+
|
433 |
+
$data[$key] = $value;
|
434 |
+
}
|
435 |
+
|
436 |
+
$arbitrary_data_column_name = $this->get_arbitrary_data_column_name();
|
437 |
+
|
438 |
+
if(!empty($data) && !$arbitrary_data_column_name)
|
439 |
+
trigger_error('Arbitrary data cannot be stored on this column - the following fields will be lost: ' . implode(', ', array_keys($data)), E_USER_WARNING);
|
440 |
+
else if($arbitrary_data_column_name)
|
441 |
+
{
|
442 |
+
$data = serialize($data);
|
443 |
+
|
444 |
+
$stmt = $wpdb->prepare("UPDATE {$this->table_name} SET $arbitrary_data_column_name=%s WHERE id=%d", array($data, $this->id));
|
445 |
+
|
446 |
+
$wpdb->query($stmt);
|
447 |
+
}
|
448 |
+
|
449 |
+
return $this;
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Deletes the object from the database and sets the trashed flag
|
454 |
+
* @throws \Exception The object has been trashed
|
455 |
+
* @return void
|
456 |
+
*/
|
457 |
+
public function trash()
|
458 |
+
{
|
459 |
+
global $wpdb;
|
460 |
+
|
461 |
+
$this->assert_not_trashed();
|
462 |
+
|
463 |
+
$stmt = $wpdb->prepare("DELETE FROM {$this->table_name} WHERE id=%d", array($this->id));
|
464 |
+
|
465 |
+
$wpdb->query($stmt);
|
466 |
+
|
467 |
+
$this->trashed = true;
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Set variables in bulk, this reduces the number of database calls
|
472 |
+
* @param string|array|object Either a string naming the property to be set (with a second argument which is the value), or an array or object of key and value pairs to be set on this object
|
473 |
+
* @throws \Exception The object has been trashed
|
474 |
+
* @return $this
|
475 |
+
*/
|
476 |
+
public function set($arg, $val=null)
|
477 |
+
{
|
478 |
+
$this->assert_not_trashed();
|
479 |
+
|
480 |
+
if(is_string($arg))
|
481 |
+
{
|
482 |
+
$this->__set($arg, $val);
|
483 |
+
}
|
484 |
+
else if(is_array($arg) || is_object($arg))
|
485 |
+
{
|
486 |
+
foreach($arg as $key => $value)
|
487 |
+
{
|
488 |
+
if($this->is_read_only($key))
|
489 |
+
throw new \Exception('Property is read only');
|
490 |
+
|
491 |
+
$this->fields[$key] = $value;
|
492 |
+
}
|
493 |
+
|
494 |
+
$this->update();
|
495 |
+
}
|
496 |
+
else
|
497 |
+
throw new \Exception('Invalid argument');
|
498 |
+
|
499 |
+
return $this;
|
500 |
+
}
|
501 |
+
|
502 |
+
/**
|
503 |
+
* Get's the iterator for iterating over map object properties
|
504 |
+
* @throws \Exception The object has been trashed
|
505 |
+
* @return \ArrayIterator
|
506 |
+
*/
|
507 |
+
public function getIterator()
|
508 |
+
{
|
509 |
+
$this->assert_not_trashed();
|
510 |
+
|
511 |
+
return new \ArrayIterator($this->fields);
|
512 |
+
}
|
513 |
+
|
514 |
+
/**
|
515 |
+
* Returns the objects properties to be serialized as JSON
|
516 |
+
* @throws \Exception
|
517 |
+
* @return array
|
518 |
+
*/
|
519 |
+
public function jsonSerialize()
|
520 |
+
{
|
521 |
+
$this->assert_not_trashed();
|
522 |
+
|
523 |
+
return array_merge($this->fields, array('id' => $this->id));
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Magic method to get map object fields
|
528 |
+
* @params string $name The name of the property to read
|
529 |
+
* @throws \Exception The object has been trashed
|
530 |
+
* @return mixed
|
531 |
+
*/
|
532 |
+
public function __get($name)
|
533 |
+
{
|
534 |
+
$this->assert_not_trashed();
|
535 |
+
|
536 |
+
if(isset($this->fields[$name]))
|
537 |
+
return $this->fields[$name];
|
538 |
+
|
539 |
+
switch($name)
|
540 |
+
{
|
541 |
+
case 'id':
|
542 |
+
case 'modified':
|
543 |
+
case 'custom_fields':
|
544 |
+
return $this->{$name};
|
545 |
+
break;
|
546 |
+
}
|
547 |
+
|
548 |
+
return null;
|
549 |
+
}
|
550 |
+
|
551 |
+
/**
|
552 |
+
* Checks if a field is set by name
|
553 |
+
* @params string $name The name of the property to check
|
554 |
+
* @throws \Exception The object has been trashed.
|
555 |
+
* @return boolean
|
556 |
+
*/
|
557 |
+
public function __isset($name)
|
558 |
+
{
|
559 |
+
$this->assert_not_trashed();
|
560 |
+
|
561 |
+
return isset($this->fields[$name]);
|
562 |
+
}
|
563 |
+
|
564 |
+
/**
|
565 |
+
* Sets the property value by name and updates the database
|
566 |
+
* @param string $name The property name
|
567 |
+
* @param mixed $value The value to set on the specified property
|
568 |
+
* @throws \Exception The object has been trashed
|
569 |
+
* @throws \Exception The specified property is read-only
|
570 |
+
* @return void
|
571 |
+
*/
|
572 |
+
public function __set($name, $value)
|
573 |
+
{
|
574 |
+
global $wpdb;
|
575 |
+
|
576 |
+
$this->assert_not_trashed();
|
577 |
+
|
578 |
+
if($this->is_read_only($name))
|
579 |
+
throw new \Exception('Property is read only');
|
580 |
+
|
581 |
+
$this->fields[$name] = $value;
|
582 |
+
|
583 |
+
$columns = $this->get_columns();
|
584 |
+
|
585 |
+
// TODO: This loop could be replaced with a placeholder cache
|
586 |
+
foreach($columns as $column)
|
587 |
+
{
|
588 |
+
if($column->Field != $name)
|
589 |
+
continue;
|
590 |
+
|
591 |
+
$placeholder = $this->get_placeholder_by_type($column->Type);
|
592 |
+
$params = array($value, $this->id);
|
593 |
+
|
594 |
+
$stmt = $wpdb->prepare("UPDATE {$this->table_name} SET $name = $placeholder WHERE id = %d", $params);
|
595 |
+
$wpdb->query($stmt);
|
596 |
+
|
597 |
+
return;
|
598 |
+
}
|
599 |
+
|
600 |
+
$arbitrary_data_column_name = $this->get_arbitrary_data_column_name();
|
601 |
+
|
602 |
+
if(!$arbitrary_data_column_name)
|
603 |
+
throw new \Exception('Cannot store arbitrary data on this table');
|
604 |
+
|
605 |
+
$stmt = $wpdb->prepare("SELECT $arbitrary_data_column_name FROM {$this->table_name} WHERE id=%d", array($this->id));
|
606 |
+
|
607 |
+
$raw = $wpdb->get_var($stmt);
|
608 |
+
$data = maybe_unserialize($raw);
|
609 |
+
|
610 |
+
if(empty($data))
|
611 |
+
$data = array();
|
612 |
+
|
613 |
+
$data[$name] = $value;
|
614 |
+
|
615 |
+
$data = serialize($data);
|
616 |
+
|
617 |
+
$stmt = $wpdb->prepare("UPDATE {$this->table_name} SET $arbitrary_data_column_name=%s WHERE id=%d", array($data, $this->id));
|
618 |
+
|
619 |
+
$wpdb->query($stmt);
|
620 |
+
}
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Unsets the named variable, only valid for arbitrary data
|
624 |
+
* @throws \Exception when attempting to unset a column, as opposed to arbitrary data.
|
625 |
+
* @return void
|
626 |
+
*/
|
627 |
+
public function __unset($name)
|
628 |
+
{
|
629 |
+
$column_names = $this->get_column_names();
|
630 |
+
|
631 |
+
if(array_search($name, $column_names) !== false)
|
632 |
+
throw \Exception('Only arbitrary data can be unset. Columns must be set to NULL instead');
|
633 |
+
|
634 |
+
unset($this->fields[$name]);
|
635 |
+
|
636 |
+
$this->update();
|
637 |
+
}
|
638 |
+
}
|
includes/class.marker.php
CHANGED
@@ -12,6 +12,7 @@ class Marker extends Crud implements \JsonSerializable
|
|
12 |
{
|
13 |
const DEFAULT_ICON = "//maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png";
|
14 |
|
|
|
15 |
protected $custom_fields;
|
16 |
|
17 |
/**
|
@@ -28,6 +29,19 @@ class Marker extends Crud implements \JsonSerializable
|
|
28 |
$this->custom_fields = apply_filters('wpgmza_get_marker_custom_fields', $this->id);
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
/**
|
32 |
* Deprecated. The Factory class will take over this functionality
|
33 |
* @deprecated
|
12 |
{
|
13 |
const DEFAULT_ICON = "//maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png";
|
14 |
|
15 |
+
private static $columns;
|
16 |
protected $custom_fields;
|
17 |
|
18 |
/**
|
29 |
$this->custom_fields = apply_filters('wpgmza_get_marker_custom_fields', $this->id);
|
30 |
}
|
31 |
|
32 |
+
public static function getColumns()
|
33 |
+
{
|
34 |
+
global $wpdb;
|
35 |
+
global $WPGMZA_TABLE_NAME_MARKERS;
|
36 |
+
|
37 |
+
if(Marker::$columns)
|
38 |
+
return Marker::$columns;
|
39 |
+
|
40 |
+
Marker::$columns = $wpdb->get_results('SHOW COLUMNS FROM ' . $WPGMZA_TABLE_NAME_MARKERS);
|
41 |
+
|
42 |
+
return Marker::$columns;
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Deprecated. The Factory class will take over this functionality
|
47 |
* @deprecated
|
includes/class.marker.php.bak
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGMZA;
|
4 |
+
|
5 |
+
// TODO: Remove, autoloaders are now used
|
6 |
+
require_once(plugin_dir_path(__FILE__) . '/class.crud.php');
|
7 |
+
|
8 |
+
/**
|
9 |
+
* This class represents a marker
|
10 |
+
*/
|
11 |
+
class Marker extends Crud implements \JsonSerializable
|
12 |
+
{
|
13 |
+
const DEFAULT_ICON = "//maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png";
|
14 |
+
|
15 |
+
protected $custom_fields;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Constructor
|
19 |
+
* @param int|array|object An integer ID to read a marker, or an array or object to read data from to create a new one. If this argument is not specified, a new marker will be created.
|
20 |
+
*/
|
21 |
+
public function __construct($id_or_fields=-1)
|
22 |
+
{
|
23 |
+
global $wpdb;
|
24 |
+
|
25 |
+
Crud::__construct("{$wpdb->prefix}wpgmza", $id_or_fields);
|
26 |
+
|
27 |
+
if(class_exists('WPGMZA\\CustomMarkerFields'))
|
28 |
+
$this->custom_fields = apply_filters('wpgmza_get_marker_custom_fields', $this->id);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Deprecated. The Factory class will take over this functionality
|
33 |
+
* @deprecated
|
34 |
+
*/
|
35 |
+
public static function create_instance($id_or_fields=-1)
|
36 |
+
{
|
37 |
+
return apply_filters('wpgmza_create_marker_instance', $id_or_fields);
|
38 |
+
}
|
39 |
+
|
40 |
+
public static function get_table_name_static()
|
41 |
+
{
|
42 |
+
global $wpdb;
|
43 |
+
return "{$wpdb->prefix}wpgmza";
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns a clone of this marker for JSON serialization. Unsets latlng binary spatial data which corrupts JSON, and sets custom field data.
|
48 |
+
* @return array A JSON representation of this marker, without spatial data and with custom field ata.
|
49 |
+
*/
|
50 |
+
public function jsonSerialize()
|
51 |
+
{
|
52 |
+
$json = Crud::jsonSerialize();
|
53 |
+
|
54 |
+
unset($json['latlng']);
|
55 |
+
|
56 |
+
$json['custom_field_data'] = $this->custom_fields;
|
57 |
+
|
58 |
+
return $json;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Overrides Crud::get_placeholder_by_type to correctly handle inserting and updating spatial data placeholders.
|
63 |
+
* @param string $type The column type
|
64 |
+
* @return string If ths column type is point, the correct text-to-spatial function and placeholder. Otherwise, falls back to the default.
|
65 |
+
*/
|
66 |
+
protected function get_placeholder_by_type($type)
|
67 |
+
{
|
68 |
+
global $wpgmza;
|
69 |
+
|
70 |
+
if($type == 'point')
|
71 |
+
return "{$wpgmza->spatialFunctionPrefix}GeomFromText(%s)";
|
72 |
+
|
73 |
+
return Crud::get_placeholder_by_type($type);
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Overrides Crud::get_column_parameter to correctly handle inserting and updating spatial data values.
|
78 |
+
* @param string $name The colum name
|
79 |
+
* @return string If ths column name is latlng, the POINT function with this markers latitude and longitude. Otherwise, falls back to the default.
|
80 |
+
*/
|
81 |
+
protected function get_column_parameter($name)
|
82 |
+
{
|
83 |
+
if($name == 'latlng')
|
84 |
+
return "POINT(" . floatval($this->lat) . " " . floatval($this->lng) . ")";
|
85 |
+
|
86 |
+
return Crud::get_column_parameter($name);
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Returns "other_data", which is the name of the column used to store arbitrary data on thet marker table.
|
91 |
+
* @return string Always other_data for the marker table.
|
92 |
+
*/
|
93 |
+
protected function get_arbitrary_data_column_name()
|
94 |
+
{
|
95 |
+
return 'other_data';
|
96 |
+
}
|
97 |
+
|
98 |
+
public function update()
|
99 |
+
{
|
100 |
+
Crud::update();
|
101 |
+
|
102 |
+
// TODO: Update markers-has-categories
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Called to update the latlng column for this marker in the database, when any changes are made to this objects properties lat, lng or latlng.
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
protected function update_latlng()
|
111 |
+
{
|
112 |
+
global $wpgmza;
|
113 |
+
global $wpdb;
|
114 |
+
|
115 |
+
$params = array(
|
116 |
+
$this->lat,
|
117 |
+
$this->lng,
|
118 |
+
$this->get_column_parameter('latlng'),
|
119 |
+
$this->id
|
120 |
+
);
|
121 |
+
|
122 |
+
$stmt = $wpdb->prepare("UPDATE " . $this->get_table_name() . " SET lat=%s, lng=%s, latlng={$wpgmza->spatialFunctionPrefix}GeomFromText(%s) WHERE id=%d", $params);
|
123 |
+
|
124 |
+
$wpdb->query($stmt);
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Sets the named property, calling update_latlng where needed.
|
129 |
+
*/
|
130 |
+
public function __set($name, $value)
|
131 |
+
{
|
132 |
+
Crud::__set($name, $value);
|
133 |
+
|
134 |
+
switch($name)
|
135 |
+
{
|
136 |
+
case 'lat':
|
137 |
+
case 'lng':
|
138 |
+
case 'latlng':
|
139 |
+
$this->update_latlng();
|
140 |
+
break;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
public function getPosition()
|
145 |
+
{
|
146 |
+
return new LatLng($this->lat, $this->lng);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
// DEPRECATED: This will be handed over to the factory class
|
151 |
+
// You can remove this filter and add your own delegate to subclass Marker
|
152 |
+
add_filter('wpgmza_create_marker_instance', 'WPGMZA\\create_marker_instance_delegate', 10, 1);
|
153 |
+
|
154 |
+
function create_marker_instance_delegate($id)
|
155 |
+
{
|
156 |
+
return new Marker($id);
|
157 |
+
}
|
includes/class.rest-api.php.bak
CHANGED
@@ -45,7 +45,7 @@ class RestAPI extends Factory
|
|
45 |
));
|
46 |
|
47 |
register_rest_route(RestAPI::NS, '/markers(\/\d+)?/', array(
|
48 |
-
'methods' => 'GET',
|
49 |
'callback' => array($this, 'markers')
|
50 |
));
|
51 |
|
@@ -175,7 +175,7 @@ class RestAPI extends Factory
|
|
175 |
|
176 |
if(isset($request['id']))
|
177 |
{
|
178 |
-
$marker =
|
179 |
$marker->trash();
|
180 |
}
|
181 |
|
45 |
));
|
46 |
|
47 |
register_rest_route(RestAPI::NS, '/markers(\/\d+)?/', array(
|
48 |
+
'methods' => array('GET'),
|
49 |
'callback' => array($this, 'markers')
|
50 |
));
|
51 |
|
175 |
|
176 |
if(isset($request['id']))
|
177 |
{
|
178 |
+
$marker = Marker::createInstance($request['id']);
|
179 |
$marker->trash();
|
180 |
}
|
181 |
|
includes/class.strings.php
CHANGED
@@ -34,7 +34,14 @@ class Strings
|
|
34 |
'miles_away' => __('miles away', 'wp-google-maps'),
|
35 |
|
36 |
'import_completed' => __( 'Import completed.', 'wp-google-maps' ),
|
37 |
-
'importing_please_wait' => __('Importing, this may take a moment...', 'wp-google-maps')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
));
|
39 |
}
|
40 |
|
34 |
'miles_away' => __('miles away', 'wp-google-maps'),
|
35 |
|
36 |
'import_completed' => __( 'Import completed.', 'wp-google-maps' ),
|
37 |
+
'importing_please_wait' => __('Importing, this may take a moment...', 'wp-google-maps'),
|
38 |
+
|
39 |
+
'no_address_specified' => __('No address specified', 'wp-google-maps'),
|
40 |
+
'add_marker' => __('Add Marker', 'wp-google-maps'),
|
41 |
+
'save_marker' => __('Save Marker', 'wp-google-maps'),
|
42 |
+
'please_wait' => __('Please Wait...', 'wp-google-maps'),
|
43 |
+
'zero_results' => __('Zero results found', 'wp-google-maps'),
|
44 |
+
'geocode_fail' => __('Geocode failed due to technical reasons', 'wp-google-maps')
|
45 |
));
|
46 |
}
|
47 |
|
includes/class.strings.php.bak
CHANGED
@@ -26,12 +26,15 @@ class Strings
|
|
26 |
'verify_project' => __('Verify Project', 'wp-google-maps'),
|
27 |
|
28 |
'failed_to_get_address' => __('Failed to get address', 'wp-google-maps'),
|
29 |
-
'failed_to_create_marker' => __('Failed to create marker %d - this marker
|
30 |
|
31 |
'my_location' => __('My Location', 'wp-google-maps'),
|
32 |
|
33 |
'kilometers_away' => __('km away', 'wp-google-maps'),
|
34 |
-
'miles_away' => __('miles away', 'wp-google-maps')
|
|
|
|
|
|
|
35 |
));
|
36 |
}
|
37 |
|
26 |
'verify_project' => __('Verify Project', 'wp-google-maps'),
|
27 |
|
28 |
'failed_to_get_address' => __('Failed to get address', 'wp-google-maps'),
|
29 |
+
'failed_to_create_marker' => __('Failed to create marker %d - this marker cannot be placed on the map.', 'wp-google-maps'),
|
30 |
|
31 |
'my_location' => __('My Location', 'wp-google-maps'),
|
32 |
|
33 |
'kilometers_away' => __('km away', 'wp-google-maps'),
|
34 |
+
'miles_away' => __('miles away', 'wp-google-maps'),
|
35 |
+
|
36 |
+
'import_completed' => __( 'Import completed.', 'wp-google-maps' ),
|
37 |
+
'importing_please_wait' => __('Importing, this may take a moment...', 'wp-google-maps')
|
38 |
));
|
39 |
}
|
40 |
|
includes/tables/class.admin-marker-datatable.php
CHANGED
@@ -46,7 +46,7 @@ class AdminMarkerDataTable extends MarkerDataTable
|
|
46 |
|
47 |
return 'REPLACE(\'
|
48 |
|
49 |
-
<a title="Edit this marker" class="wpgmza_edit_btn button" id="' . $id_placeholder . '">
|
50 |
<i class="fa fa-edit"> </i>
|
51 |
</a>
|
52 |
<a href="?page=wp-google-maps-menu&action=edit_marker&id=' . $id_placeholder . '" title="'
|
46 |
|
47 |
return 'REPLACE(\'
|
48 |
|
49 |
+
<a title="Edit this marker" class="wpgmza_edit_btn button" id="' . $id_placeholder . '" data-edit-marker-id="' . $id_placeholder . '">
|
50 |
<i class="fa fa-edit"> </i>
|
51 |
</a>
|
52 |
<a href="?page=wp-google-maps-menu&action=edit_marker&id=' . $id_placeholder . '" title="'
|
includes/tables/class.admin-marker-datatable.php.bak
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WPGMZA;
|
4 |
+
|
5 |
+
class AdminMarkerDataTable extends MarkerDataTable
|
6 |
+
{
|
7 |
+
const ID_PLACEHOLDER = '__5d5621cf7b6bb90bfb7bda85a0df7293';
|
8 |
+
|
9 |
+
public function __construct($ajax_parameters=null)
|
10 |
+
{
|
11 |
+
MarkerDataTable::__construct($ajax_parameters, array(
|
12 |
+
'order' => array(
|
13 |
+
1,
|
14 |
+
'desc'
|
15 |
+
)
|
16 |
+
));
|
17 |
+
|
18 |
+
$this->element->setAttribute('data-wpgmza-admin-marker-datatable', null);
|
19 |
+
|
20 |
+
$this->element->import('<div>
|
21 |
+
↳
|
22 |
+
<button class="wpgmza button select_all_markers" type="button">' . __('Select All', 'wp-google-maps') . '</button>
|
23 |
+
<button class="wpgmza button bulk_delete" type="button">' . __('Bulk Delete', 'wp-google-maps') . '</button>
|
24 |
+
</div>');
|
25 |
+
}
|
26 |
+
|
27 |
+
protected function getColumns()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
'mark' => __('Mark', 'wp-google-maps'),
|
31 |
+
'id' => __('ID', 'wp-google-maps'),
|
32 |
+
'icon' => __('Icon', 'wp-google-maps'),
|
33 |
+
'title' => __('Title', 'wp-google-maps'),
|
34 |
+
'category' => __('Category', 'wp-google-maps'),
|
35 |
+
'address' => __('Address', 'wp-google-maps'),
|
36 |
+
'description' => __('Description', 'wp-google-maps'),
|
37 |
+
'pic' => __('Image', 'wp-google-maps'),
|
38 |
+
'link' => __('Link', 'wp-google-maps'),
|
39 |
+
'action' => __('Action', 'wp-google-maps')
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
protected function getActionButtons()
|
44 |
+
{
|
45 |
+
$id_placeholder = AdminMarkerDataTable::ID_PLACEHOLDER;
|
46 |
+
|
47 |
+
return 'REPLACE(\'
|
48 |
+
|
49 |
+
<a title="Edit this marker" class="wpgmza_edit_btn button" id="' . $id_placeholder . '">
|
50 |
+
<i class="fa fa-edit"> </i>
|
51 |
+
</a>
|
52 |
+
<a href="?page=wp-google-maps-menu&action=edit_marker&id=' . $id_placeholder . '" title="'
|
53 |
+
. esc_attr( __('Edit this marker location', 'wp-google-maps') ) .
|
54 |
+
'" class="wpgmza_edit_btn button" id="' . $id_placeholder . '">
|
55 |
+
<i class="fa fa-map-marker"> </i>
|
56 |
+
</a>
|
57 |
+
<a href="javascript: ;" title="'
|
58 |
+
. esc_attr( __('Delete this marker', 'wp-google-maps') ) .
|
59 |
+
'" class="wpgmza_del_btn button" id="' . $id_placeholder . '">
|
60 |
+
<i class="fa fa-times"> </i>
|
61 |
+
</a>
|
62 |
+
|
63 |
+
\',
|
64 |
+
"' . $id_placeholder . '",
|
65 |
+
id
|
66 |
+
) AS `action`
|
67 |
+
';
|
68 |
+
}
|
69 |
+
|
70 |
+
protected function filterColumns(&$columns, $input_params)
|
71 |
+
{
|
72 |
+
MarkerDataTable::filterColumns($columns, $input_params);
|
73 |
+
|
74 |
+
foreach($columns as $key => $value)
|
75 |
+
{
|
76 |
+
$name = $this->getColumnNameByIndex($key);
|
77 |
+
|
78 |
+
switch($name)
|
79 |
+
{
|
80 |
+
case 'category':
|
81 |
+
case 'description':
|
82 |
+
case 'pic':
|
83 |
+
$columns[$key] = '"" AS ' . $name;
|
84 |
+
break;
|
85 |
+
|
86 |
+
case 'action':
|
87 |
+
$columns[$key] = $this->getActionButtons();
|
88 |
+
break;
|
89 |
+
|
90 |
+
case 'icon':
|
91 |
+
$columns[$key] = '\'<img src="' . Marker::DEFAULT_ICON . '"/>\' AS icon';
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
return $columns;
|
97 |
+
}
|
98 |
+
|
99 |
+
protected function getSearchClause($input_params, &$query_params, $exclude_columns=null)
|
100 |
+
{
|
101 |
+
return MarkerDataTable::getSearchClause($input_params, $query_params, array(
|
102 |
+
'mark',
|
103 |
+
'action'
|
104 |
+
));
|
105 |
+
}
|
106 |
+
}
|
js/v8/tables/admin-marker-datatable.js
CHANGED
@@ -67,7 +67,7 @@ jQuery(function($) {
|
|
67 |
$(document).ready(function(event) {
|
68 |
|
69 |
$("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
|
70 |
-
new WPGMZA.AdminMarkerDataTable(el);
|
71 |
});
|
72 |
|
73 |
});
|
67 |
$(document).ready(function(event) {
|
68 |
|
69 |
$("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
|
70 |
+
WPGMZA.adminMarkerDataTable = new WPGMZA.AdminMarkerDataTable(el);
|
71 |
});
|
72 |
|
73 |
});
|
js/v8/tables/admin-marker-datatable.js.bak
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @namespace WPGMZA
|
3 |
+
* @module AdminMarkerDataTable
|
4 |
+
* @requires WPGMZA.DataTable
|
5 |
+
*/
|
6 |
+
jQuery(function($) {
|
7 |
+
|
8 |
+
WPGMZA.AdminMarkerDataTable = function(element)
|
9 |
+
{
|
10 |
+
var self = this;
|
11 |
+
|
12 |
+
WPGMZA.DataTable.call(this, element);
|
13 |
+
|
14 |
+
$(element).find(".wpgmza.select_all_markers").on("click", function(event) {
|
15 |
+
self.onSelectAll(event);
|
16 |
+
});
|
17 |
+
|
18 |
+
$(element).find(".wpgmza.bulk_delete").on("click", function(event) {
|
19 |
+
self.onBulkDelete(event);
|
20 |
+
});
|
21 |
+
}
|
22 |
+
|
23 |
+
WPGMZA.AdminMarkerDataTable.prototype = Object.create(WPGMZA.DataTable.prototype);
|
24 |
+
WPGMZA.AdminMarkerDataTable.prototype.constructor = WPGMZA.AdminMarkerDataTable;
|
25 |
+
|
26 |
+
WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings = function()
|
27 |
+
{
|
28 |
+
var self = this;
|
29 |
+
var options = WPGMZA.DataTable.prototype.getDataTableSettings.call(this);
|
30 |
+
|
31 |
+
options.createdRow = function(row, data, index)
|
32 |
+
{
|
33 |
+
var ajax = self.dataTable.ajax.json();
|
34 |
+
var meta = ajax.meta[index];
|
35 |
+
row.wpgmzaMarkerData = meta;
|
36 |
+
}
|
37 |
+
|
38 |
+
return options;
|
39 |
+
}
|
40 |
+
|
41 |
+
WPGMZA.AdminMarkerDataTable.prototype.onSelectAll = function(event)
|
42 |
+
{
|
43 |
+
$(this.element).find("input[name='mark']").prop("checked", true);
|
44 |
+
}
|
45 |
+
|
46 |
+
WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete = function(event)
|
47 |
+
{
|
48 |
+
var self = this;
|
49 |
+
var ids = [];
|
50 |
+
|
51 |
+
$(this.element).find("input[name='mark']:checked").each(function(index, el) {
|
52 |
+
var row = $(el).closest("tr")[0];
|
53 |
+
ids.push(row.wpgmzaMarkerData.id);
|
54 |
+
});
|
55 |
+
|
56 |
+
WPGMZA.restAPI.call("/markers/", {
|
57 |
+
method: "DELETE",
|
58 |
+
data: {
|
59 |
+
ids: ids
|
60 |
+
},
|
61 |
+
complete: function() {
|
62 |
+
self.reload();
|
63 |
+
}
|
64 |
+
});
|
65 |
+
}
|
66 |
+
|
67 |
+
$(document).ready(function(event) {
|
68 |
+
|
69 |
+
$("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
|
70 |
+
new WPGMZA.AdminMarkerDataTable(el);
|
71 |
+
});
|
72 |
+
|
73 |
+
});
|
74 |
+
|
75 |
+
});
|
js/v8/wp-google-maps.combined.js
CHANGED
@@ -8944,7 +8944,7 @@ jQuery(function($) {
|
|
8944 |
$(document).ready(function(event) {
|
8945 |
|
8946 |
$("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
|
8947 |
-
new WPGMZA.AdminMarkerDataTable(el);
|
8948 |
});
|
8949 |
|
8950 |
});
|
8944 |
$(document).ready(function(event) {
|
8945 |
|
8946 |
$("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
|
8947 |
+
WPGMZA.adminMarkerDataTable = new WPGMZA.AdminMarkerDataTable(el);
|
8948 |
});
|
8949 |
|
8950 |
});
|
js/v8/wp-google-maps.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function($){var core={maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'<div class="wpgmza-preloader"><div class="wpgmza-loader">...</div></div>',getScrollAnimationOffset:function(){return WPGMZA.settings.scroll_animation_offset||0},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds||(milliseconds=WPGMZA.settings.scroll_animation_milliseconds?WPGMZA.settings.scroll_animation_milliseconds:500),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(colour,opacity){return hex=parseInt(colour.replace(/^#/,""),16),[(16711680&hex)>>16,(65280&hex)>>8,255&hex,parseFloat(opacity)]},hexToRgba:function(hex){var c;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)?(3==(c=hex.substring(1).split("")).length&&(c=[c[0],c[0],c[1],c[1],c[2],c[2]]),c="0x"+c.join(""),{r:c>>16&255,g:c>>8&255,b:255&c,a:1}):0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(str){if("string"!=typeof str)return null;str.match(/^\(.+\)$/)&&(str=str.replace(/^\(|\)$/,""));var m=str.match(WPGMZA.latLngRegexp);return m?new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])}):null},stringToLatLng:function(str){var result=WPGMZA.isLatLngString(str);if(!result)throw new Error("Not a valid latLng");return result},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){if(WPGMZA.imageDimensionsCache[src])callback(WPGMZA.imageDimensionsCache[src]);else{var img=document.createElement("img");img.onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src}},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback){var file_frame;if(file_frame)return file_frame.uploader.uploader.param("post_id",set_to_post_id),void file_frame.open();(file_frame=wp.media.frames.file_frame=wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){attachment=file_frame.state().get("selection").first().toJSON(),callback(attachment.id,attachment.url)}),file_frame.open()},getCurrentPosition:function(callback,watch){var nativeFunction="getCurrentPosition";if(watch&&("userlocationupdated",nativeFunction="watchPosition",WPGMZA.getCurrentPosition(callback,!1)),navigator.geolocation){var options={enableHighAccuracy:!0};navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(error){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(error){console.warn(error.code,error.message)},options)},options)}else console.warn("No geolocation available on this device")},watchPosition:function(callback){return WPGMZA.getCurrentPosition(callback,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){var friendlyError=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(friendlyError.element),$(friendlyErrorContainer).show()}},assertInstanceOf:function(instance,instanceName){var engine,fullInstanceName,pro=WPGMZA.isProVersion()?"Pro":"";switch(WPGMZA.settings.engine){case"open-layers":engine="OL";break;default:engine="Google"}if(fullInstanceName=WPGMZA[engine+pro+instanceName]?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]?engine+instanceName:instanceName,!(instance instanceof WPGMZA[fullInstanceName]))throw new Error("Object must be an instance of "+fullInstanceName+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){return WPGMZA.isProVersion()?MYMAP[id].map:MYMAP.map},isGoogleAutocompleteSupported:function(){return"object"==typeof google&&"object"==typeof google.maps&&"object"==typeof google.maps.places&&"function"==typeof google.maps.places.Autocomplete},googleAPIStatus:window.wpgmza_google_api_status,isSafari:function(){var ua=navigator.userAgent.toLowerCase();return-1!=ua.indexOf("safari")&&-1==ua.indexOf("chrome")},isTouchDevice:function(){return"ontouchstart"in window},isDeviceiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},getQueryParamValue:function(name){var m,regex=new RegExp(name+"=([^&]*)");return(m=window.location.href.match(regex))?m[1]:null}};window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core;for(var key in WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}jQuery(function($){$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var elements=$("script").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});elements.length>1&&console.warn("Multiple jQuery versions detected: ",elements),WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),$(document).on("click",".wpgmza_edit_btn",function(){WPGMZA.animateScroll("#wpgmaps_tabs_markers")})}),$(window).on("load",function(event){if("https:"!=window.location.protocol){var warning='<div class="notice notice-warning"><p>'+WPGMZA.localized_strings.unsecure_geolocation+"</p></div>";$(".wpgmza-geolocation-setting").each(function(index,el){$(el).after($(warning))})}})}),jQuery(function($){WPGMZA.Compatibility=function(){this.preventDocumentWriteGoogleMapsAPI()},WPGMZA.Compatibility.prototype.preventDocumentWriteGoogleMapsAPI=function(){var old=document.write;document.write=function(content){content.match&&content.match(/maps\.google/)||old.call(document,content)}},WPGMZA.compatiblityModule=new WPGMZA.Compatibility}),function(root,factory){"object"==typeof exports?module.exports=factory(root):"function"==typeof define&&define.amd?define([],factory.bind(root,root)):factory(root)}("undefined"!=typeof global?global:this,function(root){if(root.CSS&&root.CSS.escape)return root.CSS.escape;var cssEscape=function(value){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var codeUnit,string=String(value),length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);++index<length;)0!=(codeUnit=string.charCodeAt(index))?result+=codeUnit>=1&&codeUnit<=31||127==codeUnit||0==index&&codeUnit>=48&&codeUnit<=57||1==index&&codeUnit>=48&&codeUnit<=57&&45==firstCodeUnit?"\\"+codeUnit.toString(16)+" ":(0!=index||1!=length||45!=codeUnit)&&(codeUnit>=128||45==codeUnit||95==codeUnit||codeUnit>=48&&codeUnit<=57||codeUnit>=65&&codeUnit<=90||codeUnit>=97&&codeUnit<=122)?string.charAt(index):"\\"+string.charAt(index):result+="�";return result};return root.CSS||(root.CSS={}),root.CSS.escape=cssEscape,cssEscape}),jQuery(function($){function deg2rad(deg){return deg*(Math.PI/180)}Math.PI;WPGMZA.Distance={MILES:!0,KILOMETERS:!1,MILES_PER_KILOMETER:.621371,KILOMETERS_PER_MILE:1.60934,uiToMeters:function(uiDistance){return parseFloat(uiDistance)/(WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?WPGMZA.Distance.MILES_PER_KILOMETER:1)*1e3},uiToKilometers:function(uiDistance){return.001*WPGMZA.Distance.uiToMeters(uiDistance)},uiToMiles:function(uiDistance){return WPGMZA.Distance.uiToKilometers(uiDistance)*WPGMZA.Distance.MILES_PER_KILOMETER},kilometersToUI:function(km){return WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?km*WPGMZA.Distance.MILES_PER_KILOMETER:km},between:function(a,b){if(!(a instanceof WPGMZA.LatLng))throw new Error("First argument must be an instance of WPGMZA.LatLng");if(!(b instanceof WPGMZA.LatLng))throw new Error("Second argument must be an instance of WPGMZA.LatLng");if(a===b)return 0;var lat1=a.lat,lon1=a.lng,lat2=b.lat,lon2=b.lng,dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}}),jQuery(function($){WPGMZA.EventDispatcher=function(){WPGMZA.assertInstanceOf(this,"EventDispatcher"),this._listenersByType={}},WPGMZA.EventDispatcher.prototype.addEventListener=function(type,listener,thisObject,useCapture){var types=type.split(/\s+/);if(types.length>1)for(var i=0;i<types.length;i++)this.addEventListener(types[i],listener,thisObject,useCapture);else{if(!(listener instanceof Function))throw new Error("Listener must be a function");var target;target=this._listenersByType.hasOwnProperty(type)?this._listenersByType[type]:this._listenersByType[type]=[];var obj={listener:listener,thisObject:thisObject||this,useCapture:!!useCapture};target.push(obj)}},WPGMZA.EventDispatcher.prototype.on=WPGMZA.EventDispatcher.prototype.addEventListener,WPGMZA.EventDispatcher.prototype.removeEventListener=function(type,listener,thisObject,useCapture){var arr,obj;if(arr=this._listenersByType[type]){thisObject||(thisObject=this),useCapture=!!useCapture;for(var i=0;i<arr.length;i++)if((obj=arr[i]).listener==listener&&obj.thisObject==thisObject&&obj.useCapture==useCapture)return void arr.splice(i,1)}},WPGMZA.EventDispatcher.prototype.off=WPGMZA.EventDispatcher.prototype.removeEventListener,WPGMZA.EventDispatcher.prototype.hasEventListener=function(type){return!!_listenersByType[type]},WPGMZA.EventDispatcher.prototype.dispatchEvent=function(event){if(!(event instanceof WPGMZA.Event))if("string"==typeof event)event=new WPGMZA.Event(event);else{var src=event;event=new WPGMZA.Event;for(var name in src)event[name]=src[name]}event.target=this;for(var path=[],obj=this.parent;null!=obj;obj=obj.parent)path.unshift(obj);event.phase=WPGMZA.Event.CAPTURING_PHASE;for(var i=0;i<path.length&&!event._cancelled;i++)path[i]._triggerListeners(event);if(!event._cancelled){for(event.phase=WPGMZA.Event.AT_TARGET,this._triggerListeners(event),event.phase=WPGMZA.Event.BUBBLING_PHASE,i=path.length-1;i>=0&&!event._cancelled;i--)path[i]._triggerListeners(event);if(this.element){var customEvent={};for(var key in event){var value=event[key];"type"==key&&(value+=".wpgmza"),customEvent[key]=value}$(this.element).trigger(customEvent)}}},WPGMZA.EventDispatcher.prototype.trigger=WPGMZA.EventDispatcher.prototype.dispatchEvent,WPGMZA.EventDispatcher.prototype._triggerListeners=function(event){var arr,obj;if(arr=this._listenersByType[event.type])for(var i=0;i<arr.length;i++)obj=arr[i],(event.phase!=WPGMZA.Event.CAPTURING_PHASE||obj.useCapture)&&obj.listener.call(arr[i].thisObject,event)},WPGMZA.events=new WPGMZA.EventDispatcher}),jQuery(function($){WPGMZA.Event=function(options){if("string"==typeof options&&(this.type=options),this.bubbles=!0,this.cancelable=!0,this.phase=WPGMZA.Event.PHASE_CAPTURE,this.target=null,this._cancelled=!1,"object"==typeof options)for(var name in options)this[name]=options[name]},WPGMZA.Event.CAPTURING_PHASE=0,WPGMZA.Event.AT_TARGET=1,WPGMZA.Event.BUBBLING_PHASE=2,WPGMZA.Event.prototype.stopPropagation=function(){this._cancelled=!0}}),jQuery(function($){WPGMZA.FriendlyError=function(){}}),jQuery(function($){WPGMZA.Geocoder=function(){WPGMZA.assertInstanceOf(this,"Geocoder")},WPGMZA.Geocoder.SUCCESS="success",WPGMZA.Geocoder.ZERO_RESULTS="zero-results",WPGMZA.Geocoder.FAIL="fail",WPGMZA.Geocoder.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLGeocoder;default:return WPGMZA.GoogleGeocoder}},WPGMZA.Geocoder.createInstance=function(){return new(WPGMZA.Geocoder.getConstructor())},WPGMZA.Geocoder.prototype.getLatLngFromAddress=function(options,callback){if(WPGMZA.isLatLngString(options.address)){var parts=options.address.split(/,\s*/);callback([new WPGMZA.LatLng({lat:parseFloat(parts[0]),lng:parseFloat(parts[1])})],WPGMZA.Geocoder.SUCCESS)}},WPGMZA.Geocoder.prototype.getAddressFromLatLng=function(options,callback){callback([new WPGMZA.LatLng(options.latLng).toString()],WPGMZA.Geocoder.SUCCESS)},WPGMZA.Geocoder.prototype.geocode=function(options,callback){if("address"in options)return this.getLatLngFromAddress(options,callback);if("latLng"in options)return this.getAddressFromLatLng(options,callback);throw new Error("You must supply either a latLng or address")}}),jQuery(function($){WPGMZA.GoogleAPIErrorHandler=function(){var self=this;if("google-maps"==WPGMZA.settings.engine&&("map-edit"==WPGMZA.currentPage||0==WPGMZA.is_admin&&1==WPGMZA.userCanAdministrator)){this.element=$(WPGMZA.html.googleMapsAPIErrorDialog),1==WPGMZA.is_admin&&this.element.find(".wpgmza-front-end-only").remove(),this.errorMessageList=this.element.find(".wpgmza-google-api-error-list"),this.templateListItem=this.element.find("li.template").remove(),this.messagesAlreadyDisplayed={};var _error=console.error;console.error=function(message){self.onErrorMessage(message),_error.apply(this,arguments)},"google-maps"!=WPGMZA.settings.engine||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||this.addErrorMessage(WPGMZA.localized_strings.no_google_maps_api_key,["https://www.wpgmaps.com/get-a-google-maps-api-key/"])}},WPGMZA.GoogleAPIErrorHandler.prototype.onErrorMessage=function(message){var m;if(message)if((m=message.match(/You have exceeded your (daily )?request quota for this API/))||(m=message.match(/This API project is not authorized to use this API/))||(m=message.match(/^Geocoding Service: .+/))){var urls=message.match(/http(s)?:\/\/[^\s]+/gm);this.addErrorMessage(m[0],urls)}else(m=message.match(/^Google Maps.+error: (.+)\s+(http(s?):\/\/.+)/m))&&this.addErrorMessage(m[1].replace(/([A-Z])/g," $1"),[m[2]])},WPGMZA.GoogleAPIErrorHandler.prototype.addErrorMessage=function(message,urls){var self=this;if(!this.messagesAlreadyDisplayed[message]){var li=this.templateListItem.clone();$(li).find(".wpgmza-message").html(message);var buttonContainer=$(li).find(".wpgmza-documentation-buttons"),buttonTemplate=$(li).find(".wpgmza-documentation-buttons>a");if(buttonTemplate.remove(),urls&&urls.length){for(var i=0;i<urls.length;i++){urls[i];var button=buttonTemplate.clone(),text=WPGMZA.localized_strings.documentation;button.attr("href",urls[i]),$(button).find("i").addClass("fa-external-link"),$(button).append(text)}buttonContainer.append(button)}$(this.errorMessageList).append(li),$("#wpgmza_map, .wpgmza_map").each(function(index,el){var container=$(el).find(".wpgmza-google-maps-api-error-overlay");0==container.length&&(container=$("<div class='wpgmza-google-maps-api-error-overlay'></div>")).html(self.element.html()),setTimeout(function(){$(el).append(container)},100)}),$(".gm-err-container").parent().css({"z-index":1}),this.messagesAlreadyDisplayed[message]=!0}},WPGMZA.googleAPIErrorHandler=new WPGMZA.GoogleAPIErrorHandler}),jQuery(function($){WPGMZA.InfoWindow=function(mapObject){var self=this;WPGMZA.EventDispatcher.call(this),WPGMZA.assertInstanceOf(this,"InfoWindow"),mapObject&&(this.mapObject=mapObject,mapObject.map?setTimeout(function(){self.onMapObjectAdded(event)},100):mapObject.addEventListener("added",function(event){self.onMapObjectAdded(event)}))},WPGMZA.InfoWindow.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.InfoWindow.prototype.constructor=WPGMZA.InfoWindow,WPGMZA.InfoWindow.OPEN_BY_CLICK=1,WPGMZA.InfoWindow.OPEN_BY_HOVER=2,WPGMZA.InfoWindow.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow}},WPGMZA.InfoWindow.createInstance=function(mapObject){return new(this.getConstructor())(mapObject)},WPGMZA.InfoWindow.prototype.getContent=function(callback){var html="";this.mapObject instanceof WPGMZA.Marker&&(html=this.mapObject.address),callback(html)},WPGMZA.InfoWindow.prototype.open=function(map,mapObject){return this.mapObject=mapObject,!WPGMZA.settings.disable_infowindows&&!this.mapObject.disableInfoWindow},WPGMZA.InfoWindow.prototype.close=function(){this.trigger("infowindowclose")},WPGMZA.InfoWindow.prototype.setContent=function(options){},WPGMZA.InfoWindow.prototype.setOptions=function(options){},WPGMZA.InfoWindow.prototype.onMapObjectAdded=function(){1==this.mapObject.settings.infoopen&&this.open()}}),jQuery(function($){WPGMZA.LatLng=function(arg,lng){if(this._lat=0,this._lng=0,0!=arguments.length)if(1==arguments.length){if("string"==typeof arg){var m;if(!(m=arg.match(WPGMZA.LatLng.REGEXP)))throw new Error("Invalid LatLng string");arg={lat:m[1],lng:m[3]}}if("object"!=typeof arg||!("lat"in arg&&"lng"in arg))throw new Error("Argument must be a LatLng literal");this.lat=arg.lat,this.lng=arg.lng}else this.lat=arg,this.lng=lng},WPGMZA.LatLng.REGEXP=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,WPGMZA.LatLng.isValid=function(obj){return"object"==typeof obj&&("lat"in obj&&"lng"in obj)},Object.defineProperty(WPGMZA.LatLng.prototype,"lat",{get:function(){return this._lat},set:function(val){if(!$.isNumeric(val))throw new Error("Latitude must be numeric");this._lat=parseFloat(val)}}),Object.defineProperty(WPGMZA.LatLng.prototype,"lng",{get:function(){return this._lng},set:function(val){if(!$.isNumeric(val))throw new Error("Longitude must be numeric");this._lng=parseFloat(val)}}),WPGMZA.LatLng.prototype.toString=function(){return this._lat+", "+this._lng},WPGMZA.LatLng.fromCurrentPosition=function(callback,options){options||(options={}),callback&&WPGMZA.getCurrentPosition(function(position){var latLng=new WPGMZA.LatLng({lat:position.coords.latitude,lng:position.coords.longitude});options.geocodeAddress?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:latLng},function(results){results.length&&(latLng.address=results[0]),callback(latLng)}):callback(latLng)})},WPGMZA.LatLng.fromGoogleLatLng=function(googleLatLng){return new WPGMZA.LatLng(googleLatLng.lat(),googleLatLng.lng())},WPGMZA.LatLng.prototype.toGoogleLatLng=function(){return new google.maps.LatLng({lat:this.lat,lng:this.lng})},WPGMZA.LatLng.prototype.toLatLngLiteral=function(){return{lat:this.lat,lng:this.lng}},WPGMZA.LatLng.prototype.moveByDistance=function(kilometers,heading){var delta=parseFloat(kilometers)/6371,theta=parseFloat(heading)/180*Math.PI,phi1=this.lat/180*Math.PI,lambda1=this.lng/180*Math.PI,sinPhi1=Math.sin(phi1),cosPhi1=Math.cos(phi1),sinDelta=Math.sin(delta),cosDelta=Math.cos(delta),sinTheta=Math.sin(theta),sinPhi2=sinPhi1*cosDelta+cosPhi1*sinDelta*Math.cos(theta),phi2=Math.asin(sinPhi2),y=sinTheta*sinDelta*cosPhi1,x=cosDelta-sinPhi1*sinPhi2,lambda2=lambda1+Math.atan2(y,x);this.lat=180*phi2/Math.PI,this.lng=180*lambda2/Math.PI},WPGMZA.LatLng.prototype.getGreatCircleDistance=function(arg1,arg2){var other,lat1=this.lat,lon1=this.lng;if(1==arguments.length)other=new WPGMZA.LatLng(arg1);else{if(2!=arguments.length)throw new Error("Invalid number of arguments");other=new WPGMZA.LatLng(arg1,arg2)}var lat2=other.lat,lon2=other.lng,phi1=lat1.toRadians(),phi2=lat2.toRadians(),deltaPhi=(lat2-lat1).toRadians(),deltaLambda=(lon2-lon1).toRadians(),a=Math.sin(deltaPhi/2)*Math.sin(deltaPhi/2)+Math.cos(phi1)*Math.cos(phi2)*Math.sin(deltaLambda/2)*Math.sin(deltaLambda/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}),jQuery(function($){WPGMZA.LatLngBounds=function(southWest,northEast){southWest&&northEast&&(this.south=southWest.lat,this.north=northEast.lat,this.west=southWest.lng,this.east=southWest.lng)},WPGMZA.LatLngBounds.prototype.isInInitialState=function(){return void 0==this.north&&void 0==this.south&&void 0==this.west&&void 0==this.east},WPGMZA.LatLngBounds.prototype.extend=function(latLng){if(latLng instanceof WPGMZA.LatLng||(latLng=new WPGMZA.LatLng(latLng)),this.isInInitialState())return this.north=this.south=latLng.lat,void(this.west=this.east=latLng.lng);latLng.lat<this.north&&(this.north=latLng.lat),latLng.lat>this.south&&(this.south=latLng.lat),latLng.lng<this.west&&(this.west=latLng.lng),latLng.lng>this.east&&(this.east=latLng.lng)},WPGMZA.LatLngBounds.prototype.extendByPixelMargin=function(map,x,arg){var y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");if(this.isInInitialState())throw new Error("Cannot extend by pixels in initial state");arguments.length>=3&&(y=arg);var southWest=new WPGMZA.LatLng(this.south,this.west),northEast=new WPGMZA.LatLng(this.north,this.east);southWest=map.latLngToPixels(southWest),northEast=map.latLngToPixels(northEast),southWest.x-=x,southWest.y+=y,northEast.x+=x,northEast.y-=y,southWest=map.pixelsToLatLng(southWest.x,southWest.y),northEast=map.pixelsToLatLng(northEast.x,northEast.y);this.toString();this.north=northEast.lat,this.south=southWest.lat,this.west=southWest.lng,this.east=northEast.lng},WPGMZA.LatLngBounds.prototype.contains=function(latLng){if(!(latLng instanceof WPGMZA.LatLng))throw new Error("Argument must be an instance of WPGMZA.LatLng");return!(latLng.lat<Math.min(this.north,this.south))&&(!(latLng.lat>Math.max(this.north,this.south))&&(this.west<this.east?latLng.lng>=this.west&&latLng.lng<=this.east:this.west<this.east?latLng.lng>=this.west||this.lng<=this.east:latLng.lng<=this.west||this.lng>=this.east))},WPGMZA.LatLngBounds.prototype.toString=function(){return this.north+"N "+this.south+"S "+this.west+"W "+this.east+"E"}}),jQuery(function($){WPGMZA.MapObject=function(row){if(WPGMZA.assertInstanceOf(this,"MapObject"),WPGMZA.EventDispatcher.call(this),this.id=-1,this.guid=WPGMZA.guid(),this.modified=!0,this.settings={},row)for(var name in row)if("settings"==name){if(null==row.settings)this.settings={};else switch(typeof row.settings){case"string":this.settings=JSON.parse(row[name]);break;case"object":this.settings=row[name];break;default:throw new Error("Don't know how to interpret settings")}for(var name in this.settings){var value=this.settings[name];String(value).match(/^-?\d+$/)&&(this.settings[name]=parseInt(value))}}else this[name]=row[name]},WPGMZA.MapObject.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MapObject.prototype.constructor=WPGMZA.MapObject,WPGMZA.MapObject.prototype.parseGeometry=function(string){var pairs,coords,results=[];pairs=string.replace(/[^ ,\d\.\-+e]/g,"").split(",");for(var i=0;i<pairs.length;i++)coords=pairs[i].split(" "),results.push({lat:parseFloat(coords[1]),lng:parseFloat(coords[0])});return results},WPGMZA.MapObject.prototype.toJSON=function(){return{id:this.id,guid:this.guid,settings:this.settings}}}),jQuery(function($){var Parent=WPGMZA.MapObject;WPGMZA.Circle=function(options,engineCircle){WPGMZA.assertInstanceOf(this,"Circle"),this.center=new WPGMZA.LatLng,this.radius=100,Parent.apply(this,arguments)},WPGMZA.Circle.prototype=Object.create(Parent.prototype),WPGMZA.Circle.prototype.constructor=WPGMZA.Circle,WPGMZA.Circle.createInstance=function(options){var constructor;switch(WPGMZA.settings.engine){case"open-layers":constructor=WPGMZA.OLCircle;break;default:constructor=WPGMZA.GoogleCircle}return new constructor(options)},WPGMZA.Circle.prototype.getCenter=function(){return this.center.clone()},WPGMZA.Circle.prototype.setCenter=function(latLng){this.center.lat=latLng.lat,this.center.lng=latLng.lng},WPGMZA.Circle.prototype.getRadius=function(){return this.radius},WPGMZA.Circle.prototype.setRadius=function(radius){this.radius=radius},WPGMZA.Circle.prototype.getMap=function(){return this.map},WPGMZA.Circle.prototype.setMap=function(map){this.map&&this.map.removeCircle(this),map&&map.addCircle(this)}}),jQuery(function($){WPGMZA.MapSettingsPage=function(){var self=this;this.updateEngineSpecificControls(),this.updateGDPRControls(),$("select[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$("input[name='wpgmza_gdpr_require_consent_before_load'], input[name='wpgmza_gdpr_require_consent_before_vgm_submit'], input[name='wpgmza_gdpr_override_notice']").on("change",function(event){self.updateGDPRControls()})},WPGMZA.MapSettingsPage.prototype.updateEngineSpecificControls=function(){var engine=$("select[name='wpgmza_maps_engine']").val();$("[data-required-maps-engine][data-required-maps-engine!='"+engine+"']").hide(),$("[data-required-maps-engine='"+engine+"']").show()},WPGMZA.MapSettingsPage.prototype.updateGDPRControls=function(){var showNoticeControls=$("input[name='wpgmza_gdpr_require_consent_before_load']").prop("checked"),vgmCheckbox=$("input[name='wpgmza_gdpr_require_consent_before_vgm_submit']");vgmCheckbox.length&&(showNoticeControls=showNoticeControls||vgmCheckbox.prop("checked"));var showOverrideTextarea=showNoticeControls&&$("input[name='wpgmza_gdpr_override_notice']").prop("checked");showNoticeControls?$("#wpgmza-gdpr-compliance-notice").show("slow"):$("#wpgmza-gdpr-compliance-notice").hide("slow"),showOverrideTextarea?$("#wpgmza_gdpr_override_notice_text").show("slow"):$("#wpgmza_gdpr_override_notice_text").hide("slow")},jQuery(function($){window.location.href.match(/wp-google-maps-menu-settings/)&&(WPGMZA.mapSettingsPage=new WPGMZA.MapSettingsPage)})}),jQuery(function($){WPGMZA.MapSettings=function(element){function addSettings(input){if(input)for(var key in input)if("other_settings"!=key){var value=input[key];String(value).match(/^-?\d+$/)&&(value=parseInt(value)),self[key]=value}}var json,self=this,str=element.getAttribute("data-settings");try{json=JSON.parse(str)}catch(e){str=str.replace(/\\%/g,"%"),str=str.replace(/\\\\"/g,'\\"');try{json=JSON.parse(str)}catch(e){json={},console.warn("Failed to parse map settings JSON")}}WPGMZA.assertInstanceOf(this,"MapSettings"),addSettings(WPGMZA.settings),addSettings(json),json&&json.other_settings&&addSettings(json.other_settings)},WPGMZA.MapSettings.prototype.toOLViewOptions=function(){var options={center:ol.proj.fromLonLat([-119.4179,36.7783]),zoom:4};if("string"==typeof this.start_location){var coords=this.start_location.replace(/^\(|\)$/g,"").split(",");WPGMZA.isLatLngString(this.start_location)?options.center=ol.proj.fromLonLat([parseFloat(coords[1]),parseFloat(coords[0])]):console.warn("Invalid start location")}return this.center&&(options.center=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)])),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options},WPGMZA.MapSettings.prototype.toGoogleMapsOptions=function(){function formatCoord(coord){return $.isNumeric(coord)?coord:parseFloat(String(coord).replace(/[\(\)\s]/,""))}var self=this,latLngCoords=this.start_location&&this.start_location.length?this.start_location.split(","):[36.7783,-119.4179],latLng=new google.maps.LatLng(formatCoord(latLngCoords[0]),formatCoord(latLngCoords[1])),zoom=this.start_zoom?parseInt(this.start_zoom):4;!this.start_zoom&&this.zoom&&(zoom=parseInt(this.zoom));var options={zoom:zoom,center:latLng};switch(function(name){return!("object"==typeof self[name]||self[name]&&self[name].length)}("center")||(options.center=new google.maps.LatLng({lat:parseFloat(this.center.lat),lng:parseFloat(this.center.lng)})),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options.zoomControl=!("yes"==this.wpgmza_settings_map_zoom),options.panControl=!("yes"==this.wpgmza_settings_map_pan),options.mapTypeControl=!("yes"==this.wpgmza_settings_map_type),options.streetViewControl=!("yes"==this.wpgmza_settings_map_streetview),options.fullscreenControl=!("yes"==this.wpgmza_settings_map_full_screen_control),options.draggable=!("yes"==this.wpgmza_settings_map_draggable),options.disableDoubleClickZoom="yes"==this.wpgmza_settings_map_clickzoom,options.scrollwheel=!("yes"==this.wpgmza_settings_map_scroll),"greedy"==this.wpgmza_force_greedy_gestures||"yes"==this.wpgmza_force_greedy_gestures?options.gestureHandling="greedy":options.gestureHandling="cooperative",parseInt(this.type)){case 2:options.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case 3:options.mapTypeId=google.maps.MapTypeId.HYBRID;break;case 4:options.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:options.mapTypeId=google.maps.MapTypeId.ROADMAP}if(this.theme_data&&this.theme_data.length>0)try{options.styles=JSON.parse(this.theme_data)}catch(e){alert("Your theme data is not valid JSON and has been ignored")}return options}}),jQuery(function($){function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Map=function(element,options){if(WPGMZA.assertInstanceOf(this,"Map"),WPGMZA.EventDispatcher.call(this),!(element instanceof HTMLElement))throw new Error("Argument must be a HTMLElement");if(this.id=element.getAttribute("data-map-id"),!/\d+/.test(this.id))throw new Error("Map ID must be an integer");if(WPGMZA.maps.push(this),this.element=element,this.element.wpgmzaMap=this,this.engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.loadSettings(options),this.shortcodeAttributes={},$(this.element).attr("data-shortcode-attributes"))try{this.shortcodeAttributes=JSON.parse($(this.element).attr("data-shortcode-attributes"))}catch(e){console.warn("Error parsing shortcode attributes")}this.initStoreLocator(),this.markerFilter=WPGMZA.MarkerFilter.createInstance(this)},WPGMZA.Map.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.Map.prototype.constructor=WPGMZA.Map,WPGMZA.Map.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap}},WPGMZA.Map.createInstance=function(element,options){return new(WPGMZA.Map.getConstructor())(element,options)},WPGMZA.Map.prototype.loadSettings=function(options){var settings=new WPGMZA.MapSettings(this.element);settings.other_settings;if(delete settings.other_settings,options)for(var key in options)settings[key]=options[key];this.settings=settings},WPGMZA.Map.prototype.initStoreLocator=function(){var storeLocatorElement=$(".wpgmza_sl_main_div");storeLocatorElement.length&&(this.storeLocator=WPGMZA.StoreLocator.createInstance(this,storeLocatorElement[0]))},WPGMZA.Map.prototype.setOptions=function(options){for(var name in options)this.settings[name]=options[name]};Math.PI;WPGMZA.Map.getGeographicDistance=function(lat1,lon1,lat2,lon2){var dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},WPGMZA.Map.prototype.setCenter=function(latLng){if(!("lat"in latLng&&"lng"in latLng))throw new Error("Argument is not an object with lat and lng")},WPGMZA.Map.prototype.setDimensions=function(width,height){$(this.element).css({width:width}),$(this.engineElement).css({width:"100%",height:height})},WPGMZA.Map.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map=this,marker.parent=this,this.markers.push(marker),this.dispatchEvent({type:"markeradded",marker:marker}),marker.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");if(marker.map!==this)throw new Error("Wrong map error");marker.map=null,marker.parent=null,this.markers.splice(this.markers.indexOf(marker),1),this.dispatchEvent({type:"markerremoved",marker:marker}),marker.dispatchEvent({type:"removed"})},WPGMZA.Map.prototype.getMarkerByID=function(id){for(var i=0;i<this.markers.length;i++)if(this.markers[i].id==id)return this.markers[i];return null},WPGMZA.Map.prototype.removeMarkerByID=function(id){var marker=this.getMarkerByID(id);marker&&this.removeMarker(marker)},WPGMZA.Map.prototype.addPolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");polygon.map=this,this.polygons.push(polygon),this.dispatchEvent({type:"polygonadded",polygon:polygon})},WPGMZA.Map.prototype.deletePolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");if(polygon.map!==this)throw new Error("Wrong map error");polygon.map=null,this.polygons.splice(this.polygons.indexOf(polygon),1),this.dispatchEvent({type:"polygonremoved",polygon:polygon})},WPGMZA.Map.prototype.getPolygonByID=function(id){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i].id==id)return this.polygons[i];return null},WPGMZA.Map.prototype.deletePolygonByID=function(id){var polygon=this.getPolygonByID(id);polygon&&this.deletePolygon(polygon)},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.addPolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");polyline.map=this,this.polylines.push(polyline),this.dispatchEvent({type:"polylineadded",polyline:polyline})},WPGMZA.Map.prototype.deletePolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");if(polyline.map!==this)throw new Error("Wrong map error");polyline.map=null,this.polylines.splice(this.polylines.indexOf(polyline),1),this.dispatchEvent({type:"polylineremoved",polyline:polyline})},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.deletePolylineByID=function(id){var polyline=this.getPolylineByID(id);polyline&&this.deletePolyline(polyline)},WPGMZA.Map.prototype.addCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");circle.map=this,this.circles.push(circle),this.dispatchEvent({type:"circleadded",circle:circle})},WPGMZA.Map.prototype.removeCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");if(circle.map!==this)throw new Error("Wrong map error");circle.map=null,this.circles.splice(this.circles.indexOf(circle),1),this.dispatchEvent({type:"circleremoved",circle:circle})},WPGMZA.Map.prototype.getCircleByID=function(id){for(var i=0;i<this.circles.length;i++)if(this.circles[i].id==id)return this.circles[i];return null},WPGMZA.Map.prototype.deleteCircleByID=function(id){var circle=this.getCircleByID(id);circle&&this.deleteCircle(circle)},WPGMZA.Map.prototype.nudge=function(x,y){var pixels=this.latLngToPixels(this.getCenter());if(pixels.x+=parseFloat(x),pixels.y+=parseFloat(y),isNaN(pixels.x)||isNaN(pixels.y))throw new Error("Invalid coordinates supplied");var latLng=this.pixelsToLatLng(pixels);this.setCenter(latLng)},WPGMZA.Map.prototype.onWindowResize=function(event){},WPGMZA.Map.prototype.onElementResized=function(event){},WPGMZA.Map.prototype.onBoundsChanged=function(event){this.trigger("boundschanged"),this.trigger("bounds_changed")},WPGMZA.Map.prototype.onIdle=function(event){this.trigger("idle")}}),jQuery(function($){WPGMZA.MapsEngineDialog=function(element){var self=this;this.element=element,window.wpgmzaUnbindSaveReminder&&window.wpgmzaUnbindSaveReminder(),$(element).show(),$(element).remodal().open(),$(element).find("input:radio").on("change",function(event){$("#wpgmza-confirm-engine").prop("disabled",!1)}),$("#wpgmza-confirm-engine").on("click",function(event){self.onButtonClicked(event)})},WPGMZA.MapsEngineDialog.prototype.onButtonClicked=function(event){$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_engine_dialog_set_engine",engine:$("[name='wpgmza_maps_engine']:checked").val()},success:function(response,status,xhr){window.location.reload()}})},$(window).on("load",function(event){var element=$("#wpgmza-maps-engine-dialog");element.length&&(WPGMZA.settings.wpgmza_maps_engine_dialog_done||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||(WPGMZA.mapsEngineDialog=new WPGMZA.MapsEngineDialog(element)))})}),jQuery(function($){WPGMZA.MarkerFilter=function(map){WPGMZA.EventDispatcher.call(this),this.map=map},WPGMZA.MarkerFilter.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerFilter.prototype.constructor=WPGMZA.MarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.MarkerFilter(map)},WPGMZA.MarkerFilter.prototype.getFilteringParameters=function(){var params={map_id:this.map.id};return this.map.storeLocator&&(params=$.extend(params,this.map.storeLocator.getFilteringParameters())),params},WPGMZA.MarkerFilter.prototype.update=function(){},WPGMZA.MarkerFilter.prototype.onFilteringComplete=function(results){}}),jQuery(function($){WPGMZA.Marker=function(row){var self=this;this._offset={x:0,y:0},WPGMZA.assertInstanceOf(this,"Marker"),this.lat="36.778261",this.lng="-119.4179323999",this.address="California",this.title=null,this.description="",this.link="",this.icon="",this.approved=1,this.pic=null,this.disableInfoWindow=!1,WPGMZA.MapObject.apply(this,arguments),row&&row.heatmap||(row&&this.on("init",function(event){row.position&&this.setPosition(row.position),row.map&&row.map.addMarker(this)}),this.addEventListener("added",function(event){self.onAdded(event)}))},WPGMZA.Marker.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Marker.prototype.constructor=WPGMZA.Marker,WPGMZA.Marker.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker}},WPGMZA.Marker.createInstance=function(row){return new(WPGMZA.Marker.getConstructor())(row)},WPGMZA.Marker.ANIMATION_NONE="0",WPGMZA.Marker.ANIMATION_BOUNCE="1",WPGMZA.Marker.ANIMATION_DROP="2",Object.defineProperty(WPGMZA.Marker.prototype,"offsetX",{get:function(){return this._offset.x},set:function(value){this._offset.x=value,this.updateOffset()}}),Object.defineProperty(WPGMZA.Marker.prototype,"offsetY",{get:function(){return this._offset.y},set:function(value){this._offset.y=value,this.updateOffset()}}),WPGMZA.Marker.prototype.onAdded=function(event){var self=this;this.addEventListener("click",function(event){self.onClick(event)}),this.addEventListener("mouseover",function(event){self.onMouseOver(event)}),this.addEventListener("select",function(event){self.onSelect(event)}),this.map.settings.marker==this.id&&self.trigger("select"),"1"==this.infoopen&&this.openInfoWindow()},WPGMZA.Marker.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.Marker.prototype.openInfoWindow=function(){this.map?(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),this.map.lastInteractedMarker=this,this.initInfoWindow(),this.infoWindow.open(this.map,this)):console.warn("Cannot open infowindow for marker with no map")},WPGMZA.Marker.prototype.onClick=function(event){},WPGMZA.Marker.prototype.onSelect=function(event){this.openInfoWindow()},WPGMZA.Marker.prototype.onMouseOver=function(event){this.map.settings.info_window_open_by==WPGMZA.InfoWindow.OPEN_BY_HOVER&&this.openInfoWindow()},WPGMZA.Marker.prototype.getIcon=function(){function stripProtocol(url){return"string"!=typeof url?url:url.replace(/^http(s?):/,"")}return stripProtocol(WPGMZA.defaultMarkerIcon?WPGMZA.defaultMarkerIcon:WPGMZA.settings.default_marker_icon)},WPGMZA.Marker.prototype.getPosition=function(){return new WPGMZA.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})},WPGMZA.Marker.prototype.setPosition=function(latLng){latLng instanceof WPGMZA.LatLng?(this.lat=latLng.lat,this.lng=latLng.lng):(this.lat=parseFloat(latLng.lat),this.lng=parseFloat(latLng.lng))},WPGMZA.Marker.prototype.setOffset=function(x,y){this._offset.x=x,this._offset.y=y,this.updateOffset()},WPGMZA.Marker.prototype.updateOffset=function(){},WPGMZA.Marker.prototype.getAnimation=function(animation){return this.settings.animation},WPGMZA.Marker.prototype.setAnimation=function(animation){this.settings.animation=animation},WPGMZA.Marker.prototype.getVisible=function(){},WPGMZA.Marker.prototype.setVisible=function(visible){!visible&&this.infoWindow&&this.infoWindow.close()},WPGMZA.Marker.prototype.getMap=function(){return this.map},WPGMZA.Marker.prototype.setMap=function(map){map?map.addMarker(this):this.map&&this.map.removeMarker(this),this.map=map},WPGMZA.Marker.prototype.getDraggable=function(){},WPGMZA.Marker.prototype.setDraggable=function(draggable){},WPGMZA.Marker.prototype.setOptions=function(options){},WPGMZA.Marker.prototype.setOpacity=function(opacity){},WPGMZA.Marker.prototype.panIntoView=function(){if(!this.map)throw new Error("Marker hasn't been added to a map");this.map.setCenter(this.getPosition())},WPGMZA.Marker.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this),position=this.getPosition();return $.extend(result,{lat:position.lat,lng:position.lng,address:this.address,title:this.title,description:this.description,link:this.link,icon:this.icon,pic:this.pic,approved:this.approved}),result}}),jQuery(function($){WPGMZA.ModernStoreLocatorCircle=function(map_id,settings){var map;map=WPGMZA.isProVersion()?this.map=MYMAP[map_id].map:this.map=MYMAP.map,this.map_id=map_id,this.mapElement=map.element,this.mapSize={width:$(this.mapElement).width(),height:$(this.mapElement).height()},this.initCanvasLayer(),this.settings={center:new WPGMZA.LatLng(0,0),radius:1,color:"#63AFF2",shadowColor:"white",shadowBlur:4,centerRingRadius:10,centerRingLineWidth:3,numInnerRings:9,innerRingLineWidth:1,innerRingFade:!0,numOuterRings:7,ringLineWidth:1,mainRingLineWidth:2,numSpokes:6,spokesStartAngle:Math.PI/2,numRadiusLabels:6,radiusLabelsStartAngle:Math.PI/2,radiusLabelFont:"13px sans-serif",visible:!1},settings&&this.setOptions(settings)},WPGMZA.ModernStoreLocatorCircle.createInstance=function(map,settings){return"google-maps"==WPGMZA.settings.engine?new WPGMZA.GoogleModernStoreLocatorCircle(map,settings):new WPGMZA.OLModernStoreLocatorCircle(map,settings)},WPGMZA.ModernStoreLocatorCircle.prototype.initCanvasLayer=function(){},WPGMZA.ModernStoreLocatorCircle.prototype.onResize=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.onUpdate=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.setOptions=function(options){for(var name in options){var functionName="set"+name.substr(0,1).toUpperCase()+name.substr(1);"function"==typeof this[functionName]?this[functionName](options[name]):this.settings[name]=options[name]}},WPGMZA.ModernStoreLocatorCircle.prototype.getResolutionScale=function(){return window.devicePixelRatio||1},WPGMZA.ModernStoreLocatorCircle.prototype.getCenter=function(){return this.getPosition()},WPGMZA.ModernStoreLocatorCircle.prototype.setCenter=function(value){this.setPosition(value)},WPGMZA.ModernStoreLocatorCircle.prototype.getPosition=function(){return this.settings.center},WPGMZA.ModernStoreLocatorCircle.prototype.setPosition=function(position){this.settings.center=position},WPGMZA.ModernStoreLocatorCircle.prototype.getRadius=function(){return this.settings.radius},WPGMZA.ModernStoreLocatorCircle.prototype.setRadius=function(radius){if(isNaN(radius))throw new Error("Invalid radius");this.settings.radius=radius},WPGMZA.ModernStoreLocatorCircle.prototype.getVisible=function(){return this.settings.visible},WPGMZA.ModernStoreLocatorCircle.prototype.setVisible=function(visible){this.settings.visible=visible},WPGMZA.ModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getContext=function(type){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.validateSettings=function(){WPGMZA.isHexColorString(this.settings.color)||(this.settings.color="#63AFF2")},WPGMZA.ModernStoreLocatorCircle.prototype.draw=function(){this.validateSettings();var settings=this.settings,canvasDimensions=this.getCanvasDimensions(),canvasWidth=canvasDimensions.width,canvasHeight=canvasDimensions.height;this.map,this.getResolutionScale();if(context=this.getContext("2d"),context.clearRect(0,0,canvasWidth,canvasHeight),settings.visible){context.shadowColor=settings.shadowColor,context.shadowBlur=settings.shadowBlur,context.setTransform(1,0,0,1,0,0);var scale=this.getScale();context.scale(scale,scale);var offset=this.getWorldOriginOffset();context.translate(offset.x,offset.y);new WPGMZA.LatLng(this.settings.center);var worldPoint=this.getCenterPixels(),rgba=WPGMZA.hexToRgba(settings.color),ringSpacing=this.getTransformedRadius(settings.radius)/(settings.numInnerRings+1);context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.centerRingRadius)/scale,0,2*Math.PI),context.stroke(),context.closePath();var end,spokeAngle,radius=this.getTransformedRadius(settings.radius)+ringSpacing*settings.numOuterRings+1,grad=context.createRadialGradient(0,0,0,0,0,radius),rgba=WPGMZA.hexToRgba(settings.color),start=WPGMZA.rgbaToString(rgba);rgba.a=0,end=WPGMZA.rgbaToString(rgba),grad.addColorStop(0,start),grad.addColorStop(1,end),context.save(),context.translate(worldPoint.x,worldPoint.y),context.strokeStyle=grad,context.lineWidth=2/scale;for(i=0;i<settings.numSpokes;i++)spokeAngle=settings.spokesStartAngle+2*Math.PI*(i/settings.numSpokes),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.setLineDash([2/scale,15/scale]),context.beginPath(),context.moveTo(0,0),context.lineTo(x,y),context.stroke();context.setLineDash([]),context.restore(),context.lineWidth=1/scale*settings.innerRingLineWidth;for(i=1;i<=settings.numInnerRings;i++){radius=i*ringSpacing;settings.innerRingFade&&(rgba.a=1-(i-1)/settings.numInnerRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath()}context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.radius),0,2*Math.PI),context.stroke(),context.closePath();for(var radius=radius+ringSpacing,i=0;i<settings.numOuterRings;i++)settings.innerRingFade&&(rgba.a=1-i/settings.numOuterRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath(),radius+=ringSpacing;if(settings.numRadiusLabels>0){var m,x,y,radius=this.getTransformedRadius(settings.radius);(m=settings.radiusLabelFont.match(/(\d+)px/))&&parseInt(m[1])/2*1.1/scale,context.font=settings.radiusLabelFont,context.textAlign="center",context.textBaseline="middle",context.fillStyle=settings.color,context.save(),context.translate(worldPoint.x,worldPoint.y);for(i=0;i<settings.numRadiusLabels;i++){var width,textAngle=(spokeAngle=settings.radiusLabelsStartAngle+2*Math.PI*(i/settings.numRadiusLabels))+Math.PI/2,text=settings.radiusString;Math.sin(spokeAngle)>0&&(textAngle-=Math.PI),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.save(),context.translate(x,y),context.rotate(textAngle),context.scale(1/scale,1/scale),width=context.measureText(text).width,height=width/2,context.clearRect(-width,-height,2*width,2*height),context.fillText(settings.radiusString,0,0),context.restore()}context.restore()}}}}),jQuery(function($){WPGMZA.ModernStoreLocator=function(map_id){var original,self=this,map=WPGMZA.getMapByID(map_id);if(WPGMZA.assertInstanceOf(this,"ModernStoreLocator"),(original=WPGMZA.isProVersion()?$(".wpgmza_sl_search_button[mid='"+map_id+"']").closest(".wpgmza_sl_main_div"):$(".wpgmza_sl_search_button").closest(".wpgmza_sl_main_div")).length){this.element=$("<div class='wpgmza-modern-store-locator'><div class='wpgmza-inner wpgmza-modern-hover-opaque'/></div>")[0];var inner=$(this.element).find(".wpgmza-inner"),titleSearch=$(original).find("[id='nameInput_"+map_id+"']");if(titleSearch.length){var placeholder=wpgmaps_localize[map_id].other_settings.store_locator_name_string;placeholder&&placeholder.length&&titleSearch.attr("placeholder",placeholder),inner.append(titleSearch)}var addressInput;addressInput=WPGMZA.isProVersion()?$(original).find(".addressInput"):$(original).find("#addressInput"),wpgmaps_localize[map_id].other_settings.store_locator_query_string&&wpgmaps_localize[map_id].other_settings.store_locator_query_string.length&&addressInput.attr("placeholder",wpgmaps_localize[map_id].other_settings.store_locator_query_string),inner.append(addressInput);var button;(button=$(original).find("button.wpgmza-use-my-location"))&&inner.append(button),$(addressInput).on("keydown",function(event){13==event.keyCode&&self.searchButton.is(":visible")&&self.searchButton.trigger("click")}),$(addressInput).on("input",function(event){self.searchButton.show(),self.resetButton.hide()}),inner.append($(original).find("select.wpgmza_sl_radius_select")),this.searchButton=$(original).find(".wpgmza_sl_search_button"),inner.append(this.searchButton),this.resetButton=$(original).find(".wpgmza_sl_reset_button_div"),inner.append(this.resetButton),this.resetButton.on("click",function(event){resetLocations(map_id)}),this.resetButton.hide(),WPGMZA.isProVersion()&&(this.searchButton.on("click",function(event){0!=$("addressInput_"+map_id).val()&&(self.searchButton.hide(),self.resetButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_APPLIED)}),this.resetButton.on("click",function(event){self.resetButton.hide(),self.searchButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_INITIAL})),inner.append($("#wpgmza_distance_type_"+map_id));var container=$(original).find(".wpgmza_cat_checkbox_holder"),numCategories=($(container).children("ul"),0),icons=[];$(container).find("li").each(function(index,el){var id=$(el).attr("class").match(/\d+/);for(var category_id in wpgmza_category_data)if(id==category_id){var src=wpgmza_category_data[category_id].image,icon=$('<div class="wpgmza-chip-icon"/>');icon.css({"background-image":"url('"+src+"')",width:$("#wpgmza_cat_checkbox_"+category_id+" + label").height()+"px"}),icons.push(icon),null!=src&&""!=src&&$("#wpgmza_cat_checkbox_"+category_id+" + label").prepend(icon),numCategories++;break}}),$(this.element).append(container),numCategories&&(this.optionsButton=$('<span class="wpgmza_store_locator_options_button"><i class="fa fa-list"></i></span>'),$(this.searchButton).before(this.optionsButton)),setInterval(function(){icons.forEach(function(icon){var height=$(icon).height();$(icon).css({width:height+"px"}),$(icon).closest("label").css({"padding-left":height+8+"px"})}),$(container).css("width",$(self.element).find(".wpgmza-inner").outerWidth()+"px")},1e3),$(this.element).find(".wpgmza_store_locator_options_button").on("click",function(event){container.hasClass("wpgmza-open")?container.removeClass("wpgmza-open"):container.addClass("wpgmza-open")}),$(original).remove(),$(this.element).find("input, select").on("focus",function(){$(inner).addClass("active")}),$(this.element).find("input, select").on("blur",function(){$(inner).removeClass("active")})}},WPGMZA.ModernStoreLocator.createInstance=function(map_id){return"google-maps"==WPGMZA.settings.engine?new WPGMZA.GoogleModernStoreLocator(map_id):new WPGMZA.OLModernStoreLocator(map_id)}}),jQuery(function($){WPGMZA.NativeMapsAppIcon=function(){navigator.userAgent.match(/^Apple|iPhone|iPad|iPod/)?(this.type="apple",this.element=$('<span><i class="fab fa-apple" aria-hidden="true"></i></span>')):(this.type="google",this.element=$('<span><i class="fab fa-google" aria-hidden="true"></i></span>'))}}),jQuery(function($){WPGMZA.Polygon=function(row,enginePolygon){WPGMZA.assertInstanceOf(this,"Polygon"),this.paths=null,this.title=null,this.name=null,this.link=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polygon.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polygon.prototype.constructor=WPGMZA.Polygon,WPGMZA.Polygon.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon}},WPGMZA.Polygon.createInstance=function(row,engineObject){return new(WPGMZA.Polygon.getConstructor())(row,engineObject)},WPGMZA.Polygon.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return $.extend(result,{name:this.name,title:this.title,link:this.link}),result}}),jQuery(function($){WPGMZA.Polyline=function(row,googlePolyline){WPGMZA.assertInstanceOf(this,"Polyline"),this.title=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polyline.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polyline.prototype.constructor=WPGMZA.Polyline,WPGMZA.Polyline.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLPolyline;default:return WPGMZA.GooglePolyline}},WPGMZA.Polyline.createInstance=function(row,engineObject){return new(WPGMZA.Polyline.getConstructor())(row,engineObject)},WPGMZA.Polyline.prototype.getPoints=function(){return this.toJSON().points},WPGMZA.Polyline.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return result.title=this.title,result}}),jQuery(function($){WPGMZA.PopoutPanel=function(){},WPGMZA.PopoutPanel.prototype.open=function(){$(this.element).addClass("wpgmza-open")},WPGMZA.PopoutPanel.prototype.close=function(){$(this.element).removeClass("wpgmza-open")}}),jQuery(function($){WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl},WPGMZA.RestAPI.createInstance=function(){return new WPGMZA.RestAPI},WPGMZA.RestAPI.prototype.call=function(route,params){if("string"!=typeof route||!route.match(/^\//))throw new Error("Invalid route");return WPGMZA.RestAPI.URL.match(/\/$/)&&(route=route.replace(/^\//,"")),params||(params={}),params.beforeSend=function(xhr){xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce)},params.error||(params.error=function(xhr,status,message){throw new Error(message)}),$.ajax(WPGMZA.RestAPI.URL+route,params)}}),jQuery(function($){WPGMZA.StoreLocator=function(map,element){var self=this;WPGMZA.EventDispatcher.call(this),this._center=null,this.map=map,this.element=element,this.state=WPGMZA.StoreLocator.STATE_INITIAL,this.map.on("storelocatorgeocodecomplete",function(event){self.onGeocodeComplete(event)}),$(document.body).on("click",".wpgmza_sl_search_button_"+map.id,function(event){self.onSearch(event)}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map.id,function(event){self.onReset(event)})},WPGMZA.StoreLocator.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.StoreLocator.prototype.constructor=WPGMZA.StoreLocator,WPGMZA.StoreLocator.STATE_INITIAL="initial",WPGMZA.StoreLocator.STATE_APPLIED="applied",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.StoreLocator(map,element)},Object.defineProperty(WPGMZA.StoreLocator.prototype,"radius",{get:function(){return $("#radiusSelect_"+this.map.id).val()}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"center",{get:function(){return this._center}}),WPGMZA.StoreLocator.prototype.onGeocodeComplete=function(event){event.results&&event.results.length?this._center=new WPGMZA.LatLng(event.results[0].latLng):this._center=null,this.map.markerFilter.update()},WPGMZA.StoreLocator.prototype.onSearch=function(event){this.state=WPGMZA.StoreLocator.STATE_APPLIED},WPGMZA.StoreLocator.prototype.onReset=function(event){this.state=WPGMZA.StoreLocator.STATE_INITIAL,this._center=null,this.map.markerFilter.update()},WPGMZA.StoreLocator.prototype.getFilteringParameters=function(){return this.center?{center:this.center,radius:this.radius}:{}}}),jQuery(function($){WPGMZA.Text=function(options){if(options)for(var name in options)this[name]=options[name]},WPGMZA.Text.createInstance=function(options){return WPGMZA.settings.engine,new WPGMZA.Text(options)}}),jQuery(function($){function isPositiveInteger(x){return/^\d+$/.test(x)}function validateParts(parts){for(var i=0;i<parts.length;++i)if(!isPositiveInteger(parts[i]))return!1;return!0}WPGMZA.Version=function(){},WPGMZA.Version.GREATER_THAN=1,WPGMZA.Version.EQUAL_TO=0,WPGMZA.Version.LESS_THAN=-1,WPGMZA.Version.compare=function(v1,v2){var v1parts=v1.split("."),v2parts=v2.split(".");if(!validateParts(v1parts)||!validateParts(v2parts))return NaN;for(var i=0;i<v1parts.length;++i){if(v2parts.length===i)return 1;if(v1parts[i]!==v2parts[i])return v1parts[i]>v2parts[i]?1:-1}return v1parts.length!=v2parts.length?-1:0}}),jQuery(function($){WPGMZA.Integration={},WPGMZA.integrationModules={}}),jQuery(function($){if(window.wp&&wp.i18n&&wp.blocks&&wp.editor&&wp.components){var __=wp.i18n.__,registerBlockType=wp.blocks.registerBlockType,_wp$editor=wp.editor,InspectorControls=_wp$editor.InspectorControls,_wp$components=(_wp$editor.BlockControls,wp.components),Dashicon=_wp$components.Dashicon,PanelBody=(_wp$components.Toolbar,_wp$components.Button,_wp$components.Tooltip,_wp$components.PanelBody);_wp$components.TextareaControl,_wp$components.CheckboxControl,_wp$components.TextControl,_wp$components.SelectControl,_wp$components.RichText;WPGMZA.Integration.Gutenberg=function(){registerBlockType("gutenberg-wpgmza/block",this.getBlockDefinition())},WPGMZA.Integration.Gutenberg.prototype.getBlockTitle=function(){return __("WP Google Maps")},WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls=function(props){return React.createElement(InspectorControls,{key:"inspector"},React.createElement(PanelBody,{title:__("Map Settings")},React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:WPGMZA.adminurl+"admin.php?page=wp-google-maps-menu&action=edit&map_id=1",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-pencil-square-o","aria-hidden":"true"}),__("Go to Map Editor"))),React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:"https://www.wpgmaps.com/documentation/creating-your-first-map/",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-book","aria-hidden":"true"}),__("View Documentation")))))},WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes=function(){return{}},WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition=function(props){var _this=this;return{title:__("WP Google Maps"),description:__("The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss."),category:"common",icon:"location-alt",keywords:[__("Map"),__("Maps"),__("Google")],attributes:this.getBlockAttributes(),edit:function(props){return[!!props.isSelected&&_this.getBlockInspectorControls(props),React.createElement("div",{className:props.className+" wpgmza-gutenberg-block"},React.createElement(Dashicon,{icon:"location-alt"}),React.createElement("span",{class:"wpgmza-gutenberg-block-title"},__("Your map will appear here on your websites front end")))]},save:function(props){return null}}},WPGMZA.Integration.Gutenberg.getConstructor=function(){return WPGMZA.Integration.Gutenberg},WPGMZA.Integration.Gutenberg.createInstance=function(){return new(WPGMZA.Integration.Gutenberg.getConstructor())},WPGMZA.isProVersion()||/^6/.test(WPGMZA.pro_version)||(WPGMZA.integrationModules.gutenberg=WPGMZA.Integration.Gutenberg.createInstance())}}),jQuery(function($){WPGMZA.GoogleUICompatibility=function(){if(!(navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"))){var style=$("<style id='wpgmza-google-ui-compatiblity-fix'/>");style.html(".wpgmza_map img:not(button img) { padding:0 !important; }"),$(document.head).append(style)}},WPGMZA.googleUICompatibility=new WPGMZA.GoogleUICompatibility}),jQuery(function($){WPGMZA.GoogleCircle=function(options,googleCircle){var self=this;if(WPGMZA.Circle.call(this,options,googleCircle),googleCircle?this.googleCircle=googleCircle:(this.googleCircle=new google.maps.Circle,this.googleCircle.wpgmzaCircle=this),google.maps.event.addListener(this.googleCircle,"click",function(){self.dispatchEvent({type:"click"})}),options){var googleOptions={};delete(googleOptions=$.extend({},options)).map,delete googleOptions.center,options.center&&(googleOptions.center=new google.maps.LatLng({lat:options.center.lat,lng:options.center.lng})),this.googleCircle.setOptions(googleOptions),options.map&&options.map.addCircle(this)}},WPGMZA.GoogleCircle.prototype=Object.create(WPGMZA.Circle.prototype),WPGMZA.GoogleCircle.prototype.constructor=WPGMZA.GoogleCircle,WPGMZA.GoogleCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.googleCircle.setCenter(center)},WPGMZA.GoogleCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.googleCircle.setRadius(1e3*parseFloat(radius))},WPGMZA.GoogleCircle.prototype.setVisible=function(visible){this.googleCircle.setVisible(!!visible)}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress=function(options,callback){if(!options||!options.address)throw new Error("No address specified");if(WPGMZA.isLatLngString(options.address))return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this,options,callback);options.country&&(options.componentRestrictions={country:options.country}),(new google.maps.Geocoder).geocode(options,function(results,status){if(status==google.maps.GeocoderStatus.OK){var location=results[0].geometry.location,latLng={lat:location.lat(),lng:location.lng()};callback(results=[{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng}],WPGMZA.Geocoder.SUCCESS)}else{var nativeStatus=WPGMZA.Geocoder.FAIL;status==google.maps.GeocoderStatus.ZERO_RESULTS&&(nativeStatus=WPGMZA.Geocoder.ZERO_RESULTS),callback(null,nativeStatus)}})},WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng=function(options,callback){if(!options||!options.latLng)throw new Error("No latLng specified");var latLng=new WPGMZA.LatLng(options.latLng),geocoder=new google.maps.Geocoder;delete(options=$.extend(options,{location:{lat:latLng.lat,lng:latLng.lng}})).latLng,geocoder.geocode(options,function(results,status){"OK"!==status&&callback(null,WPGMZA.Geocoder.FAIL),results&&results.length||callback([],WPGMZA.Geocoder.NO_RESULTS),callback([results[0].formatted_address],WPGMZA.Geocoder.SUCCESS)})}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&window.google&&window.google.maps&&(WPGMZA.GoogleHTMLOverlay=function(map){this.element=$("<div class='wpgmza-google-html-overlay'></div>"),this.visible=!0,this.position=new WPGMZA.LatLng,this.setMap(map.googleMap),this.wpgmzaMap=map},WPGMZA.GoogleHTMLOverlay.prototype=new google.maps.OverlayView,WPGMZA.GoogleHTMLOverlay.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.element[0])},WPGMZA.GoogleHTMLOverlay.prototype.onRemove=function(){this.element&&$(this.element).parent().length&&($(this.element).remove(),this.element=null)},WPGMZA.GoogleHTMLOverlay.prototype.draw=function(){this.updateElementPosition()},WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition=function(){var projection=this.getProjection();if(projection){var pixels=projection.fromLatLngToDivPixel(this.position.toGoogleLatLng());$(this.element).css({left:pixels.x,top:pixels.y})}})}),jQuery(function($){var Parent;WPGMZA.GoogleInfoWindow=function(mapObject){Parent.call(this,mapObject),this.setMapObject(mapObject)},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.GoogleInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.GoogleInfoWindow.prototype.constructor=WPGMZA.GoogleInfoWindow,WPGMZA.GoogleInfoWindow.prototype.setMapObject=function(mapObject){mapObject instanceof WPGMZA.Marker?this.googleObject=mapObject.googleMarker:mapObject instanceof WPGMZA.Polygon?this.googleObject=mapObject.googlePolygon:mapObject instanceof WPGMZA.Polyline&&(this.googleObject=mapObject.googlePolyline)},WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow=function(){var self=this;this.googleInfoWindow||(this.googleInfoWindow=new google.maps.InfoWindow,google.maps.event.addListener(this.googleInfoWindow,"closeclick",function(event){self.mapObject.map.trigger("infowindowclose")}))},WPGMZA.GoogleInfoWindow.prototype.open=function(map,mapObject){var self=this;if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.createGoogleInfoWindow(),this.setMapObject(mapObject),this.googleInfoWindow.open(this.mapObject.map.googleMap,this.googleObject);var guid=WPGMZA.guid(),html="<div id='"+guid+"'>"+this.content+"</div>";this.googleInfoWindow.setContent(html);var intervalID;return intervalID=setInterval(function(event){div=$("#"+guid),div.length&&(div[0].wpgmzaMapObject=self.mapObject,self.element=div[0],self.trigger("infowindowopen"),clearInterval(intervalID))},50),!0},WPGMZA.GoogleInfoWindow.prototype.close=function(){this.googleInfoWindow&&(WPGMZA.InfoWindow.prototype.close.call(this),this.googleInfoWindow.close())},WPGMZA.GoogleInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html,this.createGoogleInfoWindow(),this.googleInfoWindow.setContent(html)},WPGMZA.GoogleInfoWindow.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.createGoogleInfoWindow(),this.googleInfoWindow.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMap=function(element,options){var self=this;if(Parent.call(this,element,options),!window.google){var status=WPGMZA.googleAPIStatus,message="Google API not loaded";if(status&&status.message&&(message+=" - "+status.message),"USER_CONSENT_NOT_GIVEN"==status.code)return;throw $(element).html("<div class='notice notice-error'><p>"+WPGMZA.localized_strings.google_api_not_loaded+"<pre>"+message+"</pre></p></div>"),new Error(message)}this.loadGoogleMap(),options&&this.setOptions(options),google.maps.event.addListener(this.googleMap,"click",function(event){var wpgmzaEvent=new WPGMZA.Event("click");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"rightclick",function(event){var wpgmzaEvent=new WPGMZA.Event("rightclick");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"dragend",function(event){self.dispatchEvent("dragend")}),google.maps.event.addListener(this.googleMap,"zoom_changed",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged")}),google.maps.event.addListener(this.googleMap,"idle",function(event){self.onIdle(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}))},WPGMZA.isProVersion()?(Parent=WPGMZA.ProMap,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.ProMap.prototype)):(Parent=WPGMZA.Map,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.Map.prototype)),WPGMZA.GoogleMap.prototype.constructor=WPGMZA.GoogleMap,WPGMZA.GoogleMap.prototype.loadGoogleMap=function(){var self=this,options=this.settings.toGoogleMapsOptions();this.googleMap=new google.maps.Map(this.engineElement,options),google.maps.event.addListener(this.googleMap,"bounds_changed",function(){self.onBoundsChanged()}),1==this.settings.bicycle&&this.enableBicycleLayer(!0),1==this.settings.traffic&&this.enableTrafficLayer(!0),1==this.settings.transport&&this.enablePublicTransportLayer(!0),this.showPointsOfInterest(this.settings.show_point_of_interest),$(this.engineElement).append($(this.element).find(".wpgmza-loader"))},WPGMZA.GoogleMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options);var converted=$.extend(options,this.settings.toGoogleMapsOptions()),clone=$.extend({},converted);if(!clone.center instanceof google.maps.LatLng&&(clone.center instanceof WPGMZA.LatLng||"object"==typeof clone.center)&&(clone.center={lat:parseFloat(clone.center.lat),lng:parseFloat(clone.center.lng)}),"1"==this.settings.hide_point_of_interest){clone.styles||(clone.styles=[]),clone.styles.push({featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]})}this.googleMap.setOptions(clone)},WPGMZA.GoogleMap.prototype.addMarker=function(marker){marker.googleMarker.setMap(this.googleMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.removeMarker=function(marker){marker.googleMarker.setMap(null),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.addPolygon=function(polygon){polygon.googlePolygon.setMap(this.googleMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.removePolygon=function(polygon){polygon.googlePolygon.setMap(null),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.addPolyline=function(polyline){polyline.googlePolyline.setMap(this.googleMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.removePolyline=function(polyline){polyline.googlePolyline.setMap(null),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.addCircle=function(circle){circle.googleCircle.setMap(this.googleMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.removeCircle=function(circle){circle.googleCircle.setMap(null),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.getCenter=function(){var latLng=this.googleMap.getCenter();return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),latLng instanceof WPGMZA.LatLng?this.googleMap.setCenter({lat:latLng.lat,lng:latLng.lng}):this.googleMap.setCenter(latLng)},WPGMZA.GoogleMap.prototype.panTo=function(latLng){latLng instanceof WPGMZA.LatLng?this.googleMap.panTo({lat:latLng.lat,lng:latLng.lng}):this.googleMap.panTo(latLng)},WPGMZA.GoogleMap.prototype.getZoom=function(){return this.googleMap.getZoom()},WPGMZA.GoogleMap.prototype.setZoom=function(value){if(isNaN(value))throw new Error("Value must not be NaN");return this.googleMap.setZoom(parseInt(value))},WPGMZA.GoogleMap.prototype.getBounds=function(){var bounds=this.googleMap.getBounds(),northEast=bounds.getNorthEast(),southWest=bounds.getSouthWest(),nativeBounds=new WPGMZA.LatLngBounds({});return nativeBounds.north=northEast.lat(),nativeBounds.south=southWest.lat(),nativeBounds.west=southWest.lng(),nativeBounds.east=northEast.lng(),nativeBounds.topLeft={lat:northEast.lat(),lng:southWest.lng()},nativeBounds.bottomRight={lat:southWest.lat(),lng:northEast.lng()},nativeBounds},WPGMZA.GoogleMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var nativeBounds=new google.maps.LatLngBounds(southWest,northEast);this.googleMap.fitBounds(nativeBounds)},WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers=function(){for(var bounds=new google.maps.LatLngBounds,i=0;i<this.markers.length;i++)markers[i].getVisible()&&bounds.extend(markers[i].getPosition());this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.enableBicycleLayer=function(enable){this.bicycleLayer||(this.bicycleLayer=new google.maps.BicyclingLayer),this.bicycleLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enableTrafficLayer=function(enable){this.trafficLayer||(this.trafficLayer=new google.maps.TrafficLayer),this.trafficLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enablePublicTransportLayer=function(enable){this.publicTransportLayer||(this.publicTransportLayer=new google.maps.TransitLayer),this.publicTransportLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.showPointsOfInterest=function(show){var text=$("textarea[name='theme_data']").val();if(text){var styles=JSON.parse(text);styles.push({featureType:"poi",stylers:[{visibility:show?"on":"off"}]}),this.googleMap.setOptions({styles:styles})}},WPGMZA.GoogleMap.prototype.getMinZoom=function(){return parseInt(this.settings.min_zoom)},WPGMZA.GoogleMap.prototype.setMinZoom=function(value){this.googleMap.setOptions({minZoom:value,maxZoom:this.getMaxZoom()})},WPGMZA.GoogleMap.prototype.getMaxZoom=function(){return parseInt(this.settings.max_zoom)},WPGMZA.GoogleMap.prototype.setMaxZoom=function(value){this.googleMap.setOptions({minZoom:this.getMinZoom(),maxZoom:value})},WPGMZA.GoogleMap.prototype.latLngToPixels=function(latLng){var map=this.googleMap,nativeLatLng=new google.maps.LatLng({lat:parseFloat(latLng.lat),lng:parseFloat(latLng.lng)}),topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=map.getProjection().fromLatLngToPoint(nativeLatLng);return{x:(worldPoint.x-bottomLeft.x)*scale,y:(worldPoint.y-topRight.y)*scale}},WPGMZA.GoogleMap.prototype.pixelsToLatLng=function(x,y){void 0==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var map=this.googleMap,topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=new google.maps.Point(x/scale+bottomLeft.x,y/scale+topRight.y),latLng=map.getProjection().fromPointToLatLng(worldPoint);return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.onElementResized=function(event){this.googleMap&&google.maps.event.trigger(this.googleMap,"resize")}}),jQuery(function($){var Parent;WPGMZA.GoogleMarker=function(row){var self=this;Parent.call(this,row);var settings={};if(row)for(var name in row)row[name]instanceof WPGMZA.LatLng?settings[name]=row[name].toGoogleLatLng():row[name]instanceof WPGMZA.Map||(settings[name]=row[name]);this.googleMarker=new google.maps.Marker(settings),this.googleMarker.wpgmzaMarker=this,this.googleMarker.setPosition(new google.maps.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})),this.googleMarker.setLabel(this.settings.label),this.animation&&this.googleMarker.setAnimation(this.animation),google.maps.event.addListener(this.googleMarker,"click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),google.maps.event.addListener(this.googleMarker,"mouseover",function(){self.dispatchEvent("mouseover")}),google.maps.event.addListener(this.googleMarker,"dragend",function(){var googleMarkerPosition=self.googleMarker.getPosition();self.setPosition({lat:googleMarkerPosition.lat(),lng:googleMarkerPosition.lng()}),self.dispatchEvent({type:"dragend",latLng:self.getPosition()})}),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.GoogleMarker.prototype=Object.create(Parent.prototype),WPGMZA.GoogleMarker.prototype.constructor=WPGMZA.GoogleMarker,WPGMZA.GoogleMarker.prototype.setLabel=function(label){label?(this.googleMarker.setLabel({text:label}),this.googleMarker.getIcon()||this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon)):this.googleMarker.setLabel(null)},WPGMZA.GoogleMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var params,self=this,icon=this.googleMarker.getIcon(),img=new Image,x=this._offset.x,y=this._offset.y;icon||(icon=WPGMZA.settings.default_marker_icon),params="string"==typeof icon?{url:icon}:icon,img.onload=function(){var defaultAnchor={x:img.width/2,y:img.height};params.anchor=new google.maps.Point(defaultAnchor.x-x,defaultAnchor.y-y),self.googleMarker.setIcon(params)},img.src=params.url},WPGMZA.GoogleMarker.prototype.setOptions=function(options){this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){Parent.prototype.setAnimation.call(this,animation),this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker.setOpacity(opacity)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocatorCircle=function(map,settings){var self=this;WPGMZA.ModernStoreLocatorCircle.call(this,map,settings),this.intervalID=setInterval(function(){var mapSize={width:$(self.mapElement).width(),height:$(self.mapElement).height()};mapSize.width==self.mapSize.width&&mapSize.height==self.mapSize.height||(self.canvasLayer.resize_(),self.canvasLayer.draw(),self.mapSize=mapSize)},1e3),$(document).bind("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){self.canvasLayer.resize_(),self.canvasLayer.draw()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor=WPGMZA.GoogleModernStoreLocatorCircle,WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this;this.canvasLayer&&(this.canvasLayer.setMap(null),this.canvasLayer.setAnimate(!1)),this.canvasLayer=new CanvasLayer({map:this.map.googleMap,resizeHandler:function(event){self.onResize(event)},updateHandler:function(event){self.onUpdate(event)},animate:!0,resolutionScale:this.getResolutionScale()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions=function(options){WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this,options),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition=function(position){WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this,position),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius=function(radius){WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this,radius),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var spherical=google.maps.geometry.spherical,center=this.settings.center,equator=new WPGMZA.LatLng({lat:0,lng:0}),latitude=new WPGMZA.LatLng({lat:center.lat,lng:0}),offsetAtEquator=spherical.computeOffset(equator.toGoogleLatLng(),1e3*km,90),result=.006395*km*(spherical.computeOffset(latitude.toGoogleLatLng(),1e3*km,90).lng()/offsetAtEquator.lng());if(isNaN(result))throw new Error("here");return result},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvasLayer.canvas.width,height:this.canvasLayer.canvas.height}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){var position=this.map.googleMap.getProjection().fromLatLngToPoint(this.canvasLayer.getTopLeft());return{x:-position.x,y:-position.y}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels=function(){var center=new WPGMZA.LatLng(this.settings.center);return this.map.googleMap.getProjection().fromLatLngToPoint(center.toGoogleLatLng())},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvasLayer.canvas.getContext("2d")},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale=function(){return Math.pow(2,this.map.getZoom())*this.getResolutionScale()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible=function(visible){WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this,visible),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy=function(){this.canvasLayer.setMap(null),this.canvasLayer=null,clearInterval(this.intervalID)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocator=function(map_id){this.map=WPGMZA.getMapByID(map_id),WPGMZA.ModernStoreLocator.call(this,map_id);var options={fields:["name","formatted_address"],types:["geocode"]},restrict=wpgmaps_localize[map_id].other_settings.wpgmza_store_locator_restrict;this.addressInput=$(this.element).find(".addressInput, #addressInput")[0],this.addressInput&&(restrict&&restrict.length&&(options.componentRestrictions={country:restrict}),this.autoComplete=new google.maps.places.Autocomplete(this.addressInput,options)),this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element)},WPGMZA.GoogleModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator.prototype),WPGMZA.GoogleModernStoreLocator.prototype.constructor=WPGMZA.GoogleModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.GooglePolygon=function(row,googlePolygon){var self=this;if(Parent.call(this,row,googlePolygon),googlePolygon)this.googlePolygon=googlePolygon;else if(this.googlePolygon=new google.maps.Polygon(this.settings),row&&row.points){var paths=this.parseGeometry(row.points);this.googlePolygon.setOptions({paths:paths})}this.googlePolygon.wpgmzaPolygon=this,google.maps.event.addListener(this.googlePolygon,"click",function(){self.dispatchEvent({type:"click"})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.GooglePolygon.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolygon.prototype.constructor=WPGMZA.GooglePolygon,WPGMZA.GooglePolygon.prototype.getEditable=function(){return this.googlePolygon.getOptions().editable},WPGMZA.GooglePolygon.prototype.setEditable=function(value){this.googlePolygon.setOptions({editable:value})},WPGMZA.GooglePolygon.prototype.toJSON=function(){var result=WPGMZA.Polygon.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolygon.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GooglePolyline=function(row,googlePolyline){var self=this;if(WPGMZA.Polyline.call(this,row,googlePolyline),googlePolyline)this.googlePolyline=googlePolyline;else if(this.googlePolyline=new google.maps.Polyline(this.settings),this.googlePolyline.wpgmzaPolyline=this,row&&row.points){var path=this.parseGeometry(row.points);this.setPoints(path)}google.maps.event.addListener(this.googlePolyline,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.GooglePolyline.prototype=Object.create(WPGMZA.Polyline.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.setEditable=function(value){this.googlePolyline.setOptions({editable:value})},WPGMZA.GooglePolyline.prototype.setPoints=function(points){this.googlePolyline.setOptions({path:points})},WPGMZA.GooglePolyline.prototype.toJSON=function(){var result=WPGMZA.Polyline.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolyline.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GoogleTextOverlay=function(){this.element=$("<div></div>")},window.google&&google.maps&&google.maps.OverlayView&&(WPGMZA.GoogleTextOverlay.prototype=new google.maps.OverlayView),WPGMZA.GoogleTextOverlay.prototype.onAdd=function(){}}),jQuery(function($){WPGMZA.GoogleText=function(){}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&(WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(WPGMZA.GoogleVertexContextMenu=function(mapEditPage){var self=this;this.mapEditPage=mapEditPage,this.element=document.createElement("div"),this.element.className="wpgmza-vertex-context-menu",this.element.innerHTML="Delete",google.maps.event.addDomListener(this.element,"click",function(event){return self.removeVertex(),event.preventDefault(),event.stopPropagation(),!1})},WPGMZA.GoogleVertexContextMenu.prototype=new google.maps.OverlayView,WPGMZA.GoogleVertexContextMenu.prototype.onAdd=function(){var self=this,map=this.getMap();this.getPanes().floatPane.appendChild(this.element),this.divListener=google.maps.event.addDomListener(map.getDiv(),"mousedown",function(e){e.target!=self.element&&self.close()},!0)},WPGMZA.GoogleVertexContextMenu.prototype.onRemove=function(){google.maps.event.removeListener(this.divListener),this.element.parentNode.removeChild(this.element),this.set("position"),this.set("path"),this.set("vertex")},WPGMZA.GoogleVertexContextMenu.prototype.open=function(map,path,vertex){this.set("position",path.getAt(vertex)),this.set("path",path),this.set("vertex",vertex),this.setMap(map),this.draw()},WPGMZA.GoogleVertexContextMenu.prototype.close=function(){this.setMap(null)},WPGMZA.GoogleVertexContextMenu.prototype.draw=function(){var position=this.get("position"),projection=this.getProjection();if(position&&projection){var point=projection.fromLatLngToDivPixel(position);this.element.style.top=point.y+"px",this.element.style.left=point.x+"px"}},WPGMZA.GoogleVertexContextMenu.prototype.removeVertex=function(){var path=this.get("path"),vertex=this.get("vertex");path&&void 0!=vertex?(path.removeAt(vertex),this.close()):this.close()}))}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.OLCircle=function(options,olFeature){this.center={lat:0,lng:0},this.radius=0,Parent.call(this,options,olFeature),this.settings.fillColor||(this.settings.fillColor="#ff0000",this.settings.fillOpacity=.6),options.fillColor&&(this.settings.fillColor=options.fillColor),options.fillOpacity&&(this.settings.fillOpacity=options.fillOpacity),this.olStyle=new ol.style.Style(this.getStyleFromSettings()),this.vectorLayer3857=this.layer=new ol.layer.Vector({source:new ol.source.Vector,style:this.olStyle}),olFeature?this.olFeature=olFeature:this.recreate()},WPGMZA.OLCircle.prototype=Object.create(Parent.prototype),WPGMZA.OLCircle.prototype.constructor=WPGMZA.OLCircle,WPGMZA.OLCircle.prototype.recreate=function(){if(this.olFeature&&(this.layer.getSource().removeFeature(this.olFeature),delete this.olFeature),this.center&&this.radius){var x,y,wgs84Sphere=new ol.Sphere(6378137),radius=1e3*parseFloat(this.radius);x=this.center.lng,y=this.center.lat;var circle3857=ol.geom.Polygon.circular(wgs84Sphere,[x,y],radius,64).clone().transform("EPSG:4326","EPSG:3857");this.olFeature=new ol.Feature(circle3857),this.layer.getSource().addFeature(this.olFeature)}},WPGMZA.OLCircle.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity)})),this.settings.fillOpacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.settings.fillColor,this.settings.fillOpacity)})),params},WPGMZA.OLCircle.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLCircle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.recreate()},WPGMZA.OLCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.recreate()}}),jQuery(function($){WPGMZA.OLGeocoder=function(){},WPGMZA.OLGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder,WPGMZA.OLGeocoder.prototype.getResponseFromCache=function(query,callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_query_nominatim_cache",query:JSON.stringify(query)},success:function(response,xhr,status){response.lng=response.lon,callback(response)}})},WPGMZA.OLGeocoder.prototype.getResponseFromNominatim=function(options,callback){var data={q:options.address,format:"json"};options.componentRestrictions&&options.componentRestrictions.country&&(data.countryCodes=options.componentRestrictions.country),$.ajax("https://nominatim.openstreetmap.org/search/",{data:data,success:function(response,xhr,status){callback(response)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.OLGeocoder.prototype.cacheResponse=function(query,response){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_store_nominatim_cache",query:JSON.stringify(query),response:JSON.stringify(response)},method:"POST"})},WPGMZA.OLGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.geocode=function(options,callback){var self=this;if(!options)throw new Error("Invalid options");options.location&&(options.latLng=new WPGMZA.LatLng(options.location));var finish,location;if(options.address)location=options.address,finish=function(response,status){for(var i=0;i<response.length;i++)response[i].geometry={location:new WPGMZA.LatLng({lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)})},response[i].latLng={lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)},response[i].lng=response[i].lon;callback(response,status)};else{if(!options.latLng)throw new Error("You must supply either a latLng or address");location=options.latLng.toString(),finish=function(response,status){var address=response[0].display_name;callback([address],status)}}var query={location:location,options:options};this.getResponseFromCache(query,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location}),function(response,status){status!=WPGMZA.Geocoder.FAIL?0!=response.length?(finish(response,WPGMZA.Geocoder.SUCCESS),self.cacheResponse(query,response)):callback([],WPGMZA.Geocoder.ZERO_RESULTS):callback(null,WPGMZA.Geocoder.FAIL)})})}}),jQuery(function($){var Parent;WPGMZA.OLInfoWindow=function(mapObject){var self=this;Parent.call(this,mapObject),this.element=$("<div class='ol-info-window-container ol-info-window-plain'></div>")[0],$(this.element).on("click",".ol-info-window-close",function(event){self.close()})},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.OLInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.OLInfoWindow.prototype.constructor=WPGMZA.OLInfoWindow,WPGMZA.OLInfoWindow.prototype.open=function(map,mapObject){var self=this,latLng=mapObject.getPosition();if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.overlay&&this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.mapObject.map.olMap.addOverlay(this.overlay),$(this.element).show(),this.trigger("infowindowopen")},WPGMZA.OLInfoWindow.prototype.close=function(event){$(this.element).hide(),this.overlay&&(WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose"),this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=null)},WPGMZA.OLInfoWindow.prototype.setContent=function(html){$(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>"+html)},WPGMZA.OLInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})}}),jQuery(function($){var Parent;WPGMZA.OLMap=function(element,options){var self=this;Parent.call(this,element),this.setOptions(options);var viewOptions=this.settings.toOLViewOptions();$(this.element).html(""),this.olMap=new ol.Map({target:$(element)[0],layers:[this.getTileLayer()],view:new ol.View(viewOptions)}),this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan?interaction.setActive("yes"!=self.settings.wpgmza_settings_map_draggable):interaction instanceof ol.interaction.DoubleClickZoom?interaction.setActive(!self.settings.wpgmza_settings_map_clickzoom):interaction instanceof ol.interaction.MouseWheelZoom&&interaction.setActive("yes"!=self.settings.wpgmza_settings_map_scroll)},this),this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&"yes"==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this),"yes"!=WPGMZA.settings.wpgmza_settings_map_full_screen_control&&this.olMap.addControl(new ol.control.FullScreen),this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}),this.olMap.addLayer(this.markerLayer),this.olMap.on("movestart",function(event){self.isBeingDragged=!0}),this.olMap.on("moveend",function(event){self.wrapLongitude(),self.isBeingDragged=!1,self.dispatchEvent("dragend"),self.onIdle()}),this.olMap.getView().on("change:resolution",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged"),setTimeout(function(){self.onIdle()},10)}),this.olMap.getView().on("change",function(){self.onBoundsChanged()}),self.onBoundsChanged();var marker;this.storeLocator&&(marker=this.storeLocator.centerPointMarker)&&(this.olMap.addOverlay(marker.overlay),marker.setVisible(!1)),$(this.element).on("click contextmenu",function(event){var isRight;event=event||window.event;var latLng=self.pixelsToLatLng(event.offsetX,event.offsetY);if("which"in event?isRight=3==event.which:"button"in event&&(isRight=2==event.button),1!=event.which&&1!=event.button){if(isRight)return self.onRightClick(event)}else{if(self.isBeingDragged)return;self.trigger({type:"click",latLng:latLng})}}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}))},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.OLMap.prototype=Object.create(Parent.prototype),WPGMZA.OLMap.prototype.constructor=WPGMZA.OLMap,WPGMZA.OLMap.prototype.getTileLayer=function(){var options={};return WPGMZA.settings.tile_server_url&&(options.url=WPGMZA.settings.tile_server_url),new ol.layer.Tile({source:new ol.source.OSM(options)})},WPGMZA.OLMap.prototype.wrapLongitude=function(){var center=this.getCenter();center.lng>=-180&¢er.lng<=180||(center.lng=center.lng-360*Math.floor(center.lng/360),center.lng>180&&(center.lng-=360),this.setCenter(center))},WPGMZA.OLMap.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olMap.getView().getCenter());return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.setCenter=function(latLng){var view=this.olMap.getView();WPGMZA.Map.prototype.setCenter.call(this,latLng),view.setCenter(ol.proj.fromLonLat([latLng.lng,latLng.lat])),this.wrapLongitude(),this.onBoundsChanged()},WPGMZA.OLMap.prototype.getBounds=function(){var bounds=this.olMap.getView().calculateExtent(this.olMap.getSize()),nativeBounds=new WPGMZA.LatLngBounds,topLeft=ol.proj.toLonLat([bounds[0],bounds[1]]),bottomRight=ol.proj.toLonLat([bounds[2],bounds[3]]);return nativeBounds.north=topLeft[1],nativeBounds.south=bottomRight[1],nativeBounds.west=topLeft[0],nativeBounds.east=bottomRight[0],nativeBounds},WPGMZA.OLMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var view=this.olMap.getView(),extent=ol.extent.boundingExtent([ol.proj.fromLonLat([parseFloat(southWest.lng),parseFloat(southWest.lat)]),ol.proj.fromLonLat([parseFloat(northEast.lng),parseFloat(northEast.lat)])]);view.fit(extent,this.olMap.getSize())},WPGMZA.OLMap.prototype.panTo=function(latLng,zoom){var view=this.olMap.getView(),options={center:ol.proj.fromLonLat([parseFloat(latLng.lng),parseFloat(latLng.lat)]),duration:500};arguments.length>1&&(options.zoom=parseInt(zoom)),view.animate(options)},WPGMZA.OLMap.prototype.getZoom=function(){return Math.round(this.olMap.getView().getZoom())},WPGMZA.OLMap.prototype.setZoom=function(value){this.olMap.getView().setZoom(value)},WPGMZA.OLMap.prototype.getMinZoom=function(){return this.olMap.getView().getMinZoom()},WPGMZA.OLMap.prototype.setMinZoom=function(value){this.olMap.getView().setMinZoom(value)},WPGMZA.OLMap.prototype.getMaxZoom=function(){return this.olMap.getView().getMaxZoom()},WPGMZA.OLMap.prototype.setMaxZoom=function(value){this.olMap.getView().setMaxZoom(value)},WPGMZA.OLMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.olMap&&this.olMap.getView().setProperties(this.settings.toOLViewOptions())},WPGMZA.OLMap.prototype.addMarker=function(marker){this.olMap.addOverlay(marker.overlay),Parent.prototype.addMarker.call(this,marker)},WPGMZA.OLMap.prototype.removeMarker=function(marker){this.olMap.removeOverlay(marker.overlay),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.OLMap.prototype.addPolygon=function(polygon){this.olMap.addLayer(polygon.layer),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.OLMap.prototype.removePolygon=function(polygon){this.olMap.removeLayer(polygon.layer),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.OLMap.prototype.addPolyline=function(polyline){this.olMap.addLayer(polyline.layer),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.OLMap.prototype.removePolyline=function(polyline){this.olMap.removeLayer(polyline.layer),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.OLMap.prototype.addCircle=function(circle){this.olMap.addLayer(circle.layer),Parent.prototype.addCircle.call(this,circle)},WPGMZA.OLMap.prototype.removeCircle=function(circle){this.olMap.removeLayer(circle.layer),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.OLMap.prototype.pixelsToLatLng=function(x,y){void 0==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var coord=this.olMap.getCoordinateFromPixel([x,y]);if(!coord)return{x:null,y:null};var lonLat=ol.proj.toLonLat(coord);return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.latLngToPixels=function(latLng){var coord=ol.proj.fromLonLat([latLng.lng,latLng.lat]),pixel=this.olMap.getPixelFromCoordinate(coord);return pixel?{x:pixel[0],y:pixel[1]}:{x:null,y:null}},WPGMZA.OLMap.prototype.enableBicycleLayer=function(value){if(value)this.bicycleLayer||(this.bicycleLayer=new ol.layer.Tile({source:new ol.source.OSM({url:"http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"})})),this.olMap.addLayer(this.bicycleLayer);else{if(!this.bicycleLayer)return;this.olMap.removeLayer(this.bicycleLayer)}},WPGMZA.OLMap.prototype.onElementResized=function(event){this.olMap.updateSize()},WPGMZA.OLMap.prototype.onRightClick=function(event){if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)return!0;var parentOffset=$(this.element).offset(),relX=event.pageX-parentOffset.left,relY=event.pageY-parentOffset.top,latLng=this.pixelsToLatLng(relX,relY);return this.trigger({type:"rightclick",latLng:latLng}),$(this.element).trigger({type:"rightclick",latLng:latLng}),event.preventDefault(),!1}}),jQuery(function($){var Parent;WPGMZA.OLMarker=function(row){var self=this;Parent.call(this,row);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);this.element=$("<div class='ol-marker'><img src='"+WPGMZA.defaultMarkerIcon+"' alt=''/></div>")[0],this.element.wpgmzaMarker=this,$(this.element).on("mouseover",function(event){self.dispatchEvent("mouseover")}),this.overlay=new ol.Overlay({element:this.element,position:origin,positioning:"bottom-center"}),this.overlay.setPosition(origin),this.animation&&this.setAnimation(this.animation),this.setLabel(this.settings.label),row&&row.draggable&&this.setDraggable(!0),this.rebindClickListener(),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.OLMarker.prototype=Object.create(Parent.prototype),WPGMZA.OLMarker.prototype.constructor=WPGMZA.OLMarker,WPGMZA.OLMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.OLMarker.prototype.setLabel=function(label){label?(this.label||(this.label=$("<div class='ol-marker-label'/>"),$(this.element).append(this.label)),this.label.html(label)):this.label&&$(this.element).find(".ol-marker-label").remove()},WPGMZA.OLMarker.prototype.getVisible=function(visible){return"none"!=this.overlay.getElement().style.display},WPGMZA.OLMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.overlay.getElement().style.display=visible?"block":"none"},WPGMZA.OLMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);this.overlay.setPosition(origin)},WPGMZA.OLMarker.prototype.updateOffset=function(x,y){var x=this._offset.x,y=this._offset.y;this.element.style.position="relative",this.element.style.left=x+"px",this.element.style.top=y+"px"},WPGMZA.OLMarker.prototype.setAnimation=function(anim){switch(Parent.prototype.setAnimation.call(this,anim),anim){case WPGMZA.Marker.ANIMATION_NONE:$(this.element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(this.element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(this.element).attr("data-anim","drop")}},WPGMZA.OLMarker.prototype.setDraggable=function(draggable){var self=this;if(draggable){var options={disabled:!1};this.jQueryDraggableInitialized||(options.start=function(event){self.onDragStart(event)},options.stop=function(event){self.onDragEnd(event)}),$(this.element).draggable(options),this.jQueryDraggableInitialized=!0,this.rebindClickListener()}else $(this.element).draggable({disabled:!0})},WPGMZA.OLMarker.prototype.setOpacity=function(opacity){$(this.element).css({opacity:opacity})},WPGMZA.OLMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0},WPGMZA.OLMarker.prototype.onDragEnd=function(event){var offset={top:parseFloat($(this.element).css("top").match(/-?\d+/)[0]),left:parseFloat($(this.element).css("left").match(/-?\d+/)[0])};$(this.element).css({top:"0px",left:"0px"});var currentLatLng=this.getPosition(),pixelsBeforeDrag=this.map.latLngToPixels(currentLatLng),pixelsAfterDrag={x:pixelsBeforeDrag.x+offset.left,y:pixelsBeforeDrag.y+offset.top},latLngAfterDrag=this.map.pixelsToLatLng(pixelsAfterDrag);this.setPosition(latLngAfterDrag),this.isBeingDragged=!1,this.trigger({type:"dragend",latLng:latLngAfterDrag})},WPGMZA.OLMarker.prototype.onElementClick=function(event){var self=event.currentTarget.wpgmzaMarker;self.isBeingDragged||(self.dispatchEvent("click"),self.dispatchEvent("select"))},WPGMZA.OLMarker.prototype.rebindClickListener=function(){$(this.element).off("click",this.onElementClick),$(this.element).on("click",this.onElementClick)}}),jQuery(function($){WPGMZA.OLModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.OLModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.OLModernStoreLocatorCircle.prototype.constructor=WPGMZA.OLModernStoreLocatorCircle,WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,mapElement=$(this.map.element),olViewportElement=mapElement.children(".ol-viewport");this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-ol-canvas-overlay",mapElement.append(this.canvas),this.renderFunction=function(event){self.canvas.width==olViewportElement.width()&&self.canvas.height==olViewportElement.height()||(self.canvas.width=olViewportElement.width(),self.canvas.height=olViewportElement.height(),$(this.canvas).css({width:olViewportElement.width()+"px",height:olViewportElement.height()+"px"})),self.draw()},this.map.olMap.on("postrender",this.renderFunction)},WPGMZA.OLModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var center=new WPGMZA.LatLng(this.settings.center),outer=new WPGMZA.LatLng(center);outer.moveByDistance(km,90);var centerPixels=this.map.latLngToPixels(center),outerPixels=this.map.latLngToPixels(outer);return Math.abs(outerPixels.x-centerPixels.x)},WPGMZA.OLModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.OLModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.olMap.un("postrender",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){WPGMZA.OLModernStoreLocator=function(map_id){WPGMZA.ModernStoreLocator.call(this,map_id),$(WPGMZA.isProVersion()?".wpgmza_map[data-map-id='"+map_id+"']":"#wpgmza_map").append(this.element)},WPGMZA.OLModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator),WPGMZA.OLModernStoreLocator.prototype.constructor=WPGMZA.OLModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.OLPolygon=function(row,olFeature){if(Parent.call(this,row,olFeature),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[[]];if(row&&row.points){for(var paths=this.parseGeometry(row.points),i=0;i<paths.length;i++)coordinates[0].push(ol.proj.fromLonLat([parseFloat(paths[i].lng),parseFloat(paths[i].lat)]));this.olStyle=new ol.style.Style(this.getStyleFromSettings())}this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolygon:this})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.OLPolygon.prototype=Object.create(Parent.prototype),WPGMZA.OLPolygon.prototype.constructor=WPGMZA.OLPolygon,WPGMZA.OLPolygon.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity)})),this.settings.fillOpacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.settings.fillColor,this.settings.fillOpacity)})),params},WPGMZA.OLPolygon.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolygon.prototype.setEditable=function(editable){},WPGMZA.OLPolygon.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates()[0];result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){var Parent;WPGMZA.OLPolyline=function(row,olFeature){if(WPGMZA.Polyline.call(this,row),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[];if(row&&row.points)for(var path=this.parseGeometry(row.points),i=0;i<path.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(path[i].lng),parseFloat(path[i].lat)]));var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolyling:this})},Parent=WPGMZA.Polyline,WPGMZA.OLPolyline.prototype=Object.create(Parent.prototype),WPGMZA.OLPolyline.prototype.constructor=WPGMZA.OLPolyline,WPGMZA.OLPolyline.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity),width:parseInt(this.settings.strokeWeight)})),params},WPGMZA.OLPolyline.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolyline.prototype.setEditable=function(editable){},WPGMZA.OLPolyline.prototype.setPoints=function(points){this.olFeature&&this.layer.getSource().removeFeature(this.olFeature);for(var coordinates=[],i=0;i<points.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(points[i].lng),parseFloat(points[i].lat)]));this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)}),this.layer.getSource().addFeature(this.olFeature)},WPGMZA.OLPolyline.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates();result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){WPGMZA.OLText=function(){}}),jQuery(function($){WPGMZA.DataTable=function(element){$.fn.dataTable.ext.errMode="throw",this.element=element,this.element.wpgmzaDataTable=this,this.dataTableElement=this.getDataTableElement();var settings=this.getDataTableSettings();this.phpClass=$(element).attr("data-wpgmza-php-class"),this.dataTable=$(this.dataTableElement).DataTable(settings),this.wpgmzaDataTable=this},WPGMZA.DataTable.prototype.getDataTableElement=function(){return $(this.element).find("table")},WPGMZA.DataTable.prototype.getDataTableSettings=function(){var ajax,self=this,element=this.element,options={};$(element).attr("data-wpgmza-datatable-options")&&(options=JSON.parse($(element).attr("data-wpgmza-datatable-options"))),(ajax=$(element).attr("data-wpgmza-rest-api-route"))&&(options.ajax={url:WPGMZA.resturl+ajax,method:"POST",data:function(data,settings){return self.onAJAXRequest(data,settings)},beforeSend:function(xhr){xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce)}},options.processing=!0,options.serverSide=!0),"WPGMZA\\MarkerListing\\AdvancedTable"==$(this.element).attr("data-wpgmza-php-class")&&WPGMZA.settings.wpgmza_default_items&&(options.iDisplayLength=parseInt(WPGMZA.settings.wpgmza_default_items),options.aLengthMenu=[5,10,25,50,100]);var languageURL;if(WPGMZA.locale)switch(WPGMZA.locale.substr(0,2)){case"af":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Afrikaans.json";break;case"sq":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Albanian.json";break;case"am":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Amharic.json";break;case"ar":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Arabic.json";break;case"hy":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Armenian.json";break;case"az":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Azerbaijan.json";break;case"bn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Bangla.json";break;case"eu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Basque.json";break;case"be":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Belarusian.json";break;case"bg":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Bulgarian.json";break;case"ca":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Catalan.json";break;case"zh":languageURL="zh_TW"==WPGMZA.locale?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese-traditional.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";break;case"hr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Croatian.json";break;case"cs":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Czech.json";break;case"da":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Danish.json";break;case"nl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Dutch.json";break;case"et":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Estonian.json";break;case"fi":languageURL=WPGMZA.locale.match(/^fil/)?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Filipino.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Finnish.json";break;case"fr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/French.json";break;case"gl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Galician.json";break;case"ka":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Georgian.json";break;case"de":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/German.json";break;case"el":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Greek.json";break;case"gu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Gujarati.json";break;case"he":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hebrew.json";break;case"hi":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hindi.json";break;case"hu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hungarian.json";break;case"is":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Icelandic.json";break;case"id":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Indonesian.json";break;case"ga":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Irish.json";break;case"it":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Italian.json";break;case"ja":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Japanese.json";break;case"kk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Kazakh.json";break;case"ko":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Korean.json";break;case"ky":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Kyrgyz.json";break;case"lv":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Latvian.json";break;case"lt":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Lithuanian.json";break;case"mk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Macedonian.json";break;case"ml":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Malay.json";break;case"mn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Mongolian.json";break;case"ne":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Nepali.json";break;case"nb":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Norwegian-Bokmal.json";break;case"nn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Norwegian-Nynorsk.json";break;case"ps":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Pashto.json";break;case"fa":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Persian.json";break;case"pl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Polish.json";break;case"pt":languageURL="pt_BR"==WPGMZA.locale?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese-Brasil.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";break;case"ro":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Romanian.json";break;case"ru":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Russian.json";break;case"sr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Serbian.json";break;case"si":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Sinhala.json";break;case"sk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Slovak.json";break;case"sl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Slovenian.json";break;case"es":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Spanish.json";break;case"sw":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Swahili.json";break;case"sv":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Swedish.json";break;case"ta":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Tamil.json";break;case"te":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/telugu.json";break;case"th":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Thai.json";break;case"tr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Turkish.json";break;case"uk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Ukrainian.json";break;case"ur":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Urdu.json";break;case"uz":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Uzbek.json";break;case"vi":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Vietnamese.json";break;case"cy":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Welsh.json"}return languageURL&&(options.language={processing:"test",url:languageURL}),options},WPGMZA.DataTable.prototype.onAJAXRequest=function(data,settings){var params={phpClass:this.phpClass},attr=$(this.element).attr("data-wpgmza-ajax-parameters");return attr&&$.extend(params,JSON.parse(attr)),$.extend(data,params),{wpgmzaDataTableRequestData:data}},WPGMZA.DataTable.prototype.onAJAXResponse=function(response){},WPGMZA.DataTable.prototype.reload=function(){this.dataTable.ajax.reload(null,!1)}}),jQuery(function($){WPGMZA.AdminMarkerDataTable=function(element){var self=this;WPGMZA.DataTable.call(this,element),$(element).find(".wpgmza.select_all_markers").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete").on("click",function(event){self.onBulkDelete(event)})},WPGMZA.AdminMarkerDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdminMarkerDataTable.prototype.constructor=WPGMZA.AdminMarkerDataTable,WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){var meta=self.dataTable.ajax.json().meta[index];row.wpgmzaMarkerData=meta},options},WPGMZA.AdminMarkerDataTable.prototype.onSelectAll=function(event){$(this.element).find("input[name='mark']").prop("checked",!0)},WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[];$(this.element).find("input[name='mark']:checked").each(function(index,el){var row=$(el).closest("tr")[0];ids.push(row.wpgmzaMarkerData.id)}),WPGMZA.restAPI.call("/markers/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},$(document).ready(function(event){$("[data-wpgmza-admin-marker-datatable]").each(function(index,el){new WPGMZA.AdminMarkerDataTable(el)})})});
|
1 |
+
jQuery(function($){var core={maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'<div class="wpgmza-preloader"><div class="wpgmza-loader">...</div></div>',getScrollAnimationOffset:function(){return WPGMZA.settings.scroll_animation_offset||0},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds||(milliseconds=WPGMZA.settings.scroll_animation_milliseconds?WPGMZA.settings.scroll_animation_milliseconds:500),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(colour,opacity){return hex=parseInt(colour.replace(/^#/,""),16),[(16711680&hex)>>16,(65280&hex)>>8,255&hex,parseFloat(opacity)]},hexToRgba:function(hex){var c;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)?(3==(c=hex.substring(1).split("")).length&&(c=[c[0],c[0],c[1],c[1],c[2],c[2]]),c="0x"+c.join(""),{r:c>>16&255,g:c>>8&255,b:255&c,a:1}):0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(str){if("string"!=typeof str)return null;str.match(/^\(.+\)$/)&&(str=str.replace(/^\(|\)$/,""));var m=str.match(WPGMZA.latLngRegexp);return m?new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])}):null},stringToLatLng:function(str){var result=WPGMZA.isLatLngString(str);if(!result)throw new Error("Not a valid latLng");return result},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){if(WPGMZA.imageDimensionsCache[src])callback(WPGMZA.imageDimensionsCache[src]);else{var img=document.createElement("img");img.onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src}},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback){var file_frame;if(file_frame)return file_frame.uploader.uploader.param("post_id",set_to_post_id),void file_frame.open();(file_frame=wp.media.frames.file_frame=wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){attachment=file_frame.state().get("selection").first().toJSON(),callback(attachment.id,attachment.url)}),file_frame.open()},getCurrentPosition:function(callback,watch){var nativeFunction="getCurrentPosition";if(watch&&("userlocationupdated",nativeFunction="watchPosition",WPGMZA.getCurrentPosition(callback,!1)),navigator.geolocation){var options={enableHighAccuracy:!0};navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(error){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(error){console.warn(error.code,error.message)},options)},options)}else console.warn("No geolocation available on this device")},watchPosition:function(callback){return WPGMZA.getCurrentPosition(callback,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){var friendlyError=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(friendlyError.element),$(friendlyErrorContainer).show()}},assertInstanceOf:function(instance,instanceName){var engine,fullInstanceName,pro=WPGMZA.isProVersion()?"Pro":"";switch(WPGMZA.settings.engine){case"open-layers":engine="OL";break;default:engine="Google"}if(fullInstanceName=WPGMZA[engine+pro+instanceName]?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]?engine+instanceName:instanceName,!(instance instanceof WPGMZA[fullInstanceName]))throw new Error("Object must be an instance of "+fullInstanceName+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){return WPGMZA.isProVersion()?MYMAP[id].map:MYMAP.map},isGoogleAutocompleteSupported:function(){return"object"==typeof google&&"object"==typeof google.maps&&"object"==typeof google.maps.places&&"function"==typeof google.maps.places.Autocomplete},googleAPIStatus:window.wpgmza_google_api_status,isSafari:function(){var ua=navigator.userAgent.toLowerCase();return-1!=ua.indexOf("safari")&&-1==ua.indexOf("chrome")},isTouchDevice:function(){return"ontouchstart"in window},isDeviceiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},getQueryParamValue:function(name){var m,regex=new RegExp(name+"=([^&]*)");return(m=window.location.href.match(regex))?m[1]:null}};window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core;for(var key in WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}jQuery(function($){$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var elements=$("script").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});elements.length>1&&console.warn("Multiple jQuery versions detected: ",elements),WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),$(document).on("click",".wpgmza_edit_btn",function(){WPGMZA.animateScroll("#wpgmaps_tabs_markers")})}),$(window).on("load",function(event){if("https:"!=window.location.protocol){var warning='<div class="notice notice-warning"><p>'+WPGMZA.localized_strings.unsecure_geolocation+"</p></div>";$(".wpgmza-geolocation-setting").each(function(index,el){$(el).after($(warning))})}})}),jQuery(function($){WPGMZA.Compatibility=function(){this.preventDocumentWriteGoogleMapsAPI()},WPGMZA.Compatibility.prototype.preventDocumentWriteGoogleMapsAPI=function(){var old=document.write;document.write=function(content){content.match&&content.match(/maps\.google/)||old.call(document,content)}},WPGMZA.compatiblityModule=new WPGMZA.Compatibility}),function(root,factory){"object"==typeof exports?module.exports=factory(root):"function"==typeof define&&define.amd?define([],factory.bind(root,root)):factory(root)}("undefined"!=typeof global?global:this,function(root){if(root.CSS&&root.CSS.escape)return root.CSS.escape;var cssEscape=function(value){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var codeUnit,string=String(value),length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);++index<length;)0!=(codeUnit=string.charCodeAt(index))?result+=codeUnit>=1&&codeUnit<=31||127==codeUnit||0==index&&codeUnit>=48&&codeUnit<=57||1==index&&codeUnit>=48&&codeUnit<=57&&45==firstCodeUnit?"\\"+codeUnit.toString(16)+" ":(0!=index||1!=length||45!=codeUnit)&&(codeUnit>=128||45==codeUnit||95==codeUnit||codeUnit>=48&&codeUnit<=57||codeUnit>=65&&codeUnit<=90||codeUnit>=97&&codeUnit<=122)?string.charAt(index):"\\"+string.charAt(index):result+="�";return result};return root.CSS||(root.CSS={}),root.CSS.escape=cssEscape,cssEscape}),jQuery(function($){function deg2rad(deg){return deg*(Math.PI/180)}Math.PI;WPGMZA.Distance={MILES:!0,KILOMETERS:!1,MILES_PER_KILOMETER:.621371,KILOMETERS_PER_MILE:1.60934,uiToMeters:function(uiDistance){return parseFloat(uiDistance)/(WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?WPGMZA.Distance.MILES_PER_KILOMETER:1)*1e3},uiToKilometers:function(uiDistance){return.001*WPGMZA.Distance.uiToMeters(uiDistance)},uiToMiles:function(uiDistance){return WPGMZA.Distance.uiToKilometers(uiDistance)*WPGMZA.Distance.MILES_PER_KILOMETER},kilometersToUI:function(km){return WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?km*WPGMZA.Distance.MILES_PER_KILOMETER:km},between:function(a,b){if(!(a instanceof WPGMZA.LatLng))throw new Error("First argument must be an instance of WPGMZA.LatLng");if(!(b instanceof WPGMZA.LatLng))throw new Error("Second argument must be an instance of WPGMZA.LatLng");if(a===b)return 0;var lat1=a.lat,lon1=a.lng,lat2=b.lat,lon2=b.lng,dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}}),jQuery(function($){WPGMZA.EventDispatcher=function(){WPGMZA.assertInstanceOf(this,"EventDispatcher"),this._listenersByType={}},WPGMZA.EventDispatcher.prototype.addEventListener=function(type,listener,thisObject,useCapture){var types=type.split(/\s+/);if(types.length>1)for(var i=0;i<types.length;i++)this.addEventListener(types[i],listener,thisObject,useCapture);else{if(!(listener instanceof Function))throw new Error("Listener must be a function");var target;target=this._listenersByType.hasOwnProperty(type)?this._listenersByType[type]:this._listenersByType[type]=[];var obj={listener:listener,thisObject:thisObject||this,useCapture:!!useCapture};target.push(obj)}},WPGMZA.EventDispatcher.prototype.on=WPGMZA.EventDispatcher.prototype.addEventListener,WPGMZA.EventDispatcher.prototype.removeEventListener=function(type,listener,thisObject,useCapture){var arr,obj;if(arr=this._listenersByType[type]){thisObject||(thisObject=this),useCapture=!!useCapture;for(var i=0;i<arr.length;i++)if((obj=arr[i]).listener==listener&&obj.thisObject==thisObject&&obj.useCapture==useCapture)return void arr.splice(i,1)}},WPGMZA.EventDispatcher.prototype.off=WPGMZA.EventDispatcher.prototype.removeEventListener,WPGMZA.EventDispatcher.prototype.hasEventListener=function(type){return!!_listenersByType[type]},WPGMZA.EventDispatcher.prototype.dispatchEvent=function(event){if(!(event instanceof WPGMZA.Event))if("string"==typeof event)event=new WPGMZA.Event(event);else{var src=event;event=new WPGMZA.Event;for(var name in src)event[name]=src[name]}event.target=this;for(var path=[],obj=this.parent;null!=obj;obj=obj.parent)path.unshift(obj);event.phase=WPGMZA.Event.CAPTURING_PHASE;for(var i=0;i<path.length&&!event._cancelled;i++)path[i]._triggerListeners(event);if(!event._cancelled){for(event.phase=WPGMZA.Event.AT_TARGET,this._triggerListeners(event),event.phase=WPGMZA.Event.BUBBLING_PHASE,i=path.length-1;i>=0&&!event._cancelled;i--)path[i]._triggerListeners(event);if(this.element){var customEvent={};for(var key in event){var value=event[key];"type"==key&&(value+=".wpgmza"),customEvent[key]=value}$(this.element).trigger(customEvent)}}},WPGMZA.EventDispatcher.prototype.trigger=WPGMZA.EventDispatcher.prototype.dispatchEvent,WPGMZA.EventDispatcher.prototype._triggerListeners=function(event){var arr,obj;if(arr=this._listenersByType[event.type])for(var i=0;i<arr.length;i++)obj=arr[i],(event.phase!=WPGMZA.Event.CAPTURING_PHASE||obj.useCapture)&&obj.listener.call(arr[i].thisObject,event)},WPGMZA.events=new WPGMZA.EventDispatcher}),jQuery(function($){WPGMZA.Event=function(options){if("string"==typeof options&&(this.type=options),this.bubbles=!0,this.cancelable=!0,this.phase=WPGMZA.Event.PHASE_CAPTURE,this.target=null,this._cancelled=!1,"object"==typeof options)for(var name in options)this[name]=options[name]},WPGMZA.Event.CAPTURING_PHASE=0,WPGMZA.Event.AT_TARGET=1,WPGMZA.Event.BUBBLING_PHASE=2,WPGMZA.Event.prototype.stopPropagation=function(){this._cancelled=!0}}),jQuery(function($){WPGMZA.FriendlyError=function(){}}),jQuery(function($){WPGMZA.Geocoder=function(){WPGMZA.assertInstanceOf(this,"Geocoder")},WPGMZA.Geocoder.SUCCESS="success",WPGMZA.Geocoder.ZERO_RESULTS="zero-results",WPGMZA.Geocoder.FAIL="fail",WPGMZA.Geocoder.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLGeocoder;default:return WPGMZA.GoogleGeocoder}},WPGMZA.Geocoder.createInstance=function(){return new(WPGMZA.Geocoder.getConstructor())},WPGMZA.Geocoder.prototype.getLatLngFromAddress=function(options,callback){if(WPGMZA.isLatLngString(options.address)){var parts=options.address.split(/,\s*/);callback([new WPGMZA.LatLng({lat:parseFloat(parts[0]),lng:parseFloat(parts[1])})],WPGMZA.Geocoder.SUCCESS)}},WPGMZA.Geocoder.prototype.getAddressFromLatLng=function(options,callback){callback([new WPGMZA.LatLng(options.latLng).toString()],WPGMZA.Geocoder.SUCCESS)},WPGMZA.Geocoder.prototype.geocode=function(options,callback){if("address"in options)return this.getLatLngFromAddress(options,callback);if("latLng"in options)return this.getAddressFromLatLng(options,callback);throw new Error("You must supply either a latLng or address")}}),jQuery(function($){WPGMZA.GoogleAPIErrorHandler=function(){var self=this;if("google-maps"==WPGMZA.settings.engine&&("map-edit"==WPGMZA.currentPage||0==WPGMZA.is_admin&&1==WPGMZA.userCanAdministrator)){this.element=$(WPGMZA.html.googleMapsAPIErrorDialog),1==WPGMZA.is_admin&&this.element.find(".wpgmza-front-end-only").remove(),this.errorMessageList=this.element.find(".wpgmza-google-api-error-list"),this.templateListItem=this.element.find("li.template").remove(),this.messagesAlreadyDisplayed={};var _error=console.error;console.error=function(message){self.onErrorMessage(message),_error.apply(this,arguments)},"google-maps"!=WPGMZA.settings.engine||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||this.addErrorMessage(WPGMZA.localized_strings.no_google_maps_api_key,["https://www.wpgmaps.com/get-a-google-maps-api-key/"])}},WPGMZA.GoogleAPIErrorHandler.prototype.onErrorMessage=function(message){var m;if(message)if((m=message.match(/You have exceeded your (daily )?request quota for this API/))||(m=message.match(/This API project is not authorized to use this API/))||(m=message.match(/^Geocoding Service: .+/))){var urls=message.match(/http(s)?:\/\/[^\s]+/gm);this.addErrorMessage(m[0],urls)}else(m=message.match(/^Google Maps.+error: (.+)\s+(http(s?):\/\/.+)/m))&&this.addErrorMessage(m[1].replace(/([A-Z])/g," $1"),[m[2]])},WPGMZA.GoogleAPIErrorHandler.prototype.addErrorMessage=function(message,urls){var self=this;if(!this.messagesAlreadyDisplayed[message]){var li=this.templateListItem.clone();$(li).find(".wpgmza-message").html(message);var buttonContainer=$(li).find(".wpgmza-documentation-buttons"),buttonTemplate=$(li).find(".wpgmza-documentation-buttons>a");if(buttonTemplate.remove(),urls&&urls.length){for(var i=0;i<urls.length;i++){urls[i];var button=buttonTemplate.clone(),text=WPGMZA.localized_strings.documentation;button.attr("href",urls[i]),$(button).find("i").addClass("fa-external-link"),$(button).append(text)}buttonContainer.append(button)}$(this.errorMessageList).append(li),$("#wpgmza_map, .wpgmza_map").each(function(index,el){var container=$(el).find(".wpgmza-google-maps-api-error-overlay");0==container.length&&(container=$("<div class='wpgmza-google-maps-api-error-overlay'></div>")).html(self.element.html()),setTimeout(function(){$(el).append(container)},100)}),$(".gm-err-container").parent().css({"z-index":1}),this.messagesAlreadyDisplayed[message]=!0}},WPGMZA.googleAPIErrorHandler=new WPGMZA.GoogleAPIErrorHandler}),jQuery(function($){WPGMZA.InfoWindow=function(mapObject){var self=this;WPGMZA.EventDispatcher.call(this),WPGMZA.assertInstanceOf(this,"InfoWindow"),mapObject&&(this.mapObject=mapObject,mapObject.map?setTimeout(function(){self.onMapObjectAdded(event)},100):mapObject.addEventListener("added",function(event){self.onMapObjectAdded(event)}))},WPGMZA.InfoWindow.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.InfoWindow.prototype.constructor=WPGMZA.InfoWindow,WPGMZA.InfoWindow.OPEN_BY_CLICK=1,WPGMZA.InfoWindow.OPEN_BY_HOVER=2,WPGMZA.InfoWindow.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow}},WPGMZA.InfoWindow.createInstance=function(mapObject){return new(this.getConstructor())(mapObject)},WPGMZA.InfoWindow.prototype.getContent=function(callback){var html="";this.mapObject instanceof WPGMZA.Marker&&(html=this.mapObject.address),callback(html)},WPGMZA.InfoWindow.prototype.open=function(map,mapObject){return this.mapObject=mapObject,!WPGMZA.settings.disable_infowindows&&!this.mapObject.disableInfoWindow},WPGMZA.InfoWindow.prototype.close=function(){this.trigger("infowindowclose")},WPGMZA.InfoWindow.prototype.setContent=function(options){},WPGMZA.InfoWindow.prototype.setOptions=function(options){},WPGMZA.InfoWindow.prototype.onMapObjectAdded=function(){1==this.mapObject.settings.infoopen&&this.open()}}),jQuery(function($){WPGMZA.LatLng=function(arg,lng){if(this._lat=0,this._lng=0,0!=arguments.length)if(1==arguments.length){if("string"==typeof arg){var m;if(!(m=arg.match(WPGMZA.LatLng.REGEXP)))throw new Error("Invalid LatLng string");arg={lat:m[1],lng:m[3]}}if("object"!=typeof arg||!("lat"in arg&&"lng"in arg))throw new Error("Argument must be a LatLng literal");this.lat=arg.lat,this.lng=arg.lng}else this.lat=arg,this.lng=lng},WPGMZA.LatLng.REGEXP=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,WPGMZA.LatLng.isValid=function(obj){return"object"==typeof obj&&("lat"in obj&&"lng"in obj)},Object.defineProperty(WPGMZA.LatLng.prototype,"lat",{get:function(){return this._lat},set:function(val){if(!$.isNumeric(val))throw new Error("Latitude must be numeric");this._lat=parseFloat(val)}}),Object.defineProperty(WPGMZA.LatLng.prototype,"lng",{get:function(){return this._lng},set:function(val){if(!$.isNumeric(val))throw new Error("Longitude must be numeric");this._lng=parseFloat(val)}}),WPGMZA.LatLng.prototype.toString=function(){return this._lat+", "+this._lng},WPGMZA.LatLng.fromCurrentPosition=function(callback,options){options||(options={}),callback&&WPGMZA.getCurrentPosition(function(position){var latLng=new WPGMZA.LatLng({lat:position.coords.latitude,lng:position.coords.longitude});options.geocodeAddress?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:latLng},function(results){results.length&&(latLng.address=results[0]),callback(latLng)}):callback(latLng)})},WPGMZA.LatLng.fromGoogleLatLng=function(googleLatLng){return new WPGMZA.LatLng(googleLatLng.lat(),googleLatLng.lng())},WPGMZA.LatLng.prototype.toGoogleLatLng=function(){return new google.maps.LatLng({lat:this.lat,lng:this.lng})},WPGMZA.LatLng.prototype.toLatLngLiteral=function(){return{lat:this.lat,lng:this.lng}},WPGMZA.LatLng.prototype.moveByDistance=function(kilometers,heading){var delta=parseFloat(kilometers)/6371,theta=parseFloat(heading)/180*Math.PI,phi1=this.lat/180*Math.PI,lambda1=this.lng/180*Math.PI,sinPhi1=Math.sin(phi1),cosPhi1=Math.cos(phi1),sinDelta=Math.sin(delta),cosDelta=Math.cos(delta),sinTheta=Math.sin(theta),sinPhi2=sinPhi1*cosDelta+cosPhi1*sinDelta*Math.cos(theta),phi2=Math.asin(sinPhi2),y=sinTheta*sinDelta*cosPhi1,x=cosDelta-sinPhi1*sinPhi2,lambda2=lambda1+Math.atan2(y,x);this.lat=180*phi2/Math.PI,this.lng=180*lambda2/Math.PI},WPGMZA.LatLng.prototype.getGreatCircleDistance=function(arg1,arg2){var other,lat1=this.lat,lon1=this.lng;if(1==arguments.length)other=new WPGMZA.LatLng(arg1);else{if(2!=arguments.length)throw new Error("Invalid number of arguments");other=new WPGMZA.LatLng(arg1,arg2)}var lat2=other.lat,lon2=other.lng,phi1=lat1.toRadians(),phi2=lat2.toRadians(),deltaPhi=(lat2-lat1).toRadians(),deltaLambda=(lon2-lon1).toRadians(),a=Math.sin(deltaPhi/2)*Math.sin(deltaPhi/2)+Math.cos(phi1)*Math.cos(phi2)*Math.sin(deltaLambda/2)*Math.sin(deltaLambda/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}),jQuery(function($){WPGMZA.LatLngBounds=function(southWest,northEast){southWest&&northEast&&(this.south=southWest.lat,this.north=northEast.lat,this.west=southWest.lng,this.east=southWest.lng)},WPGMZA.LatLngBounds.prototype.isInInitialState=function(){return void 0==this.north&&void 0==this.south&&void 0==this.west&&void 0==this.east},WPGMZA.LatLngBounds.prototype.extend=function(latLng){if(latLng instanceof WPGMZA.LatLng||(latLng=new WPGMZA.LatLng(latLng)),this.isInInitialState())return this.north=this.south=latLng.lat,void(this.west=this.east=latLng.lng);latLng.lat<this.north&&(this.north=latLng.lat),latLng.lat>this.south&&(this.south=latLng.lat),latLng.lng<this.west&&(this.west=latLng.lng),latLng.lng>this.east&&(this.east=latLng.lng)},WPGMZA.LatLngBounds.prototype.extendByPixelMargin=function(map,x,arg){var y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");if(this.isInInitialState())throw new Error("Cannot extend by pixels in initial state");arguments.length>=3&&(y=arg);var southWest=new WPGMZA.LatLng(this.south,this.west),northEast=new WPGMZA.LatLng(this.north,this.east);southWest=map.latLngToPixels(southWest),northEast=map.latLngToPixels(northEast),southWest.x-=x,southWest.y+=y,northEast.x+=x,northEast.y-=y,southWest=map.pixelsToLatLng(southWest.x,southWest.y),northEast=map.pixelsToLatLng(northEast.x,northEast.y);this.toString();this.north=northEast.lat,this.south=southWest.lat,this.west=southWest.lng,this.east=northEast.lng},WPGMZA.LatLngBounds.prototype.contains=function(latLng){if(!(latLng instanceof WPGMZA.LatLng))throw new Error("Argument must be an instance of WPGMZA.LatLng");return!(latLng.lat<Math.min(this.north,this.south))&&(!(latLng.lat>Math.max(this.north,this.south))&&(this.west<this.east?latLng.lng>=this.west&&latLng.lng<=this.east:this.west<this.east?latLng.lng>=this.west||this.lng<=this.east:latLng.lng<=this.west||this.lng>=this.east))},WPGMZA.LatLngBounds.prototype.toString=function(){return this.north+"N "+this.south+"S "+this.west+"W "+this.east+"E"}}),jQuery(function($){WPGMZA.MapObject=function(row){if(WPGMZA.assertInstanceOf(this,"MapObject"),WPGMZA.EventDispatcher.call(this),this.id=-1,this.guid=WPGMZA.guid(),this.modified=!0,this.settings={},row)for(var name in row)if("settings"==name){if(null==row.settings)this.settings={};else switch(typeof row.settings){case"string":this.settings=JSON.parse(row[name]);break;case"object":this.settings=row[name];break;default:throw new Error("Don't know how to interpret settings")}for(var name in this.settings){var value=this.settings[name];String(value).match(/^-?\d+$/)&&(this.settings[name]=parseInt(value))}}else this[name]=row[name]},WPGMZA.MapObject.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MapObject.prototype.constructor=WPGMZA.MapObject,WPGMZA.MapObject.prototype.parseGeometry=function(string){var pairs,coords,results=[];pairs=string.replace(/[^ ,\d\.\-+e]/g,"").split(",");for(var i=0;i<pairs.length;i++)coords=pairs[i].split(" "),results.push({lat:parseFloat(coords[1]),lng:parseFloat(coords[0])});return results},WPGMZA.MapObject.prototype.toJSON=function(){return{id:this.id,guid:this.guid,settings:this.settings}}}),jQuery(function($){var Parent=WPGMZA.MapObject;WPGMZA.Circle=function(options,engineCircle){WPGMZA.assertInstanceOf(this,"Circle"),this.center=new WPGMZA.LatLng,this.radius=100,Parent.apply(this,arguments)},WPGMZA.Circle.prototype=Object.create(Parent.prototype),WPGMZA.Circle.prototype.constructor=WPGMZA.Circle,WPGMZA.Circle.createInstance=function(options){var constructor;switch(WPGMZA.settings.engine){case"open-layers":constructor=WPGMZA.OLCircle;break;default:constructor=WPGMZA.GoogleCircle}return new constructor(options)},WPGMZA.Circle.prototype.getCenter=function(){return this.center.clone()},WPGMZA.Circle.prototype.setCenter=function(latLng){this.center.lat=latLng.lat,this.center.lng=latLng.lng},WPGMZA.Circle.prototype.getRadius=function(){return this.radius},WPGMZA.Circle.prototype.setRadius=function(radius){this.radius=radius},WPGMZA.Circle.prototype.getMap=function(){return this.map},WPGMZA.Circle.prototype.setMap=function(map){this.map&&this.map.removeCircle(this),map&&map.addCircle(this)}}),jQuery(function($){WPGMZA.MapSettingsPage=function(){var self=this;this.updateEngineSpecificControls(),this.updateGDPRControls(),$("select[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$("input[name='wpgmza_gdpr_require_consent_before_load'], input[name='wpgmza_gdpr_require_consent_before_vgm_submit'], input[name='wpgmza_gdpr_override_notice']").on("change",function(event){self.updateGDPRControls()})},WPGMZA.MapSettingsPage.prototype.updateEngineSpecificControls=function(){var engine=$("select[name='wpgmza_maps_engine']").val();$("[data-required-maps-engine][data-required-maps-engine!='"+engine+"']").hide(),$("[data-required-maps-engine='"+engine+"']").show()},WPGMZA.MapSettingsPage.prototype.updateGDPRControls=function(){var showNoticeControls=$("input[name='wpgmza_gdpr_require_consent_before_load']").prop("checked"),vgmCheckbox=$("input[name='wpgmza_gdpr_require_consent_before_vgm_submit']");vgmCheckbox.length&&(showNoticeControls=showNoticeControls||vgmCheckbox.prop("checked"));var showOverrideTextarea=showNoticeControls&&$("input[name='wpgmza_gdpr_override_notice']").prop("checked");showNoticeControls?$("#wpgmza-gdpr-compliance-notice").show("slow"):$("#wpgmza-gdpr-compliance-notice").hide("slow"),showOverrideTextarea?$("#wpgmza_gdpr_override_notice_text").show("slow"):$("#wpgmza_gdpr_override_notice_text").hide("slow")},jQuery(function($){window.location.href.match(/wp-google-maps-menu-settings/)&&(WPGMZA.mapSettingsPage=new WPGMZA.MapSettingsPage)})}),jQuery(function($){WPGMZA.MapSettings=function(element){function addSettings(input){if(input)for(var key in input)if("other_settings"!=key){var value=input[key];String(value).match(/^-?\d+$/)&&(value=parseInt(value)),self[key]=value}}var json,self=this,str=element.getAttribute("data-settings");try{json=JSON.parse(str)}catch(e){str=str.replace(/\\%/g,"%"),str=str.replace(/\\\\"/g,'\\"');try{json=JSON.parse(str)}catch(e){json={},console.warn("Failed to parse map settings JSON")}}WPGMZA.assertInstanceOf(this,"MapSettings"),addSettings(WPGMZA.settings),addSettings(json),json&&json.other_settings&&addSettings(json.other_settings)},WPGMZA.MapSettings.prototype.toOLViewOptions=function(){var options={center:ol.proj.fromLonLat([-119.4179,36.7783]),zoom:4};if("string"==typeof this.start_location){var coords=this.start_location.replace(/^\(|\)$/g,"").split(",");WPGMZA.isLatLngString(this.start_location)?options.center=ol.proj.fromLonLat([parseFloat(coords[1]),parseFloat(coords[0])]):console.warn("Invalid start location")}return this.center&&(options.center=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)])),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options},WPGMZA.MapSettings.prototype.toGoogleMapsOptions=function(){function formatCoord(coord){return $.isNumeric(coord)?coord:parseFloat(String(coord).replace(/[\(\)\s]/,""))}var self=this,latLngCoords=this.start_location&&this.start_location.length?this.start_location.split(","):[36.7783,-119.4179],latLng=new google.maps.LatLng(formatCoord(latLngCoords[0]),formatCoord(latLngCoords[1])),zoom=this.start_zoom?parseInt(this.start_zoom):4;!this.start_zoom&&this.zoom&&(zoom=parseInt(this.zoom));var options={zoom:zoom,center:latLng};switch(function(name){return!("object"==typeof self[name]||self[name]&&self[name].length)}("center")||(options.center=new google.maps.LatLng({lat:parseFloat(this.center.lat),lng:parseFloat(this.center.lng)})),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options.zoomControl=!("yes"==this.wpgmza_settings_map_zoom),options.panControl=!("yes"==this.wpgmza_settings_map_pan),options.mapTypeControl=!("yes"==this.wpgmza_settings_map_type),options.streetViewControl=!("yes"==this.wpgmza_settings_map_streetview),options.fullscreenControl=!("yes"==this.wpgmza_settings_map_full_screen_control),options.draggable=!("yes"==this.wpgmza_settings_map_draggable),options.disableDoubleClickZoom="yes"==this.wpgmza_settings_map_clickzoom,options.scrollwheel=!("yes"==this.wpgmza_settings_map_scroll),"greedy"==this.wpgmza_force_greedy_gestures||"yes"==this.wpgmza_force_greedy_gestures?options.gestureHandling="greedy":options.gestureHandling="cooperative",parseInt(this.type)){case 2:options.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case 3:options.mapTypeId=google.maps.MapTypeId.HYBRID;break;case 4:options.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:options.mapTypeId=google.maps.MapTypeId.ROADMAP}if(this.theme_data&&this.theme_data.length>0)try{options.styles=JSON.parse(this.theme_data)}catch(e){alert("Your theme data is not valid JSON and has been ignored")}return options}}),jQuery(function($){function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Map=function(element,options){if(WPGMZA.assertInstanceOf(this,"Map"),WPGMZA.EventDispatcher.call(this),!(element instanceof HTMLElement))throw new Error("Argument must be a HTMLElement");if(this.id=element.getAttribute("data-map-id"),!/\d+/.test(this.id))throw new Error("Map ID must be an integer");if(WPGMZA.maps.push(this),this.element=element,this.element.wpgmzaMap=this,this.engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.loadSettings(options),this.shortcodeAttributes={},$(this.element).attr("data-shortcode-attributes"))try{this.shortcodeAttributes=JSON.parse($(this.element).attr("data-shortcode-attributes"))}catch(e){console.warn("Error parsing shortcode attributes")}this.initStoreLocator(),this.markerFilter=WPGMZA.MarkerFilter.createInstance(this)},WPGMZA.Map.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.Map.prototype.constructor=WPGMZA.Map,WPGMZA.Map.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap}},WPGMZA.Map.createInstance=function(element,options){return new(WPGMZA.Map.getConstructor())(element,options)},WPGMZA.Map.prototype.loadSettings=function(options){var settings=new WPGMZA.MapSettings(this.element);settings.other_settings;if(delete settings.other_settings,options)for(var key in options)settings[key]=options[key];this.settings=settings},WPGMZA.Map.prototype.initStoreLocator=function(){var storeLocatorElement=$(".wpgmza_sl_main_div");storeLocatorElement.length&&(this.storeLocator=WPGMZA.StoreLocator.createInstance(this,storeLocatorElement[0]))},WPGMZA.Map.prototype.setOptions=function(options){for(var name in options)this.settings[name]=options[name]};Math.PI;WPGMZA.Map.getGeographicDistance=function(lat1,lon1,lat2,lon2){var dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},WPGMZA.Map.prototype.setCenter=function(latLng){if(!("lat"in latLng&&"lng"in latLng))throw new Error("Argument is not an object with lat and lng")},WPGMZA.Map.prototype.setDimensions=function(width,height){$(this.element).css({width:width}),$(this.engineElement).css({width:"100%",height:height})},WPGMZA.Map.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map=this,marker.parent=this,this.markers.push(marker),this.dispatchEvent({type:"markeradded",marker:marker}),marker.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");if(marker.map!==this)throw new Error("Wrong map error");marker.map=null,marker.parent=null,this.markers.splice(this.markers.indexOf(marker),1),this.dispatchEvent({type:"markerremoved",marker:marker}),marker.dispatchEvent({type:"removed"})},WPGMZA.Map.prototype.getMarkerByID=function(id){for(var i=0;i<this.markers.length;i++)if(this.markers[i].id==id)return this.markers[i];return null},WPGMZA.Map.prototype.removeMarkerByID=function(id){var marker=this.getMarkerByID(id);marker&&this.removeMarker(marker)},WPGMZA.Map.prototype.addPolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");polygon.map=this,this.polygons.push(polygon),this.dispatchEvent({type:"polygonadded",polygon:polygon})},WPGMZA.Map.prototype.deletePolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");if(polygon.map!==this)throw new Error("Wrong map error");polygon.map=null,this.polygons.splice(this.polygons.indexOf(polygon),1),this.dispatchEvent({type:"polygonremoved",polygon:polygon})},WPGMZA.Map.prototype.getPolygonByID=function(id){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i].id==id)return this.polygons[i];return null},WPGMZA.Map.prototype.deletePolygonByID=function(id){var polygon=this.getPolygonByID(id);polygon&&this.deletePolygon(polygon)},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.addPolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");polyline.map=this,this.polylines.push(polyline),this.dispatchEvent({type:"polylineadded",polyline:polyline})},WPGMZA.Map.prototype.deletePolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");if(polyline.map!==this)throw new Error("Wrong map error");polyline.map=null,this.polylines.splice(this.polylines.indexOf(polyline),1),this.dispatchEvent({type:"polylineremoved",polyline:polyline})},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.deletePolylineByID=function(id){var polyline=this.getPolylineByID(id);polyline&&this.deletePolyline(polyline)},WPGMZA.Map.prototype.addCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");circle.map=this,this.circles.push(circle),this.dispatchEvent({type:"circleadded",circle:circle})},WPGMZA.Map.prototype.removeCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");if(circle.map!==this)throw new Error("Wrong map error");circle.map=null,this.circles.splice(this.circles.indexOf(circle),1),this.dispatchEvent({type:"circleremoved",circle:circle})},WPGMZA.Map.prototype.getCircleByID=function(id){for(var i=0;i<this.circles.length;i++)if(this.circles[i].id==id)return this.circles[i];return null},WPGMZA.Map.prototype.deleteCircleByID=function(id){var circle=this.getCircleByID(id);circle&&this.deleteCircle(circle)},WPGMZA.Map.prototype.nudge=function(x,y){var pixels=this.latLngToPixels(this.getCenter());if(pixels.x+=parseFloat(x),pixels.y+=parseFloat(y),isNaN(pixels.x)||isNaN(pixels.y))throw new Error("Invalid coordinates supplied");var latLng=this.pixelsToLatLng(pixels);this.setCenter(latLng)},WPGMZA.Map.prototype.onWindowResize=function(event){},WPGMZA.Map.prototype.onElementResized=function(event){},WPGMZA.Map.prototype.onBoundsChanged=function(event){this.trigger("boundschanged"),this.trigger("bounds_changed")},WPGMZA.Map.prototype.onIdle=function(event){this.trigger("idle")}}),jQuery(function($){WPGMZA.MapsEngineDialog=function(element){var self=this;this.element=element,window.wpgmzaUnbindSaveReminder&&window.wpgmzaUnbindSaveReminder(),$(element).show(),$(element).remodal().open(),$(element).find("input:radio").on("change",function(event){$("#wpgmza-confirm-engine").prop("disabled",!1)}),$("#wpgmza-confirm-engine").on("click",function(event){self.onButtonClicked(event)})},WPGMZA.MapsEngineDialog.prototype.onButtonClicked=function(event){$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_engine_dialog_set_engine",engine:$("[name='wpgmza_maps_engine']:checked").val()},success:function(response,status,xhr){window.location.reload()}})},$(window).on("load",function(event){var element=$("#wpgmza-maps-engine-dialog");element.length&&(WPGMZA.settings.wpgmza_maps_engine_dialog_done||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||(WPGMZA.mapsEngineDialog=new WPGMZA.MapsEngineDialog(element)))})}),jQuery(function($){WPGMZA.MarkerFilter=function(map){WPGMZA.EventDispatcher.call(this),this.map=map},WPGMZA.MarkerFilter.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerFilter.prototype.constructor=WPGMZA.MarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.MarkerFilter(map)},WPGMZA.MarkerFilter.prototype.getFilteringParameters=function(){var params={map_id:this.map.id};return this.map.storeLocator&&(params=$.extend(params,this.map.storeLocator.getFilteringParameters())),params},WPGMZA.MarkerFilter.prototype.update=function(){},WPGMZA.MarkerFilter.prototype.onFilteringComplete=function(results){}}),jQuery(function($){WPGMZA.Marker=function(row){var self=this;this._offset={x:0,y:0},WPGMZA.assertInstanceOf(this,"Marker"),this.lat="36.778261",this.lng="-119.4179323999",this.address="California",this.title=null,this.description="",this.link="",this.icon="",this.approved=1,this.pic=null,this.disableInfoWindow=!1,WPGMZA.MapObject.apply(this,arguments),row&&row.heatmap||(row&&this.on("init",function(event){row.position&&this.setPosition(row.position),row.map&&row.map.addMarker(this)}),this.addEventListener("added",function(event){self.onAdded(event)}))},WPGMZA.Marker.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Marker.prototype.constructor=WPGMZA.Marker,WPGMZA.Marker.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker}},WPGMZA.Marker.createInstance=function(row){return new(WPGMZA.Marker.getConstructor())(row)},WPGMZA.Marker.ANIMATION_NONE="0",WPGMZA.Marker.ANIMATION_BOUNCE="1",WPGMZA.Marker.ANIMATION_DROP="2",Object.defineProperty(WPGMZA.Marker.prototype,"offsetX",{get:function(){return this._offset.x},set:function(value){this._offset.x=value,this.updateOffset()}}),Object.defineProperty(WPGMZA.Marker.prototype,"offsetY",{get:function(){return this._offset.y},set:function(value){this._offset.y=value,this.updateOffset()}}),WPGMZA.Marker.prototype.onAdded=function(event){var self=this;this.addEventListener("click",function(event){self.onClick(event)}),this.addEventListener("mouseover",function(event){self.onMouseOver(event)}),this.addEventListener("select",function(event){self.onSelect(event)}),this.map.settings.marker==this.id&&self.trigger("select"),"1"==this.infoopen&&this.openInfoWindow()},WPGMZA.Marker.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.Marker.prototype.openInfoWindow=function(){this.map?(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),this.map.lastInteractedMarker=this,this.initInfoWindow(),this.infoWindow.open(this.map,this)):console.warn("Cannot open infowindow for marker with no map")},WPGMZA.Marker.prototype.onClick=function(event){},WPGMZA.Marker.prototype.onSelect=function(event){this.openInfoWindow()},WPGMZA.Marker.prototype.onMouseOver=function(event){this.map.settings.info_window_open_by==WPGMZA.InfoWindow.OPEN_BY_HOVER&&this.openInfoWindow()},WPGMZA.Marker.prototype.getIcon=function(){function stripProtocol(url){return"string"!=typeof url?url:url.replace(/^http(s?):/,"")}return stripProtocol(WPGMZA.defaultMarkerIcon?WPGMZA.defaultMarkerIcon:WPGMZA.settings.default_marker_icon)},WPGMZA.Marker.prototype.getPosition=function(){return new WPGMZA.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})},WPGMZA.Marker.prototype.setPosition=function(latLng){latLng instanceof WPGMZA.LatLng?(this.lat=latLng.lat,this.lng=latLng.lng):(this.lat=parseFloat(latLng.lat),this.lng=parseFloat(latLng.lng))},WPGMZA.Marker.prototype.setOffset=function(x,y){this._offset.x=x,this._offset.y=y,this.updateOffset()},WPGMZA.Marker.prototype.updateOffset=function(){},WPGMZA.Marker.prototype.getAnimation=function(animation){return this.settings.animation},WPGMZA.Marker.prototype.setAnimation=function(animation){this.settings.animation=animation},WPGMZA.Marker.prototype.getVisible=function(){},WPGMZA.Marker.prototype.setVisible=function(visible){!visible&&this.infoWindow&&this.infoWindow.close()},WPGMZA.Marker.prototype.getMap=function(){return this.map},WPGMZA.Marker.prototype.setMap=function(map){map?map.addMarker(this):this.map&&this.map.removeMarker(this),this.map=map},WPGMZA.Marker.prototype.getDraggable=function(){},WPGMZA.Marker.prototype.setDraggable=function(draggable){},WPGMZA.Marker.prototype.setOptions=function(options){},WPGMZA.Marker.prototype.setOpacity=function(opacity){},WPGMZA.Marker.prototype.panIntoView=function(){if(!this.map)throw new Error("Marker hasn't been added to a map");this.map.setCenter(this.getPosition())},WPGMZA.Marker.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this),position=this.getPosition();return $.extend(result,{lat:position.lat,lng:position.lng,address:this.address,title:this.title,description:this.description,link:this.link,icon:this.icon,pic:this.pic,approved:this.approved}),result}}),jQuery(function($){WPGMZA.ModernStoreLocatorCircle=function(map_id,settings){var map;map=WPGMZA.isProVersion()?this.map=MYMAP[map_id].map:this.map=MYMAP.map,this.map_id=map_id,this.mapElement=map.element,this.mapSize={width:$(this.mapElement).width(),height:$(this.mapElement).height()},this.initCanvasLayer(),this.settings={center:new WPGMZA.LatLng(0,0),radius:1,color:"#63AFF2",shadowColor:"white",shadowBlur:4,centerRingRadius:10,centerRingLineWidth:3,numInnerRings:9,innerRingLineWidth:1,innerRingFade:!0,numOuterRings:7,ringLineWidth:1,mainRingLineWidth:2,numSpokes:6,spokesStartAngle:Math.PI/2,numRadiusLabels:6,radiusLabelsStartAngle:Math.PI/2,radiusLabelFont:"13px sans-serif",visible:!1},settings&&this.setOptions(settings)},WPGMZA.ModernStoreLocatorCircle.createInstance=function(map,settings){return"google-maps"==WPGMZA.settings.engine?new WPGMZA.GoogleModernStoreLocatorCircle(map,settings):new WPGMZA.OLModernStoreLocatorCircle(map,settings)},WPGMZA.ModernStoreLocatorCircle.prototype.initCanvasLayer=function(){},WPGMZA.ModernStoreLocatorCircle.prototype.onResize=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.onUpdate=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.setOptions=function(options){for(var name in options){var functionName="set"+name.substr(0,1).toUpperCase()+name.substr(1);"function"==typeof this[functionName]?this[functionName](options[name]):this.settings[name]=options[name]}},WPGMZA.ModernStoreLocatorCircle.prototype.getResolutionScale=function(){return window.devicePixelRatio||1},WPGMZA.ModernStoreLocatorCircle.prototype.getCenter=function(){return this.getPosition()},WPGMZA.ModernStoreLocatorCircle.prototype.setCenter=function(value){this.setPosition(value)},WPGMZA.ModernStoreLocatorCircle.prototype.getPosition=function(){return this.settings.center},WPGMZA.ModernStoreLocatorCircle.prototype.setPosition=function(position){this.settings.center=position},WPGMZA.ModernStoreLocatorCircle.prototype.getRadius=function(){return this.settings.radius},WPGMZA.ModernStoreLocatorCircle.prototype.setRadius=function(radius){if(isNaN(radius))throw new Error("Invalid radius");this.settings.radius=radius},WPGMZA.ModernStoreLocatorCircle.prototype.getVisible=function(){return this.settings.visible},WPGMZA.ModernStoreLocatorCircle.prototype.setVisible=function(visible){this.settings.visible=visible},WPGMZA.ModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getContext=function(type){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.validateSettings=function(){WPGMZA.isHexColorString(this.settings.color)||(this.settings.color="#63AFF2")},WPGMZA.ModernStoreLocatorCircle.prototype.draw=function(){this.validateSettings();var settings=this.settings,canvasDimensions=this.getCanvasDimensions(),canvasWidth=canvasDimensions.width,canvasHeight=canvasDimensions.height;this.map,this.getResolutionScale();if(context=this.getContext("2d"),context.clearRect(0,0,canvasWidth,canvasHeight),settings.visible){context.shadowColor=settings.shadowColor,context.shadowBlur=settings.shadowBlur,context.setTransform(1,0,0,1,0,0);var scale=this.getScale();context.scale(scale,scale);var offset=this.getWorldOriginOffset();context.translate(offset.x,offset.y);new WPGMZA.LatLng(this.settings.center);var worldPoint=this.getCenterPixels(),rgba=WPGMZA.hexToRgba(settings.color),ringSpacing=this.getTransformedRadius(settings.radius)/(settings.numInnerRings+1);context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.centerRingRadius)/scale,0,2*Math.PI),context.stroke(),context.closePath();var end,spokeAngle,radius=this.getTransformedRadius(settings.radius)+ringSpacing*settings.numOuterRings+1,grad=context.createRadialGradient(0,0,0,0,0,radius),rgba=WPGMZA.hexToRgba(settings.color),start=WPGMZA.rgbaToString(rgba);rgba.a=0,end=WPGMZA.rgbaToString(rgba),grad.addColorStop(0,start),grad.addColorStop(1,end),context.save(),context.translate(worldPoint.x,worldPoint.y),context.strokeStyle=grad,context.lineWidth=2/scale;for(i=0;i<settings.numSpokes;i++)spokeAngle=settings.spokesStartAngle+2*Math.PI*(i/settings.numSpokes),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.setLineDash([2/scale,15/scale]),context.beginPath(),context.moveTo(0,0),context.lineTo(x,y),context.stroke();context.setLineDash([]),context.restore(),context.lineWidth=1/scale*settings.innerRingLineWidth;for(i=1;i<=settings.numInnerRings;i++){radius=i*ringSpacing;settings.innerRingFade&&(rgba.a=1-(i-1)/settings.numInnerRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath()}context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.radius),0,2*Math.PI),context.stroke(),context.closePath();for(var radius=radius+ringSpacing,i=0;i<settings.numOuterRings;i++)settings.innerRingFade&&(rgba.a=1-i/settings.numOuterRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath(),radius+=ringSpacing;if(settings.numRadiusLabels>0){var m,x,y,radius=this.getTransformedRadius(settings.radius);(m=settings.radiusLabelFont.match(/(\d+)px/))&&parseInt(m[1])/2*1.1/scale,context.font=settings.radiusLabelFont,context.textAlign="center",context.textBaseline="middle",context.fillStyle=settings.color,context.save(),context.translate(worldPoint.x,worldPoint.y);for(i=0;i<settings.numRadiusLabels;i++){var width,textAngle=(spokeAngle=settings.radiusLabelsStartAngle+2*Math.PI*(i/settings.numRadiusLabels))+Math.PI/2,text=settings.radiusString;Math.sin(spokeAngle)>0&&(textAngle-=Math.PI),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.save(),context.translate(x,y),context.rotate(textAngle),context.scale(1/scale,1/scale),width=context.measureText(text).width,height=width/2,context.clearRect(-width,-height,2*width,2*height),context.fillText(settings.radiusString,0,0),context.restore()}context.restore()}}}}),jQuery(function($){WPGMZA.ModernStoreLocator=function(map_id){var original,self=this,map=WPGMZA.getMapByID(map_id);if(WPGMZA.assertInstanceOf(this,"ModernStoreLocator"),(original=WPGMZA.isProVersion()?$(".wpgmza_sl_search_button[mid='"+map_id+"']").closest(".wpgmza_sl_main_div"):$(".wpgmza_sl_search_button").closest(".wpgmza_sl_main_div")).length){this.element=$("<div class='wpgmza-modern-store-locator'><div class='wpgmza-inner wpgmza-modern-hover-opaque'/></div>")[0];var inner=$(this.element).find(".wpgmza-inner"),titleSearch=$(original).find("[id='nameInput_"+map_id+"']");if(titleSearch.length){var placeholder=wpgmaps_localize[map_id].other_settings.store_locator_name_string;placeholder&&placeholder.length&&titleSearch.attr("placeholder",placeholder),inner.append(titleSearch)}var addressInput;addressInput=WPGMZA.isProVersion()?$(original).find(".addressInput"):$(original).find("#addressInput"),wpgmaps_localize[map_id].other_settings.store_locator_query_string&&wpgmaps_localize[map_id].other_settings.store_locator_query_string.length&&addressInput.attr("placeholder",wpgmaps_localize[map_id].other_settings.store_locator_query_string),inner.append(addressInput);var button;(button=$(original).find("button.wpgmza-use-my-location"))&&inner.append(button),$(addressInput).on("keydown",function(event){13==event.keyCode&&self.searchButton.is(":visible")&&self.searchButton.trigger("click")}),$(addressInput).on("input",function(event){self.searchButton.show(),self.resetButton.hide()}),inner.append($(original).find("select.wpgmza_sl_radius_select")),this.searchButton=$(original).find(".wpgmza_sl_search_button"),inner.append(this.searchButton),this.resetButton=$(original).find(".wpgmza_sl_reset_button_div"),inner.append(this.resetButton),this.resetButton.on("click",function(event){resetLocations(map_id)}),this.resetButton.hide(),WPGMZA.isProVersion()&&(this.searchButton.on("click",function(event){0!=$("addressInput_"+map_id).val()&&(self.searchButton.hide(),self.resetButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_APPLIED)}),this.resetButton.on("click",function(event){self.resetButton.hide(),self.searchButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_INITIAL})),inner.append($("#wpgmza_distance_type_"+map_id));var container=$(original).find(".wpgmza_cat_checkbox_holder"),numCategories=($(container).children("ul"),0),icons=[];$(container).find("li").each(function(index,el){var id=$(el).attr("class").match(/\d+/);for(var category_id in wpgmza_category_data)if(id==category_id){var src=wpgmza_category_data[category_id].image,icon=$('<div class="wpgmza-chip-icon"/>');icon.css({"background-image":"url('"+src+"')",width:$("#wpgmza_cat_checkbox_"+category_id+" + label").height()+"px"}),icons.push(icon),null!=src&&""!=src&&$("#wpgmza_cat_checkbox_"+category_id+" + label").prepend(icon),numCategories++;break}}),$(this.element).append(container),numCategories&&(this.optionsButton=$('<span class="wpgmza_store_locator_options_button"><i class="fa fa-list"></i></span>'),$(this.searchButton).before(this.optionsButton)),setInterval(function(){icons.forEach(function(icon){var height=$(icon).height();$(icon).css({width:height+"px"}),$(icon).closest("label").css({"padding-left":height+8+"px"})}),$(container).css("width",$(self.element).find(".wpgmza-inner").outerWidth()+"px")},1e3),$(this.element).find(".wpgmza_store_locator_options_button").on("click",function(event){container.hasClass("wpgmza-open")?container.removeClass("wpgmza-open"):container.addClass("wpgmza-open")}),$(original).remove(),$(this.element).find("input, select").on("focus",function(){$(inner).addClass("active")}),$(this.element).find("input, select").on("blur",function(){$(inner).removeClass("active")})}},WPGMZA.ModernStoreLocator.createInstance=function(map_id){return"google-maps"==WPGMZA.settings.engine?new WPGMZA.GoogleModernStoreLocator(map_id):new WPGMZA.OLModernStoreLocator(map_id)}}),jQuery(function($){WPGMZA.NativeMapsAppIcon=function(){navigator.userAgent.match(/^Apple|iPhone|iPad|iPod/)?(this.type="apple",this.element=$('<span><i class="fab fa-apple" aria-hidden="true"></i></span>')):(this.type="google",this.element=$('<span><i class="fab fa-google" aria-hidden="true"></i></span>'))}}),jQuery(function($){WPGMZA.Polygon=function(row,enginePolygon){WPGMZA.assertInstanceOf(this,"Polygon"),this.paths=null,this.title=null,this.name=null,this.link=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polygon.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polygon.prototype.constructor=WPGMZA.Polygon,WPGMZA.Polygon.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon}},WPGMZA.Polygon.createInstance=function(row,engineObject){return new(WPGMZA.Polygon.getConstructor())(row,engineObject)},WPGMZA.Polygon.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return $.extend(result,{name:this.name,title:this.title,link:this.link}),result}}),jQuery(function($){WPGMZA.Polyline=function(row,googlePolyline){WPGMZA.assertInstanceOf(this,"Polyline"),this.title=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polyline.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polyline.prototype.constructor=WPGMZA.Polyline,WPGMZA.Polyline.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLPolyline;default:return WPGMZA.GooglePolyline}},WPGMZA.Polyline.createInstance=function(row,engineObject){return new(WPGMZA.Polyline.getConstructor())(row,engineObject)},WPGMZA.Polyline.prototype.getPoints=function(){return this.toJSON().points},WPGMZA.Polyline.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return result.title=this.title,result}}),jQuery(function($){WPGMZA.PopoutPanel=function(){},WPGMZA.PopoutPanel.prototype.open=function(){$(this.element).addClass("wpgmza-open")},WPGMZA.PopoutPanel.prototype.close=function(){$(this.element).removeClass("wpgmza-open")}}),jQuery(function($){WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl},WPGMZA.RestAPI.createInstance=function(){return new WPGMZA.RestAPI},WPGMZA.RestAPI.prototype.call=function(route,params){if("string"!=typeof route||!route.match(/^\//))throw new Error("Invalid route");return WPGMZA.RestAPI.URL.match(/\/$/)&&(route=route.replace(/^\//,"")),params||(params={}),params.beforeSend=function(xhr){xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce)},params.error||(params.error=function(xhr,status,message){throw new Error(message)}),$.ajax(WPGMZA.RestAPI.URL+route,params)}}),jQuery(function($){WPGMZA.StoreLocator=function(map,element){var self=this;WPGMZA.EventDispatcher.call(this),this._center=null,this.map=map,this.element=element,this.state=WPGMZA.StoreLocator.STATE_INITIAL,this.map.on("storelocatorgeocodecomplete",function(event){self.onGeocodeComplete(event)}),$(document.body).on("click",".wpgmza_sl_search_button_"+map.id,function(event){self.onSearch(event)}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map.id,function(event){self.onReset(event)})},WPGMZA.StoreLocator.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.StoreLocator.prototype.constructor=WPGMZA.StoreLocator,WPGMZA.StoreLocator.STATE_INITIAL="initial",WPGMZA.StoreLocator.STATE_APPLIED="applied",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.StoreLocator(map,element)},Object.defineProperty(WPGMZA.StoreLocator.prototype,"radius",{get:function(){return $("#radiusSelect_"+this.map.id).val()}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"center",{get:function(){return this._center}}),WPGMZA.StoreLocator.prototype.onGeocodeComplete=function(event){event.results&&event.results.length?this._center=new WPGMZA.LatLng(event.results[0].latLng):this._center=null,this.map.markerFilter.update()},WPGMZA.StoreLocator.prototype.onSearch=function(event){this.state=WPGMZA.StoreLocator.STATE_APPLIED},WPGMZA.StoreLocator.prototype.onReset=function(event){this.state=WPGMZA.StoreLocator.STATE_INITIAL,this._center=null,this.map.markerFilter.update()},WPGMZA.StoreLocator.prototype.getFilteringParameters=function(){return this.center?{center:this.center,radius:this.radius}:{}}}),jQuery(function($){WPGMZA.Text=function(options){if(options)for(var name in options)this[name]=options[name]},WPGMZA.Text.createInstance=function(options){return WPGMZA.settings.engine,new WPGMZA.Text(options)}}),jQuery(function($){function isPositiveInteger(x){return/^\d+$/.test(x)}function validateParts(parts){for(var i=0;i<parts.length;++i)if(!isPositiveInteger(parts[i]))return!1;return!0}WPGMZA.Version=function(){},WPGMZA.Version.GREATER_THAN=1,WPGMZA.Version.EQUAL_TO=0,WPGMZA.Version.LESS_THAN=-1,WPGMZA.Version.compare=function(v1,v2){var v1parts=v1.split("."),v2parts=v2.split(".");if(!validateParts(v1parts)||!validateParts(v2parts))return NaN;for(var i=0;i<v1parts.length;++i){if(v2parts.length===i)return 1;if(v1parts[i]!==v2parts[i])return v1parts[i]>v2parts[i]?1:-1}return v1parts.length!=v2parts.length?-1:0}}),jQuery(function($){WPGMZA.Integration={},WPGMZA.integrationModules={}}),jQuery(function($){if(window.wp&&wp.i18n&&wp.blocks&&wp.editor&&wp.components){var __=wp.i18n.__,registerBlockType=wp.blocks.registerBlockType,_wp$editor=wp.editor,InspectorControls=_wp$editor.InspectorControls,_wp$components=(_wp$editor.BlockControls,wp.components),Dashicon=_wp$components.Dashicon,PanelBody=(_wp$components.Toolbar,_wp$components.Button,_wp$components.Tooltip,_wp$components.PanelBody);_wp$components.TextareaControl,_wp$components.CheckboxControl,_wp$components.TextControl,_wp$components.SelectControl,_wp$components.RichText;WPGMZA.Integration.Gutenberg=function(){registerBlockType("gutenberg-wpgmza/block",this.getBlockDefinition())},WPGMZA.Integration.Gutenberg.prototype.getBlockTitle=function(){return __("WP Google Maps")},WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls=function(props){return React.createElement(InspectorControls,{key:"inspector"},React.createElement(PanelBody,{title:__("Map Settings")},React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:WPGMZA.adminurl+"admin.php?page=wp-google-maps-menu&action=edit&map_id=1",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-pencil-square-o","aria-hidden":"true"}),__("Go to Map Editor"))),React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:"https://www.wpgmaps.com/documentation/creating-your-first-map/",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-book","aria-hidden":"true"}),__("View Documentation")))))},WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes=function(){return{}},WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition=function(props){var _this=this;return{title:__("WP Google Maps"),description:__("The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss."),category:"common",icon:"location-alt",keywords:[__("Map"),__("Maps"),__("Google")],attributes:this.getBlockAttributes(),edit:function(props){return[!!props.isSelected&&_this.getBlockInspectorControls(props),React.createElement("div",{className:props.className+" wpgmza-gutenberg-block"},React.createElement(Dashicon,{icon:"location-alt"}),React.createElement("span",{class:"wpgmza-gutenberg-block-title"},__("Your map will appear here on your websites front end")))]},save:function(props){return null}}},WPGMZA.Integration.Gutenberg.getConstructor=function(){return WPGMZA.Integration.Gutenberg},WPGMZA.Integration.Gutenberg.createInstance=function(){return new(WPGMZA.Integration.Gutenberg.getConstructor())},WPGMZA.isProVersion()||/^6/.test(WPGMZA.pro_version)||(WPGMZA.integrationModules.gutenberg=WPGMZA.Integration.Gutenberg.createInstance())}}),jQuery(function($){WPGMZA.GoogleUICompatibility=function(){if(!(navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"))){var style=$("<style id='wpgmza-google-ui-compatiblity-fix'/>");style.html(".wpgmza_map img:not(button img) { padding:0 !important; }"),$(document.head).append(style)}},WPGMZA.googleUICompatibility=new WPGMZA.GoogleUICompatibility}),jQuery(function($){WPGMZA.GoogleCircle=function(options,googleCircle){var self=this;if(WPGMZA.Circle.call(this,options,googleCircle),googleCircle?this.googleCircle=googleCircle:(this.googleCircle=new google.maps.Circle,this.googleCircle.wpgmzaCircle=this),google.maps.event.addListener(this.googleCircle,"click",function(){self.dispatchEvent({type:"click"})}),options){var googleOptions={};delete(googleOptions=$.extend({},options)).map,delete googleOptions.center,options.center&&(googleOptions.center=new google.maps.LatLng({lat:options.center.lat,lng:options.center.lng})),this.googleCircle.setOptions(googleOptions),options.map&&options.map.addCircle(this)}},WPGMZA.GoogleCircle.prototype=Object.create(WPGMZA.Circle.prototype),WPGMZA.GoogleCircle.prototype.constructor=WPGMZA.GoogleCircle,WPGMZA.GoogleCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.googleCircle.setCenter(center)},WPGMZA.GoogleCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.googleCircle.setRadius(1e3*parseFloat(radius))},WPGMZA.GoogleCircle.prototype.setVisible=function(visible){this.googleCircle.setVisible(!!visible)}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress=function(options,callback){if(!options||!options.address)throw new Error("No address specified");if(WPGMZA.isLatLngString(options.address))return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this,options,callback);options.country&&(options.componentRestrictions={country:options.country}),(new google.maps.Geocoder).geocode(options,function(results,status){if(status==google.maps.GeocoderStatus.OK){var location=results[0].geometry.location,latLng={lat:location.lat(),lng:location.lng()};callback(results=[{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng}],WPGMZA.Geocoder.SUCCESS)}else{var nativeStatus=WPGMZA.Geocoder.FAIL;status==google.maps.GeocoderStatus.ZERO_RESULTS&&(nativeStatus=WPGMZA.Geocoder.ZERO_RESULTS),callback(null,nativeStatus)}})},WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng=function(options,callback){if(!options||!options.latLng)throw new Error("No latLng specified");var latLng=new WPGMZA.LatLng(options.latLng),geocoder=new google.maps.Geocoder;delete(options=$.extend(options,{location:{lat:latLng.lat,lng:latLng.lng}})).latLng,geocoder.geocode(options,function(results,status){"OK"!==status&&callback(null,WPGMZA.Geocoder.FAIL),results&&results.length||callback([],WPGMZA.Geocoder.NO_RESULTS),callback([results[0].formatted_address],WPGMZA.Geocoder.SUCCESS)})}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&window.google&&window.google.maps&&(WPGMZA.GoogleHTMLOverlay=function(map){this.element=$("<div class='wpgmza-google-html-overlay'></div>"),this.visible=!0,this.position=new WPGMZA.LatLng,this.setMap(map.googleMap),this.wpgmzaMap=map},WPGMZA.GoogleHTMLOverlay.prototype=new google.maps.OverlayView,WPGMZA.GoogleHTMLOverlay.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.element[0])},WPGMZA.GoogleHTMLOverlay.prototype.onRemove=function(){this.element&&$(this.element).parent().length&&($(this.element).remove(),this.element=null)},WPGMZA.GoogleHTMLOverlay.prototype.draw=function(){this.updateElementPosition()},WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition=function(){var projection=this.getProjection();if(projection){var pixels=projection.fromLatLngToDivPixel(this.position.toGoogleLatLng());$(this.element).css({left:pixels.x,top:pixels.y})}})}),jQuery(function($){var Parent;WPGMZA.GoogleInfoWindow=function(mapObject){Parent.call(this,mapObject),this.setMapObject(mapObject)},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.GoogleInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.GoogleInfoWindow.prototype.constructor=WPGMZA.GoogleInfoWindow,WPGMZA.GoogleInfoWindow.prototype.setMapObject=function(mapObject){mapObject instanceof WPGMZA.Marker?this.googleObject=mapObject.googleMarker:mapObject instanceof WPGMZA.Polygon?this.googleObject=mapObject.googlePolygon:mapObject instanceof WPGMZA.Polyline&&(this.googleObject=mapObject.googlePolyline)},WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow=function(){var self=this;this.googleInfoWindow||(this.googleInfoWindow=new google.maps.InfoWindow,google.maps.event.addListener(this.googleInfoWindow,"closeclick",function(event){self.mapObject.map.trigger("infowindowclose")}))},WPGMZA.GoogleInfoWindow.prototype.open=function(map,mapObject){var self=this;if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.createGoogleInfoWindow(),this.setMapObject(mapObject),this.googleInfoWindow.open(this.mapObject.map.googleMap,this.googleObject);var guid=WPGMZA.guid(),html="<div id='"+guid+"'>"+this.content+"</div>";this.googleInfoWindow.setContent(html);var intervalID;return intervalID=setInterval(function(event){div=$("#"+guid),div.length&&(div[0].wpgmzaMapObject=self.mapObject,self.element=div[0],self.trigger("infowindowopen"),clearInterval(intervalID))},50),!0},WPGMZA.GoogleInfoWindow.prototype.close=function(){this.googleInfoWindow&&(WPGMZA.InfoWindow.prototype.close.call(this),this.googleInfoWindow.close())},WPGMZA.GoogleInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html,this.createGoogleInfoWindow(),this.googleInfoWindow.setContent(html)},WPGMZA.GoogleInfoWindow.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.createGoogleInfoWindow(),this.googleInfoWindow.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMap=function(element,options){var self=this;if(Parent.call(this,element,options),!window.google){var status=WPGMZA.googleAPIStatus,message="Google API not loaded";if(status&&status.message&&(message+=" - "+status.message),"USER_CONSENT_NOT_GIVEN"==status.code)return;throw $(element).html("<div class='notice notice-error'><p>"+WPGMZA.localized_strings.google_api_not_loaded+"<pre>"+message+"</pre></p></div>"),new Error(message)}this.loadGoogleMap(),options&&this.setOptions(options),google.maps.event.addListener(this.googleMap,"click",function(event){var wpgmzaEvent=new WPGMZA.Event("click");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"rightclick",function(event){var wpgmzaEvent=new WPGMZA.Event("rightclick");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"dragend",function(event){self.dispatchEvent("dragend")}),google.maps.event.addListener(this.googleMap,"zoom_changed",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged")}),google.maps.event.addListener(this.googleMap,"idle",function(event){self.onIdle(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}))},WPGMZA.isProVersion()?(Parent=WPGMZA.ProMap,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.ProMap.prototype)):(Parent=WPGMZA.Map,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.Map.prototype)),WPGMZA.GoogleMap.prototype.constructor=WPGMZA.GoogleMap,WPGMZA.GoogleMap.prototype.loadGoogleMap=function(){var self=this,options=this.settings.toGoogleMapsOptions();this.googleMap=new google.maps.Map(this.engineElement,options),google.maps.event.addListener(this.googleMap,"bounds_changed",function(){self.onBoundsChanged()}),1==this.settings.bicycle&&this.enableBicycleLayer(!0),1==this.settings.traffic&&this.enableTrafficLayer(!0),1==this.settings.transport&&this.enablePublicTransportLayer(!0),this.showPointsOfInterest(this.settings.show_point_of_interest),$(this.engineElement).append($(this.element).find(".wpgmza-loader"))},WPGMZA.GoogleMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options);var converted=$.extend(options,this.settings.toGoogleMapsOptions()),clone=$.extend({},converted);if(!clone.center instanceof google.maps.LatLng&&(clone.center instanceof WPGMZA.LatLng||"object"==typeof clone.center)&&(clone.center={lat:parseFloat(clone.center.lat),lng:parseFloat(clone.center.lng)}),"1"==this.settings.hide_point_of_interest){clone.styles||(clone.styles=[]),clone.styles.push({featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]})}this.googleMap.setOptions(clone)},WPGMZA.GoogleMap.prototype.addMarker=function(marker){marker.googleMarker.setMap(this.googleMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.removeMarker=function(marker){marker.googleMarker.setMap(null),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.addPolygon=function(polygon){polygon.googlePolygon.setMap(this.googleMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.removePolygon=function(polygon){polygon.googlePolygon.setMap(null),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.addPolyline=function(polyline){polyline.googlePolyline.setMap(this.googleMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.removePolyline=function(polyline){polyline.googlePolyline.setMap(null),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.addCircle=function(circle){circle.googleCircle.setMap(this.googleMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.removeCircle=function(circle){circle.googleCircle.setMap(null),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.getCenter=function(){var latLng=this.googleMap.getCenter();return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),latLng instanceof WPGMZA.LatLng?this.googleMap.setCenter({lat:latLng.lat,lng:latLng.lng}):this.googleMap.setCenter(latLng)},WPGMZA.GoogleMap.prototype.panTo=function(latLng){latLng instanceof WPGMZA.LatLng?this.googleMap.panTo({lat:latLng.lat,lng:latLng.lng}):this.googleMap.panTo(latLng)},WPGMZA.GoogleMap.prototype.getZoom=function(){return this.googleMap.getZoom()},WPGMZA.GoogleMap.prototype.setZoom=function(value){if(isNaN(value))throw new Error("Value must not be NaN");return this.googleMap.setZoom(parseInt(value))},WPGMZA.GoogleMap.prototype.getBounds=function(){var bounds=this.googleMap.getBounds(),northEast=bounds.getNorthEast(),southWest=bounds.getSouthWest(),nativeBounds=new WPGMZA.LatLngBounds({});return nativeBounds.north=northEast.lat(),nativeBounds.south=southWest.lat(),nativeBounds.west=southWest.lng(),nativeBounds.east=northEast.lng(),nativeBounds.topLeft={lat:northEast.lat(),lng:southWest.lng()},nativeBounds.bottomRight={lat:southWest.lat(),lng:northEast.lng()},nativeBounds},WPGMZA.GoogleMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var nativeBounds=new google.maps.LatLngBounds(southWest,northEast);this.googleMap.fitBounds(nativeBounds)},WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers=function(){for(var bounds=new google.maps.LatLngBounds,i=0;i<this.markers.length;i++)markers[i].getVisible()&&bounds.extend(markers[i].getPosition());this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.enableBicycleLayer=function(enable){this.bicycleLayer||(this.bicycleLayer=new google.maps.BicyclingLayer),this.bicycleLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enableTrafficLayer=function(enable){this.trafficLayer||(this.trafficLayer=new google.maps.TrafficLayer),this.trafficLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enablePublicTransportLayer=function(enable){this.publicTransportLayer||(this.publicTransportLayer=new google.maps.TransitLayer),this.publicTransportLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.showPointsOfInterest=function(show){var text=$("textarea[name='theme_data']").val();if(text){var styles=JSON.parse(text);styles.push({featureType:"poi",stylers:[{visibility:show?"on":"off"}]}),this.googleMap.setOptions({styles:styles})}},WPGMZA.GoogleMap.prototype.getMinZoom=function(){return parseInt(this.settings.min_zoom)},WPGMZA.GoogleMap.prototype.setMinZoom=function(value){this.googleMap.setOptions({minZoom:value,maxZoom:this.getMaxZoom()})},WPGMZA.GoogleMap.prototype.getMaxZoom=function(){return parseInt(this.settings.max_zoom)},WPGMZA.GoogleMap.prototype.setMaxZoom=function(value){this.googleMap.setOptions({minZoom:this.getMinZoom(),maxZoom:value})},WPGMZA.GoogleMap.prototype.latLngToPixels=function(latLng){var map=this.googleMap,nativeLatLng=new google.maps.LatLng({lat:parseFloat(latLng.lat),lng:parseFloat(latLng.lng)}),topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=map.getProjection().fromLatLngToPoint(nativeLatLng);return{x:(worldPoint.x-bottomLeft.x)*scale,y:(worldPoint.y-topRight.y)*scale}},WPGMZA.GoogleMap.prototype.pixelsToLatLng=function(x,y){void 0==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var map=this.googleMap,topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=new google.maps.Point(x/scale+bottomLeft.x,y/scale+topRight.y),latLng=map.getProjection().fromPointToLatLng(worldPoint);return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.onElementResized=function(event){this.googleMap&&google.maps.event.trigger(this.googleMap,"resize")}}),jQuery(function($){var Parent;WPGMZA.GoogleMarker=function(row){var self=this;Parent.call(this,row);var settings={};if(row)for(var name in row)row[name]instanceof WPGMZA.LatLng?settings[name]=row[name].toGoogleLatLng():row[name]instanceof WPGMZA.Map||(settings[name]=row[name]);this.googleMarker=new google.maps.Marker(settings),this.googleMarker.wpgmzaMarker=this,this.googleMarker.setPosition(new google.maps.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})),this.googleMarker.setLabel(this.settings.label),this.animation&&this.googleMarker.setAnimation(this.animation),google.maps.event.addListener(this.googleMarker,"click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),google.maps.event.addListener(this.googleMarker,"mouseover",function(){self.dispatchEvent("mouseover")}),google.maps.event.addListener(this.googleMarker,"dragend",function(){var googleMarkerPosition=self.googleMarker.getPosition();self.setPosition({lat:googleMarkerPosition.lat(),lng:googleMarkerPosition.lng()}),self.dispatchEvent({type:"dragend",latLng:self.getPosition()})}),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.GoogleMarker.prototype=Object.create(Parent.prototype),WPGMZA.GoogleMarker.prototype.constructor=WPGMZA.GoogleMarker,WPGMZA.GoogleMarker.prototype.setLabel=function(label){label?(this.googleMarker.setLabel({text:label}),this.googleMarker.getIcon()||this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon)):this.googleMarker.setLabel(null)},WPGMZA.GoogleMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var params,self=this,icon=this.googleMarker.getIcon(),img=new Image,x=this._offset.x,y=this._offset.y;icon||(icon=WPGMZA.settings.default_marker_icon),params="string"==typeof icon?{url:icon}:icon,img.onload=function(){var defaultAnchor={x:img.width/2,y:img.height};params.anchor=new google.maps.Point(defaultAnchor.x-x,defaultAnchor.y-y),self.googleMarker.setIcon(params)},img.src=params.url},WPGMZA.GoogleMarker.prototype.setOptions=function(options){this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){Parent.prototype.setAnimation.call(this,animation),this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker.setOpacity(opacity)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocatorCircle=function(map,settings){var self=this;WPGMZA.ModernStoreLocatorCircle.call(this,map,settings),this.intervalID=setInterval(function(){var mapSize={width:$(self.mapElement).width(),height:$(self.mapElement).height()};mapSize.width==self.mapSize.width&&mapSize.height==self.mapSize.height||(self.canvasLayer.resize_(),self.canvasLayer.draw(),self.mapSize=mapSize)},1e3),$(document).bind("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){self.canvasLayer.resize_(),self.canvasLayer.draw()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor=WPGMZA.GoogleModernStoreLocatorCircle,WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this;this.canvasLayer&&(this.canvasLayer.setMap(null),this.canvasLayer.setAnimate(!1)),this.canvasLayer=new CanvasLayer({map:this.map.googleMap,resizeHandler:function(event){self.onResize(event)},updateHandler:function(event){self.onUpdate(event)},animate:!0,resolutionScale:this.getResolutionScale()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions=function(options){WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this,options),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition=function(position){WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this,position),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius=function(radius){WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this,radius),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var spherical=google.maps.geometry.spherical,center=this.settings.center,equator=new WPGMZA.LatLng({lat:0,lng:0}),latitude=new WPGMZA.LatLng({lat:center.lat,lng:0}),offsetAtEquator=spherical.computeOffset(equator.toGoogleLatLng(),1e3*km,90),result=.006395*km*(spherical.computeOffset(latitude.toGoogleLatLng(),1e3*km,90).lng()/offsetAtEquator.lng());if(isNaN(result))throw new Error("here");return result},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvasLayer.canvas.width,height:this.canvasLayer.canvas.height}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){var position=this.map.googleMap.getProjection().fromLatLngToPoint(this.canvasLayer.getTopLeft());return{x:-position.x,y:-position.y}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels=function(){var center=new WPGMZA.LatLng(this.settings.center);return this.map.googleMap.getProjection().fromLatLngToPoint(center.toGoogleLatLng())},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvasLayer.canvas.getContext("2d")},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale=function(){return Math.pow(2,this.map.getZoom())*this.getResolutionScale()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible=function(visible){WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this,visible),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy=function(){this.canvasLayer.setMap(null),this.canvasLayer=null,clearInterval(this.intervalID)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocator=function(map_id){this.map=WPGMZA.getMapByID(map_id),WPGMZA.ModernStoreLocator.call(this,map_id);var options={fields:["name","formatted_address"],types:["geocode"]},restrict=wpgmaps_localize[map_id].other_settings.wpgmza_store_locator_restrict;this.addressInput=$(this.element).find(".addressInput, #addressInput")[0],this.addressInput&&(restrict&&restrict.length&&(options.componentRestrictions={country:restrict}),this.autoComplete=new google.maps.places.Autocomplete(this.addressInput,options)),this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element)},WPGMZA.GoogleModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator.prototype),WPGMZA.GoogleModernStoreLocator.prototype.constructor=WPGMZA.GoogleModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.GooglePolygon=function(row,googlePolygon){var self=this;if(Parent.call(this,row,googlePolygon),googlePolygon)this.googlePolygon=googlePolygon;else if(this.googlePolygon=new google.maps.Polygon(this.settings),row&&row.points){var paths=this.parseGeometry(row.points);this.googlePolygon.setOptions({paths:paths})}this.googlePolygon.wpgmzaPolygon=this,google.maps.event.addListener(this.googlePolygon,"click",function(){self.dispatchEvent({type:"click"})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.GooglePolygon.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolygon.prototype.constructor=WPGMZA.GooglePolygon,WPGMZA.GooglePolygon.prototype.getEditable=function(){return this.googlePolygon.getOptions().editable},WPGMZA.GooglePolygon.prototype.setEditable=function(value){this.googlePolygon.setOptions({editable:value})},WPGMZA.GooglePolygon.prototype.toJSON=function(){var result=WPGMZA.Polygon.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolygon.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GooglePolyline=function(row,googlePolyline){var self=this;if(WPGMZA.Polyline.call(this,row,googlePolyline),googlePolyline)this.googlePolyline=googlePolyline;else if(this.googlePolyline=new google.maps.Polyline(this.settings),this.googlePolyline.wpgmzaPolyline=this,row&&row.points){var path=this.parseGeometry(row.points);this.setPoints(path)}google.maps.event.addListener(this.googlePolyline,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.GooglePolyline.prototype=Object.create(WPGMZA.Polyline.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.setEditable=function(value){this.googlePolyline.setOptions({editable:value})},WPGMZA.GooglePolyline.prototype.setPoints=function(points){this.googlePolyline.setOptions({path:points})},WPGMZA.GooglePolyline.prototype.toJSON=function(){var result=WPGMZA.Polyline.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolyline.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GoogleTextOverlay=function(){this.element=$("<div></div>")},window.google&&google.maps&&google.maps.OverlayView&&(WPGMZA.GoogleTextOverlay.prototype=new google.maps.OverlayView),WPGMZA.GoogleTextOverlay.prototype.onAdd=function(){}}),jQuery(function($){WPGMZA.GoogleText=function(){}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&(WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(WPGMZA.GoogleVertexContextMenu=function(mapEditPage){var self=this;this.mapEditPage=mapEditPage,this.element=document.createElement("div"),this.element.className="wpgmza-vertex-context-menu",this.element.innerHTML="Delete",google.maps.event.addDomListener(this.element,"click",function(event){return self.removeVertex(),event.preventDefault(),event.stopPropagation(),!1})},WPGMZA.GoogleVertexContextMenu.prototype=new google.maps.OverlayView,WPGMZA.GoogleVertexContextMenu.prototype.onAdd=function(){var self=this,map=this.getMap();this.getPanes().floatPane.appendChild(this.element),this.divListener=google.maps.event.addDomListener(map.getDiv(),"mousedown",function(e){e.target!=self.element&&self.close()},!0)},WPGMZA.GoogleVertexContextMenu.prototype.onRemove=function(){google.maps.event.removeListener(this.divListener),this.element.parentNode.removeChild(this.element),this.set("position"),this.set("path"),this.set("vertex")},WPGMZA.GoogleVertexContextMenu.prototype.open=function(map,path,vertex){this.set("position",path.getAt(vertex)),this.set("path",path),this.set("vertex",vertex),this.setMap(map),this.draw()},WPGMZA.GoogleVertexContextMenu.prototype.close=function(){this.setMap(null)},WPGMZA.GoogleVertexContextMenu.prototype.draw=function(){var position=this.get("position"),projection=this.getProjection();if(position&&projection){var point=projection.fromLatLngToDivPixel(position);this.element.style.top=point.y+"px",this.element.style.left=point.x+"px"}},WPGMZA.GoogleVertexContextMenu.prototype.removeVertex=function(){var path=this.get("path"),vertex=this.get("vertex");path&&void 0!=vertex?(path.removeAt(vertex),this.close()):this.close()}))}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.OLCircle=function(options,olFeature){this.center={lat:0,lng:0},this.radius=0,Parent.call(this,options,olFeature),this.settings.fillColor||(this.settings.fillColor="#ff0000",this.settings.fillOpacity=.6),options.fillColor&&(this.settings.fillColor=options.fillColor),options.fillOpacity&&(this.settings.fillOpacity=options.fillOpacity),this.olStyle=new ol.style.Style(this.getStyleFromSettings()),this.vectorLayer3857=this.layer=new ol.layer.Vector({source:new ol.source.Vector,style:this.olStyle}),olFeature?this.olFeature=olFeature:this.recreate()},WPGMZA.OLCircle.prototype=Object.create(Parent.prototype),WPGMZA.OLCircle.prototype.constructor=WPGMZA.OLCircle,WPGMZA.OLCircle.prototype.recreate=function(){if(this.olFeature&&(this.layer.getSource().removeFeature(this.olFeature),delete this.olFeature),this.center&&this.radius){var x,y,wgs84Sphere=new ol.Sphere(6378137),radius=1e3*parseFloat(this.radius);x=this.center.lng,y=this.center.lat;var circle3857=ol.geom.Polygon.circular(wgs84Sphere,[x,y],radius,64).clone().transform("EPSG:4326","EPSG:3857");this.olFeature=new ol.Feature(circle3857),this.layer.getSource().addFeature(this.olFeature)}},WPGMZA.OLCircle.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity)})),this.settings.fillOpacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.settings.fillColor,this.settings.fillOpacity)})),params},WPGMZA.OLCircle.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLCircle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.recreate()},WPGMZA.OLCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.recreate()}}),jQuery(function($){WPGMZA.OLGeocoder=function(){},WPGMZA.OLGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder,WPGMZA.OLGeocoder.prototype.getResponseFromCache=function(query,callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_query_nominatim_cache",query:JSON.stringify(query)},success:function(response,xhr,status){response.lng=response.lon,callback(response)}})},WPGMZA.OLGeocoder.prototype.getResponseFromNominatim=function(options,callback){var data={q:options.address,format:"json"};options.componentRestrictions&&options.componentRestrictions.country&&(data.countryCodes=options.componentRestrictions.country),$.ajax("https://nominatim.openstreetmap.org/search/",{data:data,success:function(response,xhr,status){callback(response)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.OLGeocoder.prototype.cacheResponse=function(query,response){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_store_nominatim_cache",query:JSON.stringify(query),response:JSON.stringify(response)},method:"POST"})},WPGMZA.OLGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.geocode=function(options,callback){var self=this;if(!options)throw new Error("Invalid options");options.location&&(options.latLng=new WPGMZA.LatLng(options.location));var finish,location;if(options.address)location=options.address,finish=function(response,status){for(var i=0;i<response.length;i++)response[i].geometry={location:new WPGMZA.LatLng({lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)})},response[i].latLng={lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)},response[i].lng=response[i].lon;callback(response,status)};else{if(!options.latLng)throw new Error("You must supply either a latLng or address");location=options.latLng.toString(),finish=function(response,status){var address=response[0].display_name;callback([address],status)}}var query={location:location,options:options};this.getResponseFromCache(query,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location}),function(response,status){status!=WPGMZA.Geocoder.FAIL?0!=response.length?(finish(response,WPGMZA.Geocoder.SUCCESS),self.cacheResponse(query,response)):callback([],WPGMZA.Geocoder.ZERO_RESULTS):callback(null,WPGMZA.Geocoder.FAIL)})})}}),jQuery(function($){var Parent;WPGMZA.OLInfoWindow=function(mapObject){var self=this;Parent.call(this,mapObject),this.element=$("<div class='ol-info-window-container ol-info-window-plain'></div>")[0],$(this.element).on("click",".ol-info-window-close",function(event){self.close()})},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.OLInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.OLInfoWindow.prototype.constructor=WPGMZA.OLInfoWindow,WPGMZA.OLInfoWindow.prototype.open=function(map,mapObject){var self=this,latLng=mapObject.getPosition();if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.overlay&&this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.mapObject.map.olMap.addOverlay(this.overlay),$(this.element).show(),this.trigger("infowindowopen")},WPGMZA.OLInfoWindow.prototype.close=function(event){$(this.element).hide(),this.overlay&&(WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose"),this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=null)},WPGMZA.OLInfoWindow.prototype.setContent=function(html){$(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>"+html)},WPGMZA.OLInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})}}),jQuery(function($){var Parent;WPGMZA.OLMap=function(element,options){var self=this;Parent.call(this,element),this.setOptions(options);var viewOptions=this.settings.toOLViewOptions();$(this.element).html(""),this.olMap=new ol.Map({target:$(element)[0],layers:[this.getTileLayer()],view:new ol.View(viewOptions)}),this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan?interaction.setActive("yes"!=self.settings.wpgmza_settings_map_draggable):interaction instanceof ol.interaction.DoubleClickZoom?interaction.setActive(!self.settings.wpgmza_settings_map_clickzoom):interaction instanceof ol.interaction.MouseWheelZoom&&interaction.setActive("yes"!=self.settings.wpgmza_settings_map_scroll)},this),this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&"yes"==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this),"yes"!=WPGMZA.settings.wpgmza_settings_map_full_screen_control&&this.olMap.addControl(new ol.control.FullScreen),this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}),this.olMap.addLayer(this.markerLayer),this.olMap.on("movestart",function(event){self.isBeingDragged=!0}),this.olMap.on("moveend",function(event){self.wrapLongitude(),self.isBeingDragged=!1,self.dispatchEvent("dragend"),self.onIdle()}),this.olMap.getView().on("change:resolution",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged"),setTimeout(function(){self.onIdle()},10)}),this.olMap.getView().on("change",function(){self.onBoundsChanged()}),self.onBoundsChanged();var marker;this.storeLocator&&(marker=this.storeLocator.centerPointMarker)&&(this.olMap.addOverlay(marker.overlay),marker.setVisible(!1)),$(this.element).on("click contextmenu",function(event){var isRight;event=event||window.event;var latLng=self.pixelsToLatLng(event.offsetX,event.offsetY);if("which"in event?isRight=3==event.which:"button"in event&&(isRight=2==event.button),1!=event.which&&1!=event.button){if(isRight)return self.onRightClick(event)}else{if(self.isBeingDragged)return;self.trigger({type:"click",latLng:latLng})}}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}))},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.OLMap.prototype=Object.create(Parent.prototype),WPGMZA.OLMap.prototype.constructor=WPGMZA.OLMap,WPGMZA.OLMap.prototype.getTileLayer=function(){var options={};return WPGMZA.settings.tile_server_url&&(options.url=WPGMZA.settings.tile_server_url),new ol.layer.Tile({source:new ol.source.OSM(options)})},WPGMZA.OLMap.prototype.wrapLongitude=function(){var center=this.getCenter();center.lng>=-180&¢er.lng<=180||(center.lng=center.lng-360*Math.floor(center.lng/360),center.lng>180&&(center.lng-=360),this.setCenter(center))},WPGMZA.OLMap.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olMap.getView().getCenter());return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.setCenter=function(latLng){var view=this.olMap.getView();WPGMZA.Map.prototype.setCenter.call(this,latLng),view.setCenter(ol.proj.fromLonLat([latLng.lng,latLng.lat])),this.wrapLongitude(),this.onBoundsChanged()},WPGMZA.OLMap.prototype.getBounds=function(){var bounds=this.olMap.getView().calculateExtent(this.olMap.getSize()),nativeBounds=new WPGMZA.LatLngBounds,topLeft=ol.proj.toLonLat([bounds[0],bounds[1]]),bottomRight=ol.proj.toLonLat([bounds[2],bounds[3]]);return nativeBounds.north=topLeft[1],nativeBounds.south=bottomRight[1],nativeBounds.west=topLeft[0],nativeBounds.east=bottomRight[0],nativeBounds},WPGMZA.OLMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var view=this.olMap.getView(),extent=ol.extent.boundingExtent([ol.proj.fromLonLat([parseFloat(southWest.lng),parseFloat(southWest.lat)]),ol.proj.fromLonLat([parseFloat(northEast.lng),parseFloat(northEast.lat)])]);view.fit(extent,this.olMap.getSize())},WPGMZA.OLMap.prototype.panTo=function(latLng,zoom){var view=this.olMap.getView(),options={center:ol.proj.fromLonLat([parseFloat(latLng.lng),parseFloat(latLng.lat)]),duration:500};arguments.length>1&&(options.zoom=parseInt(zoom)),view.animate(options)},WPGMZA.OLMap.prototype.getZoom=function(){return Math.round(this.olMap.getView().getZoom())},WPGMZA.OLMap.prototype.setZoom=function(value){this.olMap.getView().setZoom(value)},WPGMZA.OLMap.prototype.getMinZoom=function(){return this.olMap.getView().getMinZoom()},WPGMZA.OLMap.prototype.setMinZoom=function(value){this.olMap.getView().setMinZoom(value)},WPGMZA.OLMap.prototype.getMaxZoom=function(){return this.olMap.getView().getMaxZoom()},WPGMZA.OLMap.prototype.setMaxZoom=function(value){this.olMap.getView().setMaxZoom(value)},WPGMZA.OLMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.olMap&&this.olMap.getView().setProperties(this.settings.toOLViewOptions())},WPGMZA.OLMap.prototype.addMarker=function(marker){this.olMap.addOverlay(marker.overlay),Parent.prototype.addMarker.call(this,marker)},WPGMZA.OLMap.prototype.removeMarker=function(marker){this.olMap.removeOverlay(marker.overlay),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.OLMap.prototype.addPolygon=function(polygon){this.olMap.addLayer(polygon.layer),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.OLMap.prototype.removePolygon=function(polygon){this.olMap.removeLayer(polygon.layer),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.OLMap.prototype.addPolyline=function(polyline){this.olMap.addLayer(polyline.layer),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.OLMap.prototype.removePolyline=function(polyline){this.olMap.removeLayer(polyline.layer),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.OLMap.prototype.addCircle=function(circle){this.olMap.addLayer(circle.layer),Parent.prototype.addCircle.call(this,circle)},WPGMZA.OLMap.prototype.removeCircle=function(circle){this.olMap.removeLayer(circle.layer),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.OLMap.prototype.pixelsToLatLng=function(x,y){void 0==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var coord=this.olMap.getCoordinateFromPixel([x,y]);if(!coord)return{x:null,y:null};var lonLat=ol.proj.toLonLat(coord);return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.latLngToPixels=function(latLng){var coord=ol.proj.fromLonLat([latLng.lng,latLng.lat]),pixel=this.olMap.getPixelFromCoordinate(coord);return pixel?{x:pixel[0],y:pixel[1]}:{x:null,y:null}},WPGMZA.OLMap.prototype.enableBicycleLayer=function(value){if(value)this.bicycleLayer||(this.bicycleLayer=new ol.layer.Tile({source:new ol.source.OSM({url:"http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"})})),this.olMap.addLayer(this.bicycleLayer);else{if(!this.bicycleLayer)return;this.olMap.removeLayer(this.bicycleLayer)}},WPGMZA.OLMap.prototype.onElementResized=function(event){this.olMap.updateSize()},WPGMZA.OLMap.prototype.onRightClick=function(event){if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)return!0;var parentOffset=$(this.element).offset(),relX=event.pageX-parentOffset.left,relY=event.pageY-parentOffset.top,latLng=this.pixelsToLatLng(relX,relY);return this.trigger({type:"rightclick",latLng:latLng}),$(this.element).trigger({type:"rightclick",latLng:latLng}),event.preventDefault(),!1}}),jQuery(function($){var Parent;WPGMZA.OLMarker=function(row){var self=this;Parent.call(this,row);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);this.element=$("<div class='ol-marker'><img src='"+WPGMZA.defaultMarkerIcon+"' alt=''/></div>")[0],this.element.wpgmzaMarker=this,$(this.element).on("mouseover",function(event){self.dispatchEvent("mouseover")}),this.overlay=new ol.Overlay({element:this.element,position:origin,positioning:"bottom-center"}),this.overlay.setPosition(origin),this.animation&&this.setAnimation(this.animation),this.setLabel(this.settings.label),row&&row.draggable&&this.setDraggable(!0),this.rebindClickListener(),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.OLMarker.prototype=Object.create(Parent.prototype),WPGMZA.OLMarker.prototype.constructor=WPGMZA.OLMarker,WPGMZA.OLMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.OLMarker.prototype.setLabel=function(label){label?(this.label||(this.label=$("<div class='ol-marker-label'/>"),$(this.element).append(this.label)),this.label.html(label)):this.label&&$(this.element).find(".ol-marker-label").remove()},WPGMZA.OLMarker.prototype.getVisible=function(visible){return"none"!=this.overlay.getElement().style.display},WPGMZA.OLMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.overlay.getElement().style.display=visible?"block":"none"},WPGMZA.OLMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);this.overlay.setPosition(origin)},WPGMZA.OLMarker.prototype.updateOffset=function(x,y){var x=this._offset.x,y=this._offset.y;this.element.style.position="relative",this.element.style.left=x+"px",this.element.style.top=y+"px"},WPGMZA.OLMarker.prototype.setAnimation=function(anim){switch(Parent.prototype.setAnimation.call(this,anim),anim){case WPGMZA.Marker.ANIMATION_NONE:$(this.element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(this.element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(this.element).attr("data-anim","drop")}},WPGMZA.OLMarker.prototype.setDraggable=function(draggable){var self=this;if(draggable){var options={disabled:!1};this.jQueryDraggableInitialized||(options.start=function(event){self.onDragStart(event)},options.stop=function(event){self.onDragEnd(event)}),$(this.element).draggable(options),this.jQueryDraggableInitialized=!0,this.rebindClickListener()}else $(this.element).draggable({disabled:!0})},WPGMZA.OLMarker.prototype.setOpacity=function(opacity){$(this.element).css({opacity:opacity})},WPGMZA.OLMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0},WPGMZA.OLMarker.prototype.onDragEnd=function(event){var offset={top:parseFloat($(this.element).css("top").match(/-?\d+/)[0]),left:parseFloat($(this.element).css("left").match(/-?\d+/)[0])};$(this.element).css({top:"0px",left:"0px"});var currentLatLng=this.getPosition(),pixelsBeforeDrag=this.map.latLngToPixels(currentLatLng),pixelsAfterDrag={x:pixelsBeforeDrag.x+offset.left,y:pixelsBeforeDrag.y+offset.top},latLngAfterDrag=this.map.pixelsToLatLng(pixelsAfterDrag);this.setPosition(latLngAfterDrag),this.isBeingDragged=!1,this.trigger({type:"dragend",latLng:latLngAfterDrag})},WPGMZA.OLMarker.prototype.onElementClick=function(event){var self=event.currentTarget.wpgmzaMarker;self.isBeingDragged||(self.dispatchEvent("click"),self.dispatchEvent("select"))},WPGMZA.OLMarker.prototype.rebindClickListener=function(){$(this.element).off("click",this.onElementClick),$(this.element).on("click",this.onElementClick)}}),jQuery(function($){WPGMZA.OLModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.OLModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.OLModernStoreLocatorCircle.prototype.constructor=WPGMZA.OLModernStoreLocatorCircle,WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,mapElement=$(this.map.element),olViewportElement=mapElement.children(".ol-viewport");this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-ol-canvas-overlay",mapElement.append(this.canvas),this.renderFunction=function(event){self.canvas.width==olViewportElement.width()&&self.canvas.height==olViewportElement.height()||(self.canvas.width=olViewportElement.width(),self.canvas.height=olViewportElement.height(),$(this.canvas).css({width:olViewportElement.width()+"px",height:olViewportElement.height()+"px"})),self.draw()},this.map.olMap.on("postrender",this.renderFunction)},WPGMZA.OLModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var center=new WPGMZA.LatLng(this.settings.center),outer=new WPGMZA.LatLng(center);outer.moveByDistance(km,90);var centerPixels=this.map.latLngToPixels(center),outerPixels=this.map.latLngToPixels(outer);return Math.abs(outerPixels.x-centerPixels.x)},WPGMZA.OLModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.OLModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.olMap.un("postrender",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){WPGMZA.OLModernStoreLocator=function(map_id){WPGMZA.ModernStoreLocator.call(this,map_id),$(WPGMZA.isProVersion()?".wpgmza_map[data-map-id='"+map_id+"']":"#wpgmza_map").append(this.element)},WPGMZA.OLModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator),WPGMZA.OLModernStoreLocator.prototype.constructor=WPGMZA.OLModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.OLPolygon=function(row,olFeature){if(Parent.call(this,row,olFeature),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[[]];if(row&&row.points){for(var paths=this.parseGeometry(row.points),i=0;i<paths.length;i++)coordinates[0].push(ol.proj.fromLonLat([parseFloat(paths[i].lng),parseFloat(paths[i].lat)]));this.olStyle=new ol.style.Style(this.getStyleFromSettings())}this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolygon:this})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.OLPolygon.prototype=Object.create(Parent.prototype),WPGMZA.OLPolygon.prototype.constructor=WPGMZA.OLPolygon,WPGMZA.OLPolygon.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity)})),this.settings.fillOpacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.settings.fillColor,this.settings.fillOpacity)})),params},WPGMZA.OLPolygon.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolygon.prototype.setEditable=function(editable){},WPGMZA.OLPolygon.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates()[0];result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){var Parent;WPGMZA.OLPolyline=function(row,olFeature){if(WPGMZA.Polyline.call(this,row),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[];if(row&&row.points)for(var path=this.parseGeometry(row.points),i=0;i<path.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(path[i].lng),parseFloat(path[i].lat)]));var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolyling:this})},Parent=WPGMZA.Polyline,WPGMZA.OLPolyline.prototype=Object.create(Parent.prototype),WPGMZA.OLPolyline.prototype.constructor=WPGMZA.OLPolyline,WPGMZA.OLPolyline.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity),width:parseInt(this.settings.strokeWeight)})),params},WPGMZA.OLPolyline.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolyline.prototype.setEditable=function(editable){},WPGMZA.OLPolyline.prototype.setPoints=function(points){this.olFeature&&this.layer.getSource().removeFeature(this.olFeature);for(var coordinates=[],i=0;i<points.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(points[i].lng),parseFloat(points[i].lat)]));this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)}),this.layer.getSource().addFeature(this.olFeature)},WPGMZA.OLPolyline.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates();result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){WPGMZA.OLText=function(){}}),jQuery(function($){WPGMZA.DataTable=function(element){$.fn.dataTable.ext.errMode="throw",this.element=element,this.element.wpgmzaDataTable=this,this.dataTableElement=this.getDataTableElement();var settings=this.getDataTableSettings();this.phpClass=$(element).attr("data-wpgmza-php-class"),this.dataTable=$(this.dataTableElement).DataTable(settings),this.wpgmzaDataTable=this},WPGMZA.DataTable.prototype.getDataTableElement=function(){return $(this.element).find("table")},WPGMZA.DataTable.prototype.getDataTableSettings=function(){var ajax,self=this,element=this.element,options={};$(element).attr("data-wpgmza-datatable-options")&&(options=JSON.parse($(element).attr("data-wpgmza-datatable-options"))),(ajax=$(element).attr("data-wpgmza-rest-api-route"))&&(options.ajax={url:WPGMZA.resturl+ajax,method:"POST",data:function(data,settings){return self.onAJAXRequest(data,settings)},beforeSend:function(xhr){xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce)}},options.processing=!0,options.serverSide=!0),"WPGMZA\\MarkerListing\\AdvancedTable"==$(this.element).attr("data-wpgmza-php-class")&&WPGMZA.settings.wpgmza_default_items&&(options.iDisplayLength=parseInt(WPGMZA.settings.wpgmza_default_items),options.aLengthMenu=[5,10,25,50,100]);var languageURL;if(WPGMZA.locale)switch(WPGMZA.locale.substr(0,2)){case"af":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Afrikaans.json";break;case"sq":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Albanian.json";break;case"am":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Amharic.json";break;case"ar":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Arabic.json";break;case"hy":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Armenian.json";break;case"az":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Azerbaijan.json";break;case"bn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Bangla.json";break;case"eu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Basque.json";break;case"be":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Belarusian.json";break;case"bg":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Bulgarian.json";break;case"ca":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Catalan.json";break;case"zh":languageURL="zh_TW"==WPGMZA.locale?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese-traditional.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";break;case"hr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Croatian.json";break;case"cs":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Czech.json";break;case"da":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Danish.json";break;case"nl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Dutch.json";break;case"et":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Estonian.json";break;case"fi":languageURL=WPGMZA.locale.match(/^fil/)?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Filipino.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Finnish.json";break;case"fr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/French.json";break;case"gl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Galician.json";break;case"ka":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Georgian.json";break;case"de":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/German.json";break;case"el":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Greek.json";break;case"gu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Gujarati.json";break;case"he":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hebrew.json";break;case"hi":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hindi.json";break;case"hu":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Hungarian.json";break;case"is":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Icelandic.json";break;case"id":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Indonesian.json";break;case"ga":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Irish.json";break;case"it":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Italian.json";break;case"ja":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Japanese.json";break;case"kk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Kazakh.json";break;case"ko":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Korean.json";break;case"ky":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Kyrgyz.json";break;case"lv":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Latvian.json";break;case"lt":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Lithuanian.json";break;case"mk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Macedonian.json";break;case"ml":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Malay.json";break;case"mn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Mongolian.json";break;case"ne":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Nepali.json";break;case"nb":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Norwegian-Bokmal.json";break;case"nn":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Norwegian-Nynorsk.json";break;case"ps":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Pashto.json";break;case"fa":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Persian.json";break;case"pl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Polish.json";break;case"pt":languageURL="pt_BR"==WPGMZA.locale?"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese-Brasil.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";break;case"ro":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Romanian.json";break;case"ru":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Russian.json";break;case"sr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Serbian.json";break;case"si":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Sinhala.json";break;case"sk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Slovak.json";break;case"sl":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Slovenian.json";break;case"es":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Spanish.json";break;case"sw":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Swahili.json";break;case"sv":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Swedish.json";break;case"ta":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Tamil.json";break;case"te":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/telugu.json";break;case"th":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Thai.json";break;case"tr":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Turkish.json";break;case"uk":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Ukrainian.json";break;case"ur":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Urdu.json";break;case"uz":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Uzbek.json";break;case"vi":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Vietnamese.json";break;case"cy":languageURL="//cdn.datatables.net/plug-ins/1.10.12/i18n/Welsh.json"}return languageURL&&(options.language={processing:"test",url:languageURL}),options},WPGMZA.DataTable.prototype.onAJAXRequest=function(data,settings){var params={phpClass:this.phpClass},attr=$(this.element).attr("data-wpgmza-ajax-parameters");return attr&&$.extend(params,JSON.parse(attr)),$.extend(data,params),{wpgmzaDataTableRequestData:data}},WPGMZA.DataTable.prototype.onAJAXResponse=function(response){},WPGMZA.DataTable.prototype.reload=function(){this.dataTable.ajax.reload(null,!1)}}),jQuery(function($){WPGMZA.AdminMarkerDataTable=function(element){var self=this;WPGMZA.DataTable.call(this,element),$(element).find(".wpgmza.select_all_markers").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete").on("click",function(event){self.onBulkDelete(event)})},WPGMZA.AdminMarkerDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdminMarkerDataTable.prototype.constructor=WPGMZA.AdminMarkerDataTable,WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){var meta=self.dataTable.ajax.json().meta[index];row.wpgmzaMarkerData=meta},options},WPGMZA.AdminMarkerDataTable.prototype.onSelectAll=function(event){$(this.element).find("input[name='mark']").prop("checked",!0)},WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[];$(this.element).find("input[name='mark']:checked").each(function(index,el){var row=$(el).closest("tr")[0];ids.push(row.wpgmzaMarkerData.id)}),WPGMZA.restAPI.call("/markers/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},$(document).ready(function(event){$("[data-wpgmza-admin-marker-datatable]").each(function(index,el){WPGMZA.adminMarkerDataTable=new WPGMZA.AdminMarkerDataTable(el)})})});
|
legacy-core.php
CHANGED
@@ -2232,8 +2232,6 @@ function wpgmaps_tag_basic( $atts ) {
|
|
2232 |
global $wpgmza_override;
|
2233 |
global $wpgmza;
|
2234 |
|
2235 |
-
|
2236 |
-
|
2237 |
extract( shortcode_atts( array(
|
2238 |
'id' => '1',
|
2239 |
'width' => 'inherit',
|
@@ -2350,6 +2348,11 @@ function wpgmaps_tag_basic( $atts ) {
|
|
2350 |
$map_attributes = " data-shortcode-attributes='" . $attr . "'";
|
2351 |
}
|
2352 |
|
|
|
|
|
|
|
|
|
|
|
2353 |
if (!$map_align || $map_align == "" || $map_align == "1") { $map_align = "float:left;"; }
|
2354 |
else if ($map_align == "2") { $map_align = "margin-left:auto !important; margin-right:auto; !important; align:center;"; }
|
2355 |
else if ($map_align == "3") { $map_align = "float:right;"; }
|
2232 |
global $wpgmza_override;
|
2233 |
global $wpgmza;
|
2234 |
|
|
|
|
|
2235 |
extract( shortcode_atts( array(
|
2236 |
'id' => '1',
|
2237 |
'width' => 'inherit',
|
2348 |
$map_attributes = " data-shortcode-attributes='" . $attr . "'";
|
2349 |
}
|
2350 |
|
2351 |
+
if(!empty($atts['classname']))
|
2352 |
+
{
|
2353 |
+
$map_attributes .= " class='{$atts['classname']}'";
|
2354 |
+
}
|
2355 |
+
|
2356 |
if (!$map_align || $map_align == "" || $map_align == "1") { $map_align = "float:left;"; }
|
2357 |
else if ($map_align == "2") { $map_align = "margin-left:auto !important; margin-right:auto; !important; align:center;"; }
|
2358 |
else if ($map_align == "3") { $map_align = "float:right;"; }
|
readme.txt
CHANGED
@@ -217,6 +217,10 @@ Please upgrade your version of WP Google Maps to version 6.0.27 as it includes m
|
|
217 |
|
218 |
== Changelog ==
|
219 |
|
|
|
|
|
|
|
|
|
220 |
= 7.11.16 :- 2019-03-28 :- Low priority =
|
221 |
* Added Catalan translation files
|
222 |
* Added hide POI logic to WPGMZA.GoogleMap
|
217 |
|
218 |
== Changelog ==
|
219 |
|
220 |
+
= 7.11.17 :- 2019-04-02 :- Low priority =
|
221 |
+
* Added shortcode attribute classname
|
222 |
+
* Fixed Custom CSS classes in Gutenberg editor not being applied
|
223 |
+
|
224 |
= 7.11.16 :- 2019-03-28 :- Low priority =
|
225 |
* Added Catalan translation files
|
226 |
* Added hide POI logic to WPGMZA.GoogleMap
|
wpGoogleMaps.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Google Maps
|
4 |
Plugin URI: https://www.wpgmaps.com
|
5 |
Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
|
6 |
-
Version: 7.11.
|
7 |
Author: WP Google Maps
|
8 |
Author URI: https://www.wpgmaps.com
|
9 |
Text Domain: wp-google-maps
|
@@ -11,6 +11,10 @@ Domain Path: /languages
|
|
11 |
*/
|
12 |
|
13 |
/*
|
|
|
|
|
|
|
|
|
14 |
* 7.11.16 :- 2019-03-28 :- Low priority
|
15 |
* Added Catalan translation files
|
16 |
* Added hide POI logic to WPGMZA.GoogleMap
|
3 |
Plugin Name: WP Google Maps
|
4 |
Plugin URI: https://www.wpgmaps.com
|
5 |
Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
|
6 |
+
Version: 7.11.17
|
7 |
Author: WP Google Maps
|
8 |
Author URI: https://www.wpgmaps.com
|
9 |
Text Domain: wp-google-maps
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
+
* 7.11.17 :- 2019-04-02 :- Low priority
|
15 |
+
* Added shortcode attribute classname
|
16 |
+
* Fixed Custom CSS classes in Gutenberg editor not being applied
|
17 |
+
*
|
18 |
* 7.11.16 :- 2019-03-28 :- Low priority
|
19 |
* Added Catalan translation files
|
20 |
* Added hide POI logic to WPGMZA.GoogleMap
|