Version Description
- FIX: Do not disable lookup automatically when potentially incompatible Maxmind libraries are found.
Download this release
Release Info
Developer | benjamin4 |
Plugin | GeoIP Detection |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2.0 to 4.2.1
- check_compatibility.php +2 -5
- geoip-detect.php +2 -2
- js/dist/frontend.e1ec2aa3.js +41 -0
- js/dist/frontend.e1ec2aa3.js.map +1 -0
- js/dist/parcel.js +2 -2
- js/dist/parcel.json +1 -1
- js/dist/parcel.urls +1 -1
- js/frontend.js +1 -1
- readme.txt +3 -0
check_compatibility.php
CHANGED
@@ -84,14 +84,11 @@ class Maxmind {
|
|
84 |
function checkCompatible() {
|
85 |
$readerClassInfo = new \ReflectionClass('\MaxMind\Db\Reader');
|
86 |
if (!$readerClassInfo->hasMethod('getWithPrefixLen')) {
|
87 |
-
// This would raise an Fatal error during lookup.
|
88 |
-
define('GEOIP_DETECT_LOOKUP_DISABLED', true);
|
89 |
-
|
90 |
$this->getFiles();
|
91 |
$data = implode(' , ', array_map([$this, 'makePathRelative'], $this->filesByOthers));
|
92 |
$line1 = __('Appearently, there is another plugin installed that also uses the Maxmind libraries, but their version of these libraries is outdated.', 'geoip-detect');
|
93 |
-
$line2 = __('These files have been found to be loaded from another plugin: ', 'geoip-detect') . $data;
|
94 |
-
$line3 = __('Please
|
95 |
|
96 |
$body = <<<BODY
|
97 |
<p><i>$line1</i></p>
|
84 |
function checkCompatible() {
|
85 |
$readerClassInfo = new \ReflectionClass('\MaxMind\Db\Reader');
|
86 |
if (!$readerClassInfo->hasMethod('getWithPrefixLen')) {
|
|
|
|
|
|
|
87 |
$this->getFiles();
|
88 |
$data = implode(' , ', array_map([$this, 'makePathRelative'], $this->filesByOthers));
|
89 |
$line1 = __('Appearently, there is another plugin installed that also uses the Maxmind libraries, but their version of these libraries is outdated.', 'geoip-detect');
|
90 |
+
$line2 = __('These incompatible files have been found to be loaded from another plugin: ', 'geoip-detect') . $data;
|
91 |
+
$line3 = __('Please test if looking up an IP adress works without an PHP Error. If it works, you can dismiss this notice. It will appear again when their libraries are changed.', 'geoip-detect');
|
92 |
|
93 |
$body = <<<BODY
|
94 |
<p><i>$line1</i></p>
|
geoip-detect.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.yellowtree.de
|
|
5 |
Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
|
6 |
Author: Yellow Tree (Benjamin Pick)
|
7 |
Author URI: http://www.yellowtree.de
|
8 |
-
Version: 4.2.
|
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.0
|
|
16 |
Requires PHP: 7.2.5
|
17 |
*/
|
18 |
|
19 |
-
define('GEOIP_DETECT_VERSION', '4.2.
|
20 |
|
21 |
/*
|
22 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
5 |
Description: Retrieving Geo-Information using the Maxmind GeoIP (Lite) Database.
|
6 |
Author: Yellow Tree (Benjamin Pick)
|
7 |
Author URI: http://www.yellowtree.de
|
8 |
+
Version: 4.2.1
|
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', '4.2.1');
|
20 |
|
21 |
/*
|
22 |
Copyright 2013-2021 Yellow Tree, Siegen, Germany
|
js/dist/frontend.e1ec2aa3.js
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1 @@
|
|
|
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,E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QwC,MAAM,uEAAyEqB,EAAOrB,SAJ/F,EAAA,OAAA,UAAA,KAAA,EAUG2B,OAFAqE,EAAcJ,EAAavE,GAR9B,EAAA,KAAA,EAUGM,EAVH,SAAA,KAAA,EAaasE,IADVC,EAAOtE,SAASuE,qBAAqB,QAAQ,GACnCF,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/parcel.js
CHANGED
@@ -1,3 +1,3 @@
|
|
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.
|
3 |
-
},{"./js/frontend.js":[["frontend.
|
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
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"frontendJS": "frontend.
|
3 |
"backendJS": "backend.f84e1103.js"
|
4 |
}
|
1 |
{
|
2 |
+
"frontendJS": "frontend.e1ec2aa3.js",
|
3 |
"backendJS": "backend.f84e1103.js"
|
4 |
}
|
js/dist/parcel.urls
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
frontendJS: frontend.
|
2 |
backendJS: backend.f84e1103.js
|
1 |
+
frontendJS: frontend.e1ec2aa3.js
|
2 |
backendJS: backend.f84e1103.js
|
js/frontend.js
CHANGED
@@ -8,7 +8,7 @@ if (options.do_body_classes) {
|
|
8 |
add_body_classes();
|
9 |
}
|
10 |
|
11 |
-
//
|
12 |
do_shortcodes();
|
13 |
|
14 |
// Extend window object
|
8 |
add_body_classes();
|
9 |
}
|
10 |
|
11 |
+
// Do all the shortcodes that are in the HTML. Even if shortcodes is not enabled globally, they might be enabled for a specific shortcode.
|
12 |
do_shortcodes();
|
13 |
|
14 |
// Extend window object
|
readme.txt
CHANGED
@@ -165,6 +165,9 @@ If you use Maxmind "Automatic download" then you need to upgrade to this plugin
|
|
165 |
|
166 |
== Changelog ==
|
167 |
|
|
|
|
|
|
|
168 |
= 4.2.0 =
|
169 |
* NEW: Show a warning on the options page when there are incompatibilities with other plugins that also use the Maxmind libraries.
|
170 |
* FIX: Remove an incompatibility of the libraries with Toolset or other Laravel-based plugins
|
165 |
|
166 |
== Changelog ==
|
167 |
|
168 |
+
= 4.2.1 =
|
169 |
+
* FIX: Do not disable lookup automatically when potentially incompatible Maxmind libraries are found.
|
170 |
+
|
171 |
= 4.2.0 =
|
172 |
* NEW: Show a warning on the options page when there are incompatibilities with other plugins that also use the Maxmind libraries.
|
173 |
* FIX: Remove an incompatibility of the libraries with Toolset or other Laravel-based plugins
|