Version Description
New Datasource: Fastah Web API (beta), see https://aws.amazon.com/marketplace/pp/prodview-k5gjowexrefl2
AJAX mode:
* NEW: The JS function geoip_detect.set_override_with_merge
can modify the override record in one property, merging it with the currently saved property
Other minor changes:
* FIX: In non-AJAX mode, properties such as "extra.original.zip" can be accessed again
* FIX: Automatic download of Maxmind database now also works when the temp folder is group/world writeable (as in AWS configurations)
* If you want to enable more Warnings (e.g. while debugging), you can add define('GEOIP_DETECT_DEBUG', true)
to your wp-config.php or so.
* Library updates
Download this release
Release Info
Developer | benjamin4 |
Plugin | GeoIP Detection |
Version | 5.1.0 |
Comparing to | |
See all releases |
Code changes from version 5.0.0 to 5.1.0
- admin-ui.php +6 -6
- ajax.php +8 -8
- api.php +7 -6
- check_compatibility.php +1 -1
- check_requirements.php +2 -2
- composer.json +15 -5
- data-sources/abstract.php +3 -3
- data-sources/auto.php +10 -10
- data-sources/fastah.php +279 -0
- data-sources/header.php +4 -4
- data-sources/hostinfo.php +5 -5
- data-sources/ipstack.php +7 -7
- data-sources/manual.php +5 -5
- data-sources/precision.php +7 -7
- data-sources/registry.php +5 -5
- filter.php +2 -2
- geoip-detect-lib.php +11 -24
- geoip-detect.php +5 -4
- init.php +6 -2
- js/dist/backend.f84e1103.js +0 -4
- js/dist/backend.f84e1103.js.map +0 -1
- js/dist/frontend.1115d690.js +0 -41
- js/dist/frontend.1115d690.js.map +0 -1
- js/dist/frontend.e1ec2aa3.js +0 -41
- js/dist/frontend.e1ec2aa3.js.map +0 -1
- js/dist/frontend.e2558764.js +0 -41
- js/dist/frontend.e2558764.js.map +0 -1
- js/dist/frontend.js +1 -1
- js/dist/frontend.js.map +1 -1
- js/dist/parcel.js +0 -3
- js/dist/parcel.json +0 -4
- js/dist/parcel.urls +0 -2
- js/frontend.js +2 -1
- js/lodash.custom.js +0 -1810
- js/lodash.custom.min.js +0 -18
- lib/ccpa.php +6 -6
- lib/geonames/geonames-country-info.php +2 -2
- lib/logger.php +2 -2
- package.json +12 -12
- readme.txt +17 -3
- shortcodes/_helpers.php +1 -1
- shortcodes/cf7.php +7 -7
- shortcodes/flags.php +1 -1
- shortcodes/input.php +1 -1
- shortcodes/main.php +4 -4
- shortcodes/show_if.php +1 -1
- vendor/composer/ClassLoader.php +141 -14
- vendor/composer/InstalledVersions.php +350 -0
- vendor/composer/installed.php +149 -0
- vendor/composer/platform_check.php +26 -0
- vendor/symfony/deprecation-contracts/CHANGELOG.md +1 -1
- vendor/symfony/deprecation-contracts/LICENSE +1 -1
- vendor/symfony/deprecation-contracts/composer.json +1 -1
- vendor/symfony/polyfill-intl-grapheme/Grapheme.php +12 -2
- vendor/symfony/polyfill-intl-grapheme/composer.json +1 -1
- vendor/symfony/polyfill-intl-normalizer/bootstrap80.php +3 -0
- vendor/symfony/polyfill-intl-normalizer/composer.json +1 -1
- vendor/symfony/polyfill-mbstring/Mbstring.php +33 -29
- vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1 -1
- vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +102 -27
- vendor/symfony/polyfill-mbstring/bootstrap.php +1 -1
- vendor/symfony/polyfill-mbstring/bootstrap80.php +3 -0
- vendor/symfony/polyfill-mbstring/composer.json +4 -1
- vendor/symfony/property-info/CHANGELOG.md +12 -1
- vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php +4 -0
- vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php +4 -0
- vendor/symfony/property-info/Extractor/ConstructorExtractor.php +2 -3
- vendor/symfony/property-info/Extractor/PhpDocExtractor.php +30 -22
- vendor/symfony/property-info/Extractor/PhpStanExtractor.php +274 -0
- vendor/symfony/property-info/Extractor/ReflectionExtractor.php +56 -39
- vendor/symfony/property-info/LICENSE +1 -1
- vendor/symfony/property-info/PhpStan/NameScope.php +65 -0
- vendor/symfony/property-info/PhpStan/NameScopeFactory.php +68 -0
- vendor/symfony/property-info/PropertyInfoExtractor.php +8 -5
- vendor/symfony/property-info/README.md +5 -5
- vendor/symfony/property-info/Type.php +84 -3
- vendor/symfony/property-info/Util/PhpDocTypeHelper.php +14 -3
- vendor/symfony/property-info/Util/PhpStanTypeHelper.php +188 -0
- vendor/symfony/property-info/composer.json +7 -6
- vendor/symfony/string/AbstractString.php +68 -0
- vendor/symfony/string/AbstractUnicodeString.php +56 -16
- vendor/symfony/string/CHANGELOG.md +10 -0
- vendor/symfony/string/Inflector/EnglishInflector.php +33 -0
- vendor/symfony/string/Inflector/InflectorInterface.php +2 -2
- vendor/symfony/string/LICENSE +1 -1
- vendor/symfony/string/README.md +5 -5
- vendor/symfony/string/Resources/data/wcswidth_table_wide.php +40 -24
- vendor/symfony/string/Resources/data/wcswidth_table_zero.php +45 -9
- vendor/symfony/string/Slugger/AsciiSlugger.php +31 -7
- vendor/symfony/string/composer.json +6 -3
- views/lookup.php +7 -2
- views/options.php +10 -6
admin-ui.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
/*
|
3 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
4 |
Author: Benjamin Pick (wp-geoip-detect| |posteo.de)
|
@@ -78,7 +78,7 @@ function geoip_detect_lookup_page()
|
|
78 |
$request_ip = geoip_detect_is_ip($ip) ? $ip : '';
|
79 |
$request_skipCache = !empty($_POST['skip_cache']);
|
80 |
$request_skipLocalCache = !empty($_POST['skip_local_cache']);
|
81 |
-
$options =
|
82 |
|
83 |
$request_locales = null;
|
84 |
if (!empty($_POST['locales'])) {
|
@@ -157,10 +157,10 @@ function geoip_detect_option_page() {
|
|
157 |
$registry = DataSourceRegistry::getInstance();
|
158 |
$sources = $registry->getAllSources();
|
159 |
|
160 |
-
$messages =
|
161 |
|
162 |
-
$numeric_options =
|
163 |
-
$text_options =
|
164 |
$option_names = array_merge($numeric_options, $text_options);
|
165 |
|
166 |
$action = isset($_POST['action']) ? sanitize_key($_POST['action']) : '';
|
@@ -241,7 +241,7 @@ function geoip_detect_option_page() {
|
|
241 |
|
242 |
$currentSource = $registry->getCurrentSource();
|
243 |
|
244 |
-
$wp_options =
|
245 |
foreach ($option_names as $opt_name) {
|
246 |
$wp_options[$opt_name] = get_option('geoip-detect-'. $opt_name);
|
247 |
}
|
1 |
+
<?php
|
2 |
/*
|
3 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
4 |
Author: Benjamin Pick (wp-geoip-detect| |posteo.de)
|
78 |
$request_ip = geoip_detect_is_ip($ip) ? $ip : '';
|
79 |
$request_skipCache = !empty($_POST['skip_cache']);
|
80 |
$request_skipLocalCache = !empty($_POST['skip_local_cache']);
|
81 |
+
$options = [ 'skipCache' => $request_skipCache, 'skipLocalCache' => $request_skipLocalCache ];
|
82 |
|
83 |
$request_locales = null;
|
84 |
if (!empty($_POST['locales'])) {
|
157 |
$registry = DataSourceRegistry::getInstance();
|
158 |
$sources = $registry->getAllSources();
|
159 |
|
160 |
+
$messages = [];
|
161 |
|
162 |
+
$numeric_options = [ 'set_css_country', 'has_reverse_proxy', 'disable_pagecache', 'ajax_enabled', 'ajax_enqueue_js', 'ajax_set_css_country', 'ajax_shortcodes' ];
|
163 |
+
$text_options = [ 'external_ip', 'trusted_proxy_ips' ];
|
164 |
$option_names = array_merge($numeric_options, $text_options);
|
165 |
|
166 |
$action = isset($_POST['action']) ? sanitize_key($_POST['action']) : '';
|
241 |
|
242 |
$currentSource = $registry->getCurrentSource();
|
243 |
|
244 |
+
$wp_options = [];
|
245 |
foreach ($option_names as $opt_name) {
|
246 |
$wp_options[$opt_name] = get_option('geoip-detect-'. $opt_name);
|
247 |
}
|
ajax.php
CHANGED
@@ -31,6 +31,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
31 |
*/
|
32 |
|
33 |
function geoip_detect_ajax_get_info_from_current_ip() {
|
|
|
|
|
|
|
|
|
|
|
34 |
// Do not cache this response!
|
35 |
if (!headers_sent()) {
|
36 |
header('Cache-Control: no-cache, no-store, must-revalidate');
|
@@ -38,11 +43,6 @@ function geoip_detect_ajax_get_info_from_current_ip() {
|
|
38 |
header('Expires: 0');
|
39 |
header('Content-Type: application/json');
|
40 |
}
|
41 |
-
|
42 |
-
// Enabled in preferences? If not, do as if the plugin doesn't even exist.
|
43 |
-
if (!get_option('geoip-detect-ajax_enabled')) {
|
44 |
-
return;
|
45 |
-
}
|
46 |
|
47 |
if (!defined( 'DOING_AJAX' ))
|
48 |
_geoip_detect_ajax_error('This method is for AJAX only.');
|
@@ -80,14 +80,14 @@ function _geoip_detect_get_domain_name($url) {
|
|
80 |
}
|
81 |
|
82 |
function _geoip_detect_ajax_error($error) {
|
83 |
-
$data =
|
84 |
$data['is_empty'] = true;
|
85 |
_geoip_detect_disable_pagecache();
|
86 |
wp_send_json($data, 412);
|
87 |
}
|
88 |
|
89 |
|
90 |
-
function _geoip_detect_ajax_get_data($options =
|
91 |
$info = geoip_detect2_get_info_from_current_ip(['en'], $options);
|
92 |
$data = $info->jsonSerialize();
|
93 |
|
@@ -121,7 +121,7 @@ function _geoip_detect_register_javascript() {
|
|
121 |
// return;
|
122 |
// }
|
123 |
|
124 |
-
wp_register_script('geoip-detect-js', GEOIP_DETECT_PLUGIN_URI . 'js/dist/frontend.js',
|
125 |
$data = [
|
126 |
'ajaxurl' => admin_url('/admin-ajax.php'),
|
127 |
'default_locales' => apply_filters('geoip_detect2_locales', null),
|
31 |
*/
|
32 |
|
33 |
function geoip_detect_ajax_get_info_from_current_ip() {
|
34 |
+
// Enabled in preferences? If not, do as if the plugin doesn't even exist.
|
35 |
+
if (!get_option('geoip-detect-ajax_enabled')) {
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
|
39 |
// Do not cache this response!
|
40 |
if (!headers_sent()) {
|
41 |
header('Cache-Control: no-cache, no-store, must-revalidate');
|
43 |
header('Expires: 0');
|
44 |
header('Content-Type: application/json');
|
45 |
}
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
if (!defined( 'DOING_AJAX' ))
|
48 |
_geoip_detect_ajax_error('This method is for AJAX only.');
|
80 |
}
|
81 |
|
82 |
function _geoip_detect_ajax_error($error) {
|
83 |
+
$data = [ 'extra' => [ 'error' => $error ] ];
|
84 |
$data['is_empty'] = true;
|
85 |
_geoip_detect_disable_pagecache();
|
86 |
wp_send_json($data, 412);
|
87 |
}
|
88 |
|
89 |
|
90 |
+
function _geoip_detect_ajax_get_data($options = []) {
|
91 |
$info = geoip_detect2_get_info_from_current_ip(['en'], $options);
|
92 |
$data = $info->jsonSerialize();
|
93 |
|
121 |
// return;
|
122 |
// }
|
123 |
|
124 |
+
wp_register_script('geoip-detect-js', GEOIP_DETECT_PLUGIN_URI . 'js/dist/frontend.js', [], GEOIP_DETECT_VERSION, true);
|
125 |
$data = [
|
126 |
'ajaxurl' => admin_url('/admin-ajax.php'),
|
127 |
'default_locales' => apply_filters('geoip_detect2_locales', null),
|
api.php
CHANGED
@@ -41,7 +41,7 @@ use YellowTree\GeoipDetect\Lib\GetClientIp;
|
|
41 |
* @since 2.5.0 Parameter $skipCache has been renamed to $options with 'skipCache' property
|
42 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
43 |
*/
|
44 |
-
function geoip_detect2_get_info_from_ip(string $ip, $locales = null, $options =
|
45 |
if(defined('GEOIP_DETECT_LOOKUP_DISABLED') && GEOIP_DETECT_LOOKUP_DISABLED) {
|
46 |
trigger_error('Geolocation IP Detection: The lookup is currently disabled (Error: could not initialize the plugin).');
|
47 |
return _geoip_detect2_get_new_empty_record('', 'The lookup is currently disabled (Error: could not initialize the plugin).');
|
@@ -60,7 +60,7 @@ function geoip_detect2_get_info_from_ip(string $ip, $locales = null, $options =
|
|
60 |
|
61 |
|
62 |
// 2) Doing the Lookup
|
63 |
-
$data =
|
64 |
/**
|
65 |
* Filter: geoip_detect2_record_data_override_lookup
|
66 |
* Before doing the lookup, changing the data (similar to a cache but also when skipCache is on).
|
@@ -84,13 +84,14 @@ function geoip_detect2_get_info_from_ip(string $ip, $locales = null, $options =
|
|
84 |
|
85 |
$data = _geoip_detect2_record_enrich_data($record, $ip, $outSourceId, $lookupError);
|
86 |
|
87 |
-
if (
|
88 |
trigger_error($lookupError, E_USER_NOTICE);
|
89 |
}
|
90 |
|
91 |
// Save result to cache, but no "IP not found in database" or similar errors
|
92 |
-
if (!$lookupError)
|
93 |
_geoip_detect2_add_data_to_cache($data, $ip);
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -145,7 +146,7 @@ function geoip_detect2_get_info_from_ip(string $ip, $locales = null, $options =
|
|
145 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
146 |
* @since 5.0.0 The result of this function is cached for the duration of the PHP execution (except if you use skipLocalCache)
|
147 |
*/
|
148 |
-
function geoip_detect2_get_info_from_current_ip($locales = null, $options =
|
149 |
/** @var \YellowTree\GeoipDetect\DataSources\City */
|
150 |
static $cache = null;
|
151 |
|
@@ -184,7 +185,7 @@ function geoip_detect2_get_info_from_current_ip($locales = null, $options = arra
|
|
184 |
* @since 2.5.0 new parameter $options
|
185 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
186 |
*/
|
187 |
-
function geoip_detect2_get_reader($locales = null, $options =
|
188 |
_geoip_maybe_disable_pagecache();
|
189 |
$options = _geoip_detect2_process_options($options);
|
190 |
|
41 |
* @since 2.5.0 Parameter $skipCache has been renamed to $options with 'skipCache' property
|
42 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
43 |
*/
|
44 |
+
function geoip_detect2_get_info_from_ip(string $ip, $locales = null, $options = []) : \YellowTree\GeoipDetect\DataSources\City {
|
45 |
if(defined('GEOIP_DETECT_LOOKUP_DISABLED') && GEOIP_DETECT_LOOKUP_DISABLED) {
|
46 |
trigger_error('Geolocation IP Detection: The lookup is currently disabled (Error: could not initialize the plugin).');
|
47 |
return _geoip_detect2_get_new_empty_record('', 'The lookup is currently disabled (Error: could not initialize the plugin).');
|
60 |
|
61 |
|
62 |
// 2) Doing the Lookup
|
63 |
+
$data = [];
|
64 |
/**
|
65 |
* Filter: geoip_detect2_record_data_override_lookup
|
66 |
* Before doing the lookup, changing the data (similar to a cache but also when skipCache is on).
|
84 |
|
85 |
$data = _geoip_detect2_record_enrich_data($record, $ip, $outSourceId, $lookupError);
|
86 |
|
87 |
+
if (GEOIP_DETECT_DEBUG && !defined('GEOIP_DETECT_DOING_UNIT_TESTS') && $lookupError) {
|
88 |
trigger_error($lookupError, E_USER_NOTICE);
|
89 |
}
|
90 |
|
91 |
// Save result to cache, but no "IP not found in database" or similar errors
|
92 |
+
if (!$lookupError) {
|
93 |
_geoip_detect2_add_data_to_cache($data, $ip);
|
94 |
+
}
|
95 |
}
|
96 |
|
97 |
/**
|
146 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
147 |
* @since 5.0.0 The result of this function is cached for the duration of the PHP execution (except if you use skipLocalCache)
|
148 |
*/
|
149 |
+
function geoip_detect2_get_info_from_current_ip($locales = null, $options = []) {
|
150 |
/** @var \YellowTree\GeoipDetect\DataSources\City */
|
151 |
static $cache = null;
|
152 |
|
185 |
* @since 2.5.0 new parameter $options
|
186 |
* @since 2.7.0 Parameter $options['source'] has been introduced
|
187 |
*/
|
188 |
+
function geoip_detect2_get_reader($locales = null, $options = []) {
|
189 |
_geoip_maybe_disable_pagecache();
|
190 |
$options = _geoip_detect2_process_options($options);
|
191 |
|
check_compatibility.php
CHANGED
@@ -68,7 +68,7 @@ class Maxmind {
|
|
68 |
|
69 |
$md5_whitelist = [];
|
70 |
foreach($localFiles as $file) {
|
71 |
-
if (!is_file(GEOIP_PLUGIN_DIR . $file) &&
|
72 |
\trigger_error('Weird. The file ' . $file . ' missing.');
|
73 |
continue;
|
74 |
}
|
68 |
|
69 |
$md5_whitelist = [];
|
70 |
foreach($localFiles as $file) {
|
71 |
+
if (!is_file(GEOIP_PLUGIN_DIR . $file) && GEOIP_DETECT_DEBUG) {
|
72 |
\trigger_error('Weird. The file ' . $file . ' missing.');
|
73 |
continue;
|
74 |
}
|
check_requirements.php
CHANGED
@@ -41,7 +41,7 @@ function geoip_detect_version_check() {
|
|
41 |
return true;
|
42 |
}
|
43 |
|
44 |
-
if (
|
45 |
trigger_error($message);
|
46 |
}
|
47 |
|
@@ -79,7 +79,7 @@ function geoip_detect_version_check_after_plugins_loaded() {
|
|
79 |
return true;
|
80 |
}
|
81 |
|
82 |
-
if (
|
83 |
trigger_error($message);
|
84 |
}
|
85 |
|
41 |
return true;
|
42 |
}
|
43 |
|
44 |
+
if (GEOIP_DETECT_DEBUG) {
|
45 |
trigger_error($message);
|
46 |
}
|
47 |
|
79 |
return true;
|
80 |
}
|
81 |
|
82 |
+
if (GEOIP_DETECT_DEBUG) {
|
83 |
trigger_error($message);
|
84 |
}
|
85 |
|
composer.json
CHANGED
@@ -21,13 +21,23 @@
|
|
21 |
"symfony/http-foundation": "5.2.4"
|
22 |
},
|
23 |
"require-dev": {
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"
|
27 |
-
"
|
28 |
},
|
29 |
"scripts": {
|
30 |
"test": "phpunit",
|
31 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
}
|
21 |
"symfony/http-foundation": "5.2.4"
|
22 |
},
|
23 |
"require-dev": {
|
24 |
+
"roots/wordpress": "5.9",
|
25 |
+
"wp-phpunit/wp-phpunit": "5.9.0",
|
26 |
+
"yoast/phpunit-polyfills": "1.0.3",
|
27 |
+
"phpunit/phpunit": "^9.0"
|
28 |
},
|
29 |
"scripts": {
|
30 |
"test": "phpunit",
|
31 |
+
"test-external": "phpunit --group external-http",
|
32 |
+
"install-test": "composer install --ignore-platform-req=php",
|
33 |
+
"install-prod": "composer install --prefer-dist --optimize-autoloader --no-dev"
|
34 |
+
},
|
35 |
+
"config": {
|
36 |
+
"allow-plugins": {
|
37 |
+
"roots/wordpress-core-installer": true
|
38 |
+
},
|
39 |
+
"platform": {
|
40 |
+
"php": "7.2.5"
|
41 |
+
}
|
42 |
}
|
43 |
}
|
data-sources/abstract.php
CHANGED
@@ -33,7 +33,7 @@ abstract class AbstractDataSource {
|
|
33 |
public function deactivate() { }
|
34 |
public function uninstall() {}
|
35 |
|
36 |
-
public function getReader($locales =
|
37 |
|
38 |
public function isWorking() { return false; }
|
39 |
}
|
@@ -81,7 +81,7 @@ class ExtraInformation extends \GeoIp2\Record\AbstractRecord {
|
|
81 |
/**
|
82 |
* @ignore
|
83 |
*/
|
84 |
-
protected $validAttributes =
|
85 |
}
|
86 |
|
87 |
interface ReaderInterface extends \GeoIp2\ProviderInterface {
|
@@ -94,7 +94,7 @@ interface ReaderInterface extends \GeoIp2\ProviderInterface {
|
|
94 |
abstract class AbstractReader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
95 |
protected $options;
|
96 |
|
97 |
-
public function __construct($options =
|
98 |
$this->options = $options;
|
99 |
}
|
100 |
|
33 |
public function deactivate() { }
|
34 |
public function uninstall() {}
|
35 |
|
36 |
+
public function getReader($locales = [ 'en' ], $options = []) { return null; }
|
37 |
|
38 |
public function isWorking() { return false; }
|
39 |
}
|
81 |
/**
|
82 |
* @ignore
|
83 |
*/
|
84 |
+
protected $validAttributes = [ 'source', 'cached', 'error', 'original', 'flag', 'tel', 'countryIsoCode3', 'currencyCode' ];
|
85 |
}
|
86 |
|
87 |
interface ReaderInterface extends \GeoIp2\ProviderInterface {
|
94 |
abstract class AbstractReader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
95 |
protected $options;
|
96 |
|
97 |
+
public function __construct($options = []) {
|
98 |
$this->options = $options;
|
99 |
}
|
100 |
|
data-sources/auto.php
CHANGED
@@ -104,8 +104,8 @@ HTML;
|
|
104 |
|
105 |
public function __construct() {
|
106 |
parent::__construct();
|
107 |
-
add_action('geoipdetectupdate',
|
108 |
-
add_action('plugins_loaded',
|
109 |
}
|
110 |
|
111 |
public function on_plugins_loaded() {
|
@@ -149,13 +149,13 @@ HTML;
|
|
149 |
if ( ! $tmpfname )
|
150 |
return new \WP_Error('http_no_file', __('Could not create temporary file.', 'geoip-detect'));
|
151 |
|
152 |
-
$headers =
|
153 |
$headers['User-Agent'] = GEOIP_DETECT_USER_AGENT;
|
154 |
if ($modified) {
|
155 |
$headers['If-Modified-Since'] = date('r', $modified);
|
156 |
}
|
157 |
|
158 |
-
$response = wp_safe_remote_get( $url,
|
159 |
$http_response_code = wp_remote_retrieve_response_code( $response );
|
160 |
if (304 === $http_response_code) {
|
161 |
return new \WP_Error( 'http_304', __('It has not changed since the last update.', 'geoip-detect') );
|
@@ -169,7 +169,7 @@ HTML;
|
|
169 |
return $tmpfname;
|
170 |
}
|
171 |
|
172 |
-
public function maxmindUpdate()
|
173 |
{
|
174 |
require_once(ABSPATH.'/wp-admin/includes/file.php');
|
175 |
|
@@ -177,7 +177,7 @@ HTML;
|
|
177 |
//$download_url = 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&suffix=tar.gz';
|
178 |
|
179 |
$download_url = apply_filters('geoip_detect2_download_url', $download_url);
|
180 |
-
if (
|
181 |
$key = get_option('geoip-detect-auto_license_key', '');
|
182 |
if (!$key) {
|
183 |
return __('Error: Before updating, you need to enter a license key from maxmind.com.', 'geoip-detect');
|
@@ -187,7 +187,7 @@ HTML;
|
|
187 |
|
188 |
$outFile = $this->maxmindGetUploadFilename();
|
189 |
$modified = 0;
|
190 |
-
if (\is_readable($outFile)) {
|
191 |
$modified = filemtime($outFile);
|
192 |
}
|
193 |
|
@@ -235,8 +235,8 @@ HTML;
|
|
235 |
$outDir = get_temp_dir() . 'geoip-detect/';
|
236 |
|
237 |
global $wp_filesystem;
|
238 |
-
if (
|
239 |
-
$ret = \WP_Filesystem(false, get_temp_dir());
|
240 |
if (!$ret) {
|
241 |
return __('WP Filesystem could not be initialized (does not support FTP credential access. Can you upload files to the media library?).', 'geoip-detect');
|
242 |
}
|
@@ -335,7 +335,7 @@ HTML;
|
|
335 |
}
|
336 |
|
337 |
/*
|
338 |
-
if (
|
339 |
add_filter('plugins_loaded', function() {
|
340 |
if (current_user_can('manage_options')) {
|
341 |
do_action('geoipdetectupdate');
|
104 |
|
105 |
public function __construct() {
|
106 |
parent::__construct();
|
107 |
+
add_action('geoipdetectupdate', [ $this, 'hook_cron' ], 10, 1);
|
108 |
+
add_action('plugins_loaded', [ $this, 'on_plugins_loaded' ]);
|
109 |
}
|
110 |
|
111 |
public function on_plugins_loaded() {
|
149 |
if ( ! $tmpfname )
|
150 |
return new \WP_Error('http_no_file', __('Could not create temporary file.', 'geoip-detect'));
|
151 |
|
152 |
+
$headers = [];
|
153 |
$headers['User-Agent'] = GEOIP_DETECT_USER_AGENT;
|
154 |
if ($modified) {
|
155 |
$headers['If-Modified-Since'] = date('r', $modified);
|
156 |
}
|
157 |
|
158 |
+
$response = wp_safe_remote_get( $url, [ 'timeout' => 300, 'stream' => true, 'filename' => $tmpfname, 'headers' => $headers ] );
|
159 |
$http_response_code = wp_remote_retrieve_response_code( $response );
|
160 |
if (304 === $http_response_code) {
|
161 |
return new \WP_Error( 'http_304', __('It has not changed since the last update.', 'geoip-detect') );
|
169 |
return $tmpfname;
|
170 |
}
|
171 |
|
172 |
+
public function maxmindUpdate($forceUpdate = false)
|
173 |
{
|
174 |
require_once(ABSPATH.'/wp-admin/includes/file.php');
|
175 |
|
177 |
//$download_url = 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&suffix=tar.gz';
|
178 |
|
179 |
$download_url = apply_filters('geoip_detect2_download_url', $download_url);
|
180 |
+
if (!\str_contains($download_url, 'license_key=')) {
|
181 |
$key = get_option('geoip-detect-auto_license_key', '');
|
182 |
if (!$key) {
|
183 |
return __('Error: Before updating, you need to enter a license key from maxmind.com.', 'geoip-detect');
|
187 |
|
188 |
$outFile = $this->maxmindGetUploadFilename();
|
189 |
$modified = 0;
|
190 |
+
if (\is_readable($outFile) && !$forceUpdate) {
|
191 |
$modified = filemtime($outFile);
|
192 |
}
|
193 |
|
235 |
$outDir = get_temp_dir() . 'geoip-detect/';
|
236 |
|
237 |
global $wp_filesystem;
|
238 |
+
if (! $wp_filesystem) {
|
239 |
+
$ret = \WP_Filesystem(false, get_temp_dir(), true /* allow group/world-writeable folder */);
|
240 |
if (!$ret) {
|
241 |
return __('WP Filesystem could not be initialized (does not support FTP credential access. Can you upload files to the media library?).', 'geoip-detect');
|
242 |
}
|
335 |
}
|
336 |
|
337 |
/*
|
338 |
+
if (GEOIP_DETECT_DEBUG && !empty($_GET['test_auto_update_now'])) {
|
339 |
add_filter('plugins_loaded', function() {
|
340 |
if (current_user_can('manage_options')) {
|
341 |
do_action('geoipdetectupdate');
|
data-sources/fastah.php
ADDED
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
4 |
+
Author: Benjamin Pick (wp-geoip-detect| |posteo.de)
|
5 |
+
This program is free software; you can redistribute it and/or modify
|
6 |
+
it under the terms of the GNU General Public License as published by
|
7 |
+
the Free Software Foundation; either version 3 of the License, or
|
8 |
+
(at your option) any later version.
|
9 |
+
|
10 |
+
This program is distributed in the hope that it will be useful,
|
11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
+
GNU General Public License for more details.
|
14 |
+
|
15 |
+
You should have received a copy of the GNU General Public License
|
16 |
+
along with this program; if not, write to the Free Software
|
17 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
18 |
+
*/
|
19 |
+
|
20 |
+
namespace YellowTree\GeoipDetect\DataSources\Fastah;
|
21 |
+
|
22 |
+
use YellowTree\GeoipDetect\DataSources\AbstractDataSource;
|
23 |
+
|
24 |
+
class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
25 |
+
|
26 |
+
const URL = 'https://ep.api.getfastah.com/whereis/v1/json/';
|
27 |
+
protected $options = [];
|
28 |
+
protected $params = [];
|
29 |
+
|
30 |
+
function __construct($params, $locales, $options) {
|
31 |
+
$this->params= $params;
|
32 |
+
$this->params['language'] = reset($locales);
|
33 |
+
|
34 |
+
// TODO: Fastah API responses only support 'en' at this time - this parameter is currently not accepted by the REST API
|
35 |
+
//if (empty($this->params['language'])) {
|
36 |
+
$this->params['language'] = 'en';
|
37 |
+
//}
|
38 |
+
|
39 |
+
$default_options = [
|
40 |
+
'timeout' => 2,
|
41 |
+
];
|
42 |
+
$this->options = $options + $default_options;
|
43 |
+
}
|
44 |
+
|
45 |
+
protected function locales($locale, $value) {
|
46 |
+
$locales = ['en' => $value];
|
47 |
+
if ($locale !== 'en') {
|
48 |
+
$locales[$locale] = $value;
|
49 |
+
}
|
50 |
+
return $locales;
|
51 |
+
}
|
52 |
+
/*
|
53 |
+
protected function api_call($ip) {
|
54 |
+
$requestArgs = array(
|
55 |
+
'method' => 'GET',
|
56 |
+
'protocol_version' => ($this->params['http2'] === 1) ? 2.0 : 1.1,
|
57 |
+
'timeout' => $this->options['timeout'],
|
58 |
+
'header' => array(
|
59 |
+
'Fastah-Key' => $this->params['key']
|
60 |
+
),
|
61 |
+
);
|
62 |
+
$context = stream_context_create(array('http' => $requestArgs));
|
63 |
+
$body = @file_get_contents($this->build_url($ip, ['language' => 'en']), false, $context);
|
64 |
+
$data = json_decode( $body, true );
|
65 |
+
return $data;
|
66 |
+
}
|
67 |
+
*/
|
68 |
+
|
69 |
+
protected function api_call($ip) {
|
70 |
+
$requestArgs = [
|
71 |
+
'method' => 'GET',
|
72 |
+
'httpversion' => ($this->params['http2'] === 1) ? 2.0 : 1.1,
|
73 |
+
'timeout' => $this->options['timeout'],
|
74 |
+
'headers' => [
|
75 |
+
'Fastah-Key' => $this->params['key'],
|
76 |
+
'User-Agent' => GEOIP_DETECT_USER_AGENT,
|
77 |
+
],
|
78 |
+
];
|
79 |
+
$response = wp_safe_remote_get($this->build_url($ip, $this->params), $requestArgs);
|
80 |
+
$respCode = wp_remote_retrieve_response_code( $response );
|
81 |
+
if (is_wp_error($response)) {
|
82 |
+
throw new \RuntimeException($response->get_error_message());
|
83 |
+
}
|
84 |
+
$body = wp_remote_retrieve_body( $response );
|
85 |
+
$data = json_decode( $body, true );
|
86 |
+
if ($respCode !== 200) {
|
87 |
+
if (isset($data['error']['message'])) {
|
88 |
+
throw new \RuntimeException($data['error']['message']);
|
89 |
+
} elseif (isset($data['message'])) {
|
90 |
+
throw new \RuntimeException($data['message']);
|
91 |
+
} else {
|
92 |
+
throw new \RuntimeException('Invalid HTTP Status Code ' . $respCode);
|
93 |
+
}
|
94 |
+
}
|
95 |
+
return $data;
|
96 |
+
}
|
97 |
+
|
98 |
+
public function city($ip) {
|
99 |
+
try {
|
100 |
+
$data = $this->api_call($ip);
|
101 |
+
} catch (\Exception $e) {
|
102 |
+
return _geoip_detect2_get_new_empty_record($ip, $e->getMessage());
|
103 |
+
}
|
104 |
+
if (!$data) {
|
105 |
+
return _geoip_detect2_get_new_empty_record($ip, 'No data found.');
|
106 |
+
}
|
107 |
+
|
108 |
+
$r = [];
|
109 |
+
$r['extra']['original'] = $data;
|
110 |
+
|
111 |
+
$locale = 'en'; // The REST API only support English at this time
|
112 |
+
|
113 |
+
if (!empty($data['locationData'])) {
|
114 |
+
// Continent
|
115 |
+
if (!empty($data['locationData']['continentCode'])) {
|
116 |
+
$r['continent']['code'] = strtoupper($data['locationData']['continentCode']);
|
117 |
+
}
|
118 |
+
// Country
|
119 |
+
if (!empty($data['locationData']['countryName'])) {
|
120 |
+
$r['country']['names'] = $this->locales($locale, $data['locationData']['countryName']);
|
121 |
+
}
|
122 |
+
if (!empty($data['locationData']['countryCode'])) {
|
123 |
+
$r['country']['iso_code'] = strtoupper($data['locationData']['countryCode']);
|
124 |
+
}
|
125 |
+
// City
|
126 |
+
if (!empty($data['locationData']['cityName'])) {
|
127 |
+
$r['city']['names'] = $this->locales($locale, $data['locationData']['cityName']);
|
128 |
+
}
|
129 |
+
if (!empty($data['locationData']['cityGeonamesId'])) {
|
130 |
+
$r['city']['geoname_id'] = $data['locationData']['cityGeonamesId'];
|
131 |
+
}
|
132 |
+
// Lat, Lng
|
133 |
+
if (isset($data['locationData']['lat'])) {
|
134 |
+
$r['location']['latitude'] = $data['locationData']['lat'];
|
135 |
+
}
|
136 |
+
if (isset($data['locationData']['lng'])) {
|
137 |
+
$r['location']['longitude'] = $data['locationData']['lng'];
|
138 |
+
}
|
139 |
+
// TZ
|
140 |
+
if (isset($data['locationData']['tz'])) {
|
141 |
+
$r['location']['time_zone'] = $data['locationData']['tz'];
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
// EU flag
|
146 |
+
if(isset($data['isEuropeanUnion'])) {
|
147 |
+
$r['country']['isInEuropeanUnion'] = $data['isEuropeanUnion'];
|
148 |
+
}
|
149 |
+
|
150 |
+
if (isset($data['ip'])) {
|
151 |
+
$r['traits']['ip_address'] = $data['ip'];
|
152 |
+
} else {
|
153 |
+
$r['traits']['ip_address'] = $ip;
|
154 |
+
}
|
155 |
+
|
156 |
+
$record = new \GeoIp2\Model\City($r, ['en']);
|
157 |
+
|
158 |
+
return $record;
|
159 |
+
}
|
160 |
+
|
161 |
+
public function country($ip) {
|
162 |
+
return $this->city($ip);
|
163 |
+
}
|
164 |
+
|
165 |
+
public function close() {
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
private function build_url($ip, $params = []) {
|
170 |
+
$url = self::URL . $ip;
|
171 |
+
return $url . '?' . \http_build_query($params);
|
172 |
+
}
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
class FastahSource extends AbstractDataSource {
|
178 |
+
protected $params = [];
|
179 |
+
// PHP-Curl with functional TLS 1.2 (secure ciphers) and HTTP 1.1 are minimum requirements
|
180 |
+
protected $bestAvailHTTP = CURL_HTTP_VERSION_1_1;
|
181 |
+
|
182 |
+
public function __construct() {
|
183 |
+
$this->params['key'] = get_option('geoip-detect-fastah_key', '');
|
184 |
+
|
185 |
+
// Set default by probing PHP/Curl capabilities - minimum is HTTP 1.1 over TLSv1.2
|
186 |
+
// HTTP/2 ought to be available in PHP-Curl > v7.47.0 @see https://curl.se/docs/http2.html
|
187 |
+
|
188 |
+
if (curl_version()["features"] & CURL_HTTP_VERSION_2_0 !== 0) {
|
189 |
+
$this->bestAvailHTTP = CURL_HTTP_VERSION_2_0;
|
190 |
+
if (curl_version()["features"] & CURL_HTTP_VERSION_2TLS !== 0) {
|
191 |
+
$this->bestAvailHTTP = CURL_HTTP_VERSION_2TLS;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
if ($this->bestAvailHTTP < CURL_HTTP_VERSION_2_0) {
|
196 |
+
$this->params['http2'] = 0;
|
197 |
+
} else {
|
198 |
+
$this->params['http2'] = get_option('geoip-detect-fastah_http2', 1);
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
public function getId() { return 'fastah'; }
|
203 |
+
public function getLabel() { return __('Fastah Web API <sup><em>beta</em></sup>', 'geoip-detect'); }
|
204 |
+
|
205 |
+
public function getDescriptionHTML() { return __('Commercial, with enterprise-friendly support and billing. <a href="https://aws.amazon.com/marketplace/pp/prodview-k5gjowexrefl2" target="_blank">Sign-up on AWS Marketplace</a>. <a href="https://docs.getfastah.com/docs/quick-start" target="_blank">API Documentation</a>', 'geoip-detect'); }
|
206 |
+
public function getStatusInformationHTML() {
|
207 |
+
$html = '';
|
208 |
+
|
209 |
+
$html .= \sprintf(__('HTTP2: %s', 'geoip-detect'), $this->params['http2'] ? __('Enabled', 'geoip-detect') : __('Disabled', 'geoip-detect')) . '<br />';
|
210 |
+
|
211 |
+
if ($this->bestAvailHTTP < CURL_HTTP_VERSION_2_0) {
|
212 |
+
$html .= '<i>' . __('Warning: HTTP2 is not supported by the curl version used by your PHP. This will make lookups slower.', 'geoip-detect') . '</i><br />';
|
213 |
+
}
|
214 |
+
|
215 |
+
if (!$this->isWorking()) {
|
216 |
+
if (!is_callable('curl_init')) {
|
217 |
+
$html .= '<div class="geoip_detect_error">' . __('Error: Fastah requires PHP-Curl for secure HTTPS requests.', 'geoip-detect') . '</div>';
|
218 |
+
} else {
|
219 |
+
$html .= '<div class="geoip_detect_error">' . __('Error: Fastah only works with an API key.', 'geoip-detect') . '</div>';
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
return $html;
|
224 |
+
}
|
225 |
+
|
226 |
+
public function getParameterHTML() {
|
227 |
+
$label_key = __('API Access Key :', 'geoip-detect');
|
228 |
+
$label_http2 = __('Use HTTP/2 :', 'geoip-detect');
|
229 |
+
|
230 |
+
$key = esc_attr($this->params['key']);
|
231 |
+
|
232 |
+
$html = <<<HTML
|
233 |
+
$label_key <input type="text" autocomplete="off" size="20" name="options_fastah[key]" value="$key" /> <br />
|
234 |
+
<a href="https://aws.amazon.com/marketplace/pp/prodview-k5gjowexrefl2" target="_blank">Sign-up for a 30-day trial key</a>, <a href="https://console.api.getfastah.com" target="_blank">API usage dashboard</a><br><br>
|
235 |
+
$label_http2 <select name="options_fastah[http2]">
|
236 |
+
HTML;
|
237 |
+
$html .= '<option value="0" ' . (!$this->params['http2'] ? ' selected="selected"' : '') . '">' . __('HTTP/2 is OFF (slower, but more compatible with older PHP versions)', 'geoip-detect') . '</option>';
|
238 |
+
$html .= '<option value="1" ' . ($this->params['http2'] ? ' selected="selected"' : '') . '">' . __('HTTP/2 is ON (faster performance)', 'geoip-detect') . '</option>';
|
239 |
+
$html .= '</select>';
|
240 |
+
|
241 |
+
return $html;
|
242 |
+
}
|
243 |
+
|
244 |
+
public function saveParameters($post) {
|
245 |
+
$message = '';
|
246 |
+
|
247 |
+
if (isset($post['options_fastah']['key'])) {
|
248 |
+
$key = sanitize_key($post['options_fastah']['key']);
|
249 |
+
update_option('geoip-detect-fastah_key', $key);
|
250 |
+
$this->params['key']= $key;
|
251 |
+
}
|
252 |
+
|
253 |
+
if (isset($post['options_fastah']['http2'])) {
|
254 |
+
$http2 = (int) $post['options_fastah']['http2'];
|
255 |
+
update_option('geoip-detect-fastah_http2', $http2);
|
256 |
+
// Show warning if HTTP/2 requested but actually not available via PHP-Curl
|
257 |
+
if ($http2 == 1 && $this->bestAvailHTTP < CURL_HTTP_VERSION_2_0) {
|
258 |
+
$message .= __('Warning: Turning off HTTP/2 because it is not supported by your server PHP / libcurl.<br>', 'geoip-detect');
|
259 |
+
$http2 = 0;
|
260 |
+
}
|
261 |
+
$this->params['http2'] = $http2;
|
262 |
+
}
|
263 |
+
|
264 |
+
if (geoip_detect2_is_source_active('fastah') && !$this->isWorking())
|
265 |
+
$message .= __('Fastah only works with an API key.', 'geoip-detect');
|
266 |
+
|
267 |
+
return $message;
|
268 |
+
}
|
269 |
+
|
270 |
+
public function getReader($locales = ['en'], $options = []) {
|
271 |
+
return new Reader($this->params, $locales, $options);
|
272 |
+
}
|
273 |
+
|
274 |
+
public function isWorking() {
|
275 |
+
return (!empty($this->params['key']) && is_callable('curl_init'));
|
276 |
+
}
|
277 |
+
|
278 |
+
}
|
279 |
+
geoip_detect2_register_source(new FastahSource());
|
data-sources/header.php
CHANGED
@@ -67,7 +67,7 @@ class HeaderReader extends \YellowTree\GeoipDetect\DataSources\AbstractReader {
|
|
67 |
return _geoip_detect2_get_new_empty_record($ip);
|
68 |
}
|
69 |
if (mb_strlen($isoCode) !== 2) {
|
70 |
-
$errorMessage = 'Invalid country code' . (
|
71 |
return _geoip_detect2_get_new_empty_record($ip, $errorMessage);
|
72 |
}
|
73 |
|
@@ -75,7 +75,7 @@ class HeaderReader extends \YellowTree\GeoipDetect\DataSources\AbstractReader {
|
|
75 |
|
76 |
$r['traits']['ip_address'] = $ip;
|
77 |
|
78 |
-
$record = new \GeoIp2\Model\City($r,
|
79 |
|
80 |
return $record;
|
81 |
}
|
@@ -153,7 +153,7 @@ HTML;
|
|
153 |
return $html;
|
154 |
}
|
155 |
|
156 |
-
public function getReader($locales =
|
157 |
$reader = null;
|
158 |
|
159 |
$provider = get_option('geoip-detect-header-provider');
|
@@ -163,7 +163,7 @@ HTML;
|
|
163 |
'provider' => $provider,
|
164 |
) );
|
165 |
} catch ( \Exception $e ) {
|
166 |
-
if (
|
167 |
trigger_error(sprintf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $filename, $e->getMessage ()), E_USER_NOTICE);
|
168 |
}
|
169 |
}
|
67 |
return _geoip_detect2_get_new_empty_record($ip);
|
68 |
}
|
69 |
if (mb_strlen($isoCode) !== 2) {
|
70 |
+
$errorMessage = 'Invalid country code' . (GEOIP_DETECT_DEBUG ? (': "' . $isoCode . '"') : '.');
|
71 |
return _geoip_detect2_get_new_empty_record($ip, $errorMessage);
|
72 |
}
|
73 |
|
75 |
|
76 |
$r['traits']['ip_address'] = $ip;
|
77 |
|
78 |
+
$record = new \GeoIp2\Model\City($r, [ 'en' ]);
|
79 |
|
80 |
return $record;
|
81 |
}
|
153 |
return $html;
|
154 |
}
|
155 |
|
156 |
+
public function getReader($locales = [ 'en' ], $options = []) {
|
157 |
$reader = null;
|
158 |
|
159 |
$provider = get_option('geoip-detect-header-provider');
|
163 |
'provider' => $provider,
|
164 |
) );
|
165 |
} catch ( \Exception $e ) {
|
166 |
+
if (GEOIP_DETECT_DEBUG) {
|
167 |
trigger_error(sprintf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $filename, $e->getMessage ()), E_USER_NOTICE);
|
168 |
}
|
169 |
}
|
data-sources/hostinfo.php
CHANGED
@@ -26,22 +26,22 @@ class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
|
26 |
if (!$data)
|
27 |
return _geoip_detect2_get_new_empty_record();
|
28 |
|
29 |
-
$r =
|
30 |
|
31 |
$r['traits']['original'] = $data;
|
32 |
|
33 |
if ($data['country_name'])
|
34 |
-
$r['country']['names'] =
|
35 |
if ($data['country_code'])
|
36 |
$r['country']['iso_code'] = strtoupper($data['country_code']);
|
37 |
|
38 |
if ($data['city']) {
|
39 |
-
$r['city']['names'] =
|
40 |
}
|
41 |
|
42 |
$r['traits']['ip_address'] = $ip;
|
43 |
|
44 |
-
$record = new \GeoIp2\Model\City($r,
|
45 |
|
46 |
return $record;
|
47 |
}
|
@@ -102,7 +102,7 @@ class HostInfoDataSource extends AbstractDataSource {
|
|
102 |
public function getStatusInformationHTML() { return __('You can choose a different data source below.', 'geoip-detect'); }
|
103 |
public function getParameterHTML() { return ''; }
|
104 |
|
105 |
-
public function getReader($locales =
|
106 |
|
107 |
public function isWorking() { return true; }
|
108 |
|
26 |
if (!$data)
|
27 |
return _geoip_detect2_get_new_empty_record();
|
28 |
|
29 |
+
$r = [];
|
30 |
|
31 |
$r['traits']['original'] = $data;
|
32 |
|
33 |
if ($data['country_name'])
|
34 |
+
$r['country']['names'] = [ 'en' => $data['country_name'] ];
|
35 |
if ($data['country_code'])
|
36 |
$r['country']['iso_code'] = strtoupper($data['country_code']);
|
37 |
|
38 |
if ($data['city']) {
|
39 |
+
$r['city']['names'] = [ 'en' => $data['city'] ];
|
40 |
}
|
41 |
|
42 |
$r['traits']['ip_address'] = $ip;
|
43 |
|
44 |
+
$record = new \GeoIp2\Model\City($r, [ 'en' ]);
|
45 |
|
46 |
return $record;
|
47 |
}
|
102 |
public function getStatusInformationHTML() { return __('You can choose a different data source below.', 'geoip-detect'); }
|
103 |
public function getParameterHTML() { return ''; }
|
104 |
|
105 |
+
public function getReader($locales = [ 'en' ], $options = []) { return new Reader($options); }
|
106 |
|
107 |
public function isWorking() { return true; }
|
108 |
|
data-sources/ipstack.php
CHANGED
@@ -25,8 +25,8 @@ use YellowTree\GeoipDetect\DataSources\AbstractDataSource;
|
|
25 |
class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
26 |
|
27 |
const URL = 'api.ipstack.com/';
|
28 |
-
protected $options =
|
29 |
-
protected $params =
|
30 |
|
31 |
function __construct($params, $locales, $options) {
|
32 |
$this->params= $params;
|
@@ -42,7 +42,7 @@ class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
|
42 |
}
|
43 |
|
44 |
protected function locales($locale, $value) {
|
45 |
-
$locales =
|
46 |
if ($locale != 'en') {
|
47 |
$locales[$locale] = $value;
|
48 |
}
|
@@ -55,7 +55,7 @@ class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
|
55 |
if (!$data)
|
56 |
return _geoip_detect2_get_new_empty_record();
|
57 |
|
58 |
-
$r =
|
59 |
|
60 |
$r['extra']['original'] = $data;
|
61 |
|
@@ -123,7 +123,7 @@ class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
|
123 |
|
124 |
$r['traits']['ip_address'] = $ip;
|
125 |
|
126 |
-
$record = new \GeoIp2\Model\City($r,
|
127 |
|
128 |
return $record;
|
129 |
}
|
@@ -175,7 +175,7 @@ class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
|
175 |
|
176 |
|
177 |
class IpstackSource extends AbstractDataSource {
|
178 |
-
protected $params =
|
179 |
|
180 |
public function __construct() {
|
181 |
$this->params['key'] = get_option('geoip-detect-ipstack_key', '');
|
@@ -236,7 +236,7 @@ HTML;
|
|
236 |
return $message;
|
237 |
}
|
238 |
|
239 |
-
public function getReader($locales =
|
240 |
return new Reader($this->params, $locales, $options);
|
241 |
}
|
242 |
|
25 |
class Reader implements \YellowTree\GeoipDetect\DataSources\ReaderInterface {
|
26 |
|
27 |
const URL = 'api.ipstack.com/';
|
28 |
+
protected $options = [];
|
29 |
+
protected $params = [];
|
30 |
|
31 |
function __construct($params, $locales, $options) {
|
32 |
$this->params= $params;
|
42 |
}
|
43 |
|
44 |
protected function locales($locale, $value) {
|
45 |
+
$locales = [ 'en' => $value ];
|
46 |
if ($locale != 'en') {
|
47 |
$locales[$locale] = $value;
|
48 |
}
|
55 |
if (!$data)
|
56 |
return _geoip_detect2_get_new_empty_record();
|
57 |
|
58 |
+
$r = [];
|
59 |
|
60 |
$r['extra']['original'] = $data;
|
61 |
|
123 |
|
124 |
$r['traits']['ip_address'] = $ip;
|
125 |
|
126 |
+
$record = new \GeoIp2\Model\City($r, [ 'en' ]);
|
127 |
|
128 |
return $record;
|
129 |
}
|
175 |
|
176 |
|
177 |
class IpstackSource extends AbstractDataSource {
|
178 |
+
protected $params = [];
|
179 |
|
180 |
public function __construct() {
|
181 |
$this->params['key'] = get_option('geoip-detect-ipstack_key', '');
|
236 |
return $message;
|
237 |
}
|
238 |
|
239 |
+
public function getReader($locales = [ 'en' ], $options = []) {
|
240 |
return new Reader($this->params, $locales, $options);
|
241 |
}
|
242 |
|
data-sources/manual.php
CHANGED
@@ -32,7 +32,7 @@ class ManualDataSource extends AbstractDataSource {
|
|
32 |
public function getDescriptionHTML() { return __('<a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" target="_blank">Free version</a> - <a href="https://www.maxmind.com/en/geoip2-country-database" target="_blank">Commercial Version</a>', 'geoip-detect'); }
|
33 |
public function getStatusInformationHTML() {
|
34 |
$built = $last_update = 0;
|
35 |
-
$html =
|
36 |
|
37 |
$file = $this->maxmindGetFilename();
|
38 |
|
@@ -68,7 +68,7 @@ class ManualDataSource extends AbstractDataSource {
|
|
68 |
if ($entries) {
|
69 |
$html .= ' ' . sprintf(__('(has %d entries)', 'geoip-detect'), count($entries));
|
70 |
}
|
71 |
-
if (
|
72 |
$html .= '<br>' . sprintf(__('Privacy Exclusions next Update: %s', 'geoip-detect'), geoip_detect_format_localtime($next_update) );
|
73 |
}
|
74 |
|
@@ -84,7 +84,7 @@ class ManualDataSource extends AbstractDataSource {
|
|
84 |
|
85 |
|
86 |
$html = <<<HTML
|
87 |
-
$label_id <input type="number" autocomplete="off"
|
88 |
$label_key <input type="text" autocomplete="off" size="20" name="options_auto[license_key]" value="$key" /><br />
|
89 |
HTML;
|
90 |
return $html;
|
@@ -201,7 +201,7 @@ HTML;
|
|
201 |
|
202 |
public function getShortLabel() { return $this->maxmindGetFileDescription(); }
|
203 |
|
204 |
-
public function getReader($locales =
|
205 |
$reader = null;
|
206 |
|
207 |
$data_file = $this->maxmindGetFilename();
|
@@ -209,7 +209,7 @@ HTML;
|
|
209 |
try {
|
210 |
$reader = new \GeoIp2\Database\Reader ( $data_file, $locales );
|
211 |
} catch ( \Exception $e ) {
|
212 |
-
if (
|
213 |
trigger_error(sprintf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $data_file, $e->getMessage()), E_USER_NOTICE);
|
214 |
}
|
215 |
}
|
32 |
public function getDescriptionHTML() { return __('<a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" target="_blank">Free version</a> - <a href="https://www.maxmind.com/en/geoip2-country-database" target="_blank">Commercial Version</a>', 'geoip-detect'); }
|
33 |
public function getStatusInformationHTML() {
|
34 |
$built = $last_update = 0;
|
35 |
+
$html = [];
|
36 |
|
37 |
$file = $this->maxmindGetFilename();
|
38 |
|
68 |
if ($entries) {
|
69 |
$html .= ' ' . sprintf(__('(has %d entries)', 'geoip-detect'), count($entries));
|
70 |
}
|
71 |
+
if (GEOIP_DETECT_DEBUG) {
|
72 |
$html .= '<br>' . sprintf(__('Privacy Exclusions next Update: %s', 'geoip-detect'), geoip_detect_format_localtime($next_update) );
|
73 |
}
|
74 |
|
84 |
|
85 |
|
86 |
$html = <<<HTML
|
87 |
+
$label_id <input type="number" autocomplete="off" name="options_auto[license_id]" value="$id" /><br />
|
88 |
$label_key <input type="text" autocomplete="off" size="20" name="options_auto[license_key]" value="$key" /><br />
|
89 |
HTML;
|
90 |
return $html;
|
201 |
|
202 |
public function getShortLabel() { return $this->maxmindGetFileDescription(); }
|
203 |
|
204 |
+
public function getReader($locales = [ 'en' ], $options = []) {
|
205 |
$reader = null;
|
206 |
|
207 |
$data_file = $this->maxmindGetFilename();
|
209 |
try {
|
210 |
$reader = new \GeoIp2\Database\Reader ( $data_file, $locales );
|
211 |
} catch ( \Exception $e ) {
|
212 |
+
if (GEOIP_DETECT_DEBUG) {
|
213 |
trigger_error(sprintf(__('Error while creating reader for "%s": %s', 'geoip-detect'), $data_file, $e->getMessage()), E_USER_NOTICE);
|
214 |
}
|
215 |
}
|
data-sources/precision.php
CHANGED
@@ -34,7 +34,7 @@ use YellowTree\GeoipDetect\DataSources\DataSourceRegistry;
|
|
34 |
class PrecisionReader extends \GeoIp2\WebService\Client implements \YellowTree\GeoipDetect\DataSources\ReaderInterface
|
35 |
{
|
36 |
public function __construct($userId, $licenseKey, $options) {
|
37 |
-
parent::__construct($userId, $licenseKey,
|
38 |
}
|
39 |
|
40 |
public function city($ip = 'me') {
|
@@ -42,7 +42,7 @@ class PrecisionReader extends \GeoIp2\WebService\Client implements \YellowTree\G
|
|
42 |
|
43 |
$ret = null;
|
44 |
|
45 |
-
$callback =
|
46 |
if (!is_callable($callback)) {
|
47 |
throw new \RuntimeException('Precision API: Unsupported method ' . $method);
|
48 |
}
|
@@ -50,7 +50,7 @@ class PrecisionReader extends \GeoIp2\WebService\Client implements \YellowTree\G
|
|
50 |
if ($method == 'city')
|
51 |
$ret = parent::city($ip);
|
52 |
else
|
53 |
-
$ret = call_user_func_array($callback,
|
54 |
|
55 |
/* Web-API-specific exceptions:
|
56 |
} catch (AuthenticationException $e) {
|
@@ -71,9 +71,9 @@ class PrecisionReader extends \GeoIp2\WebService\Client implements \YellowTree\G
|
|
71 |
class PrecisionDataSource extends AbstractDataSource {
|
72 |
|
73 |
protected $known_api_types = array(
|
74 |
-
'country' =>
|
75 |
-
'city' =>
|
76 |
-
'insights' =>
|
77 |
|
78 |
public function __construct() {
|
79 |
parent::__construct();
|
@@ -148,7 +148,7 @@ HTML;
|
|
148 |
return $message;
|
149 |
}
|
150 |
|
151 |
-
public function getReader($locales =
|
152 |
if (!$this->isWorking())
|
153 |
return null;
|
154 |
|
34 |
class PrecisionReader extends \GeoIp2\WebService\Client implements \YellowTree\GeoipDetect\DataSources\ReaderInterface
|
35 |
{
|
36 |
public function __construct($userId, $licenseKey, $options) {
|
37 |
+
parent::__construct($userId, $licenseKey, [ 'en' ], $options);
|
38 |
}
|
39 |
|
40 |
public function city($ip = 'me') {
|
42 |
|
43 |
$ret = null;
|
44 |
|
45 |
+
$callback = [ $this, $method ];
|
46 |
if (!is_callable($callback)) {
|
47 |
throw new \RuntimeException('Precision API: Unsupported method ' . $method);
|
48 |
}
|
50 |
if ($method == 'city')
|
51 |
$ret = parent::city($ip);
|
52 |
else
|
53 |
+
$ret = call_user_func_array($callback, [ $ip ]);
|
54 |
|
55 |
/* Web-API-specific exceptions:
|
56 |
} catch (AuthenticationException $e) {
|
71 |
class PrecisionDataSource extends AbstractDataSource {
|
72 |
|
73 |
protected $known_api_types = array(
|
74 |
+
'country' => [ 'label' => 'Country' ],
|
75 |
+
'city' => [ 'label' => 'City' ],
|
76 |
+
'insights' => [ 'label' => 'Insights' ]);
|
77 |
|
78 |
public function __construct() {
|
79 |
parent::__construct();
|
148 |
return $message;
|
149 |
}
|
150 |
|
151 |
+
public function getReader($locales = [ 'en' ], $options = []) {
|
152 |
if (!$this->isWorking())
|
153 |
return null;
|
154 |
|
data-sources/registry.php
CHANGED
@@ -25,7 +25,7 @@ class DataSourceRegistry {
|
|
25 |
private static $instance;
|
26 |
/* singleton */
|
27 |
private function __construct() {
|
28 |
-
$this->sources =
|
29 |
}
|
30 |
public static function getInstance() {
|
31 |
if (!self::$instance) {
|
@@ -71,7 +71,7 @@ class DataSourceRegistry {
|
|
71 |
if (isset($this->sources[$id]))
|
72 |
return $this->sources[$id];
|
73 |
|
74 |
-
if (
|
75 |
trigger_error('The source with id "' . $id . '" was requested, but no such source was found. Using default source instead.', E_USER_NOTICE);
|
76 |
}
|
77 |
|
@@ -118,7 +118,7 @@ class DataSourceRegistry {
|
|
118 |
|
119 |
public function isSourceCachable($source) {
|
120 |
// Don't cache for file access based sources (not worth the effort/time)
|
121 |
-
$sources_not_cachable = apply_filters('geoip2_detect_sources_not_cachable',
|
122 |
return !in_array($source, $sources_not_cachable);
|
123 |
}
|
124 |
|
@@ -128,7 +128,7 @@ class DataSourceRegistry {
|
|
128 |
|
129 |
public function clearCache() {
|
130 |
if (wp_using_ext_object_cache()) {
|
131 |
-
if (
|
132 |
\trigger_error('Object caching is active, so transient deletion routine does not do anything ...', E_USER_NOTICE);
|
133 |
}
|
134 |
return 'Object caching is active, so transient deletion routine does not do anything ...';
|
@@ -145,7 +145,7 @@ class DataSourceRegistry {
|
|
145 |
|
146 |
// Delete all options from this plugin
|
147 |
foreach ( wp_load_alloptions() as $option => $value ) {
|
148 |
-
if (
|
149 |
delete_option( $option );
|
150 |
}
|
151 |
}
|
25 |
private static $instance;
|
26 |
/* singleton */
|
27 |
private function __construct() {
|
28 |
+
$this->sources = [];
|
29 |
}
|
30 |
public static function getInstance() {
|
31 |
if (!self::$instance) {
|
71 |
if (isset($this->sources[$id]))
|
72 |
return $this->sources[$id];
|
73 |
|
74 |
+
if (GEOIP_DETECT_DEBUG && $id !== '') {
|
75 |
trigger_error('The source with id "' . $id . '" was requested, but no such source was found. Using default source instead.', E_USER_NOTICE);
|
76 |
}
|
77 |
|
118 |
|
119 |
public function isSourceCachable($source) {
|
120 |
// Don't cache for file access based sources (not worth the effort/time)
|
121 |
+
$sources_not_cachable = apply_filters('geoip2_detect_sources_not_cachable', [ 'auto', 'manual', 'header' ]);
|
122 |
return !in_array($source, $sources_not_cachable);
|
123 |
}
|
124 |
|
128 |
|
129 |
public function clearCache() {
|
130 |
if (wp_using_ext_object_cache()) {
|
131 |
+
if (GEOIP_DETECT_DEBUG) {
|
132 |
\trigger_error('Object caching is active, so transient deletion routine does not do anything ...', E_USER_NOTICE);
|
133 |
}
|
134 |
return 'Object caching is active, so transient deletion routine does not do anything ...';
|
145 |
|
146 |
// Delete all options from this plugin
|
147 |
foreach ( wp_load_alloptions() as $option => $value ) {
|
148 |
+
if ( \str_starts_with( $option, 'geoip-detect-' ) ) {
|
149 |
delete_option( $option );
|
150 |
}
|
151 |
}
|
filter.php
CHANGED
@@ -28,7 +28,7 @@ add_filter('body_class', 'geoip_detect2_add_body_classes_if_needed');
|
|
28 |
|
29 |
function geoip_detect2_get_body_classes() {
|
30 |
$info = geoip_detect2_get_info_from_current_ip();
|
31 |
-
$classes =
|
32 |
|
33 |
if ($info->continent->code)
|
34 |
$classes[] = 'geoip-continent-' . $info->continent->code;
|
@@ -65,7 +65,7 @@ add_filter('geoip_detect2_locales', 'geoip_detect2_convert_locale_format', 7);
|
|
65 |
|
66 |
function geoip_detect2_add_default_locales($locales) {
|
67 |
if (is_null($locales) || $locales === false) {
|
68 |
-
$locales =
|
69 |
|
70 |
/* Needed? should be in get_locale()
|
71 |
if (defined('ICL_LANGUAGE_CODE'))
|
28 |
|
29 |
function geoip_detect2_get_body_classes() {
|
30 |
$info = geoip_detect2_get_info_from_current_ip();
|
31 |
+
$classes = [];
|
32 |
|
33 |
if ($info->continent->code)
|
34 |
$classes[] = 'geoip-continent-' . $info->continent->code;
|
65 |
|
66 |
function geoip_detect2_add_default_locales($locales) {
|
67 |
if (is_null($locales) || $locales === false) {
|
68 |
+
$locales = [];
|
69 |
|
70 |
/* Needed? should be in get_locale()
|
71 |
if (defined('ICL_LANGUAGE_CODE'))
|
geoip-detect-lib.php
CHANGED
@@ -37,7 +37,7 @@ function _geoip_detect2_process_options($options) {
|
|
37 |
if (is_bool($options)) {
|
38 |
_doing_it_wrong('Geolocation IP Detection Plugin: geoip_detect2_get_info_from_ip()', '$skipCache has been renamed to $options. Instead of TRUE, now use "[\'skipCache\' => TRUE]".', '2.5.0');
|
39 |
$value = $options;
|
40 |
-
$options =
|
41 |
$options['skipCache'] = $value;
|
42 |
}
|
43 |
|
@@ -76,7 +76,7 @@ function _geoip_detect2_process_options($options) {
|
|
76 |
* @return GeoIp2\Database\Reader The reader, ready to do its work. Don't forget to `close()` it afterwards. NULL if file not found (or other problems).
|
77 |
* NULL if initialization went wrong (e.g., File not found.)
|
78 |
*/
|
79 |
-
function _geoip_detect2_get_reader($locales = null, $skipLocaleFilter = false, &$sourceId = '', $options =
|
80 |
if (! $skipLocaleFilter) {
|
81 |
/**
|
82 |
* Filter: geoip_detect2_locales
|
@@ -208,7 +208,7 @@ function _geoip_detect2_get_record_from_reader($reader, $ip, &$error) {
|
|
208 |
}
|
209 |
|
210 |
function _geoip_detect2_get_new_empty_record($ip = '', $error = '') {
|
211 |
-
$data =
|
212 |
if ($error) {
|
213 |
$data['extra']['error'] = $error;
|
214 |
}
|
@@ -220,7 +220,7 @@ function _geoip_detect2_record_enrich_data($record, $ip, $sourceId, $error) : ar
|
|
220 |
if (is_object($record) && method_exists($record, 'jsonSerialize')) {
|
221 |
$data = $record->jsonSerialize();
|
222 |
} else {
|
223 |
-
$data =
|
224 |
}
|
225 |
|
226 |
if (!isset($data['is_empty'])) {
|
@@ -325,7 +325,7 @@ function geoip_detect_normalize_ip(string $ip) : string {
|
|
325 |
|
326 |
function geoip_detect_sanitize_ip_list(string $ip_list) : string {
|
327 |
$list = explode(',', $ip_list);
|
328 |
-
$ret =
|
329 |
foreach ($list as $ip) {
|
330 |
$ip = trim($ip);
|
331 |
$parts = explode('/', $ip, 2);
|
@@ -353,7 +353,7 @@ function geoip_detect_sanitize_ip_list(string $ip_list) : string {
|
|
353 |
function geoip_detect_ip_remove_port(string $ip) : string {
|
354 |
$ip = trim($ip);
|
355 |
|
356 |
-
if (
|
357 |
// 1.1.1.1:80
|
358 |
$end = mb_stripos($ip, ':');
|
359 |
if ($end) {
|
@@ -484,11 +484,11 @@ function _geoip_detect_get_external_ip_adress_without_cache() : string
|
|
484 |
$ret = wp_remote_get($url, array('timeout' => defined('WP_TESTS_TITLE') ? 3 : 1.5));
|
485 |
|
486 |
if (is_wp_error($ret)) {
|
487 |
-
if (
|
488 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): Curl error (' . $url . '): ' . $ret->get_error_message(), E_USER_NOTICE);
|
489 |
}
|
490 |
} else if (isset($ret['response']['code']) && $ret['response']['code'] != 200) {
|
491 |
-
if (
|
492 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): HTTP error (' . $url . '): Returned code ' . $ret['response']['code'], E_USER_NOTICE);
|
493 |
}
|
494 |
} else {
|
@@ -497,7 +497,7 @@ function _geoip_detect_get_external_ip_adress_without_cache() : string
|
|
497 |
if (geoip_detect_is_ip($ip))
|
498 |
return $ip;
|
499 |
}
|
500 |
-
if (
|
501 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): HTTP error (' . $url . '): Did not return an IP: ' . $ret['body'], E_USER_NOTICE);
|
502 |
}
|
503 |
}
|
@@ -560,7 +560,7 @@ function _geoip_detect_disable_pagecache() {
|
|
560 |
|
561 |
if (!headers_sent()) {
|
562 |
header('Cache-Control: private, proxy-revalidate, s-maxage=0');
|
563 |
-
header(
|
564 |
}
|
565 |
}
|
566 |
|
@@ -585,17 +585,4 @@ function geoip_detect_format_localtime($timestamp = -1) : string {
|
|
585 |
$format = get_option('date_format') . ' '. get_option('time_format');
|
586 |
|
587 |
return get_date_from_gmt ( date( 'Y-m-d H:i:s', $timestamp ), $format);
|
588 |
-
}
|
589 |
-
|
590 |
-
function _geoip_str_begins_with($string, $startString) : bool
|
591 |
-
{
|
592 |
-
$len = mb_strlen($startString);
|
593 |
-
return (mb_substr($string, 0, $len) === $startString);
|
594 |
-
}
|
595 |
-
|
596 |
-
function _geoip_str_ends_with($string, $startString) : bool
|
597 |
-
{
|
598 |
-
$len = mb_strlen($startString);
|
599 |
-
//if ($len === 0) return true; // Not sure what is "expected behavior"
|
600 |
-
return (mb_substr($string, -$len) === $startString);
|
601 |
-
}
|
37 |
if (is_bool($options)) {
|
38 |
_doing_it_wrong('Geolocation IP Detection Plugin: geoip_detect2_get_info_from_ip()', '$skipCache has been renamed to $options. Instead of TRUE, now use "[\'skipCache\' => TRUE]".', '2.5.0');
|
39 |
$value = $options;
|
40 |
+
$options = [];
|
41 |
$options['skipCache'] = $value;
|
42 |
}
|
43 |
|
76 |
* @return GeoIp2\Database\Reader The reader, ready to do its work. Don't forget to `close()` it afterwards. NULL if file not found (or other problems).
|
77 |
* NULL if initialization went wrong (e.g., File not found.)
|
78 |
*/
|
79 |
+
function _geoip_detect2_get_reader($locales = null, $skipLocaleFilter = false, &$sourceId = '', $options = []) {
|
80 |
if (! $skipLocaleFilter) {
|
81 |
/**
|
82 |
* Filter: geoip_detect2_locales
|
208 |
}
|
209 |
|
210 |
function _geoip_detect2_get_new_empty_record($ip = '', $error = '') {
|
211 |
+
$data = [ 'traits' => [ 'ip_address' => $ip ], 'is_empty' => true ];
|
212 |
if ($error) {
|
213 |
$data['extra']['error'] = $error;
|
214 |
}
|
220 |
if (is_object($record) && method_exists($record, 'jsonSerialize')) {
|
221 |
$data = $record->jsonSerialize();
|
222 |
} else {
|
223 |
+
$data = [ 'traits' => [ 'ip_address' => $ip ], 'is_empty' => true ];
|
224 |
}
|
225 |
|
226 |
if (!isset($data['is_empty'])) {
|
325 |
|
326 |
function geoip_detect_sanitize_ip_list(string $ip_list) : string {
|
327 |
$list = explode(',', $ip_list);
|
328 |
+
$ret = [];
|
329 |
foreach ($list as $ip) {
|
330 |
$ip = trim($ip);
|
331 |
$parts = explode('/', $ip, 2);
|
353 |
function geoip_detect_ip_remove_port(string $ip) : string {
|
354 |
$ip = trim($ip);
|
355 |
|
356 |
+
if (str_contains($ip, '.')) { // IPv4
|
357 |
// 1.1.1.1:80
|
358 |
$end = mb_stripos($ip, ':');
|
359 |
if ($end) {
|
484 |
$ret = wp_remote_get($url, array('timeout' => defined('WP_TESTS_TITLE') ? 3 : 1.5));
|
485 |
|
486 |
if (is_wp_error($ret)) {
|
487 |
+
if (GEOIP_DETECT_DEBUG || defined('WP_TESTS_TITLE')) {
|
488 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): Curl error (' . $url . '): ' . $ret->get_error_message(), E_USER_NOTICE);
|
489 |
}
|
490 |
} else if (isset($ret['response']['code']) && $ret['response']['code'] != 200) {
|
491 |
+
if (GEOIP_DETECT_DEBUG || defined('WP_TESTS_TITLE')) {
|
492 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): HTTP error (' . $url . '): Returned code ' . $ret['response']['code'], E_USER_NOTICE);
|
493 |
}
|
494 |
} else {
|
497 |
if (geoip_detect_is_ip($ip))
|
498 |
return $ip;
|
499 |
}
|
500 |
+
if (GEOIP_DETECT_DEBUG || defined('WP_TESTS_TITLE')) {
|
501 |
trigger_error('_geoip_detect_get_external_ip_adress_without_cache(): HTTP error (' . $url . '): Did not return an IP: ' . $ret['body'], E_USER_NOTICE);
|
502 |
}
|
503 |
}
|
560 |
|
561 |
if (!headers_sent()) {
|
562 |
header('Cache-Control: private, proxy-revalidate, s-maxage=0');
|
563 |
+
header('cf-edge-cache: no-cache' ); // Disable Cloudflare APO
|
564 |
}
|
565 |
}
|
566 |
|
585 |
$format = get_option('date_format') . ' '. get_option('time_format');
|
586 |
|
587 |
return get_date_from_gmt ( date( 'Y-m-d H:i:s', $timestamp ), $format);
|
588 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
geoip-detect.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
/*
|
3 |
Plugin Name: Geolocation IP Detection
|
4 |
Plugin URI: http://www.yellowtree.de
|
5 |
-
Description:
|
6 |
Author: Yellow Tree (Benjamin Pick)
|
7 |
Author URI: http://www.yellowtree.de
|
8 |
-
Version: 5.
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Text Domain: geoip-detect
|
@@ -16,7 +16,7 @@ Requires WP: 5.4
|
|
16 |
Requires PHP: 7.2.5
|
17 |
*/
|
18 |
|
19 |
-
define('GEOIP_DETECT_VERSION', '5.
|
20 |
|
21 |
/*
|
22 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
@@ -92,6 +92,7 @@ include_once(GEOIP_PLUGIN_DIR . '/data-sources/auto.php');
|
|
92 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/precision.php');
|
93 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/header.php');
|
94 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/ipstack.php');
|
|
|
95 |
|
96 |
// You can define these constants in your theme/plugin if you like.
|
97 |
|
@@ -113,7 +114,7 @@ include_once(GEOIP_PLUGIN_DIR . '/data-sources/ipstack.php');
|
|
113 |
//define('GEOIP_DETECT_IP_EMPTY_CACHE_TIME', 2 * HOUR_IN_SECONDS);
|
114 |
|
115 |
/**
|
116 |
-
* How long the data of the IP is cached. This applies to the Web-APIs (Maxmind Precision
|
117 |
* Only successful lookups will be cached.
|
118 |
*/
|
119 |
//define('GEOIP_DETECT_READER_CACHE_TIME', 7 * DAY_IN_SECONDS);
|
2 |
/*
|
3 |
Plugin Name: Geolocation IP Detection
|
4 |
Plugin URI: http://www.yellowtree.de
|
5 |
+
Description: Provides geographic information detected by an IP adress.
|
6 |
Author: Yellow Tree (Benjamin Pick)
|
7 |
Author URI: http://www.yellowtree.de
|
8 |
+
Version: 5.1.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
Text Domain: geoip-detect
|
16 |
Requires PHP: 7.2.5
|
17 |
*/
|
18 |
|
19 |
+
define('GEOIP_DETECT_VERSION', '5.1.0');
|
20 |
|
21 |
/*
|
22 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
92 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/precision.php');
|
93 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/header.php');
|
94 |
include_once(GEOIP_PLUGIN_DIR . '/data-sources/ipstack.php');
|
95 |
+
include_once(GEOIP_PLUGIN_DIR . '/data-sources/fastah.php');
|
96 |
|
97 |
// You can define these constants in your theme/plugin if you like.
|
98 |
|
114 |
//define('GEOIP_DETECT_IP_EMPTY_CACHE_TIME', 2 * HOUR_IN_SECONDS);
|
115 |
|
116 |
/**
|
117 |
+
* How long the data of the IP is cached. This applies to the Web-APIs (Maxmind Precision, HostIP.info, ipstack, ...)
|
118 |
* Only successful lookups will be cached.
|
119 |
*/
|
120 |
//define('GEOIP_DETECT_READER_CACHE_TIME', 7 * DAY_IN_SECONDS);
|
init.php
CHANGED
@@ -20,6 +20,10 @@ function geoip_detect_defines() {
|
|
20 |
|
21 |
if (!defined('GEOIP_DETECT_USER_AGENT'))
|
22 |
define('GEOIP_DETECT_USER_AGENT', 'Geolocation Detect ' . GEOIP_DETECT_VERSION);
|
|
|
|
|
|
|
|
|
23 |
}
|
24 |
add_action('plugins_loaded', 'geoip_detect_defines');
|
25 |
|
@@ -158,7 +162,7 @@ function geoip_detect_dismiss_message() {
|
|
158 |
$ignored_notices = (array) get_user_meta(get_current_user_id(), 'geoip_detect_dismissed_notices', true);
|
159 |
|
160 |
if ($dismiss == '-1') { // Undocumented feature: reset dismissed messages
|
161 |
-
$ignored_notices =
|
162 |
} else if (!in_array($dismiss, $ignored_notices)) {
|
163 |
$ignored_notices[] = $dismiss;
|
164 |
}
|
@@ -214,7 +218,7 @@ register_uninstall_hook(GEOIP_PLUGIN_FILE, __NAMESPACE__ . '\\on_uninstall');
|
|
214 |
|
215 |
// For Debugging purposes ...
|
216 |
/*
|
217 |
-
if (
|
218 |
|
219 |
add_action('plugins_loaded', function() {
|
220 |
on_uninstall();
|
20 |
|
21 |
if (!defined('GEOIP_DETECT_USER_AGENT'))
|
22 |
define('GEOIP_DETECT_USER_AGENT', 'Geolocation Detect ' . GEOIP_DETECT_VERSION);
|
23 |
+
|
24 |
+
if (!defined('GEOIP_DETECT_DEBUG')) {
|
25 |
+
define('GEOIP_DETECT_DEBUG', WP_DEBUG);
|
26 |
+
}
|
27 |
}
|
28 |
add_action('plugins_loaded', 'geoip_detect_defines');
|
29 |
|
162 |
$ignored_notices = (array) get_user_meta(get_current_user_id(), 'geoip_detect_dismissed_notices', true);
|
163 |
|
164 |
if ($dismiss == '-1') { // Undocumented feature: reset dismissed messages
|
165 |
+
$ignored_notices = [];
|
166 |
} else if (!in_array($dismiss, $ignored_notices)) {
|
167 |
$ignored_notices[] = $dismiss;
|
168 |
}
|
218 |
|
219 |
// For Debugging purposes ...
|
220 |
/*
|
221 |
+
if (GEOIP_DETECT_DEBUG && isset($_GET['uninstall']) && $_GET['uninstall'] == 'asdf') {
|
222 |
|
223 |
add_action('plugins_loaded', function() {
|
224 |
on_uninstall();
|
js/dist/backend.f84e1103.js
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"gP7L":[function(require,module,exports) {
|
2 |
-
|
3 |
-
},{}]},{},["gP7L"], null)
|
4 |
-
//# sourceMappingURL=backend.f84e1103.js.map
|
|
|
|
|
|
|
|
js/dist/backend.f84e1103.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"backend.f84e1103.js","sourceRoot":"../.."}
|
|
js/dist/frontend.1115d690.js
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"LNzP":[function(require,module,exports) {
|
2 |
-
function o(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?module.exports=o=function(o){return typeof o}:module.exports=o=function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(t)}module.exports=o;
|
3 |
-
},{}],"fwsn":[function(require,module,exports) {
|
4 |
-
function n(n,t,o,r,e,i,u){try{var c=n[i](u),v=c.value}catch(a){return void o(a)}c.done?t(v):Promise.resolve(v).then(r,e)}function t(t){return function(){var o=this,r=arguments;return new Promise(function(e,i){var u=t.apply(o,r);function c(t){n(u,e,i,c,v,"next",t)}function v(t){n(u,e,i,c,v,"throw",t)}c(void 0)})}}module.exports=t;
|
5 |
-
},{}],"KA2S":[function(require,module,exports) {
|
6 |
-
var define;
|
7 |
-
var t,r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(P){u=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new G(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return F()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?y:s,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}t.wrap=h;var l="suspendedStart",s="suspendedYield",p="executing",y="completed",v={};function d(){}function g(){}function m(){}var w={};w[i]=function(){return this};var L=Object.getPrototypeOf,x=L&&L(L(N([])));x&&x!==e&&n.call(x,i)&&(w=x);var b=m.prototype=d.prototype=Object.create(w);function E(t){["next","throw","return"].forEach(function(r){u(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){var e;this._invoke=function(o,i){function a(){return new r(function(e,a){!function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):r.resolve(l).then(function(t){h.value=t,a(h)},function(t){return e("throw",t,a,c)})}c(u.arg)}(o,i,e,a)})}return e=e?e.then(a,a):a()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:F}}function F(){return{value:r,done:!0}}return g.prototype=b.constructor=m,m.constructor=g,g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(_.prototype),_.prototype[a]=function(){return this},t.AsyncIterator=_,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}
|
8 |
-
},{}],"m4eR":[function(require,module,exports) {
|
9 |
-
module.exports=require("regenerator-runtime");
|
10 |
-
},{"regenerator-runtime":"KA2S"}],"ZBnv":[function(require,module,exports) {
|
11 |
-
function n(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}module.exports=n;
|
12 |
-
},{}],"NoOd":[function(require,module,exports) {
|
13 |
-
function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}module.exports=r;
|
14 |
-
},{}],"AuD4":[function(require,module,exports) {
|
15 |
-
var global = arguments[3];
|
16 |
-
var define;
|
17 |
-
var t,n=arguments[3],r=e(require("@babel/runtime/helpers/typeof"));function e(t){return t&&t.__esModule?t:{default:t}}(function(){var e,u="Expected a function",o="__lodash_hash_undefined__",i=500,a=800,c=16,f=1/0,l=9007199254740991,s="[object AsyncFunction]",h="[object Function]",p="[object GeneratorFunction]",_="[object Null]",d="[object Proxy]",y="[object Symbol]",v="[object Undefined]",g=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b=/^\w*$/,j=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,O=/^\[object .+?Constructor\]$/,w="object"==(void 0===n?"undefined":(0,r.default)(n))&&n&&n.Object===Object&&n,z="object"==("undefined"==typeof self?"undefined":(0,r.default)(self))&&self&&self.Object===Object&&self,A=w||z||Function("return this")(),x="object"==("undefined"==typeof exports?"undefined":(0,r.default)(exports))&&exports&&!exports.nodeType&&exports,S=x&&"object"==("undefined"==typeof module?"undefined":(0,r.default)(module))&&module&&!module.nodeType&&module;function $(t,n){return!!(null==t?0:t.length)&&function(t,n,r){return n==n?function(t,n,r){var e=r-1,u=t.length;for(;++e<u;)if(t[e]===n)return e;return-1}(t,n,r):function(t,n,r,e){var u=t.length,o=r+(e?1:-1);for(;e?o--:++o<u;)if(n(t[o],o,t))return o;return-1}(t,E,r)}(t,n,0)>-1}function F(t,n,r){for(var e=-1,u=null==t?0:t.length;++e<u;)if(r(n,t[e]))return!0;return!1}function k(t,n){for(var r=-1,e=null==t?0:t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function E(t){return t!=t}function P(t){return function(n){return t(n)}}function T(t,n){return t.has(n)}var C,L=Array.prototype,M=Function.prototype,R=Object.prototype,q=A["__core-js_shared__"],I=M.toString,N=R.hasOwnProperty,D=(C=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",G=R.toString,U=RegExp("^"+I.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=A.Symbol,B=L.splice,H=V?V.toStringTag:e,J=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch(n){}}(),K=Math.max,Q=Math.min,W=Date.now,X=pt(A,"Map"),Y=pt(Object,"create"),Z=V?V.prototype:e,tt=Z?Z.toString:e;function nt(){}function rt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function et(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function ut(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function ot(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new ut;++n<r;)this.add(t[n])}function it(t,n){for(var r=t.length;r--;)if(Ot(t[r][0],n))return r;return-1}function at(t,n){for(var u=0,o=(n=function(t,n){if(wt(t))return t;return function(t,n){if(wt(t))return!1;var e=(0,r.default)(t);if("number"==e||"symbol"==e||"boolean"==e||null==t||kt(t))return!0;return b.test(t)||!g.test(t)||null!=n&&t in Object(n)}(t,n)?[t]:gt(Et(t))}(n,t)).length;null!=t&&u<o;)t=t[bt(n[u++])];return u&&u==o?t:e}function ct(t){return null==t?t===e?v:_:H&&H in Object(t)?function(t){var n=N.call(t,H),r=t[H];try{t[H]=e;var u=!0}catch(i){}var o=G.call(t);u&&(n?t[H]=r:delete t[H]);return o}(t):function(t){return G.call(t)}(t)}function ft(t){return!(!$t(t)||(n=t,D&&D in n))&&(xt(t)?U:O).test(function(t){if(null!=t){try{return I.call(t)}catch(n){}try{return t+""}catch(n){}}return""}(t));var n}function lt(t){if("string"==typeof t)return t;if(wt(t))return k(t,lt)+"";if(kt(t))return tt?tt.call(t):"";var n=t+"";return"0"==n&&1/t==-f?"-0":n}function st(t){return At(t)?t:[]}function ht(t,n){var e,u,o=t.__data__;return e=n,("string"==(u=(0,r.default)(e))||"number"==u||"symbol"==u||"boolean"==u?"__proto__"!==e:null===e)?o["string"==typeof n?"string":"hash"]:o.map}function pt(t,n){var r=function(t,n){return null==t?e:t[n]}(t,n);return ft(r)?r:e}rt.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},rt.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},rt.prototype.get=function(t){var n=this.__data__;if(Y){var r=n[t];return r===o?e:r}return N.call(n,t)?n[t]:e},rt.prototype.has=function(t){var n=this.__data__;return Y?n[t]!==e:N.call(n,t)},rt.prototype.set=function(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y&&n===e?o:n,this},et.prototype.clear=function(){this.__data__=[],this.size=0},et.prototype.delete=function(t){var n=this.__data__,r=it(n,t);return!(r<0||(r==n.length-1?n.pop():B.call(n,r,1),--this.size,0))},et.prototype.get=function(t){var n=this.__data__,r=it(n,t);return r<0?e:n[r][1]},et.prototype.has=function(t){return it(this.__data__,t)>-1},et.prototype.set=function(t,n){var r=this.__data__,e=it(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},ut.prototype.clear=function(){this.size=0,this.__data__={hash:new rt,map:new(X||et),string:new rt}},ut.prototype.delete=function(t){var n=ht(this,t).delete(t);return this.size-=n?1:0,n},ut.prototype.get=function(t){return ht(this,t).get(t)},ut.prototype.has=function(t){return ht(this,t).has(t)},ut.prototype.set=function(t,n){var r=ht(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},ot.prototype.add=ot.prototype.push=function(t){return this.__data__.set(t,o),this},ot.prototype.has=function(t){return this.__data__.has(t)};var _t,dt,yt,vt=(_t=J?function(t,n){return J(t,"toString",{configurable:!0,enumerable:!1,value:Pt(n),writable:!0})}:Tt,dt=0,yt=0,function(){var t=W(),n=c-(t-yt);if(yt=t,n>0){if(++dt>=a)return arguments[0]}else dt=0;return _t.apply(e,arguments)});var gt=function(t){var n=mt(t,function(t){return r.size===i&&r.clear(),t}),r=n.cache;return n}(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(j,function(t,r,e,u){n.push(e?u.replace(m,"$1"):r||t)}),n});function bt(t){if("string"==typeof t||kt(t))return t;var n=t+"";return"0"==n&&1/t==-f?"-0":n}var jt=function(t,n){return vt(function(t,n,r){return n=K(n===e?t.length-1:n,0),function(){for(var e=arguments,u=-1,o=K(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];u=-1;for(var a=Array(n+1);++u<n;)a[u]=e[u];return a[n]=r(i),function(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}(t,this,a)}}(t,n,Tt),t+"")}(function(t){var n=k(t,st);return n.length&&n[0]===t[0]?function(t,n,r){for(var u=r?F:$,o=t[0].length,i=t.length,a=i,c=Array(i),f=1/0,l=[];a--;){var s=t[a];a&&n&&(s=k(s,P(n))),f=Q(s.length,f),c[a]=!r&&(n||o>=120&&s.length>=120)?new ot(a&&s):e}s=t[0];var h=-1,p=c[0];t:for(;++h<o&&l.length<f;){var _=s[h],d=n?n(_):_;if(_=r||0!==_?_:0,!(p?T(p,d):u(l,d,r))){for(a=i;--a;){var y=c[a];if(!(y?T(y,d):u(t[a],d,r)))continue t}p&&p.push(d),l.push(_)}}return l}(n):[]});function mt(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError(u);var r=function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;if(o.has(u))return o.get(u);var i=t.apply(this,e);return r.cache=o.set(u,i)||o,i};return r.cache=new(mt.Cache||ut),r}function Ot(t,n){return t===n||t!=t&&n!=n}mt.Cache=ut;var wt=Array.isArray;function zt(t){return null!=t&&St(t.length)&&!xt(t)}function At(t){return Ft(t)&&zt(t)}function xt(t){if(!$t(t))return!1;var n=ct(t);return n==h||n==p||n==s||n==d}function St(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function $t(t){var n=(0,r.default)(t);return null!=t&&("object"==n||"function"==n)}function Ft(t){return null!=t&&"object"==(0,r.default)(t)}function kt(t){return"symbol"==(0,r.default)(t)||Ft(t)&&ct(t)==y}function Et(t){return null==t?"":lt(t)}function Pt(t){return function(){return t}}function Tt(t){return t}nt.constant=Pt,nt.intersection=jt,nt.memoize=mt,nt.eq=Ot,nt.get=function(t,n,r){var u=null==t?e:at(t,n);return u===e?r:u},nt.identity=Tt,nt.isArray=wt,nt.isArrayLike=zt,nt.isArrayLikeObject=At,nt.isFunction=xt,nt.isLength=St,nt.isObject=$t,nt.isObjectLike=Ft,nt.isSymbol=kt,nt.toString=Et,nt.VERSION="4.17.5","function"==typeof t&&"object"==(0,r.default)(t.amd)&&t.amd?(A._=nt,t(function(){return nt})):S?((S.exports=nt)._=nt,x._=nt):A._=nt}).call(void 0);
|
18 |
-
},{"@babel/runtime/helpers/typeof":"LNzP"}],"yK6K":[function(require,module,exports) {
|
19 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.camelToUnderscore=void 0;var e=l(require("@babel/runtime/helpers/classCallCheck")),t=l(require("@babel/runtime/helpers/createClass")),r=l(require("@babel/runtime/helpers/typeof")),a=l(require("../lodash.custom"));function l(e){return e&&e.__esModule?e:{default:e}}var o=function(e,t){if("object"===(0,r.default)(e)&&null!==e){if("object"===(0,r.default)(e.names)&&"object"===(0,r.default)(t))for(var a=0;a<t.length;a++){var l=t[a];if(e.names[l])return e.names[l]}return e.name?e.name:""}return e},s=function(e){return e=e.split(".").map(function(e){return"string"!=typeof e||"string"!=typeof e[0]?"":e=(e=e[0].toLowerCase()+e.slice(1)).replace(/([A-Z])/g,"_$1").toLowerCase()}).join(".")};exports.camelToUnderscore=s;var n=function(){function l(t,r){(0,e.default)(this,l),this.data={},this.default_locales=[],this.data=t||{is_empty:!0},this.default_locales=["en"],this.default_locales=this._process_locales(r)}return(0,t.default)(l,[{key:"get",value:function(e,t){return this.get_with_locales(e,null,t)}},{key:"get_raw",value:function(e){return e=s(e),a.default.get(this.data,e,null)}},{key:"has_property",value:function(e){return null!==this._lookup_with_locales(e,this.default_locales,null)}},{key:"_lookup_with_locales",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t=this._process_locales(t),".name"===e.substr(-5)&&(e=e.substr(0,e.length-5));var a=this.get_raw(e);return null!==(a=o(a,t))&&""!==a||(a=r),a}},{key:"_process_locales",value:function(e){return"string"==typeof e&&(e=[e]),Array.isArray(e)&&0!==e.length||(e=this.default_locales),e}},{key:"get_with_locales",value:function(e,t,a){var l=this._lookup_with_locales(e,t,a);return"object"===(0,r.default)(l)&&console.warn('Geolocation IP Detection: The property "'+e+'" is of type "'+(0,r.default)(l)+'", should be string or similar',l),void 0===l?(console.warn('Geolocation IP Detection: The property "'+e+'" is not defined, please check spelling or maybe you need a different data source',{data:this.data}),""):l}},{key:"get_country_iso",value:function(){var e=this.get("country.iso_code");return e&&(e=e.substr(0,2).toLowerCase()),e}},{key:"is_empty",value:function(){return this.get("is_empty",!1)}},{key:"error",value:function(){return this.get_raw("extra.error")||""}},{key:"serialize",value:function(){return this.data}}]),l}(),u=n;exports.default=u;
|
20 |
-
},{"@babel/runtime/helpers/classCallCheck":"ZBnv","@babel/runtime/helpers/createClass":"NoOd","@babel/runtime/helpers/typeof":"LNzP","../lodash.custom":"AuD4"}],"VVpI":[function(require,module,exports) {
|
21 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocalStorage=exports.setLocalStorage=void 0;var e=function(e,t,r){var a={value:t,expires_at:(new Date).getTime()+1e3*r/1};localStorage.setItem(e.toString(),JSON.stringify(a))};exports.setLocalStorage=e;var t=function(e){var t=null;try{t=JSON.parse(localStorage.getItem(e.toString()))}catch(r){return null}if(null!==t){if(!(null!==t.expires_at&&t.expires_at<(new Date).getTime()))return t.value;localStorage.removeItem(e.toString())}return null};exports.getLocalStorage=t;
|
22 |
-
},{}],"jf5f":[function(require,module,exports) {
|
23 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeJSONRequest=exports.makeRequest=void 0;var e=r(require("@babel/runtime/helpers/asyncToGenerator")),t=r(require("@babel/runtime/regenerator"));function r(e){return e&&e.__esModule?e:{default:e}}var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",r=new XMLHttpRequest;return new Promise(function(n,u){r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n(r):u({status:r.status,statusText:r.statusText,request:r}))},r.open(t||"GET",e,!0),r.send()})};exports.makeRequest=n;var u=function(e){try{return JSON.parse(e)}catch(t){return e}},s=function(){var r=(0,e.default)(t.default.mark(function e(r){var s,a,o=arguments;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=o.length>1&&void 0!==o[1]?o[1]:"GET",e.prev=1,e.next=4,n(r,s);case 4:return a=e.sent,e.abrupt("return",u(a.responseText));case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",u(e.t0.request.responseText));case 11:case"end":return e.stop()}},e,null,[[1,8]])}));return function(e){return r.apply(this,arguments)}}();exports.makeJSONRequest=s;
|
24 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR"}],"yyFn":[function(require,module,exports) {
|
25 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.set_override=_,exports.remove_override=x,exports.get_info=m,exports.options=void 0;var e,r=s(require("@babel/runtime/helpers/typeof")),t=s(require("@babel/runtime/helpers/asyncToGenerator")),o=s(require("@babel/runtime/regenerator")),n=s(require("./models/record")),a=require("./lib/localStorageAccess"),i=s(require("./lodash.custom")),u=require("./lib/xhr");function s(e){return e&&e.__esModule?e:{default:e}}var c=(null===(e=window.geoip_detect)||void 0===e?void 0:e.options)||{ajaxurl:"/wp-admin/admin-ajax.php",default_locales:["en"],cookie_duration_in_days:7,cookie_name:"geoip-detect-result"};exports.options=c;var l=null;function d(){if(!l){var e=c.ajaxurl+"?action=geoip_detect2_get_info_from_current_ip";l=(0,u.makeJSONRequest)(e)}return l}function p(){return f.apply(this,arguments)}function f(){return(f=(0,t.default)(o.default.mark(function e(){var r,t,n,i;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,t=!1,!c.cookie_name){e.next=6;break}if(!(t=(0,a.getLocalStorage)(c.cookie_name))||!t.extra){e.next=6;break}return e.abrupt("return",t);case 6:return e.prev=6,e.next=9,d();case 9:r=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),r=e.t0.responseJSON||e.t0;case 15:if(!c.cookie_name){e.next=20;break}if(t=(0,a.getLocalStorage)(c.cookie_name),!0!==(null===(n=t)||void 0===n?void 0:null===(i=n.extra)||void 0===i?void 0:i.override)){e.next=19;break}return e.abrupt("return",t);case 19:(0,a.setLocalStorage)(c.cookie_name,r,24*c.cookie_duration_in_days*60*60);case 20:return e.abrupt("return",r);case 21:case"end":return e.stop()}},e,null,[[6,12]])}))).apply(this,arguments)}function _(e,r){return e&&"function"==typeof e.serialize&&(e=e.serialize()),(r=r||c.cookie_duration_in_days)<0?(console.warn("set_override_data() did nothing: A negative duration doesn't make sense. If you want to remove the override, use remove_override() instead."),!1):v(e,r)}function v(e,r){return e||(e={}),e.extra||(e.extra={}),e.extra.override=!0,(0,a.setLocalStorage)(c.cookie_name,e,24*r*60*60),!0}function x(){return(0,a.setLocalStorage)(c.cookie_name,{},-1),!0}function m(){return k.apply(this,arguments)}function k(){return(k=(0,t.default)(o.default.mark(function e(){var t,a;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:return t=e.sent,"object"!==(0,r.default)(t)&&(console.error("Geoip-detect: Record should be an object, not a "+(0,r.default)(t),t),t={extra:{error:t||"Network error, look at the original server response ..."}}),a=new n.default(t,c.default_locales),e.abrupt("return",a);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
26 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./models/record":"yK6K","./lib/localStorageAccess":"VVpI","./lodash.custom":"AuD4","./lib/xhr":"jf5f"}],"YIwO":[function(require,module,exports) {
|
27 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.selectItemByValue=t,exports.selectItemByAttribute=n,exports.triggerNativeEvent=o,exports.domReady=void 0;var e=new Promise(function(e){"loading"===document.readyState?document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!=document.readyState&&e()}):e()});function t(e,t){for(var n=0;n<e.options.length;n++)if(e.options[n].value===t){e.selectedIndex=n;break}}function n(e,t,n){for(var o=0;o<e.options.length;o++)if(e.options[o].getAttribute(t)===n){e.selectedIndex=o;break}}function o(e,t){if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)}else e.fireEvent("on"+t)}exports.domReady=e;
|
28 |
-
},{}],"IyEz":[function(require,module,exports) {
|
29 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.get_options=o,exports.action_on_elements=a,exports.get_value_from_record=s;var e=n(require("@babel/runtime/helpers/asyncToGenerator")),r=n(require("@babel/runtime/regenerator")),t=require("../lookup");function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var r=e.getAttribute("data-options");try{return JSON.parse(r)}catch(t){return{}}}function a(e,r,t){return u.apply(this,arguments)}function u(){return(u=(0,e.default)(r.default.mark(function e(n,o,a){var u,s;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((u=document.getElementsByClassName(n)).length){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,t.get_info)();case 5:if(!(s=e.sent).error()){e.next=9;break}return console.error("Geolocation IP Detection Error ("+o+"): "+s.error()),e.abrupt("return");case 9:Array.from(u).forEach(function(e){return a(e,s)});case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)}function s(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=o(e);return t=t||n.property,n.skip_cache&&console.warn("Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME."),r.get_with_locales(t,n.lang,n.default)}
|
30 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lookup":"yyFn"}],"AwHB":[function(require,module,exports) {
|
31 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_normal=o,exports.do_shortcode_flags=r,exports.do_shortcode_country_select=_,exports.do_shortcode_text_input=c;var e=require("../lib/html"),t=require("./helpers");function o(e,o){e.innerText=(0,t.get_value_from_record)(e,o)}function r(e,o){var r=o.get_country_iso()||(0,t.get_options)(e).default;r&&e.classList.add("flag-icon-"+r)}function _(t,o){var r=o.get_country_iso();(0,e.selectItemByAttribute)(t,"data-c",r),(0,e.triggerNativeEvent)(t,"change")}function c(o,r){o.value=(0,t.get_value_from_record)(o,r),(0,e.triggerNativeEvent)(o,"change")}
|
32 |
-
},{"../lib/html":"YIwO","./helpers":"IyEz"}],"jiwS":[function(require,module,exports) {
|
33 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_show_if=r,exports.geoip_detect2_shortcode_evaluate_conditions=i;var e=n(require("@babel/runtime/helpers/typeof")),o=require("./helpers"),t=n(require("../lodash.custom"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=(0,o.get_options)(e),r=i(n.parsed,n,t);e.style.display=r?"":"none !important"}function i(o,t,n){var r=["name","iso_code","iso_code3","code","geoname_id"],i="or"!==o.op;return o.conditions.forEach(function(u){var a=!1,c=[],l=n.get_raw(u.p);null===l?a=!1:"object"===(0,e.default)(l)?r.forEach(function(e){l[e]?c.push(l[e]):"name"==e&&c.push(n.get_with_locales(u.p,t.lang))}):c=[l],a=s(u.v,c),u.not&&(a=!a),i="or"===o.op?i||a:i&&a}),o.not&&(i=!i),i}function s(e,o){return!0===o[0]?o=["true","yes","y","1"]:!1===o[0]&&(o=["false","no","n","0",""]),o=o.map(function(e){return String(e).toLowerCase()}),e=e.split(","),t.default.intersection(e,o).length>0}
|
34 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","./helpers":"IyEz","../lodash.custom":"AuD4"}],"d5ii":[function(require,module,exports) {
|
35 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcodes=void 0;var e=c(require("@babel/runtime/helpers/asyncToGenerator")),t=c(require("@babel/runtime/regenerator")),o=require("../lib/html"),r=require("./helpers"),n=require("./normal"),s=require("./show-if");function c(e){return e&&e.__esModule?e:{default:e}}var i=function(){var c=(0,e.default)(t.default.mark(function e(){return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.domReady;case 2:(0,r.action_on_elements)("js-geoip-detect-shortcode","could not execute shortcode(s) [geoip_detect2]",n.do_shortcode_normal),(0,r.action_on_elements)("js-geoip-detect-flag","could not configure the flag(s)",n.do_shortcode_flags),(0,r.action_on_elements)("js-geoip-text-input","could not set the value of the text input field(s)",n.do_shortcode_text_input),(0,r.action_on_elements)("js-geoip-detect-country-select","could not set the value of the select field(s)",n.do_shortcode_country_select),(0,r.action_on_elements)("js-geoip-detect-show-if","could not execute the show-if/hide-if conditions",s.do_shortcode_show_if);case 7:case"end":return e.stop()}},e)}));return function(){return c.apply(this,arguments)}}();exports.do_shortcodes=i;
|
36 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lib/html":"YIwO","./helpers":"IyEz","./normal":"AwHB","./show-if":"jiwS"}],"EtfF":[function(require,module,exports) {
|
37 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calc_classes=s,exports.add_body_classes=c;var e=o(require("@babel/runtime/helpers/asyncToGenerator")),r=o(require("@babel/runtime/regenerator")),t=require("./lib/html"),n=require("./lookup");function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return{country:e.get("country.iso_code"),"country-is-in-european-union":e.get("country.is_in_european_union",!1),continent:e.get("continent.code"),province:e.get("most_specific_subdivision.iso_code")}}function c(){return a.apply(this,arguments)}function a(){return(a=(0,e.default)(r.default.mark(function e(){var o,c,a,u,i,d,l;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.get_info)();case 2:if(!(o=e.sent).error()){e.next=6;break}return console.error("Geodata Error (could not add CSS-classes to body): "+o.error()),e.abrupt("return");case 6:return c=s(o),e.next=9,t.domReady;case 9:for(a=document.getElementsByTagName("body")[0],u=0,i=Object.keys(c);u<i.length;u++)d=i[u],(l=c[d])&&("string"==typeof l?a.classList.add("geoip-".concat(d,"-").concat(l)):a.classList.add("geoip-".concat(d)));case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
38 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./lib/html":"YIwO","./lookup":"yyFn"}],"ZVsn":[function(require,module,exports) {
|
39 |
-
"use strict";var e=require("./lookup"),o=require("./shortcodes/index"),d=require("./body_classes");e.options.do_body_classes&&(0,d.add_body_classes)(),e.options.do_shortcodes&&(0,o.do_shortcodes)(),window.geoip_detect.get_info=e.get_info,window.geoip_detect.set_override=e.set_override,window.geoip_detect.remove_override=e.remove_override;
|
40 |
-
},{"./lookup":"yyFn","./shortcodes/index":"d5ii","./body_classes":"EtfF"}]},{},["ZVsn"], null)
|
41 |
-
//# sourceMappingURL=frontend.1115d690.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/dist/frontend.1115d690.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["node_modules/@babel/runtime/helpers/typeof.js","node_modules/@babel/runtime/helpers/asyncToGenerator.js","node_modules/regenerator-runtime/runtime.js","node_modules/@babel/runtime/regenerator/index.js","node_modules/@babel/runtime/helpers/classCallCheck.js","node_modules/@babel/runtime/helpers/createClass.js","js/lodash.custom.js","js/models/record.js","js/lib/localStorageAccess.js","js/lib/xhr.js","js/lookup.js","js/lib/html.js","js/shortcodes/helpers.js","js/shortcodes/normal.js","js/shortcodes/show-if.js","js/shortcodes/index.js","js/body_classes.js","js/frontend.js"],"names":["undefined","FUNC_ERROR_TEXT","HASH_UNDEFINED","MAX_MEMOIZE_SIZE","HOT_COUNT","HOT_SPAN","INFINITY","MAX_SAFE_INTEGER","asyncTag","funcTag","genTag","nullTag","proxyTag","symbolTag","undefinedTag","reIsDeepProp","reIsPlainProp","rePropName","reEscapeChar","reIsHostCtor","freeGlobal","global","Object","freeSelf","self","root","Function","freeExports","exports","nodeType","freeModule","module","arrayIncludes","array","value","length","baseIndexOf","fromIndex","strictIndexOf","index","baseFindIndex","predicate","fromRight","baseIsNaN","arrayIncludesWith","comparator","arrayMap","iteratee","result","Array","baseUnary","func","cacheHas","cache","key","has","arrayProto","uid","prototype","funcProto","objectProto","coreJsData","funcToString","toString","hasOwnProperty","maskSrcKey","exec","keys","IE_PROTO","nativeObjectToString","reIsNative","RegExp","call","replace","Symbol","splice","symToStringTag","toStringTag","defineProperty","getNative","e","nativeMax","Math","max","nativeMin","min","nativeNow","Date","now","Map","nativeCreate","symbolProto","symbolToString","lodash","Hash","entries","clear","entry","set","ListCache","MapCache","SetCache","values","__data__","add","assocIndexOf","eq","baseGet","object","path","castPath","isArray","isKey","type","isSymbol","test","stringToPath","toKey","baseGetTag","getRawTag","isOwn","tag","unmasked","objectToString","baseIsNative","isObject","isFunction","toSource","isMasked","baseToString","castArrayLikeObject","isArrayLikeObject","getMapData","map","data","isKeyable","getValue","hashClear","size","hashDelete","get","hashGet","hashHas","hashSet","listCacheClear","listCacheDelete","pop","listCacheGet","listCacheHas","listCacheSet","push","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","setCacheAdd","setCacheHas","setToString","count","lastCalled","string","constant","identity","stamp","remaining","arguments","apply","memoizeCapped","memoize","charCodeAt","match","number","quote","subString","intersection","baseRest","start","overRest","transform","args","otherArgs","thisArg","arrays","mapped","baseIntersection","othIndex","includes","othLength","caches","maxLength","Infinity","seen","outer","computed","resolver","TypeError","memoized","Cache","other","isArrayLike","isLength","isObjectLike","defaultValue","VERSION","define","amd","_","Record","_get_localized","ret","locales","names","i","locale","name","camelToUnderscore","split","x","toLowerCase","slice","join","default_locales","is_empty","_process_locales","prop","default_value","get_with_locales","_lookup_with_locales","substr","get_raw","console","warn","country","setLocalStorage","variable","ttl_sec","expires_at","getTime","localStorage","setItem","JSON","stringify","getLocalStorage","parse","getItem","removeItem","makeRequest","url","method","request","XMLHttpRequest","Promise","resolve","reject","onreadystatechange","readyState","status","statusText","open","send","jsonDecodeIfPossible","str","makeJSONRequest","responseText","options","window","geoip_detect","ajaxurl","cookie_duration_in_days","cookie_name","ajaxPromise","get_info_raw","get_info_cached","response","storedResponse","extra","responseJSON","override","set_override","record","duration_in_days","serialize","set_override_data","remove_override","get_info","error","domReady","document","addEventListener","attachEvent","selectItemByValue","el","selectedIndex","selectItemByAttribute","attributeName","attributeValue","getAttribute","triggerNativeEvent","createEvent","event","initEvent","dispatchEvent","fireEvent","get_options","raw","action_on_elements","className","errorMessage","callback","elements","getElementsByClassName","from","forEach","get_value_from_record","property","opt","skip_cache","lang","default","do_shortcode_normal","innerText","do_shortcode_flags","get_country_iso","classList","do_shortcode_country_select","do_shortcode_text_input","do_shortcode_show_if","evaluated","geoip_detect2_shortcode_evaluate_conditions","parsed","style","display","alternativePropertyNames","isConditionMatching","op","conditions","c","subConditionMatching","raw_value","p","geoip_detect2_shortcode_check_subcondition","v","not","expectedValues","actualValues","intersect","String","do_shortcodes","calc_classes","continent","province","add_body_classes","css_classes","body","getElementsByTagName","do_body_classes"],"mappings":";AAAA,SAAA,EAAA,GAaA,MAVA,mBAAA,QAAA,iBAAA,OAAA,SACA,OAAA,QAAA,EAAA,SAAA,GACA,cAAA,GAGA,OAAA,QAAA,EAAA,SAAA,GACA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,GAIA,EAAA,GAGA,OAAA,QAAA;;AChBA,SAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,GACA,IACA,IAAA,EAAA,EAAA,GAAA,GACA,EAAA,EAAA,MACA,MAAA,GAEA,YADA,EAAA,GAIA,EAAA,KACA,EAAA,GAEA,QAAA,QAAA,GAAA,KAAA,EAAA,GAIA,SAAA,EAAA,GACA,OAAA,WACA,IAAA,EAAA,KACA,EAAA,UACA,OAAA,IAAA,QAAA,SAAA,EAAA,GACA,IAAA,EAAA,EAAA,MAAA,E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CAAA,EAAA,KAAA,EAAA,MAAA,OAICvD,QAAQuD,MAAM,sDAAwDN,EAAOM,SAJ9E,EAAA,OAAA,UAAA,KAAA,EAUGC,OAFAkE,EAAcJ,EAAarE,GAR9B,EAAA,KAAA,EAUGO,EAVH,SAAA,KAAA,EAaazQ,IADV4U,EAAOlE,SAASmE,qBAAqB,QAAQ,GACnC7U,EAAAA,EAAAA,EAAAA,OAAO6C,KAAK8R,GAAc,EAAA,EAAA,OAAA,IAAjC3S,EAAiC,EAAA,IAChCpB,EAAQ+T,EAAY3S,MAEA,iBAAVpB,EACRgU,EAAK9B,UAAU5N,IAAalD,SAAAA,OAAAA,EAAOpB,KAAAA,OAAAA,IAEnCgU,EAAK9B,UAAU5N,IAAalD,SAAAA,OAAAA,KAnBrC,KAAA,GAAA,IAAA,MAAA,OAAA,EAAA,SAAA,OAAA,MAAA,KAAA;;ACKP,aAjBA,IAAA,EAAA,QAAA,YACA,EAAA,QAAA,sBACA,EAAA,QAAA,kBAIImN,EAAQ2F,QAAAA,kBACR,EAAA,EAAA,oBAEA3F,EAAQmF,QAAAA,gBACR,EAAA,EAAA,iBAIJlF,OAAOC,aAAakB,SAAWA,EAA/B,SAEAnB,OAAOC,aAAaY,aAAeA,EAAnC,aACAb,OAAOC,aAAaiB,gBAAkBA,EAAtC","file":"frontend.1115d690.js","sourceRoot":"../..","sourcesContent":["function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = require(\"regenerator-runtime\");\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","/**\n * @license\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash include=\"get,intersection\" -o js/lodash.custom.js`\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.5';\n\n /** Error message constants. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n /** `Object#toString` result references. */\n var asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n nullTag = '[object Null]',\n proxyTag = '[object Proxy]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]';\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /*--------------------------------------------------------------------------*/\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = root['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Symbol = root.Symbol,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now;\n\n /* Built-in method references that are verified to be native. */\n var Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash() {\n // No operation performed.\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\n function constant(value) {\n return function() {\n return value;\n };\n }\n\n /**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\n function identity(value) {\n return value;\n }\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return wrapped values in chain sequences.\n lodash.constant = constant;\n lodash.intersection = intersection;\n lodash.memoize = memoize;\n\n /*------------------------------------------------------------------------*/\n\n // Add methods that return unwrapped values in chain sequences.\n lodash.eq = eq;\n lodash.get = get;\n lodash.identity = identity;\n lodash.isArray = isArray;\n lodash.isArrayLike = isArrayLike;\n lodash.isArrayLikeObject = isArrayLikeObject;\n lodash.isFunction = isFunction;\n lodash.isLength = isLength;\n lodash.isObject = isObject;\n lodash.isObjectLike = isObjectLike;\n lodash.isSymbol = isSymbol;\n lodash.toString = toString;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The semantic version number.\n *\n * @static\n * @memberOf _\n * @type {string}\n */\n lodash.VERSION = VERSION;\n\n /*--------------------------------------------------------------------------*/\n\n // Some AMD build optimizers, like r.js, check for condition patterns like:\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n // Expose Lodash on the global object to prevent errors when Lodash is\n // loaded by a script tag in the presence of an AMD loader.\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\n // Use `_.noConflict` to remove Lodash from the global object.\n root._ = lodash;\n\n // Define as an anonymous module so, through path mapping, it can be\n // referenced as the \"underscore\" module.\n define(function() {\n return lodash;\n });\n }\n // Check for `exports` after `define` in case a build optimizer adds it.\n else if (freeModule) {\n // Export for Node.js.\n (freeModule.exports = lodash)._ = lodash;\n // Export for CommonJS support.\n freeExports._ = lodash;\n }\n else {\n // Export to the global object.\n root._ = lodash;\n }\n}.call(this));\n","\nimport _ from '../lodash.custom';\n\n\nconst _get_localized = function(ret, locales) {\n if (typeof(ret) === 'object' && ret !== null) {\n if (typeof (ret.names) === 'object' && typeof (locales) === 'object') {\n for (let i = 0 ; i < locales.length ; i++) {\n let locale = locales[i];\n\n if (ret.names[locale]) {\n return ret.names[locale];\n }\n }\n }\n\n if (ret.name) {\n return ret.name;\n }\n\n return '';\n }\n return ret;\n}\n\nexport const camelToUnderscore = function(key) {\n key = key.split('.').map((x) => {\n if (typeof (x) !== 'string' || typeof (x[0]) !== 'string') {\n return '';\n }\n x = x[0].toLowerCase() + x.slice(1); // to allow \"MostSpecificSubdivision\"\n x = x.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n return x;\n }).join('.');\n\n return key;\n}\n\nclass Record {\n data = {};\n default_locales = [];\n\n constructor(data, default_locales) {\n this.data = data || { is_empty: true };\n \n this.default_locales = ['en']; \n this.default_locales = this._process_locales(default_locales);\n }\n\n get(prop, default_value) {\n return this.get_with_locales(prop, null, default_value);\n }\n\n get_raw(prop) {\n prop = camelToUnderscore(prop);\n return _.get(this.data, prop, null);\n }\n \n has_property(prop) {\n const ret = this._lookup_with_locales(prop, this.default_locales, null)\n return ret !== null;\n }\n\n _lookup_with_locales(prop, locales, default_value = '') {\n locales = this._process_locales(locales);\n\n // Treat pseudo-property 'name' as if it never existed\n if (prop.substr(-5) === '.name') {\n prop = prop.substr(0, prop.length - 5);\n }\n\n let ret = this.get_raw(prop);\n \n // Localize property, if possible\n ret = _get_localized(ret, locales);\n \n if (ret === null || ret === '') {\n ret = default_value;\n }\n\n return ret;\n }\n \n _process_locales(locales) {\n if (typeof(locales) === 'string') {\n locales = [ locales ];\n }\n if (!Array.isArray(locales) || locales.length === 0) {\n locales = this.default_locales;\n }\n return locales;\n }\n\n get_with_locales(prop, locales, default_value) {\n const ret = this._lookup_with_locales(prop, locales, default_value);\n\n if (typeof(ret) === 'object') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is of type \"' + typeof (ret) + '\", should be string or similar', ret)\n }\n if (typeof(ret) === 'undefined') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is not defined, please check spelling or maybe you need a different data source', { data: this.data })\n return '';\n }\n\n return ret;\n }\n\n get_country_iso() {\n let country = this.get('country.iso_code');\n if(country) {\n country = country.substr(0, 2).toLowerCase();\n }\n return country;\n }\n\n /**\n * Check if there is information available for this IP\n * @returns boolean \n */\n is_empty() {\n return this.get('is_empty', false);\n }\n \n /**\n * Get error message, if any\n * @return string Error Message\n */\n error() {\n return this.get_raw('extra.error') || '';\n }\n\n /**\n * Get the raw data of this object\n * @returns object\n */\n serialize() {\n return this.data;\n }\n}\n\nexport default Record;","export const setLocalStorage = function (variable, value, ttl_sec) {\n var data = { value: value, expires_at: new Date().getTime() + (ttl_sec * 1000) / 1 };\n localStorage.setItem(variable.toString(), JSON.stringify(data));\n};\n\nexport const getLocalStorage = function (variable) {\n let data = null;\n try {\n data = JSON.parse(localStorage.getItem(variable.toString()));\n } catch(e) {\n return null;\n }\n if (data !== null) {\n if (data.expires_at !== null && data.expires_at < new Date().getTime()) {\n localStorage.removeItem(variable.toString());\n } else {\n return data.value;\n }\n }\n return null;\n}\n","// @see https://gomakethings.com/promise-based-xhr/\n\nexport const makeRequest = function (url, method = 'GET') {\n\n // Create the XHR request\n var request = new XMLHttpRequest();\n\n // Return it as a Promise\n return new Promise(function (resolve, reject) {\n\n // Setup our listener to process compeleted requests\n request.onreadystatechange = function () {\n\n // Only run if the request is complete\n if (request.readyState !== 4) return;\n\n // Process the response\n if (request.status >= 200 && request.status < 300) {\n // If successful\n resolve(request);\n } else {\n // If failed\n reject({\n status: request.status,\n statusText: request.statusText,\n request: request\n });\n }\n\n };\n\n // Setup our HTTP request\n request.open(method || 'GET', url, true);\n\n // Send the request\n request.send();\n\n });\n};\n\nconst jsonDecodeIfPossible = function(str) {\n try {\n return JSON.parse(str);\n } catch(e) {\n return str;\n }\n}\n\nexport const makeJSONRequest = async function(url, method = 'GET') {\n try {\n const request = await makeRequest(url, method);\n return jsonDecodeIfPossible(request.responseText);\n } catch(e) {\n return jsonDecodeIfPossible(e.request.responseText);\n }\n}\n","import Record from './models/record';\nimport { getLocalStorage, setLocalStorage } from './lib/localStorageAccess';\nimport _ from './lodash.custom';\nimport { makeJSONRequest } from './lib/xhr';\n\n\nexport const options = window.geoip_detect?.options || {\n ajaxurl: \"/wp-admin/admin-ajax.php\",\n default_locales: ['en'],\n cookie_duration_in_days: 7,\n cookie_name: 'geoip-detect-result'\n};\n\nlet ajaxPromise = null;\n\nfunction get_info_raw() {\n if (!ajaxPromise) {\n // Do Ajax Request only once per page load\n const url = options.ajaxurl + '?action=geoip_detect2_get_info_from_current_ip'\n\n ajaxPromise = makeJSONRequest(url);\n }\n\n return ajaxPromise;\n}\n\nasync function get_info_cached() {\n let response = false;\n let storedResponse = false;\n\n // 1) Load Info from localstorage cookie cache, if possible\n if (options.cookie_name) {\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse && storedResponse.extra) {\n return storedResponse;\n }\n }\n\n // 2) Get response\n try {\n response = await get_info_raw();\n } catch (err) {\n response = err.responseJSON || err;\n }\n\n // 3) Save info to localstorage cookie cache\n if (options.cookie_name) {\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse?.extra?.override === true) {\n return storedResponse;\n }\n\n // This might be an error object - cache it anyway\n setLocalStorage(options.cookie_name, response, options.cookie_duration_in_days * 24 * 60 * 60);\n }\n\n return response;\n}\n\n\n/**\n * This functions allows to override the geodetected data manually (e.g. a country selector)\n * \n * @api\n * @param {*} record \n * @param {number} duration_in_days When this override expires (default: 1 week later)\n * @return boolean\n */\nexport function set_override(record, duration_in_days) {\n if (record && typeof(record.serialize) === 'function') {\n record = record.serialize();\n }\n\n duration_in_days = duration_in_days || options.cookie_duration_in_days;\n if (duration_in_days < 0) {\n console.warn('set_override_data() did nothing: A negative duration doesn\\'t make sense. If you want to remove the override, use remove_override() instead.');\n return false;\n }\n\n return set_override_data(record, duration_in_days);\n}\nfunction set_override_data(data, duration_in_days) {\n if (!data) {\n data = {};\n }\n if (!data.extra) {\n data.extra = {};\n }\n data.extra.override = true;\n\n setLocalStorage(options.cookie_name, data, duration_in_days * 24 * 60 * 60);\n return true;\n}\n\n/**\n * Remove the override data.\n * On next page load, the record data will be loaded from the server again.\n * \n * @return boolean\n */\nexport function remove_override() {\n setLocalStorage(options.cookie_name, {}, -1);\n return true;\n}\n\n\n/**\n * Load the data from the server\n * \n * (It can also be loaded from the browser localstorage, if the record data is present there already.)\n * \n * @api\n * @return Promise(Record)\n */\nexport async function get_info() {\n let response = await get_info_cached();\n\n if (typeof (response) !== 'object') {\n console.error('Geoip-detect: Record should be an object, not a ' + typeof (response), response);\n response = { 'extra': { 'error': response || 'Network error, look at the original server response ...' } };\n }\n\n const record = new Record(response, options.default_locales);\n return record;\n}","export const domReady = new Promise(resolve => {\n if (document.readyState === \"loading\") {\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', resolve);\n } else {\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState != 'loading')\n resolve();\n });\n }\n }\n else {\n resolve();\n }\n});\n\nexport function selectItemByValue(el, value) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].value === value) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\nexport function selectItemByAttribute(el, attributeName, attributeValue) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].getAttribute(attributeName) === attributeValue) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\n\nexport function triggerNativeEvent(el, name) {\n if (document.createEvent) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent(name, true, false);\n el.dispatchEvent(event);\n } else {\n el.fireEvent('on' + name);\n }\n}","import { get_info } from \"../lookup\";\n\n// Get Options from data-options and json parse them\nexport function get_options(el) {\n const raw = el.getAttribute('data-options');\n try {\n return JSON.parse(raw);\n } catch (e) {\n return {};\n }\n}\n\nexport async function action_on_elements(className, errorMessage, callback) {\n const elements = document.getElementsByClassName(className);\n if (!elements.length) return;\n\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (' + errorMessage + '): ' + record.error());\n return;\n }\n\n Array.from(elements)\n .forEach(el => callback(el, record));\n}\n\nexport function get_value_from_record(el, record, property = null) {\n const opt = get_options(el);\n property = property || opt.property;\n if (opt.skip_cache) {\n console.warn(\"Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME.\");\n }\n\n return record.get_with_locales(property, opt.lang, opt.default);\n}","import { selectItemByAttribute, triggerNativeEvent } from \"../lib/html\";\nimport { get_value_from_record, get_options } from \"./helpers\";\n\nexport function do_shortcode_normal(el, record) {\n el.innerText = get_value_from_record(el, record);\n}\n\nexport function do_shortcode_flags(el, record) {\n const country = record.get_country_iso() || get_options(el).default;\n if (country) {\n el.classList.add('flag-icon-' + country)\n }\n}\n\nexport function do_shortcode_country_select(el, record) {\n let country = record.get_country_iso();\n\n selectItemByAttribute(el, 'data-c', country);\n triggerNativeEvent(el, 'change');\n}\n\nexport function do_shortcode_text_input(el, record) {\n el.value = get_value_from_record(el, record);\n triggerNativeEvent(el, 'change');\n}","import { get_options } from './helpers';\nimport _ from '../lodash.custom'; // we might use lodash-es in the future\n\n\nexport function do_shortcode_show_if(el, record) {\n const opt = get_options(el);\n const evaluated = geoip_detect2_shortcode_evaluate_conditions(opt.parsed, opt, record);\n\n if (!evaluated) {\n el.style.display = \"none !important\";\n } else {\n el.style.display = '';\n }\n}\n\nexport function geoip_detect2_shortcode_evaluate_conditions(parsed, opt, record) {\n const alternativePropertyNames = [\n 'name',\n 'iso_code',\n 'iso_code3',\n 'code',\n 'geoname_id',\n ];\n\n let isConditionMatching = (parsed.op === 'or') ? false : true;\n\n parsed.conditions.forEach(c => {\n let subConditionMatching = false;\n let values = [];\n\n const raw_value = record.get_raw(c.p);\n\n if (raw_value === null) {\n subConditionMatching = false;\n } else {\n if (typeof (raw_value) === 'object') {\n alternativePropertyNames.forEach(name => {\n if (raw_value[name]) {\n values.push(raw_value[name]);\n } else if (name == 'name') {\n values.push(record.get_with_locales(c.p, opt.lang));\n }\n })\n } else {\n values = [raw_value]\n }\n }\n\n subConditionMatching = geoip_detect2_shortcode_check_subcondition(c.v, values);\n\n if (c.not) {\n subConditionMatching = !subConditionMatching;\n }\n\n if (parsed.op === 'or') {\n isConditionMatching = isConditionMatching || subConditionMatching;\n } else {\n isConditionMatching = isConditionMatching && subConditionMatching;\n }\n\n });\n\n if (parsed.not) {\n isConditionMatching = !isConditionMatching;\n }\n\n return isConditionMatching;\n}\n\nfunction geoip_detect2_shortcode_check_subcondition(expectedValues, actualValues) {\n if (actualValues[0] === true) {\n actualValues = ['true', 'yes', 'y', '1'];\n } else if (actualValues[0] === false) {\n actualValues = ['false', 'no', 'n', '0', ''];\n }\n\n actualValues = actualValues.map(x => String(x).toLowerCase())\n\n expectedValues = expectedValues.split(',');\n\n const intersect = _.intersection(expectedValues, actualValues);\n\n return intersect.length > 0;\n}","import { domReady } from \"../lib/html\";\nimport { action_on_elements } from \"./helpers\";\nimport { do_shortcode_country_select, do_shortcode_flags, do_shortcode_normal, do_shortcode_text_input } from \"./normal\";\nimport { do_shortcode_show_if } from \"./show-if\";\n\n\nexport const do_shortcodes = async function do_shortcodes() {\n await domReady;\n\n // These are called in parallel, as they are async functions\n action_on_elements('js-geoip-detect-shortcode',\n 'could not execute shortcode(s) [geoip_detect2]', do_shortcode_normal);\n\n action_on_elements('js-geoip-detect-flag',\n 'could not configure the flag(s)', do_shortcode_flags);\n\n action_on_elements('js-geoip-text-input',\n 'could not set the value of the text input field(s)', do_shortcode_text_input);\n\n action_on_elements('js-geoip-detect-country-select',\n 'could not set the value of the select field(s)', do_shortcode_country_select);\n\n action_on_elements('js-geoip-detect-show-if',\n 'could not execute the show-if/hide-if conditions', do_shortcode_show_if);\n\n};","import { domReady } from './lib/html';\nimport { get_info } from './lookup';\n\nexport function calc_classes(record) {\n return {\n country: record.get('country.iso_code'),\n 'country-is-in-european-union': record.get('country.is_in_european_union', false),\n continent: record.get('continent.code'),\n province: record.get('most_specific_subdivision.iso_code'),\n };\n}\n\nexport async function add_body_classes() {\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geodata Error (could not add CSS-classes to body): ' + record.error());\n return;\n }\n\n const css_classes = calc_classes(record);\n\n await domReady;\n\n const body = document.getElementsByTagName('body')[0];\n for (let key of Object.keys(css_classes)) {\n const value = css_classes[key];\n if (value) {\n if (typeof (value) == 'string') {\n body.classList.add(`geoip-${key}-${value}`);\n } else {\n body.classList.add(`geoip-${key}`);\n }\n }\n }\n}","import { get_info, options, remove_override, set_override } from './lookup';\nimport { do_shortcodes } from './shortcodes/index';\nimport { add_body_classes } from './body_classes';\n\n\n\nif (options.do_body_classes) {\n add_body_classes();\n}\nif (options.do_shortcodes) {\n do_shortcodes();\n}\n\n// Extend window object \nwindow.geoip_detect.get_info = get_info;\n\nwindow.geoip_detect.set_override = set_override;\nwindow.geoip_detect.remove_override = remove_override;"]}
|
|
js/dist/frontend.e1ec2aa3.js
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"LNzP":[function(require,module,exports) {
|
2 |
-
function o(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?module.exports=o=function(o){return typeof o}:module.exports=o=function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(t)}module.exports=o;
|
3 |
-
},{}],"fwsn":[function(require,module,exports) {
|
4 |
-
function n(n,t,o,r,e,i,u){try{var c=n[i](u),v=c.value}catch(a){return void o(a)}c.done?t(v):Promise.resolve(v).then(r,e)}function t(t){return function(){var o=this,r=arguments;return new Promise(function(e,i){var u=t.apply(o,r);function c(t){n(u,e,i,c,v,"next",t)}function v(t){n(u,e,i,c,v,"throw",t)}c(void 0)})}}module.exports=t;
|
5 |
-
},{}],"KA2S":[function(require,module,exports) {
|
6 |
-
var define;
|
7 |
-
var t,r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(P){u=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new G(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return F()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?y:s,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}t.wrap=h;var l="suspendedStart",s="suspendedYield",p="executing",y="completed",v={};function d(){}function g(){}function m(){}var w={};w[i]=function(){return this};var L=Object.getPrototypeOf,x=L&&L(L(N([])));x&&x!==e&&n.call(x,i)&&(w=x);var b=m.prototype=d.prototype=Object.create(w);function E(t){["next","throw","return"].forEach(function(r){u(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){var e;this._invoke=function(o,i){function a(){return new r(function(e,a){!function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):r.resolve(l).then(function(t){h.value=t,a(h)},function(t){return e("throw",t,a,c)})}c(u.arg)}(o,i,e,a)})}return e=e?e.then(a,a):a()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:F}}function F(){return{value:r,done:!0}}return g.prototype=b.constructor=m,m.constructor=g,g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(_.prototype),_.prototype[a]=function(){return this},t.AsyncIterator=_,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}
|
8 |
-
},{}],"m4eR":[function(require,module,exports) {
|
9 |
-
module.exports=require("regenerator-runtime");
|
10 |
-
},{"regenerator-runtime":"KA2S"}],"ZBnv":[function(require,module,exports) {
|
11 |
-
function n(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}module.exports=n;
|
12 |
-
},{}],"NoOd":[function(require,module,exports) {
|
13 |
-
function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}module.exports=r;
|
14 |
-
},{}],"UozW":[function(require,module,exports) {
|
15 |
-
function r(r,t,i){if(!r)return i;var o,e;if(Array.isArray(t)&&(o=t.slice(0)),"string"==typeof t&&(o=t.split(".")),"symbol"==typeof t&&(o=[t]),!Array.isArray(o))throw new Error("props arg must be an array, a string or a symbol");for(;o.length;){if(e=o.shift(),!r)return i;if(void 0===(r=r[e]))return i}return r}module.exports=r;
|
16 |
-
},{}],"yK6K":[function(require,module,exports) {
|
17 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.camelToUnderscore=void 0;var e=l(require("@babel/runtime/helpers/classCallCheck")),t=l(require("@babel/runtime/helpers/createClass")),r=l(require("@babel/runtime/helpers/typeof")),a=l(require("just-safe-get"));function l(e){return e&&e.__esModule?e:{default:e}}var o=function(e,t){if("object"===(0,r.default)(e)&&null!==e){if("object"===(0,r.default)(e.names)&&"object"===(0,r.default)(t))for(var a=0;a<t.length;a++){var l=t[a];if(e.names[l])return e.names[l]}return e.name?e.name:""}return e},s=function(e){return e=e.split(".").map(function(e){return"string"!=typeof e||"string"!=typeof e[0]?"":e=(e=e[0].toLowerCase()+e.slice(1)).replace(/([A-Z])/g,"_$1").toLowerCase()}).join(".")};exports.camelToUnderscore=s;var n=function(){function l(t,r){(0,e.default)(this,l),this.data={},this.default_locales=[],this.data=t||{is_empty:!0},this.default_locales=["en"],this.default_locales=this._process_locales(r)}return(0,t.default)(l,[{key:"get",value:function(e,t){return this.get_with_locales(e,null,t)}},{key:"get_raw",value:function(e){return e=s(e),(0,a.default)(this.data,e,null)}},{key:"has_property",value:function(e){return null!==this._lookup_with_locales(e,this.default_locales,null)}},{key:"_lookup_with_locales",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t=this._process_locales(t),".name"===e.substr(-5)&&(e=e.substr(0,e.length-5));var a=this.get_raw(e);return null!==(a=o(a,t))&&""!==a||(a=r),a}},{key:"_process_locales",value:function(e){return"string"==typeof e&&(e=[e]),Array.isArray(e)&&0!==e.length||(e=this.default_locales),e}},{key:"get_with_locales",value:function(e,t,a){var l=this._lookup_with_locales(e,t,a);return"object"===(0,r.default)(l)&&console.warn('Geolocation IP Detection: The property "'+e+'" is of type "'+(0,r.default)(l)+'", should be string or similar',l),void 0===l?(console.warn('Geolocation IP Detection: The property "'+e+'" is not defined, please check spelling or maybe you need a different data source',{data:this.data}),""):l}},{key:"get_country_iso",value:function(){var e=this.get("country.iso_code");return e&&(e=e.substr(0,2).toLowerCase()),e}},{key:"is_empty",value:function(){return this.get("is_empty",!1)}},{key:"error",value:function(){return this.get_raw("extra.error")||""}},{key:"serialize",value:function(){return this.data}}]),l}(),u=n;exports.default=u;
|
18 |
-
},{"@babel/runtime/helpers/classCallCheck":"ZBnv","@babel/runtime/helpers/createClass":"NoOd","@babel/runtime/helpers/typeof":"LNzP","just-safe-get":"UozW"}],"VVpI":[function(require,module,exports) {
|
19 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocalStorage=exports.setLocalStorage=void 0;var e=function(e,t,r){var a={value:t,expires_at:(new Date).getTime()+1e3*r/1};localStorage.setItem(e.toString(),JSON.stringify(a))};exports.setLocalStorage=e;var t=function(e){var t=null;try{t=JSON.parse(localStorage.getItem(e.toString()))}catch(r){return null}if(null!==t){if(!(null!==t.expires_at&&t.expires_at<(new Date).getTime()))return t.value;localStorage.removeItem(e.toString())}return null};exports.getLocalStorage=t;
|
20 |
-
},{}],"jf5f":[function(require,module,exports) {
|
21 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeJSONRequest=exports.jsonDecodeIfPossible=exports.makeRequest=void 0;var e=r(require("@babel/runtime/helpers/asyncToGenerator")),t=r(require("@babel/runtime/regenerator"));function r(e){return e&&e.__esModule?e:{default:e}}var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",r=new XMLHttpRequest;return new Promise(function(n,s){r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n(r):s({status:r.status,statusText:r.statusText,request:r}))},r.open(t||"GET",e,!0),r.send()})};exports.makeRequest=n;var s=function(e){try{return JSON.parse(e)}catch(t){return u("Invalid JSON: "+e)}};function u(e){return{is_empty:!0,extra:{error:e}}}exports.jsonDecodeIfPossible=s;var a=function(){var r=(0,e.default)(t.default.mark(function e(r){var a,o,i=arguments;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:"GET",e.prev=1,e.next=4,n(r,a);case 4:if((o=e.sent).responseText&&"0"!==o.responseText){e.next=7;break}return e.abrupt("return",u("Got an empty response from server. Did you enable AJAX in the options?"));case 7:return e.abrupt("return",s(o.responseText));case 10:return e.prev=10,e.t0=e.catch(1),e.abrupt("return",s(e.t0.request.responseText));case 13:case"end":return e.stop()}},e,null,[[1,10]])}));return function(e){return r.apply(this,arguments)}}();exports.makeJSONRequest=a;
|
22 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR"}],"yyFn":[function(require,module,exports) {
|
23 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.set_override=f,exports.remove_override=_,exports.get_info=x,exports.options=void 0;var e,r=c(require("@babel/runtime/helpers/typeof")),o=c(require("@babel/runtime/helpers/asyncToGenerator")),t=c(require("@babel/runtime/regenerator")),n=c(require("./models/record")),a=require("./lib/localStorageAccess"),i=require("./lib/xhr");function c(e){return e&&e.__esModule?e:{default:e}}var u=(null===(e=window.geoip_detect)||void 0===e?void 0:e.options)||{ajaxurl:"/wp-admin/admin-ajax.php",default_locales:["en"],cookie_duration_in_days:7,cookie_name:"geoip-detect-result"};exports.options=u;var s=null;function l(){if(!s){var e=u.ajaxurl+"?action=geoip_detect2_get_info_from_current_ip";(s=(0,i.makeJSONRequest)(e)).then(function(e){var r;null!=e&&null!==(r=e.extra)&&void 0!==r&&r.error&&console.error("Geolocation IP Detection Error: Server returned an error: "+e.extra.error)})}return s}function d(){return p.apply(this,arguments)}function p(){return(p=(0,o.default)(t.default.mark(function e(){var r,o,n,i,c,s,d;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,o=!1,!u.cookie_name){e.next=7;break}if(!(o=(0,a.getLocalStorage)(u.cookie_name))||!o.extra){e.next=7;break}return!0===o.extra.override?console.info("Geolocation IP Detection: Using cached response (override)"):console.info("Geolocation IP Detection: Using cached response"),e.abrupt("return",o);case 7:return e.prev=7,e.next=10,l();case 10:r=e.sent,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(7),console.log("Uncaught ERROR ??"),r=e.t0.responseJSON||e.t0;case 17:if(!u.cookie_name){e.next=25;break}if(o=(0,a.getLocalStorage)(u.cookie_name),!0!==(null===(n=o)||void 0===n?void 0:null===(i=n.extra)||void 0===i?void 0:i.override)){e.next=22;break}return console.info("Geolocation IP Detection: Using cached response (override)"),e.abrupt("return",o);case 22:d=24*u.cookie_duration_in_days*60*60,null!==(c=r)&&void 0!==c&&null!==(s=c.extra)&&void 0!==s&&s.error&&(d=60),(0,a.setLocalStorage)(u.cookie_name,r,d);case 25:return e.abrupt("return",r);case 26:case"end":return e.stop()}},e,null,[[7,13]])}))).apply(this,arguments)}function f(e,r){return e&&"function"==typeof e.serialize&&(e=e.serialize()),(r=r||u.cookie_duration_in_days)<0?(console.warn("Geolocation IP Detection set_override_data() did nothing: A negative duration doesn't make sense. If you want to remove the override, use remove_override() instead."),!1):v(e,r)}function v(e,r){return e||(e={}),e.extra||(e.extra={}),e.extra.override=!0,(0,a.setLocalStorage)(u.cookie_name,e,24*r*60*60),!0}function _(){return(0,a.setLocalStorage)(u.cookie_name,{},-1),!0}function x(){return g.apply(this,arguments)}function g(){return(g=(0,o.default)(t.default.mark(function e(){var o,a;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d();case 2:return o=e.sent,"object"!==(0,r.default)(o)&&(console.error("Geolocation IP Detection Error: Record should be an object, not a "+(0,r.default)(o),o),o={extra:{error:o||"Network error, look at the original server response ..."}}),a=new n.default(o,u.default_locales),e.abrupt("return",a);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
24 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./models/record":"yK6K","./lib/localStorageAccess":"VVpI","./lib/xhr":"jf5f"}],"YIwO":[function(require,module,exports) {
|
25 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.selectItemByValue=t,exports.selectItemByAttribute=n,exports.triggerNativeEvent=o,exports.domReady=void 0;var e=new Promise(function(e){"loading"===document.readyState?document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!=document.readyState&&e()}):e()});function t(e,t){for(var n=0;n<e.options.length;n++)if(e.options[n].value===t){e.selectedIndex=n;break}}function n(e,t,n){for(var o=0;o<e.options.length;o++)if(e.options[o].getAttribute(t)===n){e.selectedIndex=o;break}}function o(e,t){if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)}else e.fireEvent("on"+t)}exports.domReady=e;
|
26 |
-
},{}],"IyEz":[function(require,module,exports) {
|
27 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.get_options=o,exports.action_on_elements=a,exports.get_value_from_record=s;var e=n(require("@babel/runtime/helpers/asyncToGenerator")),r=n(require("@babel/runtime/regenerator")),t=require("../lookup");function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var r=e.getAttribute("data-options");try{return JSON.parse(r)}catch(t){return{}}}function a(e,r,t){return u.apply(this,arguments)}function u(){return(u=(0,e.default)(r.default.mark(function e(n,o,a){var u,s;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((u=document.getElementsByClassName(n)).length){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,t.get_info)();case 5:if(!(s=e.sent).error()){e.next=9;break}return console.error("Geolocation IP Detection Error ("+o+"): "+s.error()),e.abrupt("return");case 9:Array.from(u).forEach(function(e){return a(e,s)});case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)}function s(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=o(e);return t=t||n.property,n.skip_cache&&console.warn("Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME."),r.get_with_locales(t,n.lang,n.default)}
|
28 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lookup":"yyFn"}],"AwHB":[function(require,module,exports) {
|
29 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_normal=o,exports.do_shortcode_flags=r,exports.do_shortcode_country_select=_,exports.do_shortcode_text_input=c;var e=require("../lib/html"),t=require("./helpers");function o(e,o){e.innerText=(0,t.get_value_from_record)(e,o)}function r(e,o){var r=o.get_country_iso()||(0,t.get_options)(e).default;r&&e.classList.add("flag-icon-"+r)}function _(t,o){var r=o.get_country_iso();(0,e.selectItemByAttribute)(t,"data-c",r),(0,e.triggerNativeEvent)(t,"change")}function c(o,r){o.value=(0,t.get_value_from_record)(o,r),(0,e.triggerNativeEvent)(o,"change")}
|
30 |
-
},{"../lib/html":"YIwO","./helpers":"IyEz"}],"T6sq":[function(require,module,exports) {
|
31 |
-
function r(r,e){if(!Array.isArray(r)||!Array.isArray(e))throw new Error("expected both arguments to be arrays");for(var a=[],t=r.length,n=0;n<t;n++){var o=r[n];e.indexOf(o)>-1&&-1==a.indexOf(o)&&a.push(o)}return a}module.exports=r;
|
32 |
-
},{}],"jiwS":[function(require,module,exports) {
|
33 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_show_if=r,exports.geoip_detect2_shortcode_evaluate_conditions=i;var e=n(require("@babel/runtime/helpers/typeof")),t=require("./helpers"),o=n(require("just-intersect"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e,o){var n=(0,t.get_options)(e),r=i(n.parsed,n,o);e.style.display=r?"":"none !important"}function i(t,o,n){var r=["name","iso_code","iso_code3","code","geoname_id"],i="or"!==t.op;return t.conditions.forEach(function(u){var a=!1,c=[],l=n.get_raw(u.p);null===l?a=!1:"object"===(0,e.default)(l)?r.forEach(function(e){l[e]?c.push(l[e]):"name"==e&&c.push(n.get_with_locales(u.p,o.lang))}):c=[l],a=s(u.v,c),u.not&&(a=!a),i="or"===t.op?i||a:i&&a}),t.not&&(i=!i),i}function s(e,t){return!0===t[0]?t=["true","yes","y","1"]:!1===t[0]&&(t=["false","no","n","0",""]),t=t.map(function(e){return String(e).toLowerCase()}),e=e.split(","),(0,o.default)(e,t).length>0}
|
34 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","./helpers":"IyEz","just-intersect":"T6sq"}],"d5ii":[function(require,module,exports) {
|
35 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcodes=void 0;var e=c(require("@babel/runtime/helpers/asyncToGenerator")),t=c(require("@babel/runtime/regenerator")),o=require("../lib/html"),r=require("./helpers"),n=require("./normal"),s=require("./show-if");function c(e){return e&&e.__esModule?e:{default:e}}var i=function(){var c=(0,e.default)(t.default.mark(function e(){return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.domReady;case 2:(0,r.action_on_elements)("js-geoip-detect-shortcode","could not execute shortcode(s) [geoip_detect2 ...]",n.do_shortcode_normal),(0,r.action_on_elements)("js-geoip-detect-flag","could not configure the flag(s)",n.do_shortcode_flags),(0,r.action_on_elements)("js-geoip-text-input","could not set the value of the text input field(s)",n.do_shortcode_text_input),(0,r.action_on_elements)("js-geoip-detect-country-select","could not set the value of the select field(s)",n.do_shortcode_country_select),(0,r.action_on_elements)("js-geoip-detect-show-if","could not execute the show-if/hide-if conditions",s.do_shortcode_show_if);case 7:case"end":return e.stop()}},e)}));return function(){return c.apply(this,arguments)}}();exports.do_shortcodes=i;
|
36 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lib/html":"YIwO","./helpers":"IyEz","./normal":"AwHB","./show-if":"jiwS"}],"EtfF":[function(require,module,exports) {
|
37 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calc_classes=c,exports.add_body_classes=s;var e=o(require("@babel/runtime/helpers/asyncToGenerator")),t=o(require("@babel/runtime/regenerator")),r=require("./lib/html"),n=require("./lookup");function o(e){return e&&e.__esModule?e:{default:e}}function c(e){return{country:e.get("country.iso_code"),"country-is-in-european-union":e.get("country.is_in_european_union",!1),continent:e.get("continent.code"),province:e.get("most_specific_subdivision.iso_code")}}function s(){return a.apply(this,arguments)}function a(){return(a=(0,e.default)(t.default.mark(function e(){var o,s,a,i,u,d,l;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.get_info)();case 2:if(!(o=e.sent).error()){e.next=6;break}return console.error("Geolocation IP Detection Error (could not add CSS-classes to body): "+o.error()),e.abrupt("return");case 6:return s=c(o),e.next=9,r.domReady;case 9:for(a=document.getElementsByTagName("body")[0],i=0,u=Object.keys(s);i<u.length;i++)d=u[i],(l=s[d])&&("string"==typeof l?a.classList.add("geoip-".concat(d,"-").concat(l)):a.classList.add("geoip-".concat(d)));case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
38 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./lib/html":"YIwO","./lookup":"yyFn"}],"ZVsn":[function(require,module,exports) {
|
39 |
-
"use strict";var e=require("./lookup"),o=require("./shortcodes/index"),d=require("./body_classes");e.options.do_body_classes&&(0,d.add_body_classes)(),(0,o.do_shortcodes)(),window.geoip_detect.get_info=e.get_info,window.geoip_detect.set_override=e.set_override,window.geoip_detect.remove_override=e.remove_override;
|
40 |
-
},{"./lookup":"yyFn","./shortcodes/index":"d5ii","./body_classes":"EtfF"}]},{},["ZVsn"], null)
|
41 |
-
//# sourceMappingURL=frontend.e1ec2aa3.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/dist/frontend.e1ec2aa3.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["node_modules/@babel/runtime/helpers/typeof.js","node_modules/@babel/runtime/helpers/asyncToGenerator.js","node_modules/regenerator-runtime/runtime.js","node_modules/@babel/runtime/regenerator/index.js","node_modules/@babel/runtime/helpers/classCallCheck.js","node_modules/@babel/runtime/helpers/createClass.js","node_modules/just-safe-get/index.js","js/models/record.js","js/lib/localStorageAccess.js","js/lib/xhr.js","js/lookup.js","js/lib/html.js","js/shortcodes/helpers.js","js/shortcodes/normal.js","node_modules/just-intersect/index.js","js/shortcodes/show-if.js","js/shortcodes/index.js","js/body_classes.js","js/frontend.js"],"names":["Record","_get_localized","ret","locales","names","i","length","locale","name","camelToUnderscore","key","split","map","x","toLowerCase","slice","replace","join","data","default_locales","is_empty","_process_locales","prop","default_value","get_with_locales","_lookup_with_locales","substr","get_raw","Array","isArray","console","warn","country","get","setLocalStorage","variable","value","ttl_sec","expires_at","Date","getTime","localStorage","setItem","toString","JSON","stringify","getLocalStorage","parse","getItem","e","removeItem","makeRequest","url","method","request","XMLHttpRequest","Promise","resolve","reject","onreadystatechange","readyState","status","statusText","open","send","jsonDecodeIfPossible","str","createErrorObject","errorMsg","extra","error","makeJSONRequest","responseText","options","window","geoip_detect","ajaxurl","cookie_duration_in_days","cookie_name","ajaxPromise","get_info_raw","then","response","get_info_cached","storedResponse","override","info","log","responseJSON","cache_duration","set_override","record","duration_in_days","serialize","set_override_data","remove_override","get_info","domReady","document","addEventListener","attachEvent","selectItemByValue","el","selectedIndex","selectItemByAttribute","attributeName","attributeValue","getAttribute","triggerNativeEvent","createEvent","event","initEvent","dispatchEvent","fireEvent","get_options","raw","action_on_elements","className","errorMessage","callback","elements","getElementsByClassName","from","forEach","get_value_from_record","property","opt","skip_cache","lang","default","do_shortcode_normal","innerText","do_shortcode_flags","get_country_iso","classList","add","do_shortcode_country_select","do_shortcode_text_input","do_shortcode_show_if","evaluated","geoip_detect2_shortcode_evaluate_conditions","parsed","style","display","alternativePropertyNames","isConditionMatching","op","conditions","c","subConditionMatching","values","raw_value","p","push","geoip_detect2_shortcode_check_subcondition","v","not","expectedValues","actualValues","intersect","String","do_shortcodes","calc_classes","continent","province","add_body_classes","css_classes","Object","body","getElementsByTagName","keys","do_body_classes"],"mappings":";AAAA,SAAA,EAAA,GAaA,MAVA,mBAAA,QAAA,iBAAA,OAAA,SACA,OAAA,QAAA,EAAA,SAAA,GACA,cAAA,GAGA,OAAA,QAAA,EAAA,SAAA,GACA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,GAIA,EAAA,GAGA,OAAA,QAAA;;AChBA,SAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,GACA,IACA,IAAA,EAAA,EAAA,GAAA,GACA,EAAA,EAAA,MACA,MAAA,GAEA,YADA,EAAA,GAIA,EAAA,KACA,EAAA,GAEA,QAAA,QAAA,GAAA,KAAA,EAAA,GAIA,SAAA,EAAA,GACA,OAAA,WACA,IAAA,EAAA,KACA,EAAA,UACA,OAAA,IAAA,QAAA,SAAA,EAAA,GACA,IAAA,EAAA,EAAA,MAAA,EAAA,GAEA,SAAA,EAAA,GACA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA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F,EAAAA,EAAAA,EAAAA,OAAOG,KAAKJ,GAAc,EAAA,EAAA,OAAA,IAAjC5J,EAAiC,EAAA,IAChC0B,EAAQkI,EAAY5J,MAEA,iBAAV0B,EACRoI,EAAKlC,UAAUC,IAAa7H,SAAAA,OAAAA,EAAO0B,KAAAA,OAAAA,IAEnCoI,EAAKlC,UAAUC,IAAa7H,SAAAA,OAAAA,KAnBrC,KAAA,GAAA,IAAA,MAAA,OAAA,EAAA,SAAA,OAAA,MAAA,KAAA;;ACKP,aAjBA,IAAA,EAAA,QAAA,YACA,EAAA,QAAA,sBACA,EAAA,QAAA,kBAII+D,EAAQkG,QAAAA,kBACR,EAAA,EAAA,qBAIJ,EAEA,EAAA,iBACAjG,OAAOC,aAAaqB,SAAWA,EAA/B,SAEAtB,OAAOC,aAAae,aAAeA,EAAnC,aACAhB,OAAOC,aAAaoB,gBAAkBA,EAAtC","file":"frontend.e1ec2aa3.js","sourceRoot":"../..","sourcesContent":["function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = require(\"regenerator-runtime\");\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","module.exports = get;\n\n/*\n const obj = {a: {aa: {aaa: 2}}, b: 4};\n\n get(obj, 'a.aa.aaa'); // 2\n get(obj, ['a', 'aa', 'aaa']); // 2\n\n get(obj, 'b.bb.bbb'); // undefined\n get(obj, ['b', 'bb', 'bbb']); // undefined\n\n get(obj.a, 'aa.aaa'); // 2\n get(obj.a, ['aa', 'aaa']); // 2\n\n get(obj.b, 'bb.bbb'); // undefined\n get(obj.b, ['bb', 'bbb']); // undefined\n\n get(obj.b, 'bb.bbb', 42); // 42\n get(obj.b, ['bb', 'bbb'], 42); // 42\n\n get(null, 'a'); // undefined\n get(undefined, ['a']); // undefined\n\n get(null, 'a', 42); // 42\n get(undefined, ['a'], 42); // 42\n\n const obj = {a: {}};\n const sym = Symbol();\n obj.a[sym] = 4;\n get(obj.a, sym); // 4\n*/\n\nfunction get(obj, propsArg, defaultValue) {\n if (!obj) {\n return defaultValue;\n }\n var props, prop;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n while (props.length) {\n prop = props.shift();\n if (!obj) {\n return defaultValue;\n }\n obj = obj[prop];\n if (obj === undefined) {\n return defaultValue;\n }\n }\n return obj;\n}\n","import _get from 'just-safe-get';\n\n\nconst _get_localized = function(ret, locales) {\n if (typeof(ret) === 'object' && ret !== null) {\n if (typeof (ret.names) === 'object' && typeof (locales) === 'object') {\n for (let i = 0 ; i < locales.length ; i++) {\n let locale = locales[i];\n\n if (ret.names[locale]) {\n return ret.names[locale];\n }\n }\n }\n\n if (ret.name) {\n return ret.name;\n }\n\n return '';\n }\n return ret;\n}\n\nexport const camelToUnderscore = function(key) {\n key = key.split('.').map((x) => {\n if (typeof (x) !== 'string' || typeof (x[0]) !== 'string') {\n return '';\n }\n x = x[0].toLowerCase() + x.slice(1); // to allow \"MostSpecificSubdivision\"\n x = x.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n return x;\n }).join('.');\n\n return key;\n}\n\nclass Record {\n data = {};\n default_locales = [];\n\n constructor(data, default_locales) {\n this.data = data || { is_empty: true };\n \n this.default_locales = ['en']; \n this.default_locales = this._process_locales(default_locales);\n }\n\n get(prop, default_value) {\n return this.get_with_locales(prop, null, default_value);\n }\n\n get_raw(prop) {\n prop = camelToUnderscore(prop);\n return _get(this.data, prop, null);\n }\n \n has_property(prop) {\n const ret = this._lookup_with_locales(prop, this.default_locales, null)\n return ret !== null;\n }\n\n _lookup_with_locales(prop, locales, default_value = '') {\n locales = this._process_locales(locales);\n\n // Treat pseudo-property 'name' as if it never existed\n if (prop.substr(-5) === '.name') {\n prop = prop.substr(0, prop.length - 5);\n }\n\n let ret = this.get_raw(prop);\n \n // Localize property, if possible\n ret = _get_localized(ret, locales);\n \n if (ret === null || ret === '') {\n ret = default_value;\n }\n\n return ret;\n }\n \n _process_locales(locales) {\n if (typeof(locales) === 'string') {\n locales = [ locales ];\n }\n if (!Array.isArray(locales) || locales.length === 0) {\n locales = this.default_locales;\n }\n return locales;\n }\n\n get_with_locales(prop, locales, default_value) {\n const ret = this._lookup_with_locales(prop, locales, default_value);\n\n if (typeof(ret) === 'object') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is of type \"' + typeof (ret) + '\", should be string or similar', ret)\n }\n if (typeof(ret) === 'undefined') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is not defined, please check spelling or maybe you need a different data source', { data: this.data })\n return '';\n }\n\n return ret;\n }\n\n get_country_iso() {\n let country = this.get('country.iso_code');\n if(country) {\n country = country.substr(0, 2).toLowerCase();\n }\n return country;\n }\n\n /**\n * Check if there is information available for this IP\n * @returns boolean \n */\n is_empty() {\n return this.get('is_empty', false);\n }\n \n /**\n * Get error message, if any\n * @return string Error Message\n */\n error() {\n return this.get_raw('extra.error') || '';\n }\n\n /**\n * Get the raw data of this object\n * @returns object\n */\n serialize() {\n return this.data;\n }\n}\n\nexport default Record;","export const setLocalStorage = function (variable, value, ttl_sec) {\n var data = {value: value, expires_at: new Date().getTime() + (ttl_sec * 1000) / 1 };\n localStorage.setItem(variable.toString(), JSON.stringify(data));\n};\n\nexport const getLocalStorage = function (variable) {\n let data = null;\n try {\n data = JSON.parse(localStorage.getItem(variable.toString()));\n } catch(e) {\n return null;\n }\n if (data !== null) {\n if (data.expires_at !== null && data.expires_at < new Date().getTime()) {\n localStorage.removeItem(variable.toString());\n } else {\n return data.value;\n }\n }\n return null;\n}\n","// @see https://gomakethings.com/promise-based-xhr/\n\nexport const makeRequest = function (url, method = 'GET') {\n\n // Create the XHR request\n var request = new XMLHttpRequest();\n\n // Return it as a Promise\n return new Promise(function (resolve, reject) {\n\n // Setup our listener to process compeleted requests\n request.onreadystatechange = function () {\n\n // Only run if the request is complete\n if (request.readyState !== 4) return;\n\n // Process the response\n if (request.status >= 200 && request.status < 300) {\n // If successful\n resolve(request);\n } else {\n // If failed\n reject({\n status: request.status,\n statusText: request.statusText,\n request: request\n });\n }\n\n };\n\n // Setup our HTTP request\n request.open(method || 'GET', url, true);\n\n // Send the request\n request.send();\n\n });\n};\n\nexport const jsonDecodeIfPossible = function(str) {\n try {\n return JSON.parse(str);\n } catch(e) {\n return createErrorObject('Invalid JSON: ' + str);\n }\n}\n\nfunction createErrorObject(errorMsg) {\n return {\n is_empty: true,\n extra: {\n error: errorMsg\n }\n };\n}\n\nexport const makeJSONRequest = async function(url, method = 'GET') {\n try {\n const request = await makeRequest(url, method);\n if (!request.responseText || request.responseText === '0') {\n return createErrorObject('Got an empty response from server. Did you enable AJAX in the options?');\n }\n return jsonDecodeIfPossible(request.responseText);\n } catch(e) {\n return jsonDecodeIfPossible(e.request.responseText);\n }\n}\n","import Record from './models/record';\nimport { getLocalStorage, setLocalStorage } from './lib/localStorageAccess';\nimport { makeJSONRequest } from './lib/xhr';\n\n\nexport const options = window.geoip_detect?.options || {\n ajaxurl: \"/wp-admin/admin-ajax.php\",\n default_locales: ['en'],\n cookie_duration_in_days: 7,\n cookie_name: 'geoip-detect-result'\n};\n\nlet ajaxPromise = null;\n\nfunction get_info_raw() {\n if (!ajaxPromise) {\n // Do Ajax Request only once per page load\n const url = options.ajaxurl + '?action=geoip_detect2_get_info_from_current_ip'\n\n ajaxPromise = makeJSONRequest(url);\n \n ajaxPromise.then((response) => {\n if (response?.extra?.error) {\n console.error('Geolocation IP Detection Error: Server returned an error: ' + response.extra.error);\n }\n })\n }\n\n return ajaxPromise;\n}\n\nasync function get_info_cached() {\n let response = false;\n let storedResponse = false;\n\n // 1) Load Info from localstorage cookie cache, if possible\n if (options.cookie_name) {\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse && storedResponse.extra) {\n if (storedResponse.extra.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n } else {\n console.info('Geolocation IP Detection: Using cached response');\n }\n return storedResponse;\n }\n }\n\n // 2) Get response\n try {\n response = await get_info_raw();\n } catch (err) {\n console.log('Uncaught ERROR ??');\n response = err.responseJSON || err;\n }\n\n // 3) Save info to localstorage cookie cache\n if (options.cookie_name) {\n\n // Check if Override has been set now\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse?.extra?.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n return storedResponse;\n }\n\n let cache_duration = options.cookie_duration_in_days * 24 * 60 * 60;\n if (response?.extra?.error)\n cache_duration = 60; // Cache errors only for 1 minute, then try again\n \n setLocalStorage(options.cookie_name, response, cache_duration);\n }\n\n return response;\n}\n\n\n/**\n * This functions allows to override the geodetected data manually (e.g. a country selector)\n * \n * @api\n * @param {*} record \n * @param {number} duration_in_days When this override expires (default: 1 week later)\n * @return boolean\n */\nexport function set_override(record, duration_in_days) {\n if (record && typeof(record.serialize) === 'function') {\n record = record.serialize();\n }\n\n duration_in_days = duration_in_days || options.cookie_duration_in_days;\n if (duration_in_days < 0) {\n console.warn('Geolocation IP Detection set_override_data() did nothing: A negative duration doesn\\'t make sense. If you want to remove the override, use remove_override() instead.');\n return false;\n }\n\n return set_override_data(record, duration_in_days);\n}\nfunction set_override_data(data, duration_in_days) {\n if (!data) {\n data = {};\n }\n if (!data.extra) {\n data.extra = {};\n }\n data.extra.override = true;\n\n setLocalStorage(options.cookie_name, data, duration_in_days * 24 * 60 * 60);\n return true;\n}\n\n/**\n * Remove the override data.\n * On next page load, the record data will be loaded from the server again.\n * \n * @return boolean\n */\nexport function remove_override() {\n setLocalStorage(options.cookie_name, {}, -1);\n return true;\n}\n\n\n/**\n * Load the data from the server\n * \n * (It can also be loaded from the browser localstorage, if the record data is present there already.)\n * \n * @api\n * @return Promise(Record)\n */\nexport async function get_info() {\n let response = await get_info_cached();\n\n if (typeof (response) !== 'object') {\n console.error('Geolocation IP Detection Error: Record should be an object, not a ' + typeof (response), response);\n response = { 'extra': { 'error': response || 'Network error, look at the original server response ...' } };\n }\n\n const record = new Record(response, options.default_locales);\n return record;\n}","export const domReady = new Promise(resolve => {\n if (document.readyState === \"loading\") {\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', resolve);\n } else {\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState != 'loading')\n resolve();\n });\n }\n }\n else {\n resolve();\n }\n});\n\nexport function selectItemByValue(el, value) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].value === value) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\nexport function selectItemByAttribute(el, attributeName, attributeValue) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].getAttribute(attributeName) === attributeValue) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\n\nexport function triggerNativeEvent(el, name) {\n if (document.createEvent) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent(name, true, false);\n el.dispatchEvent(event);\n } else {\n el.fireEvent('on' + name);\n }\n}","import { get_info } from \"../lookup\";\n\n// Get Options from data-options and json parse them\nexport function get_options(el) {\n const raw = el.getAttribute('data-options');\n try {\n return JSON.parse(raw);\n } catch (e) {\n return {};\n }\n}\n\nexport async function action_on_elements(className, errorMessage, callback) {\n const elements = document.getElementsByClassName(className);\n if (!elements.length) return;\n\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (' + errorMessage + '): ' + record.error());\n return;\n }\n\n Array.from(elements)\n .forEach(el => callback(el, record));\n}\n\nexport function get_value_from_record(el, record, property = null) {\n const opt = get_options(el);\n property = property || opt.property;\n if (opt.skip_cache) {\n console.warn(\"Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME.\");\n }\n\n return record.get_with_locales(property, opt.lang, opt.default);\n}","import { selectItemByAttribute, triggerNativeEvent } from \"../lib/html\";\nimport { get_value_from_record, get_options } from \"./helpers\";\n\nexport function do_shortcode_normal(el, record) {\n el.innerText = get_value_from_record(el, record);\n}\n\nexport function do_shortcode_flags(el, record) {\n const country = record.get_country_iso() || get_options(el).default;\n if (country) {\n el.classList.add('flag-icon-' + country)\n }\n}\n\nexport function do_shortcode_country_select(el, record) {\n let country = record.get_country_iso();\n\n selectItemByAttribute(el, 'data-c', country);\n triggerNativeEvent(el, 'change');\n}\n\nexport function do_shortcode_text_input(el, record) {\n el.value = get_value_from_record(el, record);\n triggerNativeEvent(el, 'change');\n}","module.exports = intersect;\n\n/*\n intersect([1, 2, 5, 6], [2, 3, 5, 6]); // [2, 5, 6]\n intersect([1, 2, 2, 4, 5], [3, 2, 2, 5, 7]); // [2, 5]\n*/\n\nfunction intersect(arr1, arr2) {\n if (!Array.isArray(arr1) || !Array.isArray(arr2)) {\n throw new Error('expected both arguments to be arrays');\n }\n var result = [];\n var len = arr1.length;\n for (var i = 0; i < len; i++) {\n var elem = arr1[i];\n if (arr2.indexOf(elem) > -1 && result.indexOf(elem) == -1) {\n result.push(elem);\n }\n }\n return result;\n}\n","import { get_options } from './helpers';\nimport _intersect from 'just-intersect';\n\n\nexport function do_shortcode_show_if(el, record) {\n const opt = get_options(el);\n const evaluated = geoip_detect2_shortcode_evaluate_conditions(opt.parsed, opt, record);\n\n if (!evaluated) {\n el.style.display = \"none !important\";\n } else {\n el.style.display = '';\n }\n}\n\nexport function geoip_detect2_shortcode_evaluate_conditions(parsed, opt, record) {\n const alternativePropertyNames = [\n 'name',\n 'iso_code',\n 'iso_code3',\n 'code',\n 'geoname_id',\n ];\n\n let isConditionMatching = (parsed.op === 'or') ? false : true;\n\n parsed.conditions.forEach(c => {\n let subConditionMatching = false;\n let values = [];\n\n const raw_value = record.get_raw(c.p);\n\n if (raw_value === null) {\n subConditionMatching = false;\n } else {\n if (typeof (raw_value) === 'object') {\n alternativePropertyNames.forEach(name => {\n if (raw_value[name]) {\n values.push(raw_value[name]);\n } else if (name == 'name') {\n values.push(record.get_with_locales(c.p, opt.lang));\n }\n })\n } else {\n values = [raw_value]\n }\n }\n\n subConditionMatching = geoip_detect2_shortcode_check_subcondition(c.v, values);\n\n if (c.not) {\n subConditionMatching = !subConditionMatching;\n }\n\n if (parsed.op === 'or') {\n isConditionMatching = isConditionMatching || subConditionMatching;\n } else {\n isConditionMatching = isConditionMatching && subConditionMatching;\n }\n\n });\n\n if (parsed.not) {\n isConditionMatching = !isConditionMatching;\n }\n\n return isConditionMatching;\n}\n\nfunction geoip_detect2_shortcode_check_subcondition(expectedValues, actualValues) {\n if (actualValues[0] === true) {\n actualValues = ['true', 'yes', 'y', '1'];\n } else if (actualValues[0] === false) {\n actualValues = ['false', 'no', 'n', '0', ''];\n }\n\n actualValues = actualValues.map(x => String(x).toLowerCase())\n\n expectedValues = expectedValues.split(',');\n\n const intersect = _intersect(expectedValues, actualValues);\n\n return intersect.length > 0;\n}","import { domReady } from \"../lib/html\";\nimport { action_on_elements } from \"./helpers\";\nimport { do_shortcode_country_select, do_shortcode_flags, do_shortcode_normal, do_shortcode_text_input } from \"./normal\";\nimport { do_shortcode_show_if } from \"./show-if\";\n\n\nexport const do_shortcodes = async function do_shortcodes() {\n await domReady;\n\n // These are called in parallel, as they are async functions\n action_on_elements('js-geoip-detect-shortcode',\n 'could not execute shortcode(s) [geoip_detect2 ...]', do_shortcode_normal);\n\n action_on_elements('js-geoip-detect-flag',\n 'could not configure the flag(s)', do_shortcode_flags);\n\n action_on_elements('js-geoip-text-input',\n 'could not set the value of the text input field(s)', do_shortcode_text_input);\n\n action_on_elements('js-geoip-detect-country-select',\n 'could not set the value of the select field(s)', do_shortcode_country_select);\n\n action_on_elements('js-geoip-detect-show-if',\n 'could not execute the show-if/hide-if conditions', do_shortcode_show_if);\n\n};","import { domReady } from './lib/html';\nimport { get_info } from './lookup';\n\nexport function calc_classes(record) {\n return {\n country: record.get('country.iso_code'),\n 'country-is-in-european-union': record.get('country.is_in_european_union', false),\n continent: record.get('continent.code'),\n province: record.get('most_specific_subdivision.iso_code'),\n };\n}\n\nexport async function add_body_classes() {\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (could not add CSS-classes to body): ' + record.error());\n return;\n }\n\n const css_classes = calc_classes(record);\n\n await domReady;\n\n const body = document.getElementsByTagName('body')[0];\n for (let key of Object.keys(css_classes)) {\n const value = css_classes[key];\n if (value) {\n if (typeof (value) == 'string') {\n body.classList.add(`geoip-${key}-${value}`);\n } else {\n body.classList.add(`geoip-${key}`);\n }\n }\n }\n}","import { get_info, options, remove_override, set_override } from './lookup';\nimport { do_shortcodes } from './shortcodes/index';\nimport { add_body_classes } from './body_classes';\n\n\n\nif (options.do_body_classes) {\n add_body_classes();\n}\n\n// Do all the shortcodes that are in the HTML. Even if shortcodes is not enabled globally, they might be enabled for a specific shortcode.\ndo_shortcodes();\n\n// Extend window object \nwindow.geoip_detect.get_info = get_info;\n\nwindow.geoip_detect.set_override = set_override;\nwindow.geoip_detect.remove_override = remove_override;"]}
|
|
js/dist/frontend.e2558764.js
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"LNzP":[function(require,module,exports) {
|
2 |
-
function o(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?module.exports=o=function(o){return typeof o}:module.exports=o=function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},o(t)}module.exports=o;
|
3 |
-
},{}],"fwsn":[function(require,module,exports) {
|
4 |
-
function n(n,t,o,r,e,i,u){try{var c=n[i](u),v=c.value}catch(a){return void o(a)}c.done?t(v):Promise.resolve(v).then(r,e)}function t(t){return function(){var o=this,r=arguments;return new Promise(function(e,i){var u=t.apply(o,r);function c(t){n(u,e,i,c,v,"next",t)}function v(t){n(u,e,i,c,v,"throw",t)}c(void 0)})}}module.exports=t;
|
5 |
-
},{}],"KA2S":[function(require,module,exports) {
|
6 |
-
var define;
|
7 |
-
var t,r=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(P){u=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof d?r:d,i=Object.create(o.prototype),a=new G(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return F()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===v)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var u=f(t,r,e);if("normal"===u.type){if(n=e.done?y:s,u.arg===v)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=y,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(P){return{type:"throw",arg:P}}}t.wrap=h;var l="suspendedStart",s="suspendedYield",p="executing",y="completed",v={};function d(){}function g(){}function m(){}var w={};w[i]=function(){return this};var L=Object.getPrototypeOf,x=L&&L(L(N([])));x&&x!==e&&n.call(x,i)&&(w=x);var b=m.prototype=d.prototype=Object.create(w);function E(t){["next","throw","return"].forEach(function(r){u(t,r,function(t){return this._invoke(r,t)})})}function _(t,r){var e;this._invoke=function(o,i){function a(){return new r(function(e,a){!function e(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?r.resolve(l.__await).then(function(t){e("next",t,a,c)},function(t){e("throw",t,a,c)}):r.resolve(l).then(function(t){h.value=t,a(h)},function(t){return e("throw",t,a,c)})}c(u.arg)}(o,i,e,a)})}return e=e?e.then(a,a):a()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:F}}function F(){return{value:r,done:!0}}return g.prototype=b.constructor=m,m.constructor=g,g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},E(_.prototype),_.prototype[a]=function(){return this},t.AsyncIterator=_,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new _(h(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(b),u(b,c,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),v},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}
|
8 |
-
},{}],"m4eR":[function(require,module,exports) {
|
9 |
-
module.exports=require("regenerator-runtime");
|
10 |
-
},{"regenerator-runtime":"KA2S"}],"ZBnv":[function(require,module,exports) {
|
11 |
-
function n(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}module.exports=n;
|
12 |
-
},{}],"NoOd":[function(require,module,exports) {
|
13 |
-
function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}module.exports=r;
|
14 |
-
},{}],"UozW":[function(require,module,exports) {
|
15 |
-
function r(r,t,i){if(!r)return i;var o,e;if(Array.isArray(t)&&(o=t.slice(0)),"string"==typeof t&&(o=t.split(".")),"symbol"==typeof t&&(o=[t]),!Array.isArray(o))throw new Error("props arg must be an array, a string or a symbol");for(;o.length;){if(e=o.shift(),!r)return i;if(void 0===(r=r[e]))return i}return r}module.exports=r;
|
16 |
-
},{}],"yK6K":[function(require,module,exports) {
|
17 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.camelToUnderscore=void 0;var e=l(require("@babel/runtime/helpers/classCallCheck")),t=l(require("@babel/runtime/helpers/createClass")),r=l(require("@babel/runtime/helpers/typeof")),a=l(require("just-safe-get"));function l(e){return e&&e.__esModule?e:{default:e}}var o=function(e,t){if("object"===(0,r.default)(e)&&null!==e){if("object"===(0,r.default)(e.names)&&"object"===(0,r.default)(t))for(var a=0;a<t.length;a++){var l=t[a];if(e.names[l])return e.names[l]}return e.name?e.name:""}return e},s=function(e){return e=e.split(".").map(function(e){return"string"!=typeof e||"string"!=typeof e[0]?"":e=(e=e[0].toLowerCase()+e.slice(1)).replace(/([A-Z])/g,"_$1").toLowerCase()}).join(".")};exports.camelToUnderscore=s;var n=function(){function l(t,r){(0,e.default)(this,l),this.data={},this.default_locales=[],this.data=t||{is_empty:!0},this.default_locales=["en"],this.default_locales=this._process_locales(r)}return(0,t.default)(l,[{key:"get",value:function(e,t){return this.get_with_locales(e,null,t)}},{key:"get_raw",value:function(e){return e=s(e),(0,a.default)(this.data,e,null)}},{key:"has_property",value:function(e){return null!==this._lookup_with_locales(e,this.default_locales,null)}},{key:"_lookup_with_locales",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t=this._process_locales(t),".name"===e.substr(-5)&&(e=e.substr(0,e.length-5));var a=this.get_raw(e);return null!==(a=o(a,t))&&""!==a||(a=r),a}},{key:"_process_locales",value:function(e){return"string"==typeof e&&(e=[e]),Array.isArray(e)&&0!==e.length||(e=this.default_locales),e}},{key:"get_with_locales",value:function(e,t,a){var l=this._lookup_with_locales(e,t,a);return"object"===(0,r.default)(l)&&console.warn('Geolocation IP Detection: The property "'+e+'" is of type "'+(0,r.default)(l)+'", should be string or similar',l),void 0===l?(console.warn('Geolocation IP Detection: The property "'+e+'" is not defined, please check spelling or maybe you need a different data source',{data:this.data}),""):l}},{key:"get_country_iso",value:function(){var e=this.get("country.iso_code");return e&&(e=e.substr(0,2).toLowerCase()),e}},{key:"is_empty",value:function(){return this.get("is_empty",!1)}},{key:"error",value:function(){return this.get_raw("extra.error")||""}},{key:"serialize",value:function(){return this.data}}]),l}(),u=n;exports.default=u;
|
18 |
-
},{"@babel/runtime/helpers/classCallCheck":"ZBnv","@babel/runtime/helpers/createClass":"NoOd","@babel/runtime/helpers/typeof":"LNzP","just-safe-get":"UozW"}],"VVpI":[function(require,module,exports) {
|
19 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocalStorage=exports.setLocalStorage=void 0;var e=function(e,t,r){var a={value:t,expires_at:(new Date).getTime()+1e3*r/1};localStorage.setItem(e.toString(),JSON.stringify(a))};exports.setLocalStorage=e;var t=function(e){var t=null;try{t=JSON.parse(localStorage.getItem(e.toString()))}catch(r){return null}if(null!==t){if(!(null!==t.expires_at&&t.expires_at<(new Date).getTime()))return t.value;localStorage.removeItem(e.toString())}return null};exports.getLocalStorage=t;
|
20 |
-
},{}],"jf5f":[function(require,module,exports) {
|
21 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeJSONRequest=exports.jsonDecodeIfPossible=exports.makeRequest=void 0;var e=r(require("@babel/runtime/helpers/asyncToGenerator")),t=r(require("@babel/runtime/regenerator"));function r(e){return e&&e.__esModule?e:{default:e}}var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",r=new XMLHttpRequest;return new Promise(function(n,s){r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n(r):s({status:r.status,statusText:r.statusText,request:r}))},r.open(t||"GET",e,!0),r.send()})};exports.makeRequest=n;var s=function(e){try{return JSON.parse(e)}catch(t){return u("Invalid JSON: "+e)}};function u(e){return{is_empty:!0,extra:{error:e}}}exports.jsonDecodeIfPossible=s;var a=function(){var r=(0,e.default)(t.default.mark(function e(r){var a,o,i=arguments;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.length>1&&void 0!==i[1]?i[1]:"GET",e.prev=1,e.next=4,n(r,a);case 4:if((o=e.sent).responseText&&"0"!==o.responseText){e.next=7;break}return e.abrupt("return",u("Got an empty response from server. Did you enable AJAX in the options?"));case 7:return e.abrupt("return",s(o.responseText));case 10:return e.prev=10,e.t0=e.catch(1),e.abrupt("return",s(e.t0.request.responseText));case 13:case"end":return e.stop()}},e,null,[[1,10]])}));return function(e){return r.apply(this,arguments)}}();exports.makeJSONRequest=a;
|
22 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR"}],"yyFn":[function(require,module,exports) {
|
23 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.set_override=f,exports.remove_override=_,exports.get_info=x,exports.options=void 0;var e,r=c(require("@babel/runtime/helpers/typeof")),o=c(require("@babel/runtime/helpers/asyncToGenerator")),t=c(require("@babel/runtime/regenerator")),n=c(require("./models/record")),a=require("./lib/localStorageAccess"),i=require("./lib/xhr");function c(e){return e&&e.__esModule?e:{default:e}}var u=(null===(e=window.geoip_detect)||void 0===e?void 0:e.options)||{ajaxurl:"/wp-admin/admin-ajax.php",default_locales:["en"],cookie_duration_in_days:7,cookie_name:"geoip-detect-result"};exports.options=u;var s=null;function l(){if(!s){var e=u.ajaxurl+"?action=geoip_detect2_get_info_from_current_ip";(s=(0,i.makeJSONRequest)(e)).then(function(e){var r;null!=e&&null!==(r=e.extra)&&void 0!==r&&r.error&&console.error("Geolocation IP Detection Error: Server returned an error: "+e.extra.error)})}return s}function d(){return p.apply(this,arguments)}function p(){return(p=(0,o.default)(t.default.mark(function e(){var r,o,n,i,c,s,d;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,o=!1,!u.cookie_name){e.next=7;break}if(!(o=(0,a.getLocalStorage)(u.cookie_name))||!o.extra){e.next=7;break}return!0===o.extra.override?console.info("Geolocation IP Detection: Using cached response (override)"):console.info("Geolocation IP Detection: Using cached response"),e.abrupt("return",o);case 7:return e.prev=7,e.next=10,l();case 10:r=e.sent,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(7),console.log("Uncaught ERROR ??"),r=e.t0.responseJSON||e.t0;case 17:if(!u.cookie_name){e.next=25;break}if(o=(0,a.getLocalStorage)(u.cookie_name),!0!==(null===(n=o)||void 0===n?void 0:null===(i=n.extra)||void 0===i?void 0:i.override)){e.next=22;break}return console.info("Geolocation IP Detection: Using cached response (override)"),e.abrupt("return",o);case 22:d=24*u.cookie_duration_in_days*60*60,null!==(c=r)&&void 0!==c&&null!==(s=c.extra)&&void 0!==s&&s.error&&(d=60),(0,a.setLocalStorage)(u.cookie_name,r,d);case 25:return e.abrupt("return",r);case 26:case"end":return e.stop()}},e,null,[[7,13]])}))).apply(this,arguments)}function f(e,r){return e&&"function"==typeof e.serialize&&(e=e.serialize()),(r=r||u.cookie_duration_in_days)<0?(console.warn("Geolocation IP Detection set_override_data() did nothing: A negative duration doesn't make sense. If you want to remove the override, use remove_override() instead."),!1):v(e,r)}function v(e,r){return e||(e={}),e.extra||(e.extra={}),e.extra.override=!0,(0,a.setLocalStorage)(u.cookie_name,e,24*r*60*60),!0}function _(){return(0,a.setLocalStorage)(u.cookie_name,{},-1),!0}function x(){return g.apply(this,arguments)}function g(){return(g=(0,o.default)(t.default.mark(function e(){var o,a;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d();case 2:return o=e.sent,"object"!==(0,r.default)(o)&&(console.error("Geolocation IP Detection Error: Record should be an object, not a "+(0,r.default)(o),o),o={extra:{error:o||"Network error, look at the original server response ..."}}),a=new n.default(o,u.default_locales),e.abrupt("return",a);case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
24 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./models/record":"yK6K","./lib/localStorageAccess":"VVpI","./lib/xhr":"jf5f"}],"YIwO":[function(require,module,exports) {
|
25 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.selectItemByValue=t,exports.selectItemByAttribute=n,exports.triggerNativeEvent=o,exports.domReady=void 0;var e=new Promise(function(e){"loading"===document.readyState?document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!=document.readyState&&e()}):e()});function t(e,t){for(var n=0;n<e.options.length;n++)if(e.options[n].value===t){e.selectedIndex=n;break}}function n(e,t,n){for(var o=0;o<e.options.length;o++)if(e.options[o].getAttribute(t)===n){e.selectedIndex=o;break}}function o(e,t){if(document.createEvent){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!1),e.dispatchEvent(n)}else e.fireEvent("on"+t)}exports.domReady=e;
|
26 |
-
},{}],"IyEz":[function(require,module,exports) {
|
27 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.get_options=o,exports.action_on_elements=a,exports.get_value_from_record=s;var e=n(require("@babel/runtime/helpers/asyncToGenerator")),r=n(require("@babel/runtime/regenerator")),t=require("../lookup");function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var r=e.getAttribute("data-options");try{return JSON.parse(r)}catch(t){return{}}}function a(e,r,t){return u.apply(this,arguments)}function u(){return(u=(0,e.default)(r.default.mark(function e(n,o,a){var u,s;return r.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((u=document.getElementsByClassName(n)).length){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,t.get_info)();case 5:if(!(s=e.sent).error()){e.next=9;break}return console.error("Geolocation IP Detection Error ("+o+"): "+s.error()),e.abrupt("return");case 9:Array.from(u).forEach(function(e){return a(e,s)});case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)}function s(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=o(e);return t=t||n.property,n.skip_cache&&console.warn("Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME."),r.get_with_locales(t,n.lang,n.default)}
|
28 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lookup":"yyFn"}],"AwHB":[function(require,module,exports) {
|
29 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_normal=o,exports.do_shortcode_flags=r,exports.do_shortcode_country_select=_,exports.do_shortcode_text_input=c;var e=require("../lib/html"),t=require("./helpers");function o(e,o){e.innerText=(0,t.get_value_from_record)(e,o)}function r(e,o){var r=o.get_country_iso()||(0,t.get_options)(e).default;r&&e.classList.add("flag-icon-"+r)}function _(t,o){var r=o.get_country_iso();(0,e.selectItemByAttribute)(t,"data-c",r),(0,e.triggerNativeEvent)(t,"change")}function c(o,r){o.value=(0,t.get_value_from_record)(o,r),(0,e.triggerNativeEvent)(o,"change")}
|
30 |
-
},{"../lib/html":"YIwO","./helpers":"IyEz"}],"T6sq":[function(require,module,exports) {
|
31 |
-
function r(r,e){if(!Array.isArray(r)||!Array.isArray(e))throw new Error("expected both arguments to be arrays");for(var a=[],t=r.length,n=0;n<t;n++){var o=r[n];e.indexOf(o)>-1&&-1==a.indexOf(o)&&a.push(o)}return a}module.exports=r;
|
32 |
-
},{}],"jiwS":[function(require,module,exports) {
|
33 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcode_show_if=r,exports.geoip_detect2_shortcode_evaluate_conditions=i;var e=n(require("@babel/runtime/helpers/typeof")),t=require("./helpers"),o=n(require("just-intersect"));function n(e){return e&&e.__esModule?e:{default:e}}function r(e,o){var n=(0,t.get_options)(e),r=i(n.parsed,n,o);e.style.display=r?"":"none !important"}function i(t,o,n){var r=["name","iso_code","iso_code3","code","geoname_id"],i="or"!==t.op;return t.conditions.forEach(function(u){var a=!1,c=[],l=n.get_raw(u.p);null===l?a=!1:"object"===(0,e.default)(l)?r.forEach(function(e){l[e]?c.push(l[e]):"name"==e&&c.push(n.get_with_locales(u.p,o.lang))}):c=[l],a=s(u.v,c),u.not&&(a=!a),i="or"===t.op?i||a:i&&a}),t.not&&(i=!i),i}function s(e,t){return!0===t[0]?t=["true","yes","y","1"]:!1===t[0]&&(t=["false","no","n","0",""]),t=t.map(function(e){return String(e).toLowerCase()}),e=e.split(","),(0,o.default)(e,t).length>0}
|
34 |
-
},{"@babel/runtime/helpers/typeof":"LNzP","./helpers":"IyEz","just-intersect":"T6sq"}],"d5ii":[function(require,module,exports) {
|
35 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.do_shortcodes=void 0;var e=c(require("@babel/runtime/helpers/asyncToGenerator")),t=c(require("@babel/runtime/regenerator")),o=require("../lib/html"),r=require("./helpers"),n=require("./normal"),s=require("./show-if");function c(e){return e&&e.__esModule?e:{default:e}}var i=function(){var c=(0,e.default)(t.default.mark(function e(){return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.domReady;case 2:(0,r.action_on_elements)("js-geoip-detect-shortcode","could not execute shortcode(s) [geoip_detect2 ...]",n.do_shortcode_normal),(0,r.action_on_elements)("js-geoip-detect-flag","could not configure the flag(s)",n.do_shortcode_flags),(0,r.action_on_elements)("js-geoip-text-input","could not set the value of the text input field(s)",n.do_shortcode_text_input),(0,r.action_on_elements)("js-geoip-detect-country-select","could not set the value of the select field(s)",n.do_shortcode_country_select),(0,r.action_on_elements)("js-geoip-detect-show-if","could not execute the show-if/hide-if conditions",s.do_shortcode_show_if);case 7:case"end":return e.stop()}},e)}));return function(){return c.apply(this,arguments)}}();exports.do_shortcodes=i;
|
36 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","../lib/html":"YIwO","./helpers":"IyEz","./normal":"AwHB","./show-if":"jiwS"}],"EtfF":[function(require,module,exports) {
|
37 |
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calc_classes=c,exports.add_body_classes=s;var e=o(require("@babel/runtime/helpers/asyncToGenerator")),t=o(require("@babel/runtime/regenerator")),r=require("./lib/html"),n=require("./lookup");function o(e){return e&&e.__esModule?e:{default:e}}function c(e){return{country:e.get("country.iso_code"),"country-is-in-european-union":e.get("country.is_in_european_union",!1),continent:e.get("continent.code"),province:e.get("most_specific_subdivision.iso_code")}}function s(){return a.apply(this,arguments)}function a(){return(a=(0,e.default)(t.default.mark(function e(){var o,s,a,i,u,d,l;return t.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.get_info)();case 2:if(!(o=e.sent).error()){e.next=6;break}return console.error("Geolocation IP Detection Error (could not add CSS-classes to body): "+o.error()),e.abrupt("return");case 6:return s=c(o),e.next=9,r.domReady;case 9:for(a=document.getElementsByTagName("body")[0],i=0,u=Object.keys(s);i<u.length;i++)d=u[i],(l=s[d])&&("string"==typeof l?a.classList.add("geoip-".concat(d,"-").concat(l)):a.classList.add("geoip-".concat(d)));case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}
|
38 |
-
},{"@babel/runtime/helpers/asyncToGenerator":"fwsn","@babel/runtime/regenerator":"m4eR","./lib/html":"YIwO","./lookup":"yyFn"}],"ZVsn":[function(require,module,exports) {
|
39 |
-
"use strict";var e=require("./lookup"),o=require("./shortcodes/index"),d=require("./body_classes");e.options.do_body_classes&&(0,d.add_body_classes)(),(0,o.do_shortcodes)(),window.geoip_detect.get_info=e.get_info,window.geoip_detect.set_override=e.set_override,window.geoip_detect.remove_override=e.remove_override;
|
40 |
-
},{"./lookup":"yyFn","./shortcodes/index":"d5ii","./body_classes":"EtfF"}]},{},["ZVsn"], null)
|
41 |
-
//# sourceMappingURL=frontend.e2558764.js.map
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/dist/frontend.e2558764.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["node_modules/@babel/runtime/helpers/typeof.js","node_modules/@babel/runtime/helpers/asyncToGenerator.js","node_modules/regenerator-runtime/runtime.js","node_modules/@babel/runtime/regenerator/index.js","node_modules/@babel/runtime/helpers/classCallCheck.js","node_modules/@babel/runtime/helpers/createClass.js","node_modules/just-safe-get/index.js","js/models/record.js","js/lib/localStorageAccess.js","js/lib/xhr.js","js/lookup.js","js/lib/html.js","js/shortcodes/helpers.js","js/shortcodes/normal.js","node_modules/just-intersect/index.js","js/shortcodes/show-if.js","js/shortcodes/index.js","js/body_classes.js","js/frontend.js"],"names":["Record","_get_localized","ret","locales","names","i","length","locale","name","camelToUnderscore","key","split","map","x","toLowerCase","slice","replace","join","data","default_locales","is_empty","_process_locales","prop","default_value","get_with_locales","_lookup_with_locales","substr","get_raw","Array","isArray","console","warn","country","get","setLocalStorage","variable","value","ttl_sec","expires_at","Date","getTime","localStorage","setItem","toString","JSON","stringify","getLocalStorage","parse","getItem","e","removeItem","makeRequest","url","method","request","XMLHttpRequest","Promise","resolve","reject","onreadystatechange","readyState","status","statusText","open","send","jsonDecodeIfPossible","str","createErrorObject","errorMsg","extra","error","makeJSONRequest","responseText","options","window","geoip_detect","ajaxurl","cookie_duration_in_days","cookie_name","ajaxPromise","get_info_raw","then","response","get_info_cached","storedResponse","override","info","log","responseJSON","cache_duration","set_override","record","duration_in_days","serialize","set_override_data","remove_override","get_info","domReady","document","addEventListener","attachEvent","selectItemByValue","el","selectedIndex","selectItemByAttribute","attributeName","attributeValue","getAttribute","triggerNativeEvent","createEvent","event","initEvent","dispatchEvent","fireEvent","get_options","raw","action_on_elements","className","errorMessage","callback","elements","getElementsByClassName","from","forEach","get_value_from_record","property","opt","skip_cache","lang","default","do_shortcode_normal","innerText","do_shortcode_flags","get_country_iso","classList","add","do_shortcode_country_select","do_shortcode_text_input","do_shortcode_show_if","evaluated","geoip_detect2_shortcode_evaluate_conditions","parsed","style","display","alternativePropertyNames","isConditionMatching","op","conditions","c","subConditionMatching","values","raw_value","p","push","geoip_detect2_shortcode_check_subcondition","v","not","expectedValues","actualValues","intersect","String","do_shortcodes","calc_classes","continent","province","add_body_classes","css_classes","Object","body","getElementsByTagName","keys","do_body_classes"],"mappings":";AAAA,SAAA,EAAA,GAaA,MAVA,mBAAA,QAAA,iBAAA,OAAA,SACA,OAAA,QAAA,EAAA,SAAA,GACA,cAAA,GAGA,OAAA,QAAA,EAAA,SAAA,GACA,OAAA,GAAA,mBAAA,QAAA,EAAA,cAAA,QAAA,IAAA,OAAA,UAAA,gBAAA,GAIA,EAAA,GAGA,OAAA,QAAA;;AChBA,SAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,GACA,IACA,IAAA,EAAA,EAAA,GAAA,GACA,EAAA,EAAA,MACA,MAAA,GAEA,YADA,EAAA,GAIA,EAAA,KACA,EAAA,GAEA,QAAA,QAAA,GAAA,KAAA,EAAA,GAIA,SAAA,EAAA,GACA,OAAA,WACA,IAAA,EAAA,KACA,EAAA,UACA,OAAA,IAAA,QAAA,SAAA,EAAA,GACA,IAAA,EAAA,EAAA,MAAA,EAAA,GAEA,SAAA,EAAA,GACA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,GAGA,SAAA,EAAA,GACA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,GAGA,OAAA,MAKA,OAAA,QAAA;;;ACwsBA,IAAA,EAruBA,EAAA,SAAA,GACA,aAEA,IAEA,EAFA,EAAA,OAAA,UACA,EAAA,EAAA,eAEA,EAAA,mBAAA,OAAA,OAAA,GACA,EAAA,EAAA,UAAA,aACA,EAAA,EAAA,eAAA,kBACA,EAAA,EAAA,aAAA,gBAEA,SAAA,EAAA,EAAA,EAAA,GAOA,OANA,OAAA,eAAA,EAAA,EAAA,CACA,MAAA,EACA,YAAA,EACA,cAAA,EACA,UAAA,IAEA,EAAA,GAEA,IAEA,EAAA,GA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EA,EAAA,iBACAjG,OAAOC,aAAaqB,SAAWA,EAA/B,SAEAtB,OAAOC,aAAae,aAAeA,EAAnC,aACAhB,OAAOC,aAAaoB,gBAAkBA,EAAtC","file":"frontend.e2558764.js","sourceRoot":"../..","sourcesContent":["function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = require(\"regenerator-runtime\");\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","module.exports = get;\n\n/*\n const obj = {a: {aa: {aaa: 2}}, b: 4};\n\n get(obj, 'a.aa.aaa'); // 2\n get(obj, ['a', 'aa', 'aaa']); // 2\n\n get(obj, 'b.bb.bbb'); // undefined\n get(obj, ['b', 'bb', 'bbb']); // undefined\n\n get(obj.a, 'aa.aaa'); // 2\n get(obj.a, ['aa', 'aaa']); // 2\n\n get(obj.b, 'bb.bbb'); // undefined\n get(obj.b, ['bb', 'bbb']); // undefined\n\n get(obj.b, 'bb.bbb', 42); // 42\n get(obj.b, ['bb', 'bbb'], 42); // 42\n\n get(null, 'a'); // undefined\n get(undefined, ['a']); // undefined\n\n get(null, 'a', 42); // 42\n get(undefined, ['a'], 42); // 42\n\n const obj = {a: {}};\n const sym = Symbol();\n obj.a[sym] = 4;\n get(obj.a, sym); // 4\n*/\n\nfunction get(obj, propsArg, defaultValue) {\n if (!obj) {\n return defaultValue;\n }\n var props, prop;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n while (props.length) {\n prop = props.shift();\n if (!obj) {\n return defaultValue;\n }\n obj = obj[prop];\n if (obj === undefined) {\n return defaultValue;\n }\n }\n return obj;\n}\n","import _get from 'just-safe-get';\n\n\nconst _get_localized = function(ret, locales) {\n if (typeof(ret) === 'object' && ret !== null) {\n if (typeof (ret.names) === 'object' && typeof (locales) === 'object') {\n for (let i = 0 ; i < locales.length ; i++) {\n let locale = locales[i];\n\n if (ret.names[locale]) {\n return ret.names[locale];\n }\n }\n }\n\n if (ret.name) {\n return ret.name;\n }\n\n return '';\n }\n return ret;\n}\n\nexport const camelToUnderscore = function(key) {\n key = key.split('.').map((x) => {\n if (typeof (x) !== 'string' || typeof (x[0]) !== 'string') {\n return '';\n }\n x = x[0].toLowerCase() + x.slice(1); // to allow \"MostSpecificSubdivision\"\n x = x.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n return x;\n }).join('.');\n\n return key;\n}\n\nclass Record {\n data = {};\n default_locales = [];\n\n constructor(data, default_locales) {\n this.data = data || { is_empty: true };\n \n this.default_locales = ['en']; \n this.default_locales = this._process_locales(default_locales);\n }\n\n get(prop, default_value) {\n return this.get_with_locales(prop, null, default_value);\n }\n\n get_raw(prop) {\n prop = camelToUnderscore(prop);\n return _get(this.data, prop, null);\n }\n \n has_property(prop) {\n const ret = this._lookup_with_locales(prop, this.default_locales, null)\n return ret !== null;\n }\n\n _lookup_with_locales(prop, locales, default_value = '') {\n locales = this._process_locales(locales);\n\n // Treat pseudo-property 'name' as if it never existed\n if (prop.substr(-5) === '.name') {\n prop = prop.substr(0, prop.length - 5);\n }\n\n let ret = this.get_raw(prop);\n \n // Localize property, if possible\n ret = _get_localized(ret, locales);\n \n if (ret === null || ret === '') {\n ret = default_value;\n }\n\n return ret;\n }\n \n _process_locales(locales) {\n if (typeof(locales) === 'string') {\n locales = [ locales ];\n }\n if (!Array.isArray(locales) || locales.length === 0) {\n locales = this.default_locales;\n }\n return locales;\n }\n\n get_with_locales(prop, locales, default_value) {\n const ret = this._lookup_with_locales(prop, locales, default_value);\n\n if (typeof(ret) === 'object') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is of type \"' + typeof (ret) + '\", should be string or similar', ret)\n }\n if (typeof(ret) === 'undefined') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is not defined, please check spelling or maybe you need a different data source', { data: this.data })\n return '';\n }\n\n return ret;\n }\n\n get_country_iso() {\n let country = this.get('country.iso_code');\n if(country) {\n country = country.substr(0, 2).toLowerCase();\n }\n return country;\n }\n\n /**\n * Check if there is information available for this IP\n * @returns boolean \n */\n is_empty() {\n return this.get('is_empty', false);\n }\n \n /**\n * Get error message, if any\n * @return string Error Message\n */\n error() {\n return this.get_raw('extra.error') || '';\n }\n\n /**\n * Get the raw data of this object\n * @returns object\n */\n serialize() {\n return this.data;\n }\n}\n\nexport default Record;","export const setLocalStorage = function (variable, value, ttl_sec) {\n var data = {value: value, expires_at: new Date().getTime() + (ttl_sec * 1000) / 1 };\n localStorage.setItem(variable.toString(), JSON.stringify(data));\n};\n\nexport const getLocalStorage = function (variable) {\n let data = null;\n try {\n data = JSON.parse(localStorage.getItem(variable.toString()));\n } catch(e) {\n return null;\n }\n if (data !== null) {\n if (data.expires_at !== null && data.expires_at < new Date().getTime()) {\n localStorage.removeItem(variable.toString());\n } else {\n return data.value;\n }\n }\n return null;\n}\n","// @see https://gomakethings.com/promise-based-xhr/\n\nexport const makeRequest = function (url, method = 'GET') {\n\n // Create the XHR request\n var request = new XMLHttpRequest();\n\n // Return it as a Promise\n return new Promise(function (resolve, reject) {\n\n // Setup our listener to process compeleted requests\n request.onreadystatechange = function () {\n\n // Only run if the request is complete\n if (request.readyState !== 4) return;\n\n // Process the response\n if (request.status >= 200 && request.status < 300) {\n // If successful\n resolve(request);\n } else {\n // If failed\n reject({\n status: request.status,\n statusText: request.statusText,\n request: request\n });\n }\n\n };\n\n // Setup our HTTP request\n request.open(method || 'GET', url, true);\n\n // Send the request\n request.send();\n\n });\n};\n\nexport const jsonDecodeIfPossible = function(str) {\n try {\n return JSON.parse(str);\n } catch(e) {\n return createErrorObject('Invalid JSON: ' + str);\n }\n}\n\nfunction createErrorObject(errorMsg) {\n return {\n is_empty: true,\n extra: {\n error: errorMsg\n }\n };\n}\n\nexport const makeJSONRequest = async function(url, method = 'GET') {\n try {\n const request = await makeRequest(url, method);\n if (!request.responseText || request.responseText === '0') {\n return createErrorObject('Got an empty response from server. Did you enable AJAX in the options?');\n }\n return jsonDecodeIfPossible(request.responseText);\n } catch(e) {\n return jsonDecodeIfPossible(e.request.responseText);\n }\n}\n","import Record from './models/record';\nimport { getLocalStorage, setLocalStorage } from './lib/localStorageAccess';\nimport { makeJSONRequest } from './lib/xhr';\n\n\nexport const options = window.geoip_detect?.options || {\n ajaxurl: \"/wp-admin/admin-ajax.php\",\n default_locales: ['en'],\n cookie_duration_in_days: 7,\n cookie_name: 'geoip-detect-result'\n};\n\nlet ajaxPromise = null;\n\nfunction get_info_raw() {\n if (!ajaxPromise) {\n // Do Ajax Request only once per page load\n const url = options.ajaxurl + '?action=geoip_detect2_get_info_from_current_ip'\n\n ajaxPromise = makeJSONRequest(url);\n \n ajaxPromise.then((response) => {\n if (response?.extra?.error) {\n console.error('Geolocation IP Detection Error: Server returned an error: ' + response.extra.error);\n }\n })\n }\n\n return ajaxPromise;\n}\n\nasync function get_info_cached() {\n let response = false;\n let storedResponse = false;\n\n // 1) Load Info from localstorage cookie cache, if possible\n if (options.cookie_name) {\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse && storedResponse.extra) {\n if (storedResponse.extra.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n } else {\n console.info('Geolocation IP Detection: Using cached response');\n }\n return storedResponse;\n }\n }\n\n // 2) Get response\n try {\n response = await get_info_raw();\n } catch (err) {\n console.log('Uncaught ERROR ??');\n response = err.responseJSON || err;\n }\n\n // 3) Save info to localstorage cookie cache\n if (options.cookie_name) {\n\n // Check if Override has been set now\n storedResponse = getLocalStorage(options.cookie_name)\n if (storedResponse?.extra?.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n return storedResponse;\n }\n\n let cache_duration = options.cookie_duration_in_days * 24 * 60 * 60;\n if (response?.extra?.error)\n cache_duration = 60; // Cache errors only for 1 minute, then try again\n \n setLocalStorage(options.cookie_name, response, cache_duration);\n }\n\n return response;\n}\n\n\n/**\n * This functions allows to override the geodetected data manually (e.g. a country selector)\n * \n * @api\n * @param {*} record \n * @param {number} duration_in_days When this override expires (default: 1 week later)\n * @return boolean\n */\nexport function set_override(record, duration_in_days) {\n if (record && typeof(record.serialize) === 'function') {\n record = record.serialize();\n }\n\n duration_in_days = duration_in_days || options.cookie_duration_in_days;\n if (duration_in_days < 0) {\n console.warn('Geolocation IP Detection set_override_data() did nothing: A negative duration doesn\\'t make sense. If you want to remove the override, use remove_override() instead.');\n return false;\n }\n\n return set_override_data(record, duration_in_days);\n}\nfunction set_override_data(data, duration_in_days) {\n if (!data) {\n data = {};\n }\n if (!data.extra) {\n data.extra = {};\n }\n data.extra.override = true;\n\n setLocalStorage(options.cookie_name, data, duration_in_days * 24 * 60 * 60);\n return true;\n}\n\n/**\n * Remove the override data.\n * On next page load, the record data will be loaded from the server again.\n * \n * @return boolean\n */\nexport function remove_override() {\n setLocalStorage(options.cookie_name, {}, -1);\n return true;\n}\n\n\n/**\n * Load the data from the server\n * \n * (It can also be loaded from the browser localstorage, if the record data is present there already.)\n * \n * @api\n * @return Promise(Record)\n */\nexport async function get_info() {\n let response = await get_info_cached();\n\n if (typeof (response) !== 'object') {\n console.error('Geolocation IP Detection Error: Record should be an object, not a ' + typeof (response), response);\n response = { 'extra': { 'error': response || 'Network error, look at the original server response ...' } };\n }\n\n const record = new Record(response, options.default_locales);\n return record;\n}","export const domReady = new Promise(resolve => {\n if (document.readyState === \"loading\") {\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', resolve);\n } else {\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState != 'loading')\n resolve();\n });\n }\n }\n else {\n resolve();\n }\n});\n\nexport function selectItemByValue(el, value) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].value === value) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\nexport function selectItemByAttribute(el, attributeName, attributeValue) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].getAttribute(attributeName) === attributeValue) {\n el.selectedIndex = i;\n break;\n }\n }\n}\n\n\nexport function triggerNativeEvent(el, name) {\n if (document.createEvent) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent(name, true, false);\n el.dispatchEvent(event);\n } else {\n el.fireEvent('on' + name);\n }\n}","import { get_info } from \"../lookup\";\n\n// Get Options from data-options and json parse them\nexport function get_options(el) {\n const raw = el.getAttribute('data-options');\n try {\n return JSON.parse(raw);\n } catch (e) {\n return {};\n }\n}\n\nexport async function action_on_elements(className, errorMessage, callback) {\n const elements = document.getElementsByClassName(className);\n if (!elements.length) return;\n\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (' + errorMessage + '): ' + record.error());\n return;\n }\n\n Array.from(elements)\n .forEach(el => callback(el, record));\n}\n\nexport function get_value_from_record(el, record, property = null) {\n const opt = get_options(el);\n property = property || opt.property;\n if (opt.skip_cache) {\n console.warn(\"Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME.\");\n }\n\n return record.get_with_locales(property, opt.lang, opt.default);\n}","import { selectItemByAttribute, triggerNativeEvent } from \"../lib/html\";\nimport { get_value_from_record, get_options } from \"./helpers\";\n\nexport function do_shortcode_normal(el, record) {\n el.innerText = get_value_from_record(el, record);\n}\n\nexport function do_shortcode_flags(el, record) {\n const country = record.get_country_iso() || get_options(el).default;\n if (country) {\n el.classList.add('flag-icon-' + country)\n }\n}\n\nexport function do_shortcode_country_select(el, record) {\n let country = record.get_country_iso();\n\n selectItemByAttribute(el, 'data-c', country);\n triggerNativeEvent(el, 'change');\n}\n\nexport function do_shortcode_text_input(el, record) {\n el.value = get_value_from_record(el, record);\n triggerNativeEvent(el, 'change');\n}","module.exports = intersect;\n\n/*\n intersect([1, 2, 5, 6], [2, 3, 5, 6]); // [2, 5, 6]\n intersect([1, 2, 2, 4, 5], [3, 2, 2, 5, 7]); // [2, 5]\n*/\n\nfunction intersect(arr1, arr2) {\n if (!Array.isArray(arr1) || !Array.isArray(arr2)) {\n throw new Error('expected both arguments to be arrays');\n }\n var result = [];\n var len = arr1.length;\n for (var i = 0; i < len; i++) {\n var elem = arr1[i];\n if (arr2.indexOf(elem) > -1 && result.indexOf(elem) == -1) {\n result.push(elem);\n }\n }\n return result;\n}\n","import { get_options } from './helpers';\nimport _intersect from 'just-intersect';\n\n\nexport function do_shortcode_show_if(el, record) {\n const opt = get_options(el);\n const evaluated = geoip_detect2_shortcode_evaluate_conditions(opt.parsed, opt, record);\n\n if (!evaluated) {\n el.style.display = \"none !important\";\n } else {\n el.style.display = '';\n }\n}\n\nexport function geoip_detect2_shortcode_evaluate_conditions(parsed, opt, record) {\n const alternativePropertyNames = [\n 'name',\n 'iso_code',\n 'iso_code3',\n 'code',\n 'geoname_id',\n ];\n\n let isConditionMatching = (parsed.op === 'or') ? false : true;\n\n parsed.conditions.forEach(c => {\n let subConditionMatching = false;\n let values = [];\n\n const raw_value = record.get_raw(c.p);\n\n if (raw_value === null) {\n subConditionMatching = false;\n } else {\n if (typeof (raw_value) === 'object') {\n alternativePropertyNames.forEach(name => {\n if (raw_value[name]) {\n values.push(raw_value[name]);\n } else if (name == 'name') {\n values.push(record.get_with_locales(c.p, opt.lang));\n }\n })\n } else {\n values = [raw_value]\n }\n }\n\n subConditionMatching = geoip_detect2_shortcode_check_subcondition(c.v, values);\n\n if (c.not) {\n subConditionMatching = !subConditionMatching;\n }\n\n if (parsed.op === 'or') {\n isConditionMatching = isConditionMatching || subConditionMatching;\n } else {\n isConditionMatching = isConditionMatching && subConditionMatching;\n }\n\n });\n\n if (parsed.not) {\n isConditionMatching = !isConditionMatching;\n }\n\n return isConditionMatching;\n}\n\nfunction geoip_detect2_shortcode_check_subcondition(expectedValues, actualValues) {\n if (actualValues[0] === true) {\n actualValues = ['true', 'yes', 'y', '1'];\n } else if (actualValues[0] === false) {\n actualValues = ['false', 'no', 'n', '0', ''];\n }\n\n actualValues = actualValues.map(x => String(x).toLowerCase())\n\n expectedValues = expectedValues.split(',');\n\n const intersect = _intersect(expectedValues, actualValues);\n\n return intersect.length > 0;\n}","import { domReady } from \"../lib/html\";\nimport { action_on_elements } from \"./helpers\";\nimport { do_shortcode_country_select, do_shortcode_flags, do_shortcode_normal, do_shortcode_text_input } from \"./normal\";\nimport { do_shortcode_show_if } from \"./show-if\";\n\n\nexport const do_shortcodes = async function do_shortcodes() {\n await domReady;\n\n // These are called in parallel, as they are async functions\n action_on_elements('js-geoip-detect-shortcode',\n 'could not execute shortcode(s) [geoip_detect2 ...]', do_shortcode_normal);\n\n action_on_elements('js-geoip-detect-flag',\n 'could not configure the flag(s)', do_shortcode_flags);\n\n action_on_elements('js-geoip-text-input',\n 'could not set the value of the text input field(s)', do_shortcode_text_input);\n\n action_on_elements('js-geoip-detect-country-select',\n 'could not set the value of the select field(s)', do_shortcode_country_select);\n\n action_on_elements('js-geoip-detect-show-if',\n 'could not execute the show-if/hide-if conditions', do_shortcode_show_if);\n\n};","import { domReady } from './lib/html';\nimport { get_info } from './lookup';\n\nexport function calc_classes(record) {\n return {\n country: record.get('country.iso_code'),\n 'country-is-in-european-union': record.get('country.is_in_european_union', false),\n continent: record.get('continent.code'),\n province: record.get('most_specific_subdivision.iso_code'),\n };\n}\n\nexport async function add_body_classes() {\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (could not add CSS-classes to body): ' + record.error());\n return;\n }\n\n const css_classes = calc_classes(record);\n\n await domReady;\n\n const body = document.getElementsByTagName('body')[0];\n for (let key of Object.keys(css_classes)) {\n const value = css_classes[key];\n if (value) {\n if (typeof (value) == 'string') {\n body.classList.add(`geoip-${key}-${value}`);\n } else {\n body.classList.add(`geoip-${key}`);\n }\n }\n }\n}","import { get_info, options, remove_override, set_override } from './lookup';\nimport { do_shortcodes } from './shortcodes/index';\nimport { add_body_classes } from './body_classes';\n\n\n\nif (options.do_body_classes) {\n add_body_classes();\n}\n\n// Always do shortcodes because there might be AJAX exceptions\ndo_shortcodes();\n\n// Extend window object \nwindow.geoip_detect.get_info = get_info;\n\nwindow.geoip_detect.set_override = set_override;\nwindow.geoip_detect.remove_override = remove_override;"]}
|
|
js/dist/frontend.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){function t(t){return t&&t.__esModule?t.default:t}function e(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function r(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t){return t&&t.constructor===Symbol?"symbol":typeof t}var a={},c=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===d)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?h:p,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=h,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",v={};function y(){}function g(){}function m(){}var _={};u(_,i,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(O([])));b&&b!==r&&n.call(b,i)&&(_=b);var x=m.prototype=y.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function L(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function O(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=m,u(x,"constructor",m),u(m,"constructor",g),g.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(E.prototype),u(E.prototype,a,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new E(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),u(x,c,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(a);try{regeneratorRuntime=c}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=c:Function("r","regeneratorRuntime = r")(c)}var u=function(t,e,r){if(!t)return r;var n,o;Array.isArray(e)&&(n=e.slice(0));"string"==typeof e&&(n=e.split("."));"symbol"==typeof e&&(n=[e]);if(!Array.isArray(n))throw new Error("props arg must be an array, a string or a symbol");for(;n.length;){if(o=n.shift(),!t)return r;if(void 0===(t=t[o]))return r}return t};var s=function(t){return t=t.split(".").map((function(t){return"string"!=typeof t||"string"!=typeof t[0]?"":t=(t=t[0].toLowerCase()+t.slice(1)).replace(/([A-Z])/g,"_$1").toLowerCase()})).join(".")},l=function(){"use strict";function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,"data",{}),o(this,"default_locales",[]),this.data=e||{is_empty:!0},this.default_locales=["en"],this.default_locales=this._process_locales(r)}var e,r,a;return e=t,(r=[{key:"get",value:function(t,e){return this.get_with_locales(t,null,e)}},{key:"get_raw",value:function(t){return t=s(t),u(this.data,t,null)}},{key:"has_property",value:function(t){return null!==this._lookup_with_locales(t,this.default_locales,null)}},{key:"_lookup_with_locales",value:function(t,e,r){var n=void 0===r?"":r;e=this._process_locales(e),".name"===t.substr(-5)&&(t=t.substr(0,t.length-5));var o=this.get_raw(t);return null!==(o=function(t,e){if("object"==typeof t&&null!==t){if("object"==typeof t.names&&"object"==typeof e)for(var r=0;r<e.length;r++){var n=e[r];if(t.names[n])return t.names[n]}return t.name?t.name:""}return t}(o,e))&&""!==o||(o=n),o}},{key:"_process_locales",value:function(t){return"string"==typeof t&&(t=[t]),Array.isArray(t)&&0!==t.length||(t=this.default_locales),t}},{key:"get_with_locales",value:function(t,e,r){var n=this._lookup_with_locales(t,e,r);return"object"==typeof n&&console.warn('Geolocation IP Detection: The property "'+t+'" is of type "'+(void 0===n?"undefined":i(n))+'", should be string or similar',n),void 0===n?(console.warn('Geolocation IP Detection: The property "'+t+'" is not defined, please check spelling or maybe you need a different data source',{data:this.data}),""):n}},{key:"get_country_iso",value:function(){var t=this.get("country.iso_code");return t&&(t=t.substr(0,2).toLowerCase()),t}},{key:"is_empty",value:function(){return this.get("is_empty",!1)}},{key:"error",value:function(){return this.get_raw("extra.error")||""}},{key:"serialize",value:function(){return this.data}}])&&n(e.prototype,r),a&&n(e,a),t}(),f=function(t,e){var r=void 0===e?"GET":e,n=new XMLHttpRequest;return new Promise((function(e,o){n.onreadystatechange=function(){4===n.readyState&&(n.status>=200&&n.status<300?e(n):o({status:n.status,statusText:n.statusText,request:n}))},n.open(r||"GET",t,!0),n.send()}))},p=function(t){try{return JSON.parse(t)}catch(e){return d("Invalid JSON: "+t)}};function d(t){return{is_empty:!0,extra:{error:t}}}var h,v=(h=r(t(a).mark((function e(r,n){var o,i;return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=void 0===n?"GET":n,t.prev=1,t.next=4,f(r,o);case 4:if((i=t.sent).responseText&&"0"!==i.responseText){t.next=7;break}return t.abrupt("return",d("Got an empty response from server. Did you enable AJAX in the options?"));case 7:return t.abrupt("return",p(i.responseText));case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",p(t.t0.request.responseText));case 13:case"end":return t.stop()}}),e,null,[[1,10]])}))),function(){return h.apply(this,arguments)}),y=function(t,e,r){var n={value:e,expires_at:(new Date).getTime()+1e3*r/1};localStorage.setItem(t.toString(),JSON.stringify(n))};function g(){return function(t){var e=null;try{e=JSON.parse(localStorage.getItem(t.toString()))}catch(t){return null}if(null!==e){if(!(null!==e.expires_at&&e.expires_at<(new Date).getTime()))return e.value;localStorage.removeItem(t.toString())}return null}(b.cookie_name)}function m(t,e){y(b.cookie_name,t,e)}var _,w={};var b=(null===(_=window.geoip_detect)||void 0===_?void 0:_.options)||{ajaxurl:"/wp-admin/admin-ajax.php",default_locales:["en"],cookie_duration_in_days:7,cookie_name:"geoip-detect-result",do_body_classes:!1},x=null;function k(){if(!x){var t=b.ajaxurl+"?action=geoip_detect2_get_info_from_current_ip";(x=v(t)).then((function(t){var e;(null==t||null===(e=t.extra)||void 0===e?void 0:e.error)&&console.error("Geolocation IP Detection Error: Server returned an error: "+t.extra.error)}))}return x}function E(){return(E=r(t(a).mark((function e(){var r,n,o,i,c;return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=!1,n=!1,!b.cookie_name){t.next=7;break}if(!(n=g())||!n.extra){t.next=7;break}return!0===n.extra.override?console.info("Geolocation IP Detection: Using cached response (override)"):console.info("Geolocation IP Detection: Using cached response"),t.abrupt("return",n);case 7:return t.prev=7,t.next=10,k();case 10:r=t.sent,t.next=17;break;case 13:t.prev=13,t.t0=t.catch(7),console.log("Weird: Uncaught error...",t.t0),r=t.t0.responseJSON||t.t0;case 17:if(!b.cookie_name){t.next=26;break}if(!0!==(null==(n=g())||null===(o=n.extra)||void 0===o?void 0:o.override)){t.next=23;break}return console.info("Geolocation IP Detection: Using cached response (override)"),t.abrupt("return",n);case 23:c=86400*b.cookie_duration_in_days,(null==r||null===(i=r.extra)||void 0===i?void 0:i.error)&&(c=60),m(r,c);case 26:return t.abrupt("return",r);case 27:case"end":return t.stop()}}),e,null,[[7,13]])})))).apply(this,arguments)}function L(){return E.apply(this,arguments)}function j(){return(j=r(t(a).mark((function e(){var r,n;return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,L();case 2:return"object"!=typeof(r=t.sent)&&(console.error("Geolocation IP Detection Error: Record should be an object, not a "+(void 0===r?"undefined":i(r)),r),r={extra:{error:r||"Network error, look at the original server response ..."}}),n=new l(r,b.default_locales),t.abrupt("return",n);case 6:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function S(){return j.apply(this,arguments)}var A=function(t,e,r){var n,o,i;Array.isArray(e)&&(n=e.slice(0));"string"==typeof e&&(n=e.split("."));"symbol"==typeof e&&(n=[e]);if(!Array.isArray(n))throw new Error("props arg must be an array, a string or a symbol");if(!(o=n.pop()))return!1;O(o);for(;i=n.shift();)if(O(i),void 0===t[i]&&(t[i]={}),!(t=t[i])||"object"!=typeof t)return!1;return t[o]=r,!0};function O(t){if("__proto__"===t||"constructor"===t||"prototype"===t)throw new Error("setting of prototype values not supported")}var T=P;function P(t,e){return t===e||(t!=t&&e!=e||{}.toString.call(t)=={}.toString.call(e)&&(t===Object(t)&&(!!t&&(Array.isArray(t)?G(t,e):"[object Set]"=={}.toString.call(t)?G(Array.from(t),Array.from(e)):"[object Object]"=={}.toString.call(t)?function(t,e){var r=Object.keys(t).sort(),n=Object.keys(e).sort(),o=r.length;if(o!=n.length)return!1;for(var i=0;i<o;i++){var a=r[i],c=n[i];if(a!=c||!P(t[a],e[c]))return!1}return!0}(t,e):function(t,e){return t.toString()===e.toString()}(t,e)))))}function G(t,e){var r=t.length;if(r!=e.length)return!1;for(var n=!0,o=0;o<r;o++)if(!P(t[o],e[o])){n=!1;break}return n}var I=new Promise((function(t){"loading"===document.readyState?document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",(function(){"loading"!=document.readyState&&t()})):t()}));function N(t,e,r){for(var n=0;n<t.options.length;n++)if(t.options[n].getAttribute(e)===r)return t.selectedIndex=n,!0;return!1}function C(t){var e=t.getAttribute("data-options");try{return JSON.parse(e)}catch(t){return{}}}function D(){return(D=r(t(a).mark((function e(r,n,o){var i,c;return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=document.getElementsByClassName(r)).length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,S();case 5:if(!(c=t.sent).error()){t.next=9;break}return console.error("Geolocation IP Detection Error ("+n+"): "+c.error()),t.abrupt("return");case 9:Array.from(i).forEach((function(t){return o(t,c)}));case 10:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function J(t,e,r){return D.apply(this,arguments)}function R(t,e,r){var n=void 0===r?null:r,o=C(t);return n=n||o.property,o.skip_cache&&console.warn("Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME."),e.get_with_locales(n,o.lang,o.default)}var F=!1;function U(t,e,r){var n,o=void 0===r?null:r;F=!0,window.CustomEvent&&"function"==typeof window.CustomEvent?n=new CustomEvent(e,{detail:o}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,o),t.dispatchEvent(n),F=!1}var M=!1,q=0;function z(t){if(!F){var e=t.target;(null==e?void 0:e.matches)&&e.matches(".js-geoip-detect-input-autosave")&&function(t){var e=C(t).property,r=t.value;if(q++,!(M||q>10?(console.warn("Error: Thats weird! autosave change detected a recursion ("+q+")! Please file a bug report about this and include the first 10 lines of the callstack below:"),console.trace(),0):(M=!0,1)))return;if(t.matches("select.js-geoip-detect-country-select")){var n=t.options[t.selectedIndex];ot("country.iso_code",(null==n?void 0:n.getAttribute("data-c")).toUpperCase(),{reevaluate:!1})}ot(e,r,{reevaluate:!0}),M=!1}(e)}}function W(t,e){t.innerText=R(t,e)}function X(t,e){var r=e.get_country_iso()||C(t).default;r&&t.classList.add("flag-icon-"+r)}function Y(t,e){(N(t,"data-c",e.get_country_iso())||N(t,"data-c",""))&&U(t,"change")}function B(t,e){t.value=R(t,e),U(t,"change")}var H=function(t,e){if(!Array.isArray(t)||!Array.isArray(e))throw new Error("expected both arguments to be arrays");for(var r=[],n=t.length,o=0;o<n;o++){var i=t[o];e.indexOf(i)>-1&&-1==r.indexOf(i)&&r.push(i)}return r};function Z(t,e){var r=C(t);(function(t,e,r){var n=["name","iso_code","iso_code3","code","geoname_id"],o="or"!==t.op;t.conditions.forEach((function(i){var a=!1,c=[],u=r.get_raw(i.p);null===u?a=!1:"object"==typeof u?n.forEach((function(t){u[t]?c.push(u[t]):"name"==t&&c.push(r.get_with_locales(i.p,e.lang))})):c=[u],a=function(t,e){!0===e[0]?e=["true","yes","y","1"]:!1===e[0]&&(e=["false","no","n","0",""]);if(e=e.map((function(t){return String(t).toLowerCase()})),-1!==(t=t.split(",")).indexOf("")&&0===e.length)return!0;return H(t,e).length>0}(i.v,c),i.not&&(a=!a),o="or"===t.op?o||a:o&&a})),t.not&&(o=!o);return o})(r.parsed,r,e)?(t.style.display="",t.classList.remove("geoip-hidden"),t.classList.add("geoip-shown")):(t.style.display="none",t.classList.add("geoip-hidden"),t.classList.remove("geoip-shown"))}var $,K=function(){document.addEventListener("change",z,!1)},Q=($=r(t(a).mark((function e(){return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,I;case 2:J("js-geoip-detect-shortcode","could not execute shortcode(s) [geoip_detect2 ...]",W),J("js-geoip-detect-flag","could not configure the flag(s)",X),J("js-geoip-text-input","could not set the value of the text input field(s)",B),J("js-geoip-detect-country-select","could not set the value of the select field(s)",Y),J("js-geoip-detect-show-if","could not execute the show-if/hide-if conditions",Z);case 7:case"end":return t.stop()}}),e)}))),function(){return $.apply(this,arguments)});function V(){return(V=r(t(a).mark((function e(){var r;return t(a).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,S();case 2:if(!(r=t.sent).error()){t.next=6;break}return console.error("Geolocation IP Detection Error (could not add CSS-classes to body): "+r.error()),t.abrupt("return");case 6:return t.next=8,I;case 8:tt(r);case 9:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function tt(t){var e,r,n,o=function(t){return{country:t.get("country.iso_code"),"country-is-in-european-union":t.get("country.is_in_european_union",!1),continent:t.get("continent.code"),province:t.get("most_specific_subdivision.iso_code")}}(t),i=document.getElementsByTagName("body")[0];r="geoip-",n=(e=i).className.split(" ").filter((function(t){return!t.startsWith(r)})),e.className=n.join(" ").trim();var a=!0,c=!1,u=void 0;try{for(var s,l=Object.keys(o)[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var f=s.value,p=o[f];p&&("string"==typeof p?i.classList.add("geoip-".concat(f,"-").concat(p)):i.classList.add("geoip-".concat(f)))}}catch(t){c=!0,u=t}finally{try{a||null==l.return||l.return()}finally{if(c)throw u}}}var et=!0;function rt(){et&&(K(),et=!1),b.do_body_classes&&function(){V.apply(this,arguments)}(),Q(),w=g()}function nt(t){return"number"==typeof(t=t||{})&&(t={duration_in_days:t}),t.duration_in_days=t.duration_in_days||b.cookie_duration_in_days,t.duration_in_days<0?(console.warn("Geolocation IP Detection set_override_data() did nothing: A negative duration doesn't make sense. If you want to remove the override, use remove_override() instead."),!1):(void 0===t.reevaluate&&(t.reevaluate=!0),t)}function ot(t,e,r){var n=g();it(n=function(t,e,r){t=t||{},e=s(e=e||"");var n=u(t,e);return"object"==typeof n&&"object"==typeof n.names&&(e+=".name"),e.endsWith(".name")&&(e+="s",r={en:r}),A(t,e,r),t}(n,t,e),r)}function it(t,e){return e=nt(e),t&&"function"==typeof t.serialize&&(t=t.serialize()),function(t,e){if(A(t=t||{},"extra.override",!0),y(b.cookie_name,t,86400*e.duration_in_days),e.reevaluate&&!T(t,function(){return w}()))return rt(),!0;return!1}(t,e)}rt(),window.geoip_detect.get_info=S,window.geoip_detect.set_override=it,window.geoip_detect.remove_override=function(t){return t=nt(t),y(b.cookie_name,{},-1),t.reevaluate&&rt(),!0}}();
|
2 |
//# sourceMappingURL=frontend.js.map
|
1 |
+
!function(){function t(t){return t&&t.__esModule?t.default:t}function e(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function r(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}function n(t){return t&&t.constructor===Symbol?"symbol":typeof t}var o={},i=function(t){"use strict";var e,r=function(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]},n=function(t,e,r,n){var o=e&&e.prototype instanceof i?e:i,a=Object.create(o.prototype),u=new p(n||[]);return a._invoke=l(t,r,u),a},o=function(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}},i=function(){},a=function(){},u=function(){},c=function(t){["next","throw","return"].forEach((function(e){r(t,e,(function(t){return this._invoke(e,t)}))}))},s=function(t,e){function r(n,i,a,u){var c=o(t[n],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var n;this._invoke=function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}},l=function(t,e,r){var n=x;return function(i,a){if(n===k)throw new Error("Generator is already running");if(n===L){if("throw"===i)throw a;return v()}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=T(u,r);if(c){if(c===j)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===x)throw n=L,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=k;var s=o(t,e,r);if("normal"===s.type){if(n=r.done?L:E,s.arg===j)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=L,r.method="throw",r.arg=s.arg)}}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},d=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},h=function(t){if(t){var r=t[_];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(g.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},_=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",b=m.toStringTag||"@@toStringTag";try{r({},"")}catch(t){r=function(t,e,r){return t[e]=r}}t.wrap=n;var x="suspendedStart",E="suspendedYield",k="executing",L="completed",j={},S={};r(S,_,(function(){return this}));var A=Object.getPrototypeOf,O=A&&A(A(h([])));O&&O!==y&&g.call(O,_)&&(S=O);var P=u.prototype=i.prototype=Object.create(S);function T(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method))return j;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var i=o(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,j;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,j):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,j)}return a.prototype=u,r(P,"constructor",u),r(u,"constructor",a),a.displayName=r(u,b,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,r(t,b,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},c(s.prototype),r(s.prototype,w,(function(){return this})),t.AsyncIterator=s,t.async=function(e,r,o,i,a){void 0===a&&(a=Promise);var u=new s(n(e,r,o,i),a);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},c(P),r(P,b,"Generator"),r(P,_,(function(){return this})),r(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=h,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(d),!t)for(var r in this)"t"===r.charAt(0)&&g.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var r=function(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o};if(this.done)throw t;for(var n=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),d(r),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;d(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:h(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),j}},t}(o);try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=function(t,e,r){if(!t)return r;var o,i;Array.isArray(e)&&(o=e.slice(0));"string"==typeof e&&(o=e.split("."));"symbol"==(void 0===e?"undefined":n(e))&&(o=[e]);if(!Array.isArray(o))throw new Error("props arg must be an array, a string or a symbol");for(;o.length;){if(i=o.shift(),!t)return r;if(void 0===(t=t[i]))return r}return t};var l=function(t,e){if("object"==typeof t&&null!==t){if("object"==typeof t.names&&"object"==typeof e)for(var r=0;r<e.length;r++){var n=e[r];if(t.names[n])return t.names[n]}return t.name?t.name:""}return t},f=function(t){return t=t.split(".").map((function(t){return"string"!=typeof t||"string"!=typeof t[0]?"":t=(t=t[0].toLowerCase()+t.slice(1)).replace(/([A-Z])/g,"_$1").toLowerCase()})).join(".")},d=function(){"use strict";function t(e,r){a(this,t),c(this,"data",{}),c(this,"default_locales",[]),this.data=e||{is_empty:!0},this.default_locales=["en"],this.default_locales=this._process_locales(r)}var e,r,o;return e=t,r=[{key:"get",value:function(t,e){return this.get_with_locales(t,null,e)}},{key:"get_raw",value:function(t){return t=f(t),s(this.data,t,null)}},{key:"has_property",value:function(t){return null!==this._lookup_with_locales(t,this.default_locales,null)}},{key:"_lookup_with_locales",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e=this._process_locales(e),".name"===t.substr(-5)&&(t=t.substr(0,t.length-5));var n=this.get_raw(t);return null!==(n=l(n,e))&&""!==n||(n=r),n}},{key:"_process_locales",value:function(t){return"string"==typeof t&&(t=[t]),Array.isArray(t)&&0!==t.length||(t=this.default_locales),t}},{key:"get_with_locales",value:function(t,e,r){var o=this._lookup_with_locales(t,e,r);return"object"==typeof o&&console.warn('Geolocation IP Detection: The property "'+t+'" is of type "'+(void 0===o?"undefined":n(o))+'", should be string or similar',o),void 0===o?(console.warn('Geolocation IP Detection: The property "'+t+'" is not defined, please check spelling or maybe you need a different data source',{data:this.data}),""):o}},{key:"get_country_iso",value:function(){var t=this.get("country.iso_code");return t&&(t=t.substr(0,2).toLowerCase()),t}},{key:"is_empty",value:function(){return this.get("is_empty",!1)}},{key:"error",value:function(){return this.get_raw("extra.error")||""}},{key:"serialize",value:function(){return this.data}}],r&&u(e.prototype,r),o&&u(e,o),t}(),p=d,h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",r=new XMLHttpRequest;return new Promise((function(n,o){r.onreadystatechange=function(){4===r.readyState&&(r.status>=200&&r.status<300?n(r):o({status:r.status,statusText:r.statusText,request:r}))},r.open(e||"GET",t,!0),r.send()}))},v=function(t){try{return JSON.parse(t)}catch(e){return y("Invalid JSON: "+t)}};function y(t){return{is_empty:!0,extra:{error:t}}}var g,m=(g=r(t(o).mark((function e(r){var n,i,a=arguments;return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:"GET",t.prev=1,t.next=4,h(r,n);case 4:if((i=t.sent).responseText&&"0"!==i.responseText){t.next=7;break}return t.abrupt("return",y("Got an empty response from server. Did you enable AJAX in the options?"));case 7:return t.abrupt("return",v(i.responseText));case 10:return t.prev=10,t.t0=t.catch(1),t.abrupt("return",v(t.t0.request.responseText));case 13:case"end":return t.stop()}}),e,null,[[1,10]])}))),function(t){return g.apply(this,arguments)}),_=function(t,e,r){var n={value:e,expires_at:(new Date).getTime()+1e3*r/1};localStorage.setItem(t.toString(),JSON.stringify(n))};var w=function(t){var e=null;try{e=JSON.parse(localStorage.getItem(t.toString()))}catch(t){return null}if(null!==e){if(!(null!==e.expires_at&&e.expires_at<(new Date).getTime()))return e.value;localStorage.removeItem(t.toString())}return null};function b(){return w(j.cookie_name)}function x(t,e){_(j.cookie_name,t,e)}var E,k={};function L(){return k}var j=(null===(E=window.geoip_detect)||void 0===E?void 0:E.options)||{ajaxurl:"/wp-admin/admin-ajax.php",default_locales:["en"],cookie_duration_in_days:7,cookie_name:"geoip-detect-result",do_body_classes:!1},S=null;function A(){if(!S){var t=j.ajaxurl+"?action=geoip_detect2_get_info_from_current_ip";(S=m(t)).then((function(t){var e;(null==t||null===(e=t.extra)||void 0===e?void 0:e.error)&&console.error("Geolocation IP Detection Error: Server returned an error: "+t.extra.error)}))}return S}function O(){return P.apply(this,arguments)}function P(){return(P=r(t(o).mark((function e(){var r,n,i,a,u;return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=!1,n=!1,!j.cookie_name){t.next=7;break}if(!(n=b())||!n.extra){t.next=7;break}return!0===n.extra.override?console.info("Geolocation IP Detection: Using cached response (override)"):console.info("Geolocation IP Detection: Using cached response"),t.abrupt("return",n);case 7:return t.prev=7,t.next=10,A();case 10:r=t.sent,t.next=17;break;case 13:t.prev=13,t.t0=t.catch(7),console.log("Weird: Uncaught error...",t.t0),r=t.t0.responseJSON||t.t0;case 17:if(!j.cookie_name){t.next=26;break}if(!0!==(null==(n=b())||null===(i=n.extra)||void 0===i?void 0:i.override)){t.next=23;break}return console.info("Geolocation IP Detection: Using cached response (override)"),t.abrupt("return",n);case 23:u=86400*j.cookie_duration_in_days,(null==r||null===(a=r.extra)||void 0===a?void 0:a.error)&&(u=60),x(r,u);case 26:return t.abrupt("return",r);case 27:case"end":return t.stop()}}),e,null,[[7,13]])})))).apply(this,arguments)}function T(){return G.apply(this,arguments)}function G(){return(G=r(t(o).mark((function e(){var r,i;return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,O();case 2:return"object"!=typeof(r=t.sent)&&(console.error("Geolocation IP Detection Error: Record should be an object, not a "+(void 0===r?"undefined":n(r)),r),r={extra:{error:r||"Network error, look at the original server response ..."}}),i=new p(r,j.default_locales),t.abrupt("return",i);case 6:case"end":return t.stop()}}),e)})))).apply(this,arguments)}var I=function(t,e,r){var o,i,a;Array.isArray(e)&&(o=e.slice(0));"string"==typeof e&&(o=e.split("."));"symbol"==(void 0===e?"undefined":n(e))&&(o=[e]);if(!Array.isArray(o))throw new Error("props arg must be an array, a string or a symbol");if(!(i=o.pop()))return!1;N(i);for(;a=o.shift();)if(N(a),void 0===t[a]&&(t[a]={}),!(t=t[a])||"object"!=typeof t)return!1;return t[i]=r,!0};function N(t){if("__proto__"==t||"constructor"==t||"prototype"==t)throw new Error("setting of prototype values not supported")}var C=D;function D(t,e){return t===e||(t!=t&&e!=e||(void 0===t?"undefined":n(t))==(void 0===e?"undefined":n(e))&&{}.toString.call(t)=={}.toString.call(e)&&(t===Object(t)&&(!!t&&(Array.isArray(t)?J(t,e):"[object Set]"=={}.toString.call(t)?J(Array.from(t),Array.from(e)):"[object Object]"=={}.toString.call(t)?function(t,e){var r=Object.keys(t),n=r.length;if(n!=Object.keys(e).length)return!1;for(var o=0;o<n;o++){var i=r[o];if(!e.hasOwnProperty(i)||!D(t[i],e[i]))return!1}return!0}(t,e):function(t,e){return t.toString()===e.toString()}(t,e)))))}function J(t,e){var r=t.length;if(r!=e.length)return!1;for(var n=0;n<r;n++)if(!D(t[n],e[n]))return!1;return!0}var R=new Promise((function(t){"loading"===document.readyState?document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",(function(){"loading"!=document.readyState&&t()})):t()}));function F(t,e,r){for(var n=0;n<t.options.length;n++)if(t.options[n].getAttribute(e)===r)return t.selectedIndex=n,!0;return!1}function U(t){var e=t.getAttribute("data-options");try{return JSON.parse(e)}catch(t){return{}}}function M(t,e,r){return q.apply(this,arguments)}function q(){return(q=r(t(o).mark((function e(r,n,i){var a,u;return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((a=document.getElementsByClassName(r)).length){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,T();case 5:if(!(u=t.sent).error()){t.next=9;break}return console.error("Geolocation IP Detection Error ("+n+"): "+u.error()),t.abrupt("return");case 9:Array.from(a).forEach((function(t){return i(t,u)}));case 10:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function z(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=U(t);return r=r||n.property,n.skip_cache&&console.warn("Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME."),e.get_with_locales(r,n.lang,n.default)}var W=!1;function X(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;W=!0,window.CustomEvent&&"function"==typeof window.CustomEvent?r=new CustomEvent(e,{detail:n}):(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n),t.dispatchEvent(r),W=!1}var Y=!1,B=0;function H(){return B++,Y||B>10?(console.warn("Error: Thats weird! autosave change detected a recursion ("+B+")! Please file a bug report about this and include the first 10 lines of the callstack below:"),console.trace(),!1):(Y=!0,!0)}function Z(){Y=!1}function $(t){if(!W){var e=t.target;(null==e?void 0:e.matches)&&e.matches(".js-geoip-detect-input-autosave")&&function(t){var e=U(t).property,r=t.value;if(!H())return;if(t.matches("select.js-geoip-detect-country-select")){var n=t.options[t.selectedIndex];dt("country.iso_code",(null==n?void 0:n.getAttribute("data-c")).toUpperCase(),{reevaluate:!1})}dt(e,r,{reevaluate:!0}),Z()}(e)}}function K(t,e){t.innerText=z(t,e)}function Q(t,e){var r=e.get_country_iso()||U(t).default;r&&t.classList.add("flag-icon-"+r)}function V(t,e){(F(t,"data-c",e.get_country_iso())||F(t,"data-c",""))&&X(t,"change")}function tt(t,e){t.value=z(t,e),X(t,"change")}var et=function(t,e){if(!Array.isArray(t)||!Array.isArray(e))throw new Error("expected both arguments to be arrays");for(var r=[],n=function(t){for(var e={},r=0;r<t.length;r++){var n=t[r];e.hasOwnProperty(n)||(e[n]=!0)}return e}(e),o={},i=0;i<t.length;i++){var a=t[i];n.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(r.push(a),o[a]=!0)}return r};function rt(t,e){var r=U(t),n=function(t,e,r){var n=["name","iso_code","iso_code3","code","geoname_id"],o="or"!==t.op;t.conditions.forEach((function(i){var a=!1,u=[],c=r.get_raw(i.p);null===c?a=!1:"object"==typeof c?n.forEach((function(t){c[t]?u.push(c[t]):"name"==t&&u.push(r.get_with_locales(i.p,e.lang))})):u=[c],a=function(t,e){!0===e[0]?e=["true","yes","y","1"]:!1===e[0]&&(e=["false","no","n","0",""]);if(e=e.map((function(t){return String(t).toLowerCase()})),-1!==(t=t.split(",")).indexOf("")&&0===e.length)return!0;return et(t,e).length>0}(i.v,u),i.not&&(a=!a),o="or"===t.op?o||a:o&&a})),t.not&&(o=!o);return o}(r.parsed,r,e);n?(t.style.display="",t.classList.remove("geoip-hidden"),t.classList.add("geoip-shown")):(t.style.display="none",t.classList.add("geoip-hidden"),t.classList.remove("geoip-shown"))}var nt,ot=function(){document.addEventListener("change",$,!1)},it=(nt=r(t(o).mark((function e(){return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R;case 2:M("js-geoip-detect-shortcode","could not execute shortcode(s) [geoip_detect2 ...]",K),M("js-geoip-detect-flag","could not configure the flag(s)",Q),M("js-geoip-text-input","could not set the value of the text input field(s)",tt),M("js-geoip-detect-country-select","could not set the value of the select field(s)",V),M("js-geoip-detect-show-if","could not execute the show-if/hide-if conditions",rt);case 7:case"end":return t.stop()}}),e)}))),function(){return nt.apply(this,arguments)});function at(){return ut.apply(this,arguments)}function ut(){return(ut=r(t(o).mark((function e(){var r;return t(o).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T();case 2:if(!(r=t.sent).error()){t.next=6;break}return console.error("Geolocation IP Detection Error (could not add CSS-classes to body): "+r.error()),t.abrupt("return");case 6:return t.next=8,R;case 8:ct(r);case 9:case"end":return t.stop()}}),e)})))).apply(this,arguments)}function ct(t){var e,r,n,o=function(t){return{country:t.get("country.iso_code"),"country-is-in-european-union":t.get("country.is_in_european_union",!1),continent:t.get("continent.code"),province:t.get("most_specific_subdivision.iso_code")}}(t),i=document.getElementsByTagName("body")[0];r="geoip-",n=(e=i).className.split(" ").filter((function(t){return!t.startsWith(r)})),e.className=n.join(" ").trim();var a=!0,u=!1,c=void 0;try{for(var s,l=Object.keys(o)[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var f=s.value,d=o[f];d&&("string"==typeof d?i.classList.add("geoip-".concat(f,"-").concat(d)):i.classList.add("geoip-".concat(f)))}}catch(t){u=!0,c=t}finally{try{a||null==l.return||l.return()}finally{if(u)throw c}}}var st=!0;function lt(){st&&(ot(),st=!1),j.do_body_classes&&at(),it(),k=b()}function ft(t){return"number"==typeof(t=t||{})&&(t={duration_in_days:t}),t.duration_in_days=t.duration_in_days||j.cookie_duration_in_days,t.duration_in_days<0?(console.warn("Geolocation IP Detection set_override_data() did nothing: A negative duration doesn't make sense. If you want to remove the override, use remove_override() instead."),!1):(void 0===t.reevaluate&&(t.reevaluate=!0),t)}function dt(t,e,r){var n=b();n=function(t,e,r){t=t||{},e=f(e=e||"");var n=s(t,e);return"object"==typeof n&&"object"==typeof n.names&&(e+=".name"),e.endsWith(".name")&&(e+="s",r={en:r}),I(t,e,r),t}(n,t,e),pt(n,r)}function pt(t,e){return e=ft(e),t&&"function"==typeof t.serialize&&(t=t.serialize()),function(t,e){if(I(t=t||{},"extra.override",!0),_(j.cookie_name,t,86400*e.duration_in_days),e.reevaluate&&!C(t,L()))return lt(),!0;return!1}(t,e)}lt(),window.geoip_detect.get_info=T,window.geoip_detect.set_override=pt,window.geoip_detect.set_override_with_merge=dt,window.geoip_detect.remove_override=function(t){return t=ft(t),_(j.cookie_name,{},-1),t.reevaluate&<(),!0}}();
|
2 |
//# sourceMappingURL=frontend.js.map
|
js/dist/frontend.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"mappings":"sEAASA,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQC,EAAKC,GACpE,IACE,IAAIC,EAAOP,EAAIK,GAAKC,GAChBE,EAAQD,EAAKC,MACjB,MAAOC,GAEP,YADAP,EAAOO,GAILF,EAAKG,KACPT,EAAQO,GAERG,QAAQV,QAAQO,GAAOI,KAAKT,EAAOC,cAIGS,GACxC,OAAO,WACL,IAAIC,EAAOC,KACTC,EAAOC,UACT,OAAO,IAAIN,SAAQ,SAAUV,EAASC,GACpC,IAAIF,EAAMa,EAAGK,MAAMJ,EAAME,YAEhBb,EAAMK,GACbT,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQ,OAAQI,YAGzDJ,EAAOe,GACdpB,EAAmBC,EAAKC,EAASC,EAAQC,EAAOC,EAAQ,QAASe,GAGnEhB,OAAMiB,gBC/BHC,EAAkBC,EAAQC,G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AEG","sources":["node_modules/@swc/helpers/src/_async_to_generator.js","node_modules/@swc/helpers/src/_create_class.js","node_modules/@swc/helpers/src/_define_property.js","node_modules/@swc/helpers/src/_type_of.js","node_modules/regenerator-runtime/runtime.js","node_modules/just-safe-get/index.mjs","js/models/record.js","node_modules/@swc/helpers/src/_class_call_check.js","js/lib/xhr.js","js/lib/localStorageAccess.js","js/lookup/storage.js","js/lookup/get_info.js","node_modules/just-safe-set/index.mjs","node_modules/just-compare/index.mjs","js/lib/html.js","js/shortcodes/helpers.js","js/lib/events.js","js/lib/check-recursive.js","js/shortcodes/onchange.js","js/shortcodes/normal.js","node_modules/just-intersect/index.mjs","js/shortcodes/show-if.js","js/shortcodes/index.js","js/body_classes.js","js/main.js","js/lookup/override.js","js/frontend.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n","export default function _typeof(obj) {\n return obj && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var objectSafeGet = get;\n\n/*\n const obj = {a: {aa: {aaa: 2}}, b: 4};\n\n get(obj, 'a.aa.aaa'); // 2\n get(obj, ['a', 'aa', 'aaa']); // 2\n\n get(obj, 'b.bb.bbb'); // undefined\n get(obj, ['b', 'bb', 'bbb']); // undefined\n\n get(obj.a, 'aa.aaa'); // 2\n get(obj.a, ['aa', 'aaa']); // 2\n\n get(obj.b, 'bb.bbb'); // undefined\n get(obj.b, ['bb', 'bbb']); // undefined\n\n get(obj.b, 'bb.bbb', 42); // 42\n get(obj.b, ['bb', 'bbb'], 42); // 42\n\n get(null, 'a'); // undefined\n get(undefined, ['a']); // undefined\n\n get(null, 'a', 42); // 42\n get(undefined, ['a'], 42); // 42\n\n const obj = {a: {}};\n const sym = Symbol();\n obj.a[sym] = 4;\n get(obj.a, sym); // 4\n*/\n\nfunction get(obj, propsArg, defaultValue) {\n if (!obj) {\n return defaultValue;\n }\n var props, prop;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n while (props.length) {\n prop = props.shift();\n if (!obj) {\n return defaultValue;\n }\n obj = obj[prop];\n if (obj === undefined) {\n return defaultValue;\n }\n }\n return obj;\n}\n\nexport {objectSafeGet as default};\n","import _get from 'just-safe-get';\n\n\nconst _get_localized = function(ret, locales) {\n if (typeof(ret) === 'object' && ret !== null) {\n if (typeof (ret.names) === 'object' && typeof (locales) === 'object') {\n for (let i = 0 ; i < locales.length ; i++) {\n let locale = locales[i];\n\n if (ret.names[locale]) {\n return ret.names[locale];\n }\n }\n }\n\n if (ret.name) {\n return ret.name;\n }\n\n return '';\n }\n return ret;\n}\n\nexport const camelToUnderscore = function(key) {\n key = key.split('.').map((x) => {\n if (typeof (x) !== 'string' || typeof (x[0]) !== 'string') {\n return '';\n }\n x = x[0].toLowerCase() + x.slice(1); // to allow \"MostSpecificSubdivision\"\n x = x.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n return x;\n }).join('.');\n\n return key;\n}\n\nclass Record {\n data = {};\n default_locales = [];\n\n constructor(data, default_locales) {\n this.data = data || { is_empty: true };\n \n this.default_locales = ['en']; \n this.default_locales = this._process_locales(default_locales);\n }\n\n get(prop, default_value) {\n return this.get_with_locales(prop, null, default_value);\n }\n\n get_raw(prop) {\n prop = camelToUnderscore(prop);\n return _get(this.data, prop, null);\n }\n \n has_property(prop) {\n const ret = this._lookup_with_locales(prop, this.default_locales, null)\n return ret !== null;\n }\n\n _lookup_with_locales(prop, locales, default_value = '') {\n locales = this._process_locales(locales);\n\n // Treat pseudo-property 'name' as if it never existed\n if (prop.substr(-5) === '.name') {\n prop = prop.substr(0, prop.length - 5);\n }\n\n let ret = this.get_raw(prop);\n \n // Localize property, if possible\n ret = _get_localized(ret, locales);\n \n if (ret === null || ret === '') {\n ret = default_value;\n }\n\n return ret;\n }\n \n _process_locales(locales) {\n if (typeof(locales) === 'string') {\n locales = [ locales ];\n }\n if (!Array.isArray(locales) || locales.length === 0) {\n locales = this.default_locales;\n }\n return locales;\n }\n\n get_with_locales(prop, locales, default_value) {\n const ret = this._lookup_with_locales(prop, locales, default_value);\n\n if (typeof(ret) === 'object') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is of type \"' + typeof (ret) + '\", should be string or similar', ret)\n }\n if (typeof(ret) === 'undefined') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is not defined, please check spelling or maybe you need a different data source', { data: this.data })\n return '';\n }\n\n return ret;\n }\n\n get_country_iso() {\n let country = this.get('country.iso_code');\n if(country) {\n country = country.substr(0, 2).toLowerCase();\n }\n return country;\n }\n\n /**\n * Check if there is information available for this IP\n * @returns boolean \n */\n is_empty() {\n return this.get('is_empty', false);\n }\n \n /**\n * Get error message, if any\n * @return string Error Message\n */\n error() {\n return this.get_raw('extra.error') || '';\n }\n\n /**\n * Get the raw data of this object\n * @returns object\n */\n serialize() {\n return this.data;\n }\n}\n\nexport default Record;","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","// @see https://gomakethings.com/promise-based-xhr/\n\nexport const makeRequest = function (url, method = 'GET') {\n\n // Create the XHR request\n var request = new XMLHttpRequest();\n\n // Return it as a Promise\n return new Promise(function (resolve, reject) {\n\n // Setup our listener to process compeleted requests\n request.onreadystatechange = function () {\n\n // Only run if the request is complete\n if (request.readyState !== 4) return;\n\n // Process the response\n if (request.status >= 200 && request.status < 300) {\n // If successful\n resolve(request);\n } else {\n // If failed\n reject({\n status: request.status,\n statusText: request.statusText,\n request: request\n });\n }\n\n };\n\n // Setup our HTTP request\n request.open(method || 'GET', url, true);\n\n // Send the request\n request.send();\n\n });\n};\n\nexport const jsonDecodeIfPossible = function(str) {\n try {\n return JSON.parse(str);\n } catch(e) {\n return createErrorObject('Invalid JSON: ' + str);\n }\n}\n\nfunction createErrorObject(errorMsg) {\n return {\n is_empty: true,\n extra: {\n error: errorMsg\n }\n };\n}\n\nexport const makeJSONRequest = async function(url, method = 'GET') {\n try {\n const request = await makeRequest(url, method);\n if (!request.responseText || request.responseText === '0') {\n return createErrorObject('Got an empty response from server. Did you enable AJAX in the options?');\n }\n return jsonDecodeIfPossible(request.responseText);\n } catch(e) {\n return jsonDecodeIfPossible(e.request.responseText);\n }\n}\n","export const setLocalStorage = function (variable, value, ttl_sec) {\n var data = {value: value, expires_at: new Date().getTime() + (ttl_sec * 1000) / 1 };\n localStorage.setItem(variable.toString(), JSON.stringify(data));\n};\n\nexport function removeLocalStorage(variable) {\n localStorage.removeItem(variable);\n}\n\nexport const getLocalStorage = function (variable) {\n let data = null;\n try {\n data = JSON.parse(localStorage.getItem(variable.toString()));\n } catch(e) {\n return null;\n }\n if (data !== null) {\n if (data.expires_at !== null && data.expires_at < new Date().getTime()) {\n localStorage.removeItem(variable.toString());\n } else {\n return data.value;\n }\n }\n return null;\n}","import { getLocalStorage, setLocalStorage } from '../lib/localStorageAccess';\nimport { options as globalOptions } from './get_info';\nimport Record from '../models/record';\n\n// Sync function in case it is known that no AJAX will occur\nexport function getRecordDataFromLocalStorage() {\n return getLocalStorage(globalOptions.cookie_name);\n}\n\nexport function setRecordDataToLocalStorage(data, cache_duration) {\n setLocalStorage(globalOptions.cookie_name, data, cache_duration);\n}\n\nlet lastEvaluated = {};\nexport function getRecordDataLastEvaluated() {\n return lastEvaluated;\n}\nexport function setRecordDataLastEvaluated() {\n lastEvaluated = getRecordDataFromLocalStorage();\n}\n\n\nexport function get_info_stored_locally_record() {\n return new Record(getRecordDataFromLocalStorage(), globalOptions.default_locales);\n}\n","import Record from '../models/record';\n\nimport { makeJSONRequest } from '../lib/xhr';\nimport { getRecordDataFromLocalStorage, setRecordDataToLocalStorage } from \"./storage\";\n\n\nexport const options = window.geoip_detect?.options || {\n ajaxurl: \"/wp-admin/admin-ajax.php\",\n default_locales: ['en'],\n cookie_duration_in_days: 7,\n cookie_name: 'geoip-detect-result',\n do_body_classes: false\n};\n\nlet ajaxPromise = null;\n\nfunction get_info_raw() {\n if (!ajaxPromise) {\n // Do Ajax Request only once per page load\n const url = options.ajaxurl + '?action=geoip_detect2_get_info_from_current_ip'\n\n ajaxPromise = makeJSONRequest(url);\n \n ajaxPromise.then((response) => {\n if (response?.extra?.error) {\n console.error('Geolocation IP Detection Error: Server returned an error: ' + response.extra.error);\n }\n })\n }\n\n return ajaxPromise;\n}\n\nasync function get_info_cached() {\n let response = false;\n let storedResponse = false;\n\n // 1) Load Info from localstorage cookie cache, if possible\n if (options.cookie_name) {\n storedResponse = getRecordDataFromLocalStorage()\n if (storedResponse && storedResponse.extra) {\n if (storedResponse.extra.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n } else {\n console.info('Geolocation IP Detection: Using cached response');\n }\n return storedResponse;\n }\n }\n\n // 2) Get response\n try {\n response = await get_info_raw();\n } catch (err) {\n console.log('Weird: Uncaught error...', err);\n response = err.responseJSON || err;\n }\n\n // 3) Save info to localstorage cookie cache\n if (options.cookie_name) {\n\n // Check if Override has been set now\n storedResponse = getRecordDataFromLocalStorage()\n if (storedResponse?.extra?.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n return storedResponse;\n }\n\n let cache_duration = options.cookie_duration_in_days * 24 * 60 * 60;\n if (response?.extra?.error)\n cache_duration = 60; // Cache errors only for 1 minute, then try again\n \n setRecordDataToLocalStorage(response, cache_duration);\n }\n\n return response;\n}\n\n\n/**\n * Load the data from the server\n * \n * (It can also be loaded from the browser localstorage, if the record data is present there already.)\n * \n * @api\n * @return Promise(Record)\n */\nexport async function get_info() {\n let response = await get_info_cached();\n\n if (typeof (response) !== 'object') {\n console.error('Geolocation IP Detection Error: Record should be an object, not a ' + typeof (response), response);\n response = { 'extra': { 'error': response || 'Network error, look at the original server response ...' } };\n }\n\n const record = new Record(response, options.default_locales);\n return record;\n}\n","var objectSafeSet = set;\n\n/*\n var obj1 = {};\n set(obj1, 'a.aa.aaa', 4); // true\n obj1; // {a: {aa: {aaa: 4}}}\n\n var obj2 = {};\n set(obj2, ['a', 'aa', 'aaa'], 4); // true\n obj2; // {a: {aa: {aaa: 4}}}\n\n var obj3 = {a: {aa: {aaa: 2}}};\n set(obj3, 'a.aa.aaa', 3); // true\n obj3; // {a: {aa: {aaa: 3}}}\n\n // don't clobber existing\n var obj4 = {a: {aa: {aaa: 2}}};\n set(obj4, 'a.aa', {bbb: 7}); // false\n\n const obj5 = {a: {}};\n const sym = Symbol();\n set(obj5.a, sym, 7); // true\n obj5; // {a: {Symbol(): 7}}\n*/\n\nfunction set(obj, propsArg, value) {\n var props, lastProp;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n lastProp = props.pop();\n if (!lastProp) {\n return false;\n }\n prototypeCheck(lastProp);\n var thisProp;\n while ((thisProp = props.shift())) {\n prototypeCheck(thisProp);\n if (typeof obj[thisProp] == 'undefined') {\n obj[thisProp] = {};\n }\n obj = obj[thisProp];\n if (!obj || typeof obj != 'object') {\n return false;\n }\n }\n obj[lastProp] = value;\n return true;\n}\n\nfunction prototypeCheck(prop) {\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') {\n throw new Error('setting of prototype values not supported');\n }\n}\n\nexport {objectSafeSet as default};\n","var collectionCompare = compare;\n\n/*\n primitives: value1 === value2\n functions: value1.toString == value2.toString\n arrays: if length, sequence and values of properties are identical\n objects: if length, names and values of properties are identical\n compare([[1, [2, 3]], [[1, [2, 3]]); // true\n compare([[1, [2, 3], 4], [[1, [2, 3]]); // false\n compare({a: 2, b: 3}, {a: 2, b: 3}); // true\n compare({a: 2, b: 3}, {b: 3, a: 2}); // true\n compare({a: 2, b: 3, c: 4}, {a: 2, b: 3}); // false\n compare({a: 2, b: 3}, {a: 2, b: 3, c: 4}); // false\n compare([[1, [2, {a: 4}], 4], [[1, [2, {a: 4}]]); // true\n*/\n\nfunction compare(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n /* eslint-disable no-self-compare */\n // if both values are NaNs return true\n if (value1 !== value1 && value2 !== value2) {\n return true;\n }\n if ({}.toString.call(value1) != {}.toString.call(value2)) {\n return false;\n }\n if (value1 !== Object(value1)) {\n // non equal primitives\n return false;\n }\n if (!value1) {\n return false;\n }\n if (Array.isArray(value1)) {\n return compareArrays(value1, value2);\n }\n if ({}.toString.call(value1) == '[object Set]') {\n return compareArrays(Array.from(value1), Array.from(value2));\n }\n if ({}.toString.call(value1) == '[object Object]') {\n return compareObjects(value1, value2);\n } else {\n return compareNativeSubtypes(value1, value2);\n }\n}\n\nfunction compareNativeSubtypes(value1, value2) {\n // e.g. Function, RegExp, Date\n return value1.toString() === value2.toString();\n}\n\nfunction compareArrays(value1, value2) {\n var len = value1.length;\n if (len != value2.length) {\n return false;\n }\n var alike = true;\n for (var i = 0; i < len; i++) {\n if (!compare(value1[i], value2[i])) {\n alike = false;\n break;\n }\n }\n return alike;\n}\n\nfunction compareObjects(value1, value2) {\n var keys1 = Object.keys(value1).sort();\n var keys2 = Object.keys(value2).sort();\n var len = keys1.length;\n if (len != keys2.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key1 = keys1[i];\n var key2 = keys2[i];\n if (!(key1 == key2 && compare(value1[key1], value2[key2]))) {\n return false;\n }\n }\n return true;\n}\n\nexport {collectionCompare as default};\n","export function isUnitTesting() {\n return process.env.JEST_WORKER_ID !== undefined;\n}\n\nexport const domReady = new Promise(resolve => {\n if (isUnitTesting()) {\n resolve();\n }\n\n if (document.readyState === \"loading\") {\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', resolve);\n } else {\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState != 'loading') {\n resolve();\n }\n });\n }\n } else {\n resolve();\n }\n});\n\nexport function selectItemByValue(el, value) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].value === value) {\n el.selectedIndex = i;\n return true;\n }\n }\n return false;\n}\n\n/**\n * @param {*} el Select Tag\n * @param {string} attributeName HTML attribute name to search by\n * @param {string} attributeValue HTML attribute value to search by\n * @returns boolean TRUE if Value found in select tag\n */\nexport function selectItemByAttribute(el, attributeName, attributeValue) {\n for (let i = 0; i < el.options.length; i++) {\n if (el.options[i].getAttribute(attributeName) === attributeValue) {\n el.selectedIndex = i;\n return true;\n }\n }\n return false;\n}","import { get_info } from \"../lookup/get_info\";\n\n// Get Options from data-options and json parse them\nexport function get_options(el) {\n const raw = el.getAttribute('data-options');\n try {\n return JSON.parse(raw);\n } catch (e) {\n return {};\n }\n}\n\nexport async function action_on_elements(className, errorMessage, callback) {\n const elements = document.getElementsByClassName(className);\n if (!elements.length) return;\n\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (' + errorMessage + '): ' + record.error());\n return;\n }\n\n Array.from(elements)\n .forEach(el => callback(el, record));\n}\n\nexport function get_value_from_record(el, record, property = null) {\n const opt = get_options(el);\n property = property || opt.property;\n if (opt.skip_cache) {\n console.warn(\"Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME.\");\n }\n\n return record.get_with_locales(property, opt.lang, opt.default);\n}","\nlet _internalEvent = false;\nexport function isInternalEvent() {\n return _internalEvent;\n}\n\nexport function triggerNativeEvent(el, eventName, options = null) {\n _internalEvent = true;\n\n let event;\n if (window.CustomEvent && typeof window.CustomEvent === 'function') {\n event = new CustomEvent(eventName, {detail : options});\n } else {\n // Compat for IE\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(eventName, true, true, options);\n }\n el.dispatchEvent(event);\n\n _internalEvent = false;\n}","\nlet _listener_active = false; // for recursion detection (maybe remove later)\nlet _change_counter = 0; \n\nexport function check_recursive_before() {\n _change_counter++;\n if (_listener_active || _change_counter > 10) {\n console.warn('Error: Thats weird! autosave change detected a recursion (' + _change_counter + ')! Please file a bug report about this and include the first 10 lines of the callstack below:');\n console.trace();\n if (process.env.NODE_ENV !== 'production') {\n debugger;\n }\n return false;\n }\n _listener_active = true;\n return true;\n}\n\n\nexport function check_recursive_after() {\n _listener_active = false;\n}","\nimport { check_recursive_after, check_recursive_before } from \"../lib/check-recursive\";\nimport { isInternalEvent } from \"../lib/events\";\nimport { set_override_with_merge } from \"../lookup/override\";\nimport { get_options } from \"./helpers\";\n\nexport function init() {\n document.addEventListener('change', event_listener_autosave_on_change, false);\n}\n\nfunction event_listener_autosave_on_change(event) {\n if (isInternalEvent()) {\n return;\n }\n\n const target = event.target;\n if (target?.matches && target.matches('.js-geoip-detect-input-autosave')) {\n if (process.env.NODE_ENV !== 'production') {\n console.log('autosave on change', target);\n }\n\n autosave_element(target);\n }\n}\n\n/**\n * When calling this method, be very careful not to introduce an infinite loop!\n * @param {*} el \n */\nexport function autosave_element(el) {\n const property = get_options(el).property;\n const value = el.value;\n\n if (!check_recursive_before()) {\n return;\n }\n\n if (el.matches('select.js-geoip-detect-country-select')) {\n const selected = el.options[el.selectedIndex];\n const isoCode = selected?.getAttribute('data-c');\n\n set_override_with_merge('country.iso_code', isoCode.toUpperCase(), { reevaluate: false });\n }\n\n set_override_with_merge(property, value, { reevaluate: true }); // might call do_shortcodes etc.\n\n check_recursive_after();\n}","import { triggerNativeEvent } from \"../lib/events\";\nimport { selectItemByAttribute } from \"../lib/html\";\nimport { get_value_from_record, get_options } from \"./helpers\";\nimport { autosave_element } from \"./onchange\";\n\nexport function do_shortcode_normal(el, record) {\n el.innerText = get_value_from_record(el, record);\n}\n\nexport function do_shortcode_flags(el, record) {\n const country = record.get_country_iso() || get_options(el).default;\n if (country) {\n el.classList.add('flag-icon-' + country)\n }\n}\n\n\nexport function do_shortcode_country_select(el, record) {\n let country = record.get_country_iso();\n\n if (selectItemByAttribute(el, 'data-c', country)) {\n triggerNativeEvent(el, 'change');\n return;\n }\n\n // The country is not the list of countries - select empty option instead\n if (selectItemByAttribute(el, 'data-c', '')) {\n triggerNativeEvent(el, 'change');\n } \n}\n\nexport function do_shortcode_text_input(el, record) {\n el.value = get_value_from_record(el, record);\n triggerNativeEvent(el, 'change');\n}","var arrayIntersect = intersect;\n\n/*\n intersect([1, 2, 5, 6], [2, 3, 5, 6]); // [2, 5, 6]\n intersect([1, 2, 2, 4, 5], [3, 2, 2, 5, 7]); // [2, 5]\n*/\n\nfunction intersect(arr1, arr2) {\n if (!Array.isArray(arr1) || !Array.isArray(arr2)) {\n throw new Error('expected both arguments to be arrays');\n }\n var result = [];\n var len = arr1.length;\n for (var i = 0; i < len; i++) {\n var elem = arr1[i];\n if (arr2.indexOf(elem) > -1 && result.indexOf(elem) == -1) {\n result.push(elem);\n }\n }\n return result;\n}\n\nexport {arrayIntersect as default};\n","import { get_options } from './helpers';\nimport _intersect from 'just-intersect';\n\n\nexport function do_shortcode_show_if(el, record) {\n const opt = get_options(el);\n const evaluated = geoip_detect2_shortcode_evaluate_conditions(opt.parsed, opt, record);\n\n if (!evaluated) {\n el.style.display = \"none\";\n el.classList.add('geoip-hidden');\n el.classList.remove('geoip-shown');\n } else {\n el.style.display = '';\n el.classList.remove('geoip-hidden');\n el.classList.add('geoip-shown');\n }\n}\n\nexport function geoip_detect2_shortcode_evaluate_conditions(parsed, opt, record) {\n const alternativePropertyNames = [\n 'name',\n 'iso_code',\n 'iso_code3',\n 'code',\n 'geoname_id',\n ];\n\n let isConditionMatching = (parsed.op === 'or') ? false : true;\n\n parsed.conditions.forEach(c => {\n let subConditionMatching = false;\n let values = [];\n\n const raw_value = record.get_raw(c.p);\n\n if (raw_value === null) {\n subConditionMatching = false;\n } else {\n if (typeof (raw_value) === 'object') {\n alternativePropertyNames.forEach(name => {\n if (raw_value[name]) {\n values.push(raw_value[name]);\n } else if (name == 'name') {\n values.push(record.get_with_locales(c.p, opt.lang));\n }\n })\n } else {\n values = [raw_value]\n }\n }\n\n subConditionMatching = geoip_detect2_shortcode_check_subcondition(c.v, values);\n\n if (c.not) {\n subConditionMatching = !subConditionMatching;\n }\n\n if (parsed.op === 'or') {\n isConditionMatching = isConditionMatching || subConditionMatching;\n } else {\n isConditionMatching = isConditionMatching && subConditionMatching;\n }\n\n });\n\n if (parsed.not) {\n isConditionMatching = !isConditionMatching;\n }\n\n return isConditionMatching;\n}\n\nfunction geoip_detect2_shortcode_check_subcondition(expectedValues, actualValues) {\n if (actualValues[0] === true) {\n actualValues = ['true', 'yes', 'y', '1'];\n } else if (actualValues[0] === false) {\n actualValues = ['false', 'no', 'n', '0', ''];\n }\n\n actualValues = actualValues.map(x => String(x).toLowerCase())\n\n expectedValues = expectedValues.split(',');\n if (expectedValues.indexOf('') !== -1) {\n if (actualValues.length === 0) {\n return true;\n }\n }\n\n const intersect = _intersect(expectedValues, actualValues);\n\n return intersect.length > 0;\n}","import { domReady } from \"../lib/html\";\nimport { action_on_elements } from \"./helpers\";\nimport { do_shortcode_country_select, do_shortcode_flags, do_shortcode_normal, do_shortcode_text_input } from \"./normal\";\nimport { init as onchangeInit } from \"./onchange\";\nimport { do_shortcode_show_if } from \"./show-if\";\n\n\nexport const do_shortcodes_init = function () {\n onchangeInit();\n}\n\nexport const do_shortcodes = async function do_shortcodes() {\n // Before doing any of these, the DOM tree needs to be loaded\n await domReady;\n\n // These are called in parallel, as they are async functions\n action_on_elements('js-geoip-detect-shortcode',\n 'could not execute shortcode(s) [geoip_detect2 ...]', do_shortcode_normal);\n\n action_on_elements('js-geoip-detect-flag',\n 'could not configure the flag(s)', do_shortcode_flags);\n\n action_on_elements('js-geoip-text-input',\n 'could not set the value of the text input field(s)', do_shortcode_text_input);\n\n action_on_elements('js-geoip-detect-country-select',\n 'could not set the value of the select field(s)', do_shortcode_country_select);\n\n action_on_elements('js-geoip-detect-show-if',\n 'could not execute the show-if/hide-if conditions', do_shortcode_show_if);\n};\n","import { domReady } from './lib/html';\nimport { get_info } from './lookup/get_info';\n\nexport function calc_classes(record) {\n return {\n country: record.get('country.iso_code'),\n 'country-is-in-european-union': record.get('country.is_in_european_union', false),\n continent: record.get('continent.code'),\n province: record.get('most_specific_subdivision.iso_code'),\n };\n}\n\nfunction remove_css_classes_by_prefix(el, prefix) {\n const classes = el.className.split(\" \").filter(c => !c.startsWith(prefix));\n el.className = classes.join(\" \").trim();\n}\n\nexport async function add_body_classes() {\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (could not add CSS-classes to body): ' + record.error());\n return;\n }\n\n await domReady;\n\n add_classes_to_body(record);\n}\n\nexport function add_classes_to_body(record) {\n const css_classes = calc_classes(record);\n\n const body = document.getElementsByTagName('body')[0];\n \n // Remove old classes in case there are any\n remove_css_classes_by_prefix(body, 'geoip-');\n \n for (let key of Object.keys(css_classes)) {\n const value = css_classes[key];\n if (value) {\n if (typeof (value) == 'string') {\n body.classList.add(`geoip-${key}-${value}`);\n } else {\n body.classList.add(`geoip-${key}`);\n }\n }\n }\n}","import { do_shortcodes, do_shortcodes_init } from './shortcodes/index';\nimport { add_body_classes } from './body_classes';\nimport { options } from './lookup/get_info';\nimport { setRecordDataLastEvaluated } from \"./lookup/storage\";\n\nlet firstCall = true;\n\nexport function main() {\n if (process.env.NODE_ENV !== 'production') {\n console.log('Do Main');\n }\n\n if (firstCall) {\n do_shortcodes_init();\n firstCall = false; \n }\n\n if (options.do_body_classes) {\n add_body_classes();\n }\n\n // Do all the shortcodes that are in the HTML. Even if shortcodes is not enabled globally, they might be enabled for a specific shortcode.\n do_shortcodes();\n\n setRecordDataLastEvaluated();\n}","import { setLocalStorage } from '../lib/localStorageAccess';\nimport { options as globalOptions } from './get_info';\nimport { camelToUnderscore } from '../models/record';\nimport _set from 'just-safe-set';\nimport _get from 'just-safe-get';\nimport _is_object_content_equal from 'just-compare';\nimport { main } from '../main';\nimport { getRecordDataFromLocalStorage, getRecordDataLastEvaluated } from './storage';\n\nfunction processOptions(options) {\n options = options || {};\n if (typeof(options) == 'number') {\n options = {\n 'duration_in_days': options\n };\n }\n\n options.duration_in_days = options.duration_in_days || globalOptions.cookie_duration_in_days;\n if (options.duration_in_days < 0) {\n console.warn('Geolocation IP Detection set_override_data() did nothing: A negative duration doesn\\'t make sense. If you want to remove the override, use remove_override() instead.');\n return false;\n }\n\n if (typeof (options.reevaluate) == 'undefined' ) {\n options.reevaluate = true;\n }\n\n return options;\n}\n\nfunction changeRecord(record, property, value) {\n record = record || {};\n property = property || '';\n\n property = camelToUnderscore(property);\n\n const oldData = _get(record, property);\n if (typeof (oldData) == 'object' && typeof (oldData.names) == 'object') {\n property += '.name';\n }\n if (property.endsWith('.name')) {\n property += 's'; // e.g. country.name -> country.names\n value = { 'en': value };\n }\n\n _set(record, property, value);\n\n return record;\n}\n\n/**\n * Override only one property, leave the other properties as-is.\n * @param {string} property \n * @param {*} value \n */\nexport function set_override_with_merge(property, value, options) {\n let record = getRecordDataFromLocalStorage();\n\n record = changeRecord(record, property, value);\n\n set_override(record, options);\n\n if (process.env.NODE_ENV !== 'production') {\n console.log(\"Override is now: \", getRecordDataFromLocalStorage());\n }\n}\n\n/**\n * This functions allows to override the geodetected data manually (e.g. a country selector)\n * \n * @api\n * @param {*} record \n * @param {object} options\n * @param {number} duration_in_days When this override expires (default: 1 week later)\n * @param {boolean} reevaluate If the shortcodes etc. should be re-evaluated (default: true)\n * @return boolean TRUE if override data changed\n */\nexport function set_override(record, options) {\n options = processOptions(options);\n\n if (record && typeof (record.serialize) === 'function') {\n record = record.serialize();\n }\n\n return set_override_data(record, options);\n}\n\nfunction set_override_data(newData, options) {\n newData = newData || {};\n _set(newData, 'extra.override', true);\n\n setLocalStorage(globalOptions.cookie_name, newData, options.duration_in_days * 24 * 60 * 60);\n\n if (options.reevaluate && !_is_object_content_equal(newData, getRecordDataLastEvaluated())) {\n main();\n return true;\n }\n\n return false;\n}\n\n/**\n * Remove the override data.\n * On next page load, the record data will be loaded from the server again.\n * \n * @return boolean\n */\nexport function remove_override(options) {\n options = processOptions(options);\n setLocalStorage(globalOptions.cookie_name, {}, -1);\n if (options.reevaluate) {\n main();\n }\n return true;\n}\n\n\n","import { get_info } from './lookup/get_info';\nimport { remove_override, set_override } from './lookup/override';\nimport { main } from './main';\n\n// Evaluate shortcodes, body classes, etc.\nmain();\n\n\n// Extend window object \nwindow.geoip_detect.get_info = get_info;\n\nwindow.geoip_detect.set_override = set_override;\nwindow.geoip_detect.remove_override = remove_override;"],"names":["$477fda7effc3c7c2$var$asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","fn","self","this","args","arguments","apply","err","undefined","$cfcc435dea54e8da$var$_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","obj","constructor","Symbol","$d9ff7fa7a3f30499$var$runtime","exports","Op","prototype","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","err1","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","GenStateSuspendedYield","makeInvokeMethod","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","result","value1","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","next1","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","object","key1","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","$d9ff7fa7a3f30499$exports","regeneratorRuntime","accidentalStrictMode","globalThis","Function","$4a4beb35e1398598$export$2e2bcd8739ae039","propsArg","defaultValue","prop","Array","isArray","split","shift","$a4c6bf567c1b63c8$export$13bc6c4afe8cd6ab","map","x","toLowerCase","replace","join","$a4c6bf567c1b63c8$export$2e2bcd8739ae039","$a4c6bf567c1b63c8$var$Record","data","default_locales","instance","Constructor","is_empty","_process_locales","protoProps","staticProps","default_value","get_with_locales","_lookup_with_locales","locales","param","substr","ret","get_raw","names","locale","$a4c6bf567c1b63c8$var$_get_localized","console","warn","$ad2ecac41bdb2824$export$2e2bcd8739ae039","country","get","$5115e01e50a35b95$export$699251e5611cc6db","url","request","XMLHttpRequest","onreadystatechange","readyState","status","statusText","open","send","$5115e01e50a35b95$export$8fe2eaa78e58529f","str","JSON","parse","e","$5115e01e50a35b95$var$createErrorObject","errorMsg","extra","$5115e01e50a35b95$export$49434baf33460b11","_callee","_ctx","responseText","t0","$9a0f598d59a61a3e$export$1f73f60bdb811cb1","variable","ttl_sec","expires_at","Date","getTime","localStorage","setItem","toString","stringify","$f422a70a3b9c8a83$export$c0c5a36406ccde34","getItem","removeItem","$9a0f598d59a61a3e$export$d3720feff416e85b","$b4ba9c8e7a201193$export$41c562ebe57d11e2","cookie_name","$f422a70a3b9c8a83$export$bfae0a1e3adc82ee","cache_duration","ref1","$f422a70a3b9c8a83$var$lastEvaluated","window","geoip_detect","options","ajaxurl","cookie_duration_in_days","do_body_classes","$b4ba9c8e7a201193$var$ajaxPromise","$b4ba9c8e7a201193$var$get_info_raw","response","ref","_get_info_cached","$477fda7effc3c7c2$export$2e2bcd8739ae039","$parcel$interopDefault","storedResponse","ref2","override","log","responseJSON","$b4ba9c8e7a201193$var$get_info_cached","_get_info","$b4ba9c8e7a201193$export$3697bcf53517e83c","$6451de512ae99d8a$export$2e2bcd8739ae039","lastProp","thisProp","$6451de512ae99d8a$var$prototypeCheck","$d73968d8a0a066f2$export$2e2bcd8739ae039","$d73968d8a0a066f2$var$compare","value2","$d73968d8a0a066f2$var$compareArrays","from","keys1","sort","keys2","len","key2","$d73968d8a0a066f2$var$compareObjects","$d73968d8a0a066f2$var$compareNativeSubtypes","alike","$b4d1c184cabe171a$export$d680cb6eec13a7c7","document","addEventListener","attachEvent","$b4d1c184cabe171a$export$212ec54c5d687e78","el","attributeName","attributeValue","getAttribute","selectedIndex","$e41b329f42db23c8$export$aafcad1af8162002","raw","_action_on_elements","className","errorMessage","callback","elements","getElementsByClassName","$e41b329f42db23c8$export$bb8a045c548d38f9","$e41b329f42db23c8$export$2bcc52ba6c088b4a","property","opt","skip_cache","lang","default","$3f68aa62fc033904$var$_internalEvent","$3f68aa62fc033904$export$f0ffca0e7194bd91","eventName","event","CustomEvent","detail","createEvent","initCustomEvent","dispatchEvent","$7944654ce2dd9d65$var$_listener_active","$7944654ce2dd9d65$var$_change_counter","$3bb001785c092908$var$event_listener_autosave_on_change","matches","trace","selected","$03d6c28e95082604$export$38a0b31e9febbbe1","toUpperCase","reevaluate","$3bb001785c092908$export$be51a27c79b931de","$ddb23fab3c6f4620$export$c5bfd938fb7f5403","innerText","$ddb23fab3c6f4620$export$67c46edf2422701b","get_country_iso","classList","add","$ddb23fab3c6f4620$export$8b2cf4a2576ea856","$ddb23fab3c6f4620$export$46eed00f10e80dd5","$599ea47da8784bdb$export$2e2bcd8739ae039","arr1","arr2","elem","indexOf","$34cfab0a14aff422$export$7f72d39cfa7a0f7a","parsed","alternativePropertyNames","isConditionMatching","op","conditions","c","subConditionMatching","raw_value","p","expectedValues","actualValues","String","$34cfab0a14aff422$var$geoip_detect2_shortcode_check_subcondition","v","not","$34cfab0a14aff422$export$626a13a1fe51c67a","style","display","remove","_do_shortcodes","$9cee2e12fa11ef69$export$7481777ea0ea965d","$9cee2e12fa11ef69$export$42610705290faf95","_add_body_classes","$73929a6ea3471960$export$4e7274a5cb77ccb6","prefix","classes","css_classes","continent","province","$73929a6ea3471960$export$fd37e2b9d7d82468","body","getElementsByTagName","filter","startsWith","trim","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","concat","return","$b016e4ccc3c135fb$var$firstCall","$b016e4ccc3c135fb$export$f22da7240b7add18","$73929a6ea3471960$export$69cfbde487906451","$03d6c28e95082604$var$processOptions","duration_in_days","$03d6c28e95082604$export$c3c74383dfd15775","oldData","endsWith","en","$03d6c28e95082604$var$changeRecord","serialize","newData","$f422a70a3b9c8a83$export$88983ef80f4f72ac","$03d6c28e95082604$var$set_override_data","get_info","set_override","remove_override"],"version":3,"file":"frontend.js.map"}
|
1 |
+
{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zG,EAAQkP,GAW7B,MAVwB,iBAAZ6F,GAAkD,iBAAlBA,EAAQ3N,QAChD8H,GAAY,SAEZA,EAAS8F,SAAS,WAClB9F,GAAY,IACZpS,EAAQ,CAAEmY,GAAMnY,IAGpBiQ,EAAK/M,EAAQkP,EAAUpS,GAEhBkD,C,CAWEkV,CAAalV,EAAQkP,EAAUpS,GAExCqY,GAAanV,EAAQ8L,E,CAiBlB,SAASqJ,GAAanV,EAAQ8L,GAOjC,OANAA,EAAU+I,GAAe/I,GAErB9L,GAAwC,mBAAtBA,EAAOoV,YACzBpV,EAASA,EAAOoV,aAMxB,SAA2BC,EAASvJ,GAMhC,GAJAiB,EADAsI,EAAUA,GAAW,GACP,kBAAkB,GAEhC9K,EAAgBc,EAAcC,YAAa+J,EAAS,MAAAvJ,EAAQgJ,kBAExDhJ,EAAQ4E,aAAevD,EAAyBkI,EAAS1J,KAEzD,OADAiJ,MACO,EAGX,OAAO,C,CAdAU,CAAkBtV,EAAQ8L,E,CC/ErC8I,KAIAhJ,OAAOC,aAAa0J,SAAW1I,EAE/BjB,OAAOC,aAAa2J,aAAeL,GACnCvJ,OAAOC,aAAa4J,wBAA0BjF,GAC9C5E,OAAOC,aAAa6J,gBD8Fb,SAAyB5J,GAM5B,OALAA,EAAU+I,GAAe/I,GACzBvB,EAAgBc,EAAcC,YAAa,IAAI,GAC3CQ,EAAQ4E,YACRkE,MAEG,C","sources":["node_modules/@swc/helpers/src/_async_to_generator.mjs","node_modules/@swc/helpers/src/_type_of.mjs","node_modules/regenerator-runtime/runtime.js","node_modules/@swc/helpers/src/_class_call_check.mjs","node_modules/@swc/helpers/src/_create_class.mjs","node_modules/@swc/helpers/src/_define_property.mjs","node_modules/just-safe-get/index.mjs","js/models/record.js","js/lib/xhr.js","js/lib/localStorageAccess.js","js/lookup/storage.js","js/lookup/get_info.js","node_modules/just-safe-set/index.mjs","node_modules/just-compare/index.mjs","js/lib/html.js","js/shortcodes/helpers.js","js/lib/events.js","js/lib/check-recursive.js","js/shortcodes/onchange.js","js/shortcodes/normal.js","node_modules/just-intersect/index.mjs","js/shortcodes/show-if.js","js/shortcodes/index.js","js/body_classes.js","js/main.js","js/lookup/override.js","js/frontend.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n","export default function _typeof(obj) {\n \"@swc/helpers - typeof\";\n return obj && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n","var objectSafeGet = get;\n\n/*\n const obj = {a: {aa: {aaa: 2}}, b: 4};\n\n get(obj, 'a.aa.aaa'); // 2\n get(obj, ['a', 'aa', 'aaa']); // 2\n\n get(obj, 'b.bb.bbb'); // undefined\n get(obj, ['b', 'bb', 'bbb']); // undefined\n\n get(obj.a, 'aa.aaa'); // 2\n get(obj.a, ['aa', 'aaa']); // 2\n\n get(obj.b, 'bb.bbb'); // undefined\n get(obj.b, ['bb', 'bbb']); // undefined\n\n get(obj.b, 'bb.bbb', 42); // 42\n get(obj.b, ['bb', 'bbb'], 42); // 42\n\n get(null, 'a'); // undefined\n get(undefined, ['a']); // undefined\n\n get(null, 'a', 42); // 42\n get(undefined, ['a'], 42); // 42\n\n const obj = {a: {}};\n const sym = Symbol();\n obj.a[sym] = 4;\n get(obj.a, sym); // 4\n*/\n\nfunction get(obj, propsArg, defaultValue) {\n if (!obj) {\n return defaultValue;\n }\n var props, prop;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n while (props.length) {\n prop = props.shift();\n if (!obj) {\n return defaultValue;\n }\n obj = obj[prop];\n if (obj === undefined) {\n return defaultValue;\n }\n }\n return obj;\n}\n\nexport {objectSafeGet as default};\n","import _get from 'just-safe-get';\n\n\nconst _get_localized = function(ret, locales) {\n if (typeof(ret) === 'object' && ret !== null) {\n if (typeof (ret.names) === 'object' && typeof (locales) === 'object') {\n for (let i = 0 ; i < locales.length ; i++) {\n let locale = locales[i];\n\n if (ret.names[locale]) {\n return ret.names[locale];\n }\n }\n }\n\n if (ret.name) {\n return ret.name;\n }\n\n return '';\n }\n return ret;\n}\n\nexport const camelToUnderscore = function(key) {\n key = key.split('.').map((x) => {\n if (typeof (x) !== 'string' || typeof (x[0]) !== 'string') {\n return '';\n }\n x = x[0].toLowerCase() + x.slice(1); // to allow \"MostSpecificSubdivision\"\n x = x.replace(/([A-Z])/g, \"_$1\").toLowerCase();\n return x;\n }).join('.');\n\n return key;\n}\n\nclass Record {\n data = {};\n default_locales = [];\n\n constructor(data, default_locales) {\n this.data = data || { is_empty: true };\n \n this.default_locales = ['en']; \n this.default_locales = this._process_locales(default_locales);\n }\n\n get(prop, default_value) {\n return this.get_with_locales(prop, null, default_value);\n }\n\n get_raw(prop) {\n prop = camelToUnderscore(prop);\n return _get(this.data, prop, null);\n }\n \n has_property(prop) {\n const ret = this._lookup_with_locales(prop, this.default_locales, null)\n return ret !== null;\n }\n\n _lookup_with_locales(prop, locales, default_value = '') {\n locales = this._process_locales(locales);\n\n // Treat pseudo-property 'name' as if it never existed\n if (prop.substr(-5) === '.name') {\n prop = prop.substr(0, prop.length - 5);\n }\n\n let ret = this.get_raw(prop);\n \n // Localize property, if possible\n ret = _get_localized(ret, locales);\n \n if (ret === null || ret === '') {\n ret = default_value;\n }\n\n return ret;\n }\n \n _process_locales(locales) {\n if (typeof(locales) === 'string') {\n locales = [ locales ];\n }\n if (!Array.isArray(locales) || locales.length === 0) {\n locales = this.default_locales;\n }\n return locales;\n }\n\n get_with_locales(prop, locales, default_value) {\n const ret = this._lookup_with_locales(prop, locales, default_value);\n\n if (typeof(ret) === 'object') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is of type \"' + typeof (ret) + '\", should be string or similar', ret)\n }\n if (typeof(ret) === 'undefined') {\n console.warn('Geolocation IP Detection: The property \"' + prop + '\" is not defined, please check spelling or maybe you need a different data source', { data: this.data })\n return '';\n }\n\n return ret;\n }\n\n get_country_iso() {\n let country = this.get('country.iso_code');\n if(country) {\n country = country.substr(0, 2).toLowerCase();\n }\n return country;\n }\n\n /**\n * Check if there is information available for this IP\n * @returns boolean \n */\n is_empty() {\n return this.get('is_empty', false);\n }\n \n /**\n * Get error message, if any\n * @return string Error Message\n */\n error() {\n return this.get_raw('extra.error') || '';\n }\n\n /**\n * Get the raw data of this object\n * @returns object\n */\n serialize() {\n return this.data;\n }\n}\n\nexport default Record;","// @see https://gomakethings.com/promise-based-xhr/\n\nexport const makeRequest = function (url, method = 'GET') {\n\n // Create the XHR request\n var request = new XMLHttpRequest();\n\n // Return it as a Promise\n return new Promise(function (resolve, reject) {\n\n // Setup our listener to process compeleted requests\n request.onreadystatechange = function () {\n\n // Only run if the request is complete\n if (request.readyState !== 4) return;\n\n // Process the response\n if (request.status >= 200 && request.status < 300) {\n // If successful\n resolve(request);\n } else {\n // If failed\n reject({\n status: request.status,\n statusText: request.statusText,\n request: request\n });\n }\n\n };\n\n // Setup our HTTP request\n request.open(method || 'GET', url, true);\n\n // Send the request\n request.send();\n\n });\n};\n\nexport const jsonDecodeIfPossible = function(str) {\n try {\n return JSON.parse(str);\n } catch(e) {\n return createErrorObject('Invalid JSON: ' + str);\n }\n}\n\nfunction createErrorObject(errorMsg) {\n return {\n is_empty: true,\n extra: {\n error: errorMsg\n }\n };\n}\n\nexport const makeJSONRequest = async function(url, method = 'GET') {\n try {\n const request = await makeRequest(url, method);\n if (!request.responseText || request.responseText === '0') {\n return createErrorObject('Got an empty response from server. Did you enable AJAX in the options?');\n }\n return jsonDecodeIfPossible(request.responseText);\n } catch(e) {\n return jsonDecodeIfPossible(e.request.responseText);\n }\n}\n","export const setLocalStorage = function (variable, value, ttl_sec) {\n var data = {value: value, expires_at: new Date().getTime() + (ttl_sec * 1000) / 1 };\n localStorage.setItem(variable.toString(), JSON.stringify(data));\n};\n\nexport function removeLocalStorage(variable) {\n localStorage.removeItem(variable);\n}\n\nexport const getLocalStorage = function (variable) {\n let data = null;\n try {\n data = JSON.parse(localStorage.getItem(variable.toString()));\n } catch(e) {\n return null;\n }\n if (data !== null) {\n if (data.expires_at !== null && data.expires_at < new Date().getTime()) {\n localStorage.removeItem(variable.toString());\n } else {\n return data.value;\n }\n }\n return null;\n}","import { getLocalStorage, setLocalStorage } from '../lib/localStorageAccess';\nimport { options as globalOptions } from './get_info';\nimport Record from '../models/record';\n\n// Sync function in case it is known that no AJAX will occur\nexport function getRecordDataFromLocalStorage() {\n return getLocalStorage(globalOptions.cookie_name);\n}\n\nexport function setRecordDataToLocalStorage(data, cache_duration) {\n setLocalStorage(globalOptions.cookie_name, data, cache_duration);\n}\n\nlet lastEvaluated = {};\nexport function getRecordDataLastEvaluated() {\n return lastEvaluated;\n}\nexport function setRecordDataLastEvaluated() {\n lastEvaluated = getRecordDataFromLocalStorage();\n}\n\n\nexport function get_info_stored_locally_record() {\n return new Record(getRecordDataFromLocalStorage(), globalOptions.default_locales);\n}\n","import Record from '../models/record';\n\nimport { makeJSONRequest } from '../lib/xhr';\nimport { getRecordDataFromLocalStorage, setRecordDataToLocalStorage } from \"./storage\";\n\n\nexport const options = window.geoip_detect?.options || {\n ajaxurl: \"/wp-admin/admin-ajax.php\",\n default_locales: ['en'],\n cookie_duration_in_days: 7,\n cookie_name: 'geoip-detect-result',\n do_body_classes: false\n};\n\nlet ajaxPromise = null;\n\nfunction get_info_raw() {\n if (!ajaxPromise) {\n // Do Ajax Request only once per page load\n const url = options.ajaxurl + '?action=geoip_detect2_get_info_from_current_ip'\n\n ajaxPromise = makeJSONRequest(url);\n \n ajaxPromise.then((response) => {\n if (response?.extra?.error) {\n console.error('Geolocation IP Detection Error: Server returned an error: ' + response.extra.error);\n }\n })\n }\n\n return ajaxPromise;\n}\n\nasync function get_info_cached() {\n let response = false;\n let storedResponse = false;\n\n // 1) Load Info from localstorage cookie cache, if possible\n if (options.cookie_name) {\n storedResponse = getRecordDataFromLocalStorage()\n if (storedResponse && storedResponse.extra) {\n if (storedResponse.extra.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n } else {\n console.info('Geolocation IP Detection: Using cached response');\n }\n return storedResponse;\n }\n }\n\n // 2) Get response\n try {\n response = await get_info_raw();\n } catch (err) {\n console.log('Weird: Uncaught error...', err);\n response = err.responseJSON || err;\n }\n\n // 3) Save info to localstorage cookie cache\n if (options.cookie_name) {\n\n // Check if Override has been set now\n storedResponse = getRecordDataFromLocalStorage()\n if (storedResponse?.extra?.override === true) {\n console.info('Geolocation IP Detection: Using cached response (override)');\n return storedResponse;\n }\n\n let cache_duration = options.cookie_duration_in_days * 24 * 60 * 60;\n if (response?.extra?.error)\n cache_duration = 60; // Cache errors only for 1 minute, then try again\n \n setRecordDataToLocalStorage(response, cache_duration);\n }\n\n return response;\n}\n\n\n/**\n * Load the data from the server\n * \n * (It can also be loaded from the browser localstorage, if the record data is present there already.)\n * \n * @api\n * @return Promise(Record)\n */\nexport async function get_info() {\n let response = await get_info_cached();\n\n if (typeof (response) !== 'object') {\n console.error('Geolocation IP Detection Error: Record should be an object, not a ' + typeof (response), response);\n response = { 'extra': { 'error': response || 'Network error, look at the original server response ...' } };\n }\n\n const record = new Record(response, options.default_locales);\n return record;\n}\n","var objectSafeSet = set;\n\n/*\n var obj1 = {};\n set(obj1, 'a.aa.aaa', 4); // true\n obj1; // {a: {aa: {aaa: 4}}}\n\n var obj2 = {};\n set(obj2, ['a', 'aa', 'aaa'], 4); // true\n obj2; // {a: {aa: {aaa: 4}}}\n\n var obj3 = {a: {aa: {aaa: 2}}};\n set(obj3, 'a.aa.aaa', 3); // true\n obj3; // {a: {aa: {aaa: 3}}}\n\n // don't clobber existing\n var obj4 = {a: {aa: {aaa: 2}}};\n set(obj4, 'a.aa', {bbb: 7}); // false\n\n const obj5 = {a: {}};\n const sym = Symbol();\n set(obj5.a, sym, 7); // true\n obj5; // {a: {Symbol(): 7}}\n*/\n\nfunction set(obj, propsArg, value) {\n var props, lastProp;\n if (Array.isArray(propsArg)) {\n props = propsArg.slice(0);\n }\n if (typeof propsArg == 'string') {\n props = propsArg.split('.');\n }\n if (typeof propsArg == 'symbol') {\n props = [propsArg];\n }\n if (!Array.isArray(props)) {\n throw new Error('props arg must be an array, a string or a symbol');\n }\n lastProp = props.pop();\n if (!lastProp) {\n return false;\n }\n prototypeCheck(lastProp);\n var thisProp;\n while ((thisProp = props.shift())) {\n prototypeCheck(thisProp);\n if (typeof obj[thisProp] == 'undefined') {\n obj[thisProp] = {};\n }\n obj = obj[thisProp];\n if (!obj || typeof obj != 'object') {\n return false;\n }\n }\n obj[lastProp] = value;\n return true;\n}\n\nfunction prototypeCheck(prop) {\n // coercion is intentional to catch prop values like `['__proto__']`\n if (prop == '__proto__' || prop == 'constructor' || prop == 'prototype') {\n throw new Error('setting of prototype values not supported');\n }\n}\n\nexport {objectSafeSet as default};\n","var collectionCompare = compare;\n\n/*\n primitives: value1 === value2\n functions: value1.toString == value2.toString\n arrays: if length, sequence and values of properties are identical\n objects: if length, names and values of properties are identical\n compare([[1, [2, 3]], [[1, [2, 3]]); // true\n compare([[1, [2, 3], 4], [[1, [2, 3]]); // false\n compare({a: 2, b: 3}, {a: 2, b: 3}); // true\n compare({a: 2, b: 3}, {b: 3, a: 2}); // true\n compare({a: 2, b: 3, c: 4}, {a: 2, b: 3}); // false\n compare({a: 2, b: 3}, {a: 2, b: 3, c: 4}); // false\n compare([[1, [2, {a: 4}], 4], [[1, [2, {a: 4}]]); // true\n*/\n\nfunction compare(value1, value2) {\n if (value1 === value2) {\n return true;\n }\n\n /* eslint-disable no-self-compare */\n // if both values are NaNs return true\n if (value1 !== value1 && value2 !== value2) {\n return true;\n }\n\n if (\n typeof value1 != typeof value2 || // primitive != primitive wrapper\n {}.toString.call(value1) != {}.toString.call(value2) // check for other (maybe nullish) objects\n ) {\n return false;\n }\n\n if (value1 !== Object(value1)) {\n // non equal primitives\n return false;\n }\n\n if (!value1) {\n return false;\n }\n\n if (Array.isArray(value1)) {\n return compareArrays(value1, value2);\n }\n\n if ({}.toString.call(value1) == '[object Set]') {\n return compareArrays(Array.from(value1), Array.from(value2));\n }\n\n if ({}.toString.call(value1) == '[object Object]') {\n return compareObjects(value1, value2);\n }\n\n return compareNativeSubtypes(value1, value2);\n}\n\nfunction compareNativeSubtypes(value1, value2) {\n // e.g. Function, RegExp, Date\n return value1.toString() === value2.toString();\n}\n\nfunction compareArrays(value1, value2) {\n var len = value1.length;\n\n if (len != value2.length) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n if (!compare(value1[i], value2[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction compareObjects(value1, value2) {\n var keys1 = Object.keys(value1);\n var len = keys1.length;\n\n if (len != Object.keys(value2).length) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n var key1 = keys1[i];\n\n if (!(value2.hasOwnProperty(key1) && compare(value1[key1], value2[key1]))) {\n return false;\n }\n }\n\n return true;\n}\n\nexport {collectionCompare as default};\n","export function isUnitTesting() {\n return process.env.JEST_WORKER_ID !== undefined;\n}\n\nexport const domReady = new Promise(resolve => {\n if (isUnitTesting()) {\n resolve();\n }\n\n if (document.readyState === \"loading\") {\n if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', resolve);\n } else {\n document.attachEvent('onreadystatechange', function () {\n if (document.readyState != 'loading') {\n resolve();\n }\n });\n }\n } else {\n resolve();\n }\n});\n\nexport function selectItemByValue(el, value) {\n for (var i = 0; i < el.options.length; i++) {\n if (el.options[i].value === value) {\n el.selectedIndex = i;\n return true;\n }\n }\n return false;\n}\n\n/**\n * @param {*} el Select Tag\n * @param {string} attributeName HTML attribute name to search by\n * @param {string} attributeValue HTML attribute value to search by\n * @returns boolean TRUE if Value found in select tag\n */\nexport function selectItemByAttribute(el, attributeName, attributeValue) {\n for (let i = 0; i < el.options.length; i++) {\n if (el.options[i].getAttribute(attributeName) === attributeValue) {\n el.selectedIndex = i;\n return true;\n }\n }\n return false;\n}","import { get_info } from \"../lookup/get_info\";\n\n// Get Options from data-options and json parse them\nexport function get_options(el) {\n const raw = el.getAttribute('data-options');\n try {\n return JSON.parse(raw);\n } catch (e) {\n return {};\n }\n}\n\nexport async function action_on_elements(className, errorMessage, callback) {\n const elements = document.getElementsByClassName(className);\n if (!elements.length) return;\n\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (' + errorMessage + '): ' + record.error());\n return;\n }\n\n Array.from(elements)\n .forEach(el => callback(el, record));\n}\n\nexport function get_value_from_record(el, record, property = null) {\n const opt = get_options(el);\n property = property || opt.property;\n if (opt.skip_cache) {\n console.warn(\"Geolocation IP Detection: The property 'skip_cache' is ignored in AJAX mode. You could disable the response caching on the server by setting the constant GEOIP_DETECT_READER_CACHE_TIME.\");\n }\n\n return record.get_with_locales(property, opt.lang, opt.default);\n}","\nlet _internalEvent = false;\nexport function isInternalEvent() {\n return _internalEvent;\n}\n\nexport function triggerNativeEvent(el, eventName, options = null) {\n _internalEvent = true;\n\n let event;\n if (window.CustomEvent && typeof window.CustomEvent === 'function') {\n event = new CustomEvent(eventName, {detail : options});\n } else {\n // Compat for IE\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(eventName, true, true, options);\n }\n el.dispatchEvent(event);\n\n _internalEvent = false;\n}","\nlet _listener_active = false; // for recursion detection (maybe remove later)\nlet _change_counter = 0; \n\nexport function check_recursive_before() {\n _change_counter++;\n if (_listener_active || _change_counter > 10) {\n console.warn('Error: Thats weird! autosave change detected a recursion (' + _change_counter + ')! Please file a bug report about this and include the first 10 lines of the callstack below:');\n console.trace();\n if (process.env.NODE_ENV !== 'production') {\n debugger;\n }\n return false;\n }\n _listener_active = true;\n return true;\n}\n\n\nexport function check_recursive_after() {\n _listener_active = false;\n}","\nimport { check_recursive_after, check_recursive_before } from \"../lib/check-recursive\";\nimport { isInternalEvent } from \"../lib/events\";\nimport { set_override_with_merge } from \"../lookup/override\";\nimport { get_options } from \"./helpers\";\n\nexport function init() {\n document.addEventListener('change', event_listener_autosave_on_change, false);\n}\n\nfunction event_listener_autosave_on_change(event) {\n if (isInternalEvent()) {\n return;\n }\n\n const target = event.target;\n if (target?.matches && target.matches('.js-geoip-detect-input-autosave')) {\n if (process.env.NODE_ENV !== 'production') {\n console.log('autosave on change', target);\n }\n\n autosave_element(target);\n }\n}\n\n/**\n * When calling this method, be very careful not to introduce an infinite loop!\n * @param {*} el \n */\nexport function autosave_element(el) {\n const property = get_options(el).property;\n const value = el.value;\n\n if (!check_recursive_before()) {\n return;\n }\n\n if (el.matches('select.js-geoip-detect-country-select')) {\n const selected = el.options[el.selectedIndex];\n const isoCode = selected?.getAttribute('data-c');\n\n set_override_with_merge('country.iso_code', isoCode.toUpperCase(), { reevaluate: false });\n }\n\n set_override_with_merge(property, value, { reevaluate: true }); // might call do_shortcodes etc.\n\n check_recursive_after();\n}","import { triggerNativeEvent } from \"../lib/events\";\nimport { selectItemByAttribute } from \"../lib/html\";\nimport { get_value_from_record, get_options } from \"./helpers\";\nimport { autosave_element } from \"./onchange\";\n\nexport function do_shortcode_normal(el, record) {\n el.innerText = get_value_from_record(el, record);\n}\n\nexport function do_shortcode_flags(el, record) {\n const country = record.get_country_iso() || get_options(el).default;\n if (country) {\n el.classList.add('flag-icon-' + country)\n }\n}\n\n\nexport function do_shortcode_country_select(el, record) {\n let country = record.get_country_iso();\n\n if (selectItemByAttribute(el, 'data-c', country)) {\n triggerNativeEvent(el, 'change');\n return;\n }\n\n // The country is not the list of countries - select empty option instead\n if (selectItemByAttribute(el, 'data-c', '')) {\n triggerNativeEvent(el, 'change');\n } \n}\n\nexport function do_shortcode_text_input(el, record) {\n el.value = get_value_from_record(el, record);\n triggerNativeEvent(el, 'change');\n}","var arrayIntersect = intersect;\n\n/*\n intersect([1, 2, 5, 6], [2, 3, 5, 6]); // [2, 5, 6]\n intersect([1, 2, 2, 4, 5], [3, 2, 2, 5, 7]); // [2, 5]\n*/\n\nfunction intersect(arr1, arr2) {\n if (!Array.isArray(arr1) || !Array.isArray(arr2)) {\n throw new Error('expected both arguments to be arrays');\n }\n\n var result = [];\n var set = convertArrayToSet(arr2);\n var memo = {};\n\n for (var i = 0; i < arr1.length; i++) {\n var item = arr1[i];\n\n if (set.hasOwnProperty(item) && !memo.hasOwnProperty(item)) {\n result.push(item);\n memo[item] = true;\n }\n }\n\n return result;\n}\n\nfunction convertArrayToSet(arr) {\n var output = {};\n\n for (var i = 0; i < arr.length; i++) {\n var item = arr[i];\n if (!output.hasOwnProperty(item)) {\n output[item] = true;\n }\n }\n\n return output;\n}\n\nexport {arrayIntersect as default};\n","import { get_options } from './helpers';\nimport _intersect from 'just-intersect';\n\n\nexport function do_shortcode_show_if(el, record) {\n const opt = get_options(el);\n const evaluated = geoip_detect2_shortcode_evaluate_conditions(opt.parsed, opt, record);\n\n if (!evaluated) {\n el.style.display = \"none\";\n el.classList.add('geoip-hidden');\n el.classList.remove('geoip-shown');\n } else {\n el.style.display = '';\n el.classList.remove('geoip-hidden');\n el.classList.add('geoip-shown');\n }\n}\n\nexport function geoip_detect2_shortcode_evaluate_conditions(parsed, opt, record) {\n const alternativePropertyNames = [\n 'name',\n 'iso_code',\n 'iso_code3',\n 'code',\n 'geoname_id',\n ];\n\n let isConditionMatching = (parsed.op === 'or') ? false : true;\n\n parsed.conditions.forEach(c => {\n let subConditionMatching = false;\n let values = [];\n\n const raw_value = record.get_raw(c.p);\n\n if (raw_value === null) {\n subConditionMatching = false;\n } else {\n if (typeof (raw_value) === 'object') {\n alternativePropertyNames.forEach(name => {\n if (raw_value[name]) {\n values.push(raw_value[name]);\n } else if (name == 'name') {\n values.push(record.get_with_locales(c.p, opt.lang));\n }\n })\n } else {\n values = [raw_value]\n }\n }\n\n subConditionMatching = geoip_detect2_shortcode_check_subcondition(c.v, values);\n\n if (c.not) {\n subConditionMatching = !subConditionMatching;\n }\n\n if (parsed.op === 'or') {\n isConditionMatching = isConditionMatching || subConditionMatching;\n } else {\n isConditionMatching = isConditionMatching && subConditionMatching;\n }\n\n });\n\n if (parsed.not) {\n isConditionMatching = !isConditionMatching;\n }\n\n return isConditionMatching;\n}\n\nfunction geoip_detect2_shortcode_check_subcondition(expectedValues, actualValues) {\n if (actualValues[0] === true) {\n actualValues = ['true', 'yes', 'y', '1'];\n } else if (actualValues[0] === false) {\n actualValues = ['false', 'no', 'n', '0', ''];\n }\n\n actualValues = actualValues.map(x => String(x).toLowerCase())\n\n expectedValues = expectedValues.split(',');\n if (expectedValues.indexOf('') !== -1) {\n if (actualValues.length === 0) {\n return true;\n }\n }\n\n const intersect = _intersect(expectedValues, actualValues);\n\n return intersect.length > 0;\n}","import { domReady } from \"../lib/html\";\nimport { action_on_elements } from \"./helpers\";\nimport { do_shortcode_country_select, do_shortcode_flags, do_shortcode_normal, do_shortcode_text_input } from \"./normal\";\nimport { init as onchangeInit } from \"./onchange\";\nimport { do_shortcode_show_if } from \"./show-if\";\n\n\nexport const do_shortcodes_init = function () {\n onchangeInit();\n}\n\nexport const do_shortcodes = async function do_shortcodes() {\n // Before doing any of these, the DOM tree needs to be loaded\n await domReady;\n\n // These are called in parallel, as they are async functions\n action_on_elements('js-geoip-detect-shortcode',\n 'could not execute shortcode(s) [geoip_detect2 ...]', do_shortcode_normal);\n\n action_on_elements('js-geoip-detect-flag',\n 'could not configure the flag(s)', do_shortcode_flags);\n\n action_on_elements('js-geoip-text-input',\n 'could not set the value of the text input field(s)', do_shortcode_text_input);\n\n action_on_elements('js-geoip-detect-country-select',\n 'could not set the value of the select field(s)', do_shortcode_country_select);\n\n action_on_elements('js-geoip-detect-show-if',\n 'could not execute the show-if/hide-if conditions', do_shortcode_show_if);\n};\n","import { domReady } from './lib/html';\nimport { get_info } from './lookup/get_info';\n\nexport function calc_classes(record) {\n return {\n country: record.get('country.iso_code'),\n 'country-is-in-european-union': record.get('country.is_in_european_union', false),\n continent: record.get('continent.code'),\n province: record.get('most_specific_subdivision.iso_code'),\n };\n}\n\nfunction remove_css_classes_by_prefix(el, prefix) {\n const classes = el.className.split(\" \").filter(c => !c.startsWith(prefix));\n el.className = classes.join(\" \").trim();\n}\n\nexport async function add_body_classes() {\n const record = await get_info();\n\n if (record.error()) {\n console.error('Geolocation IP Detection Error (could not add CSS-classes to body): ' + record.error());\n return;\n }\n\n await domReady;\n\n add_classes_to_body(record);\n}\n\nexport function add_classes_to_body(record) {\n const css_classes = calc_classes(record);\n\n const body = document.getElementsByTagName('body')[0];\n \n // Remove old classes in case there are any\n remove_css_classes_by_prefix(body, 'geoip-');\n \n for (let key of Object.keys(css_classes)) {\n const value = css_classes[key];\n if (value) {\n if (typeof (value) == 'string') {\n body.classList.add(`geoip-${key}-${value}`);\n } else {\n body.classList.add(`geoip-${key}`);\n }\n }\n }\n}","import { do_shortcodes, do_shortcodes_init } from './shortcodes/index';\nimport { add_body_classes } from './body_classes';\nimport { options } from './lookup/get_info';\nimport { setRecordDataLastEvaluated } from \"./lookup/storage\";\n\nlet firstCall = true;\n\nexport function main() {\n if (process.env.NODE_ENV !== 'production') {\n console.log('Do Main');\n }\n\n if (firstCall) {\n do_shortcodes_init();\n firstCall = false; \n }\n\n if (options.do_body_classes) {\n add_body_classes();\n }\n\n // Do all the shortcodes that are in the HTML. Even if shortcodes is not enabled globally, they might be enabled for a specific shortcode.\n do_shortcodes();\n\n setRecordDataLastEvaluated();\n}","import { setLocalStorage } from '../lib/localStorageAccess';\nimport { options as globalOptions } from './get_info';\nimport { camelToUnderscore } from '../models/record';\nimport _set from 'just-safe-set';\nimport _get from 'just-safe-get';\nimport _is_object_content_equal from 'just-compare';\nimport { main } from '../main';\nimport { getRecordDataFromLocalStorage, getRecordDataLastEvaluated } from './storage';\n\nfunction processOptions(options) {\n options = options || {};\n if (typeof(options) == 'number') {\n options = {\n 'duration_in_days': options\n };\n }\n\n options.duration_in_days = options.duration_in_days || globalOptions.cookie_duration_in_days;\n if (options.duration_in_days < 0) {\n console.warn('Geolocation IP Detection set_override_data() did nothing: A negative duration doesn\\'t make sense. If you want to remove the override, use remove_override() instead.');\n return false;\n }\n\n if (typeof (options.reevaluate) == 'undefined' ) {\n options.reevaluate = true;\n }\n\n return options;\n}\n\nfunction changeRecord(record, property, value) {\n record = record || {};\n property = property || '';\n\n property = camelToUnderscore(property);\n\n const oldData = _get(record, property);\n if (typeof (oldData) == 'object' && typeof (oldData.names) == 'object') {\n property += '.name';\n }\n if (property.endsWith('.name')) {\n property += 's'; // e.g. country.name -> country.names\n value = { 'en': value };\n }\n\n _set(record, property, value);\n\n return record;\n}\n\n/**\n * Override only one property, leave the other properties as-is.\n * @param {string} property \n * @param {*} value \n */\nexport function set_override_with_merge(property, value, options) {\n let record = getRecordDataFromLocalStorage();\n\n record = changeRecord(record, property, value);\n\n set_override(record, options);\n\n if (process.env.NODE_ENV !== 'production') {\n console.log(\"Override is now: \", getRecordDataFromLocalStorage());\n }\n}\n\n/**\n * This functions allows to override the geodetected data manually (e.g. a country selector)\n * \n * @api\n * @param {*} record \n * @param {object} options\n * @param {number} duration_in_days When this override expires (default: 1 week later)\n * @param {boolean} reevaluate If the shortcodes etc. should be re-evaluated (default: true)\n * @return boolean TRUE if override data changed\n */\nexport function set_override(record, options) {\n options = processOptions(options);\n\n if (record && typeof (record.serialize) === 'function') {\n record = record.serialize();\n }\n\n return set_override_data(record, options);\n}\n\nfunction set_override_data(newData, options) {\n newData = newData || {};\n _set(newData, 'extra.override', true);\n\n setLocalStorage(globalOptions.cookie_name, newData, options.duration_in_days * 24 * 60 * 60);\n\n if (options.reevaluate && !_is_object_content_equal(newData, getRecordDataLastEvaluated())) {\n main();\n return true;\n }\n\n return false;\n}\n\n/**\n * Remove the override data.\n * On next page load, the record data will be loaded from the server again.\n * \n * @return boolean\n */\nexport function remove_override(options) {\n options = processOptions(options);\n setLocalStorage(globalOptions.cookie_name, {}, -1);\n if (options.reevaluate) {\n main();\n }\n return true;\n}\n\n\n","import { get_info } from './lookup/get_info';\nimport { remove_override, set_override, set_override_with_merge } from './lookup/override';\nimport { main } from './main';\n\n// Evaluate shortcodes, body classes, etc.\nmain();\n\n\n// Extend window object \nwindow.geoip_detect.get_info = get_info;\n\nwindow.geoip_detect.set_override = set_override;\nwindow.geoip_detect.set_override_with_merge = set_override_with_merge;\nwindow.geoip_detect.remove_override = remove_override;"],"names":["$895d9b2ca46faf11$var$asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","$895d9b2ca46faf11$export$2e2bcd8739ae039","fn","self","this","args","arguments","apply","err","undefined","$003e1ba76c02d76e$export$2e2bcd8739ae039","obj","constructor","Symbol","$d9ff7fa7a3f30499$var$runtime","exports","define","Object","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","prototype","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","type","call","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","forEach","method","AsyncIterator","PromiseImpl","invoke","record","result","hasOwn","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","state","GenStateSuspendedStart","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","GenStateSuspendedYield","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","values","iterable","iteratorMethod","iteratorSymbol","next","isNaN","length","i","Op","hasOwnProperty","$Symbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","TypeError","resultName","nextLoc","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","$d9ff7fa7a3f30499$exports","regeneratorRuntime","accidentalStrictMode","globalThis","Function","$054ce093faccc6cc$export$2e2bcd8739ae039","instance","Constructor","$091196a5c1b884db$var$_defineProperties","target","props","descriptor","$478e62652360c132$export$2e2bcd8739ae039","$4a4beb35e1398598$export$2e2bcd8739ae039","propsArg","defaultValue","prop","Array","isArray","split","shift","$a4c6bf567c1b63c8$var$_get_localized","ret","locales","names","locale","$a4c6bf567c1b63c8$export$13bc6c4afe8cd6ab","map","x","toLowerCase","replace","join","$a4c6bf567c1b63c8$var$Record","Record","data","default_locales","is_empty","_process_locales","protoProps","staticProps","default_value","get_with_locales","_lookup_with_locales","substr","get_raw","console","warn","country","get","$a4c6bf567c1b63c8$export$2e2bcd8739ae039","$5115e01e50a35b95$export$699251e5611cc6db","url","request","XMLHttpRequest","onreadystatechange","readyState","status","statusText","open","send","$5115e01e50a35b95$export$8fe2eaa78e58529f","str","JSON","parse","e","$5115e01e50a35b95$var$createErrorObject","errorMsg","extra","$5115e01e50a35b95$export$49434baf33460b11","$parcel$interopDefault","_callee","_args","_ctx","responseText","t0","$9a0f598d59a61a3e$export$1f73f60bdb811cb1","variable","ttl_sec","expires_at","Date","getTime","localStorage","setItem","toString","stringify","$9a0f598d59a61a3e$export$d3720feff416e85b","getItem","removeItem","$f422a70a3b9c8a83$export$c0c5a36406ccde34","$b4ba9c8e7a201193$export$41c562ebe57d11e2","cookie_name","$f422a70a3b9c8a83$export$bfae0a1e3adc82ee","cache_duration","$b4ba9c8e7a201193$var$ref","$f422a70a3b9c8a83$var$lastEvaluated","$f422a70a3b9c8a83$export$88983ef80f4f72ac","window","geoip_detect","options","ajaxurl","cookie_duration_in_days","do_body_classes","$b4ba9c8e7a201193$var$ajaxPromise","$b4ba9c8e7a201193$var$get_info_raw","response","ref","$b4ba9c8e7a201193$var$get_info_cached","$b4ba9c8e7a201193$var$_get_info_cached","storedResponse","ref1","override","log","responseJSON","$b4ba9c8e7a201193$export$3697bcf53517e83c","$b4ba9c8e7a201193$var$_get_info","$6451de512ae99d8a$export$2e2bcd8739ae039","lastProp","thisProp","$6451de512ae99d8a$var$prototypeCheck","$d73968d8a0a066f2$export$2e2bcd8739ae039","$d73968d8a0a066f2$var$compare","value1","value2","$d73968d8a0a066f2$var$compareArrays","from","keys1","len","key1","$d73968d8a0a066f2$var$compareObjects","$d73968d8a0a066f2$var$compareNativeSubtypes","$b4d1c184cabe171a$export$d680cb6eec13a7c7","document","addEventListener","attachEvent","$b4d1c184cabe171a$export$212ec54c5d687e78","el","attributeName","attributeValue","getAttribute","selectedIndex","$e41b329f42db23c8$export$aafcad1af8162002","raw","$e41b329f42db23c8$export$bb8a045c548d38f9","className","errorMessage","callback","$e41b329f42db23c8$var$_action_on_elements","elements","getElementsByClassName","$e41b329f42db23c8$export$2bcc52ba6c088b4a","property","opt","skip_cache","lang","default","$3f68aa62fc033904$var$_internalEvent","$3f68aa62fc033904$export$f0ffca0e7194bd91","eventName","event","CustomEvent","detail","createEvent","initCustomEvent","dispatchEvent","$7944654ce2dd9d65$var$_listener_active","$7944654ce2dd9d65$var$_change_counter","$7944654ce2dd9d65$export$887b871aa5aacaaa","trace","$7944654ce2dd9d65$export$f60ab07833116193","$3bb001785c092908$var$event_listener_autosave_on_change","matches","selected","$03d6c28e95082604$export$38a0b31e9febbbe1","toUpperCase","reevaluate","$3bb001785c092908$export$be51a27c79b931de","$ddb23fab3c6f4620$export$c5bfd938fb7f5403","innerText","$ddb23fab3c6f4620$export$67c46edf2422701b","get_country_iso","classList","add","$ddb23fab3c6f4620$export$8b2cf4a2576ea856","$ddb23fab3c6f4620$export$46eed00f10e80dd5","$599ea47da8784bdb$export$2e2bcd8739ae039","arr1","arr2","set","arr","output","item","$599ea47da8784bdb$var$convertArrayToSet","memo","$34cfab0a14aff422$export$7f72d39cfa7a0f7a","evaluated","parsed","alternativePropertyNames","isConditionMatching","op","conditions","c","subConditionMatching","raw_value","p","expectedValues","actualValues","String","indexOf","$34cfab0a14aff422$var$geoip_detect2_shortcode_check_subcondition","v","not","$34cfab0a14aff422$export$626a13a1fe51c67a","style","display","remove","_do_shortcodes","$9cee2e12fa11ef69$export$7481777ea0ea965d","$9cee2e12fa11ef69$export$42610705290faf95","$73929a6ea3471960$export$69cfbde487906451","$73929a6ea3471960$var$_add_body_classes","$73929a6ea3471960$export$4e7274a5cb77ccb6","prefix","classes","css_classes","continent","province","$73929a6ea3471960$export$fd37e2b9d7d82468","body","getElementsByTagName","filter","startsWith","trim","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","concat","return","$b016e4ccc3c135fb$var$firstCall","$b016e4ccc3c135fb$export$f22da7240b7add18","$03d6c28e95082604$var$processOptions","duration_in_days","oldData","endsWith","en","$03d6c28e95082604$var$changeRecord","$03d6c28e95082604$export$c3c74383dfd15775","serialize","newData","$03d6c28e95082604$var$set_override_data","get_info","set_override","set_override_with_merge","remove_override"],"version":3,"file":"frontend.js.map"}
|
js/dist/parcel.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"mzZo":[function(require,module,exports) {
|
2 |
-
module.exports={frontendJS:"frontend.e1ec2aa3.js",backendJS:"backend.f84e1103.js"};
|
3 |
-
},{"./js/frontend.js":[["frontend.e1ec2aa3.js","ZVsn"],"frontend.e1ec2aa3.js.map","ZVsn"],"./js/backend.js":[["backend.f84e1103.js","gP7L"],"backend.f84e1103.js.map","gP7L"]}]},{},[], null)
|
|
|
|
|
|
js/dist/parcel.json
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"frontendJS": "frontend.e1ec2aa3.js",
|
3 |
-
"backendJS": "backend.f84e1103.js"
|
4 |
-
}
|
|
|
|
|
|
|
|
js/dist/parcel.urls
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
frontendJS: frontend.e1ec2aa3.js
|
2 |
-
backendJS: backend.f84e1103.js
|
|
|
|
js/frontend.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import { get_info } from './lookup/get_info';
|
2 |
-
import { remove_override, set_override } from './lookup/override';
|
3 |
import { main } from './main';
|
4 |
|
5 |
// Evaluate shortcodes, body classes, etc.
|
@@ -10,4 +10,5 @@ main();
|
|
10 |
window.geoip_detect.get_info = get_info;
|
11 |
|
12 |
window.geoip_detect.set_override = set_override;
|
|
|
13 |
window.geoip_detect.remove_override = remove_override;
|
1 |
import { get_info } from './lookup/get_info';
|
2 |
+
import { remove_override, set_override, set_override_with_merge } from './lookup/override';
|
3 |
import { main } from './main';
|
4 |
|
5 |
// Evaluate shortcodes, body classes, etc.
|
10 |
window.geoip_detect.get_info = get_info;
|
11 |
|
12 |
window.geoip_detect.set_override = set_override;
|
13 |
+
window.geoip_detect.set_override_with_merge = set_override_with_merge;
|
14 |
window.geoip_detect.remove_override = remove_override;
|
js/lodash.custom.js
DELETED
@@ -1,1810 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* @license
|
3 |
-
* Lodash (Custom Build) <https://lodash.com/>
|
4 |
-
* Build: `lodash include="get,intersection" -o js/lodash.custom.js`
|
5 |
-
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
6 |
-
* Released under MIT license <https://lodash.com/license>
|
7 |
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
8 |
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
9 |
-
*/
|
10 |
-
;(function() {
|
11 |
-
|
12 |
-
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
|
13 |
-
var undefined;
|
14 |
-
|
15 |
-
/** Used as the semantic version number. */
|
16 |
-
var VERSION = '4.17.5';
|
17 |
-
|
18 |
-
/** Error message constants. */
|
19 |
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
20 |
-
|
21 |
-
/** Used to stand-in for `undefined` hash values. */
|
22 |
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
23 |
-
|
24 |
-
/** Used as the maximum memoize cache size. */
|
25 |
-
var MAX_MEMOIZE_SIZE = 500;
|
26 |
-
|
27 |
-
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
28 |
-
var HOT_COUNT = 800,
|
29 |
-
HOT_SPAN = 16;
|
30 |
-
|
31 |
-
/** Used as references for various `Number` constants. */
|
32 |
-
var INFINITY = 1 / 0,
|
33 |
-
MAX_SAFE_INTEGER = 9007199254740991;
|
34 |
-
|
35 |
-
/** `Object#toString` result references. */
|
36 |
-
var asyncTag = '[object AsyncFunction]',
|
37 |
-
funcTag = '[object Function]',
|
38 |
-
genTag = '[object GeneratorFunction]',
|
39 |
-
nullTag = '[object Null]',
|
40 |
-
proxyTag = '[object Proxy]',
|
41 |
-
symbolTag = '[object Symbol]',
|
42 |
-
undefinedTag = '[object Undefined]';
|
43 |
-
|
44 |
-
/** Used to match property names within property paths. */
|
45 |
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
46 |
-
reIsPlainProp = /^\w*$/,
|
47 |
-
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Used to match `RegExp`
|
51 |
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
52 |
-
*/
|
53 |
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
54 |
-
|
55 |
-
/** Used to match backslashes in property paths. */
|
56 |
-
var reEscapeChar = /\\(\\)?/g;
|
57 |
-
|
58 |
-
/** Used to detect host constructors (Safari). */
|
59 |
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
60 |
-
|
61 |
-
/** Detect free variable `global` from Node.js. */
|
62 |
-
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
63 |
-
|
64 |
-
/** Detect free variable `self`. */
|
65 |
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
66 |
-
|
67 |
-
/** Used as a reference to the global object. */
|
68 |
-
var root = freeGlobal || freeSelf || Function('return this')();
|
69 |
-
|
70 |
-
/** Detect free variable `exports`. */
|
71 |
-
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
72 |
-
|
73 |
-
/** Detect free variable `module`. */
|
74 |
-
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
75 |
-
|
76 |
-
/*--------------------------------------------------------------------------*/
|
77 |
-
|
78 |
-
/**
|
79 |
-
* A faster alternative to `Function#apply`, this function invokes `func`
|
80 |
-
* with the `this` binding of `thisArg` and the arguments of `args`.
|
81 |
-
*
|
82 |
-
* @private
|
83 |
-
* @param {Function} func The function to invoke.
|
84 |
-
* @param {*} thisArg The `this` binding of `func`.
|
85 |
-
* @param {Array} args The arguments to invoke `func` with.
|
86 |
-
* @returns {*} Returns the result of `func`.
|
87 |
-
*/
|
88 |
-
function apply(func, thisArg, args) {
|
89 |
-
switch (args.length) {
|
90 |
-
case 0: return func.call(thisArg);
|
91 |
-
case 1: return func.call(thisArg, args[0]);
|
92 |
-
case 2: return func.call(thisArg, args[0], args[1]);
|
93 |
-
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
94 |
-
}
|
95 |
-
return func.apply(thisArg, args);
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* A specialized version of `_.includes` for arrays without support for
|
100 |
-
* specifying an index to search from.
|
101 |
-
*
|
102 |
-
* @private
|
103 |
-
* @param {Array} [array] The array to inspect.
|
104 |
-
* @param {*} target The value to search for.
|
105 |
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
106 |
-
*/
|
107 |
-
function arrayIncludes(array, value) {
|
108 |
-
var length = array == null ? 0 : array.length;
|
109 |
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* This function is like `arrayIncludes` except that it accepts a comparator.
|
114 |
-
*
|
115 |
-
* @private
|
116 |
-
* @param {Array} [array] The array to inspect.
|
117 |
-
* @param {*} target The value to search for.
|
118 |
-
* @param {Function} comparator The comparator invoked per element.
|
119 |
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
120 |
-
*/
|
121 |
-
function arrayIncludesWith(array, value, comparator) {
|
122 |
-
var index = -1,
|
123 |
-
length = array == null ? 0 : array.length;
|
124 |
-
|
125 |
-
while (++index < length) {
|
126 |
-
if (comparator(value, array[index])) {
|
127 |
-
return true;
|
128 |
-
}
|
129 |
-
}
|
130 |
-
return false;
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
* A specialized version of `_.map` for arrays without support for iteratee
|
135 |
-
* shorthands.
|
136 |
-
*
|
137 |
-
* @private
|
138 |
-
* @param {Array} [array] The array to iterate over.
|
139 |
-
* @param {Function} iteratee The function invoked per iteration.
|
140 |
-
* @returns {Array} Returns the new mapped array.
|
141 |
-
*/
|
142 |
-
function arrayMap(array, iteratee) {
|
143 |
-
var index = -1,
|
144 |
-
length = array == null ? 0 : array.length,
|
145 |
-
result = Array(length);
|
146 |
-
|
147 |
-
while (++index < length) {
|
148 |
-
result[index] = iteratee(array[index], index, array);
|
149 |
-
}
|
150 |
-
return result;
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
155 |
-
* support for iteratee shorthands.
|
156 |
-
*
|
157 |
-
* @private
|
158 |
-
* @param {Array} array The array to inspect.
|
159 |
-
* @param {Function} predicate The function invoked per iteration.
|
160 |
-
* @param {number} fromIndex The index to search from.
|
161 |
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
162 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
163 |
-
*/
|
164 |
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
165 |
-
var length = array.length,
|
166 |
-
index = fromIndex + (fromRight ? 1 : -1);
|
167 |
-
|
168 |
-
while ((fromRight ? index-- : ++index < length)) {
|
169 |
-
if (predicate(array[index], index, array)) {
|
170 |
-
return index;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
return -1;
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
178 |
-
*
|
179 |
-
* @private
|
180 |
-
* @param {Array} array The array to inspect.
|
181 |
-
* @param {*} value The value to search for.
|
182 |
-
* @param {number} fromIndex The index to search from.
|
183 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
184 |
-
*/
|
185 |
-
function baseIndexOf(array, value, fromIndex) {
|
186 |
-
return value === value
|
187 |
-
? strictIndexOf(array, value, fromIndex)
|
188 |
-
: baseFindIndex(array, baseIsNaN, fromIndex);
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* The base implementation of `_.isNaN` without support for number objects.
|
193 |
-
*
|
194 |
-
* @private
|
195 |
-
* @param {*} value The value to check.
|
196 |
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
197 |
-
*/
|
198 |
-
function baseIsNaN(value) {
|
199 |
-
return value !== value;
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* The base implementation of `_.unary` without support for storing metadata.
|
204 |
-
*
|
205 |
-
* @private
|
206 |
-
* @param {Function} func The function to cap arguments for.
|
207 |
-
* @returns {Function} Returns the new capped function.
|
208 |
-
*/
|
209 |
-
function baseUnary(func) {
|
210 |
-
return function(value) {
|
211 |
-
return func(value);
|
212 |
-
};
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Checks if a `cache` value for `key` exists.
|
217 |
-
*
|
218 |
-
* @private
|
219 |
-
* @param {Object} cache The cache to query.
|
220 |
-
* @param {string} key The key of the entry to check.
|
221 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
222 |
-
*/
|
223 |
-
function cacheHas(cache, key) {
|
224 |
-
return cache.has(key);
|
225 |
-
}
|
226 |
-
|
227 |
-
/**
|
228 |
-
* Gets the value at `key` of `object`.
|
229 |
-
*
|
230 |
-
* @private
|
231 |
-
* @param {Object} [object] The object to query.
|
232 |
-
* @param {string} key The key of the property to get.
|
233 |
-
* @returns {*} Returns the property value.
|
234 |
-
*/
|
235 |
-
function getValue(object, key) {
|
236 |
-
return object == null ? undefined : object[key];
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* A specialized version of `_.indexOf` which performs strict equality
|
241 |
-
* comparisons of values, i.e. `===`.
|
242 |
-
*
|
243 |
-
* @private
|
244 |
-
* @param {Array} array The array to inspect.
|
245 |
-
* @param {*} value The value to search for.
|
246 |
-
* @param {number} fromIndex The index to search from.
|
247 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
248 |
-
*/
|
249 |
-
function strictIndexOf(array, value, fromIndex) {
|
250 |
-
var index = fromIndex - 1,
|
251 |
-
length = array.length;
|
252 |
-
|
253 |
-
while (++index < length) {
|
254 |
-
if (array[index] === value) {
|
255 |
-
return index;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
return -1;
|
259 |
-
}
|
260 |
-
|
261 |
-
/*--------------------------------------------------------------------------*/
|
262 |
-
|
263 |
-
/** Used for built-in method references. */
|
264 |
-
var arrayProto = Array.prototype,
|
265 |
-
funcProto = Function.prototype,
|
266 |
-
objectProto = Object.prototype;
|
267 |
-
|
268 |
-
/** Used to detect overreaching core-js shims. */
|
269 |
-
var coreJsData = root['__core-js_shared__'];
|
270 |
-
|
271 |
-
/** Used to resolve the decompiled source of functions. */
|
272 |
-
var funcToString = funcProto.toString;
|
273 |
-
|
274 |
-
/** Used to check objects for own properties. */
|
275 |
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
276 |
-
|
277 |
-
/** Used to detect methods masquerading as native. */
|
278 |
-
var maskSrcKey = (function() {
|
279 |
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
280 |
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
281 |
-
}());
|
282 |
-
|
283 |
-
/**
|
284 |
-
* Used to resolve the
|
285 |
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
286 |
-
* of values.
|
287 |
-
*/
|
288 |
-
var nativeObjectToString = objectProto.toString;
|
289 |
-
|
290 |
-
/** Used to detect if a method is native. */
|
291 |
-
var reIsNative = RegExp('^' +
|
292 |
-
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
293 |
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
294 |
-
);
|
295 |
-
|
296 |
-
/** Built-in value references. */
|
297 |
-
var Symbol = root.Symbol,
|
298 |
-
splice = arrayProto.splice,
|
299 |
-
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
300 |
-
|
301 |
-
var defineProperty = (function() {
|
302 |
-
try {
|
303 |
-
var func = getNative(Object, 'defineProperty');
|
304 |
-
func({}, '', {});
|
305 |
-
return func;
|
306 |
-
} catch (e) {}
|
307 |
-
}());
|
308 |
-
|
309 |
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
310 |
-
var nativeMax = Math.max,
|
311 |
-
nativeMin = Math.min,
|
312 |
-
nativeNow = Date.now;
|
313 |
-
|
314 |
-
/* Built-in method references that are verified to be native. */
|
315 |
-
var Map = getNative(root, 'Map'),
|
316 |
-
nativeCreate = getNative(Object, 'create');
|
317 |
-
|
318 |
-
/** Used to lookup unminified function names. */
|
319 |
-
var realNames = {};
|
320 |
-
|
321 |
-
/** Used to convert symbols to primitives and strings. */
|
322 |
-
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
323 |
-
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
324 |
-
|
325 |
-
/*------------------------------------------------------------------------*/
|
326 |
-
|
327 |
-
/**
|
328 |
-
* Creates a `lodash` object which wraps `value` to enable implicit method
|
329 |
-
* chain sequences. Methods that operate on and return arrays, collections,
|
330 |
-
* and functions can be chained together. Methods that retrieve a single value
|
331 |
-
* or may return a primitive value will automatically end the chain sequence
|
332 |
-
* and return the unwrapped value. Otherwise, the value must be unwrapped
|
333 |
-
* with `_#value`.
|
334 |
-
*
|
335 |
-
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
|
336 |
-
* enabled using `_.chain`.
|
337 |
-
*
|
338 |
-
* The execution of chained methods is lazy, that is, it's deferred until
|
339 |
-
* `_#value` is implicitly or explicitly called.
|
340 |
-
*
|
341 |
-
* Lazy evaluation allows several methods to support shortcut fusion.
|
342 |
-
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
|
343 |
-
* the creation of intermediate arrays and can greatly reduce the number of
|
344 |
-
* iteratee executions. Sections of a chain sequence qualify for shortcut
|
345 |
-
* fusion if the section is applied to an array and iteratees accept only
|
346 |
-
* one argument. The heuristic for whether a section qualifies for shortcut
|
347 |
-
* fusion is subject to change.
|
348 |
-
*
|
349 |
-
* Chaining is supported in custom builds as long as the `_#value` method is
|
350 |
-
* directly or indirectly included in the build.
|
351 |
-
*
|
352 |
-
* In addition to lodash methods, wrappers have `Array` and `String` methods.
|
353 |
-
*
|
354 |
-
* The wrapper `Array` methods are:
|
355 |
-
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
|
356 |
-
*
|
357 |
-
* The wrapper `String` methods are:
|
358 |
-
* `replace` and `split`
|
359 |
-
*
|
360 |
-
* The wrapper methods that support shortcut fusion are:
|
361 |
-
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
|
362 |
-
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
|
363 |
-
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
|
364 |
-
*
|
365 |
-
* The chainable wrapper methods are:
|
366 |
-
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
|
367 |
-
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
|
368 |
-
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
|
369 |
-
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
|
370 |
-
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
|
371 |
-
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
|
372 |
-
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
|
373 |
-
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
|
374 |
-
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
|
375 |
-
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
|
376 |
-
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
|
377 |
-
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
|
378 |
-
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
|
379 |
-
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
|
380 |
-
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
|
381 |
-
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
|
382 |
-
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
|
383 |
-
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
|
384 |
-
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
|
385 |
-
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
|
386 |
-
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
|
387 |
-
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
|
388 |
-
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
|
389 |
-
* `zipObject`, `zipObjectDeep`, and `zipWith`
|
390 |
-
*
|
391 |
-
* The wrapper methods that are **not** chainable by default are:
|
392 |
-
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
|
393 |
-
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
|
394 |
-
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
|
395 |
-
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
|
396 |
-
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
|
397 |
-
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
|
398 |
-
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
|
399 |
-
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
|
400 |
-
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
|
401 |
-
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
|
402 |
-
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
|
403 |
-
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
|
404 |
-
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
|
405 |
-
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
|
406 |
-
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
|
407 |
-
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
|
408 |
-
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
|
409 |
-
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
|
410 |
-
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
|
411 |
-
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
|
412 |
-
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
|
413 |
-
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
|
414 |
-
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
|
415 |
-
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
|
416 |
-
* `upperFirst`, `value`, and `words`
|
417 |
-
*
|
418 |
-
* @name _
|
419 |
-
* @constructor
|
420 |
-
* @category Seq
|
421 |
-
* @param {*} value The value to wrap in a `lodash` instance.
|
422 |
-
* @returns {Object} Returns the new `lodash` wrapper instance.
|
423 |
-
* @example
|
424 |
-
*
|
425 |
-
* function square(n) {
|
426 |
-
* return n * n;
|
427 |
-
* }
|
428 |
-
*
|
429 |
-
* var wrapped = _([1, 2, 3]);
|
430 |
-
*
|
431 |
-
* // Returns an unwrapped value.
|
432 |
-
* wrapped.reduce(_.add);
|
433 |
-
* // => 6
|
434 |
-
*
|
435 |
-
* // Returns a wrapped value.
|
436 |
-
* var squares = wrapped.map(square);
|
437 |
-
*
|
438 |
-
* _.isArray(squares);
|
439 |
-
* // => false
|
440 |
-
*
|
441 |
-
* _.isArray(squares.value());
|
442 |
-
* // => true
|
443 |
-
*/
|
444 |
-
function lodash() {
|
445 |
-
// No operation performed.
|
446 |
-
}
|
447 |
-
|
448 |
-
/*------------------------------------------------------------------------*/
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Creates a hash object.
|
452 |
-
*
|
453 |
-
* @private
|
454 |
-
* @constructor
|
455 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
456 |
-
*/
|
457 |
-
function Hash(entries) {
|
458 |
-
var index = -1,
|
459 |
-
length = entries == null ? 0 : entries.length;
|
460 |
-
|
461 |
-
this.clear();
|
462 |
-
while (++index < length) {
|
463 |
-
var entry = entries[index];
|
464 |
-
this.set(entry[0], entry[1]);
|
465 |
-
}
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* Removes all key-value entries from the hash.
|
470 |
-
*
|
471 |
-
* @private
|
472 |
-
* @name clear
|
473 |
-
* @memberOf Hash
|
474 |
-
*/
|
475 |
-
function hashClear() {
|
476 |
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
477 |
-
this.size = 0;
|
478 |
-
}
|
479 |
-
|
480 |
-
/**
|
481 |
-
* Removes `key` and its value from the hash.
|
482 |
-
*
|
483 |
-
* @private
|
484 |
-
* @name delete
|
485 |
-
* @memberOf Hash
|
486 |
-
* @param {Object} hash The hash to modify.
|
487 |
-
* @param {string} key The key of the value to remove.
|
488 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
489 |
-
*/
|
490 |
-
function hashDelete(key) {
|
491 |
-
var result = this.has(key) && delete this.__data__[key];
|
492 |
-
this.size -= result ? 1 : 0;
|
493 |
-
return result;
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* Gets the hash value for `key`.
|
498 |
-
*
|
499 |
-
* @private
|
500 |
-
* @name get
|
501 |
-
* @memberOf Hash
|
502 |
-
* @param {string} key The key of the value to get.
|
503 |
-
* @returns {*} Returns the entry value.
|
504 |
-
*/
|
505 |
-
function hashGet(key) {
|
506 |
-
var data = this.__data__;
|
507 |
-
if (nativeCreate) {
|
508 |
-
var result = data[key];
|
509 |
-
return result === HASH_UNDEFINED ? undefined : result;
|
510 |
-
}
|
511 |
-
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
512 |
-
}
|
513 |
-
|
514 |
-
/**
|
515 |
-
* Checks if a hash value for `key` exists.
|
516 |
-
*
|
517 |
-
* @private
|
518 |
-
* @name has
|
519 |
-
* @memberOf Hash
|
520 |
-
* @param {string} key The key of the entry to check.
|
521 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
522 |
-
*/
|
523 |
-
function hashHas(key) {
|
524 |
-
var data = this.__data__;
|
525 |
-
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* Sets the hash `key` to `value`.
|
530 |
-
*
|
531 |
-
* @private
|
532 |
-
* @name set
|
533 |
-
* @memberOf Hash
|
534 |
-
* @param {string} key The key of the value to set.
|
535 |
-
* @param {*} value The value to set.
|
536 |
-
* @returns {Object} Returns the hash instance.
|
537 |
-
*/
|
538 |
-
function hashSet(key, value) {
|
539 |
-
var data = this.__data__;
|
540 |
-
this.size += this.has(key) ? 0 : 1;
|
541 |
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
542 |
-
return this;
|
543 |
-
}
|
544 |
-
|
545 |
-
// Add methods to `Hash`.
|
546 |
-
Hash.prototype.clear = hashClear;
|
547 |
-
Hash.prototype['delete'] = hashDelete;
|
548 |
-
Hash.prototype.get = hashGet;
|
549 |
-
Hash.prototype.has = hashHas;
|
550 |
-
Hash.prototype.set = hashSet;
|
551 |
-
|
552 |
-
/*------------------------------------------------------------------------*/
|
553 |
-
|
554 |
-
/**
|
555 |
-
* Creates an list cache object.
|
556 |
-
*
|
557 |
-
* @private
|
558 |
-
* @constructor
|
559 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
560 |
-
*/
|
561 |
-
function ListCache(entries) {
|
562 |
-
var index = -1,
|
563 |
-
length = entries == null ? 0 : entries.length;
|
564 |
-
|
565 |
-
this.clear();
|
566 |
-
while (++index < length) {
|
567 |
-
var entry = entries[index];
|
568 |
-
this.set(entry[0], entry[1]);
|
569 |
-
}
|
570 |
-
}
|
571 |
-
|
572 |
-
/**
|
573 |
-
* Removes all key-value entries from the list cache.
|
574 |
-
*
|
575 |
-
* @private
|
576 |
-
* @name clear
|
577 |
-
* @memberOf ListCache
|
578 |
-
*/
|
579 |
-
function listCacheClear() {
|
580 |
-
this.__data__ = [];
|
581 |
-
this.size = 0;
|
582 |
-
}
|
583 |
-
|
584 |
-
/**
|
585 |
-
* Removes `key` and its value from the list cache.
|
586 |
-
*
|
587 |
-
* @private
|
588 |
-
* @name delete
|
589 |
-
* @memberOf ListCache
|
590 |
-
* @param {string} key The key of the value to remove.
|
591 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
592 |
-
*/
|
593 |
-
function listCacheDelete(key) {
|
594 |
-
var data = this.__data__,
|
595 |
-
index = assocIndexOf(data, key);
|
596 |
-
|
597 |
-
if (index < 0) {
|
598 |
-
return false;
|
599 |
-
}
|
600 |
-
var lastIndex = data.length - 1;
|
601 |
-
if (index == lastIndex) {
|
602 |
-
data.pop();
|
603 |
-
} else {
|
604 |
-
splice.call(data, index, 1);
|
605 |
-
}
|
606 |
-
--this.size;
|
607 |
-
return true;
|
608 |
-
}
|
609 |
-
|
610 |
-
/**
|
611 |
-
* Gets the list cache value for `key`.
|
612 |
-
*
|
613 |
-
* @private
|
614 |
-
* @name get
|
615 |
-
* @memberOf ListCache
|
616 |
-
* @param {string} key The key of the value to get.
|
617 |
-
* @returns {*} Returns the entry value.
|
618 |
-
*/
|
619 |
-
function listCacheGet(key) {
|
620 |
-
var data = this.__data__,
|
621 |
-
index = assocIndexOf(data, key);
|
622 |
-
|
623 |
-
return index < 0 ? undefined : data[index][1];
|
624 |
-
}
|
625 |
-
|
626 |
-
/**
|
627 |
-
* Checks if a list cache value for `key` exists.
|
628 |
-
*
|
629 |
-
* @private
|
630 |
-
* @name has
|
631 |
-
* @memberOf ListCache
|
632 |
-
* @param {string} key The key of the entry to check.
|
633 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
634 |
-
*/
|
635 |
-
function listCacheHas(key) {
|
636 |
-
return assocIndexOf(this.__data__, key) > -1;
|
637 |
-
}
|
638 |
-
|
639 |
-
/**
|
640 |
-
* Sets the list cache `key` to `value`.
|
641 |
-
*
|
642 |
-
* @private
|
643 |
-
* @name set
|
644 |
-
* @memberOf ListCache
|
645 |
-
* @param {string} key The key of the value to set.
|
646 |
-
* @param {*} value The value to set.
|
647 |
-
* @returns {Object} Returns the list cache instance.
|
648 |
-
*/
|
649 |
-
function listCacheSet(key, value) {
|
650 |
-
var data = this.__data__,
|
651 |
-
index = assocIndexOf(data, key);
|
652 |
-
|
653 |
-
if (index < 0) {
|
654 |
-
++this.size;
|
655 |
-
data.push([key, value]);
|
656 |
-
} else {
|
657 |
-
data[index][1] = value;
|
658 |
-
}
|
659 |
-
return this;
|
660 |
-
}
|
661 |
-
|
662 |
-
// Add methods to `ListCache`.
|
663 |
-
ListCache.prototype.clear = listCacheClear;
|
664 |
-
ListCache.prototype['delete'] = listCacheDelete;
|
665 |
-
ListCache.prototype.get = listCacheGet;
|
666 |
-
ListCache.prototype.has = listCacheHas;
|
667 |
-
ListCache.prototype.set = listCacheSet;
|
668 |
-
|
669 |
-
/*------------------------------------------------------------------------*/
|
670 |
-
|
671 |
-
/**
|
672 |
-
* Creates a map cache object to store key-value pairs.
|
673 |
-
*
|
674 |
-
* @private
|
675 |
-
* @constructor
|
676 |
-
* @param {Array} [entries] The key-value pairs to cache.
|
677 |
-
*/
|
678 |
-
function MapCache(entries) {
|
679 |
-
var index = -1,
|
680 |
-
length = entries == null ? 0 : entries.length;
|
681 |
-
|
682 |
-
this.clear();
|
683 |
-
while (++index < length) {
|
684 |
-
var entry = entries[index];
|
685 |
-
this.set(entry[0], entry[1]);
|
686 |
-
}
|
687 |
-
}
|
688 |
-
|
689 |
-
/**
|
690 |
-
* Removes all key-value entries from the map.
|
691 |
-
*
|
692 |
-
* @private
|
693 |
-
* @name clear
|
694 |
-
* @memberOf MapCache
|
695 |
-
*/
|
696 |
-
function mapCacheClear() {
|
697 |
-
this.size = 0;
|
698 |
-
this.__data__ = {
|
699 |
-
'hash': new Hash,
|
700 |
-
'map': new (Map || ListCache),
|
701 |
-
'string': new Hash
|
702 |
-
};
|
703 |
-
}
|
704 |
-
|
705 |
-
/**
|
706 |
-
* Removes `key` and its value from the map.
|
707 |
-
*
|
708 |
-
* @private
|
709 |
-
* @name delete
|
710 |
-
* @memberOf MapCache
|
711 |
-
* @param {string} key The key of the value to remove.
|
712 |
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
713 |
-
*/
|
714 |
-
function mapCacheDelete(key) {
|
715 |
-
var result = getMapData(this, key)['delete'](key);
|
716 |
-
this.size -= result ? 1 : 0;
|
717 |
-
return result;
|
718 |
-
}
|
719 |
-
|
720 |
-
/**
|
721 |
-
* Gets the map value for `key`.
|
722 |
-
*
|
723 |
-
* @private
|
724 |
-
* @name get
|
725 |
-
* @memberOf MapCache
|
726 |
-
* @param {string} key The key of the value to get.
|
727 |
-
* @returns {*} Returns the entry value.
|
728 |
-
*/
|
729 |
-
function mapCacheGet(key) {
|
730 |
-
return getMapData(this, key).get(key);
|
731 |
-
}
|
732 |
-
|
733 |
-
/**
|
734 |
-
* Checks if a map value for `key` exists.
|
735 |
-
*
|
736 |
-
* @private
|
737 |
-
* @name has
|
738 |
-
* @memberOf MapCache
|
739 |
-
* @param {string} key The key of the entry to check.
|
740 |
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
741 |
-
*/
|
742 |
-
function mapCacheHas(key) {
|
743 |
-
return getMapData(this, key).has(key);
|
744 |
-
}
|
745 |
-
|
746 |
-
/**
|
747 |
-
* Sets the map `key` to `value`.
|
748 |
-
*
|
749 |
-
* @private
|
750 |
-
* @name set
|
751 |
-
* @memberOf MapCache
|
752 |
-
* @param {string} key The key of the value to set.
|
753 |
-
* @param {*} value The value to set.
|
754 |
-
* @returns {Object} Returns the map cache instance.
|
755 |
-
*/
|
756 |
-
function mapCacheSet(key, value) {
|
757 |
-
var data = getMapData(this, key),
|
758 |
-
size = data.size;
|
759 |
-
|
760 |
-
data.set(key, value);
|
761 |
-
this.size += data.size == size ? 0 : 1;
|
762 |
-
return this;
|
763 |
-
}
|
764 |
-
|
765 |
-
// Add methods to `MapCache`.
|
766 |
-
MapCache.prototype.clear = mapCacheClear;
|
767 |
-
MapCache.prototype['delete'] = mapCacheDelete;
|
768 |
-
MapCache.prototype.get = mapCacheGet;
|
769 |
-
MapCache.prototype.has = mapCacheHas;
|
770 |
-
MapCache.prototype.set = mapCacheSet;
|
771 |
-
|
772 |
-
/*------------------------------------------------------------------------*/
|
773 |
-
|
774 |
-
/**
|
775 |
-
*
|
776 |
-
* Creates an array cache object to store unique values.
|
777 |
-
*
|
778 |
-
* @private
|
779 |
-
* @constructor
|
780 |
-
* @param {Array} [values] The values to cache.
|
781 |
-
*/
|
782 |
-
function SetCache(values) {
|
783 |
-
var index = -1,
|
784 |
-
length = values == null ? 0 : values.length;
|
785 |
-
|
786 |
-
this.__data__ = new MapCache;
|
787 |
-
while (++index < length) {
|
788 |
-
this.add(values[index]);
|
789 |
-
}
|
790 |
-
}
|
791 |
-
|
792 |
-
/**
|
793 |
-
* Adds `value` to the array cache.
|
794 |
-
*
|
795 |
-
* @private
|
796 |
-
* @name add
|
797 |
-
* @memberOf SetCache
|
798 |
-
* @alias push
|
799 |
-
* @param {*} value The value to cache.
|
800 |
-
* @returns {Object} Returns the cache instance.
|
801 |
-
*/
|
802 |
-
function setCacheAdd(value) {
|
803 |
-
this.__data__.set(value, HASH_UNDEFINED);
|
804 |
-
return this;
|
805 |
-
}
|
806 |
-
|
807 |
-
/**
|
808 |
-
* Checks if `value` is in the array cache.
|
809 |
-
*
|
810 |
-
* @private
|
811 |
-
* @name has
|
812 |
-
* @memberOf SetCache
|
813 |
-
* @param {*} value The value to search for.
|
814 |
-
* @returns {number} Returns `true` if `value` is found, else `false`.
|
815 |
-
*/
|
816 |
-
function setCacheHas(value) {
|
817 |
-
return this.__data__.has(value);
|
818 |
-
}
|
819 |
-
|
820 |
-
// Add methods to `SetCache`.
|
821 |
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
822 |
-
SetCache.prototype.has = setCacheHas;
|
823 |
-
|
824 |
-
/*------------------------------------------------------------------------*/
|
825 |
-
|
826 |
-
/**
|
827 |
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
828 |
-
*
|
829 |
-
* @private
|
830 |
-
* @param {Array} array The array to inspect.
|
831 |
-
* @param {*} key The key to search for.
|
832 |
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
833 |
-
*/
|
834 |
-
function assocIndexOf(array, key) {
|
835 |
-
var length = array.length;
|
836 |
-
while (length--) {
|
837 |
-
if (eq(array[length][0], key)) {
|
838 |
-
return length;
|
839 |
-
}
|
840 |
-
}
|
841 |
-
return -1;
|
842 |
-
}
|
843 |
-
|
844 |
-
/**
|
845 |
-
* The base implementation of `_.get` without support for default values.
|
846 |
-
*
|
847 |
-
* @private
|
848 |
-
* @param {Object} object The object to query.
|
849 |
-
* @param {Array|string} path The path of the property to get.
|
850 |
-
* @returns {*} Returns the resolved value.
|
851 |
-
*/
|
852 |
-
function baseGet(object, path) {
|
853 |
-
path = castPath(path, object);
|
854 |
-
|
855 |
-
var index = 0,
|
856 |
-
length = path.length;
|
857 |
-
|
858 |
-
while (object != null && index < length) {
|
859 |
-
object = object[toKey(path[index++])];
|
860 |
-
}
|
861 |
-
return (index && index == length) ? object : undefined;
|
862 |
-
}
|
863 |
-
|
864 |
-
/**
|
865 |
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
866 |
-
*
|
867 |
-
* @private
|
868 |
-
* @param {*} value The value to query.
|
869 |
-
* @returns {string} Returns the `toStringTag`.
|
870 |
-
*/
|
871 |
-
function baseGetTag(value) {
|
872 |
-
if (value == null) {
|
873 |
-
return value === undefined ? undefinedTag : nullTag;
|
874 |
-
}
|
875 |
-
return (symToStringTag && symToStringTag in Object(value))
|
876 |
-
? getRawTag(value)
|
877 |
-
: objectToString(value);
|
878 |
-
}
|
879 |
-
|
880 |
-
/**
|
881 |
-
* The base implementation of methods like `_.intersection`, without support
|
882 |
-
* for iteratee shorthands, that accepts an array of arrays to inspect.
|
883 |
-
*
|
884 |
-
* @private
|
885 |
-
* @param {Array} arrays The arrays to inspect.
|
886 |
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
887 |
-
* @param {Function} [comparator] The comparator invoked per element.
|
888 |
-
* @returns {Array} Returns the new array of shared values.
|
889 |
-
*/
|
890 |
-
function baseIntersection(arrays, iteratee, comparator) {
|
891 |
-
var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
892 |
-
length = arrays[0].length,
|
893 |
-
othLength = arrays.length,
|
894 |
-
othIndex = othLength,
|
895 |
-
caches = Array(othLength),
|
896 |
-
maxLength = Infinity,
|
897 |
-
result = [];
|
898 |
-
|
899 |
-
while (othIndex--) {
|
900 |
-
var array = arrays[othIndex];
|
901 |
-
if (othIndex && iteratee) {
|
902 |
-
array = arrayMap(array, baseUnary(iteratee));
|
903 |
-
}
|
904 |
-
maxLength = nativeMin(array.length, maxLength);
|
905 |
-
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
906 |
-
? new SetCache(othIndex && array)
|
907 |
-
: undefined;
|
908 |
-
}
|
909 |
-
array = arrays[0];
|
910 |
-
|
911 |
-
var index = -1,
|
912 |
-
seen = caches[0];
|
913 |
-
|
914 |
-
outer:
|
915 |
-
while (++index < length && result.length < maxLength) {
|
916 |
-
var value = array[index],
|
917 |
-
computed = iteratee ? iteratee(value) : value;
|
918 |
-
|
919 |
-
value = (comparator || value !== 0) ? value : 0;
|
920 |
-
if (!(seen
|
921 |
-
? cacheHas(seen, computed)
|
922 |
-
: includes(result, computed, comparator)
|
923 |
-
)) {
|
924 |
-
othIndex = othLength;
|
925 |
-
while (--othIndex) {
|
926 |
-
var cache = caches[othIndex];
|
927 |
-
if (!(cache
|
928 |
-
? cacheHas(cache, computed)
|
929 |
-
: includes(arrays[othIndex], computed, comparator))
|
930 |
-
) {
|
931 |
-
continue outer;
|
932 |
-
}
|
933 |
-
}
|
934 |
-
if (seen) {
|
935 |
-
seen.push(computed);
|
936 |
-
}
|
937 |
-
result.push(value);
|
938 |
-
}
|
939 |
-
}
|
940 |
-
return result;
|
941 |
-
}
|
942 |
-
|
943 |
-
/**
|
944 |
-
* The base implementation of `_.isNative` without bad shim checks.
|
945 |
-
*
|
946 |
-
* @private
|
947 |
-
* @param {*} value The value to check.
|
948 |
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
949 |
-
* else `false`.
|
950 |
-
*/
|
951 |
-
function baseIsNative(value) {
|
952 |
-
if (!isObject(value) || isMasked(value)) {
|
953 |
-
return false;
|
954 |
-
}
|
955 |
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
956 |
-
return pattern.test(toSource(value));
|
957 |
-
}
|
958 |
-
|
959 |
-
/**
|
960 |
-
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
961 |
-
*
|
962 |
-
* @private
|
963 |
-
* @param {Function} func The function to apply a rest parameter to.
|
964 |
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
965 |
-
* @returns {Function} Returns the new function.
|
966 |
-
*/
|
967 |
-
function baseRest(func, start) {
|
968 |
-
return setToString(overRest(func, start, identity), func + '');
|
969 |
-
}
|
970 |
-
|
971 |
-
/**
|
972 |
-
* The base implementation of `setToString` without support for hot loop shorting.
|
973 |
-
*
|
974 |
-
* @private
|
975 |
-
* @param {Function} func The function to modify.
|
976 |
-
* @param {Function} string The `toString` result.
|
977 |
-
* @returns {Function} Returns `func`.
|
978 |
-
*/
|
979 |
-
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
980 |
-
return defineProperty(func, 'toString', {
|
981 |
-
'configurable': true,
|
982 |
-
'enumerable': false,
|
983 |
-
'value': constant(string),
|
984 |
-
'writable': true
|
985 |
-
});
|
986 |
-
};
|
987 |
-
|
988 |
-
/**
|
989 |
-
* The base implementation of `_.toString` which doesn't convert nullish
|
990 |
-
* values to empty strings.
|
991 |
-
*
|
992 |
-
* @private
|
993 |
-
* @param {*} value The value to process.
|
994 |
-
* @returns {string} Returns the string.
|
995 |
-
*/
|
996 |
-
function baseToString(value) {
|
997 |
-
// Exit early for strings to avoid a performance hit in some environments.
|
998 |
-
if (typeof value == 'string') {
|
999 |
-
return value;
|
1000 |
-
}
|
1001 |
-
if (isArray(value)) {
|
1002 |
-
// Recursively convert values (susceptible to call stack limits).
|
1003 |
-
return arrayMap(value, baseToString) + '';
|
1004 |
-
}
|
1005 |
-
if (isSymbol(value)) {
|
1006 |
-
return symbolToString ? symbolToString.call(value) : '';
|
1007 |
-
}
|
1008 |
-
var result = (value + '');
|
1009 |
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
/**
|
1013 |
-
* Casts `value` to an empty array if it's not an array like object.
|
1014 |
-
*
|
1015 |
-
* @private
|
1016 |
-
* @param {*} value The value to inspect.
|
1017 |
-
* @returns {Array|Object} Returns the cast array-like object.
|
1018 |
-
*/
|
1019 |
-
function castArrayLikeObject(value) {
|
1020 |
-
return isArrayLikeObject(value) ? value : [];
|
1021 |
-
}
|
1022 |
-
|
1023 |
-
/**
|
1024 |
-
* Casts `value` to a path array if it's not one.
|
1025 |
-
*
|
1026 |
-
* @private
|
1027 |
-
* @param {*} value The value to inspect.
|
1028 |
-
* @param {Object} [object] The object to query keys on.
|
1029 |
-
* @returns {Array} Returns the cast property path array.
|
1030 |
-
*/
|
1031 |
-
function castPath(value, object) {
|
1032 |
-
if (isArray(value)) {
|
1033 |
-
return value;
|
1034 |
-
}
|
1035 |
-
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
1036 |
-
}
|
1037 |
-
|
1038 |
-
/**
|
1039 |
-
* Gets the data for `map`.
|
1040 |
-
*
|
1041 |
-
* @private
|
1042 |
-
* @param {Object} map The map to query.
|
1043 |
-
* @param {string} key The reference key.
|
1044 |
-
* @returns {*} Returns the map data.
|
1045 |
-
*/
|
1046 |
-
function getMapData(map, key) {
|
1047 |
-
var data = map.__data__;
|
1048 |
-
return isKeyable(key)
|
1049 |
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
1050 |
-
: data.map;
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
/**
|
1054 |
-
* Gets the native function at `key` of `object`.
|
1055 |
-
*
|
1056 |
-
* @private
|
1057 |
-
* @param {Object} object The object to query.
|
1058 |
-
* @param {string} key The key of the method to get.
|
1059 |
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
1060 |
-
*/
|
1061 |
-
function getNative(object, key) {
|
1062 |
-
var value = getValue(object, key);
|
1063 |
-
return baseIsNative(value) ? value : undefined;
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
/**
|
1067 |
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
1068 |
-
*
|
1069 |
-
* @private
|
1070 |
-
* @param {*} value The value to query.
|
1071 |
-
* @returns {string} Returns the raw `toStringTag`.
|
1072 |
-
*/
|
1073 |
-
function getRawTag(value) {
|
1074 |
-
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
1075 |
-
tag = value[symToStringTag];
|
1076 |
-
|
1077 |
-
try {
|
1078 |
-
value[symToStringTag] = undefined;
|
1079 |
-
var unmasked = true;
|
1080 |
-
} catch (e) {}
|
1081 |
-
|
1082 |
-
var result = nativeObjectToString.call(value);
|
1083 |
-
if (unmasked) {
|
1084 |
-
if (isOwn) {
|
1085 |
-
value[symToStringTag] = tag;
|
1086 |
-
} else {
|
1087 |
-
delete value[symToStringTag];
|
1088 |
-
}
|
1089 |
-
}
|
1090 |
-
return result;
|
1091 |
-
}
|
1092 |
-
|
1093 |
-
/**
|
1094 |
-
* Checks if `value` is a property name and not a property path.
|
1095 |
-
*
|
1096 |
-
* @private
|
1097 |
-
* @param {*} value The value to check.
|
1098 |
-
* @param {Object} [object] The object to query keys on.
|
1099 |
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
1100 |
-
*/
|
1101 |
-
function isKey(value, object) {
|
1102 |
-
if (isArray(value)) {
|
1103 |
-
return false;
|
1104 |
-
}
|
1105 |
-
var type = typeof value;
|
1106 |
-
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
1107 |
-
value == null || isSymbol(value)) {
|
1108 |
-
return true;
|
1109 |
-
}
|
1110 |
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
1111 |
-
(object != null && value in Object(object));
|
1112 |
-
}
|
1113 |
-
|
1114 |
-
/**
|
1115 |
-
* Checks if `value` is suitable for use as unique object key.
|
1116 |
-
*
|
1117 |
-
* @private
|
1118 |
-
* @param {*} value The value to check.
|
1119 |
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
1120 |
-
*/
|
1121 |
-
function isKeyable(value) {
|
1122 |
-
var type = typeof value;
|
1123 |
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
1124 |
-
? (value !== '__proto__')
|
1125 |
-
: (value === null);
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
/**
|
1129 |
-
* Checks if `func` has its source masked.
|
1130 |
-
*
|
1131 |
-
* @private
|
1132 |
-
* @param {Function} func The function to check.
|
1133 |
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
1134 |
-
*/
|
1135 |
-
function isMasked(func) {
|
1136 |
-
return !!maskSrcKey && (maskSrcKey in func);
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
/**
|
1140 |
-
* A specialized version of `_.memoize` which clears the memoized function's
|
1141 |
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
1142 |
-
*
|
1143 |
-
* @private
|
1144 |
-
* @param {Function} func The function to have its output memoized.
|
1145 |
-
* @returns {Function} Returns the new memoized function.
|
1146 |
-
*/
|
1147 |
-
function memoizeCapped(func) {
|
1148 |
-
var result = memoize(func, function(key) {
|
1149 |
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
1150 |
-
cache.clear();
|
1151 |
-
}
|
1152 |
-
return key;
|
1153 |
-
});
|
1154 |
-
|
1155 |
-
var cache = result.cache;
|
1156 |
-
return result;
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
/**
|
1160 |
-
* Converts `value` to a string using `Object.prototype.toString`.
|
1161 |
-
*
|
1162 |
-
* @private
|
1163 |
-
* @param {*} value The value to convert.
|
1164 |
-
* @returns {string} Returns the converted string.
|
1165 |
-
*/
|
1166 |
-
function objectToString(value) {
|
1167 |
-
return nativeObjectToString.call(value);
|
1168 |
-
}
|
1169 |
-
|
1170 |
-
/**
|
1171 |
-
* A specialized version of `baseRest` which transforms the rest array.
|
1172 |
-
*
|
1173 |
-
* @private
|
1174 |
-
* @param {Function} func The function to apply a rest parameter to.
|
1175 |
-
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
1176 |
-
* @param {Function} transform The rest array transform.
|
1177 |
-
* @returns {Function} Returns the new function.
|
1178 |
-
*/
|
1179 |
-
function overRest(func, start, transform) {
|
1180 |
-
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
1181 |
-
return function() {
|
1182 |
-
var args = arguments,
|
1183 |
-
index = -1,
|
1184 |
-
length = nativeMax(args.length - start, 0),
|
1185 |
-
array = Array(length);
|
1186 |
-
|
1187 |
-
while (++index < length) {
|
1188 |
-
array[index] = args[start + index];
|
1189 |
-
}
|
1190 |
-
index = -1;
|
1191 |
-
var otherArgs = Array(start + 1);
|
1192 |
-
while (++index < start) {
|
1193 |
-
otherArgs[index] = args[index];
|
1194 |
-
}
|
1195 |
-
otherArgs[start] = transform(array);
|
1196 |
-
return apply(func, this, otherArgs);
|
1197 |
-
};
|
1198 |
-
}
|
1199 |
-
|
1200 |
-
/**
|
1201 |
-
* Sets the `toString` method of `func` to return `string`.
|
1202 |
-
*
|
1203 |
-
* @private
|
1204 |
-
* @param {Function} func The function to modify.
|
1205 |
-
* @param {Function} string The `toString` result.
|
1206 |
-
* @returns {Function} Returns `func`.
|
1207 |
-
*/
|
1208 |
-
var setToString = shortOut(baseSetToString);
|
1209 |
-
|
1210 |
-
/**
|
1211 |
-
* Creates a function that'll short out and invoke `identity` instead
|
1212 |
-
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
1213 |
-
* milliseconds.
|
1214 |
-
*
|
1215 |
-
* @private
|
1216 |
-
* @param {Function} func The function to restrict.
|
1217 |
-
* @returns {Function} Returns the new shortable function.
|
1218 |
-
*/
|
1219 |
-
function shortOut(func) {
|
1220 |
-
var count = 0,
|
1221 |
-
lastCalled = 0;
|
1222 |
-
|
1223 |
-
return function() {
|
1224 |
-
var stamp = nativeNow(),
|
1225 |
-
remaining = HOT_SPAN - (stamp - lastCalled);
|
1226 |
-
|
1227 |
-
lastCalled = stamp;
|
1228 |
-
if (remaining > 0) {
|
1229 |
-
if (++count >= HOT_COUNT) {
|
1230 |
-
return arguments[0];
|
1231 |
-
}
|
1232 |
-
} else {
|
1233 |
-
count = 0;
|
1234 |
-
}
|
1235 |
-
return func.apply(undefined, arguments);
|
1236 |
-
};
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
/**
|
1240 |
-
* Converts `string` to a property path array.
|
1241 |
-
*
|
1242 |
-
* @private
|
1243 |
-
* @param {string} string The string to convert.
|
1244 |
-
* @returns {Array} Returns the property path array.
|
1245 |
-
*/
|
1246 |
-
var stringToPath = memoizeCapped(function(string) {
|
1247 |
-
var result = [];
|
1248 |
-
if (string.charCodeAt(0) === 46 /* . */) {
|
1249 |
-
result.push('');
|
1250 |
-
}
|
1251 |
-
string.replace(rePropName, function(match, number, quote, subString) {
|
1252 |
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
1253 |
-
});
|
1254 |
-
return result;
|
1255 |
-
});
|
1256 |
-
|
1257 |
-
/**
|
1258 |
-
* Converts `value` to a string key if it's not a string or symbol.
|
1259 |
-
*
|
1260 |
-
* @private
|
1261 |
-
* @param {*} value The value to inspect.
|
1262 |
-
* @returns {string|symbol} Returns the key.
|
1263 |
-
*/
|
1264 |
-
function toKey(value) {
|
1265 |
-
if (typeof value == 'string' || isSymbol(value)) {
|
1266 |
-
return value;
|
1267 |
-
}
|
1268 |
-
var result = (value + '');
|
1269 |
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
/**
|
1273 |
-
* Converts `func` to its source code.
|
1274 |
-
*
|
1275 |
-
* @private
|
1276 |
-
* @param {Function} func The function to convert.
|
1277 |
-
* @returns {string} Returns the source code.
|
1278 |
-
*/
|
1279 |
-
function toSource(func) {
|
1280 |
-
if (func != null) {
|
1281 |
-
try {
|
1282 |
-
return funcToString.call(func);
|
1283 |
-
} catch (e) {}
|
1284 |
-
try {
|
1285 |
-
return (func + '');
|
1286 |
-
} catch (e) {}
|
1287 |
-
}
|
1288 |
-
return '';
|
1289 |
-
}
|
1290 |
-
|
1291 |
-
/*------------------------------------------------------------------------*/
|
1292 |
-
|
1293 |
-
/**
|
1294 |
-
* Creates an array of unique values that are included in all given arrays
|
1295 |
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
1296 |
-
* for equality comparisons. The order and references of result values are
|
1297 |
-
* determined by the first array.
|
1298 |
-
*
|
1299 |
-
* @static
|
1300 |
-
* @memberOf _
|
1301 |
-
* @since 0.1.0
|
1302 |
-
* @category Array
|
1303 |
-
* @param {...Array} [arrays] The arrays to inspect.
|
1304 |
-
* @returns {Array} Returns the new array of intersecting values.
|
1305 |
-
* @example
|
1306 |
-
*
|
1307 |
-
* _.intersection([2, 1], [2, 3]);
|
1308 |
-
* // => [2]
|
1309 |
-
*/
|
1310 |
-
var intersection = baseRest(function(arrays) {
|
1311 |
-
var mapped = arrayMap(arrays, castArrayLikeObject);
|
1312 |
-
return (mapped.length && mapped[0] === arrays[0])
|
1313 |
-
? baseIntersection(mapped)
|
1314 |
-
: [];
|
1315 |
-
});
|
1316 |
-
|
1317 |
-
/*------------------------------------------------------------------------*/
|
1318 |
-
|
1319 |
-
/**
|
1320 |
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
1321 |
-
* provided, it determines the cache key for storing the result based on the
|
1322 |
-
* arguments provided to the memoized function. By default, the first argument
|
1323 |
-
* provided to the memoized function is used as the map cache key. The `func`
|
1324 |
-
* is invoked with the `this` binding of the memoized function.
|
1325 |
-
*
|
1326 |
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
1327 |
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
1328 |
-
* constructor with one whose instances implement the
|
1329 |
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
1330 |
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
1331 |
-
*
|
1332 |
-
* @static
|
1333 |
-
* @memberOf _
|
1334 |
-
* @since 0.1.0
|
1335 |
-
* @category Function
|
1336 |
-
* @param {Function} func The function to have its output memoized.
|
1337 |
-
* @param {Function} [resolver] The function to resolve the cache key.
|
1338 |
-
* @returns {Function} Returns the new memoized function.
|
1339 |
-
* @example
|
1340 |
-
*
|
1341 |
-
* var object = { 'a': 1, 'b': 2 };
|
1342 |
-
* var other = { 'c': 3, 'd': 4 };
|
1343 |
-
*
|
1344 |
-
* var values = _.memoize(_.values);
|
1345 |
-
* values(object);
|
1346 |
-
* // => [1, 2]
|
1347 |
-
*
|
1348 |
-
* values(other);
|
1349 |
-
* // => [3, 4]
|
1350 |
-
*
|
1351 |
-
* object.a = 2;
|
1352 |
-
* values(object);
|
1353 |
-
* // => [1, 2]
|
1354 |
-
*
|
1355 |
-
* // Modify the result cache.
|
1356 |
-
* values.cache.set(object, ['a', 'b']);
|
1357 |
-
* values(object);
|
1358 |
-
* // => ['a', 'b']
|
1359 |
-
*
|
1360 |
-
* // Replace `_.memoize.Cache`.
|
1361 |
-
* _.memoize.Cache = WeakMap;
|
1362 |
-
*/
|
1363 |
-
function memoize(func, resolver) {
|
1364 |
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
1365 |
-
throw new TypeError(FUNC_ERROR_TEXT);
|
1366 |
-
}
|
1367 |
-
var memoized = function() {
|
1368 |
-
var args = arguments,
|
1369 |
-
key = resolver ? resolver.apply(this, args) : args[0],
|
1370 |
-
cache = memoized.cache;
|
1371 |
-
|
1372 |
-
if (cache.has(key)) {
|
1373 |
-
return cache.get(key);
|
1374 |
-
}
|
1375 |
-
var result = func.apply(this, args);
|
1376 |
-
memoized.cache = cache.set(key, result) || cache;
|
1377 |
-
return result;
|
1378 |
-
};
|
1379 |
-
memoized.cache = new (memoize.Cache || MapCache);
|
1380 |
-
return memoized;
|
1381 |
-
}
|
1382 |
-
|
1383 |
-
// Expose `MapCache`.
|
1384 |
-
memoize.Cache = MapCache;
|
1385 |
-
|
1386 |
-
/*------------------------------------------------------------------------*/
|
1387 |
-
|
1388 |
-
/**
|
1389 |
-
* Performs a
|
1390 |
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
1391 |
-
* comparison between two values to determine if they are equivalent.
|
1392 |
-
*
|
1393 |
-
* @static
|
1394 |
-
* @memberOf _
|
1395 |
-
* @since 4.0.0
|
1396 |
-
* @category Lang
|
1397 |
-
* @param {*} value The value to compare.
|
1398 |
-
* @param {*} other The other value to compare.
|
1399 |
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
1400 |
-
* @example
|
1401 |
-
*
|
1402 |
-
* var object = { 'a': 1 };
|
1403 |
-
* var other = { 'a': 1 };
|
1404 |
-
*
|
1405 |
-
* _.eq(object, object);
|
1406 |
-
* // => true
|
1407 |
-
*
|
1408 |
-
* _.eq(object, other);
|
1409 |
-
* // => false
|
1410 |
-
*
|
1411 |
-
* _.eq('a', 'a');
|
1412 |
-
* // => true
|
1413 |
-
*
|
1414 |
-
* _.eq('a', Object('a'));
|
1415 |
-
* // => false
|
1416 |
-
*
|
1417 |
-
* _.eq(NaN, NaN);
|
1418 |
-
* // => true
|
1419 |
-
*/
|
1420 |
-
function eq(value, other) {
|
1421 |
-
return value === other || (value !== value && other !== other);
|
1422 |
-
}
|
1423 |
-
|
1424 |
-
/**
|
1425 |
-
* Checks if `value` is classified as an `Array` object.
|
1426 |
-
*
|
1427 |
-
* @static
|
1428 |
-
* @memberOf _
|
1429 |
-
* @since 0.1.0
|
1430 |
-
* @category Lang
|
1431 |
-
* @param {*} value The value to check.
|
1432 |
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
1433 |
-
* @example
|
1434 |
-
*
|
1435 |
-
* _.isArray([1, 2, 3]);
|
1436 |
-
* // => true
|
1437 |
-
*
|
1438 |
-
* _.isArray(document.body.children);
|
1439 |
-
* // => false
|
1440 |
-
*
|
1441 |
-
* _.isArray('abc');
|
1442 |
-
* // => false
|
1443 |
-
*
|
1444 |
-
* _.isArray(_.noop);
|
1445 |
-
* // => false
|
1446 |
-
*/
|
1447 |
-
var isArray = Array.isArray;
|
1448 |
-
|
1449 |
-
/**
|
1450 |
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
1451 |
-
* not a function and has a `value.length` that's an integer greater than or
|
1452 |
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
1453 |
-
*
|
1454 |
-
* @static
|
1455 |
-
* @memberOf _
|
1456 |
-
* @since 4.0.0
|
1457 |
-
* @category Lang
|
1458 |
-
* @param {*} value The value to check.
|
1459 |
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
1460 |
-
* @example
|
1461 |
-
*
|
1462 |
-
* _.isArrayLike([1, 2, 3]);
|
1463 |
-
* // => true
|
1464 |
-
*
|
1465 |
-
* _.isArrayLike(document.body.children);
|
1466 |
-
* // => true
|
1467 |
-
*
|
1468 |
-
* _.isArrayLike('abc');
|
1469 |
-
* // => true
|
1470 |
-
*
|
1471 |
-
* _.isArrayLike(_.noop);
|
1472 |
-
* // => false
|
1473 |
-
*/
|
1474 |
-
function isArrayLike(value) {
|
1475 |
-
return value != null && isLength(value.length) && !isFunction(value);
|
1476 |
-
}
|
1477 |
-
|
1478 |
-
/**
|
1479 |
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
1480 |
-
* is an object.
|
1481 |
-
*
|
1482 |
-
* @static
|
1483 |
-
* @memberOf _
|
1484 |
-
* @since 4.0.0
|
1485 |
-
* @category Lang
|
1486 |
-
* @param {*} value The value to check.
|
1487 |
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
1488 |
-
* else `false`.
|
1489 |
-
* @example
|
1490 |
-
*
|
1491 |
-
* _.isArrayLikeObject([1, 2, 3]);
|
1492 |
-
* // => true
|
1493 |
-
*
|
1494 |
-
* _.isArrayLikeObject(document.body.children);
|
1495 |
-
* // => true
|
1496 |
-
*
|
1497 |
-
* _.isArrayLikeObject('abc');
|
1498 |
-
* // => false
|
1499 |
-
*
|
1500 |
-
* _.isArrayLikeObject(_.noop);
|
1501 |
-
* // => false
|
1502 |
-
*/
|
1503 |
-
function isArrayLikeObject(value) {
|
1504 |
-
return isObjectLike(value) && isArrayLike(value);
|
1505 |
-
}
|
1506 |
-
|
1507 |
-
/**
|
1508 |
-
* Checks if `value` is classified as a `Function` object.
|
1509 |
-
*
|
1510 |
-
* @static
|
1511 |
-
* @memberOf _
|
1512 |
-
* @since 0.1.0
|
1513 |
-
* @category Lang
|
1514 |
-
* @param {*} value The value to check.
|
1515 |
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
1516 |
-
* @example
|
1517 |
-
*
|
1518 |
-
* _.isFunction(_);
|
1519 |
-
* // => true
|
1520 |
-
*
|
1521 |
-
* _.isFunction(/abc/);
|
1522 |
-
* // => false
|
1523 |
-
*/
|
1524 |
-
function isFunction(value) {
|
1525 |
-
if (!isObject(value)) {
|
1526 |
-
return false;
|
1527 |
-
}
|
1528 |
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
1529 |
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
1530 |
-
var tag = baseGetTag(value);
|
1531 |
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
1532 |
-
}
|
1533 |
-
|
1534 |
-
/**
|
1535 |
-
* Checks if `value` is a valid array-like length.
|
1536 |
-
*
|
1537 |
-
* **Note:** This method is loosely based on
|
1538 |
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
1539 |
-
*
|
1540 |
-
* @static
|
1541 |
-
* @memberOf _
|
1542 |
-
* @since 4.0.0
|
1543 |
-
* @category Lang
|
1544 |
-
* @param {*} value The value to check.
|
1545 |
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
1546 |
-
* @example
|
1547 |
-
*
|
1548 |
-
* _.isLength(3);
|
1549 |
-
* // => true
|
1550 |
-
*
|
1551 |
-
* _.isLength(Number.MIN_VALUE);
|
1552 |
-
* // => false
|
1553 |
-
*
|
1554 |
-
* _.isLength(Infinity);
|
1555 |
-
* // => false
|
1556 |
-
*
|
1557 |
-
* _.isLength('3');
|
1558 |
-
* // => false
|
1559 |
-
*/
|
1560 |
-
function isLength(value) {
|
1561 |
-
return typeof value == 'number' &&
|
1562 |
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
1563 |
-
}
|
1564 |
-
|
1565 |
-
/**
|
1566 |
-
* Checks if `value` is the
|
1567 |
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
1568 |
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
1569 |
-
*
|
1570 |
-
* @static
|
1571 |
-
* @memberOf _
|
1572 |
-
* @since 0.1.0
|
1573 |
-
* @category Lang
|
1574 |
-
* @param {*} value The value to check.
|
1575 |
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
1576 |
-
* @example
|
1577 |
-
*
|
1578 |
-
* _.isObject({});
|
1579 |
-
* // => true
|
1580 |
-
*
|
1581 |
-
* _.isObject([1, 2, 3]);
|
1582 |
-
* // => true
|
1583 |
-
*
|
1584 |
-
* _.isObject(_.noop);
|
1585 |
-
* // => true
|
1586 |
-
*
|
1587 |
-
* _.isObject(null);
|
1588 |
-
* // => false
|
1589 |
-
*/
|
1590 |
-
function isObject(value) {
|
1591 |
-
var type = typeof value;
|
1592 |
-
return value != null && (type == 'object' || type == 'function');
|
1593 |
-
}
|
1594 |
-
|
1595 |
-
/**
|
1596 |
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
1597 |
-
* and has a `typeof` result of "object".
|
1598 |
-
*
|
1599 |
-
* @static
|
1600 |
-
* @memberOf _
|
1601 |
-
* @since 4.0.0
|
1602 |
-
* @category Lang
|
1603 |
-
* @param {*} value The value to check.
|
1604 |
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
1605 |
-
* @example
|
1606 |
-
*
|
1607 |
-
* _.isObjectLike({});
|
1608 |
-
* // => true
|
1609 |
-
*
|
1610 |
-
* _.isObjectLike([1, 2, 3]);
|
1611 |
-
* // => true
|
1612 |
-
*
|
1613 |
-
* _.isObjectLike(_.noop);
|
1614 |
-
* // => false
|
1615 |
-
*
|
1616 |
-
* _.isObjectLike(null);
|
1617 |
-
* // => false
|
1618 |
-
*/
|
1619 |
-
function isObjectLike(value) {
|
1620 |
-
return value != null && typeof value == 'object';
|
1621 |
-
}
|
1622 |
-
|
1623 |
-
/**
|
1624 |
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
1625 |
-
*
|
1626 |
-
* @static
|
1627 |
-
* @memberOf _
|
1628 |
-
* @since 4.0.0
|
1629 |
-
* @category Lang
|
1630 |
-
* @param {*} value The value to check.
|
1631 |
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
1632 |
-
* @example
|
1633 |
-
*
|
1634 |
-
* _.isSymbol(Symbol.iterator);
|
1635 |
-
* // => true
|
1636 |
-
*
|
1637 |
-
* _.isSymbol('abc');
|
1638 |
-
* // => false
|
1639 |
-
*/
|
1640 |
-
function isSymbol(value) {
|
1641 |
-
return typeof value == 'symbol' ||
|
1642 |
-
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
1643 |
-
}
|
1644 |
-
|
1645 |
-
/**
|
1646 |
-
* Converts `value` to a string. An empty string is returned for `null`
|
1647 |
-
* and `undefined` values. The sign of `-0` is preserved.
|
1648 |
-
*
|
1649 |
-
* @static
|
1650 |
-
* @memberOf _
|
1651 |
-
* @since 4.0.0
|
1652 |
-
* @category Lang
|
1653 |
-
* @param {*} value The value to convert.
|
1654 |
-
* @returns {string} Returns the converted string.
|
1655 |
-
* @example
|
1656 |
-
*
|
1657 |
-
* _.toString(null);
|
1658 |
-
* // => ''
|
1659 |
-
*
|
1660 |
-
* _.toString(-0);
|
1661 |
-
* // => '-0'
|
1662 |
-
*
|
1663 |
-
* _.toString([1, 2, 3]);
|
1664 |
-
* // => '1,2,3'
|
1665 |
-
*/
|
1666 |
-
function toString(value) {
|
1667 |
-
return value == null ? '' : baseToString(value);
|
1668 |
-
}
|
1669 |
-
|
1670 |
-
/*------------------------------------------------------------------------*/
|
1671 |
-
|
1672 |
-
/**
|
1673 |
-
* Gets the value at `path` of `object`. If the resolved value is
|
1674 |
-
* `undefined`, the `defaultValue` is returned in its place.
|
1675 |
-
*
|
1676 |
-
* @static
|
1677 |
-
* @memberOf _
|
1678 |
-
* @since 3.7.0
|
1679 |
-
* @category Object
|
1680 |
-
* @param {Object} object The object to query.
|
1681 |
-
* @param {Array|string} path The path of the property to get.
|
1682 |
-
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
1683 |
-
* @returns {*} Returns the resolved value.
|
1684 |
-
* @example
|
1685 |
-
*
|
1686 |
-
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
1687 |
-
*
|
1688 |
-
* _.get(object, 'a[0].b.c');
|
1689 |
-
* // => 3
|
1690 |
-
*
|
1691 |
-
* _.get(object, ['a', '0', 'b', 'c']);
|
1692 |
-
* // => 3
|
1693 |
-
*
|
1694 |
-
* _.get(object, 'a.b.c', 'default');
|
1695 |
-
* // => 'default'
|
1696 |
-
*/
|
1697 |
-
function get(object, path, defaultValue) {
|
1698 |
-
var result = object == null ? undefined : baseGet(object, path);
|
1699 |
-
return result === undefined ? defaultValue : result;
|
1700 |
-
}
|
1701 |
-
|
1702 |
-
/*------------------------------------------------------------------------*/
|
1703 |
-
|
1704 |
-
/**
|
1705 |
-
* Creates a function that returns `value`.
|
1706 |
-
*
|
1707 |
-
* @static
|
1708 |
-
* @memberOf _
|
1709 |
-
* @since 2.4.0
|
1710 |
-
* @category Util
|
1711 |
-
* @param {*} value The value to return from the new function.
|
1712 |
-
* @returns {Function} Returns the new constant function.
|
1713 |
-
* @example
|
1714 |
-
*
|
1715 |
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
1716 |
-
*
|
1717 |
-
* console.log(objects);
|
1718 |
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
1719 |
-
*
|
1720 |
-
* console.log(objects[0] === objects[1]);
|
1721 |
-
* // => true
|
1722 |
-
*/
|
1723 |
-
function constant(value) {
|
1724 |
-
return function() {
|
1725 |
-
return value;
|
1726 |
-
};
|
1727 |
-
}
|
1728 |
-
|
1729 |
-
/**
|
1730 |
-
* This method returns the first argument it receives.
|
1731 |
-
*
|
1732 |
-
* @static
|
1733 |
-
* @since 0.1.0
|
1734 |
-
* @memberOf _
|
1735 |
-
* @category Util
|
1736 |
-
* @param {*} value Any value.
|
1737 |
-
* @returns {*} Returns `value`.
|
1738 |
-
* @example
|
1739 |
-
*
|
1740 |
-
* var object = { 'a': 1 };
|
1741 |
-
*
|
1742 |
-
* console.log(_.identity(object) === object);
|
1743 |
-
* // => true
|
1744 |
-
*/
|
1745 |
-
function identity(value) {
|
1746 |
-
return value;
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
/*------------------------------------------------------------------------*/
|
1750 |
-
|
1751 |
-
// Add methods that return wrapped values in chain sequences.
|
1752 |
-
lodash.constant = constant;
|
1753 |
-
lodash.intersection = intersection;
|
1754 |
-
lodash.memoize = memoize;
|
1755 |
-
|
1756 |
-
/*------------------------------------------------------------------------*/
|
1757 |
-
|
1758 |
-
// Add methods that return unwrapped values in chain sequences.
|
1759 |
-
lodash.eq = eq;
|
1760 |
-
lodash.get = get;
|
1761 |
-
lodash.identity = identity;
|
1762 |
-
lodash.isArray = isArray;
|
1763 |
-
lodash.isArrayLike = isArrayLike;
|
1764 |
-
lodash.isArrayLikeObject = isArrayLikeObject;
|
1765 |
-
lodash.isFunction = isFunction;
|
1766 |
-
lodash.isLength = isLength;
|
1767 |
-
lodash.isObject = isObject;
|
1768 |
-
lodash.isObjectLike = isObjectLike;
|
1769 |
-
lodash.isSymbol = isSymbol;
|
1770 |
-
lodash.toString = toString;
|
1771 |
-
|
1772 |
-
/*------------------------------------------------------------------------*/
|
1773 |
-
|
1774 |
-
/**
|
1775 |
-
* The semantic version number.
|
1776 |
-
*
|
1777 |
-
* @static
|
1778 |
-
* @memberOf _
|
1779 |
-
* @type {string}
|
1780 |
-
*/
|
1781 |
-
lodash.VERSION = VERSION;
|
1782 |
-
|
1783 |
-
/*--------------------------------------------------------------------------*/
|
1784 |
-
|
1785 |
-
// Some AMD build optimizers, like r.js, check for condition patterns like:
|
1786 |
-
if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
|
1787 |
-
// Expose Lodash on the global object to prevent errors when Lodash is
|
1788 |
-
// loaded by a script tag in the presence of an AMD loader.
|
1789 |
-
// See http://requirejs.org/docs/errors.html#mismatch for more details.
|
1790 |
-
// Use `_.noConflict` to remove Lodash from the global object.
|
1791 |
-
root._ = lodash;
|
1792 |
-
|
1793 |
-
// Define as an anonymous module so, through path mapping, it can be
|
1794 |
-
// referenced as the "underscore" module.
|
1795 |
-
define(function() {
|
1796 |
-
return lodash;
|
1797 |
-
});
|
1798 |
-
}
|
1799 |
-
// Check for `exports` after `define` in case a build optimizer adds it.
|
1800 |
-
else if (freeModule) {
|
1801 |
-
// Export for Node.js.
|
1802 |
-
(freeModule.exports = lodash)._ = lodash;
|
1803 |
-
// Export for CommonJS support.
|
1804 |
-
freeExports._ = lodash;
|
1805 |
-
}
|
1806 |
-
else {
|
1807 |
-
// Export to the global object.
|
1808 |
-
root._ = lodash;
|
1809 |
-
}
|
1810 |
-
}.call(this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/lodash.custom.min.js
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* @license
|
3 |
-
* Lodash (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
4 |
-
* Build: `lodash include="get,intersection" -o js/lodash.custom.js`
|
5 |
-
*/
|
6 |
-
;(function(){function t(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function e(t,e){var n;if(n=!(null==t||!t.length)){if(e===e)t:{n=-1;for(var o=t.length;++n<o;)if(t[n]===e)break t;n=-1}else t:{n=r;for(var o=t.length,i=-1;++i<o;)if(n(t[i],i,t)){n=i;break t}n=-1}n=-1<n}return n}function n(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function r(t){
|
7 |
-
return t!==t}function o(){}function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function c(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new a;++e<n;)this.add(t[e])}function l(t,e){for(var n=t.length;n--;)if(b(t[n][0],e))return n;return-1}function s(t){
|
8 |
-
if(null==t)t=t===k?"[object Undefined]":"[object Null]";else if(K&&K in Object(t)){var e=U.call(t,K),n=t[K];try{t[K]=k;var r=true}catch(t){}var o=B.call(t);r&&(e?t[K]=n:delete t[K]),t=o}else t=B.call(t);return t}function f(t){if(typeof t=="string")return t;if(ot(t))return n(t,f)+"";if(A(t))return et?et.call(t):"";var e=t+"";return"0"==e&&1/t==-F?"-0":e}function h(t){return j(t)?t:[]}function p(t,e){var n=t.__data__,r=typeof e;return("string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?n[typeof e=="string"?"string":"hash"]:n.map;
|
9 |
-
}function _(t,e){var n=null==t?k:t[e];return(!w(n)||V&&V in n?0:(m(n)?H:L).test(d(n)))?n:k}function y(e,n,r){return n=W(n===k?e.length-1:n,0),function(){for(var o=arguments,i=-1,u=W(o.length-n,0),a=Array(u);++i<u;)a[i]=o[n+i];for(i=-1,u=Array(n+1);++i<n;)u[i]=o[i];return u[n]=r(a),t(e,this,u)}}function d(t){if(null!=t){try{return G.call(t)}catch(t){}return t+""}return""}function g(t,e){function n(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;return i.has(o)?i.get(o):(r=t.apply(this,r),n.cache=i.set(o,r)||i,
|
10 |
-
r)}if(typeof t!="function"||null!=e&&typeof e!="function")throw new TypeError("Expected a function");return n.cache=new(g.Cache||a),n}function b(t,e){return t===e||t!==t&&e!==e}function v(t){return null!=t&&O(t.length)&&!m(t)}function j(t){return z(t)&&v(t)}function m(t){return!!w(t)&&(t=s(t),"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function O(t){return typeof t=="number"&&-1<t&&0==t%1&&9007199254740991>=t}function w(t){var e=typeof t;
|
11 |
-
return null!=t&&("object"==e||"function"==e)}function z(t){return null!=t&&typeof t=="object"}function A(t){return typeof t=="symbol"||z(t)&&"[object Symbol]"==s(t)}function S(t){return null==t?"":f(t)}function x(t){return function(){return t}}function $(t){return t}var k,F=1/0,E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/,T=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,C=/\\(\\)?/g,L=/^\[object .+?Constructor\]$/,M=typeof self=="object"&&self&&self.Object===Object&&self,M=typeof global=="object"&&global&&global.Object===Object&&global||M||Function("return this")(),R=typeof exports=="object"&&exports&&!exports.nodeType&&exports,I=R&&typeof module=="object"&&module&&!module.nodeType&&module,N=Array.prototype,q=Object.prototype,D=M["__core-js_shared__"],G=Function.prototype.toString,U=q.hasOwnProperty,V=function(){
|
12 |
-
var t=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),B=q.toString,H=RegExp("^"+G.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=M.Symbol,J=N.splice,K=q?q.toStringTag:k,Q=function(){try{var t=_(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),W=Math.max,X=Math.min,Y=Date.now,Z=_(M,"Map"),tt=_(Object,"create"),et=(N=q?q.prototype:k)?N.toString:k;i.prototype.clear=function(){this.__data__=tt?tt(null):{},
|
13 |
-
this.size=0},i.prototype.delete=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},i.prototype.get=function(t){var e=this.__data__;return tt?(t=e[t],"__lodash_hash_undefined__"===t?k:t):U.call(e,t)?e[t]:k},i.prototype.has=function(t){var e=this.__data__;return tt?e[t]!==k:U.call(e,t)},i.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=tt&&e===k?"__lodash_hash_undefined__":e,this},u.prototype.clear=function(){this.__data__=[],this.size=0;
|
14 |
-
},u.prototype.delete=function(t){var e=this.__data__;return t=l(e,t),!(0>t)&&(t==e.length-1?e.pop():J.call(e,t,1),--this.size,true)},u.prototype.get=function(t){var e=this.__data__;return t=l(e,t),0>t?k:e[t][1]},u.prototype.has=function(t){return-1<l(this.__data__,t)},u.prototype.set=function(t,e){var n=this.__data__,r=l(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this},a.prototype.clear=function(){this.size=0,this.__data__={hash:new i,map:new(Z||u),string:new i}},a.prototype.delete=function(t){
|
15 |
-
return t=p(this,t).delete(t),this.size-=t?1:0,t},a.prototype.get=function(t){return p(this,t).get(t)},a.prototype.has=function(t){return p(this,t).has(t)},a.prototype.set=function(t,e){var n=p(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},c.prototype.add=c.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},c.prototype.has=function(t){return this.__data__.has(t)};var nt=function(t){var e=0,n=0;return function(){var r=Y(),o=16-(r-n);if(n=r,0<o){
|
16 |
-
if(800<=++e)return arguments[0]}else e=0;return t.apply(k,arguments)}}(Q?function(t,e){return Q(t,"toString",{configurable:true,enumerable:false,value:x(e),writable:true})}:$),rt=function(t){t=g(t,function(t){return 500===e.size&&e.clear(),t});var e=t.cache;return t}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(T,function(t,n,r,o){e.push(r?o.replace(C,"$1"):n||t)}),e}),N=function(t,e){return nt(y(t,e,$),t+"")}(function(t){var r=n(t,h);if(r.length&&r[0]===t[0]){t=r[0].length;for(var o=r.length,i=o,u=Array(o),a=1/0,l=[];i--;){
|
17 |
-
var s=r[i],a=X(s.length,a);u[i]=120<=t&&120<=s.length?new c(i&&s):k}var s=r[0],f=-1,p=u[0];t:for(;++f<t&&l.length<a;){var _=s[f],y=_,_=0!==_?_:0;if(p?!p.has(y):!e(l,y)){for(i=o;--i;){var d=u[i];if(d?!d.has(y):!e(r[i],y))continue t}p&&p.push(y),l.push(_)}}r=l}else r=[];return r});g.Cache=a;var ot=Array.isArray;o.constant=x,o.intersection=N,o.memoize=g,o.eq=b,o.get=function(t,e,n){if(null==t)t=k;else{var r=t;if(!ot(e)){if(ot(e))r=false;else var o=typeof e,r=!("number"!=o&&"symbol"!=o&&"boolean"!=o&&null!=e&&!A(e))||(P.test(e)||!E.test(e)||null!=r&&e in Object(r));
|
18 |
-
e=r?[e]:rt(S(e))}for(r=0,o=e.length;null!=t&&r<o;){var i;if(i=e[r++],typeof i!="string"&&!A(i)){var u=i+"";i="0"==u&&1/i==-F?"-0":u}t=t[i]}t=r&&r==o?t:k}return t===k?n:t},o.identity=$,o.isArray=ot,o.isArrayLike=v,o.isArrayLikeObject=j,o.isFunction=m,o.isLength=O,o.isObject=w,o.isObjectLike=z,o.isSymbol=A,o.toString=S,o.VERSION="4.17.5",typeof define=="function"&&typeof define.amd=="object"&&define.amd?(M._=o, define(function(){return o})):I?((I.exports=o)._=o,R._=o):M._=o}).call(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/ccpa.php
CHANGED
@@ -31,7 +31,7 @@ class CcpaBlacklistOnLookup {
|
|
31 |
}
|
32 |
|
33 |
public function addFilters() {
|
34 |
-
add_filter('geoip_detect2_record_data_override_lookup',
|
35 |
}
|
36 |
|
37 |
public function onBeforeLookup($data, $ip, $options) {
|
@@ -85,7 +85,7 @@ class CcpaBlacklistOnLookup {
|
|
85 |
// Only load once
|
86 |
if (!is_null(self::$list)) return;
|
87 |
|
88 |
-
$list =
|
89 |
|
90 |
/**
|
91 |
* Filter: geoip_detect2_maxmind_ccpa_blacklist_ip_subnets
|
@@ -107,7 +107,7 @@ class CcpaBlacklistOnLookup {
|
|
107 |
(new CcpaBlacklistOnLookup)->addFilters();
|
108 |
|
109 |
/*
|
110 |
-
if (
|
111 |
|
112 |
add_filter('geoip_detect2_maxmind_ccpa_blacklist_ip_subnets', function() {
|
113 |
$ccpaBlacklistStub = [];
|
@@ -137,8 +137,8 @@ class RetrieveCcpaBlacklist {
|
|
137 |
}
|
138 |
|
139 |
public function addFilters() {
|
140 |
-
add_filter('geoip_detect2_maxmind_ccpa_blacklist_ip_subnets',
|
141 |
-
add_action('geoip_detect2_maxmind_ccpa_blacklist_do_upate',
|
142 |
}
|
143 |
|
144 |
public function onBlacklistLoad($list) {
|
@@ -245,7 +245,7 @@ class RetrieveCcpaBlacklist {
|
|
245 |
|
246 |
class CcpaBlacklistCron {
|
247 |
public function addFilter() {
|
248 |
-
add_action('geoipdetectccpaupdate',
|
249 |
}
|
250 |
|
251 |
public function hook_cron() {
|
31 |
}
|
32 |
|
33 |
public function addFilters() {
|
34 |
+
add_filter('geoip_detect2_record_data_override_lookup', [ $this, 'onBeforeLookup' ], 9, 3);
|
35 |
}
|
36 |
|
37 |
public function onBeforeLookup($data, $ip, $options) {
|
85 |
// Only load once
|
86 |
if (!is_null(self::$list)) return;
|
87 |
|
88 |
+
$list = [];
|
89 |
|
90 |
/**
|
91 |
* Filter: geoip_detect2_maxmind_ccpa_blacklist_ip_subnets
|
107 |
(new CcpaBlacklistOnLookup)->addFilters();
|
108 |
|
109 |
/*
|
110 |
+
if (GEOIP_DETECT_DEBUG) {
|
111 |
|
112 |
add_filter('geoip_detect2_maxmind_ccpa_blacklist_ip_subnets', function() {
|
113 |
$ccpaBlacklistStub = [];
|
137 |
}
|
138 |
|
139 |
public function addFilters() {
|
140 |
+
add_filter('geoip_detect2_maxmind_ccpa_blacklist_ip_subnets', [ $this, 'onBlacklistLoad' ]);
|
141 |
+
add_action('geoip_detect2_maxmind_ccpa_blacklist_do_upate', [ $this, 'doUpdate' ]);
|
142 |
}
|
143 |
|
144 |
public function onBlacklistLoad($list) {
|
245 |
|
246 |
class CcpaBlacklistCron {
|
247 |
public function addFilter() {
|
248 |
+
add_action('geoipdetectccpaupdate', [ $this, 'hook_cron', 10, 1 ]);
|
249 |
}
|
250 |
|
251 |
public function hook_cron() {
|
lib/geonames/geonames-country-info.php
CHANGED
@@ -25,7 +25,7 @@ define ('GEOIP_DETECT_GEONAMES_COUNTRY_FLAGS', GEOIP_PLUGIN_DIR . '/lib/geonames
|
|
25 |
|
26 |
class CountryInformation {
|
27 |
|
28 |
-
protected $data =
|
29 |
|
30 |
protected function lazyLoadInformation($filename) {
|
31 |
if (!isset($this->data[$filename])) {
|
@@ -46,7 +46,7 @@ class CountryInformation {
|
|
46 |
return array_keys($data['countries']);
|
47 |
|
48 |
if (!isset($data['countries'][$iso]))
|
49 |
-
return
|
50 |
|
51 |
$country = $data['countries'][$iso];
|
52 |
if (isset($country['continent']) && is_string($country['continent']))
|
25 |
|
26 |
class CountryInformation {
|
27 |
|
28 |
+
protected $data = [];
|
29 |
|
30 |
protected function lazyLoadInformation($filename) {
|
31 |
if (!isset($this->data[$filename])) {
|
46 |
return array_keys($data['countries']);
|
47 |
|
48 |
if (!isset($data['countries'][$iso]))
|
49 |
+
return [];
|
50 |
|
51 |
$country = $data['countries'][$iso];
|
52 |
if (isset($country['continent']) && is_string($country['continent']))
|
lib/logger.php
CHANGED
@@ -29,7 +29,7 @@ class Logger {
|
|
29 |
|
30 |
// Other errors to log: lookup, API
|
31 |
|
32 |
-
public static function logIfError($str, $category = '', $data =
|
33 |
if (is_wp_error($str)) {
|
34 |
$code = $str->get_error_code();
|
35 |
if ($code && in_array($code, self::$ignoreErrorCodes)) {
|
@@ -47,7 +47,7 @@ class Logger {
|
|
47 |
}
|
48 |
}
|
49 |
|
50 |
-
public static function log($str, $category = '', $data =
|
51 |
$str = sanitize_text_field($str);
|
52 |
|
53 |
// For now, only log the last error
|
29 |
|
30 |
// Other errors to log: lookup, API
|
31 |
|
32 |
+
public static function logIfError($str, $category = '', $data = []) {
|
33 |
if (is_wp_error($str)) {
|
34 |
$code = $str->get_error_code();
|
35 |
if ($code && in_array($code, self::$ignoreErrorCodes)) {
|
47 |
}
|
48 |
}
|
49 |
|
50 |
+
public static function log($str, $category = '', $data = []) {
|
51 |
$str = sanitize_text_field($str);
|
52 |
|
53 |
// For now, only log the last error
|
package.json
CHANGED
@@ -15,22 +15,22 @@
|
|
15 |
},
|
16 |
"private": false,
|
17 |
"dependencies": {
|
18 |
-
"@babel/runtime": "7.
|
19 |
"emoji-flags": "1.3.0",
|
20 |
-
"just-compare": "2.
|
21 |
-
"just-intersect": "4.
|
22 |
-
"just-safe-get": "4.
|
23 |
-
"just-safe-set": "4.
|
24 |
},
|
25 |
"devDependencies": {
|
26 |
-
"@babel/core": "7.
|
27 |
-
"@babel/plugin-transform-runtime": "7.
|
28 |
-
"@babel/preset-env": "7.
|
29 |
-
"babel-jest": "27.
|
30 |
"babel-plugin-transform-class-properties": "6.24.1",
|
31 |
-
"eslint": "
|
32 |
-
"jest": "27.
|
33 |
-
"parcel": "2.0
|
34 |
},
|
35 |
"browserslist": "> 0.2%, last 2 versions, Firefox ESR, not dead",
|
36 |
"jest": {
|
15 |
},
|
16 |
"private": false,
|
17 |
"dependencies": {
|
18 |
+
"@babel/runtime": "7.19.4",
|
19 |
"emoji-flags": "1.3.0",
|
20 |
+
"just-compare": "2.2.2",
|
21 |
+
"just-intersect": "4.2.1",
|
22 |
+
"just-safe-get": "4.1.1",
|
23 |
+
"just-safe-set": "4.1.1"
|
24 |
},
|
25 |
"devDependencies": {
|
26 |
+
"@babel/core": "7.19.6",
|
27 |
+
"@babel/plugin-transform-runtime": "7.19.6",
|
28 |
+
"@babel/preset-env": "7.19.4",
|
29 |
+
"babel-jest": "27.5.1",
|
30 |
"babel-plugin-transform-class-properties": "6.24.1",
|
31 |
+
"eslint": "8.8.0",
|
32 |
+
"jest": "27.5.1",
|
33 |
+
"parcel": "2.7.0"
|
34 |
},
|
35 |
"browserslist": "> 0.2%, last 2 versions, Firefox ESR, not dead",
|
36 |
"jest": {
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: benjaminpick
|
3 |
Tags: geolocation, locator, geoip, maxmind, ipstack
|
4 |
Requires at least: 5.0
|
5 |
-
Tested up to:
|
6 |
Requires PHP: 7.2
|
7 |
Stable tag: trunk
|
8 |
License: GPLv3 or later
|
@@ -22,6 +22,7 @@ Provides geographic information detected by an IP adress. This can be used in th
|
|
22 |
* Commercial Web-API: [Maxmind GeoIP2 Precision](https://www.maxmind.com/en/geoip2-precision-services) (City, Country or Insights)
|
23 |
* Hosting-Provider dependent: [Cloudflare](https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-) or [Amazon AWS CloudFront](https://aws.amazon.com/blogs/aws/enhanced-cloudfront-customization/) (Country)
|
24 |
* Free or Commercial Web-API: [Ipstack](https://ipstack.com)
|
|
|
25 |
* Provides these 5 functions (see [API Documentation](https://github.com/yellowtree/geoip-detect/wiki/API:-PHP)):
|
26 |
* `geoip_detect2_get_info_from_ip($ip, $locales = array('en'), $options = array())`: Lookup Geo-Information of the specified IP
|
27 |
* `geoip_detect2_get_info_from_current_ip($locales = array('en'), $options = array())`: Lookup Geo-Information of the current website user
|
@@ -169,6 +170,19 @@ If you use Maxmind "Automatic download" then you need to upgrade to this plugin
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
= 5.0.0 =
|
173 |
In this release, there a small breaking changes marked by [!].
|
174 |
|
@@ -179,10 +193,10 @@ AJAX mode:
|
|
179 |
* FIX: In AJAX mode, the shortcode `[geoip_detect2_show_if]` renders as a `<div>` if it detects that the containing content has HTML block level elements
|
180 |
* NEW (Beta): In AJAX mode, the new property `autosave` saves the user input as local override for this browser. `[geoip_detect2_countries mycountry autosave]` and `[geoip_detect2_text_input city property:city autosave]`. (Please give feedback if this works as expected!)
|
181 |
* FIX: In AJAX mode, calling the method `set_override(record, duration_in_days)` now refreshes the AJAX shortcodes and CSS body classes.
|
182 |
-
-> Thus, it is now possible to quickly implement different content for different countries with an autodetected default country, see
|
183 |
|
184 |
Other changes:
|
185 |
-
* NEW: Drastically improving performance if the
|
186 |
* UI: Showing the time for the subsequent lookup on the Test Lookup page
|
187 |
* FIX: Maxmind Datasource: Check if the database file is really a file, not a directory
|
188 |
* NEW: Header Datasource: Now a custom HTTP header can be used via the wordpress filter `geoip_detect2_source_header_http_key`
|
2 |
Contributors: benjaminpick
|
3 |
Tags: geolocation, locator, geoip, maxmind, ipstack
|
4 |
Requires at least: 5.0
|
5 |
+
Tested up to: 6.1
|
6 |
Requires PHP: 7.2
|
7 |
Stable tag: trunk
|
8 |
License: GPLv3 or later
|
22 |
* Commercial Web-API: [Maxmind GeoIP2 Precision](https://www.maxmind.com/en/geoip2-precision-services) (City, Country or Insights)
|
23 |
* Hosting-Provider dependent: [Cloudflare](https://support.cloudflare.com/hc/en-us/articles/200168236-What-does-CloudFlare-IP-Geolocation-do-) or [Amazon AWS CloudFront](https://aws.amazon.com/blogs/aws/enhanced-cloudfront-customization/) (Country)
|
24 |
* Free or Commercial Web-API: [Ipstack](https://ipstack.com)
|
25 |
+
* Commercial Web-API via AWS Marketplace: [Fastah](https://aws.amazon.com/marketplace/pp/prodview-k5gjowexrefl2)
|
26 |
* Provides these 5 functions (see [API Documentation](https://github.com/yellowtree/geoip-detect/wiki/API:-PHP)):
|
27 |
* `geoip_detect2_get_info_from_ip($ip, $locales = array('en'), $options = array())`: Lookup Geo-Information of the specified IP
|
28 |
* `geoip_detect2_get_info_from_current_ip($locales = array('en'), $options = array())`: Lookup Geo-Information of the current website user
|
170 |
|
171 |
== Changelog ==
|
172 |
|
173 |
+
= 5.1.0 =
|
174 |
+
|
175 |
+
New Datasource: Fastah Web API (beta), see https://aws.amazon.com/marketplace/pp/prodview-k5gjowexrefl2
|
176 |
+
|
177 |
+
AJAX mode:
|
178 |
+
* NEW: The JS function `geoip_detect.set_override_with_merge` can modify the override record in one property, merging it with the currently saved property
|
179 |
+
|
180 |
+
Other minor changes:
|
181 |
+
* FIX: In non-AJAX mode, properties such as "extra.original.zip" can be accessed again
|
182 |
+
* FIX: Automatic download of Maxmind database now also works when the temp folder is group/world writeable (as in AWS configurations)
|
183 |
+
* If you want to enable more Warnings (e.g. while debugging), you can add `define('GEOIP_DETECT_DEBUG', true)` to your wp-config.php or so.
|
184 |
+
* Library updates
|
185 |
+
|
186 |
= 5.0.0 =
|
187 |
In this release, there a small breaking changes marked by [!].
|
188 |
|
193 |
* FIX: In AJAX mode, the shortcode `[geoip_detect2_show_if]` renders as a `<div>` if it detects that the containing content has HTML block level elements
|
194 |
* NEW (Beta): In AJAX mode, the new property `autosave` saves the user input as local override for this browser. `[geoip_detect2_countries mycountry autosave]` and `[geoip_detect2_text_input city property:city autosave]`. (Please give feedback if this works as expected!)
|
195 |
* FIX: In AJAX mode, calling the method `set_override(record, duration_in_days)` now refreshes the AJAX shortcodes and CSS body classes.
|
196 |
+
-> Thus, it is now possible to quickly implement different content for different countries with an autodetected default country, see https://github.com/yellowtree/geoip-detect/wiki/API-Usage-Examples#country-selector-that-can-be-overridden-by-the-user
|
197 |
|
198 |
Other changes:
|
199 |
+
* NEW: Drastically improving performance if the lookup is performed for the current IP more than once (e.g. because of shortcodes without AJAX mode)
|
200 |
* UI: Showing the time for the subsequent lookup on the Test Lookup page
|
201 |
* FIX: Maxmind Datasource: Check if the database file is really a file, not a directory
|
202 |
* NEW: Header Datasource: Now a custom HTTP header can be used via the wordpress filter `geoip_detect2_source_header_http_key`
|
shortcodes/_helpers.php
CHANGED
@@ -96,7 +96,7 @@ function _geoip_detect2_html_contains_block_elements($html) {
|
|
96 |
'table',
|
97 |
];
|
98 |
foreach ($blocklevelElements as $element) {
|
99 |
-
if (
|
100 |
if (preg_match('#<' . $element . '[\s/>]#', $html)) {
|
101 |
return true;
|
102 |
}
|
96 |
'table',
|
97 |
];
|
98 |
foreach ($blocklevelElements as $element) {
|
99 |
+
if (str_contains($html, '<' . $element)) {
|
100 |
if (preg_match('#<' . $element . '[\s/>]#', $html)) {
|
101 |
return true;
|
102 |
}
|
shortcodes/cf7.php
CHANGED
@@ -6,12 +6,12 @@ add_action( 'wpcf7_init', 'geoip_detect2_add_wpcf7_shortcodes' );
|
|
6 |
function geoip_detect2_add_wpcf7_shortcodes() {
|
7 |
if (function_exists('wpcf7_add_form_tag')) {
|
8 |
// >=CF 4.6
|
9 |
-
wpcf7_add_form_tag(
|
10 |
-
wpcf7_add_form_tag(
|
11 |
} else if (function_exists('wpcf7_add_shortcode')) {
|
12 |
// < CF 4.6
|
13 |
-
wpcf7_add_shortcode(
|
14 |
-
wpcf7_add_shortcode(
|
15 |
}
|
16 |
}
|
17 |
|
@@ -48,7 +48,7 @@ function geoip_detect2_shortcode_country_select_wpcf7($tag) {
|
|
48 |
$tag = new WPCF7_FormTag( $tag );
|
49 |
|
50 |
$default = (string) reset( $tag->values );
|
51 |
-
$default = $tag->get_default_option($default,
|
52 |
$default = wpcf7_get_hangover( $tag->name, $default ); // Get from $_POST if available
|
53 |
|
54 |
$class = wpcf7_form_controls_class( $tag->type );
|
@@ -111,7 +111,7 @@ function geoip_detect2_shortcode_text_input_wpcf7($tag) {
|
|
111 |
$tag = new WPCF7_FormTag( $tag );
|
112 |
|
113 |
$default = (string) reset( $tag->values );
|
114 |
-
$default = $tag->get_default_option($default,
|
115 |
$default = wpcf7_get_hangover( $tag->name, $default ); // Get from $_POST if available
|
116 |
|
117 |
$class = wpcf7_form_controls_class( $tag->type );
|
@@ -161,7 +161,7 @@ function geoip_detect2_cf7_property_underscore_to_normal($name) {
|
|
161 |
}
|
162 |
|
163 |
function geoip_detect2_shortcode_user_info_wpcf7($output, $name, $isHtml) {
|
164 |
-
$lines =
|
165 |
|
166 |
// Custom property, e.g. `[geoip_detect2_property_extra__flag]`
|
167 |
$parts = explode('geoip_detect2_property_', $name);
|
6 |
function geoip_detect2_add_wpcf7_shortcodes() {
|
7 |
if (function_exists('wpcf7_add_form_tag')) {
|
8 |
// >=CF 4.6
|
9 |
+
wpcf7_add_form_tag([ 'geoip_detect2_countries', 'geoip_detect2_countries*' ], 'geoip_detect2_shortcode_country_select_wpcf7', true);
|
10 |
+
wpcf7_add_form_tag([ 'geoip_detect2_text_input', 'geoip_detect2_text_input*' ], 'geoip_detect2_shortcode_text_input_wpcf7', true);
|
11 |
} else if (function_exists('wpcf7_add_shortcode')) {
|
12 |
// < CF 4.6
|
13 |
+
wpcf7_add_shortcode([ 'geoip_detect2_countries', 'geoip_detect2_countries*' ], 'geoip_detect2_shortcode_country_select_wpcf7', true);
|
14 |
+
wpcf7_add_shortcode([ 'geoip_detect2_text_input', 'geoip_detect2_text_input*' ], 'geoip_detect2_shortcode_text_input_wpcf7', true);
|
15 |
}
|
16 |
}
|
17 |
|
48 |
$tag = new WPCF7_FormTag( $tag );
|
49 |
|
50 |
$default = (string) reset( $tag->values );
|
51 |
+
$default = $tag->get_default_option($default, [ 'multiple' => false ]);
|
52 |
$default = wpcf7_get_hangover( $tag->name, $default ); // Get from $_POST if available
|
53 |
|
54 |
$class = wpcf7_form_controls_class( $tag->type );
|
111 |
$tag = new WPCF7_FormTag( $tag );
|
112 |
|
113 |
$default = (string) reset( $tag->values );
|
114 |
+
$default = $tag->get_default_option($default, [ 'multiple' => false ]);
|
115 |
$default = wpcf7_get_hangover( $tag->name, $default ); // Get from $_POST if available
|
116 |
|
117 |
$class = wpcf7_form_controls_class( $tag->type );
|
161 |
}
|
162 |
|
163 |
function geoip_detect2_shortcode_user_info_wpcf7($output, $name, $isHtml) {
|
164 |
+
$lines = [];
|
165 |
|
166 |
// Custom property, e.g. `[geoip_detect2_property_extra__flag]`
|
167 |
$parts = explode('geoip_detect2_property_', $name);
|
shortcodes/flags.php
CHANGED
@@ -52,7 +52,7 @@ function geoip_detect2_shortcode_current_flag($orig_attr, $content = '', $shortc
|
|
52 |
), $orig_attr, $shortcodeName);
|
53 |
|
54 |
$skipCache = filter_var($attr['skip_cache'], FILTER_VALIDATE_BOOLEAN );
|
55 |
-
$options =
|
56 |
|
57 |
$style = '';
|
58 |
$processCssProperty = function($name, $value) {
|
52 |
), $orig_attr, $shortcodeName);
|
53 |
|
54 |
$skipCache = filter_var($attr['skip_cache'], FILTER_VALIDATE_BOOLEAN );
|
55 |
+
$options = [ 'skipCache' => $skipCache ];
|
56 |
|
57 |
$style = '';
|
58 |
$processCssProperty = function($name, $value) {
|
shortcodes/input.php
CHANGED
@@ -73,7 +73,7 @@ function geoip_detect2_shortcode_text_input($attr) {
|
|
73 |
}
|
74 |
$html_attrs['data-options'] = wp_json_encode(_geoip_detect2_shortcode_options($attr));
|
75 |
} else {
|
76 |
-
$html_attrs['value'] = geoip_detect2_shortcode($attr +
|
77 |
}
|
78 |
|
79 |
$html = '<input ' . _geoip_detect_flatten_html_attr($html_attrs) . '/>';
|
73 |
}
|
74 |
$html_attrs['data-options'] = wp_json_encode(_geoip_detect2_shortcode_options($attr));
|
75 |
} else {
|
76 |
+
$html_attrs['value'] = geoip_detect2_shortcode($attr + [ 'add_error' => false ]);
|
77 |
}
|
78 |
|
79 |
$html = '<input ' . _geoip_detect_flatten_html_attr($html_attrs) . '/>';
|
shortcodes/main.php
CHANGED
@@ -60,7 +60,7 @@ function geoip_detect2_shortcode($orig_attr, $content = '', $shortcodeName = 'ge
|
|
60 |
], $shortcode_options);
|
61 |
}
|
62 |
|
63 |
-
$options =
|
64 |
|
65 |
$ip = $attr['ip'] ?: geoip_detect2_get_client_ip();
|
66 |
|
@@ -103,7 +103,7 @@ function geoip_detect2_shortcode_get_property_simplified($userInfo, $propertyNam
|
|
103 |
try {
|
104 |
$return = geoip_detect2_shortcode_get_property($userInfo, $propertyName);
|
105 |
} catch (\RuntimeException $e) {
|
106 |
-
if (
|
107 |
trigger_error('Undefined property `' . $propertyName . '`');
|
108 |
}
|
109 |
$return = $defaultValue;
|
@@ -133,10 +133,10 @@ function geoip_detect2_shortcode_get_property($userInfo, $propertyName) {
|
|
133 |
->enableExceptionOnInvalidIndex()
|
134 |
->getPropertyAccessor();
|
135 |
|
136 |
-
if (
|
137 |
$properties = explode('.', $propertyName);
|
138 |
$properties = array_slice($properties, 2);
|
139 |
-
$propertyName = 'extra.original[' . implode(
|
140 |
}
|
141 |
|
142 |
// subdivisions.0.isoCode -> subdivisions[0].isoCode
|
60 |
], $shortcode_options);
|
61 |
}
|
62 |
|
63 |
+
$options = [ 'skipCache' => $shortcode_options['skip_cache'] ];
|
64 |
|
65 |
$ip = $attr['ip'] ?: geoip_detect2_get_client_ip();
|
66 |
|
103 |
try {
|
104 |
$return = geoip_detect2_shortcode_get_property($userInfo, $propertyName);
|
105 |
} catch (\RuntimeException $e) {
|
106 |
+
if (GEOIP_DETECT_DEBUG) {
|
107 |
trigger_error('Undefined property `' . $propertyName . '`');
|
108 |
}
|
109 |
$return = $defaultValue;
|
133 |
->enableExceptionOnInvalidIndex()
|
134 |
->getPropertyAccessor();
|
135 |
|
136 |
+
if (str_starts_with($propertyName, 'extra.original.')) {
|
137 |
$properties = explode('.', $propertyName);
|
138 |
$properties = array_slice($properties, 2);
|
139 |
+
$propertyName = 'extra.original[' . implode('][', $properties) . ']';
|
140 |
}
|
141 |
|
142 |
// subdivisions.0.isoCode -> subdivisions[0].isoCode
|
shortcodes/show_if.php
CHANGED
@@ -75,7 +75,7 @@
|
|
75 |
*/
|
76 |
function geoip_detect2_shortcode_show_if($attr, $content = '', $shortcodeName = '') {
|
77 |
$shortcode_options = _geoip_detect2_shortcode_options($attr);
|
78 |
-
$options =
|
79 |
|
80 |
$showContentIfMatch = ($shortcodeName === 'geoip_detect2_show_if');
|
81 |
|
75 |
*/
|
76 |
function geoip_detect2_shortcode_show_if($attr, $content = '', $shortcodeName = '') {
|
77 |
$shortcode_options = _geoip_detect2_shortcode_options($attr);
|
78 |
+
$options = [ 'skipCache' => $shortcode_options['skip_cache'] ];
|
79 |
|
80 |
$showContentIfMatch = ($shortcodeName === 'geoip_detect2_show_if');
|
81 |
|
vendor/composer/ClassLoader.php
CHANGED
@@ -37,26 +37,80 @@ namespace Composer\Autoload;
|
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
-
* @see
|
41 |
-
* @see
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
|
|
|
|
|
|
45 |
// PSR-4
|
|
|
|
|
|
|
|
|
46 |
private $prefixLengthsPsr4 = array();
|
|
|
|
|
|
|
|
|
47 |
private $prefixDirsPsr4 = array();
|
|
|
|
|
|
|
|
|
48 |
private $fallbackDirsPsr4 = array();
|
49 |
|
50 |
// PSR-0
|
|
|
|
|
|
|
|
|
51 |
private $prefixesPsr0 = array();
|
|
|
|
|
|
|
|
|
52 |
private $fallbackDirsPsr0 = array();
|
53 |
|
|
|
54 |
private $useIncludePath = false;
|
|
|
|
|
|
|
|
|
|
|
55 |
private $classMap = array();
|
|
|
|
|
56 |
private $classMapAuthoritative = false;
|
|
|
|
|
|
|
|
|
|
|
57 |
private $missingClasses = array();
|
|
|
|
|
58 |
private $apcuPrefix;
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getPrefixes()
|
61 |
{
|
62 |
if (!empty($this->prefixesPsr0)) {
|
@@ -66,28 +120,47 @@ class ClassLoader
|
|
66 |
return array();
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
69 |
public function getPrefixesPsr4()
|
70 |
{
|
71 |
return $this->prefixDirsPsr4;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
public function getFallbackDirs()
|
75 |
{
|
76 |
return $this->fallbackDirsPsr0;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
79 |
public function getFallbackDirsPsr4()
|
80 |
{
|
81 |
return $this->fallbackDirsPsr4;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
84 |
public function getClassMap()
|
85 |
{
|
86 |
return $this->classMap;
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
-
* @param
|
|
|
|
|
|
|
91 |
*/
|
92 |
public function addClassMap(array $classMap)
|
93 |
{
|
@@ -102,9 +175,11 @@ class ClassLoader
|
|
102 |
* Registers a set of PSR-0 directories for a given prefix, either
|
103 |
* appending or prepending to the ones previously set for this prefix.
|
104 |
*
|
105 |
-
* @param string
|
106 |
-
* @param
|
107 |
-
* @param bool
|
|
|
|
|
108 |
*/
|
109 |
public function add($prefix, $paths, $prepend = false)
|
110 |
{
|
@@ -147,11 +222,13 @@ class ClassLoader
|
|
147 |
* Registers a set of PSR-4 directories for a given namespace, either
|
148 |
* appending or prepending to the ones previously set for this namespace.
|
149 |
*
|
150 |
-
* @param string
|
151 |
-
* @param
|
152 |
-
* @param bool
|
153 |
*
|
154 |
* @throws \InvalidArgumentException
|
|
|
|
|
155 |
*/
|
156 |
public function addPsr4($prefix, $paths, $prepend = false)
|
157 |
{
|
@@ -195,8 +272,10 @@ class ClassLoader
|
|
195 |
* Registers a set of PSR-0 directories for a given prefix,
|
196 |
* replacing any others previously set for this prefix.
|
197 |
*
|
198 |
-
* @param string
|
199 |
-
* @param
|
|
|
|
|
200 |
*/
|
201 |
public function set($prefix, $paths)
|
202 |
{
|
@@ -211,10 +290,12 @@ class ClassLoader
|
|
211 |
* Registers a set of PSR-4 directories for a given namespace,
|
212 |
* replacing any others previously set for this namespace.
|
213 |
*
|
214 |
-
* @param string
|
215 |
-
* @param
|
216 |
*
|
217 |
* @throws \InvalidArgumentException
|
|
|
|
|
218 |
*/
|
219 |
public function setPsr4($prefix, $paths)
|
220 |
{
|
@@ -234,6 +315,8 @@ class ClassLoader
|
|
234 |
* Turns on searching the include path for class files.
|
235 |
*
|
236 |
* @param bool $useIncludePath
|
|
|
|
|
237 |
*/
|
238 |
public function setUseIncludePath($useIncludePath)
|
239 |
{
|
@@ -256,6 +339,8 @@ class ClassLoader
|
|
256 |
* that have not been registered with the class map.
|
257 |
*
|
258 |
* @param bool $classMapAuthoritative
|
|
|
|
|
259 |
*/
|
260 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
261 |
{
|
@@ -276,6 +361,8 @@ class ClassLoader
|
|
276 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
277 |
*
|
278 |
* @param string|null $apcuPrefix
|
|
|
|
|
279 |
*/
|
280 |
public function setApcuPrefix($apcuPrefix)
|
281 |
{
|
@@ -296,25 +383,44 @@ class ClassLoader
|
|
296 |
* Registers this instance as an autoloader.
|
297 |
*
|
298 |
* @param bool $prepend Whether to prepend the autoloader or not
|
|
|
|
|
299 |
*/
|
300 |
public function register($prepend = false)
|
301 |
{
|
302 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
}
|
304 |
|
305 |
/**
|
306 |
* Unregisters this instance as an autoloader.
|
|
|
|
|
307 |
*/
|
308 |
public function unregister()
|
309 |
{
|
310 |
spl_autoload_unregister(array($this, 'loadClass'));
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
|
313 |
/**
|
314 |
* Loads the given class or interface.
|
315 |
*
|
316 |
* @param string $class The name of the class
|
317 |
-
* @return
|
318 |
*/
|
319 |
public function loadClass($class)
|
320 |
{
|
@@ -323,6 +429,8 @@ class ClassLoader
|
|
323 |
|
324 |
return true;
|
325 |
}
|
|
|
|
|
326 |
}
|
327 |
|
328 |
/**
|
@@ -367,6 +475,21 @@ class ClassLoader
|
|
367 |
return $file;
|
368 |
}
|
369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
private function findFileWithExtension($class, $ext)
|
371 |
{
|
372 |
// PSR-4 lookup
|
@@ -438,6 +561,10 @@ class ClassLoader
|
|
438 |
* Scope isolated include.
|
439 |
*
|
440 |
* Prevents access to $this/self from included files.
|
|
|
|
|
|
|
|
|
441 |
*/
|
442 |
function includeFile($file)
|
443 |
{
|
37 |
*
|
38 |
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see https://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see https://www.php-fig.org/psr/psr-4/
|
42 |
*/
|
43 |
class ClassLoader
|
44 |
{
|
45 |
+
/** @var ?string */
|
46 |
+
private $vendorDir;
|
47 |
+
|
48 |
// PSR-4
|
49 |
+
/**
|
50 |
+
* @var array[]
|
51 |
+
* @psalm-var array<string, array<string, int>>
|
52 |
+
*/
|
53 |
private $prefixLengthsPsr4 = array();
|
54 |
+
/**
|
55 |
+
* @var array[]
|
56 |
+
* @psalm-var array<string, array<int, string>>
|
57 |
+
*/
|
58 |
private $prefixDirsPsr4 = array();
|
59 |
+
/**
|
60 |
+
* @var array[]
|
61 |
+
* @psalm-var array<string, string>
|
62 |
+
*/
|
63 |
private $fallbackDirsPsr4 = array();
|
64 |
|
65 |
// PSR-0
|
66 |
+
/**
|
67 |
+
* @var array[]
|
68 |
+
* @psalm-var array<string, array<string, string[]>>
|
69 |
+
*/
|
70 |
private $prefixesPsr0 = array();
|
71 |
+
/**
|
72 |
+
* @var array[]
|
73 |
+
* @psalm-var array<string, string>
|
74 |
+
*/
|
75 |
private $fallbackDirsPsr0 = array();
|
76 |
|
77 |
+
/** @var bool */
|
78 |
private $useIncludePath = false;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @var string[]
|
82 |
+
* @psalm-var array<string, string>
|
83 |
+
*/
|
84 |
private $classMap = array();
|
85 |
+
|
86 |
+
/** @var bool */
|
87 |
private $classMapAuthoritative = false;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @var bool[]
|
91 |
+
* @psalm-var array<string, bool>
|
92 |
+
*/
|
93 |
private $missingClasses = array();
|
94 |
+
|
95 |
+
/** @var ?string */
|
96 |
private $apcuPrefix;
|
97 |
|
98 |
+
/**
|
99 |
+
* @var self[]
|
100 |
+
*/
|
101 |
+
private static $registeredLoaders = array();
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param ?string $vendorDir
|
105 |
+
*/
|
106 |
+
public function __construct($vendorDir = null)
|
107 |
+
{
|
108 |
+
$this->vendorDir = $vendorDir;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return string[]
|
113 |
+
*/
|
114 |
public function getPrefixes()
|
115 |
{
|
116 |
if (!empty($this->prefixesPsr0)) {
|
120 |
return array();
|
121 |
}
|
122 |
|
123 |
+
/**
|
124 |
+
* @return array[]
|
125 |
+
* @psalm-return array<string, array<int, string>>
|
126 |
+
*/
|
127 |
public function getPrefixesPsr4()
|
128 |
{
|
129 |
return $this->prefixDirsPsr4;
|
130 |
}
|
131 |
|
132 |
+
/**
|
133 |
+
* @return array[]
|
134 |
+
* @psalm-return array<string, string>
|
135 |
+
*/
|
136 |
public function getFallbackDirs()
|
137 |
{
|
138 |
return $this->fallbackDirsPsr0;
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* @return array[]
|
143 |
+
* @psalm-return array<string, string>
|
144 |
+
*/
|
145 |
public function getFallbackDirsPsr4()
|
146 |
{
|
147 |
return $this->fallbackDirsPsr4;
|
148 |
}
|
149 |
|
150 |
+
/**
|
151 |
+
* @return string[] Array of classname => path
|
152 |
+
* @psalm-return array<string, string>
|
153 |
+
*/
|
154 |
public function getClassMap()
|
155 |
{
|
156 |
return $this->classMap;
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
+
* @param string[] $classMap Class to filename map
|
161 |
+
* @psalm-param array<string, string> $classMap
|
162 |
+
*
|
163 |
+
* @return void
|
164 |
*/
|
165 |
public function addClassMap(array $classMap)
|
166 |
{
|
175 |
* Registers a set of PSR-0 directories for a given prefix, either
|
176 |
* appending or prepending to the ones previously set for this prefix.
|
177 |
*
|
178 |
+
* @param string $prefix The prefix
|
179 |
+
* @param string[]|string $paths The PSR-0 root directories
|
180 |
+
* @param bool $prepend Whether to prepend the directories
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
*/
|
184 |
public function add($prefix, $paths, $prepend = false)
|
185 |
{
|
222 |
* Registers a set of PSR-4 directories for a given namespace, either
|
223 |
* appending or prepending to the ones previously set for this namespace.
|
224 |
*
|
225 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
226 |
+
* @param string[]|string $paths The PSR-4 base directories
|
227 |
+
* @param bool $prepend Whether to prepend the directories
|
228 |
*
|
229 |
* @throws \InvalidArgumentException
|
230 |
+
*
|
231 |
+
* @return void
|
232 |
*/
|
233 |
public function addPsr4($prefix, $paths, $prepend = false)
|
234 |
{
|
272 |
* Registers a set of PSR-0 directories for a given prefix,
|
273 |
* replacing any others previously set for this prefix.
|
274 |
*
|
275 |
+
* @param string $prefix The prefix
|
276 |
+
* @param string[]|string $paths The PSR-0 base directories
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
*/
|
280 |
public function set($prefix, $paths)
|
281 |
{
|
290 |
* Registers a set of PSR-4 directories for a given namespace,
|
291 |
* replacing any others previously set for this namespace.
|
292 |
*
|
293 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
294 |
+
* @param string[]|string $paths The PSR-4 base directories
|
295 |
*
|
296 |
* @throws \InvalidArgumentException
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
*/
|
300 |
public function setPsr4($prefix, $paths)
|
301 |
{
|
315 |
* Turns on searching the include path for class files.
|
316 |
*
|
317 |
* @param bool $useIncludePath
|
318 |
+
*
|
319 |
+
* @return void
|
320 |
*/
|
321 |
public function setUseIncludePath($useIncludePath)
|
322 |
{
|
339 |
* that have not been registered with the class map.
|
340 |
*
|
341 |
* @param bool $classMapAuthoritative
|
342 |
+
*
|
343 |
+
* @return void
|
344 |
*/
|
345 |
public function setClassMapAuthoritative($classMapAuthoritative)
|
346 |
{
|
361 |
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
362 |
*
|
363 |
* @param string|null $apcuPrefix
|
364 |
+
*
|
365 |
+
* @return void
|
366 |
*/
|
367 |
public function setApcuPrefix($apcuPrefix)
|
368 |
{
|
383 |
* Registers this instance as an autoloader.
|
384 |
*
|
385 |
* @param bool $prepend Whether to prepend the autoloader or not
|
386 |
+
*
|
387 |
+
* @return void
|
388 |
*/
|
389 |
public function register($prepend = false)
|
390 |
{
|
391 |
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
392 |
+
|
393 |
+
if (null === $this->vendorDir) {
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
if ($prepend) {
|
398 |
+
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
399 |
+
} else {
|
400 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
401 |
+
self::$registeredLoaders[$this->vendorDir] = $this;
|
402 |
+
}
|
403 |
}
|
404 |
|
405 |
/**
|
406 |
* Unregisters this instance as an autoloader.
|
407 |
+
*
|
408 |
+
* @return void
|
409 |
*/
|
410 |
public function unregister()
|
411 |
{
|
412 |
spl_autoload_unregister(array($this, 'loadClass'));
|
413 |
+
|
414 |
+
if (null !== $this->vendorDir) {
|
415 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
416 |
+
}
|
417 |
}
|
418 |
|
419 |
/**
|
420 |
* Loads the given class or interface.
|
421 |
*
|
422 |
* @param string $class The name of the class
|
423 |
+
* @return true|null True if loaded, null otherwise
|
424 |
*/
|
425 |
public function loadClass($class)
|
426 |
{
|
429 |
|
430 |
return true;
|
431 |
}
|
432 |
+
|
433 |
+
return null;
|
434 |
}
|
435 |
|
436 |
/**
|
475 |
return $file;
|
476 |
}
|
477 |
|
478 |
+
/**
|
479 |
+
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
480 |
+
*
|
481 |
+
* @return self[]
|
482 |
+
*/
|
483 |
+
public static function getRegisteredLoaders()
|
484 |
+
{
|
485 |
+
return self::$registeredLoaders;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* @param string $class
|
490 |
+
* @param string $ext
|
491 |
+
* @return string|false
|
492 |
+
*/
|
493 |
private function findFileWithExtension($class, $ext)
|
494 |
{
|
495 |
// PSR-4 lookup
|
561 |
* Scope isolated include.
|
562 |
*
|
563 |
* Prevents access to $this/self from included files.
|
564 |
+
*
|
565 |
+
* @param string $file
|
566 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer;
|
14 |
+
|
15 |
+
use Composer\Autoload\ClassLoader;
|
16 |
+
use Composer\Semver\VersionParser;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* This class is copied in every Composer installed project and available to all
|
20 |
+
*
|
21 |
+
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
+
*
|
23 |
+
* To require its presence, you can require `composer-runtime-api ^2.0`
|
24 |
+
*/
|
25 |
+
class InstalledVersions
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* @var mixed[]|null
|
29 |
+
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
30 |
+
*/
|
31 |
+
private static $installed;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @var bool|null
|
35 |
+
*/
|
36 |
+
private static $canGetVendors;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @var array[]
|
40 |
+
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
41 |
+
*/
|
42 |
+
private static $installedByVendor = array();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
46 |
+
*
|
47 |
+
* @return string[]
|
48 |
+
* @psalm-return list<string>
|
49 |
+
*/
|
50 |
+
public static function getInstalledPackages()
|
51 |
+
{
|
52 |
+
$packages = array();
|
53 |
+
foreach (self::getInstalled() as $installed) {
|
54 |
+
$packages[] = array_keys($installed['versions']);
|
55 |
+
}
|
56 |
+
|
57 |
+
if (1 === \count($packages)) {
|
58 |
+
return $packages[0];
|
59 |
+
}
|
60 |
+
|
61 |
+
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Returns a list of all package names with a specific type e.g. 'library'
|
66 |
+
*
|
67 |
+
* @param string $type
|
68 |
+
* @return string[]
|
69 |
+
* @psalm-return list<string>
|
70 |
+
*/
|
71 |
+
public static function getInstalledPackagesByType($type)
|
72 |
+
{
|
73 |
+
$packagesByType = array();
|
74 |
+
|
75 |
+
foreach (self::getInstalled() as $installed) {
|
76 |
+
foreach ($installed['versions'] as $name => $package) {
|
77 |
+
if (isset($package['type']) && $package['type'] === $type) {
|
78 |
+
$packagesByType[] = $name;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
return $packagesByType;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Checks whether the given package is installed
|
88 |
+
*
|
89 |
+
* This also returns true if the package name is provided or replaced by another package
|
90 |
+
*
|
91 |
+
* @param string $packageName
|
92 |
+
* @param bool $includeDevRequirements
|
93 |
+
* @return bool
|
94 |
+
*/
|
95 |
+
public static function isInstalled($packageName, $includeDevRequirements = true)
|
96 |
+
{
|
97 |
+
foreach (self::getInstalled() as $installed) {
|
98 |
+
if (isset($installed['versions'][$packageName])) {
|
99 |
+
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
return false;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Checks whether the given package satisfies a version constraint
|
108 |
+
*
|
109 |
+
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
110 |
+
*
|
111 |
+
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
112 |
+
*
|
113 |
+
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
114 |
+
* @param string $packageName
|
115 |
+
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
116 |
+
* @return bool
|
117 |
+
*/
|
118 |
+
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
119 |
+
{
|
120 |
+
$constraint = $parser->parseConstraints($constraint);
|
121 |
+
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
122 |
+
|
123 |
+
return $provided->matches($constraint);
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Returns a version constraint representing all the range(s) which are installed for a given package
|
128 |
+
*
|
129 |
+
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
130 |
+
* whether a given version of a package is installed, and not just whether it exists
|
131 |
+
*
|
132 |
+
* @param string $packageName
|
133 |
+
* @return string Version constraint usable with composer/semver
|
134 |
+
*/
|
135 |
+
public static function getVersionRanges($packageName)
|
136 |
+
{
|
137 |
+
foreach (self::getInstalled() as $installed) {
|
138 |
+
if (!isset($installed['versions'][$packageName])) {
|
139 |
+
continue;
|
140 |
+
}
|
141 |
+
|
142 |
+
$ranges = array();
|
143 |
+
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
144 |
+
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
145 |
+
}
|
146 |
+
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
147 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
148 |
+
}
|
149 |
+
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
150 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
151 |
+
}
|
152 |
+
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
153 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
154 |
+
}
|
155 |
+
|
156 |
+
return implode(' || ', $ranges);
|
157 |
+
}
|
158 |
+
|
159 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* @param string $packageName
|
164 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
165 |
+
*/
|
166 |
+
public static function getVersion($packageName)
|
167 |
+
{
|
168 |
+
foreach (self::getInstalled() as $installed) {
|
169 |
+
if (!isset($installed['versions'][$packageName])) {
|
170 |
+
continue;
|
171 |
+
}
|
172 |
+
|
173 |
+
if (!isset($installed['versions'][$packageName]['version'])) {
|
174 |
+
return null;
|
175 |
+
}
|
176 |
+
|
177 |
+
return $installed['versions'][$packageName]['version'];
|
178 |
+
}
|
179 |
+
|
180 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* @param string $packageName
|
185 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
186 |
+
*/
|
187 |
+
public static function getPrettyVersion($packageName)
|
188 |
+
{
|
189 |
+
foreach (self::getInstalled() as $installed) {
|
190 |
+
if (!isset($installed['versions'][$packageName])) {
|
191 |
+
continue;
|
192 |
+
}
|
193 |
+
|
194 |
+
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
195 |
+
return null;
|
196 |
+
}
|
197 |
+
|
198 |
+
return $installed['versions'][$packageName]['pretty_version'];
|
199 |
+
}
|
200 |
+
|
201 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* @param string $packageName
|
206 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
207 |
+
*/
|
208 |
+
public static function getReference($packageName)
|
209 |
+
{
|
210 |
+
foreach (self::getInstalled() as $installed) {
|
211 |
+
if (!isset($installed['versions'][$packageName])) {
|
212 |
+
continue;
|
213 |
+
}
|
214 |
+
|
215 |
+
if (!isset($installed['versions'][$packageName]['reference'])) {
|
216 |
+
return null;
|
217 |
+
}
|
218 |
+
|
219 |
+
return $installed['versions'][$packageName]['reference'];
|
220 |
+
}
|
221 |
+
|
222 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* @param string $packageName
|
227 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
228 |
+
*/
|
229 |
+
public static function getInstallPath($packageName)
|
230 |
+
{
|
231 |
+
foreach (self::getInstalled() as $installed) {
|
232 |
+
if (!isset($installed['versions'][$packageName])) {
|
233 |
+
continue;
|
234 |
+
}
|
235 |
+
|
236 |
+
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
237 |
+
}
|
238 |
+
|
239 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
240 |
+
}
|
241 |
+
|
242 |
+
/**
|
243 |
+
* @return array
|
244 |
+
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
245 |
+
*/
|
246 |
+
public static function getRootPackage()
|
247 |
+
{
|
248 |
+
$installed = self::getInstalled();
|
249 |
+
|
250 |
+
return $installed[0]['root'];
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Returns the raw installed.php data for custom implementations
|
255 |
+
*
|
256 |
+
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
257 |
+
* @return array[]
|
258 |
+
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
259 |
+
*/
|
260 |
+
public static function getRawData()
|
261 |
+
{
|
262 |
+
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
263 |
+
|
264 |
+
if (null === self::$installed) {
|
265 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
266 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
267 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
268 |
+
self::$installed = include __DIR__ . '/installed.php';
|
269 |
+
} else {
|
270 |
+
self::$installed = array();
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
return self::$installed;
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
279 |
+
*
|
280 |
+
* @return array[]
|
281 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
282 |
+
*/
|
283 |
+
public static function getAllRawData()
|
284 |
+
{
|
285 |
+
return self::getInstalled();
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Lets you reload the static array from another file
|
290 |
+
*
|
291 |
+
* This is only useful for complex integrations in which a project needs to use
|
292 |
+
* this class but then also needs to execute another project's autoloader in process,
|
293 |
+
* and wants to ensure both projects have access to their version of installed.php.
|
294 |
+
*
|
295 |
+
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
296 |
+
* the data it needs from this class, then call reload() with
|
297 |
+
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
298 |
+
* the project in which it runs can then also use this class safely, without
|
299 |
+
* interference between PHPUnit's dependencies and the project's dependencies.
|
300 |
+
*
|
301 |
+
* @param array[] $data A vendor/composer/installed.php data set
|
302 |
+
* @return void
|
303 |
+
*
|
304 |
+
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
305 |
+
*/
|
306 |
+
public static function reload($data)
|
307 |
+
{
|
308 |
+
self::$installed = $data;
|
309 |
+
self::$installedByVendor = array();
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* @return array[]
|
314 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
315 |
+
*/
|
316 |
+
private static function getInstalled()
|
317 |
+
{
|
318 |
+
if (null === self::$canGetVendors) {
|
319 |
+
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
320 |
+
}
|
321 |
+
|
322 |
+
$installed = array();
|
323 |
+
|
324 |
+
if (self::$canGetVendors) {
|
325 |
+
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
326 |
+
if (isset(self::$installedByVendor[$vendorDir])) {
|
327 |
+
$installed[] = self::$installedByVendor[$vendorDir];
|
328 |
+
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
329 |
+
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
330 |
+
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
331 |
+
self::$installed = $installed[count($installed) - 1];
|
332 |
+
}
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
if (null === self::$installed) {
|
338 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
339 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
340 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
341 |
+
self::$installed = require __DIR__ . '/installed.php';
|
342 |
+
} else {
|
343 |
+
self::$installed = array();
|
344 |
+
}
|
345 |
+
}
|
346 |
+
$installed[] = self::$installed;
|
347 |
+
|
348 |
+
return $installed;
|
349 |
+
}
|
350 |
+
}
|
vendor/composer/installed.php
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php return array(
|
2 |
+
'root' => array(
|
3 |
+
'pretty_version' => 'dev-develop',
|
4 |
+
'version' => 'dev-develop',
|
5 |
+
'type' => 'wordpress-plugin',
|
6 |
+
'install_path' => __DIR__ . '/../../',
|
7 |
+
'aliases' => array(),
|
8 |
+
'reference' => 'f6316453171e5ca588bf34125072872eec853064',
|
9 |
+
'name' => 'yellowtree/geoip-detect',
|
10 |
+
'dev' => false,
|
11 |
+
),
|
12 |
+
'versions' => array(
|
13 |
+
'composer/ca-bundle' => array(
|
14 |
+
'pretty_version' => '1.3.1',
|
15 |
+
'version' => '1.3.1.0',
|
16 |
+
'type' => 'library',
|
17 |
+
'install_path' => __DIR__ . '/./ca-bundle',
|
18 |
+
'aliases' => array(),
|
19 |
+
'reference' => '4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b',
|
20 |
+
'dev_requirement' => false,
|
21 |
+
),
|
22 |
+
'geoip2/geoip2' => array(
|
23 |
+
'pretty_version' => 'v2.10.0',
|
24 |
+
'version' => '2.10.0.0',
|
25 |
+
'type' => 'library',
|
26 |
+
'install_path' => __DIR__ . '/../geoip2/geoip2',
|
27 |
+
'aliases' => array(),
|
28 |
+
'reference' => '419557cd21d9fe039721a83490701a58c8ce784a',
|
29 |
+
'dev_requirement' => false,
|
30 |
+
),
|
31 |
+
'maxmind-db/reader' => array(
|
32 |
+
'pretty_version' => 'v1.6.0',
|
33 |
+
'version' => '1.6.0.0',
|
34 |
+
'type' => 'library',
|
35 |
+
'install_path' => __DIR__ . '/../maxmind-db/reader',
|
36 |
+
'aliases' => array(),
|
37 |
+
'reference' => 'febd4920bf17c1da84cef58e56a8227dfb37fbe4',
|
38 |
+
'dev_requirement' => false,
|
39 |
+
),
|
40 |
+
'maxmind/web-service-common' => array(
|
41 |
+
'pretty_version' => 'v0.7.0',
|
42 |
+
'version' => '0.7.0.0',
|
43 |
+
'type' => 'library',
|
44 |
+
'install_path' => __DIR__ . '/../maxmind/web-service-common',
|
45 |
+
'aliases' => array(),
|
46 |
+
'reference' => '74c996c218ada5c639c8c2f076756e059f5552fc',
|
47 |
+
'dev_requirement' => false,
|
48 |
+
),
|
49 |
+
'symfony/deprecation-contracts' => array(
|
50 |
+
'pretty_version' => 'v2.5.0',
|
51 |
+
'version' => '2.5.0.0',
|
52 |
+
'type' => 'library',
|
53 |
+
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
|
54 |
+
'aliases' => array(),
|
55 |
+
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
|
56 |
+
'dev_requirement' => false,
|
57 |
+
),
|
58 |
+
'symfony/http-foundation' => array(
|
59 |
+
'pretty_version' => 'v5.2.4',
|
60 |
+
'version' => '5.2.4.0',
|
61 |
+
'type' => 'library',
|
62 |
+
'install_path' => __DIR__ . '/../symfony/http-foundation',
|
63 |
+
'aliases' => array(),
|
64 |
+
'reference' => '54499baea7f7418bce7b5ec92770fd0799e8e9bf',
|
65 |
+
'dev_requirement' => false,
|
66 |
+
),
|
67 |
+
'symfony/polyfill-ctype' => array(
|
68 |
+
'pretty_version' => 'v1.24.0',
|
69 |
+
'version' => '1.24.0.0',
|
70 |
+
'type' => 'library',
|
71 |
+
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
|
72 |
+
'aliases' => array(),
|
73 |
+
'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
|
74 |
+
'dev_requirement' => false,
|
75 |
+
),
|
76 |
+
'symfony/polyfill-intl-grapheme' => array(
|
77 |
+
'pretty_version' => 'v1.24.0',
|
78 |
+
'version' => '1.24.0.0',
|
79 |
+
'type' => 'library',
|
80 |
+
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
|
81 |
+
'aliases' => array(),
|
82 |
+
'reference' => '81b86b50cf841a64252b439e738e97f4a34e2783',
|
83 |
+
'dev_requirement' => false,
|
84 |
+
),
|
85 |
+
'symfony/polyfill-intl-normalizer' => array(
|
86 |
+
'pretty_version' => 'v1.24.0',
|
87 |
+
'version' => '1.24.0.0',
|
88 |
+
'type' => 'library',
|
89 |
+
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
|
90 |
+
'aliases' => array(),
|
91 |
+
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
|
92 |
+
'dev_requirement' => false,
|
93 |
+
),
|
94 |
+
'symfony/polyfill-mbstring' => array(
|
95 |
+
'pretty_version' => 'v1.24.0',
|
96 |
+
'version' => '1.24.0.0',
|
97 |
+
'type' => 'library',
|
98 |
+
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
99 |
+
'aliases' => array(),
|
100 |
+
'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
|
101 |
+
'dev_requirement' => false,
|
102 |
+
),
|
103 |
+
'symfony/polyfill-php80' => array(
|
104 |
+
'pretty_version' => 'v1.24.0',
|
105 |
+
'version' => '1.24.0.0',
|
106 |
+
'type' => 'library',
|
107 |
+
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
|
108 |
+
'aliases' => array(),
|
109 |
+
'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
|
110 |
+
'dev_requirement' => false,
|
111 |
+
),
|
112 |
+
'symfony/property-access' => array(
|
113 |
+
'pretty_version' => 'v5.2.4',
|
114 |
+
'version' => '5.2.4.0',
|
115 |
+
'type' => 'library',
|
116 |
+
'install_path' => __DIR__ . '/../symfony/property-access',
|
117 |
+
'aliases' => array(),
|
118 |
+
'reference' => '3af8ed262bd3217512a13b023981fe68f36ad5f3',
|
119 |
+
'dev_requirement' => false,
|
120 |
+
),
|
121 |
+
'symfony/property-info' => array(
|
122 |
+
'pretty_version' => 'v5.4.3',
|
123 |
+
'version' => '5.4.3.0',
|
124 |
+
'type' => 'library',
|
125 |
+
'install_path' => __DIR__ . '/../symfony/property-info',
|
126 |
+
'aliases' => array(),
|
127 |
+
'reference' => 'bcc2b6904cbcf16b2e5d618da16117cd8e132f9a',
|
128 |
+
'dev_requirement' => false,
|
129 |
+
),
|
130 |
+
'symfony/string' => array(
|
131 |
+
'pretty_version' => 'v5.4.3',
|
132 |
+
'version' => '5.4.3.0',
|
133 |
+
'type' => 'library',
|
134 |
+
'install_path' => __DIR__ . '/../symfony/string',
|
135 |
+
'aliases' => array(),
|
136 |
+
'reference' => '92043b7d8383e48104e411bc9434b260dbeb5a10',
|
137 |
+
'dev_requirement' => false,
|
138 |
+
),
|
139 |
+
'yellowtree/geoip-detect' => array(
|
140 |
+
'pretty_version' => 'dev-develop',
|
141 |
+
'version' => 'dev-develop',
|
142 |
+
'type' => 'wordpress-plugin',
|
143 |
+
'install_path' => __DIR__ . '/../../',
|
144 |
+
'aliases' => array(),
|
145 |
+
'reference' => 'f6316453171e5ca588bf34125072872eec853064',
|
146 |
+
'dev_requirement' => false,
|
147 |
+
),
|
148 |
+
),
|
149 |
+
);
|
vendor/composer/platform_check.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// platform_check.php @generated by Composer
|
4 |
+
|
5 |
+
$issues = array();
|
6 |
+
|
7 |
+
if (!(PHP_VERSION_ID >= 70205)) {
|
8 |
+
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
|
9 |
+
}
|
10 |
+
|
11 |
+
if ($issues) {
|
12 |
+
if (!headers_sent()) {
|
13 |
+
header('HTTP/1.1 500 Internal Server Error');
|
14 |
+
}
|
15 |
+
if (!ini_get('display_errors')) {
|
16 |
+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
17 |
+
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
18 |
+
} elseif (!headers_sent()) {
|
19 |
+
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
trigger_error(
|
23 |
+
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
24 |
+
E_USER_ERROR
|
25 |
+
);
|
26 |
+
}
|
vendor/symfony/deprecation-contracts/CHANGELOG.md
CHANGED
@@ -2,4 +2,4 @@ CHANGELOG
|
|
2 |
=========
|
3 |
|
4 |
The changelog is maintained for all Symfony contracts at the following URL:
|
5 |
-
https://github.com/symfony/contracts/blob/
|
2 |
=========
|
3 |
|
4 |
The changelog is maintained for all Symfony contracts at the following URL:
|
5 |
+
https://github.com/symfony/contracts/blob/main/CHANGELOG.md
|
vendor/symfony/deprecation-contracts/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2020 Fabien Potencier
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
+
Copyright (c) 2020-2021 Fabien Potencier
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
vendor/symfony/deprecation-contracts/composer.json
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
"minimum-stability": "dev",
|
26 |
"extra": {
|
27 |
"branch-alias": {
|
28 |
-
"dev-
|
29 |
},
|
30 |
"thanks": {
|
31 |
"name": "symfony/contracts",
|
25 |
"minimum-stability": "dev",
|
26 |
"extra": {
|
27 |
"branch-alias": {
|
28 |
+
"dev-main": "2.5-dev"
|
29 |
},
|
30 |
"thanks": {
|
31 |
"name": "symfony/contracts",
|
vendor/symfony/polyfill-intl-grapheme/Grapheme.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Polyfill\Intl\Grapheme;
|
13 |
|
14 |
-
\define('SYMFONY_GRAPHEME_CLUSTER_RX', \PCRE_VERSION >=
|
15 |
|
16 |
/**
|
17 |
* Partial intl implementation in pure PHP.
|
@@ -37,6 +37,11 @@ final class Grapheme
|
|
37 |
// This regular expression is a work around for http://bugs.exim.org/1279
|
38 |
public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])';
|
39 |
|
|
|
|
|
|
|
|
|
|
|
40 |
public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0)
|
41 |
{
|
42 |
if (0 > $start) {
|
@@ -222,9 +227,14 @@ final class Grapheme
|
|
222 |
// Use the same case folding mode as mbstring does for mb_stripos().
|
223 |
// Stick to SIMPLE case folding to avoid changing the length of the string, which
|
224 |
// might result in offsets being shifted.
|
225 |
-
$mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \
|
226 |
$s = mb_convert_case($s, $mode, 'UTF-8');
|
227 |
$needle = mb_convert_case($needle, $mode, 'UTF-8');
|
|
|
|
|
|
|
|
|
|
|
228 |
}
|
229 |
if ($reverse) {
|
230 |
$needlePos = strrpos($s, $needle);
|
11 |
|
12 |
namespace Symfony\Polyfill\Intl\Grapheme;
|
13 |
|
14 |
+
\define('SYMFONY_GRAPHEME_CLUSTER_RX', ((float) \PCRE_VERSION < 10 ? (float) \PCRE_VERSION >= 8.32 : (float) \PCRE_VERSION >= 10.39) ? '\X' : Grapheme::GRAPHEME_CLUSTER_RX);
|
15 |
|
16 |
/**
|
17 |
* Partial intl implementation in pure PHP.
|
37 |
// This regular expression is a work around for http://bugs.exim.org/1279
|
38 |
public const GRAPHEME_CLUSTER_RX = '(?:\r\n|(?:[ -~\x{200C}\x{200D}]|[ᆨ-ᇹ]+|[ᄀ-ᅟ]*(?:[가개갸걔거게겨계고과괘괴교구궈궤귀규그긔기까깨꺄꺠꺼께껴꼐꼬꽈꽤꾀꾜꾸꿔꿰뀌뀨끄끠끼나내냐냬너네녀녜노놔놰뇌뇨누눠눼뉘뉴느늬니다대댜댸더데뎌뎨도돠돼되됴두둬뒈뒤듀드듸디따때땨떄떠떼뗘뗴또똬뙈뙤뚀뚜뚸뛔뛰뜌뜨띄띠라래랴럐러레려례로롸뢔뢰료루뤄뤠뤼류르릐리마매먀먜머메며몌모뫄뫠뫼묘무뭐뭬뮈뮤므믜미바배뱌뱨버베벼볘보봐봬뵈뵤부붜붸뷔뷰브븨비빠빼뺘뺴뻐뻬뼈뼤뽀뽜뽸뾔뾰뿌뿨쀄쀠쀼쁘쁴삐사새샤섀서세셔셰소솨쇄쇠쇼수숴쉐쉬슈스싀시싸쌔쌰썌써쎄쎠쎼쏘쏴쐐쐬쑈쑤쒀쒜쒸쓔쓰씌씨아애야얘어에여예오와왜외요우워웨위유으의이자재쟈쟤저제져졔조좌좨죄죠주줘줴쥐쥬즈즤지짜째쨔쨰쩌쩨쪄쪠쪼쫘쫴쬐쬬쭈쭤쮀쮜쮸쯔쯰찌차채챠챼처체쳐쳬초촤쵀최쵸추춰췌취츄츠츼치카캐캬컈커케켜켸코콰쾌쾨쿄쿠쿼퀘퀴큐크킈키타태탸턔터테텨톄토톼퇘퇴툐투퉈퉤튀튜트틔티파패퍄퍠퍼페펴폐포퐈퐤푀표푸풔풰퓌퓨프픠피하해햐햬허헤혀혜호화홰회효후훠훼휘휴흐희히]?[ᅠ-ᆢ]+|[가-힣])[ᆨ-ᇹ]*|[ᄀ-ᅟ]+|[^\p{Cc}\p{Cf}\p{Zl}\p{Zp}])[\p{Mn}\p{Me}\x{09BE}\x{09D7}\x{0B3E}\x{0B57}\x{0BBE}\x{0BD7}\x{0CC2}\x{0CD5}\x{0CD6}\x{0D3E}\x{0D57}\x{0DCF}\x{0DDF}\x{200C}\x{200D}\x{1D165}\x{1D16E}-\x{1D172}]*|[\p{Cc}\p{Cf}\p{Zl}\p{Zp}])';
|
39 |
|
40 |
+
private const CASE_FOLD = [
|
41 |
+
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
42 |
+
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
43 |
+
];
|
44 |
+
|
45 |
public static function grapheme_extract($s, $size, $type = \GRAPHEME_EXTR_COUNT, $start = 0, &$next = 0)
|
46 |
{
|
47 |
if (0 > $start) {
|
227 |
// Use the same case folding mode as mbstring does for mb_stripos().
|
228 |
// Stick to SIMPLE case folding to avoid changing the length of the string, which
|
229 |
// might result in offsets being shifted.
|
230 |
+
$mode = \defined('MB_CASE_FOLD_SIMPLE') ? \MB_CASE_FOLD_SIMPLE : \MB_CASE_LOWER;
|
231 |
$s = mb_convert_case($s, $mode, 'UTF-8');
|
232 |
$needle = mb_convert_case($needle, $mode, 'UTF-8');
|
233 |
+
|
234 |
+
if (!\defined('MB_CASE_FOLD_SIMPLE')) {
|
235 |
+
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
236 |
+
$needle = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $needle);
|
237 |
+
}
|
238 |
}
|
239 |
if ($reverse) {
|
240 |
$needlePos = strrpos($s, $needle);
|
vendor/symfony/polyfill-intl-grapheme/composer.json
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
"minimum-stability": "dev",
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
31 |
-
"dev-main": "1.
|
32 |
},
|
33 |
"thanks": {
|
34 |
"name": "symfony/polyfill",
|
28 |
"minimum-stability": "dev",
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
31 |
+
"dev-main": "1.23-dev"
|
32 |
},
|
33 |
"thanks": {
|
34 |
"name": "symfony/polyfill",
|
vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
CHANGED
@@ -11,6 +11,9 @@
|
|
11 |
|
12 |
use Symfony\Polyfill\Intl\Normalizer as p;
|
13 |
|
|
|
|
|
|
|
14 |
if (!function_exists('normalizer_is_normalized')) {
|
15 |
function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); }
|
16 |
}
|
11 |
|
12 |
use Symfony\Polyfill\Intl\Normalizer as p;
|
13 |
|
14 |
+
|
15 |
+
/* Note YellowTree: In order to commit this to the plugin SVN of Wordpress, I needed to remove the return value typing */
|
16 |
+
|
17 |
if (!function_exists('normalizer_is_normalized')) {
|
18 |
function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); }
|
19 |
}
|
vendor/symfony/polyfill-intl-normalizer/composer.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
"minimum-stability": "dev",
|
30 |
"extra": {
|
31 |
"branch-alias": {
|
32 |
-
"dev-main": "1.
|
33 |
},
|
34 |
"thanks": {
|
35 |
"name": "symfony/polyfill",
|
29 |
"minimum-stability": "dev",
|
30 |
"extra": {
|
31 |
"branch-alias": {
|
32 |
+
"dev-main": "1.23-dev"
|
33 |
},
|
34 |
"thanks": {
|
35 |
"name": "symfony/polyfill",
|
vendor/symfony/polyfill-mbstring/Mbstring.php
CHANGED
@@ -69,17 +69,18 @@ final class Mbstring
|
|
69 |
{
|
70 |
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
71 |
|
72 |
-
private
|
73 |
-
private static $language = 'neutral';
|
74 |
-
private static $internalEncoding = 'UTF-8';
|
75 |
-
private static $caseFold = [
|
76 |
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
77 |
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
78 |
];
|
79 |
|
|
|
|
|
|
|
|
|
80 |
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
81 |
{
|
82 |
-
if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
|
83 |
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
|
84 |
} else {
|
85 |
$fromEncoding = self::getEncoding($fromEncoding);
|
@@ -101,7 +102,7 @@ final class Mbstring
|
|
101 |
$fromEncoding = 'Windows-1252';
|
102 |
}
|
103 |
if ('UTF-8' !== $fromEncoding) {
|
104 |
-
$s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
|
105 |
}
|
106 |
|
107 |
return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
|
@@ -112,7 +113,7 @@ final class Mbstring
|
|
112 |
$fromEncoding = 'UTF-8';
|
113 |
}
|
114 |
|
115 |
-
return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
|
116 |
}
|
117 |
|
118 |
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
|
@@ -129,7 +130,7 @@ final class Mbstring
|
|
129 |
|
130 |
public static function mb_decode_mimeheader($s)
|
131 |
{
|
132 |
-
return iconv_mime_decode($s, 2, self::$internalEncoding);
|
133 |
}
|
134 |
|
135 |
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
|
@@ -165,10 +166,10 @@ final class Mbstring
|
|
165 |
if ('UTF-8' === $encoding) {
|
166 |
$encoding = null;
|
167 |
if (!preg_match('//u', $s)) {
|
168 |
-
$s =
|
169 |
}
|
170 |
} else {
|
171 |
-
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
|
172 |
}
|
173 |
|
174 |
$cnt = floor(\count($convmap) / 4) * 4;
|
@@ -194,7 +195,7 @@ final class Mbstring
|
|
194 |
return $s;
|
195 |
}
|
196 |
|
197 |
-
return iconv('UTF-8', $encoding.'//IGNORE', $s);
|
198 |
}
|
199 |
|
200 |
public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
|
@@ -231,10 +232,10 @@ final class Mbstring
|
|
231 |
if ('UTF-8' === $encoding) {
|
232 |
$encoding = null;
|
233 |
if (!preg_match('//u', $s)) {
|
234 |
-
$s =
|
235 |
}
|
236 |
} else {
|
237 |
-
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
|
238 |
}
|
239 |
|
240 |
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
|
@@ -264,7 +265,7 @@ final class Mbstring
|
|
264 |
return $result;
|
265 |
}
|
266 |
|
267 |
-
return iconv('UTF-8', $encoding.'//IGNORE', $result);
|
268 |
}
|
269 |
|
270 |
public static function mb_convert_case($s, $mode, $encoding = null)
|
@@ -279,10 +280,10 @@ final class Mbstring
|
|
279 |
if ('UTF-8' === $encoding) {
|
280 |
$encoding = null;
|
281 |
if (!preg_match('//u', $s)) {
|
282 |
-
$s =
|
283 |
}
|
284 |
} else {
|
285 |
-
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
|
286 |
}
|
287 |
|
288 |
if (\MB_CASE_TITLE == $mode) {
|
@@ -300,7 +301,7 @@ final class Mbstring
|
|
300 |
$map = $upper;
|
301 |
} else {
|
302 |
if (self::MB_CASE_FOLD === $mode) {
|
303 |
-
$s = str_replace(self
|
304 |
}
|
305 |
|
306 |
static $lower = null;
|
@@ -342,7 +343,7 @@ final class Mbstring
|
|
342 |
return $s;
|
343 |
}
|
344 |
|
345 |
-
return iconv('UTF-8', $encoding.'//IGNORE', $s);
|
346 |
}
|
347 |
|
348 |
public static function mb_internal_encoding($encoding = null)
|
@@ -353,7 +354,7 @@ final class Mbstring
|
|
353 |
|
354 |
$normalizedEncoding = self::getEncoding($encoding);
|
355 |
|
356 |
-
if ('UTF-8' === $normalizedEncoding || false !==
|
357 |
self::$internalEncoding = $normalizedEncoding;
|
358 |
|
359 |
return true;
|
@@ -412,7 +413,7 @@ final class Mbstring
|
|
412 |
$encoding = self::$internalEncoding;
|
413 |
}
|
414 |
|
415 |
-
return self::mb_detect_encoding($var, [$encoding]) || false !==
|
416 |
}
|
417 |
|
418 |
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
@@ -487,7 +488,7 @@ final class Mbstring
|
|
487 |
return \strlen($s);
|
488 |
}
|
489 |
|
490 |
-
return
|
491 |
}
|
492 |
|
493 |
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
|
@@ -508,7 +509,7 @@ final class Mbstring
|
|
508 |
return 0;
|
509 |
}
|
510 |
|
511 |
-
return iconv_strpos($haystack, $needle, $offset, $encoding);
|
512 |
}
|
513 |
|
514 |
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
|
@@ -532,7 +533,7 @@ final class Mbstring
|
|
532 |
}
|
533 |
|
534 |
$pos = '' !== $needle || 80000 > \PHP_VERSION_ID
|
535 |
-
? iconv_strrpos($haystack, $needle, $encoding)
|
536 |
: self::mb_strlen($haystack, $encoding);
|
537 |
|
538 |
return false !== $pos ? $offset + $pos : false;
|
@@ -601,6 +602,9 @@ final class Mbstring
|
|
601 |
if (80000 > \PHP_VERSION_ID) {
|
602 |
return false;
|
603 |
}
|
|
|
|
|
|
|
604 |
|
605 |
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
|
606 |
}
|
@@ -613,7 +617,7 @@ final class Mbstring
|
|
613 |
}
|
614 |
|
615 |
if ($start < 0) {
|
616 |
-
$start = iconv_strlen($s, $encoding) + $start;
|
617 |
if ($start < 0) {
|
618 |
$start = 0;
|
619 |
}
|
@@ -622,13 +626,13 @@ final class Mbstring
|
|
622 |
if (null === $length) {
|
623 |
$length = 2147483647;
|
624 |
} elseif ($length < 0) {
|
625 |
-
$length = iconv_strlen($s, $encoding) + $length - $start;
|
626 |
if ($length < 0) {
|
627 |
return '';
|
628 |
}
|
629 |
}
|
630 |
|
631 |
-
return (string) iconv_substr($s, $start, $length, $encoding);
|
632 |
}
|
633 |
|
634 |
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
@@ -653,7 +657,7 @@ final class Mbstring
|
|
653 |
$pos = strrpos($haystack, $needle);
|
654 |
} else {
|
655 |
$needle = self::mb_substr($needle, 0, 1, $encoding);
|
656 |
-
$pos = iconv_strrpos($haystack, $needle, $encoding);
|
657 |
}
|
658 |
|
659 |
return self::getSubpart($pos, $part, $haystack, $encoding);
|
@@ -732,12 +736,12 @@ final class Mbstring
|
|
732 |
$encoding = self::getEncoding($encoding);
|
733 |
|
734 |
if ('UTF-8' !== $encoding) {
|
735 |
-
$s = iconv($encoding, 'UTF-8//IGNORE', $s);
|
736 |
}
|
737 |
|
738 |
$s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
|
739 |
|
740 |
-
return ($wide << 1) + iconv_strlen($s, 'UTF-8');
|
741 |
}
|
742 |
|
743 |
public static function mb_substr_count($haystack, $needle, $encoding = null)
|
69 |
{
|
70 |
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
71 |
|
72 |
+
private const CASE_FOLD = [
|
|
|
|
|
|
|
73 |
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
74 |
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
75 |
];
|
76 |
|
77 |
+
private static $encodingList = ['ASCII', 'UTF-8'];
|
78 |
+
private static $language = 'neutral';
|
79 |
+
private static $internalEncoding = 'UTF-8';
|
80 |
+
|
81 |
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
82 |
{
|
83 |
+
if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) {
|
84 |
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
|
85 |
} else {
|
86 |
$fromEncoding = self::getEncoding($fromEncoding);
|
102 |
$fromEncoding = 'Windows-1252';
|
103 |
}
|
104 |
if ('UTF-8' !== $fromEncoding) {
|
105 |
+
$s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s);
|
106 |
}
|
107 |
|
108 |
return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
|
113 |
$fromEncoding = 'UTF-8';
|
114 |
}
|
115 |
|
116 |
+
return \iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
|
117 |
}
|
118 |
|
119 |
public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars)
|
130 |
|
131 |
public static function mb_decode_mimeheader($s)
|
132 |
{
|
133 |
+
return \iconv_mime_decode($s, 2, self::$internalEncoding);
|
134 |
}
|
135 |
|
136 |
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
|
166 |
if ('UTF-8' === $encoding) {
|
167 |
$encoding = null;
|
168 |
if (!preg_match('//u', $s)) {
|
169 |
+
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
170 |
}
|
171 |
} else {
|
172 |
+
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
173 |
}
|
174 |
|
175 |
$cnt = floor(\count($convmap) / 4) * 4;
|
195 |
return $s;
|
196 |
}
|
197 |
|
198 |
+
return \iconv('UTF-8', $encoding.'//IGNORE', $s);
|
199 |
}
|
200 |
|
201 |
public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
|
232 |
if ('UTF-8' === $encoding) {
|
233 |
$encoding = null;
|
234 |
if (!preg_match('//u', $s)) {
|
235 |
+
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
236 |
}
|
237 |
} else {
|
238 |
+
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
239 |
}
|
240 |
|
241 |
static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4];
|
265 |
return $result;
|
266 |
}
|
267 |
|
268 |
+
return \iconv('UTF-8', $encoding.'//IGNORE', $result);
|
269 |
}
|
270 |
|
271 |
public static function mb_convert_case($s, $mode, $encoding = null)
|
280 |
if ('UTF-8' === $encoding) {
|
281 |
$encoding = null;
|
282 |
if (!preg_match('//u', $s)) {
|
283 |
+
$s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
|
284 |
}
|
285 |
} else {
|
286 |
+
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
287 |
}
|
288 |
|
289 |
if (\MB_CASE_TITLE == $mode) {
|
301 |
$map = $upper;
|
302 |
} else {
|
303 |
if (self::MB_CASE_FOLD === $mode) {
|
304 |
+
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
305 |
}
|
306 |
|
307 |
static $lower = null;
|
343 |
return $s;
|
344 |
}
|
345 |
|
346 |
+
return \iconv('UTF-8', $encoding.'//IGNORE', $s);
|
347 |
}
|
348 |
|
349 |
public static function mb_internal_encoding($encoding = null)
|
354 |
|
355 |
$normalizedEncoding = self::getEncoding($encoding);
|
356 |
|
357 |
+
if ('UTF-8' === $normalizedEncoding || false !== @\iconv($normalizedEncoding, $normalizedEncoding, ' ')) {
|
358 |
self::$internalEncoding = $normalizedEncoding;
|
359 |
|
360 |
return true;
|
413 |
$encoding = self::$internalEncoding;
|
414 |
}
|
415 |
|
416 |
+
return self::mb_detect_encoding($var, [$encoding]) || false !== @\iconv($encoding, $encoding, $var);
|
417 |
}
|
418 |
|
419 |
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
488 |
return \strlen($s);
|
489 |
}
|
490 |
|
491 |
+
return @\iconv_strlen($s, $encoding);
|
492 |
}
|
493 |
|
494 |
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
|
509 |
return 0;
|
510 |
}
|
511 |
|
512 |
+
return \iconv_strpos($haystack, $needle, $offset, $encoding);
|
513 |
}
|
514 |
|
515 |
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
|
533 |
}
|
534 |
|
535 |
$pos = '' !== $needle || 80000 > \PHP_VERSION_ID
|
536 |
+
? \iconv_strrpos($haystack, $needle, $encoding)
|
537 |
: self::mb_strlen($haystack, $encoding);
|
538 |
|
539 |
return false !== $pos ? $offset + $pos : false;
|
602 |
if (80000 > \PHP_VERSION_ID) {
|
603 |
return false;
|
604 |
}
|
605 |
+
if (\is_int($c) || 'long' === $c || 'entity' === $c) {
|
606 |
+
return false;
|
607 |
+
}
|
608 |
|
609 |
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
|
610 |
}
|
617 |
}
|
618 |
|
619 |
if ($start < 0) {
|
620 |
+
$start = \iconv_strlen($s, $encoding) + $start;
|
621 |
if ($start < 0) {
|
622 |
$start = 0;
|
623 |
}
|
626 |
if (null === $length) {
|
627 |
$length = 2147483647;
|
628 |
} elseif ($length < 0) {
|
629 |
+
$length = \iconv_strlen($s, $encoding) + $length - $start;
|
630 |
if ($length < 0) {
|
631 |
return '';
|
632 |
}
|
633 |
}
|
634 |
|
635 |
+
return (string) \iconv_substr($s, $start, $length, $encoding);
|
636 |
}
|
637 |
|
638 |
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
657 |
$pos = strrpos($haystack, $needle);
|
658 |
} else {
|
659 |
$needle = self::mb_substr($needle, 0, 1, $encoding);
|
660 |
+
$pos = \iconv_strrpos($haystack, $needle, $encoding);
|
661 |
}
|
662 |
|
663 |
return self::getSubpart($pos, $part, $haystack, $encoding);
|
736 |
$encoding = self::getEncoding($encoding);
|
737 |
|
738 |
if ('UTF-8' !== $encoding) {
|
739 |
+
$s = \iconv($encoding, 'UTF-8//IGNORE', $s);
|
740 |
}
|
741 |
|
742 |
$s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide);
|
743 |
|
744 |
+
return ($wide << 1) + \iconv_strlen($s, 'UTF-8');
|
745 |
}
|
746 |
|
747 |
public static function mb_substr_count($haystack, $needle, $encoding = null)
|
vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php
CHANGED
@@ -81,7 +81,7 @@ return array (
|
|
81 |
'Ī' => 'ī',
|
82 |
'Ĭ' => 'ĭ',
|
83 |
'Į' => 'į',
|
84 |
-
'İ' => 'i',
|
85 |
'IJ' => 'ij',
|
86 |
'Ĵ' => 'ĵ',
|
87 |
'Ķ' => 'ķ',
|
81 |
'Ī' => 'ī',
|
82 |
'Ĭ' => 'ĭ',
|
83 |
'Į' => 'į',
|
84 |
+
'İ' => 'i̇',
|
85 |
'IJ' => 'ij',
|
86 |
'Ĵ' => 'ĵ',
|
87 |
'Ķ' => 'ķ',
|
vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php
CHANGED
@@ -746,41 +746,41 @@ return array (
|
|
746 |
'ύ' => 'Ύ',
|
747 |
'ὼ' => 'Ὼ',
|
748 |
'ώ' => 'Ώ',
|
749 |
-
'ᾀ' => '
|
750 |
-
'ᾁ' => '
|
751 |
-
'ᾂ' => '
|
752 |
-
'ᾃ' => '
|
753 |
-
'ᾄ' => '
|
754 |
-
'ᾅ' => '
|
755 |
-
'ᾆ' => '
|
756 |
-
'ᾇ' => '
|
757 |
-
'ᾐ' => '
|
758 |
-
'ᾑ' => '
|
759 |
-
'ᾒ' => '
|
760 |
-
'ᾓ' => '
|
761 |
-
'ᾔ' => '
|
762 |
-
'ᾕ' => '
|
763 |
-
'ᾖ' => '
|
764 |
-
'ᾗ' => '
|
765 |
-
'ᾠ' => '
|
766 |
-
'ᾡ' => '
|
767 |
-
'ᾢ' => '
|
768 |
-
'ᾣ' => '
|
769 |
-
'ᾤ' => '
|
770 |
-
'ᾥ' => '
|
771 |
-
'ᾦ' => '
|
772 |
-
'ᾧ' => '
|
773 |
'ᾰ' => 'Ᾰ',
|
774 |
'ᾱ' => 'Ᾱ',
|
775 |
-
'ᾳ' => '
|
776 |
'ι' => 'Ι',
|
777 |
-
'ῃ' => '
|
778 |
'ῐ' => 'Ῐ',
|
779 |
'ῑ' => 'Ῑ',
|
780 |
'ῠ' => 'Ῠ',
|
781 |
'ῡ' => 'Ῡ',
|
782 |
'ῥ' => 'Ῥ',
|
783 |
-
'ῳ' => '
|
784 |
'ⅎ' => 'Ⅎ',
|
785 |
'ⅰ' => 'Ⅰ',
|
786 |
'ⅱ' => 'Ⅱ',
|
@@ -1411,4 +1411,79 @@ return array (
|
|
1411 |
'𞥁' => '𞤟',
|
1412 |
'𞥂' => '𞤠',
|
1413 |
'𞥃' => '𞤡',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ι' => 'Ι',
|
777 |
+
'ῃ' => 'ΗΙ',
|
778 |
'ῐ' => 'Ῐ',
|
779 |
'ῑ' => 'Ῑ',
|
780 |
'ῠ' => 'Ῠ',
|
781 |
'ῡ' => 'Ῡ',
|
782 |
'ῥ' => 'Ῥ',
|
783 |
+
'ῳ' => 'ΩΙ',
|
784 |
'ⅎ' => 'Ⅎ',
|
785 |
'ⅰ' => 'Ⅰ',
|
786 |
'ⅱ' => 'Ⅱ',
|
1411 |
'𞥁' => '𞤟',
|
1412 |
'𞥂' => '𞤠',
|
1413 |
'𞥃' => '𞤡',
|
1414 |
+
'ß' => 'SS',
|
1415 |
+
'ff' => 'FF',
|
1416 |
+
'fi' => 'FI',
|
1417 |
+
'fl' => 'FL',
|
1418 |
+
'ffi' => 'FFI',
|
1419 |
+
'ffl' => 'FFL',
|
1420 |
+
'ſt' => 'ST',
|
1421 |
+
'st' => 'ST',
|
1422 |
+
'և' => 'ԵՒ',
|
1423 |
+
'ﬓ' => 'ՄՆ',
|
1424 |
+
'ﬔ' => 'ՄԵ',
|
1425 |
+
'ﬕ' => 'ՄԻ',
|
1426 |
+
'ﬖ' => 'ՎՆ',
|
1427 |
+
'ﬗ' => 'ՄԽ',
|
1428 |
+
'ʼn' => 'ʼN',
|
1429 |
+
'ΐ' => 'Ϊ́',
|
1430 |
+
'ΰ' => 'Ϋ́',
|
1431 |
+
'ǰ' => 'J̌',
|
1432 |
+
'ẖ' => 'H̱',
|
1433 |
+
'ẗ' => 'T̈',
|
1434 |
+
'ẘ' => 'W̊',
|
1435 |
+
'ẙ' => 'Y̊',
|
1436 |
+
'ẚ' => 'Aʾ',
|
1437 |
+
'ὐ' => 'Υ̓',
|
1438 |
+
'ὒ' => 'Υ̓̀',
|
1439 |
+
'ὔ' => 'Υ̓́',
|
1440 |
+
'ὖ' => 'Υ̓͂',
|
1441 |
+
'ᾶ' => 'Α͂',
|
1442 |
+
'ῆ' => 'Η͂',
|
1443 |
+
'ῒ' => 'Ϊ̀',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+
'ῂ' => 'ῊΙ',
|
1483 |
+
'ῄ' => 'ΉΙ',
|
1484 |
+
'ῲ' => 'ῺΙ',
|
1485 |
+
'ῴ' => 'ΏΙ',
|
1486 |
+
'ᾷ' => 'Α͂Ι',
|
1487 |
+
'ῇ' => 'Η͂Ι',
|
1488 |
+
'ῷ' => 'Ω͂Ι',
|
1489 |
);
|
vendor/symfony/polyfill-mbstring/bootstrap.php
CHANGED
@@ -55,7 +55,7 @@ if (!function_exists('mb_detect_order')) {
|
|
55 |
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
|
56 |
}
|
57 |
if (!function_exists('mb_parse_str')) {
|
58 |
-
function mb_parse_str($string, &$result = []) { parse_str($string, $result); }
|
59 |
}
|
60 |
if (!function_exists('mb_strlen')) {
|
61 |
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
|
55 |
function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); }
|
56 |
}
|
57 |
if (!function_exists('mb_parse_str')) {
|
58 |
+
function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; }
|
59 |
}
|
60 |
if (!function_exists('mb_strlen')) {
|
61 |
function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); }
|
vendor/symfony/polyfill-mbstring/bootstrap80.php
CHANGED
@@ -11,6 +11,9 @@
|
|
11 |
|
12 |
use Symfony\Polyfill\Mbstring as p;
|
13 |
|
|
|
|
|
|
|
14 |
if (!function_exists('mb_convert_encoding')) {
|
15 |
function mb_convert_encoding($string, ?string $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
|
16 |
}
|
11 |
|
12 |
use Symfony\Polyfill\Mbstring as p;
|
13 |
|
14 |
+
|
15 |
+
/* Note YellowTree: In order to commit this to the plugin SVN of Wordpress, I needed to remove the args typing */
|
16 |
+
|
17 |
if (!function_exists('mb_convert_encoding')) {
|
18 |
function mb_convert_encoding($string, ?string $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
|
19 |
}
|
vendor/symfony/polyfill-mbstring/composer.json
CHANGED
@@ -18,6 +18,9 @@
|
|
18 |
"require": {
|
19 |
"php": ">=7.1"
|
20 |
},
|
|
|
|
|
|
|
21 |
"autoload": {
|
22 |
"psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
|
23 |
"files": [ "bootstrap.php" ]
|
@@ -28,7 +31,7 @@
|
|
28 |
"minimum-stability": "dev",
|
29 |
"extra": {
|
30 |
"branch-alias": {
|
31 |
-
"dev-main": "1.
|
32 |
},
|
33 |
"thanks": {
|
34 |
"name": "symfony/polyfill",
|
18 |
"require": {
|
19 |
"php": ">=7.1"
|
20 |
},
|
21 |
+
"provide": {
|
22 |
+
"ext-mbstring": "*"
|
23 |
+
},
|
24 |
"autoload": {
|
25 |
"psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
|
26 |
"files": [ "bootstrap.php" ]
|
31 |
"minimum-stability": "dev",
|
32 |
"extra": {
|
33 |
"branch-alias": {
|
34 |
+
"dev-main": "1.23-dev"
|
35 |
},
|
36 |
"thanks": {
|
37 |
"name": "symfony/polyfill",
|
vendor/symfony/property-info/CHANGELOG.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1 |
CHANGELOG
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
5.2.0
|
5 |
-----
|
6 |
|
7 |
-
* deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()
|
8 |
|
9 |
5.1.0
|
10 |
-----
|
1 |
CHANGELOG
|
2 |
=========
|
3 |
|
4 |
+
5.4
|
5 |
+
---
|
6 |
+
|
7 |
+
* Add PhpStanExtractor
|
8 |
+
|
9 |
+
5.3
|
10 |
+
---
|
11 |
+
|
12 |
+
* Add support for multiple types for collection keys & values
|
13 |
+
* Deprecate the `Type::getCollectionKeyType()` and `Type::getCollectionValueType()` methods, use `Type::getCollectionKeyTypes()` and `Type::getCollectionValueTypes()` instead
|
14 |
+
|
15 |
5.2.0
|
16 |
-----
|
17 |
|
18 |
+
* deprecated the `enable_magic_call_extraction` context option in `ReflectionExtractor::getWriteInfo()` and `ReflectionExtractor::getReadInfo()` in favor of `enable_magic_methods_extraction`
|
19 |
|
20 |
5.1.0
|
21 |
-----
|
vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php
CHANGED
@@ -30,6 +30,10 @@ final class PropertyInfoConstructorPass implements CompilerPassInterface
|
|
30 |
|
31 |
public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor')
|
32 |
{
|
|
|
|
|
|
|
|
|
33 |
$this->service = $service;
|
34 |
$this->tag = $tag;
|
35 |
}
|
30 |
|
31 |
public function __construct(string $service = 'property_info.constructor_extractor', string $tag = 'property_info.constructor_extractor')
|
32 |
{
|
33 |
+
if (0 < \func_num_args()) {
|
34 |
+
trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
|
35 |
+
}
|
36 |
+
|
37 |
$this->service = $service;
|
38 |
$this->tag = $tag;
|
39 |
}
|
vendor/symfony/property-info/DependencyInjection/PropertyInfoPass.php
CHANGED
@@ -34,6 +34,10 @@ class PropertyInfoPass implements CompilerPassInterface
|
|
34 |
|
35 |
public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor')
|
36 |
{
|
|
|
|
|
|
|
|
|
37 |
$this->propertyInfoService = $propertyInfoService;
|
38 |
$this->listExtractorTag = $listExtractorTag;
|
39 |
$this->typeExtractorTag = $typeExtractorTag;
|
34 |
|
35 |
public function __construct(string $propertyInfoService = 'property_info', string $listExtractorTag = 'property_info.list_extractor', string $typeExtractorTag = 'property_info.type_extractor', string $descriptionExtractorTag = 'property_info.description_extractor', string $accessExtractorTag = 'property_info.access_extractor', string $initializableExtractorTag = 'property_info.initializable_extractor')
|
36 |
{
|
37 |
+
if (0 < \func_num_args()) {
|
38 |
+
trigger_deprecation('symfony/property-info', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
|
39 |
+
}
|
40 |
+
|
41 |
$this->propertyInfoService = $propertyInfoService;
|
42 |
$this->listExtractorTag = $listExtractorTag;
|
43 |
$this->typeExtractorTag = $typeExtractorTag;
|
vendor/symfony/property-info/Extractor/ConstructorExtractor.php
CHANGED
@@ -20,11 +20,10 @@ use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
|
|
20 |
*/
|
21 |
final class ConstructorExtractor implements PropertyTypeExtractorInterface
|
22 |
{
|
23 |
-
/** @var iterable|ConstructorArgumentTypeExtractorInterface[] */
|
24 |
private $extractors;
|
25 |
|
26 |
/**
|
27 |
-
* @param iterable
|
28 |
*/
|
29 |
public function __construct(iterable $extractors = [])
|
30 |
{
|
@@ -34,7 +33,7 @@ final class ConstructorExtractor implements PropertyTypeExtractorInterface
|
|
34 |
/**
|
35 |
* {@inheritdoc}
|
36 |
*/
|
37 |
-
public function getTypes($class, $property, array $context = [])
|
38 |
{
|
39 |
foreach ($this->extractors as $extractor) {
|
40 |
$value = $extractor->getTypesFromConstructor($class, $property);
|
20 |
*/
|
21 |
final class ConstructorExtractor implements PropertyTypeExtractorInterface
|
22 |
{
|
|
|
23 |
private $extractors;
|
24 |
|
25 |
/**
|
26 |
+
* @param iterable<int, ConstructorArgumentTypeExtractorInterface> $extractors
|
27 |
*/
|
28 |
public function __construct(iterable $extractors = [])
|
29 |
{
|
33 |
/**
|
34 |
* {@inheritdoc}
|
35 |
*/
|
36 |
+
public function getTypes(string $class, string $property, array $context = []): ?array
|
37 |
{
|
38 |
foreach ($this->extractors as $extractor) {
|
39 |
$value = $extractor->getTypesFromConstructor($class, $property);
|
vendor/symfony/property-info/Extractor/PhpDocExtractor.php
CHANGED
@@ -36,7 +36,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
36 |
public const MUTATOR = 2;
|
37 |
|
38 |
/**
|
39 |
-
* @var DocBlock
|
40 |
*/
|
41 |
private $docBlocks = [];
|
42 |
|
@@ -66,9 +66,9 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
66 |
$this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance();
|
67 |
$this->contextFactory = new ContextFactory();
|
68 |
$this->phpDocTypeHelper = new PhpDocTypeHelper();
|
69 |
-
$this->mutatorPrefixes =
|
70 |
-
$this->accessorPrefixes =
|
71 |
-
$this->arrayMutatorPrefixes =
|
72 |
}
|
73 |
|
74 |
/**
|
@@ -165,7 +165,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
165 |
continue 2;
|
166 |
}
|
167 |
|
168 |
-
$types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->
|
169 |
}
|
170 |
}
|
171 |
}
|
@@ -196,7 +196,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
196 |
/** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */
|
197 |
foreach ($docBlock->getTagsByName('param') as $tag) {
|
198 |
if ($tag && null !== $tag->getType()) {
|
199 |
-
$types =
|
200 |
}
|
201 |
}
|
202 |
|
@@ -204,7 +204,7 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
204 |
return null;
|
205 |
}
|
206 |
|
207 |
-
return
|
208 |
}
|
209 |
|
210 |
private function getDocBlockFromConstructor(string $class, string $property): ?DocBlock
|
@@ -238,6 +238,9 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
238 |
$docBlock->getLocation(), $docBlock->isTemplateStart(), $docBlock->isTemplateEnd());
|
239 |
}
|
240 |
|
|
|
|
|
|
|
241 |
private function getDocBlock(string $class, string $property): array
|
242 |
{
|
243 |
$propertyHash = sprintf('%s::%s', $class, $property);
|
@@ -277,25 +280,24 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
277 |
return null;
|
278 |
}
|
279 |
|
280 |
-
|
281 |
-
$reflector = $reflectionProperty->getDeclaringClass();
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
break;
|
288 |
-
}
|
289 |
}
|
|
|
290 |
|
|
|
291 |
return $this->docBlockFactory->create($reflectionProperty, $this->createFromReflector($reflector));
|
292 |
-
} catch (\InvalidArgumentException $e) {
|
293 |
-
return null;
|
294 |
-
} catch (\RuntimeException $e) {
|
295 |
return null;
|
296 |
}
|
297 |
}
|
298 |
|
|
|
|
|
|
|
299 |
private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array
|
300 |
{
|
301 |
$prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes;
|
@@ -325,11 +327,17 @@ class PhpDocExtractor implements PropertyDescriptionExtractorInterface, Property
|
|
325 |
return null;
|
326 |
}
|
327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
try {
|
329 |
-
return [$this->docBlockFactory->create($reflectionMethod, $this->createFromReflector($
|
330 |
-
} catch (\InvalidArgumentException $e) {
|
331 |
-
return null;
|
332 |
-
} catch (\RuntimeException $e) {
|
333 |
return null;
|
334 |
}
|
335 |
}
|
36 |
public const MUTATOR = 2;
|
37 |
|
38 |
/**
|
39 |
+
* @var array<string, array{DocBlock|null, int|null, string|null}>
|
40 |
*/
|
41 |
private $docBlocks = [];
|
42 |
|
66 |
$this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance();
|
67 |
$this->contextFactory = new ContextFactory();
|
68 |
$this->phpDocTypeHelper = new PhpDocTypeHelper();
|
69 |
+
$this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes;
|
70 |
+
$this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes;
|
71 |
+
$this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes;
|
72 |
}
|
73 |
|
74 |
/**
|
165 |
continue 2;
|
166 |
}
|
167 |
|
168 |
+
$types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes());
|
169 |
}
|
170 |
}
|
171 |
}
|
196 |
/** @var DocBlock\Tags\Var_|DocBlock\Tags\Return_|DocBlock\Tags\Param $tag */
|
197 |
foreach ($docBlock->getTagsByName('param') as $tag) {
|
198 |
if ($tag && null !== $tag->getType()) {
|
199 |
+
$types[] = $this->phpDocTypeHelper->getTypes($tag->getType());
|
200 |
}
|
201 |
}
|
202 |
|
204 |
return null;
|
205 |
}
|
206 |
|
207 |
+
return array_merge([], ...$types);
|
208 |
}
|
209 |
|
210 |
private function getDocBlockFromConstructor(string $class, string $property): ?DocBlock
|
238 |
$docBlock->getLocation(), $docBlock->isTemplateStart(), $docBlock->isTemplateEnd());
|
239 |
}
|
240 |
|
241 |
+
/**
|
242 |
+
* @return array{DocBlock|null, int|null, string|null}
|
243 |
+
*/
|
244 |
private function getDocBlock(string $class, string $property): array
|
245 |
{
|
246 |
$propertyHash = sprintf('%s::%s', $class, $property);
|
280 |
return null;
|
281 |
}
|
282 |
|
283 |
+
$reflector = $reflectionProperty->getDeclaringClass();
|
|
|
284 |
|
285 |
+
foreach ($reflector->getTraits() as $trait) {
|
286 |
+
if ($trait->hasProperty($property)) {
|
287 |
+
return $this->getDocBlockFromProperty($trait->getName(), $property);
|
|
|
|
|
|
|
288 |
}
|
289 |
+
}
|
290 |
|
291 |
+
try {
|
292 |
return $this->docBlockFactory->create($reflectionProperty, $this->createFromReflector($reflector));
|
293 |
+
} catch (\InvalidArgumentException|\RuntimeException $e) {
|
|
|
|
|
294 |
return null;
|
295 |
}
|
296 |
}
|
297 |
|
298 |
+
/**
|
299 |
+
* @return array{DocBlock, string}|null
|
300 |
+
*/
|
301 |
private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array
|
302 |
{
|
303 |
$prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes;
|
327 |
return null;
|
328 |
}
|
329 |
|
330 |
+
$reflector = $reflectionMethod->getDeclaringClass();
|
331 |
+
|
332 |
+
foreach ($reflector->getTraits() as $trait) {
|
333 |
+
if ($trait->hasMethod($methodName)) {
|
334 |
+
return $this->getDocBlockFromMethod($trait->getName(), $ucFirstProperty, $type);
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
try {
|
339 |
+
return [$this->docBlockFactory->create($reflectionMethod, $this->createFromReflector($reflector)), $prefix];
|
340 |
+
} catch (\InvalidArgumentException|\RuntimeException $e) {
|
|
|
|
|
341 |
return null;
|
342 |
}
|
343 |
}
|
vendor/symfony/property-info/Extractor/PhpStanExtractor.php
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Symfony\Component\PropertyInfo\Extractor;
|
13 |
+
|
14 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\InvalidTagValueNode;
|
15 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
16 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
17 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
|
18 |
+
use PHPStan\PhpDocParser\Lexer\Lexer;
|
19 |
+
use PHPStan\PhpDocParser\Parser\ConstExprParser;
|
20 |
+
use PHPStan\PhpDocParser\Parser\PhpDocParser;
|
21 |
+
use PHPStan\PhpDocParser\Parser\TokenIterator;
|
22 |
+
use PHPStan\PhpDocParser\Parser\TypeParser;
|
23 |
+
use Symfony\Component\PropertyInfo\PhpStan\NameScopeFactory;
|
24 |
+
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
|
25 |
+
use Symfony\Component\PropertyInfo\Type;
|
26 |
+
use Symfony\Component\PropertyInfo\Util\PhpStanTypeHelper;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Extracts data using PHPStan parser.
|
30 |
+
*
|
31 |
+
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
|
32 |
+
*/
|
33 |
+
final class PhpStanExtractor implements PropertyTypeExtractorInterface, ConstructorArgumentTypeExtractorInterface
|
34 |
+
{
|
35 |
+
private const PROPERTY = 0;
|
36 |
+
private const ACCESSOR = 1;
|
37 |
+
private const MUTATOR = 2;
|
38 |
+
|
39 |
+
/** @var PhpDocParser */
|
40 |
+
private $phpDocParser;
|
41 |
+
|
42 |
+
/** @var Lexer */
|
43 |
+
private $lexer;
|
44 |
+
|
45 |
+
/** @var NameScopeFactory */
|
46 |
+
private $nameScopeFactory;
|
47 |
+
|
48 |
+
/** @var array<string, array{PhpDocNode|null, int|null, string|null}> */
|
49 |
+
private $docBlocks = [];
|
50 |
+
private $phpStanTypeHelper;
|
51 |
+
private $mutatorPrefixes;
|
52 |
+
private $accessorPrefixes;
|
53 |
+
private $arrayMutatorPrefixes;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @param list<string>|null $mutatorPrefixes
|
57 |
+
* @param list<string>|null $accessorPrefixes
|
58 |
+
* @param list<string>|null $arrayMutatorPrefixes
|
59 |
+
*/
|
60 |
+
public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null)
|
61 |
+
{
|
62 |
+
$this->phpStanTypeHelper = new PhpStanTypeHelper();
|
63 |
+
$this->mutatorPrefixes = $mutatorPrefixes ?? ReflectionExtractor::$defaultMutatorPrefixes;
|
64 |
+
$this->accessorPrefixes = $accessorPrefixes ?? ReflectionExtractor::$defaultAccessorPrefixes;
|
65 |
+
$this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? ReflectionExtractor::$defaultArrayMutatorPrefixes;
|
66 |
+
|
67 |
+
$this->phpDocParser = new PhpDocParser(new TypeParser(new ConstExprParser()), new ConstExprParser());
|
68 |
+
$this->lexer = new Lexer();
|
69 |
+
$this->nameScopeFactory = new NameScopeFactory();
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getTypes(string $class, string $property, array $context = []): ?array
|
73 |
+
{
|
74 |
+
/** @var PhpDocNode|null $docNode */
|
75 |
+
[$docNode, $source, $prefix] = $this->getDocBlock($class, $property);
|
76 |
+
$nameScope = $this->nameScopeFactory->create($class);
|
77 |
+
if (null === $docNode) {
|
78 |
+
return null;
|
79 |
+
}
|
80 |
+
|
81 |
+
switch ($source) {
|
82 |
+
case self::PROPERTY:
|
83 |
+
$tag = '@var';
|
84 |
+
break;
|
85 |
+
|
86 |
+
case self::ACCESSOR:
|
87 |
+
$tag = '@return';
|
88 |
+
break;
|
89 |
+
|
90 |
+
case self::MUTATOR:
|
91 |
+
$tag = '@param';
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
|
95 |
+
$parentClass = null;
|
96 |
+
$types = [];
|
97 |
+
foreach ($docNode->getTagsByName($tag) as $tagDocNode) {
|
98 |
+
if ($tagDocNode->value instanceof InvalidTagValueNode) {
|
99 |
+
continue;
|
100 |
+
}
|
101 |
+
|
102 |
+
foreach ($this->phpStanTypeHelper->getTypes($tagDocNode->value, $nameScope) as $type) {
|
103 |
+
switch ($type->getClassName()) {
|
104 |
+
case 'self':
|
105 |
+
case 'static':
|
106 |
+
$resolvedClass = $class;
|
107 |
+
break;
|
108 |
+
|
109 |
+
case 'parent':
|
110 |
+
if (false !== $resolvedClass = $parentClass ?? $parentClass = get_parent_class($class)) {
|
111 |
+
break;
|
112 |
+
}
|
113 |
+
// no break
|
114 |
+
|
115 |
+
default:
|
116 |
+
$types[] = $type;
|
117 |
+
continue 2;
|
118 |
+
}
|
119 |
+
|
120 |
+
$types[] = new Type(Type::BUILTIN_TYPE_OBJECT, $type->isNullable(), $resolvedClass, $type->isCollection(), $type->getCollectionKeyTypes(), $type->getCollectionValueTypes());
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
if (!isset($types[0])) {
|
125 |
+
return null;
|
126 |
+
}
|
127 |
+
|
128 |
+
if (!\in_array($prefix, $this->arrayMutatorPrefixes, true)) {
|
129 |
+
return $types;
|
130 |
+
}
|
131 |
+
|
132 |
+
return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT), $types[0])];
|
133 |
+
}
|
134 |
+
|
135 |
+
public function getTypesFromConstructor(string $class, string $property): ?array
|
136 |
+
{
|
137 |
+
if (null === $tagDocNode = $this->getDocBlockFromConstructor($class, $property)) {
|
138 |
+
return null;
|
139 |
+
}
|
140 |
+
|
141 |
+
$types = [];
|
142 |
+
foreach ($this->phpStanTypeHelper->getTypes($tagDocNode, $this->nameScopeFactory->create($class)) as $type) {
|
143 |
+
$types[] = $type;
|
144 |
+
}
|
145 |
+
|
146 |
+
if (!isset($types[0])) {
|
147 |
+
return null;
|
148 |
+
}
|
149 |
+
|
150 |
+
return $types;
|
151 |
+
}
|
152 |
+
|
153 |
+
private function getDocBlockFromConstructor(string $class, string $property): ?ParamTagValueNode
|
154 |
+
{
|
155 |
+
try {
|
156 |
+
$reflectionClass = new \ReflectionClass($class);
|
157 |
+
} catch (\ReflectionException $e) {
|
158 |
+
return null;
|
159 |
+
}
|
160 |
+
|
161 |
+
if (null === $reflectionConstructor = $reflectionClass->getConstructor()) {
|
162 |
+
return null;
|
163 |
+
}
|
164 |
+
|
165 |
+
$rawDocNode = $reflectionConstructor->getDocComment();
|
166 |
+
$tokens = new TokenIterator($this->lexer->tokenize($rawDocNode));
|
167 |
+
$phpDocNode = $this->phpDocParser->parse($tokens);
|
168 |
+
$tokens->consumeTokenType(Lexer::TOKEN_END);
|
169 |
+
|
170 |
+
return $this->filterDocBlockParams($phpDocNode, $property);
|
171 |
+
}
|
172 |
+
|
173 |
+
private function filterDocBlockParams(PhpDocNode $docNode, string $allowedParam): ?ParamTagValueNode
|
174 |
+
{
|
175 |
+
$tags = array_values(array_filter($docNode->getTagsByName('@param'), function ($tagNode) use ($allowedParam) {
|
176 |
+
return $tagNode instanceof PhpDocTagNode && ('$'.$allowedParam) === $tagNode->value->parameterName;
|
177 |
+
}));
|
178 |
+
|
179 |
+
if (!$tags) {
|
180 |
+
return null;
|
181 |
+
}
|
182 |
+
|
183 |
+
return $tags[0]->value;
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* @return array{PhpDocNode|null, int|null, string|null}
|
188 |
+
*/
|
189 |
+
private function getDocBlock(string $class, string $property): array
|
190 |
+
{
|
191 |
+
$propertyHash = $class.'::'.$property;
|
192 |
+
|
193 |
+
if (isset($this->docBlocks[$propertyHash])) {
|
194 |
+
return $this->docBlocks[$propertyHash];
|
195 |
+
}
|
196 |
+
|
197 |
+
$ucFirstProperty = ucfirst($property);
|
198 |
+
|
199 |
+
if ($docBlock = $this->getDocBlockFromProperty($class, $property)) {
|
200 |
+
$data = [$docBlock, self::PROPERTY, null];
|
201 |
+
} elseif ([$docBlock] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::ACCESSOR)) {
|
202 |
+
$data = [$docBlock, self::ACCESSOR, null];
|
203 |
+
} elseif ([$docBlock, $prefix] = $this->getDocBlockFromMethod($class, $ucFirstProperty, self::MUTATOR)) {
|
204 |
+
$data = [$docBlock, self::MUTATOR, $prefix];
|
205 |
+
} else {
|
206 |
+
$data = [null, null, null];
|
207 |
+
}
|
208 |
+
|
209 |
+
return $this->docBlocks[$propertyHash] = $data;
|
210 |
+
}
|
211 |
+
|
212 |
+
private function getDocBlockFromProperty(string $class, string $property): ?PhpDocNode
|
213 |
+
{
|
214 |
+
// Use a ReflectionProperty instead of $class to get the parent class if applicable
|
215 |
+
try {
|
216 |
+
$reflectionProperty = new \ReflectionProperty($class, $property);
|
217 |
+
} catch (\ReflectionException $e) {
|
218 |
+
return null;
|
219 |
+
}
|
220 |
+
|
221 |
+
if (null === $rawDocNode = $reflectionProperty->getDocComment() ?: null) {
|
222 |
+
return null;
|
223 |
+
}
|
224 |
+
|
225 |
+
$tokens = new TokenIterator($this->lexer->tokenize($rawDocNode));
|
226 |
+
$phpDocNode = $this->phpDocParser->parse($tokens);
|
227 |
+
$tokens->consumeTokenType(Lexer::TOKEN_END);
|
228 |
+
|
229 |
+
return $phpDocNode;
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* @return array{PhpDocNode, string}|null
|
234 |
+
*/
|
235 |
+
private function getDocBlockFromMethod(string $class, string $ucFirstProperty, int $type): ?array
|
236 |
+
{
|
237 |
+
$prefixes = self::ACCESSOR === $type ? $this->accessorPrefixes : $this->mutatorPrefixes;
|
238 |
+
$prefix = null;
|
239 |
+
|
240 |
+
foreach ($prefixes as $prefix) {
|
241 |
+
$methodName = $prefix.$ucFirstProperty;
|
242 |
+
|
243 |
+
try {
|
244 |
+
$reflectionMethod = new \ReflectionMethod($class, $methodName);
|
245 |
+
if ($reflectionMethod->isStatic()) {
|
246 |
+
continue;
|
247 |
+
}
|
248 |
+
|
249 |
+
if (
|
250 |
+
(self::ACCESSOR === $type && 0 === $reflectionMethod->getNumberOfRequiredParameters())
|
251 |
+
|| (self::MUTATOR === $type && $reflectionMethod->getNumberOfParameters() >= 1)
|
252 |
+
) {
|
253 |
+
break;
|
254 |
+
}
|
255 |
+
} catch (\ReflectionException $e) {
|
256 |
+
// Try the next prefix if the method doesn't exist
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
if (!isset($reflectionMethod)) {
|
261 |
+
return null;
|
262 |
+
}
|
263 |
+
|
264 |
+
if (null === $rawDocNode = $reflectionMethod->getDocComment() ?: null) {
|
265 |
+
return null;
|
266 |
+
}
|
267 |
+
|
268 |
+
$tokens = new TokenIterator($this->lexer->tokenize($rawDocNode));
|
269 |
+
$phpDocNode = $this->phpDocParser->parse($tokens);
|
270 |
+
$tokens->consumeTokenType(Lexer::TOKEN_END);
|
271 |
+
|
272 |
+
return [$phpDocNode, $prefix];
|
273 |
+
}
|
274 |
+
}
|
vendor/symfony/property-info/Extractor/ReflectionExtractor.php
CHANGED
@@ -85,9 +85,9 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
85 |
*/
|
86 |
public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET)
|
87 |
{
|
88 |
-
$this->mutatorPrefixes =
|
89 |
-
$this->accessorPrefixes =
|
90 |
-
$this->arrayMutatorPrefixes =
|
91 |
$this->enableConstructorExtraction = $enableConstructorExtraction;
|
92 |
$this->methodReflectionFlags = $this->getMethodsFlags($accessFlags);
|
93 |
$this->propertyReflectionFlags = $this->getPropertyFlags($accessFlags);
|
@@ -156,20 +156,8 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
156 |
return $fromConstructor;
|
157 |
}
|
158 |
|
159 |
-
if ($
|
160 |
-
return $
|
161 |
-
}
|
162 |
-
|
163 |
-
if (\PHP_VERSION_ID >= 70400) {
|
164 |
-
try {
|
165 |
-
$reflectionProperty = new \ReflectionProperty($class, $property);
|
166 |
-
$type = $reflectionProperty->getType();
|
167 |
-
if (null !== $type && $types = $this->extractFromReflectionType($type, $reflectionProperty->getDeclaringClass())) {
|
168 |
-
return $types;
|
169 |
-
}
|
170 |
-
} catch (\ReflectionException $e) {
|
171 |
-
// noop
|
172 |
-
}
|
173 |
}
|
174 |
|
175 |
return null;
|
@@ -309,16 +297,16 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
309 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisiblityForMethod($method), $method->isStatic(), false);
|
310 |
}
|
311 |
|
|
|
|
|
|
|
|
|
312 |
if ($hasProperty && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) {
|
313 |
$reflProperty = $reflClass->getProperty($property);
|
314 |
|
315 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($reflProperty), $reflProperty->isStatic(), true);
|
316 |
}
|
317 |
|
318 |
-
if ($allowMagicGet && $reflClass->hasMethod('__get') && ($reflClass->getMethod('__get')->getModifiers() & $this->methodReflectionFlags)) {
|
319 |
-
return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
|
320 |
-
}
|
321 |
-
|
322 |
if ($allowMagicCall && $reflClass->hasMethod('__call') && ($reflClass->getMethod('__call')->getModifiers() & $this->methodReflectionFlags)) {
|
323 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get'.$camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
|
324 |
}
|
@@ -376,14 +364,14 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
376 |
return $mutator;
|
377 |
}
|
378 |
|
379 |
-
$errors =
|
380 |
|
381 |
foreach ($this->mutatorPrefixes as $mutatorPrefix) {
|
382 |
$methodName = $mutatorPrefix.$camelized;
|
383 |
|
384 |
[$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $methodName, 1);
|
385 |
if (!$accessible) {
|
386 |
-
$errors =
|
387 |
continue;
|
388 |
}
|
389 |
|
@@ -404,7 +392,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
404 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $getsetter, $this->getWriteVisiblityForMethod($method), $method->isStatic());
|
405 |
}
|
406 |
|
407 |
-
$errors =
|
408 |
}
|
409 |
|
410 |
if ($reflClass->hasProperty($property) && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) {
|
@@ -419,7 +407,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
419 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
|
420 |
}
|
421 |
|
422 |
-
$errors =
|
423 |
}
|
424 |
|
425 |
if ($allowMagicCall) {
|
@@ -428,21 +416,21 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
428 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set'.$camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
|
429 |
}
|
430 |
|
431 |
-
$errors =
|
432 |
}
|
433 |
|
434 |
if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) {
|
435 |
-
$errors[] = sprintf(
|
436 |
'The property "%s" in class "%s" can be defined with the methods "%s()" but '.
|
437 |
'the new value must be an array or an instance of \Traversable',
|
438 |
$property,
|
439 |
$reflClass->getName(),
|
440 |
implode('()", "', [$adderAccessName, $removerAccessName])
|
441 |
-
);
|
442 |
}
|
443 |
|
444 |
$noneProperty = new PropertyWriteInfo();
|
445 |
-
$noneProperty->setErrors(
|
446 |
|
447 |
return $noneProperty;
|
448 |
}
|
@@ -530,10 +518,19 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
530 |
return null;
|
531 |
}
|
532 |
|
533 |
-
private function
|
534 |
{
|
535 |
try {
|
536 |
$reflectionClass = new \ReflectionClass($class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
} catch (\ReflectionException $e) {
|
538 |
return null;
|
539 |
}
|
@@ -547,7 +544,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
547 |
$type = \gettype($defaultValue);
|
548 |
$type = static::MAP_TYPES[$type] ?? $type;
|
549 |
|
550 |
-
return [new Type($type,
|
551 |
}
|
552 |
|
553 |
private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array
|
@@ -555,9 +552,9 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
555 |
$types = [];
|
556 |
$nullable = $reflectionType->allowsNull();
|
557 |
|
558 |
-
foreach ($reflectionType instanceof \ReflectionUnionType ? $reflectionType->getTypes() : [$reflectionType] as $type) {
|
559 |
-
$phpTypeOrClass = $
|
560 |
-
if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass) {
|
561 |
continue;
|
562 |
}
|
563 |
|
@@ -587,12 +584,31 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
587 |
return $name;
|
588 |
}
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
private function isAllowedProperty(string $class, string $property): bool
|
591 |
{
|
592 |
try {
|
593 |
$reflectionProperty = new \ReflectionProperty($class, $property);
|
594 |
|
595 |
-
return $reflectionProperty->getModifiers() & $this->propertyReflectionFlags;
|
596 |
} catch (\ReflectionException $e) {
|
597 |
// Return false if the property doesn't exist
|
598 |
}
|
@@ -711,20 +727,21 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|
711 |
|
712 |
[$addMethodFound, $addMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $addMethod, 1);
|
713 |
[$removeMethodFound, $removeMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $removeMethod, 1);
|
714 |
-
$errors =
|
|
|
715 |
|
716 |
if ($addMethodFound && $removeMethodFound) {
|
717 |
return [$addMethod, $removeMethod, []];
|
718 |
}
|
719 |
|
720 |
if ($addMethodFound && !$removeMethodFound) {
|
721 |
-
$errors[] = sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod);
|
722 |
} elseif (!$addMethodFound && $removeMethodFound) {
|
723 |
-
$errors[] = sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod);
|
724 |
}
|
725 |
}
|
726 |
|
727 |
-
return [null, null,
|
728 |
}
|
729 |
|
730 |
/**
|
85 |
*/
|
86 |
public function __construct(array $mutatorPrefixes = null, array $accessorPrefixes = null, array $arrayMutatorPrefixes = null, bool $enableConstructorExtraction = true, int $accessFlags = self::ALLOW_PUBLIC, InflectorInterface $inflector = null, int $magicMethodsFlags = self::ALLOW_MAGIC_GET | self::ALLOW_MAGIC_SET)
|
87 |
{
|
88 |
+
$this->mutatorPrefixes = $mutatorPrefixes ?? self::$defaultMutatorPrefixes;
|
89 |
+
$this->accessorPrefixes = $accessorPrefixes ?? self::$defaultAccessorPrefixes;
|
90 |
+
$this->arrayMutatorPrefixes = $arrayMutatorPrefixes ?? self::$defaultArrayMutatorPrefixes;
|
91 |
$this->enableConstructorExtraction = $enableConstructorExtraction;
|
92 |
$this->methodReflectionFlags = $this->getMethodsFlags($accessFlags);
|
93 |
$this->propertyReflectionFlags = $this->getPropertyFlags($accessFlags);
|
156 |
return $fromConstructor;
|
157 |
}
|
158 |
|
159 |
+
if ($fromPropertyDeclaration = $this->extractFromPropertyDeclaration($class, $property)) {
|
160 |
+
return $fromPropertyDeclaration;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
}
|
162 |
|
163 |
return null;
|
297 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisiblityForMethod($method), $method->isStatic(), false);
|
298 |
}
|
299 |
|
300 |
+
if ($allowMagicGet && $reflClass->hasMethod('__get') && ($reflClass->getMethod('__get')->getModifiers() & $this->methodReflectionFlags)) {
|
301 |
+
return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
|
302 |
+
}
|
303 |
+
|
304 |
if ($hasProperty && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) {
|
305 |
$reflProperty = $reflClass->getProperty($property);
|
306 |
|
307 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_PROPERTY, $property, $this->getReadVisiblityForProperty($reflProperty), $reflProperty->isStatic(), true);
|
308 |
}
|
309 |
|
|
|
|
|
|
|
|
|
310 |
if ($allowMagicCall && $reflClass->hasMethod('__call') && ($reflClass->getMethod('__call')->getModifiers() & $this->methodReflectionFlags)) {
|
311 |
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get'.$camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
|
312 |
}
|
364 |
return $mutator;
|
365 |
}
|
366 |
|
367 |
+
$errors[] = $adderAndRemoverErrors;
|
368 |
|
369 |
foreach ($this->mutatorPrefixes as $mutatorPrefix) {
|
370 |
$methodName = $mutatorPrefix.$camelized;
|
371 |
|
372 |
[$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $methodName, 1);
|
373 |
if (!$accessible) {
|
374 |
+
$errors[] = $methodAccessibleErrors;
|
375 |
continue;
|
376 |
}
|
377 |
|
392 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, $getsetter, $this->getWriteVisiblityForMethod($method), $method->isStatic());
|
393 |
}
|
394 |
|
395 |
+
$errors[] = $methodAccessibleErrors;
|
396 |
}
|
397 |
|
398 |
if ($reflClass->hasProperty($property) && ($reflClass->getProperty($property)->getModifiers() & $this->propertyReflectionFlags)) {
|
407 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_PROPERTY, $property, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
|
408 |
}
|
409 |
|
410 |
+
$errors[] = $methodAccessibleErrors;
|
411 |
}
|
412 |
|
413 |
if ($allowMagicCall) {
|
416 |
return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set'.$camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
|
417 |
}
|
418 |
|
419 |
+
$errors[] = $methodAccessibleErrors;
|
420 |
}
|
421 |
|
422 |
if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) {
|
423 |
+
$errors[] = [sprintf(
|
424 |
'The property "%s" in class "%s" can be defined with the methods "%s()" but '.
|
425 |
'the new value must be an array or an instance of \Traversable',
|
426 |
$property,
|
427 |
$reflClass->getName(),
|
428 |
implode('()", "', [$adderAccessName, $removerAccessName])
|
429 |
+
)];
|
430 |
}
|
431 |
|
432 |
$noneProperty = new PropertyWriteInfo();
|
433 |
+
$noneProperty->setErrors(array_merge([], ...$errors));
|
434 |
|
435 |
return $noneProperty;
|
436 |
}
|
518 |
return null;
|
519 |
}
|
520 |
|
521 |
+
private function extractFromPropertyDeclaration(string $class, string $property): ?array
|
522 |
{
|
523 |
try {
|
524 |
$reflectionClass = new \ReflectionClass($class);
|
525 |
+
|
526 |
+
if (\PHP_VERSION_ID >= 70400) {
|
527 |
+
$reflectionProperty = $reflectionClass->getProperty($property);
|
528 |
+
$reflectionPropertyType = $reflectionProperty->getType();
|
529 |
+
|
530 |
+
if (null !== $reflectionPropertyType && $types = $this->extractFromReflectionType($reflectionPropertyType, $reflectionProperty->getDeclaringClass())) {
|
531 |
+
return $types;
|
532 |
+
}
|
533 |
+
}
|
534 |
} catch (\ReflectionException $e) {
|
535 |
return null;
|
536 |
}
|
544 |
$type = \gettype($defaultValue);
|
545 |
$type = static::MAP_TYPES[$type] ?? $type;
|
546 |
|
547 |
+
return [new Type($type, $this->isNullableProperty($class, $property), null, Type::BUILTIN_TYPE_ARRAY === $type)];
|
548 |
}
|
549 |
|
550 |
private function extractFromReflectionType(\ReflectionType $reflectionType, \ReflectionClass $declaringClass): array
|
552 |
$types = [];
|
553 |
$nullable = $reflectionType->allowsNull();
|
554 |
|
555 |
+
foreach (($reflectionType instanceof \ReflectionUnionType || $reflectionType instanceof \ReflectionIntersectionType) ? $reflectionType->getTypes() : [$reflectionType] as $type) {
|
556 |
+
$phpTypeOrClass = $type->getName();
|
557 |
+
if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) {
|
558 |
continue;
|
559 |
}
|
560 |
|
584 |
return $name;
|
585 |
}
|
586 |
|
587 |
+
private function isNullableProperty(string $class, string $property): bool
|
588 |
+
{
|
589 |
+
try {
|
590 |
+
$reflectionProperty = new \ReflectionProperty($class, $property);
|
591 |
+
|
592 |
+
if (\PHP_VERSION_ID >= 70400) {
|
593 |
+
$reflectionPropertyType = $reflectionProperty->getType();
|
594 |
+
|
595 |
+
return null !== $reflectionPropertyType && $reflectionPropertyType->allowsNull();
|
596 |
+
}
|
597 |
+
|
598 |
+
return false;
|
599 |
+
} catch (\ReflectionException $e) {
|
600 |
+
// Return false if the property doesn't exist
|
601 |
+
}
|
602 |
+
|
603 |
+
return false;
|
604 |
+
}
|
605 |
+
|
606 |
private function isAllowedProperty(string $class, string $property): bool
|
607 |
{
|
608 |
try {
|
609 |
$reflectionProperty = new \ReflectionProperty($class, $property);
|
610 |
|
611 |
+
return (bool) ($reflectionProperty->getModifiers() & $this->propertyReflectionFlags);
|
612 |
} catch (\ReflectionException $e) {
|
613 |
// Return false if the property doesn't exist
|
614 |
}
|
727 |
|
728 |
[$addMethodFound, $addMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $addMethod, 1);
|
729 |
[$removeMethodFound, $removeMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $removeMethod, 1);
|
730 |
+
$errors[] = $addMethodAccessibleErrors;
|
731 |
+
$errors[] = $removeMethodAccessibleErrors;
|
732 |
|
733 |
if ($addMethodFound && $removeMethodFound) {
|
734 |
return [$addMethod, $removeMethod, []];
|
735 |
}
|
736 |
|
737 |
if ($addMethodFound && !$removeMethodFound) {
|
738 |
+
$errors[] = [sprintf('The add method "%s" in class "%s" was found, but the corresponding remove method "%s" was not found', $addMethod, $reflClass->getName(), $removeMethod)];
|
739 |
} elseif (!$addMethodFound && $removeMethodFound) {
|
740 |
+
$errors[] = [sprintf('The remove method "%s" in class "%s" was found, but the corresponding add method "%s" was not found', $removeMethod, $reflClass->getName(), $addMethod)];
|
741 |
}
|
742 |
}
|
743 |
|
744 |
+
return [null, null, array_merge([], ...$errors)];
|
745 |
}
|
746 |
|
747 |
/**
|
vendor/symfony/property-info/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2015-
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
+
Copyright (c) 2015-2022 Fabien Potencier
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
vendor/symfony/property-info/PhpStan/NameScope.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Symfony\Component\PropertyInfo\PhpStan;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* NameScope class adapted from PHPStan code.
|
16 |
+
*
|
17 |
+
* @copyright Copyright (c) 2016, PHPStan https://github.com/phpstan/phpstan-src
|
18 |
+
* @copyright Copyright (c) 2016, Ondřej Mirtes
|
19 |
+
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
|
20 |
+
*
|
21 |
+
* @internal
|
22 |
+
*/
|
23 |
+
final class NameScope
|
24 |
+
{
|
25 |
+
private $className;
|
26 |
+
private $namespace;
|
27 |
+
/** @var array<string, string> alias(string) => fullName(string) */
|
28 |
+
private $uses;
|
29 |
+
|
30 |
+
public function __construct(string $className, string $namespace, array $uses = [])
|
31 |
+
{
|
32 |
+
$this->className = $className;
|
33 |
+
$this->namespace = $namespace;
|
34 |
+
$this->uses = $uses;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function resolveStringName(string $name): string
|
38 |
+
{
|
39 |
+
if (0 === strpos($name, '\\')) {
|
40 |
+
return ltrim($name, '\\');
|
41 |
+
}
|
42 |
+
|
43 |
+
$nameParts = explode('\\', $name);
|
44 |
+
$firstNamePart = $nameParts[0];
|
45 |
+
if (isset($this->uses[$firstNamePart])) {
|
46 |
+
if (1 === \count($nameParts)) {
|
47 |
+
return $this->uses[$firstNamePart];
|
48 |
+
}
|
49 |
+
array_shift($nameParts);
|
50 |
+
|
51 |
+
return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts));
|
52 |
+
}
|
53 |
+
|
54 |
+
if (null !== $this->namespace) {
|
55 |
+
return sprintf('%s\\%s', $this->namespace, $name);
|
56 |
+
}
|
57 |
+
|
58 |
+
return $name;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function resolveRootClass(): string
|
62 |
+
{
|
63 |
+
return $this->resolveStringName($this->className);
|
64 |
+
}
|
65 |
+
}
|
vendor/symfony/property-info/PhpStan/NameScopeFactory.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Symfony\Component\PropertyInfo\PhpStan;
|
13 |
+
|
14 |
+
use phpDocumentor\Reflection\Types\ContextFactory;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
|
18 |
+
*
|
19 |
+
* @internal
|
20 |
+
*/
|
21 |
+
final class NameScopeFactory
|
22 |
+
{
|
23 |
+
public function create(string $fullClassName): NameScope
|
24 |
+
{
|
25 |
+
$reflection = new \ReflectionClass($fullClassName);
|
26 |
+
$path = explode('\\', $fullClassName);
|
27 |
+
$className = array_pop($path);
|
28 |
+
[$namespace, $uses] = $this->extractFromFullClassName($reflection);
|
29 |
+
|
30 |
+
$uses = array_merge($uses, $this->collectUses($reflection));
|
31 |
+
|
32 |
+
return new NameScope($className, $namespace, $uses);
|
33 |
+
}
|
34 |
+
|
35 |
+
private function collectUses(\ReflectionClass $reflection): array
|
36 |
+
{
|
37 |
+
$uses = [$this->extractFromFullClassName($reflection)[1]];
|
38 |
+
|
39 |
+
foreach ($reflection->getTraits() as $traitReflection) {
|
40 |
+
$uses[] = $this->extractFromFullClassName($traitReflection)[1];
|
41 |
+
}
|
42 |
+
|
43 |
+
if (false !== $parentClass = $reflection->getParentClass()) {
|
44 |
+
$uses[] = $this->collectUses($parentClass);
|
45 |
+
}
|
46 |
+
|
47 |
+
return $uses ? array_merge(...$uses) : [];
|
48 |
+
}
|
49 |
+
|
50 |
+
private function extractFromFullClassName(\ReflectionClass $reflection): array
|
51 |
+
{
|
52 |
+
$namespace = trim($reflection->getNamespaceName(), '\\');
|
53 |
+
$fileName = $reflection->getFileName();
|
54 |
+
|
55 |
+
if (\is_string($fileName) && is_file($fileName)) {
|
56 |
+
if (false === $contents = file_get_contents($fileName)) {
|
57 |
+
throw new \RuntimeException(sprintf('Unable to read file "%s".', $fileName));
|
58 |
+
}
|
59 |
+
|
60 |
+
$factory = new ContextFactory();
|
61 |
+
$context = $factory->createForNamespace($namespace, $contents);
|
62 |
+
|
63 |
+
return [$namespace, $context->getNamespaceAliases()];
|
64 |
+
}
|
65 |
+
|
66 |
+
return [$namespace, []];
|
67 |
+
}
|
68 |
+
}
|
vendor/symfony/property-info/PropertyInfoExtractor.php
CHANGED
@@ -27,11 +27,11 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface, PropertyI
|
|
27 |
private $initializableExtractors;
|
28 |
|
29 |
/**
|
30 |
-
* @param iterable
|
31 |
-
* @param iterable
|
32 |
-
* @param iterable
|
33 |
-
* @param iterable
|
34 |
-
* @param iterable
|
35 |
*/
|
36 |
public function __construct(iterable $listExtractors = [], iterable $typeExtractors = [], iterable $descriptionExtractors = [], iterable $accessExtractors = [], iterable $initializableExtractors = [])
|
37 |
{
|
@@ -101,6 +101,9 @@ class PropertyInfoExtractor implements PropertyInfoExtractorInterface, PropertyI
|
|
101 |
/**
|
102 |
* Iterates over registered extractors and return the first value found.
|
103 |
*
|
|
|
|
|
|
|
104 |
* @return mixed
|
105 |
*/
|
106 |
private function extract(iterable $extractors, string $method, array $arguments)
|
27 |
private $initializableExtractors;
|
28 |
|
29 |
/**
|
30 |
+
* @param iterable<mixed, PropertyListExtractorInterface> $listExtractors
|
31 |
+
* @param iterable<mixed, PropertyTypeExtractorInterface> $typeExtractors
|
32 |
+
* @param iterable<mixed, PropertyDescriptionExtractorInterface> $descriptionExtractors
|
33 |
+
* @param iterable<mixed, PropertyAccessExtractorInterface> $accessExtractors
|
34 |
+
* @param iterable<mixed, PropertyInitializableExtractorInterface> $initializableExtractors
|
35 |
*/
|
36 |
public function __construct(iterable $listExtractors = [], iterable $typeExtractors = [], iterable $descriptionExtractors = [], iterable $accessExtractors = [], iterable $initializableExtractors = [])
|
37 |
{
|
101 |
/**
|
102 |
* Iterates over registered extractors and return the first value found.
|
103 |
*
|
104 |
+
* @param iterable<mixed, object> $extractors
|
105 |
+
* @param list<mixed> $arguments
|
106 |
+
*
|
107 |
* @return mixed
|
108 |
*/
|
109 |
private function extract(iterable $extractors, string $method, array $arguments)
|
vendor/symfony/property-info/README.md
CHANGED
@@ -7,8 +7,8 @@ using metadata of popular sources.
|
|
7 |
Resources
|
8 |
---------
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
7 |
Resources
|
8 |
---------
|
9 |
|
10 |
+
* [Documentation](https://symfony.com/doc/current/components/property_info.html)
|
11 |
+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
|
12 |
+
* [Report issues](https://github.com/symfony/symfony/issues) and
|
13 |
+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
|
14 |
+
in the [main Symfony repository](https://github.com/symfony/symfony)
|
vendor/symfony/property-info/Type.php
CHANGED
@@ -24,6 +24,8 @@ class Type
|
|
24 |
public const BUILTIN_TYPE_FLOAT = 'float';
|
25 |
public const BUILTIN_TYPE_STRING = 'string';
|
26 |
public const BUILTIN_TYPE_BOOL = 'bool';
|
|
|
|
|
27 |
public const BUILTIN_TYPE_RESOURCE = 'resource';
|
28 |
public const BUILTIN_TYPE_OBJECT = 'object';
|
29 |
public const BUILTIN_TYPE_ARRAY = 'array';
|
@@ -41,6 +43,8 @@ class Type
|
|
41 |
self::BUILTIN_TYPE_FLOAT,
|
42 |
self::BUILTIN_TYPE_STRING,
|
43 |
self::BUILTIN_TYPE_BOOL,
|
|
|
|
|
44 |
self::BUILTIN_TYPE_RESOURCE,
|
45 |
self::BUILTIN_TYPE_OBJECT,
|
46 |
self::BUILTIN_TYPE_ARRAY,
|
@@ -49,6 +53,16 @@ class Type
|
|
49 |
self::BUILTIN_TYPE_ITERABLE,
|
50 |
];
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
private $builtinType;
|
53 |
private $nullable;
|
54 |
private $class;
|
@@ -57,9 +71,12 @@ class Type
|
|
57 |
private $collectionValueType;
|
58 |
|
59 |
/**
|
|
|
|
|
|
|
60 |
* @throws \InvalidArgumentException
|
61 |
*/
|
62 |
-
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false,
|
63 |
{
|
64 |
if (!\in_array($builtinType, self::$builtinTypes)) {
|
65 |
throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType));
|
@@ -69,8 +86,31 @@ class Type
|
|
69 |
$this->nullable = $nullable;
|
70 |
$this->class = $class;
|
71 |
$this->collection = $collection;
|
72 |
-
$this->collectionKeyType = $collectionKeyType;
|
73 |
-
$this->collectionValueType = $collectionValueType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
/**
|
@@ -107,8 +147,33 @@ class Type
|
|
107 |
* Gets collection key type.
|
108 |
*
|
109 |
* Only applicable for a collection type.
|
|
|
|
|
110 |
*/
|
111 |
public function getCollectionKeyType(): ?self
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
{
|
113 |
return $this->collectionKeyType;
|
114 |
}
|
@@ -117,8 +182,24 @@ class Type
|
|
117 |
* Gets collection value type.
|
118 |
*
|
119 |
* Only applicable for a collection type.
|
|
|
|
|
120 |
*/
|
121 |
public function getCollectionValueType(): ?self
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
{
|
123 |
return $this->collectionValueType;
|
124 |
}
|
24 |
public const BUILTIN_TYPE_FLOAT = 'float';
|
25 |
public const BUILTIN_TYPE_STRING = 'string';
|
26 |
public const BUILTIN_TYPE_BOOL = 'bool';
|
27 |
+
public const BUILTIN_TYPE_TRUE = 'true';
|
28 |
+
public const BUILTIN_TYPE_FALSE = 'false';
|
29 |
public const BUILTIN_TYPE_RESOURCE = 'resource';
|
30 |
public const BUILTIN_TYPE_OBJECT = 'object';
|
31 |
public const BUILTIN_TYPE_ARRAY = 'array';
|
43 |
self::BUILTIN_TYPE_FLOAT,
|
44 |
self::BUILTIN_TYPE_STRING,
|
45 |
self::BUILTIN_TYPE_BOOL,
|
46 |
+
self::BUILTIN_TYPE_TRUE,
|
47 |
+
self::BUILTIN_TYPE_FALSE,
|
48 |
self::BUILTIN_TYPE_RESOURCE,
|
49 |
self::BUILTIN_TYPE_OBJECT,
|
50 |
self::BUILTIN_TYPE_ARRAY,
|
53 |
self::BUILTIN_TYPE_ITERABLE,
|
54 |
];
|
55 |
|
56 |
+
/**
|
57 |
+
* List of PHP builtin collection types.
|
58 |
+
*
|
59 |
+
* @var string[]
|
60 |
+
*/
|
61 |
+
public static $builtinCollectionTypes = [
|
62 |
+
self::BUILTIN_TYPE_ARRAY,
|
63 |
+
self::BUILTIN_TYPE_ITERABLE,
|
64 |
+
];
|
65 |
+
|
66 |
private $builtinType;
|
67 |
private $nullable;
|
68 |
private $class;
|
71 |
private $collectionValueType;
|
72 |
|
73 |
/**
|
74 |
+
* @param Type[]|Type|null $collectionKeyType
|
75 |
+
* @param Type[]|Type|null $collectionValueType
|
76 |
+
*
|
77 |
* @throws \InvalidArgumentException
|
78 |
*/
|
79 |
+
public function __construct(string $builtinType, bool $nullable = false, string $class = null, bool $collection = false, $collectionKeyType = null, $collectionValueType = null)
|
80 |
{
|
81 |
if (!\in_array($builtinType, self::$builtinTypes)) {
|
82 |
throw new \InvalidArgumentException(sprintf('"%s" is not a valid PHP type.', $builtinType));
|
86 |
$this->nullable = $nullable;
|
87 |
$this->class = $class;
|
88 |
$this->collection = $collection;
|
89 |
+
$this->collectionKeyType = $this->validateCollectionArgument($collectionKeyType, 5, '$collectionKeyType') ?? [];
|
90 |
+
$this->collectionValueType = $this->validateCollectionArgument($collectionValueType, 6, '$collectionValueType') ?? [];
|
91 |
+
}
|
92 |
+
|
93 |
+
private function validateCollectionArgument($collectionArgument, int $argumentIndex, string $argumentName): ?array
|
94 |
+
{
|
95 |
+
if (null === $collectionArgument) {
|
96 |
+
return null;
|
97 |
+
}
|
98 |
+
|
99 |
+
if (!\is_array($collectionArgument) && !$collectionArgument instanceof self) {
|
100 |
+
throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument)));
|
101 |
+
}
|
102 |
+
|
103 |
+
if (\is_array($collectionArgument)) {
|
104 |
+
foreach ($collectionArgument as $type) {
|
105 |
+
if (!$type instanceof self) {
|
106 |
+
throw new \TypeError(sprintf('"%s()": Argument #%d (%s) must be of type "%s[]", "%s" or "null", array value "%s" given.', __METHOD__, $argumentIndex, $argumentName, self::class, self::class, get_debug_type($collectionArgument)));
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
return $collectionArgument;
|
111 |
+
}
|
112 |
+
|
113 |
+
return [$collectionArgument];
|
114 |
}
|
115 |
|
116 |
/**
|
147 |
* Gets collection key type.
|
148 |
*
|
149 |
* Only applicable for a collection type.
|
150 |
+
*
|
151 |
+
* @deprecated since Symfony 5.3, use "getCollectionKeyTypes()" instead
|
152 |
*/
|
153 |
public function getCollectionKeyType(): ?self
|
154 |
+
{
|
155 |
+
trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionKeyTypes()" instead.', __METHOD__);
|
156 |
+
|
157 |
+
$type = $this->getCollectionKeyTypes();
|
158 |
+
if (0 === \count($type)) {
|
159 |
+
return null;
|
160 |
+
}
|
161 |
+
|
162 |
+
if (\is_array($type)) {
|
163 |
+
[$type] = $type;
|
164 |
+
}
|
165 |
+
|
166 |
+
return $type;
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Gets collection key types.
|
171 |
+
*
|
172 |
+
* Only applicable for a collection type.
|
173 |
+
*
|
174 |
+
* @return Type[]
|
175 |
+
*/
|
176 |
+
public function getCollectionKeyTypes(): array
|
177 |
{
|
178 |
return $this->collectionKeyType;
|
179 |
}
|
182 |
* Gets collection value type.
|
183 |
*
|
184 |
* Only applicable for a collection type.
|
185 |
+
*
|
186 |
+
* @deprecated since Symfony 5.3, use "getCollectionValueTypes()" instead
|
187 |
*/
|
188 |
public function getCollectionValueType(): ?self
|
189 |
+
{
|
190 |
+
trigger_deprecation('symfony/property-info', '5.3', 'The "%s()" method is deprecated, use "getCollectionValueTypes()" instead.', __METHOD__);
|
191 |
+
|
192 |
+
return $this->getCollectionValueTypes()[0] ?? null;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Gets collection value types.
|
197 |
+
*
|
198 |
+
* Only applicable for a collection type.
|
199 |
+
*
|
200 |
+
* @return Type[]
|
201 |
+
*/
|
202 |
+
public function getCollectionValueTypes(): array
|
203 |
{
|
204 |
return $this->collectionValueType;
|
205 |
}
|
vendor/symfony/property-info/Util/PhpDocTypeHelper.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
|
12 |
namespace Symfony\Component\PropertyInfo\Util;
|
13 |
|
|
|
14 |
use phpDocumentor\Reflection\Type as DocType;
|
15 |
use phpDocumentor\Reflection\Types\Array_;
|
16 |
use phpDocumentor\Reflection\Types\Collection;
|
@@ -19,6 +20,10 @@ use phpDocumentor\Reflection\Types\Null_;
|
|
19 |
use phpDocumentor\Reflection\Types\Nullable;
|
20 |
use Symfony\Component\PropertyInfo\Type;
|
21 |
|
|
|
|
|
|
|
|
|
22 |
/**
|
23 |
* Transforms a php doc type to a {@link Type} instance.
|
24 |
*
|
@@ -91,7 +96,13 @@ final class PhpDocTypeHelper
|
|
91 |
$docType = $docType ?? (string) $type;
|
92 |
|
93 |
if ($type instanceof Collection) {
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
$key = $this->getTypes($type->getKeyType());
|
97 |
$value = $this->getTypes($type->getValueType());
|
@@ -109,14 +120,14 @@ final class PhpDocTypeHelper
|
|
109 |
return null;
|
110 |
}
|
111 |
|
112 |
-
if (
|
113 |
$collectionKeyType = new Type(Type::BUILTIN_TYPE_INT);
|
114 |
$collectionValueType = $this->createType($type, false, substr($docType, 0, -2));
|
115 |
|
116 |
return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType);
|
117 |
}
|
118 |
|
119 |
-
if (
|
120 |
// array<value> is converted to x[] which is handled above
|
121 |
// so it's only necessary to handle array<key, value> here
|
122 |
$collectionKeyType = $this->getTypes($type->getKeyType())[0];
|
11 |
|
12 |
namespace Symfony\Component\PropertyInfo\Util;
|
13 |
|
14 |
+
use phpDocumentor\Reflection\PseudoTypes\List_;
|
15 |
use phpDocumentor\Reflection\Type as DocType;
|
16 |
use phpDocumentor\Reflection\Types\Array_;
|
17 |
use phpDocumentor\Reflection\Types\Collection;
|
20 |
use phpDocumentor\Reflection\Types\Nullable;
|
21 |
use Symfony\Component\PropertyInfo\Type;
|
22 |
|
23 |
+
// Workaround for phpdocumentor/type-resolver < 1.6
|
24 |
+
// We trigger the autoloader here, so we don't need to trigger it inside the loop later.
|
25 |
+
class_exists(List_::class);
|
26 |
+
|
27 |
/**
|
28 |
* Transforms a php doc type to a {@link Type} instance.
|
29 |
*
|
96 |
$docType = $docType ?? (string) $type;
|
97 |
|
98 |
if ($type instanceof Collection) {
|
99 |
+
$fqsen = $type->getFqsen();
|
100 |
+
if ($fqsen && 'list' === $fqsen->getName() && !class_exists(List_::class, false) && !class_exists((string) $fqsen)) {
|
101 |
+
// Workaround for phpdocumentor/type-resolver < 1.6
|
102 |
+
return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, new Type(Type::BUILTIN_TYPE_INT), $this->getTypes($type->getValueType()));
|
103 |
+
}
|
104 |
+
|
105 |
+
[$phpType, $class] = $this->getPhpTypeAndClass((string) $fqsen);
|
106 |
|
107 |
$key = $this->getTypes($type->getKeyType());
|
108 |
$value = $this->getTypes($type->getValueType());
|
120 |
return null;
|
121 |
}
|
122 |
|
123 |
+
if (str_ends_with($docType, '[]')) {
|
124 |
$collectionKeyType = new Type(Type::BUILTIN_TYPE_INT);
|
125 |
$collectionValueType = $this->createType($type, false, substr($docType, 0, -2));
|
126 |
|
127 |
return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType);
|
128 |
}
|
129 |
|
130 |
+
if ((str_starts_with($docType, 'list<') || str_starts_with($docType, 'array<')) && $type instanceof Array_) {
|
131 |
// array<value> is converted to x[] which is handled above
|
132 |
// so it's only necessary to handle array<key, value> here
|
133 |
$collectionKeyType = $this->getTypes($type->getKeyType())[0];
|
vendor/symfony/property-info/Util/PhpStanTypeHelper.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of the Symfony package.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier <fabien@symfony.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Symfony\Component\PropertyInfo\Util;
|
13 |
+
|
14 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
15 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
16 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
|
17 |
+
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
18 |
+
use PHPStan\PhpDocParser\Ast\Type\ArrayShapeNode;
|
19 |
+
use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode;
|
20 |
+
use PHPStan\PhpDocParser\Ast\Type\CallableTypeNode;
|
21 |
+
use PHPStan\PhpDocParser\Ast\Type\CallableTypeParameterNode;
|
22 |
+
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
|
23 |
+
use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode;
|
24 |
+
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
25 |
+
use PHPStan\PhpDocParser\Ast\Type\NullableTypeNode;
|
26 |
+
use PHPStan\PhpDocParser\Ast\Type\ThisTypeNode;
|
27 |
+
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
|
28 |
+
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
|
29 |
+
use Symfony\Component\PropertyInfo\PhpStan\NameScope;
|
30 |
+
use Symfony\Component\PropertyInfo\Type;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Transforms a php doc tag value to a {@link Type} instance.
|
34 |
+
*
|
35 |
+
* @author Baptiste Leduc <baptiste.leduc@gmail.com>
|
36 |
+
*
|
37 |
+
* @internal
|
38 |
+
*/
|
39 |
+
final class PhpStanTypeHelper
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Creates a {@see Type} from a PhpDocTagValueNode type.
|
43 |
+
*
|
44 |
+
* @return Type[]
|
45 |
+
*/
|
46 |
+
public function getTypes(PhpDocTagValueNode $node, NameScope $nameScope): array
|
47 |
+
{
|
48 |
+
if ($node instanceof ParamTagValueNode || $node instanceof ReturnTagValueNode || $node instanceof VarTagValueNode) {
|
49 |
+
return $this->compressNullableType($this->extractTypes($node->type, $nameScope));
|
50 |
+
}
|
51 |
+
|
52 |
+
return [];
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Because PhpStan extract null as a separated type when Symfony / PHP compress it in the first available type we
|
57 |
+
* need this method to mimic how Symfony want null types.
|
58 |
+
*
|
59 |
+
* @param Type[] $types
|
60 |
+
*
|
61 |
+
* @return Type[]
|
62 |
+
*/
|
63 |
+
private function compressNullableType(array $types): array
|
64 |
+
{
|
65 |
+
$firstTypeIndex = null;
|
66 |
+
$nullableTypeIndex = null;
|
67 |
+
|
68 |
+
foreach ($types as $k => $type) {
|
69 |
+
if (null === $firstTypeIndex && Type::BUILTIN_TYPE_NULL !== $type->getBuiltinType() && !$type->isNullable()) {
|
70 |
+
$firstTypeIndex = $k;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (null === $nullableTypeIndex && Type::BUILTIN_TYPE_NULL === $type->getBuiltinType()) {
|
74 |
+
$nullableTypeIndex = $k;
|
75 |
+
}
|
76 |
+
|
77 |
+
if (null !== $firstTypeIndex && null !== $nullableTypeIndex) {
|
78 |
+
break;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
if (null !== $firstTypeIndex && null !== $nullableTypeIndex) {
|
83 |
+
$firstType = $types[$firstTypeIndex];
|
84 |
+
$types[$firstTypeIndex] = new Type(
|
85 |
+
$firstType->getBuiltinType(),
|
86 |
+
true,
|
87 |
+
$firstType->getClassName(),
|
88 |
+
$firstType->isCollection(),
|
89 |
+
$firstType->getCollectionKeyTypes(),
|
90 |
+
$firstType->getCollectionValueTypes()
|
91 |
+
);
|
92 |
+
unset($types[$nullableTypeIndex]);
|
93 |
+
}
|
94 |
+
|
95 |
+
return array_values($types);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @return Type[]
|
100 |
+
*/
|
101 |
+
private function extractTypes(TypeNode $node, NameScope $nameScope): array
|
102 |
+
{
|
103 |
+
if ($node instanceof UnionTypeNode) {
|
104 |
+
$types = [];
|
105 |
+
foreach ($node->types as $type) {
|
106 |
+
if ($type instanceof ConstTypeNode) {
|
107 |
+
// It's safer to fall back to other extractors here, as resolving const types correctly is not easy at the moment
|
108 |
+
return [];
|
109 |
+
}
|
110 |
+
foreach ($this->extractTypes($type, $nameScope) as $subType) {
|
111 |
+
$types[] = $subType;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
return $this->compressNullableType($types);
|
116 |
+
}
|
117 |
+
if ($node instanceof GenericTypeNode) {
|
118 |
+
[$mainType] = $this->extractTypes($node->type, $nameScope);
|
119 |
+
|
120 |
+
$collectionKeyTypes = $mainType->getCollectionKeyTypes();
|
121 |
+
$collectionKeyValues = [];
|
122 |
+
if (1 === \count($node->genericTypes)) {
|
123 |
+
foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $subType) {
|
124 |
+
$collectionKeyValues[] = $subType;
|
125 |
+
}
|
126 |
+
} elseif (2 === \count($node->genericTypes)) {
|
127 |
+
foreach ($this->extractTypes($node->genericTypes[0], $nameScope) as $keySubType) {
|
128 |
+
$collectionKeyTypes[] = $keySubType;
|
129 |
+
}
|
130 |
+
foreach ($this->extractTypes($node->genericTypes[1], $nameScope) as $valueSubType) {
|
131 |
+
$collectionKeyValues[] = $valueSubType;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
return [new Type($mainType->getBuiltinType(), $mainType->isNullable(), $mainType->getClassName(), true, $collectionKeyTypes, $collectionKeyValues)];
|
136 |
+
}
|
137 |
+
if ($node instanceof ArrayShapeNode) {
|
138 |
+
return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)];
|
139 |
+
}
|
140 |
+
if ($node instanceof ArrayTypeNode) {
|
141 |
+
return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, [new Type(Type::BUILTIN_TYPE_INT)], $this->extractTypes($node->type, $nameScope))];
|
142 |
+
}
|
143 |
+
if ($node instanceof CallableTypeNode || $node instanceof CallableTypeParameterNode) {
|
144 |
+
return [new Type(Type::BUILTIN_TYPE_CALLABLE)];
|
145 |
+
}
|
146 |
+
if ($node instanceof NullableTypeNode) {
|
147 |
+
$subTypes = $this->extractTypes($node->type, $nameScope);
|
148 |
+
if (\count($subTypes) > 1) {
|
149 |
+
$subTypes[] = new Type(Type::BUILTIN_TYPE_NULL);
|
150 |
+
|
151 |
+
return $subTypes;
|
152 |
+
}
|
153 |
+
|
154 |
+
return [new Type($subTypes[0]->getBuiltinType(), true, $subTypes[0]->getClassName(), $subTypes[0]->isCollection(), $subTypes[0]->getCollectionKeyTypes(), $subTypes[0]->getCollectionValueTypes())];
|
155 |
+
}
|
156 |
+
if ($node instanceof ThisTypeNode) {
|
157 |
+
return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())];
|
158 |
+
}
|
159 |
+
if ($node instanceof IdentifierTypeNode) {
|
160 |
+
if (\in_array($node->name, Type::$builtinTypes)) {
|
161 |
+
return [new Type($node->name, false, null, \in_array($node->name, Type::$builtinCollectionTypes))];
|
162 |
+
}
|
163 |
+
|
164 |
+
switch ($node->name) {
|
165 |
+
case 'integer':
|
166 |
+
return [new Type(Type::BUILTIN_TYPE_INT)];
|
167 |
+
case 'list':
|
168 |
+
case 'non-empty-list':
|
169 |
+
return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true, new Type(Type::BUILTIN_TYPE_INT))];
|
170 |
+
case 'non-empty-array':
|
171 |
+
return [new Type(Type::BUILTIN_TYPE_ARRAY, false, null, true)];
|
172 |
+
case 'mixed':
|
173 |
+
return []; // mixed seems to be ignored in all other extractors
|
174 |
+
case 'parent':
|
175 |
+
return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $node->name)];
|
176 |
+
case 'static':
|
177 |
+
case 'self':
|
178 |
+
return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveRootClass())];
|
179 |
+
case 'void':
|
180 |
+
return [new Type(Type::BUILTIN_TYPE_NULL)];
|
181 |
+
}
|
182 |
+
|
183 |
+
return [new Type(Type::BUILTIN_TYPE_OBJECT, false, $nameScope->resolveStringName($node->name))];
|
184 |
+
}
|
185 |
+
|
186 |
+
return [];
|
187 |
+
}
|
188 |
+
}
|
vendor/symfony/property-info/composer.json
CHANGED
@@ -24,15 +24,16 @@
|
|
24 |
],
|
25 |
"require": {
|
26 |
"php": ">=7.2.5",
|
27 |
-
"symfony/deprecation-contracts": "^2.1",
|
28 |
-
"symfony/polyfill-php80": "^1.
|
29 |
-
"symfony/string": "^5.1"
|
30 |
},
|
31 |
"require-dev": {
|
32 |
-
"symfony/serializer": "^4.4|^5.0",
|
33 |
-
"symfony/cache": "^4.4|^5.0",
|
34 |
-
"symfony/dependency-injection": "^4.4|^5.0",
|
35 |
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
|
|
|
36 |
"doctrine/annotations": "^1.10.4"
|
37 |
},
|
38 |
"conflict": {
|
24 |
],
|
25 |
"require": {
|
26 |
"php": ">=7.2.5",
|
27 |
+
"symfony/deprecation-contracts": "^2.1|^3",
|
28 |
+
"symfony/polyfill-php80": "^1.16",
|
29 |
+
"symfony/string": "^5.1|^6.0"
|
30 |
},
|
31 |
"require-dev": {
|
32 |
+
"symfony/serializer": "^4.4|^5.0|^6.0",
|
33 |
+
"symfony/cache": "^4.4|^5.0|^6.0",
|
34 |
+
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
35 |
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
|
36 |
+
"phpstan/phpdoc-parser": "^1.0",
|
37 |
"doctrine/annotations": "^1.10.4"
|
38 |
},
|
39 |
"conflict": {
|
vendor/symfony/string/AbstractString.php
CHANGED
@@ -616,11 +616,79 @@ abstract class AbstractString implements \Stringable, \JsonSerializable
|
|
616 |
*/
|
617 |
abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self;
|
618 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
/**
|
620 |
* @return static
|
621 |
*/
|
622 |
abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self;
|
623 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
/**
|
625 |
* @return static
|
626 |
*/
|
616 |
*/
|
617 |
abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self;
|
618 |
|
619 |
+
/**
|
620 |
+
* @param string|string[] $prefix
|
621 |
+
*
|
622 |
+
* @return static
|
623 |
+
*/
|
624 |
+
public function trimPrefix($prefix): self
|
625 |
+
{
|
626 |
+
if (\is_array($prefix) || $prefix instanceof \Traversable) {
|
627 |
+
foreach ($prefix as $s) {
|
628 |
+
$t = $this->trimPrefix($s);
|
629 |
+
|
630 |
+
if ($t->string !== $this->string) {
|
631 |
+
return $t;
|
632 |
+
}
|
633 |
+
}
|
634 |
+
|
635 |
+
return clone $this;
|
636 |
+
}
|
637 |
+
|
638 |
+
$str = clone $this;
|
639 |
+
|
640 |
+
if ($prefix instanceof self) {
|
641 |
+
$prefix = $prefix->string;
|
642 |
+
} else {
|
643 |
+
$prefix = (string) $prefix;
|
644 |
+
}
|
645 |
+
|
646 |
+
if ('' !== $prefix && \strlen($this->string) >= \strlen($prefix) && 0 === substr_compare($this->string, $prefix, 0, \strlen($prefix), $this->ignoreCase)) {
|
647 |
+
$str->string = substr($this->string, \strlen($prefix));
|
648 |
+
}
|
649 |
+
|
650 |
+
return $str;
|
651 |
+
}
|
652 |
+
|
653 |
/**
|
654 |
* @return static
|
655 |
*/
|
656 |
abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): self;
|
657 |
|
658 |
+
/**
|
659 |
+
* @param string|string[] $suffix
|
660 |
+
*
|
661 |
+
* @return static
|
662 |
+
*/
|
663 |
+
public function trimSuffix($suffix): self
|
664 |
+
{
|
665 |
+
if (\is_array($suffix) || $suffix instanceof \Traversable) {
|
666 |
+
foreach ($suffix as $s) {
|
667 |
+
$t = $this->trimSuffix($s);
|
668 |
+
|
669 |
+
if ($t->string !== $this->string) {
|
670 |
+
return $t;
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
return clone $this;
|
675 |
+
}
|
676 |
+
|
677 |
+
$str = clone $this;
|
678 |
+
|
679 |
+
if ($suffix instanceof self) {
|
680 |
+
$suffix = $suffix->string;
|
681 |
+
} else {
|
682 |
+
$suffix = (string) $suffix;
|
683 |
+
}
|
684 |
+
|
685 |
+
if ('' !== $suffix && \strlen($this->string) >= \strlen($suffix) && 0 === substr_compare($this->string, $suffix, -\strlen($suffix), null, $this->ignoreCase)) {
|
686 |
+
$str->string = substr($this->string, 0, -\strlen($suffix));
|
687 |
+
}
|
688 |
+
|
689 |
+
return $str;
|
690 |
+
}
|
691 |
+
|
692 |
/**
|
693 |
* @return static
|
694 |
*/
|
vendor/symfony/string/AbstractUnicodeString.php
CHANGED
@@ -49,6 +49,8 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
49 |
private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))'];
|
50 |
|
51 |
private static $transliterators = [];
|
|
|
|
|
52 |
|
53 |
/**
|
54 |
* @return static
|
@@ -409,6 +411,26 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
409 |
return $str;
|
410 |
}
|
411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent
|
413 |
{
|
414 |
if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) {
|
@@ -422,6 +444,26 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
422 |
return $str;
|
423 |
}
|
424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
public function upper(): parent
|
426 |
{
|
427 |
$str = clone $this;
|
@@ -480,22 +522,22 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
480 |
|
481 |
switch ($type) {
|
482 |
case \STR_PAD_RIGHT:
|
483 |
-
return $this->append(str_repeat($pad->string, $freeLen
|
484 |
|
485 |
case \STR_PAD_LEFT:
|
486 |
-
return $this->prepend(str_repeat($pad->string, $freeLen
|
487 |
|
488 |
case \STR_PAD_BOTH:
|
489 |
$freeLen /= 2;
|
490 |
|
491 |
$rightLen = ceil($freeLen);
|
492 |
$len = $rightLen % $padLen;
|
493 |
-
$str = $this->append(str_repeat($pad->string, $rightLen
|
494 |
|
495 |
$leftLen = floor($freeLen);
|
496 |
$len = $leftLen % $padLen;
|
497 |
|
498 |
-
return $str->prepend(str_repeat($pad->string, $leftLen
|
499 |
|
500 |
default:
|
501 |
throw new InvalidArgumentException('Invalid padding type.');
|
@@ -530,19 +572,18 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
530 |
return -1;
|
531 |
}
|
532 |
|
533 |
-
|
534 |
-
|
535 |
-
$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php';
|
536 |
}
|
537 |
|
538 |
-
if ($codePoint >=
|
539 |
$lbound = 0;
|
540 |
while ($ubound >= $lbound) {
|
541 |
$mid = floor(($lbound + $ubound) / 2);
|
542 |
|
543 |
-
if ($codePoint >
|
544 |
$lbound = $mid + 1;
|
545 |
-
} elseif ($codePoint <
|
546 |
$ubound = $mid - 1;
|
547 |
} else {
|
548 |
continue 2;
|
@@ -550,19 +591,18 @@ abstract class AbstractUnicodeString extends AbstractString
|
|
550 |
}
|
551 |
}
|
552 |
|
553 |
-
|
554 |
-
|
555 |
-
$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php';
|
556 |
}
|
557 |
|
558 |
-
if ($codePoint >=
|
559 |
$lbound = 0;
|
560 |
while ($ubound >= $lbound) {
|
561 |
$mid = floor(($lbound + $ubound) / 2);
|
562 |
|
563 |
-
if ($codePoint >
|
564 |
$lbound = $mid + 1;
|
565 |
-
} elseif ($codePoint <
|
566 |
$ubound = $mid - 1;
|
567 |
} else {
|
568 |
$width += 2;
|
49 |
private const TRANSLIT_TO = ['AE', 'D', 'O', 'TH', 'ss', 'ae', 'd', 'o', 'th', 'D', 'd', 'H', 'h', 'i', 'q', 'L', 'l', 'L', 'l', '\'n', 'N', 'n', 'OE', 'oe', 'T', 't', 'b', 'B', 'B', 'b', 'C', 'c', 'D', 'D', 'D', 'd', 'E', 'F', 'f', 'G', 'hv', 'I', 'I', 'K', 'k', 'l', 'N', 'n', 'OI', 'oi', 'P', 'p', 't', 'T', 't', 'T', 'V', 'Y', 'y', 'Z', 'z', 'DZ', 'Dz', 'dz', 'G', 'g', 'd', 'Z', 'z', 'l', 'n', 't', 'j', 'db', 'qp', 'A', 'C', 'c', 'L', 'T', 's', 'z', 'B', 'U', 'E', 'e', 'J', 'j', 'R', 'r', 'Y', 'y', 'b', 'c', 'd', 'd', 'e', 'j', 'g', 'g', 'G', 'h', 'h', 'i', 'I', 'l', 'l', 'l', 'm', 'n', 'n', 'N', 'OE', 'r', 'r', 'r', 'R', 's', 't', 'u', 'v', 'Y', 'z', 'z', 'B', 'G', 'H', 'j', 'L', 'q', 'dz', 'dz', 'ts', 'ls', 'lz', 'A', 'AE', 'B', 'C', 'D', 'D', 'E', 'J', 'K', 'L', 'M', 'O', 'P', 'T', 'U', 'V', 'W', 'Z', 'ue', 'b', 'd', 'f', 'm', 'n', 'p', 'r', 'r', 's', 't', 'z', 'th', 'I', 'p', 'U', 'b', 'd', 'f', 'g', 'k', 'l', 'm', 'n', 'p', 'r', 's', 'v', 'x', 'z', 'a', 'd', 'e', 'e', 'i', 'u', 'a', 's', 's', 'SS', 'LL', 'll', 'V', 'v', 'Y', 'y', '(C)', '(R)', 'CE', 'Cr', 'Fr.', 'L.', 'Pts', 'TL', 'Rs', 'x', 'Rx', 'm/s', 'rad/s', 'C/kg', 'pH', 'V/m', 'A/m', ' 1/4', ' 1/2', ' 3/4', ' 1/3', ' 2/3', ' 1/5', ' 2/5', ' 3/5', ' 4/5', ' 1/6', ' 5/6', ' 1/8', ' 3/8', ' 5/8', ' 7/8', ' 1/', '0', '\'', '\'', ',', '\'', '"', '"', ',,', '"', '\'', '"', '"', '"', '<<', '>>', '<', '>', '-', '-', '-', '-', '-', '-', '-', '-', '-', '||', '/', '[', ']', '*', ',', '.', '<', '>', '<<', '>>', '[', ']', '[', ']', '[', ']', ',', '.', '[', ']', '<<', '>>', '<', '>', ',', '[', ']', '((', '))', '.', ',', '*', '/', '-', '/', '\\', '|', '||', '<<', '>>', '((', '))'];
|
50 |
|
51 |
private static $transliterators = [];
|
52 |
+
private static $tableZero;
|
53 |
+
private static $tableWide;
|
54 |
|
55 |
/**
|
56 |
* @return static
|
411 |
return $str;
|
412 |
}
|
413 |
|
414 |
+
public function trimPrefix($prefix): parent
|
415 |
+
{
|
416 |
+
if (!$this->ignoreCase) {
|
417 |
+
return parent::trimPrefix($prefix);
|
418 |
+
}
|
419 |
+
|
420 |
+
$str = clone $this;
|
421 |
+
|
422 |
+
if ($prefix instanceof \Traversable) {
|
423 |
+
$prefix = iterator_to_array($prefix, false);
|
424 |
+
} elseif ($prefix instanceof parent) {
|
425 |
+
$prefix = $prefix->string;
|
426 |
+
}
|
427 |
+
|
428 |
+
$prefix = implode('|', array_map('preg_quote', (array) $prefix));
|
429 |
+
$str->string = preg_replace("{^(?:$prefix)}iuD", '', $this->string);
|
430 |
+
|
431 |
+
return $str;
|
432 |
+
}
|
433 |
+
|
434 |
public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}"): parent
|
435 |
{
|
436 |
if (" \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" !== $chars && !preg_match('//u', $chars)) {
|
444 |
return $str;
|
445 |
}
|
446 |
|
447 |
+
public function trimSuffix($suffix): parent
|
448 |
+
{
|
449 |
+
if (!$this->ignoreCase) {
|
450 |
+
return parent::trimSuffix($suffix);
|
451 |
+
}
|
452 |
+
|
453 |
+
$str = clone $this;
|
454 |
+
|
455 |
+
if ($suffix instanceof \Traversable) {
|
456 |
+
$suffix = iterator_to_array($suffix, false);
|
457 |
+
} elseif ($suffix instanceof parent) {
|
458 |
+
$suffix = $suffix->string;
|
459 |
+
}
|
460 |
+
|
461 |
+
$suffix = implode('|', array_map('preg_quote', (array) $suffix));
|
462 |
+
$str->string = preg_replace("{(?:$suffix)$}iuD", '', $this->string);
|
463 |
+
|
464 |
+
return $str;
|
465 |
+
}
|
466 |
+
|
467 |
public function upper(): parent
|
468 |
{
|
469 |
$str = clone $this;
|
522 |
|
523 |
switch ($type) {
|
524 |
case \STR_PAD_RIGHT:
|
525 |
+
return $this->append(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : ''));
|
526 |
|
527 |
case \STR_PAD_LEFT:
|
528 |
+
return $this->prepend(str_repeat($pad->string, intdiv($freeLen, $padLen)).($len ? $pad->slice(0, $len) : ''));
|
529 |
|
530 |
case \STR_PAD_BOTH:
|
531 |
$freeLen /= 2;
|
532 |
|
533 |
$rightLen = ceil($freeLen);
|
534 |
$len = $rightLen % $padLen;
|
535 |
+
$str = $this->append(str_repeat($pad->string, intdiv($rightLen, $padLen)).($len ? $pad->slice(0, $len) : ''));
|
536 |
|
537 |
$leftLen = floor($freeLen);
|
538 |
$len = $leftLen % $padLen;
|
539 |
|
540 |
+
return $str->prepend(str_repeat($pad->string, intdiv($leftLen, $padLen)).($len ? $pad->slice(0, $len) : ''));
|
541 |
|
542 |
default:
|
543 |
throw new InvalidArgumentException('Invalid padding type.');
|
572 |
return -1;
|
573 |
}
|
574 |
|
575 |
+
if (null === self::$tableZero) {
|
576 |
+
self::$tableZero = require __DIR__.'/Resources/data/wcswidth_table_zero.php';
|
|
|
577 |
}
|
578 |
|
579 |
+
if ($codePoint >= self::$tableZero[0][0] && $codePoint <= self::$tableZero[$ubound = \count(self::$tableZero) - 1][1]) {
|
580 |
$lbound = 0;
|
581 |
while ($ubound >= $lbound) {
|
582 |
$mid = floor(($lbound + $ubound) / 2);
|
583 |
|
584 |
+
if ($codePoint > self::$tableZero[$mid][1]) {
|
585 |
$lbound = $mid + 1;
|
586 |
+
} elseif ($codePoint < self::$tableZero[$mid][0]) {
|
587 |
$ubound = $mid - 1;
|
588 |
} else {
|
589 |
continue 2;
|
591 |
}
|
592 |
}
|
593 |
|
594 |
+
if (null === self::$tableWide) {
|
595 |
+
self::$tableWide = require __DIR__.'/Resources/data/wcswidth_table_wide.php';
|
|
|
596 |
}
|
597 |
|
598 |
+
if ($codePoint >= self::$tableWide[0][0] && $codePoint <= self::$tableWide[$ubound = \count(self::$tableWide) - 1][1]) {
|
599 |
$lbound = 0;
|
600 |
while ($ubound >= $lbound) {
|
601 |
$mid = floor(($lbound + $ubound) / 2);
|
602 |
|
603 |
+
if ($codePoint > self::$tableWide[$mid][1]) {
|
604 |
$lbound = $mid + 1;
|
605 |
+
} elseif ($codePoint < self::$tableWide[$mid][0]) {
|
606 |
$ubound = $mid - 1;
|
607 |
} else {
|
608 |
$width += 2;
|
vendor/symfony/string/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1 |
CHANGELOG
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
5.2.0
|
5 |
-----
|
6 |
|
1 |
CHANGELOG
|
2 |
=========
|
3 |
|
4 |
+
5.4
|
5 |
+
---
|
6 |
+
|
7 |
+
* Add `trimSuffix()` and `trimPrefix()` methods
|
8 |
+
|
9 |
+
5.3
|
10 |
+
---
|
11 |
+
|
12 |
+
* Made `AsciiSlugger` fallback to parent locale's symbolsMap
|
13 |
+
|
14 |
5.2.0
|
15 |
-----
|
16 |
|
vendor/symfony/string/Inflector/EnglishInflector.php
CHANGED
@@ -58,9 +58,15 @@ final class EnglishInflector implements InflectorInterface
|
|
58 |
// selfies (selfie)
|
59 |
['seifles', 7, true, true, 'selfie'],
|
60 |
|
|
|
|
|
|
|
61 |
// movies (movie)
|
62 |
['seivom', 6, true, true, 'movie'],
|
63 |
|
|
|
|
|
|
|
64 |
// feet (foot)
|
65 |
['teef', 4, true, true, 'foot'],
|
66 |
|
@@ -118,6 +124,9 @@ final class EnglishInflector implements InflectorInterface
|
|
118 |
// fees (fee), trees (tree), employees (employee)
|
119 |
['see', 3, true, true, 'ee'],
|
120 |
|
|
|
|
|
|
|
121 |
// roses (rose), garages (garage), cassettes (cassette),
|
122 |
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
|
123 |
// shoes (shoe)
|
@@ -226,6 +235,9 @@ final class EnglishInflector implements InflectorInterface
|
|
226 |
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
|
227 |
['noi', 3, true, true, 'ions'],
|
228 |
|
|
|
|
|
|
|
229 |
// seasons (season), treasons (treason), poisons (poison), lessons (lesson)
|
230 |
['nos', 3, true, true, 'sons'],
|
231 |
|
@@ -261,6 +273,9 @@ final class EnglishInflector implements InflectorInterface
|
|
261 |
// circuses (circus)
|
262 |
['suc', 3, true, true, 'cuses'],
|
263 |
|
|
|
|
|
|
|
264 |
// fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius)
|
265 |
['su', 2, true, true, 'i'],
|
266 |
|
@@ -306,14 +321,32 @@ final class EnglishInflector implements InflectorInterface
|
|
306 |
*/
|
307 |
private const UNINFLECTED = [
|
308 |
'',
|
|
|
|
|
309 |
'atad',
|
|
|
|
|
310 |
'reed',
|
|
|
|
|
311 |
'kcabdeef',
|
|
|
|
|
312 |
'hsif',
|
|
|
|
|
313 |
'ofni',
|
|
|
|
|
314 |
'esoom',
|
|
|
|
|
315 |
'seires',
|
|
|
|
|
316 |
'peehs',
|
|
|
|
|
317 |
'seiceps',
|
318 |
];
|
319 |
|
58 |
// selfies (selfie)
|
59 |
['seifles', 7, true, true, 'selfie'],
|
60 |
|
61 |
+
// zombies (zombie)
|
62 |
+
['seibmoz', 7, true, true, 'zombie'],
|
63 |
+
|
64 |
// movies (movie)
|
65 |
['seivom', 6, true, true, 'movie'],
|
66 |
|
67 |
+
// conspectuses (conspectus), prospectuses (prospectus)
|
68 |
+
['sesutcep', 8, true, true, 'pectus'],
|
69 |
+
|
70 |
// feet (foot)
|
71 |
['teef', 4, true, true, 'foot'],
|
72 |
|
124 |
// fees (fee), trees (tree), employees (employee)
|
125 |
['see', 3, true, true, 'ee'],
|
126 |
|
127 |
+
// edges (edge)
|
128 |
+
['segd', 4, true, true, 'dge'],
|
129 |
+
|
130 |
// roses (rose), garages (garage), cassettes (cassette),
|
131 |
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
|
132 |
// shoes (shoe)
|
235 |
// bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
|
236 |
['noi', 3, true, true, 'ions'],
|
237 |
|
238 |
+
// coupon (coupons)
|
239 |
+
['nop', 3, true, true, 'pons'],
|
240 |
+
|
241 |
// seasons (season), treasons (treason), poisons (poison), lessons (lesson)
|
242 |
['nos', 3, true, true, 'sons'],
|
243 |
|
273 |
// circuses (circus)
|
274 |
['suc', 3, true, true, 'cuses'],
|
275 |
|
276 |
+
// conspectuses (conspectus), prospectuses (prospectus)
|
277 |
+
['sutcep', 6, true, true, 'pectuses'],
|
278 |
+
|
279 |
// fungi (fungus), alumni (alumnus), syllabi (syllabus), radii (radius)
|
280 |
['su', 2, true, true, 'i'],
|
281 |
|
321 |
*/
|
322 |
private const UNINFLECTED = [
|
323 |
'',
|
324 |
+
|
325 |
+
// data
|
326 |
'atad',
|
327 |
+
|
328 |
+
// deer
|
329 |
'reed',
|
330 |
+
|
331 |
+
// feedback
|
332 |
'kcabdeef',
|
333 |
+
|
334 |
+
// fish
|
335 |
'hsif',
|
336 |
+
|
337 |
+
// info
|
338 |
'ofni',
|
339 |
+
|
340 |
+
// moose
|
341 |
'esoom',
|
342 |
+
|
343 |
+
// series
|
344 |
'seires',
|
345 |
+
|
346 |
+
// sheep
|
347 |
'peehs',
|
348 |
+
|
349 |
+
// species
|
350 |
'seiceps',
|
351 |
];
|
352 |
|
vendor/symfony/string/Inflector/InflectorInterface.php
CHANGED
@@ -18,7 +18,7 @@ interface InflectorInterface
|
|
18 |
*
|
19 |
* If the method can't determine the form with certainty, several possible singulars are returned.
|
20 |
*
|
21 |
-
* @return string[]
|
22 |
*/
|
23 |
public function singularize(string $plural): array;
|
24 |
|
@@ -27,7 +27,7 @@ interface InflectorInterface
|
|
27 |
*
|
28 |
* If the method can't determine the form with certainty, several possible plurals are returned.
|
29 |
*
|
30 |
-
* @return string[]
|
31 |
*/
|
32 |
public function pluralize(string $singular): array;
|
33 |
}
|
18 |
*
|
19 |
* If the method can't determine the form with certainty, several possible singulars are returned.
|
20 |
*
|
21 |
+
* @return string[]
|
22 |
*/
|
23 |
public function singularize(string $plural): array;
|
24 |
|
27 |
*
|
28 |
* If the method can't determine the form with certainty, several possible plurals are returned.
|
29 |
*
|
30 |
+
* @return string[]
|
31 |
*/
|
32 |
public function pluralize(string $singular): array;
|
33 |
}
|
vendor/symfony/string/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
Copyright (c) 2019-
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
1 |
+
Copyright (c) 2019-2022 Fabien Potencier
|
2 |
|
3 |
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 |
of this software and associated documentation files (the "Software"), to deal
|
vendor/symfony/string/README.md
CHANGED
@@ -7,8 +7,8 @@ with bytes, UTF-8 code points and grapheme clusters in a unified way.
|
|
7 |
Resources
|
8 |
---------
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
7 |
Resources
|
8 |
---------
|
9 |
|
10 |
+
* [Documentation](https://symfony.com/doc/current/components/string.html)
|
11 |
+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
|
12 |
+
* [Report issues](https://github.com/symfony/symfony/issues) and
|
13 |
+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
|
14 |
+
in the [main Symfony repository](https://github.com/symfony/symfony)
|
vendor/symfony/string/Resources/data/wcswidth_table_wide.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/*
|
4 |
* This file has been auto-generated by the Symfony String Component for internal use.
|
5 |
*
|
6 |
-
* Unicode version:
|
7 |
-
* Date:
|
8 |
*/
|
9 |
|
10 |
return [
|
@@ -450,10 +450,6 @@ return [
|
|
450 |
],
|
451 |
[
|
452 |
19968,
|
453 |
-
40956,
|
454 |
-
],
|
455 |
-
[
|
456 |
-
40957,
|
457 |
40959,
|
458 |
],
|
459 |
[
|
@@ -840,13 +836,25 @@ return [
|
|
840 |
101632,
|
841 |
101640,
|
842 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
[
|
844 |
110592,
|
845 |
110847,
|
846 |
],
|
847 |
[
|
848 |
110848,
|
849 |
-
|
850 |
],
|
851 |
[
|
852 |
110928,
|
@@ -996,6 +1004,10 @@ return [
|
|
996 |
128725,
|
997 |
128727,
|
998 |
],
|
|
|
|
|
|
|
|
|
999 |
[
|
1000 |
128747,
|
1001 |
128748,
|
@@ -1008,6 +1020,10 @@ return [
|
|
1008 |
128992,
|
1009 |
129003,
|
1010 |
],
|
|
|
|
|
|
|
|
|
1011 |
[
|
1012 |
129292,
|
1013 |
129338,
|
@@ -1018,14 +1034,6 @@ return [
|
|
1018 |
],
|
1019 |
[
|
1020 |
129351,
|
1021 |
-
129400,
|
1022 |
-
],
|
1023 |
-
[
|
1024 |
-
129402,
|
1025 |
-
129483,
|
1026 |
-
],
|
1027 |
-
[
|
1028 |
-
129485,
|
1029 |
129535,
|
1030 |
],
|
1031 |
[
|
@@ -1034,7 +1042,7 @@ return [
|
|
1034 |
],
|
1035 |
[
|
1036 |
129656,
|
1037 |
-
|
1038 |
],
|
1039 |
[
|
1040 |
129664,
|
@@ -1042,34 +1050,42 @@ return [
|
|
1042 |
],
|
1043 |
[
|
1044 |
129680,
|
1045 |
-
|
1046 |
],
|
1047 |
[
|
1048 |
129712,
|
1049 |
-
|
1050 |
],
|
1051 |
[
|
1052 |
129728,
|
1053 |
-
|
1054 |
],
|
1055 |
[
|
1056 |
129744,
|
1057 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1058 |
],
|
1059 |
[
|
1060 |
131072,
|
1061 |
-
|
1062 |
],
|
1063 |
[
|
1064 |
-
|
1065 |
173823,
|
1066 |
],
|
1067 |
[
|
1068 |
173824,
|
1069 |
-
|
1070 |
],
|
1071 |
[
|
1072 |
-
|
1073 |
177983,
|
1074 |
],
|
1075 |
[
|
3 |
/*
|
4 |
* This file has been auto-generated by the Symfony String Component for internal use.
|
5 |
*
|
6 |
+
* Unicode version: 14.0.0
|
7 |
+
* Date: 2021-09-17T09:20:30+02:00
|
8 |
*/
|
9 |
|
10 |
return [
|
450 |
],
|
451 |
[
|
452 |
19968,
|
|
|
|
|
|
|
|
|
453 |
40959,
|
454 |
],
|
455 |
[
|
836 |
101632,
|
837 |
101640,
|
838 |
],
|
839 |
+
[
|
840 |
+
110576,
|
841 |
+
110579,
|
842 |
+
],
|
843 |
+
[
|
844 |
+
110581,
|
845 |
+
110587,
|
846 |
+
],
|
847 |
+
[
|
848 |
+
110589,
|
849 |
+
110590,
|
850 |
+
],
|
851 |
[
|
852 |
110592,
|
853 |
110847,
|
854 |
],
|
855 |
[
|
856 |
110848,
|
857 |
+
110882,
|
858 |
],
|
859 |
[
|
860 |
110928,
|
1004 |
128725,
|
1005 |
128727,
|
1006 |
],
|
1007 |
+
[
|
1008 |
+
128733,
|
1009 |
+
128735,
|
1010 |
+
],
|
1011 |
[
|
1012 |
128747,
|
1013 |
128748,
|
1020 |
128992,
|
1021 |
129003,
|
1022 |
],
|
1023 |
+
[
|
1024 |
+
129008,
|
1025 |
+
129008,
|
1026 |
+
],
|
1027 |
[
|
1028 |
129292,
|
1029 |
129338,
|
1034 |
],
|
1035 |
[
|
1036 |
129351,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1037 |
129535,
|
1038 |
],
|
1039 |
[
|
1042 |
],
|
1043 |
[
|
1044 |
129656,
|
1045 |
+
129660,
|
1046 |
],
|
1047 |
[
|
1048 |
129664,
|
1050 |
],
|
1051 |
[
|
1052 |
129680,
|
1053 |
+
129708,
|
1054 |
],
|
1055 |
[
|
1056 |
129712,
|
1057 |
+
129722,
|
1058 |
],
|
1059 |
[
|
1060 |
129728,
|
1061 |
+
129733,
|
1062 |
],
|
1063 |
[
|
1064 |
129744,
|
1065 |
+
129753,
|
1066 |
+
],
|
1067 |
+
[
|
1068 |
+
129760,
|
1069 |
+
129767,
|
1070 |
+
],
|
1071 |
+
[
|
1072 |
+
129776,
|
1073 |
+
129782,
|
1074 |
],
|
1075 |
[
|
1076 |
131072,
|
1077 |
+
173791,
|
1078 |
],
|
1079 |
[
|
1080 |
+
173792,
|
1081 |
173823,
|
1082 |
],
|
1083 |
[
|
1084 |
173824,
|
1085 |
+
177976,
|
1086 |
],
|
1087 |
[
|
1088 |
+
177977,
|
1089 |
177983,
|
1090 |
],
|
1091 |
[
|
vendor/symfony/string/Resources/data/wcswidth_table_zero.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/*
|
4 |
* This file has been auto-generated by the Symfony String Component for internal use.
|
5 |
*
|
6 |
-
* Unicode version:
|
7 |
-
* Date:
|
8 |
*/
|
9 |
|
10 |
return [
|
@@ -109,7 +109,11 @@ return [
|
|
109 |
2139,
|
110 |
],
|
111 |
[
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
2273,
|
114 |
],
|
115 |
[
|
@@ -272,6 +276,10 @@ return [
|
|
272 |
3076,
|
273 |
3076,
|
274 |
],
|
|
|
|
|
|
|
|
|
275 |
[
|
276 |
3134,
|
277 |
3136,
|
@@ -470,7 +478,7 @@ return [
|
|
470 |
],
|
471 |
[
|
472 |
5938,
|
473 |
-
|
474 |
],
|
475 |
[
|
476 |
5970,
|
@@ -504,6 +512,10 @@ return [
|
|
504 |
6155,
|
505 |
6157,
|
506 |
],
|
|
|
|
|
|
|
|
|
507 |
[
|
508 |
6277,
|
509 |
6278,
|
@@ -574,7 +586,7 @@ return [
|
|
574 |
],
|
575 |
[
|
576 |
6847,
|
577 |
-
|
578 |
],
|
579 |
[
|
580 |
6912,
|
@@ -666,10 +678,6 @@ return [
|
|
666 |
],
|
667 |
[
|
668 |
7616,
|
669 |
-
7673,
|
670 |
-
],
|
671 |
-
[
|
672 |
-
7675,
|
673 |
7679,
|
674 |
],
|
675 |
[
|
@@ -916,6 +924,10 @@ return [
|
|
916 |
69446,
|
917 |
69456,
|
918 |
],
|
|
|
|
|
|
|
|
|
919 |
[
|
920 |
69633,
|
921 |
69633,
|
@@ -924,6 +936,14 @@ return [
|
|
924 |
69688,
|
925 |
69702,
|
926 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
927 |
[
|
928 |
69759,
|
929 |
69761,
|
@@ -936,6 +956,10 @@ return [
|
|
936 |
69817,
|
937 |
69818,
|
938 |
],
|
|
|
|
|
|
|
|
|
939 |
[
|
940 |
69888,
|
941 |
69890,
|
@@ -1252,6 +1276,14 @@ return [
|
|
1252 |
113821,
|
1253 |
113822,
|
1254 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1255 |
[
|
1256 |
119143,
|
1257 |
119145,
|
@@ -1320,6 +1352,10 @@ return [
|
|
1320 |
123184,
|
1321 |
123190,
|
1322 |
],
|
|
|
|
|
|
|
|
|
1323 |
[
|
1324 |
123628,
|
1325 |
123631,
|
3 |
/*
|
4 |
* This file has been auto-generated by the Symfony String Component for internal use.
|
5 |
*
|
6 |
+
* Unicode version: 14.0.0
|
7 |
+
* Date: 2021-09-17T09:20:30+02:00
|
8 |
*/
|
9 |
|
10 |
return [
|
109 |
2139,
|
110 |
],
|
111 |
[
|
112 |
+
2200,
|
113 |
+
2207,
|
114 |
+
],
|
115 |
+
[
|
116 |
+
2250,
|
117 |
2273,
|
118 |
],
|
119 |
[
|
276 |
3076,
|
277 |
3076,
|
278 |
],
|
279 |
+
[
|
280 |
+
3132,
|
281 |
+
3132,
|
282 |
+
],
|
283 |
[
|
284 |
3134,
|
285 |
3136,
|
478 |
],
|
479 |
[
|
480 |
5938,
|
481 |
+
5939,
|
482 |
],
|
483 |
[
|
484 |
5970,
|
512 |
6155,
|
513 |
6157,
|
514 |
],
|
515 |
+
[
|
516 |
+
6159,
|
517 |
+
6159,
|
518 |
+
],
|
519 |
[
|
520 |
6277,
|
521 |
6278,
|
586 |
],
|
587 |
[
|
588 |
6847,
|
589 |
+
6862,
|
590 |
],
|
591 |
[
|
592 |
6912,
|
678 |
],
|
679 |
[
|
680 |
7616,
|
|
|
|
|
|
|
|
|
681 |
7679,
|
682 |
],
|
683 |
[
|
924 |
69446,
|
925 |
69456,
|
926 |
],
|
927 |
+
[
|
928 |
+
69506,
|
929 |
+
69509,
|
930 |
+
],
|
931 |
[
|
932 |
69633,
|
933 |
69633,
|
936 |
69688,
|
937 |
69702,
|
938 |
],
|
939 |
+
[
|
940 |
+
69744,
|
941 |
+
69744,
|
942 |
+
],
|
943 |
+
[
|
944 |
+
69747,
|
945 |
+
69748,
|
946 |
+
],
|
947 |
[
|
948 |
69759,
|
949 |
69761,
|
956 |
69817,
|
957 |
69818,
|
958 |
],
|
959 |
+
[
|
960 |
+
69826,
|
961 |
+
69826,
|
962 |
+
],
|
963 |
[
|
964 |
69888,
|
965 |
69890,
|
1276 |
113821,
|
1277 |
113822,
|
1278 |
],
|
1279 |
+
[
|
1280 |
+
118528,
|
1281 |
+
118573,
|
1282 |
+
],
|
1283 |
+
[
|
1284 |
+
118576,
|
1285 |
+
118598,
|
1286 |
+
],
|
1287 |
[
|
1288 |
119143,
|
1289 |
119145,
|
1352 |
123184,
|
1353 |
123190,
|
1354 |
],
|
1355 |
+
[
|
1356 |
+
123566,
|
1357 |
+
123566,
|
1358 |
+
],
|
1359 |
[
|
1360 |
123628,
|
1361 |
123631,
|
vendor/symfony/string/Slugger/AsciiSlugger.php
CHANGED
@@ -103,7 +103,7 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
|
|
103 |
$locale = $locale ?? $this->defaultLocale;
|
104 |
|
105 |
$transliterator = [];
|
106 |
-
if ('de' === $locale || 0 === strpos($locale, 'de_')) {
|
107 |
// Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl)
|
108 |
$transliterator = ['de-ASCII'];
|
109 |
} elseif (\function_exists('transliterator_transliterate') && $locale) {
|
@@ -111,6 +111,8 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
|
|
111 |
}
|
112 |
|
113 |
if ($this->symbolsMap instanceof \Closure) {
|
|
|
|
|
114 |
$symbolsMap = $this->symbolsMap;
|
115 |
array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) {
|
116 |
return $symbolsMap($s, $locale);
|
@@ -119,9 +121,20 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
|
|
119 |
|
120 |
$unicodeString = (new UnicodeString($string))->ascii($transliterator);
|
121 |
|
122 |
-
if (\is_array($this->symbolsMap)
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
126 |
}
|
127 |
|
@@ -143,17 +156,28 @@ class AsciiSlugger implements SluggerInterface, LocaleAwareInterface
|
|
143 |
}
|
144 |
|
145 |
// Locale not supported and no parent, fallback to any-latin
|
146 |
-
if (
|
147 |
return $this->transliterators[$locale] = null;
|
148 |
}
|
149 |
|
150 |
// Try to use the parent locale (ie. try "de" for "de_AT") and cache both locales
|
151 |
-
$parent = substr($locale, 0, -\strlen($str));
|
152 |
-
|
153 |
if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$parent] ?? null) {
|
154 |
$transliterator = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id);
|
155 |
}
|
156 |
|
157 |
return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null;
|
158 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
103 |
$locale = $locale ?? $this->defaultLocale;
|
104 |
|
105 |
$transliterator = [];
|
106 |
+
if ($locale && ('de' === $locale || 0 === strpos($locale, 'de_'))) {
|
107 |
// Use the shortcut for German in UnicodeString::ascii() if possible (faster and no requirement on intl)
|
108 |
$transliterator = ['de-ASCII'];
|
109 |
} elseif (\function_exists('transliterator_transliterate') && $locale) {
|
111 |
}
|
112 |
|
113 |
if ($this->symbolsMap instanceof \Closure) {
|
114 |
+
// If the symbols map is passed as a closure, there is no need to fallback to the parent locale
|
115 |
+
// as the closure can just provide substitutions for all locales of interest.
|
116 |
$symbolsMap = $this->symbolsMap;
|
117 |
array_unshift($transliterator, static function ($s) use ($symbolsMap, $locale) {
|
118 |
return $symbolsMap($s, $locale);
|
121 |
|
122 |
$unicodeString = (new UnicodeString($string))->ascii($transliterator);
|
123 |
|
124 |
+
if (\is_array($this->symbolsMap)) {
|
125 |
+
$map = null;
|
126 |
+
if (isset($this->symbolsMap[$locale])) {
|
127 |
+
$map = $this->symbolsMap[$locale];
|
128 |
+
} else {
|
129 |
+
$parent = self::getParentLocale($locale);
|
130 |
+
if ($parent && isset($this->symbolsMap[$parent])) {
|
131 |
+
$map = $this->symbolsMap[$parent];
|
132 |
+
}
|
133 |
+
}
|
134 |
+
if ($map) {
|
135 |
+
foreach ($map as $char => $replace) {
|
136 |
+
$unicodeString = $unicodeString->replace($char, ' '.$replace.' ');
|
137 |
+
}
|
138 |
}
|
139 |
}
|
140 |
|
156 |
}
|
157 |
|
158 |
// Locale not supported and no parent, fallback to any-latin
|
159 |
+
if (!$parent = self::getParentLocale($locale)) {
|
160 |
return $this->transliterators[$locale] = null;
|
161 |
}
|
162 |
|
163 |
// Try to use the parent locale (ie. try "de" for "de_AT") and cache both locales
|
|
|
|
|
164 |
if ($id = self::LOCALE_TO_TRANSLITERATOR_ID[$parent] ?? null) {
|
165 |
$transliterator = \Transliterator::create($id.'/BGN') ?? \Transliterator::create($id);
|
166 |
}
|
167 |
|
168 |
return $this->transliterators[$locale] = $this->transliterators[$parent] = $transliterator ?? null;
|
169 |
}
|
170 |
+
|
171 |
+
private static function getParentLocale(?string $locale): ?string
|
172 |
+
{
|
173 |
+
if (!$locale) {
|
174 |
+
return null;
|
175 |
+
}
|
176 |
+
if (false === $str = strrchr($locale, '_')) {
|
177 |
+
// no parent locale
|
178 |
+
return null;
|
179 |
+
}
|
180 |
+
|
181 |
+
return substr($locale, 0, -\strlen($str));
|
182 |
+
}
|
183 |
}
|
vendor/symfony/string/composer.json
CHANGED
@@ -24,10 +24,13 @@
|
|
24 |
"symfony/polyfill-php80": "~1.15"
|
25 |
},
|
26 |
"require-dev": {
|
27 |
-
"symfony/error-handler": "^4.4|^5.0",
|
28 |
-
"symfony/http-client": "^4.4|^5.0",
|
29 |
"symfony/translation-contracts": "^1.1|^2",
|
30 |
-
"symfony/var-exporter": "^4.4|^5.0"
|
|
|
|
|
|
|
31 |
},
|
32 |
"autoload": {
|
33 |
"psr-4": { "Symfony\\Component\\String\\": "" },
|
24 |
"symfony/polyfill-php80": "~1.15"
|
25 |
},
|
26 |
"require-dev": {
|
27 |
+
"symfony/error-handler": "^4.4|^5.0|^6.0",
|
28 |
+
"symfony/http-client": "^4.4|^5.0|^6.0",
|
29 |
"symfony/translation-contracts": "^1.1|^2",
|
30 |
+
"symfony/var-exporter": "^4.4|^5.0|^6.0"
|
31 |
+
},
|
32 |
+
"conflict": {
|
33 |
+
"symfony/translation-contracts": ">=3.0"
|
34 |
},
|
35 |
"autoload": {
|
36 |
"psr-4": { "Symfony\\Component\\String\\": "" },
|
views/lookup.php
CHANGED
@@ -14,6 +14,11 @@ if (!empty($request_ip)) {
|
|
14 |
$code .= "geoip_detect2_get_info_from_ip('" . esc_html($request_ip) . "', ";
|
15 |
}
|
16 |
$code .= var_export_short($request_locales, true) . ($request_skipCache ? ', [ \'skipCache\' => TRUE ]' : '') .");</code>";
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
$is_ajax_enabled = !!get_option('geoip-detect-ajax_enabled');
|
@@ -184,7 +189,7 @@ function var_export_short($data, $return=true)
|
|
184 |
show_row(null, $new_key_1, $key_3, $v, $class);
|
185 |
}
|
186 |
}
|
187 |
-
if (
|
188 |
// Level 2 and counting
|
189 |
$new_key_1 = $key_1 . ( ($syntax === 'php') ? '["' . $key_2 . '"]' : '.' . $key_2);
|
190 |
foreach($value as $key_3 => $v) {
|
@@ -285,7 +290,7 @@ function var_export_short($data, $return=true)
|
|
285 |
<p class="short"><a href="#" onclick="geoip_properties_toggle('all', 'short'); return false;"><?= __('Show all available properties', 'geoip-detect') ?></a></p>
|
286 |
<p><?= __('(More properties might be available for other IPs and with other data sources.)', 'geoip-detect'); ?></p>
|
287 |
|
288 |
-
<?php if (
|
289 |
<?php elseif ($ip_lookup_result === 0 || is_null($ip_lookup_result)) : ?>
|
290 |
<p>
|
291 |
<?= __('No information found about this IP.', 'geoip-detect')?>
|
14 |
$code .= "geoip_detect2_get_info_from_ip('" . esc_html($request_ip) . "', ";
|
15 |
}
|
16 |
$code .= var_export_short($request_locales, true) . ($request_skipCache ? ', [ \'skipCache\' => TRUE ]' : '') .");</code>";
|
17 |
+
} else {
|
18 |
+
$code = '';
|
19 |
+
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
20 |
+
$message = 'This IP is empty or not in a valid format (IPv4 or IPv6)';
|
21 |
+
}
|
22 |
}
|
23 |
|
24 |
$is_ajax_enabled = !!get_option('geoip-detect-ajax_enabled');
|
189 |
show_row(null, $new_key_1, $key_3, $v, $class);
|
190 |
}
|
191 |
}
|
192 |
+
if (str_ends_with($key_1, 'original')) {
|
193 |
// Level 2 and counting
|
194 |
$new_key_1 = $key_1 . ( ($syntax === 'php') ? '["' . $key_2 . '"]' : '.' . $key_2);
|
195 |
foreach($value as $key_3 => $v) {
|
290 |
<p class="short"><a href="#" onclick="geoip_properties_toggle('all', 'short'); return false;"><?= __('Show all available properties', 'geoip-detect') ?></a></p>
|
291 |
<p><?= __('(More properties might be available for other IPs and with other data sources.)', 'geoip-detect'); ?></p>
|
292 |
|
293 |
+
<?php if (GEOIP_DETECT_DEBUG) { var_dump($data); } ?>
|
294 |
<?php elseif ($ip_lookup_result === 0 || is_null($ip_lookup_result)) : ?>
|
295 |
<p>
|
296 |
<?= __('No information found about this IP.', 'geoip-detect')?>
|
views/options.php
CHANGED
@@ -46,7 +46,7 @@ $currentSourceId = $currentSource->getId();
|
|
46 |
<?php endif; ?>
|
47 |
<br/>
|
48 |
|
49 |
-
<a name="choose-source"
|
50 |
<br /><br />
|
51 |
<form method="post" action="#">
|
52 |
<input type="hidden" name="action" value="choose" />
|
@@ -65,24 +65,28 @@ $currentSourceId = $currentSource->getId();
|
|
65 |
<form method="post" action="#">
|
66 |
<input type="hidden" name="action" value="options" />
|
67 |
<?php wp_nonce_field( 'geoip_detect_options' ); ?>
|
|
|
68 |
<h3><?php _e('General Options', 'geoip-detect'); ?></h3>
|
|
|
|
|
69 |
<p>
|
70 |
<label><input type="checkbox" name="options[set_css_country]" value="1" <?php if (!empty($wp_options['set_css_country'])) { echo 'checked="checked"'; } ?>> <?php _e('Add a country-specific CSS class to the <body>-Tag on every page.', 'geoip-detect'); ?></label><br />
|
71 |
</p>
|
|
|
72 |
<p>
|
73 |
<label><input type="checkbox" name="options[disable_pagecache]" value="1" <?php if (!empty($wp_options['disable_pagecache'])) { echo 'checked="checked"'; } ?>> <?php _e('Disable caching a page that contains a shortcode or API call to geo-dependent functions.', 'geoip-detect'); ?></label><br />
|
74 |
<span class="detail-box">
|
75 |
<?php _e('At least WP SuperCache, W3TotalCache and ZenCache are supported.', 'geoip-detect'); ?>
|
76 |
</span>
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
</p>
|
81 |
|
82 |
<p>
|
83 |
<label><input type="checkbox" name="options[ajax_enabled]" value="1" <?php if (!empty($wp_options['ajax_enabled'])) { echo 'checked="checked"'; } ?>> <?php _e('Enable AJAX endpoint to get the information for the current IP even on cached pages.', 'geoip-detect'); ?></label>
|
84 |
</p>
|
85 |
-
<?php if (in_array($currentSourceId,
|
86 |
<span class="geoip_detect_error" style="margin-top: 0;"><?php printf(__('Warning: In theory, other websites could use your API credits over AJAX, this cannot be prevented completely (see <a href="%s" target="_blank">documentation</a> for more infos). You should use a different data source or disable AJAX.', 'geoip-detect'), 'https://github.com/yellowtree/geoip-detect/wiki/JS-API-Documentation'); ?></span>
|
87 |
<?php endif; ?>
|
88 |
<p style="margin-left: 30px;">
|
@@ -98,8 +102,8 @@ $currentSourceId = $currentSource->getId();
|
|
98 |
<span class="detail-box">
|
99 |
<?php _e('(JS Helper functions are added automatically for pages that contain ajax shortcodes.)', 'geoip-detect'); ?><br>
|
100 |
</span>
|
101 |
-
|
102 |
</p>
|
|
|
103 |
<p>
|
104 |
|
105 |
<label><input type="checkbox" name="options[has_reverse_proxy]" value="1" <?php if (!empty($wp_options['has_reverse_proxy'])) { echo 'checked="checked"'; } ?>> <?php _e('The server is behind a reverse proxy', 'geoip-detect')?></label>
|
46 |
<?php endif; ?>
|
47 |
<br/>
|
48 |
|
49 |
+
<a name="choose-source"></a>
|
50 |
<br /><br />
|
51 |
<form method="post" action="#">
|
52 |
<input type="hidden" name="action" value="choose" />
|
65 |
<form method="post" action="#">
|
66 |
<input type="hidden" name="action" value="options" />
|
67 |
<?php wp_nonce_field( 'geoip_detect_options' ); ?>
|
68 |
+
|
69 |
<h3><?php _e('General Options', 'geoip-detect'); ?></h3>
|
70 |
+
|
71 |
+
|
72 |
<p>
|
73 |
<label><input type="checkbox" name="options[set_css_country]" value="1" <?php if (!empty($wp_options['set_css_country'])) { echo 'checked="checked"'; } ?>> <?php _e('Add a country-specific CSS class to the <body>-Tag on every page.', 'geoip-detect'); ?></label><br />
|
74 |
</p>
|
75 |
+
|
76 |
<p>
|
77 |
<label><input type="checkbox" name="options[disable_pagecache]" value="1" <?php if (!empty($wp_options['disable_pagecache'])) { echo 'checked="checked"'; } ?>> <?php _e('Disable caching a page that contains a shortcode or API call to geo-dependent functions.', 'geoip-detect'); ?></label><br />
|
78 |
<span class="detail-box">
|
79 |
<?php _e('At least WP SuperCache, W3TotalCache and ZenCache are supported.', 'geoip-detect'); ?>
|
80 |
</span>
|
81 |
+
<?php if (!empty($wp_options['set_css_country']) && !empty($wp_options['disable_pagecache']) && empty($wp_options['ajax_enabled'])): ?>
|
82 |
+
<span class="geoip_detect_error"><?php _e('Warning: As the CSS option above is active, this means that all pages are not cached.', 'geoip-detect'); ?></span>
|
83 |
+
<?php endif; ?>
|
84 |
</p>
|
85 |
|
86 |
<p>
|
87 |
<label><input type="checkbox" name="options[ajax_enabled]" value="1" <?php if (!empty($wp_options['ajax_enabled'])) { echo 'checked="checked"'; } ?>> <?php _e('Enable AJAX endpoint to get the information for the current IP even on cached pages.', 'geoip-detect'); ?></label>
|
88 |
</p>
|
89 |
+
<?php if (in_array($currentSourceId, [ 'precision', 'ipstack', 'fastah' ]) && !empty($wp_options['ajax_enabled'])): ?>
|
90 |
<span class="geoip_detect_error" style="margin-top: 0;"><?php printf(__('Warning: In theory, other websites could use your API credits over AJAX, this cannot be prevented completely (see <a href="%s" target="_blank">documentation</a> for more infos). You should use a different data source or disable AJAX.', 'geoip-detect'), 'https://github.com/yellowtree/geoip-detect/wiki/JS-API-Documentation'); ?></span>
|
91 |
<?php endif; ?>
|
92 |
<p style="margin-left: 30px;">
|
102 |
<span class="detail-box">
|
103 |
<?php _e('(JS Helper functions are added automatically for pages that contain ajax shortcodes.)', 'geoip-detect'); ?><br>
|
104 |
</span>
|
|
|
105 |
</p>
|
106 |
+
|
107 |
<p>
|
108 |
|
109 |
<label><input type="checkbox" name="options[has_reverse_proxy]" value="1" <?php if (!empty($wp_options['has_reverse_proxy'])) { echo 'checked="checked"'; } ?>> <?php _e('The server is behind a reverse proxy', 'geoip-detect')?></label>
|