Version Description
- Bugfix, Added search by Google Place ID
Download this release
Release Info
Developer | widgetpack |
Plugin | Google Reviews Widget |
Version | 1.43 |
Comparing to | |
See all releases |
Code changes from version 1.42 to 1.43
- grw-widget.php +3 -2
- grw.php +18 -18
- readme.txt +5 -2
- static/css/grp-place-widget.css +1 -1
- static/js/grp-place-finder.js +28 -29
grw-widget.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
|
10 |
//class name start with Goog_ instead Google_ coz it failed with w3c-total-cache plugin
|
11 |
//https://wordpress.org/support/topic/fix-for-fatal-error-require/
|
12 |
-
class
|
13 |
|
14 |
public $options;
|
15 |
public $api_key;
|
@@ -147,7 +147,7 @@ class Goog_Reviews_Pro extends WP_Widget {
|
|
147 |
if (!this.value) return;
|
148 |
jQuery.post('<?php echo admin_url('options-general.php?page=grw&cf_action=grw_google_api_key'); ?>', {
|
149 |
key: this.value,
|
150 |
-
|
151 |
});
|
152 |
});
|
153 |
}
|
@@ -157,6 +157,7 @@ class Goog_Reviews_Pro extends WP_Widget {
|
|
157 |
GRPPlaceFinder.main({
|
158 |
el: widgetId,
|
159 |
app_host: '<?php echo admin_url('options-general.php?page=grw'); ?>',
|
|
|
160 |
callback: {
|
161 |
add: [function(place) {
|
162 |
set_fields(place);
|
9 |
|
10 |
//class name start with Goog_ instead Google_ coz it failed with w3c-total-cache plugin
|
11 |
//https://wordpress.org/support/topic/fix-for-fatal-error-require/
|
12 |
+
class Goog_Reviews_Widget extends WP_Widget {
|
13 |
|
14 |
public $options;
|
15 |
public $api_key;
|
147 |
if (!this.value) return;
|
148 |
jQuery.post('<?php echo admin_url('options-general.php?page=grw&cf_action=grw_google_api_key'); ?>', {
|
149 |
key: this.value,
|
150 |
+
_textsearch_wpnonce: jQuery('#grw-form_nonce_grw_textsearch').val()
|
151 |
});
|
152 |
});
|
153 |
}
|
157 |
GRPPlaceFinder.main({
|
158 |
el: widgetId,
|
159 |
app_host: '<?php echo admin_url('options-general.php?page=grw'); ?>',
|
160 |
+
nonce: '#grw-form_nonce_grw_textsearch',
|
161 |
callback: {
|
162 |
add: [function(place) {
|
163 |
set_fields(place);
|
grw.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Reviews Widget
|
|
4 |
Plugin URI: https://googlereviews.pro/
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: WidgetPack <contact@widgetpack.com>
|
7 |
-
Version: 1.
|
8 |
Author URI: https://googlereviews.pro/
|
9 |
*/
|
10 |
|
@@ -12,7 +12,7 @@ require(ABSPATH . 'wp-includes/version.php');
|
|
12 |
|
13 |
require_once(dirname(__FILE__) . '/api/grw-api.php');
|
14 |
|
15 |
-
define('GRW_VERSION', '1.
|
16 |
define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
|
17 |
define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg');
|
18 |
define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
@@ -53,13 +53,13 @@ $grw_api = new GoogleReviewsWidgetAPI();
|
|
53 |
|
54 |
/*-------------------------------- Widget --------------------------------*/
|
55 |
function grw_init_widget() {
|
56 |
-
if (!class_exists('
|
57 |
require 'grw-widget.php';
|
58 |
}
|
59 |
}
|
60 |
|
61 |
add_action('widgets_init', 'grw_init_widget');
|
62 |
-
add_action('widgets_init', create_function('', 'register_widget("
|
63 |
|
64 |
/*-------------------------------- Menu --------------------------------*/
|
65 |
function grw_setting_menu() {
|
@@ -179,11 +179,11 @@ function grw_request_handler() {
|
|
179 |
switch ($_GET['cf_action']) {
|
180 |
case 'grw_google_api_key':
|
181 |
if (current_user_can('manage_options')) {
|
182 |
-
if (isset($_POST['
|
183 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
184 |
$response = compact('error');
|
185 |
} else {
|
186 |
-
check_admin_referer('grw-wpnonce_grw_textsearch', '
|
187 |
update_option('grw_google_api_key', $_POST['key']);
|
188 |
$status = 'success';
|
189 |
$response = compact('status');
|
@@ -193,13 +193,13 @@ function grw_request_handler() {
|
|
193 |
die();
|
194 |
}
|
195 |
break;
|
196 |
-
case '
|
197 |
if (current_user_can('manage_options')) {
|
198 |
-
if (isset($_GET['
|
199 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
200 |
$response = compact('error');
|
201 |
} else {
|
202 |
-
check_admin_referer('grw-wpnonce_grw_textsearch', '
|
203 |
$response = $grw_api->textsearch(array(
|
204 |
'query' => $_GET['query'],
|
205 |
'key' => $google_api_key,
|
@@ -210,13 +210,13 @@ function grw_request_handler() {
|
|
210 |
die();
|
211 |
}
|
212 |
break;
|
213 |
-
case '
|
214 |
if (current_user_can('manage_options')) {
|
215 |
-
if (isset($_GET['
|
216 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
217 |
$response = compact('error');
|
218 |
} else {
|
219 |
-
check_admin_referer('grw-wpnonce_grw_textsearch', '
|
220 |
$response = $grw_api->details(array(
|
221 |
'placeid' => $_GET['placeid'],
|
222 |
'key' => $google_api_key,
|
@@ -227,13 +227,13 @@ function grw_request_handler() {
|
|
227 |
die();
|
228 |
}
|
229 |
break;
|
230 |
-
case '
|
231 |
if (current_user_can('manage_options')) {
|
232 |
-
if (isset($_POST['
|
233 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
234 |
$response = compact('error');
|
235 |
} else {
|
236 |
-
check_admin_referer('grw-wpnonce_grw_textsearch', '
|
237 |
$result = $grw_api->details(array(
|
238 |
'placeid' => $_POST['placeid'],
|
239 |
'key' => $google_api_key,
|
@@ -251,13 +251,13 @@ function grw_request_handler() {
|
|
251 |
die();
|
252 |
}
|
253 |
break;
|
254 |
-
case '
|
255 |
if (current_user_can('manage_options')) {
|
256 |
-
if (isset($_POST['
|
257 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
258 |
$response = compact('error');
|
259 |
} else {
|
260 |
-
check_admin_referer('grw-wpnonce_grw_textsearch', '
|
261 |
|
262 |
$place_json = stripslashes($_POST['place']);
|
263 |
$reviews_json = stripslashes($_POST['reviews']);
|
4 |
Plugin URI: https://googlereviews.pro/
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
Author: WidgetPack <contact@widgetpack.com>
|
7 |
+
Version: 1.43
|
8 |
Author URI: https://googlereviews.pro/
|
9 |
*/
|
10 |
|
12 |
|
13 |
require_once(dirname(__FILE__) . '/api/grw-api.php');
|
14 |
|
15 |
+
define('GRW_VERSION', '1.43');
|
16 |
define('GRW_GOOGLE_PLACE_API', 'https://maps.googleapis.com/maps/api/place/');
|
17 |
define('GRW_GOOGLE_AVATAR', 'https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg');
|
18 |
define('GRW_PLUGIN_URL', plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
53 |
|
54 |
/*-------------------------------- Widget --------------------------------*/
|
55 |
function grw_init_widget() {
|
56 |
+
if (!class_exists('Goog_Reviews_Widget' ) ) {
|
57 |
require 'grw-widget.php';
|
58 |
}
|
59 |
}
|
60 |
|
61 |
add_action('widgets_init', 'grw_init_widget');
|
62 |
+
add_action('widgets_init', create_function('', 'register_widget("Goog_Reviews_Widget");'));
|
63 |
|
64 |
/*-------------------------------- Menu --------------------------------*/
|
65 |
function grw_setting_menu() {
|
179 |
switch ($_GET['cf_action']) {
|
180 |
case 'grw_google_api_key':
|
181 |
if (current_user_can('manage_options')) {
|
182 |
+
if (isset($_POST['_textsearch_wpnonce']) === false) {
|
183 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
184 |
$response = compact('error');
|
185 |
} else {
|
186 |
+
check_admin_referer('grw-wpnonce_grw_textsearch', '_textsearch_wpnonce');
|
187 |
update_option('grw_google_api_key', $_POST['key']);
|
188 |
$status = 'success';
|
189 |
$response = compact('status');
|
193 |
die();
|
194 |
}
|
195 |
break;
|
196 |
+
case 'textsearch':
|
197 |
if (current_user_can('manage_options')) {
|
198 |
+
if (isset($_GET['_textsearch_wpnonce']) === false) {
|
199 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
200 |
$response = compact('error');
|
201 |
} else {
|
202 |
+
check_admin_referer('grw-wpnonce_grw_textsearch', '_textsearch_wpnonce');
|
203 |
$response = $grw_api->textsearch(array(
|
204 |
'query' => $_GET['query'],
|
205 |
'key' => $google_api_key,
|
210 |
die();
|
211 |
}
|
212 |
break;
|
213 |
+
case 'details':
|
214 |
if (current_user_can('manage_options')) {
|
215 |
+
if (isset($_GET['_textsearch_wpnonce']) === false) {
|
216 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
217 |
$response = compact('error');
|
218 |
} else {
|
219 |
+
check_admin_referer('grw-wpnonce_grw_textsearch', '_textsearch_wpnonce');
|
220 |
$response = $grw_api->details(array(
|
221 |
'placeid' => $_GET['placeid'],
|
222 |
'key' => $google_api_key,
|
227 |
die();
|
228 |
}
|
229 |
break;
|
230 |
+
case 'save':
|
231 |
if (current_user_can('manage_options')) {
|
232 |
+
if (isset($_POST['_textsearch_wpnonce']) === false) {
|
233 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
234 |
$response = compact('error');
|
235 |
} else {
|
236 |
+
check_admin_referer('grw-wpnonce_grw_textsearch', '_textsearch_wpnonce');
|
237 |
$result = $grw_api->details(array(
|
238 |
'placeid' => $_POST['placeid'],
|
239 |
'key' => $google_api_key,
|
251 |
die();
|
252 |
}
|
253 |
break;
|
254 |
+
case 'save_json':
|
255 |
if (current_user_can('manage_options')) {
|
256 |
+
if (isset($_POST['_textsearch_wpnonce']) === false) {
|
257 |
$error = grw_i('Unable to call request. Make sure you are accessing this page from the Wordpress dashboard.');
|
258 |
$response = compact('error');
|
259 |
} else {
|
260 |
+
check_admin_referer('grw-wpnonce_grw_textsearch', '_textsearch_wpnonce');
|
261 |
|
262 |
$place_json = stripslashes($_POST['place']);
|
263 |
$reviews_json = stripslashes($_POST['reviews']);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://googlereviews.pro/
|
|
4 |
Tags: google, google business reviews, google place review, Google Places, google places reviews, google review, google review widget, google map reviews, map reviews, google reviews, review, reviews, google reviews widget, comment, comments, sidebar, widget, widgetpack
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -47,7 +47,7 @@ Live demo: [http://widgetsforsite.com/](http://widgetsforsite.com/)
|
|
47 |
* Leave Google review link
|
48 |
* Pagination, Sorting (by default, recent, oldest, highest score, lowest score)
|
49 |
* Disable profile G+ links, nofollow, target="_blank"
|
50 |
-
* Priority support
|
51 |
|
52 |
== Installation ==
|
53 |
|
@@ -62,6 +62,9 @@ Live demo: [http://widgetsforsite.com/](http://widgetsforsite.com/)
|
|
62 |
|
63 |
== Changelog ==
|
64 |
|
|
|
|
|
|
|
65 |
= 1.42 =
|
66 |
* Bugfix: update path images in reviews helper
|
67 |
|
4 |
Tags: google, google business reviews, google place review, Google Places, google places reviews, google review, google review widget, google map reviews, map reviews, google reviews, review, reviews, google reviews widget, comment, comments, sidebar, widget, widgetpack
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 1.43
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
47 |
* Leave Google review link
|
48 |
* Pagination, Sorting (by default, recent, oldest, highest score, lowest score)
|
49 |
* Disable profile G+ links, nofollow, target="_blank"
|
50 |
+
* Priority Live Chat support
|
51 |
|
52 |
== Installation ==
|
53 |
|
62 |
|
63 |
== Changelog ==
|
64 |
|
65 |
+
= 1.43 =
|
66 |
+
* Bugfix, Added search by Google Place ID
|
67 |
+
|
68 |
= 1.42 =
|
69 |
* Bugfix: update path images in reviews helper
|
70 |
|
static/css/grp-place-widget.css
CHANGED
@@ -262,7 +262,7 @@
|
|
262 |
margin: 10px 0 0;
|
263 |
cursor: pointer;
|
264 |
border: 1px solid #dbdbdb;
|
265 |
-
background: #eee url('
|
266 |
}
|
267 |
|
268 |
.grp-options {
|
262 |
margin: 10px 0 0;
|
263 |
cursor: pointer;
|
264 |
border: 1px solid #dbdbdb;
|
265 |
+
background: #eee url('../img/button-down-black.svg') no-repeat right;
|
266 |
}
|
267 |
|
268 |
.grp-options {
|
static/js/grp-place-finder.js
CHANGED
@@ -133,24 +133,24 @@ var WPacXDM = WPacXDM || {
|
|
133 |
}
|
134 |
};
|
135 |
"object"!==typeof JSON&&(JSON={});
|
136 |
-
(function(){function a(a){return 10>a?"0"+a:a}function b(a){
|
137 |
-
case "object":if(!k)return"null";
|
138 |
-
|
139 |
-
|
140 |
-
b){function c(a,d){var f,
|
141 |
-
eval("("+a+")"),"function"===typeof b?c({"":
|
142 |
a.setAttribute("title",c);d&&a.setAttribute("style",d);return a},addcls:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];0>a.className.indexOf(d)&&(a.className+=" "+d)}},addcl:function(a,b){a&&0>a.className.indexOf(b)&&(a.className+=" "+b,a.className=a.className.trim())},remcl:function(a,b){a&&(a.className=a.className.replace(b," "))},hascl:function(a,b){return a&&-1<a.className.indexOf(b)},on:function(a,b,c){if(a){var d=this;a.addEventListener?a.addEventListener(b,function(b){!1==c.call(a,b)&&
|
143 |
d.stop(b)},!1):a.attachEvent("on"+b,function(b){b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0};b.preventDefault=b.preventDefault||function(){this.returnValue=!1};!1==c.call(a,b)&&d.stop(b)})}},on2:function(a,b,c,d){if(a&&(a=a.querySelector(b)))this.on(a,c,d)},onall:function(a,b,c){for(var d=0;d<a.length;d++)this.on(a[d],b,c)},onall2:function(a,b,c,d){this.onall(a.querySelectorAll(b),c,d)},stop:function(a){a.preventDefault();a.stopPropagation()},parents:function(a,b){var c=a.parentNode,
|
144 |
d=!1;this.each(c.className.split(" "),function(a){!d&&(d=a==b)});return d?c:this.parents(c,b)},parentsel:function(a,b){var c=a.parentNode;return 0>c.tagName.toLowerCase().indexOf(b)?this.parentsel(c,b):c},show:function(a,b){var c=b.querySelector(a);this.show2(c)},show2:function(a){a&&(a.style.display="")},hide:function(a,b){var c=b.querySelector(a);this.hide2(c)},hide2:function(a){a&&(a.style.display="none")},html:function(a,b){a&&(a.innerHTML="",this.isString(b)?a.innerHTML=b:a.appendChild(b))},
|
145 |
prepend:function(a,b){a.insertBefore(b,a.firstChild)},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},rm2:function(a,b){var c=a.querySelector(b);this.rm(c)},each:function(a,b){if("undefined"==typeof a.length)b(a,0);else for(var c=0;c<a.length;c++)b(a[c],c)},css:function(a,b,c){this.isInteger(c)&&(c+="px");a.style[b]=c},child:function(a,b){for(var c=a.children.length;c--;){var d=a.children[c];if(8!=d.nodeType&&-1<d.className.indexOf(b))return d}},children:function(a){for(var b=[],c=a.children.length;c--;)8!=
|
146 |
-
a.children[c].nodeType&&b.unshift(a.children[c]);return b},icss:function(a,b){return a+":"+b+"px!important;"},transCss:function(a,b){var c="overflow-y:hidden!important;-webkit-transition:"+b+" .5s ease-in-out!important;-moz-transition:"+b+" .5s ease-in-out!important;-o-transition:"+b+" .5s ease-in-out!important;transition:"+b+" .5s ease-in-out!important;";a.setAttribute("style",c);return c},prependSlide:function(a,b){var c=this,d=this.transCss(a,"max-height");b.insertBefore(a,b.firstChild);var
|
147 |
-
a.offsetHeight;a.setAttribute("style",this.icss("max-height",0)+d);setTimeout(function(){a.setAttribute("style",c.icss("max-height",
|
148 |
a.style.height=a.offsetHeight+"px";setTimeout(function(){a.style.height="0";setTimeout(function(){a.setAttribute("style","display:none");b&&b()},500)},5)},title:function(){var a=document.getElementsByTagName("title")[0];return a&&a.textContent||""},nextES:function(a){do a=a.nextSibling;while(a&&1!==a.nodeType);return a},next:function(a){return a.nextElementSibling||this.nextES(a)},prevES:function(a){do a=a.previousSibling;while(a&&1!==a.nodeType);return a},prev:function(a){return a.previousElementSibling||
|
149 |
this.prevES(a)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},before:function(a,b){a.parentNode.insertBefore(b,a)},isVisible:function(a){return 0<a.offsetWidth&&0<a.offsetHeight},isInteger:function(a){return a&&0===a%1},isString:function(a){return"string"==typeof a},afun:function(a){var b="wpac_"+Math.floor(1000001*Math.random());window[b]=function(c){window[b]=void 0;try{delete window[b]}catch(d){}a(c)};return b},params:function(a,b,c){var d=[];if(b)for(p in b)d.push(encodeURIComponent(p)+
|
150 |
-
"="+encodeURIComponent(b[p]));c&&d.push("callback="+this.afun(c));return 0<d.length?(b=0>a.indexOf("?")?"?":"&",a+(b+d.join("&"))):a},jsonp:function(a,b,c){var d=document.createElement("script");d.src=this.params(a,b,c);d.type="text/javascript";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(d)},popup:function(a,b,c,d,f
|
151 |
-
b+",height="+c+",top="+
|
152 |
return a.callback},isemail:function(a){return this.emailRegex.test(a)},getParam:function(a){if(location.search&&-1<location.search.indexOf(a)){if(!this.urlparams){this.urlParams={};var b=this;location.search.substr(1).split("&").forEach(function(a){a=a.split("=");b.urlParams[a[0]]=decodeURIComponent(a[1])})}return this.urlParams[a]}},urlsToHyperlinks:function(a){return a.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$1" target="_blank">$1</a>').replace(/(^|[^\/])(www\.[\S]+(\b|$))/ig,
|
153 |
-
'$1<a href="http://$2" target="_blank" rel="nofollow">$2</a>')},escapeHtml:function(a){return a?document.createElement("div").appendChild(document.createTextNode(a)).parentNode.innerHTML:""},escapeHtmlWithLinks:function(a){return this.urlsToHyperlinks(this.escapeHtml(a))}};String.prototype.trim||(String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.capitalize||(String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)});var WPacSVGIcon=WPacSVGIcon||function(){var a=function(a,b,c,h
|
154 |
star_half:"M1250 957l257-250-356-52-66-10-30-60-159-322v963l59 31 318 168-60-355-12-66zm452-262l-363 354 86 500q5 33-6 51.5t-34 18.5q-17 0-40-12l-449-236-449 236q-23 12-40 12-23 0-34-18.5t-6-51.5l86-500-364-354q-32-32-23-59.5t54-34.5l502-73 225-455q20-41 49-41 28 0 49 41l225 455 502 73q45 7 54 34.5t-24 59.5z",star:"M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z"};
|
155 |
return{path:c,star_o:a(22,22,"#ccc",c.star_o),star_half:a(22,22,"#ff9800",c.star_half),star:a(22,22,"#ff9800",c.star),pencil:a(14,14,"#666","M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"),caret:a(14,14,"#666","M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"),
|
156 |
check:a(14,14,"#666","M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"),reply:a(14,14,"#666","M1792 640q0 26-19 45l-512 512q-19 19-45 19t-45-19-19-45v-256h-224q-98 0-175.5 6t-154 21.5-133 42.5-105.5 69.5-80 101-48.5 138.5-17.5 181q0 55 5 123 0 6 2.5 23.5t2.5 26.5q0 15-8.5 25t-23.5 10q-16 0-28-17-7-9-13-22t-13.5-30-10.5-24q-127-285-127-451 0-199 53-333 162-403 875-403h224v-256q0-26 19-45t45-19 45 19l512 512q19 19 19 45z"),
|
@@ -175,10 +175,10 @@ soundcloud:a(64,64,"#fff","M26.791,154.715c-0.067,0.478-0.411,0.81-0.833,0.81c-0
|
|
175 |
"0 0 256 256"),vkontakte:b(64,64,"0 0 110 110","7,82","M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z"),
|
176 |
odnoklassniki:b(64,64,"0 0 105 105","20,84","M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z"),
|
177 |
mailru:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="114" height="114" viewBox="0 0 114 114"><path fill="#fff" d="M41.93,30.296c-3.896,0-7.066,3.169-7.066,7.065s3.17,7.067,7.066,7.067s7.064-3.171,7.064-7.067 S45.825,30.296,41.93,30.296z"></path><path fill="#fff" d="M72.223,30.296c-3.896,0-7.065,3.169-7.065,7.065s3.17,7.067,7.065,7.067s7.064-3.171,7.064-7.067 S76.117,30.296,72.223,30.296z"></path><path fill="#fff" d="M96.324,77.49c0.299-1.112,0.146-2.273-0.428-3.271l-8.785-15.268c-0.769-1.332-2.199-2.16-3.738-2.16 c-0.75,0-1.492,0.199-2.146,0.576c-0.998,0.574-1.711,1.502-2.012,2.613c-0.299,1.111-0.146,2.272,0.428,3.271l0.703,1.226 l-0.342,0.494c-4.232,6.111-13.26,10.061-22.994,10.061c-9.67,0-18.668-3.911-22.926-9.965l-0.352-0.5l0.754-1.289 c1.199-2.049,0.507-4.694-1.543-5.896c-0.66-0.385-1.41-0.589-2.17-0.589c-1.528,0-2.955,0.816-3.725,2.133l-8.935,15.27 c-1.199,2.05-0.507,4.695,1.543,5.895c0.659,0.387,1.411,0.59,2.172,0.59c1.527,0,2.954-0.815,3.724-2.132l3.496-5.974l0.871,0.876 c6.447,6.481,16.32,10.2,27.09,10.2c10.778,0,20.658-3.725,27.104-10.215l0.879-0.885l3.436,5.969 c0.768,1.332,2.2,2.159,3.739,2.159c0.751,0,1.492-0.198,2.144-0.573C95.311,79.529,96.023,78.602,96.324,77.49z"></path></svg>',
|
178 |
-
icon:function(b,f
|
179 |
-
|
180 |
-
(12<=c.getHours()?" PM":" AM")},getFormatTime:function(a,b,c){var d=new Date(a),
|
181 |
-
b,c,d){return a+" "+this.declineMsg(a,b,c,d)},declineMsg:function(a,b,c,d,
|
182 |
WPacTime.Messages={ru:{second:"\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e",minute:"\u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434")},hour:"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434",hours:function(a){return WPacTime.declineNum(Math.round(a),
|
183 |
"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434")},day:"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434")},month:"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434",
|
184 |
months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434")},year:"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434","\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434",
|
@@ -210,19 +210,18 @@ minute:"\u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",min
|
|
210 |
minutes:function(a){return WPacTime.declineNum(Math.round(a),"un minuto fa","minuti fa","minuti fa")},hour:"un'ora fa",hours:function(a){return WPacTime.declineNum(Math.round(a),"un'ora fa","ore fa","ore fa")},day:"un giorno fa",days:function(a){return WPacTime.declineNum(Math.round(a),"un giorno fa","giorni fa","giorni fa")},month:"un mese fa",months:function(a){return WPacTime.declineNum(Math.round(a/30),"un mese fa","mesi fa","mesi fa")},year:"un anno fa",years:function(a){return WPacTime.declineNum(Math.round(a),
|
211 |
"un anno fa","anni fa","anni fa")}}};var WPacStars=WPacStars||{html:'<span class="wp-stars">{{~it.stars :c}}{{?it.rating >= c}}<span class="wp-star" data-origin="star" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star", it.size || 24, it.color)}}</span>{{??}}{{?c - it.rating < 1}}<span class="wp-star" data-origin="star_half" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_half", it.size || 24, it.color)}}</span>{{??}}<span class="wp-star" data-origin="star_o" data-color="#ccc" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_o", it.size || 24, "#ccc")}}</span>{{?}}{{?}}{{~}}</span>',
|
212 |
main:function(a){var b=this,c=(a.cnt||document).querySelector(a.el);c.innerHTML=this.stars_render(a.size,a.color,a.stars,a.sum,a.count);if(!a.readonly){var c=c.querySelector(".wp-stars"),d=c.querySelectorAll(".wp-star");WPacFastjs.on(c,"mouseleave",function(a){WPacFastjs.each(d,function(a){var b=a.querySelector("path");a.setAttribute("data-hover","");b.setAttribute("d",WPacSVGIcon.path[a.getAttribute("data-origin")]);b.setAttribute("fill",a.getAttribute("data-color"))})});WPacFastjs.onall(d,"mouseout",
|
213 |
-
function(){b.prevHover(a,this);b.nextHover(a,this)});WPacFastjs.onall(d,"click",function(){var c=parseInt(this.getAttribute("data-star"));a.clickable&&(this.parentNode.setAttribute("data-star",c),WPacFastjs.each(d,function(d){d.getAttribute("data-star")<=c?(d.setAttribute("data-origin","star"),d.setAttribute("data-color",b.color(a.color))):(d.setAttribute("data-origin","star_o"),d.setAttribute("data-color","#ccc"))}));a.cb&&a.cb(c)})}},stars_render:function(a,b,c,d,
|
214 |
-
color:this.color(b),stars:this.stars(c||5),rating:this.rating(d,
|
215 |
b.getAttribute("data-hover");c&&"off"!=c||(c=b.querySelector("path"),c.setAttribute("d",WPacSVGIcon.path.star),c.setAttribute("fill",this.color(a.color)),b.setAttribute("data-hover","on"));this.prevHover(a,WPacFastjs.prev(b))}},nextHover:function(a,b){var c=WPacFastjs.next(b);if(c){var d=c.getAttribute("data-hover");d&&"on"!=d||(d=c.querySelector("path"),d.setAttribute("d",WPacSVGIcon.path.star_o),d.setAttribute("fill","#ccc"),c.setAttribute("data-hover","off"));this.nextHover(a,c)}}};var GRPPlaceFinder=GRPPlaceFinder||{_HTML:'<div class="wp-gri"><div class="row"><div class="col-sm-4"><div class="form form400 form-horizontal"><h4 class="text-left"><span class="wp-step">1</span>Find Place</h4><div class="form-group"><div class="col-sm-12"><input type="text" class="wp-place form-control" placeholder="Google Place Search Query"></div></div><div class="form-group wp-gkey-cnt" style="display:none"><div class="col-sm-12"><input type="text" class="wp-gkey form-control" placeholder="Google API Key" {{?it.google_api_key}}value="{{=it.google_api_key}}"{{?}}><small>Default limit of requests to Google Places API exceeded, to continue <a href="https://developers.google.com/places/web-service/get-api-key" target="_blank">get Google Places API key</a></small></div></div><div class="form-group"><div class="col-sm-12"><button class="wp-get-place btn btn-block btn-primary">Search Place</button></div></div><div class="form-group"><div class="col-sm-12"><h4 class="text-left"><span class="wp-step">2</span>Choice Place</h4><div class="wp-places"></div></div></div><div class="form-group"><div class="col-sm-12"><h4 class="text-left"><span class="wp-step">3</span>Save Place</h4><div class="wp-reviews"></div></div></div></div></div>{{?it.post_content}}{{=it.post_content}}{{?}}</div></div>',
|
216 |
_PLACE_HTML:'<div class="media-left"><img class="media-object" src="{{=it.place.icon}}" alt="{{=it.place.name}}" style="width:32px;height:32px;"></div><div class="media-body"><h5 class="media-heading">{{=it.place.name}}</h5><div>{{?it.place.rating}}<span class="wp-grating">{{=it.place.rating}}</span><span class="wp-gstars"></span>{{?}}</div><small class="text-muted">{{=it.place.formatted_address}}</small></div>',_REVIEW_HTML:'<div class="media-left"><img class="media-object" src="{{=it.review.profile_photo_url || it.defava}}" alt="{{=it.review.author_name}}" onerror="if(this.src!=\'{{=it.defava}}\')this.src=\'{{=it.defava}}\';"></div><div class="media-body"><div class="media-heading"><a href="{{=it.review.author_url}}" target="_blank">{{=it.review.author_name}}</a></div><div class="wp-gtime">{{=it.time}}</div><div class="wp-gtext"><span class="wp-gstars"></span> {{=it.text}}</div></div>',
|
217 |
-
_TEXT_HTML:'{{!it.t}} {{?it.h}}<span class="wp-more">{{!it.h}}</span><span class="wp-more-toggle" onclick="this.previousSibling.className=\'\';this.textContent=\'\';">read more</span>{{?}}',main:function(a){var b=this,c=document.getElementById(a.el||"wpac-greview-install");c.innerHTML=doT.template(b._HTML)({post_content:a.post_content,google_api_key:a.google_api_key});WPacFastjs.on2(c,".wp-get-place","click",function(){
|
218 |
-
|
219 |
-
"has-error");else
|
220 |
-
WPacFastjs.
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
"
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
b.lastIndexOf(" ",c),e=0<e?e:c;0<e&&(d=b.substring(0,e),f=b.substring(e,b.length))}return doT.template(this._TEXT_HTML)({t:d,h:f})},powered_by_google:function(a){a=WPacFastjs.create("div","wp-glogo");a.innerHTML='<img src="/wp-content/plugins/google-reviews-pro/static/img/powered_by_google_on_white.png" alt="powered by Google">';return a},getLang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()}};
|
133 |
}
|
134 |
};
|
135 |
"object"!==typeof JSON&&(JSON={});
|
136 |
+
(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,m,q,r=f,l,k=d[a];k&&("object"===typeof k&&"function"===typeof k.toJSON)&&(k=k.toJSON(a));"function"===typeof n&&(k=n.call(d,a,k));switch(typeof k){case "string":return b(k);case "number":return isFinite(k)?String(k):"null";case "boolean":case "null":return String(k);
|
137 |
+
case "object":if(!k)return"null";f+=g;l=[];if("[object Array]"===Object.prototype.toString.apply(k)){q=k.length;for(e=0;e<q;e+=1)l[e]=c(e,k)||"null";m=0===l.length?"[]":f?"[\n"+f+l.join(",\n"+f)+"\n"+r+"]":"["+l.join(",")+"]";f=r;return m}if(n&&"object"===typeof n)for(q=n.length,e=0;e<q;e+=1)"string"===typeof n[e]&&(h=n[e],(m=c(h,k))&&l.push(b(h)+(f?": ":":")+m));else for(h in k)Object.prototype.hasOwnProperty.call(k,h)&&(m=c(h,k))&&l.push(b(h)+(f?": ":":")+m);m=0===l.length?"{}":f?"{\n"+f+l.join(",\n"+
|
138 |
+
f)+"\n"+r+"}":"{"+l.join(",")+"}";f=r;return m}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d,e,f,g,h,n;"function"!==typeof JSON.stringify&&(e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
139 |
+
h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((n=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});"function"!==typeof JSON.parse&&(d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(a,
|
140 |
+
b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=String(a);d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=
|
141 |
+
eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var WPacFastjs=WPacFastjs||{emailRegex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,get:function(a,b){return document.querySelector(a+" "+b)},extend:function(a,b){var c={},d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(c[d]=b[d]);return c},create:function(a,b,c,d){a=document.createElement(a);b&&this.addcl(a,b);c&&
|
142 |
a.setAttribute("title",c);d&&a.setAttribute("style",d);return a},addcls:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];0>a.className.indexOf(d)&&(a.className+=" "+d)}},addcl:function(a,b){a&&0>a.className.indexOf(b)&&(a.className+=" "+b,a.className=a.className.trim())},remcl:function(a,b){a&&(a.className=a.className.replace(b," "))},hascl:function(a,b){return a&&-1<a.className.indexOf(b)},on:function(a,b,c){if(a){var d=this;a.addEventListener?a.addEventListener(b,function(b){!1==c.call(a,b)&&
|
143 |
d.stop(b)},!1):a.attachEvent("on"+b,function(b){b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0};b.preventDefault=b.preventDefault||function(){this.returnValue=!1};!1==c.call(a,b)&&d.stop(b)})}},on2:function(a,b,c,d){if(a&&(a=a.querySelector(b)))this.on(a,c,d)},onall:function(a,b,c){for(var d=0;d<a.length;d++)this.on(a[d],b,c)},onall2:function(a,b,c,d){this.onall(a.querySelectorAll(b),c,d)},stop:function(a){a.preventDefault();a.stopPropagation()},parents:function(a,b){var c=a.parentNode,
|
144 |
d=!1;this.each(c.className.split(" "),function(a){!d&&(d=a==b)});return d?c:this.parents(c,b)},parentsel:function(a,b){var c=a.parentNode;return 0>c.tagName.toLowerCase().indexOf(b)?this.parentsel(c,b):c},show:function(a,b){var c=b.querySelector(a);this.show2(c)},show2:function(a){a&&(a.style.display="")},hide:function(a,b){var c=b.querySelector(a);this.hide2(c)},hide2:function(a){a&&(a.style.display="none")},html:function(a,b){a&&(a.innerHTML="",this.isString(b)?a.innerHTML=b:a.appendChild(b))},
|
145 |
prepend:function(a,b){a.insertBefore(b,a.firstChild)},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},rm2:function(a,b){var c=a.querySelector(b);this.rm(c)},each:function(a,b){if("undefined"==typeof a.length)b(a,0);else for(var c=0;c<a.length;c++)b(a[c],c)},css:function(a,b,c){this.isInteger(c)&&(c+="px");a.style[b]=c},child:function(a,b){for(var c=a.children.length;c--;){var d=a.children[c];if(8!=d.nodeType&&-1<d.className.indexOf(b))return d}},children:function(a){for(var b=[],c=a.children.length;c--;)8!=
|
146 |
+
a.children[c].nodeType&&b.unshift(a.children[c]);return b},icss:function(a,b){return a+":"+b+"px!important;"},transCss:function(a,b){var c="overflow-y:hidden!important;-webkit-transition:"+b+" .5s ease-in-out!important;-moz-transition:"+b+" .5s ease-in-out!important;-o-transition:"+b+" .5s ease-in-out!important;transition:"+b+" .5s ease-in-out!important;";a.setAttribute("style",c);return c},prependSlide:function(a,b){var c=this,d=this.transCss(a,"max-height");b.insertBefore(a,b.firstChild);var e=
|
147 |
+
a.offsetHeight;a.setAttribute("style",this.icss("max-height",0)+d);setTimeout(function(){a.setAttribute("style",c.icss("max-height",e)+d);setTimeout(function(){a.setAttribute("style","")},1E3)},1)},slidedwn:function(a){a.style.display="";var b=a.offsetHeight;a.setAttribute("style",this.transCss(a,"height"));a.style.height="0";setTimeout(function(){a.style.height=b+"px";setTimeout(function(){a.setAttribute("style","")},500)},5)},slideup:function(a,b){a.setAttribute("style",this.transCss(a,"height"));
|
148 |
a.style.height=a.offsetHeight+"px";setTimeout(function(){a.style.height="0";setTimeout(function(){a.setAttribute("style","display:none");b&&b()},500)},5)},title:function(){var a=document.getElementsByTagName("title")[0];return a&&a.textContent||""},nextES:function(a){do a=a.nextSibling;while(a&&1!==a.nodeType);return a},next:function(a){return a.nextElementSibling||this.nextES(a)},prevES:function(a){do a=a.previousSibling;while(a&&1!==a.nodeType);return a},prev:function(a){return a.previousElementSibling||
|
149 |
this.prevES(a)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},before:function(a,b){a.parentNode.insertBefore(b,a)},isVisible:function(a){return 0<a.offsetWidth&&0<a.offsetHeight},isInteger:function(a){return a&&0===a%1},isString:function(a){return"string"==typeof a},afun:function(a){var b="wpac_"+Math.floor(1000001*Math.random());window[b]=function(c){window[b]=void 0;try{delete window[b]}catch(d){}a(c)};return b},params:function(a,b,c){var d=[];if(b)for(p in b)d.push(encodeURIComponent(p)+
|
150 |
+
"="+encodeURIComponent(b[p]));c&&d.push("callback="+this.afun(c));return 0<d.length?(b=0>a.indexOf("?")?"?":"&",a+(b+d.join("&"))):a},jsonp:function(a,b,c){var d=document.createElement("script");d.src=this.params(a,b,c);d.type="text/javascript";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(d)},popup:function(a,b,c,d,e,f){e=e||screen.height/2-c/2;f=f||screen.width/2-b/2;return window.open(this.params(a,d),"","location=1,status=1,resizable=yes,width="+
|
151 |
+
b+",height="+c+",top="+e+",left="+f)},inArray:function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},txt:function(a,b){"textContent"in a?a.textContent=b:a.innerText=b},cbs:function(a,b,c,d){if(a.callback&&(a=a.callback[b])&&0<a.length)for(b=0;b<a.length;b++)if(d)a[b].call(d,c);else a[b](c)},extendcbs:function(a,b){a.callback=a.callback||{};for(cb in b)Object.prototype.hasOwnProperty.call(b,cb)&&(Object.prototype.hasOwnProperty.call(a.callback,cb)||(a.callback[cb]=[]),a.callback[cb].push(b[cb]));
|
152 |
return a.callback},isemail:function(a){return this.emailRegex.test(a)},getParam:function(a){if(location.search&&-1<location.search.indexOf(a)){if(!this.urlparams){this.urlParams={};var b=this;location.search.substr(1).split("&").forEach(function(a){a=a.split("=");b.urlParams[a[0]]=decodeURIComponent(a[1])})}return this.urlParams[a]}},urlsToHyperlinks:function(a){return a.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$1" target="_blank">$1</a>').replace(/(^|[^\/])(www\.[\S]+(\b|$))/ig,
|
153 |
+
'$1<a href="http://$2" target="_blank" rel="nofollow">$2</a>')},escapeHtml:function(a){return a?document.createElement("div").appendChild(document.createTextNode(a)).parentNode.innerHTML:""},escapeHtmlWithLinks:function(a){return this.urlsToHyperlinks(this.escapeHtml(a))}};String.prototype.trim||(String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.capitalize||(String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)});var WPacSVGIcon=WPacSVGIcon||function(){var a=function(a,b,c,g,h){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+b+'" viewBox="'+(h||"0 0 1792 1792")+'"><path d="'+g+'"'+(c?' fill="'+c+'"':"")+"/></svg>"},b=function(a,b,c,g,h){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+b+'" viewBox="'+c+'"><g transform="translate('+g+') scale(0.05,-0.05)"><path fill="#fff" d="'+h+'"></path></g></svg>'},c={star_o:"M1201 1004l306-297-422-62-189-382-189 382-422 62 306 297-73 421 378-199 377 199zm527-357q0 22-26 48l-363 354 86 500q1 7 1 20 0 50-41 50-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z",
|
154 |
star_half:"M1250 957l257-250-356-52-66-10-30-60-159-322v963l59 31 318 168-60-355-12-66zm452-262l-363 354 86 500q5 33-6 51.5t-34 18.5q-17 0-40-12l-449-236-449 236q-23 12-40 12-23 0-34-18.5t-6-51.5l86-500-364-354q-32-32-23-59.5t54-34.5l502-73 225-455q20-41 49-41 28 0 49 41l225 455 502 73q45 7 54 34.5t-24 59.5z",star:"M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z"};
|
155 |
return{path:c,star_o:a(22,22,"#ccc",c.star_o),star_half:a(22,22,"#ff9800",c.star_half),star:a(22,22,"#ff9800",c.star),pencil:a(14,14,"#666","M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"),caret:a(14,14,"#666","M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"),
|
156 |
check:a(14,14,"#666","M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"),reply:a(14,14,"#666","M1792 640q0 26-19 45l-512 512q-19 19-45 19t-45-19-19-45v-256h-224q-98 0-175.5 6t-154 21.5-133 42.5-105.5 69.5-80 101-48.5 138.5-17.5 181q0 55 5 123 0 6 2.5 23.5t2.5 26.5q0 15-8.5 25t-23.5 10q-16 0-28-17-7-9-13-22t-13.5-30-10.5-24q-127-285-127-451 0-199 53-333 162-403 875-403h224v-256q0-26 19-45t45-19 45 19l512 512q19 19 19 45z"),
|
175 |
"0 0 256 256"),vkontakte:b(64,64,"0 0 110 110","7,82","M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z"),
|
176 |
odnoklassniki:b(64,64,"0 0 105 105","20,84","M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z"),
|
177 |
mailru:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="114" height="114" viewBox="0 0 114 114"><path fill="#fff" d="M41.93,30.296c-3.896,0-7.066,3.169-7.066,7.065s3.17,7.067,7.066,7.067s7.064-3.171,7.064-7.067 S45.825,30.296,41.93,30.296z"></path><path fill="#fff" d="M72.223,30.296c-3.896,0-7.065,3.169-7.065,7.065s3.17,7.067,7.065,7.067s7.064-3.171,7.064-7.067 S76.117,30.296,72.223,30.296z"></path><path fill="#fff" d="M96.324,77.49c0.299-1.112,0.146-2.273-0.428-3.271l-8.785-15.268c-0.769-1.332-2.199-2.16-3.738-2.16 c-0.75,0-1.492,0.199-2.146,0.576c-0.998,0.574-1.711,1.502-2.012,2.613c-0.299,1.111-0.146,2.272,0.428,3.271l0.703,1.226 l-0.342,0.494c-4.232,6.111-13.26,10.061-22.994,10.061c-9.67,0-18.668-3.911-22.926-9.965l-0.352-0.5l0.754-1.289 c1.199-2.049,0.507-4.694-1.543-5.896c-0.66-0.385-1.41-0.589-2.17-0.589c-1.528,0-2.955,0.816-3.725,2.133l-8.935,15.27 c-1.199,2.05-0.507,4.695,1.543,5.895c0.659,0.387,1.411,0.59,2.172,0.59c1.527,0,2.954-0.815,3.724-2.132l3.496-5.974l0.871,0.876 c6.447,6.481,16.32,10.2,27.09,10.2c10.778,0,20.658-3.725,27.104-10.215l0.879-0.885l3.436,5.969 c0.768,1.332,2.2,2.159,3.739,2.159c0.751,0,1.492-0.198,2.144-0.573C95.311,79.529,96.023,78.602,96.324,77.49z"></path></svg>',
|
178 |
+
icon:function(b,e,f){return a(e,e,f||"#666",c[b])}}}();var WPacTime=WPacTime||{getTime:function(a,b,c){return"chat"==c?this.getChatTime(a,b||"ru"):c?this.getFormatTime(a,c,b||"ru"):this.getDefaultTime(a,b||"ru")},getChatTime:function(a,b){var c=((new Date).getTime()-a)/1E3/60/60,d=c/24;return 24>c?this.getFormatTime(a,"HH:mm",b):365>d?this.getFormatTime(a,"dd.MM HH:mm",b):this.getFormatTime(a,"yyyy.MM.dd HH:mm",b)},getDefaultTime:function(a,b){return this.getTimeAgo(a,b)},getTimeAgo:function(a,b){var c=((new Date).getTime()-a)/1E3,d=c/60,e=d/60,f=e/24,
|
179 |
+
g=f/365;b=WPacTime.Messages[b]?b:"en";return 45>c?WPacTime.Messages[b].second:90>c?WPacTime.Messages[b].minute:45>d?WPacTime.Messages[b].minutes(d):90>d?WPacTime.Messages[b].hour:24>e?WPacTime.Messages[b].hours(e):48>e?WPacTime.Messages[b].day:30>f?WPacTime.Messages[b].days(f):60>f?WPacTime.Messages[b].month:365>f?WPacTime.Messages[b].months(f):2>g?WPacTime.Messages[b].year:WPacTime.Messages[b].years(g)},getTime12:function(a,b){var c=new Date(a);return(c.getHours()%12?c.getHours()%12:12)+":"+c.getMinutes()+
|
180 |
+
(12<=c.getHours()?" PM":" AM")},getFormatTime:function(a,b,c){var d=new Date(a),e={SS:d.getMilliseconds(),ss:d.getSeconds(),mm:d.getMinutes(),HH:d.getHours(),hh:(d.getHours()%12?d.getHours()%12:12)+(12<=d.getHours()?"PM":"AM"),dd:d.getDate(),MM:d.getMonth()+1,yyyy:d.getFullYear(),yy:String(d.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,c),12:this.getTime12(a,c)};return b.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(a,b){var c=e[b];return 10>c?"0"+c:c})},declineNum:function(a,
|
181 |
+
b,c,d){return a+" "+this.declineMsg(a,b,c,d)},declineMsg:function(a,b,c,d,e){var f=a%10;return 1==f&&(1==a||20<a)?b:1<f&&5>f&&(20<a||10>a)?c:a?d:e}};
|
182 |
WPacTime.Messages={ru:{second:"\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e",minute:"\u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434")},hour:"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434",hours:function(a){return WPacTime.declineNum(Math.round(a),
|
183 |
"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434")},day:"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434")},month:"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434",
|
184 |
months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434")},year:"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434","\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434",
|
210 |
minutes:function(a){return WPacTime.declineNum(Math.round(a),"un minuto fa","minuti fa","minuti fa")},hour:"un'ora fa",hours:function(a){return WPacTime.declineNum(Math.round(a),"un'ora fa","ore fa","ore fa")},day:"un giorno fa",days:function(a){return WPacTime.declineNum(Math.round(a),"un giorno fa","giorni fa","giorni fa")},month:"un mese fa",months:function(a){return WPacTime.declineNum(Math.round(a/30),"un mese fa","mesi fa","mesi fa")},year:"un anno fa",years:function(a){return WPacTime.declineNum(Math.round(a),
|
211 |
"un anno fa","anni fa","anni fa")}}};var WPacStars=WPacStars||{html:'<span class="wp-stars">{{~it.stars :c}}{{?it.rating >= c}}<span class="wp-star" data-origin="star" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star", it.size || 24, it.color)}}</span>{{??}}{{?c - it.rating < 1}}<span class="wp-star" data-origin="star_half" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_half", it.size || 24, it.color)}}</span>{{??}}<span class="wp-star" data-origin="star_o" data-color="#ccc" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_o", it.size || 24, "#ccc")}}</span>{{?}}{{?}}{{~}}</span>',
|
212 |
main:function(a){var b=this,c=(a.cnt||document).querySelector(a.el);c.innerHTML=this.stars_render(a.size,a.color,a.stars,a.sum,a.count);if(!a.readonly){var c=c.querySelector(".wp-stars"),d=c.querySelectorAll(".wp-star");WPacFastjs.on(c,"mouseleave",function(a){WPacFastjs.each(d,function(a){var b=a.querySelector("path");a.setAttribute("data-hover","");b.setAttribute("d",WPacSVGIcon.path[a.getAttribute("data-origin")]);b.setAttribute("fill",a.getAttribute("data-color"))})});WPacFastjs.onall(d,"mouseout",
|
213 |
+
function(){b.prevHover(a,this);b.nextHover(a,this)});WPacFastjs.onall(d,"click",function(){var c=parseInt(this.getAttribute("data-star"));a.clickable&&(this.parentNode.setAttribute("data-star",c),WPacFastjs.each(d,function(d){d.getAttribute("data-star")<=c?(d.setAttribute("data-origin","star"),d.setAttribute("data-color",b.color(a.color))):(d.setAttribute("data-origin","star_o"),d.setAttribute("data-color","#ccc"))}));a.cb&&a.cb(c)})}},stars_render:function(a,b,c,d,e){return this.render("html",{size:a,
|
214 |
+
color:this.color(b),stars:this.stars(c||5),rating:this.rating(d,e)})},rating_render:function(a,b,c,d){return this.render("html",{size:b,color:this.color(c),stars:this.stars(d||5),rating:a})},color:function(a){return a?a.match(/^#[0-9a-zA-Z]+$/)?a:"#"+a:"#ff9800"},render:function(a,b){b.svg=WPacSVGIcon;return doT.template(this[a]||a)(b)},stars:function(a){for(var b=[],c=1;c<=a;c++)b.push(c);return b},rating:function(a,b){b=b||0;return 0<b?((a||0)/b).toFixed(1):0},prevHover:function(a,b){if(b){var c=
|
215 |
b.getAttribute("data-hover");c&&"off"!=c||(c=b.querySelector("path"),c.setAttribute("d",WPacSVGIcon.path.star),c.setAttribute("fill",this.color(a.color)),b.setAttribute("data-hover","on"));this.prevHover(a,WPacFastjs.prev(b))}},nextHover:function(a,b){var c=WPacFastjs.next(b);if(c){var d=c.getAttribute("data-hover");d&&"on"!=d||(d=c.querySelector("path"),d.setAttribute("d",WPacSVGIcon.path.star_o),d.setAttribute("fill","#ccc"),c.setAttribute("data-hover","off"));this.nextHover(a,c)}}};var GRPPlaceFinder=GRPPlaceFinder||{_HTML:'<div class="wp-gri"><div class="row"><div class="col-sm-4"><div class="form form400 form-horizontal"><h4 class="text-left"><span class="wp-step">1</span>Find Place</h4><div class="form-group"><div class="col-sm-12"><input type="text" class="wp-place form-control" placeholder="Google Place Search Query"></div></div><div class="form-group wp-gkey-cnt" style="display:none"><div class="col-sm-12"><input type="text" class="wp-gkey form-control" placeholder="Google API Key" {{?it.google_api_key}}value="{{=it.google_api_key}}"{{?}}><small>Default limit of requests to Google Places API exceeded, to continue <a href="https://developers.google.com/places/web-service/get-api-key" target="_blank">get Google Places API key</a></small></div></div><div class="form-group"><div class="col-sm-12"><button class="wp-get-place btn btn-block btn-primary">Search Place</button></div></div><div class="form-group"><div class="col-sm-12"><h4 class="text-left"><span class="wp-step">2</span>Choice Place</h4><div class="wp-places"></div></div></div><div class="form-group"><div class="col-sm-12"><h4 class="text-left"><span class="wp-step">3</span>Save Place</h4><div class="wp-reviews"></div></div></div></div></div>{{?it.post_content}}{{=it.post_content}}{{?}}</div></div>',
|
216 |
_PLACE_HTML:'<div class="media-left"><img class="media-object" src="{{=it.place.icon}}" alt="{{=it.place.name}}" style="width:32px;height:32px;"></div><div class="media-body"><h5 class="media-heading">{{=it.place.name}}</h5><div>{{?it.place.rating}}<span class="wp-grating">{{=it.place.rating}}</span><span class="wp-gstars"></span>{{?}}</div><small class="text-muted">{{=it.place.formatted_address}}</small></div>',_REVIEW_HTML:'<div class="media-left"><img class="media-object" src="{{=it.review.profile_photo_url || it.defava}}" alt="{{=it.review.author_name}}" onerror="if(this.src!=\'{{=it.defava}}\')this.src=\'{{=it.defava}}\';"></div><div class="media-body"><div class="media-heading"><a href="{{=it.review.author_url}}" target="_blank">{{=it.review.author_name}}</a></div><div class="wp-gtime">{{=it.time}}</div><div class="wp-gtext"><span class="wp-gstars"></span> {{=it.text}}</div></div>',
|
217 |
+
_TEXT_HTML:'{{!it.t}} {{?it.h}}<span class="wp-more">{{!it.h}}</span><span class="wp-more-toggle" onclick="this.previousSibling.className=\'\';this.textContent=\'\';">read more</span>{{?}}',main:function(a){var b=this,c=document.getElementById(a.el||"wpac-greview-install");c.innerHTML=doT.template(b._HTML)({post_content:a.post_content,google_api_key:a.google_api_key});WPacFastjs.on2(c,".wp-get-place","click",function(){var d=c.querySelector(".wp-place").value;/^ChIJ.*$/.test(d)?(c.querySelector(".wp-places").innerHTML=
|
218 |
+
"",b.details(a,c,d,!0)):b.textsearch(a,c,d);return!1})},textsearch:function(a,b,c){var d=this,e=b.querySelector(".wp-gkey").value,f=this.getLang();jQuery.get(a.app_host,{cf_action:"textsearch",query:c,key:e,lang:f,_textsearch_wpnonce:jQuery(a.nonce).val()},function(g){if("GOOGLE_COULDNT_CONNECT"==g.error)WPacXDM.post("https://app.widgetpack.com","https://app.widgetpack.com/widget/google-review/place",{query:c,key:e,lang:f},function(c){return d.textsearchCallback(a,b,c.error,c)});else return d.textsearchCallback(a,
|
219 |
+
b,g.error,g.places)},"json")},textsearchCallback:function(a,b,c,d){var e=b.querySelector(".wp-gkey").parentNode.parentNode;if("OVER_QUERY_LIMIT"==c)WPacFastjs.show2(e),WPacFastjs.addcl(e,"has-error");else if(WPacFastjs.remcl(e,"has-error"),c=b.querySelector(".wp-places"),!d||1>d.length)c.innerHTML='<div class="wp-place-info">Business place not found.<br><br>Please check that this place can be found in <a href="https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder" target="_blank">Google PlaceID Finder</a>, if so just a copy <b>Place ID</b> to a search field and search again.</div>';
|
220 |
+
else{c.innerHTML="";var f=this;WPacFastjs.each(d,function(c){f.place(a,b,c,function(c,d){WPacFastjs.on(d,"click",function(){var e=b.querySelector(".wp-place-info.wp-active");WPacFastjs.remcl(e,"wp-active");WPacFastjs.addcl(d,"wp-active");f.details(a,b,c.place_id,!1)})})});c.appendChild(f.powered_by_google(a))}},place:function(a,b,c,d){a=b.querySelector(".wp-places");b=WPacFastjs.create("div","wp-place-info media",c.formatted_address);b.innerHTML=doT.template(this._PLACE_HTML)({place:c});a.appendChild(b);
|
221 |
+
c.rating&&(b.querySelector(".wp-gstars").innerHTML=WPacStars.rating_render(c.rating,16,"e7711b"));return d&&d(c,b)},details:function(a,b,c,d){var e=this,f=b.querySelector(".wp-gkey").value,g=this.getLang();jQuery.get(a.app_host,{cf_action:"details",placeid:c,key:f,lang:g,_textsearch_wpnonce:jQuery(a.nonce).val()},function(h){if("GOOGLE_COULDNT_CONNECT"==h.error)WPacXDM.post("https://app.widgetpack.com","https://app.widgetpack.com/widget/google-review/review",{placeid:c,key:f,lang:g},function(c){return e.detailsCallback(a,
|
222 |
+
b,c,d,e.saveJSON)});else return e.detailsCallback(a,b,h,d,e.save)},"json")},detailsCallback:function(a,b,c,d,e){var f=b.querySelector(".wp-gkey").parentNode.parentNode;if("OVER_QUERY_LIMIT"==c.error)WPacFastjs.show2(f),WPacFastjs.addcl(f,"has-error");else{WPacFastjs.remcl(f,"has-error");var g=b.querySelector(".wp-reviews");if(c.place&&(!c.place.reviews||1>c.place.reviews.length))g.innerHTML='<div class="wp-place-info">There are no reviews yet for this business</div>';else{g.innerHTML="";d&&this.place(a,
|
223 |
+
b,c.place,function(a,b){WPacFastjs.addcl(b,"wp-active")});var h=this;WPacFastjs.each(c.place.reviews,function(b){var c=WPacFastjs.create("div","wp-place-info media");c.innerHTML=doT.template(h._REVIEW_HTML)({review:b,text:h.text(a,b.text),time:WPacTime.getTime(parseInt(1E3*b.time),a.lang,"ago"),defava:"https://lh3.googleusercontent.com/-8hepWJzFXpE/AAAAAAAAAAI/AAAAAAAAAAA/I80WzYfIxCQ/s64-c/114307615494839964028.jpg"});g.appendChild(c);c.querySelector(".wp-gstars").innerHTML=WPacStars.rating_render(b.rating,
|
224 |
+
14,"e7711b")});g.appendChild(h.powered_by_google(a));(d=WPacFastjs.next(g))&&WPacFastjs.rm(d);d=WPacFastjs.create("button","btn btn-block btn-primary");d.innerHTML="Save Place and Reviews";WPacFastjs.after(g,d);WPacFastjs.on(d,"click",function(){e(a,b,c);return!1})}}},save:function(a,b,c){jQuery.post(a.app_host+"&cf_action=save",{placeid:c.place.place_id,key:b.querySelector(".wp-gkey").value,_textsearch_wpnonce:jQuery(a.nonce).val()},function(d){var e=b.querySelector(".wp-gkey").parentNode.parentNode;
|
225 |
+
"OVER_QUERY_LIMIT"==d.error?(WPacFastjs.show2(e),WPacFastjs.addcl(e,"has-error")):(WPacFastjs.remcl(e,"has-error"),WPacFastjs.cbs(a,"add",c.place))},"json")},saveJSON:function(a,b,c){jQuery.post(a.app_host+"&cf_action=save_json",{place:JSON.stringify(c.place),reviews:JSON.stringify(c.place.reviews),_textsearch_wpnonce:jQuery(a.nonce).val()},function(d){var e=b.querySelector(".wp-gkey").parentNode.parentNode;"OVER_QUERY_LIMIT"==d.error?(WPacFastjs.show2(e),WPacFastjs.addcl(e,"has-error")):(WPacFastjs.remcl(e,
|
226 |
+
"has-error"),WPacFastjs.cbs(a,"add",c.place))},"json")},text:function(a,b){var c=a.text_size||100,d=b,e=!1;if(b&&b.length>c){var f=b.lastIndexOf(" ",c),f=0<f?f:c;0<f&&(d=b.substring(0,f),e=b.substring(f,b.length))}return doT.template(this._TEXT_HTML)({t:d,h:e})},powered_by_google:function(a){a=WPacFastjs.create("div","wp-glogo");a.innerHTML='<img src="data:image/png;base64,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" alt="powered by Google">';
|
227 |
+
return a},getLang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()}};
|
|