Cyr-To-Lat - Version 5.0.0

Version Description

(18.03.2021) = * Introduce tabs on options page * Add options to select post types and statuses for background conversion * Make colors compatible to WP official palette * Fix bug with Polylang when locale is not equal to language slug

Download this release

Release Info

Developer mihdan
Plugin Icon 128x128 Cyr-To-Lat
Version 5.0.0
Comparing to
See all releases

Code changes from version 4.6.4 to 5.0.0

Files changed (37) hide show
  1. assets/css/converter.css +74 -0
  2. assets/css/settings-base.css +25 -0
  3. css/cyr-to-lat-admin.css → assets/css/tables.css +11 -26
  4. {js → assets/js}/acf-field-group.js +0 -0
  5. assets/js/converter/app.js +2 -0
  6. assets/js/tables/app.js +2 -0
  7. classes/class-settings.php +0 -785
  8. cyr-to-lat.php +19 -22
  9. dist/js/settings/app.js +0 -2
  10. languages/cyr2lat-ru_RU.mo +0 -0
  11. languages/cyr2lat-ru_RU.po +158 -176
  12. languages/cyr2lat-sv.po +7 -7
  13. languages/cyr2lat-uk.po +7 -7
  14. readme.txt +13 -3
  15. src/php/Settings/Abstracts/SettingsBase.php +956 -0
  16. src/php/Settings/Abstracts/SettingsInterface.php +23 -0
  17. src/php/Settings/Converter.php +295 -0
  18. src/php/Settings/PluginSettingsBase.php +72 -0
  19. src/php/Settings/Settings.php +165 -0
  20. src/php/Settings/Tables.php +286 -0
  21. {classes → src/php}/background-processes/class-conversion-process.php +0 -0
  22. {classes → src/php}/background-processes/class-post-conversion-process.php +0 -0
  23. {classes → src/php}/background-processes/class-term-conversion-process.php +0 -0
  24. {classes → src/php}/class-acf.php +3 -1
  25. {classes → src/php}/class-admin-notices.php +6 -7
  26. {classes → src/php}/class-conversion-tables.php +0 -0
  27. {classes → src/php}/class-converter.php +21 -19
  28. {classes → src/php}/class-main.php +17 -8
  29. {classes → src/php}/class-requirements.php +18 -13
  30. {classes → src/php}/class-wp-cli.php +0 -0
  31. vendor/autoload.php +1 -1
  32. vendor/composer/ClassLoader.php +4 -2
  33. vendor/composer/InstalledVersions.php +6 -7
  34. vendor/composer/autoload_classmap.php +16 -11
  35. vendor/composer/autoload_real.php +7 -7
  36. vendor/composer/autoload_static.php +20 -15
  37. vendor/composer/installed.php +6 -6
assets/css/converter.css ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ctl-confirm-popup {
2
+ display: none;
3
+ position: fixed;
4
+ left: 0;
5
+ right: 0;
6
+ top: 0;
7
+ bottom: 0;
8
+ background: rgba(241,241,241,0.8);
9
+ z-index: 9999;
10
+ }
11
+
12
+ #ctl-confirm-content {
13
+ display: block;
14
+ position: fixed;
15
+ left: 50%;
16
+ top: 50%;
17
+ transform: translate(-50%, -50%);
18
+ background: #fff;
19
+ padding: 20px;
20
+ }
21
+
22
+ .helper {
23
+ position: relative;
24
+ float: left;
25
+ left: -1.7em;
26
+ top: 0.4em;
27
+ }
28
+
29
+ .helper-content {
30
+ position: absolute;
31
+ display: none;
32
+ line-height: 1.5em;
33
+ top: 50%;
34
+ left: 50%;
35
+ transform: translate(calc(-50% + 5px), 26px);
36
+ color: #fff;
37
+ font-size: .8em;
38
+ width: 150px;
39
+ background: #333;
40
+ text-align: center;
41
+ border-radius: 3px;
42
+ padding: .618em 1em;
43
+ box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
44
+ }
45
+
46
+ .helper::after {
47
+ font-family: Dashicons;
48
+ font-size: 1.3em;
49
+ speak: none;
50
+ font-weight: 400;
51
+ text-transform: none;
52
+ line-height: 1;
53
+ -webkit-font-smoothing: antialiased;
54
+ text-indent: 0;
55
+ position: absolute;
56
+ top: 0;
57
+ left: 0;
58
+ width: 100%;
59
+ height: 100%;
60
+ text-align: center;
61
+ content: "";
62
+ cursor: help;
63
+ font-variant: normal;
64
+ margin: 0;
65
+ }
66
+
67
+ .helper:hover .helper-content {
68
+ display: block;
69
+ }
70
+
71
+ #ctl-convert-button {
72
+ color: #d63638;
73
+ border-color: #d63638;
74
+ }
assets/css/settings-base.css ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ctl-settings-tabs {
2
+ line-height: 4.5em;
3
+ background: #fff;
4
+ margin: 10px -20px 0 -20px;
5
+ padding: 0 20px;
6
+ }
7
+
8
+ .ctl-settings-tab {
9
+ display: inline-block;
10
+ font-size: 1.1em;
11
+ text-decoration: none;
12
+ margin-right: 30px;
13
+ color: #646970;
14
+ border-bottom: 2px solid transparent;
15
+ }
16
+
17
+ .ctl-settings-tab:hover {
18
+ color: #666;
19
+ border-color: #646970;
20
+ border-bottom: 2px solid;
21
+ }
22
+
23
+ .ctl-settings-tab.active {
24
+ border-bottom: 2px solid #4f94d4;
25
+ }
css/cyr-to-lat-admin.css → assets/css/tables.css RENAMED
@@ -27,6 +27,7 @@
27
  max-height: 34px;
28
  height: 14px;
29
  line-height: 14px;
 
30
  }
31
 
32
  #ctl-options .nav-tab-wrapper {
@@ -49,7 +50,7 @@ body.js #ctl-options .ctl-table {
49
  clear: both;
50
  width: 100%;
51
  box-sizing: border-box;
52
- border: 1px solid #ccc;
53
  }
54
 
55
  #ctl-options .submit, #ctl-convert-existing-slugs {
@@ -64,12 +65,16 @@ body.js #ctl-options .ctl-table {
64
  }
65
 
66
  #ctl-options .nav-tab-active {
67
- background: #fff;
68
- border-bottom: 1px solid #ccc;
 
69
  }
70
 
71
- .nav-tab-current {
72
- box-shadow: 0 0 5px 5px #fff;
 
 
 
73
  }
74
 
75
  .ctl-table.active {
@@ -134,27 +139,7 @@ body.js #ctl-options .ctl-table {
134
 
135
  #appreciation {
136
  clear: both;
137
- }
138
-
139
- #ctl-confirm-popup {
140
- display: none;
141
- position: fixed;
142
- left: 0;
143
- right: 0;
144
- top: 0;
145
- bottom: 0;
146
- background: rgba(241,241,241,0.8);
147
- z-index: 9999;
148
- }
149
-
150
- #ctl-confirm-content {
151
- display: block;
152
- position: fixed;
153
- left: 50%;
154
- top: 50%;
155
- transform: translate(-50%, -50%);
156
- background: #fff;
157
- padding: 20px;
158
  }
159
 
160
  @media screen and (max-width: 767px) {
27
  max-height: 34px;
28
  height: 14px;
29
  line-height: 14px;
30
+ margin-top: 15px;
31
  }
32
 
33
  #ctl-options .nav-tab-wrapper {
50
  clear: both;
51
  width: 100%;
52
  box-sizing: border-box;
53
+ border: 1px solid #c3c4c7;
54
  }
55
 
56
  #ctl-options .submit, #ctl-convert-existing-slugs {
65
  }
66
 
67
  #ctl-options .nav-tab-active {
68
+ background: #4f94d4;
69
+ color: #fff;
70
+ border-color: #2271b1;
71
  }
72
 
73
+ #ctl-options .nav-tab-current.nav-tab-active {
74
+ /*box-shadow: 0 0 5px 5px #2271b1;*/
75
+ background: #2271b1;
76
+ color: #fff;
77
+ border-color: #0a4b78;
78
  }
79
 
80
  .ctl-table.active {
139
 
140
  #appreciation {
141
  clear: both;
142
+ padding-top: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
  @media screen and (max-width: 767px) {
{js → assets/js}/acf-field-group.js RENAMED
File without changes
assets/js/converter/app.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){r(1),t.exports=r(2)},function(t,e){var r="undefined"!=typeof self?self:this,n=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,n="Symbol"in t&&"iterator"in Symbol,o="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function d(t){this.map={},t instanceof d?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function b(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,r,n=l(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=p(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(O)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(t,e){t=c(t),e=f(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},d.prototype.delete=function(t){delete this.map[c(t)]},d.prototype.get=function(t){return t=c(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(c(t))},d.prototype.set=function(t,e){this.map[c(t)]=f(e)},d.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},d.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),h(t)},d.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},d.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),h(t)},n&&(d.prototype[Symbol.iterator]=d.prototype.entries);var E=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(t,e){var r,n,o=(e=e||{}).body;if(t instanceof v){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new d(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),E.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function O(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function _(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new d(e.headers),this.url=e.url||"",this._initBody(t)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];_.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function T(t,r){return new Promise((function(n,i){var s=new v(t,r);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new _(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}T.polyfill=!0,t.fetch||(t.fetch=T,t.Headers=d,t.Request=v,t.Response=_),e.Headers=d,e.Request=v,e.Response=_,e.fetch=T,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e},function(t,e,r){"use strict";var n,o=r(3),i=(n=o)&&n.__esModule?n:{default:n};document.addEventListener("DOMContentLoaded",(function(){new i.default}))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(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)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.bindEvents()}return n(t,[{key:"bindEvents",value:function(){var t=this;document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(e){return e.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(e){e.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(e){e.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}}]),t}();e.default=o}]);
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nyb3NzLWZldGNoL2Rpc3QvYnJvd3Nlci1wb255ZmlsbC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ICAgICAgbmV3IEJsb2IoKTtcbiAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICAgIH1cbiAgICAgIH0pKCksXG4gICAgZm9ybURhdGE6ICdGb3JtRGF0YScgaW4gc2VsZixcbiAgICBhcnJheUJ1ZmZlcjogJ0FycmF5QnVmZmVyJyBpbiBzZWxmXG4gIH07XG5cbiAgZnVuY3Rpb24gaXNEYXRhVmlldyhvYmopIHtcbiAgICByZXR1cm4gb2JqICYmIERhdGFWaWV3LnByb3RvdHlwZS5pc1Byb3RvdHlwZU9mKG9iailcbiAgfVxuXG4gIGlmIChzdXBwb3J0LmFycmF5QnVmZmVyKSB7XG4gICAgdmFyIHZpZXdDbGFzc2VzID0gW1xuICAgICAgJ1tvYmplY3QgSW50OEFycmF5XScsXG4gICAgICAnW29iamVjdCBVaW50OEFycmF5XScsXG4gICAgICAnW29iamVjdCBVaW50OENsYW1wZWRBcnJheV0nLFxuICAgICAgJ1tvYmplY3QgSW50MTZBcnJheV0nLFxuICAgICAgJ1tvYmplY3QgVWludDE2QXJyYXldJyxcbiAgICAgICdbb2JqZWN0IEludDMyQXJyYXldJyxcbiAgICAgICdbb2JqZWN0IFVpbnQzMkFycmF5XScsXG4gICAgICAnW29iamVjdCBGbG9hdDMyQXJyYXldJyxcbiAgICAgICdbb2JqZWN0IEZsb2F0NjRBcnJheV0nXG4gICAgXTtcblxuICAgIHZhciBpc0FycmF5QnVmZmVyVmlldyA9XG4gICAgICBBcnJheUJ1ZmZlci5pc1ZpZXcgfHxcbiAgICAgIGZ1bmN0aW9uKG9iaikge1xuICAgICAgICByZXR1cm4gb2JqICYmIHZpZXdDbGFzc2VzLmluZGV4T2YoT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG9iaikpID4gLTFcbiAgICAgIH07XG4gIH1cblxuICBmdW5jdGlvbiBub3JtYWxpemVOYW1lKG5hb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
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in e,o="ArrayBuffer"in e;if(o)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function c(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function y(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function b(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=b(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=b(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=f(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(L)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=l(e),t=c(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[l(e)]},d.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},d.prototype.set=function(e,t){this.map[l(e)]=c(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),h(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),h(e)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(e,t){var n,r,i=(t=t||{}).body;if(e instanceof E){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),m.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function L(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function S(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},v.call(E.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];S.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function _(e,n){return new Promise((function(r,s){var o=new E(e,n);if(o.signal&&o.signal.aborted)return s(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e,t,n={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new S(i,n))},a.onerror=function(){s(new TypeError("Network request failed"))},a.ontimeout=function(){s(new TypeError("Network request failed"))},a.onabort=function(){s(new t.DOMException("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),o.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",u)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}_.polyfill=!0,e.fetch||(e.fetch=_,e.Headers=d,e.Request=E,e.Response=S),t.Headers=d,t.Request=E,t.Response=S,t.fetch=_,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},function(e,t,n){"use strict";var r,i=n(3),s=(r=i)&&r.__esModule?r:{default:r};document.addEventListener("DOMContentLoaded",(function(){new s.default}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.optionsSaveSuccessMessage=Cyr2LatTablesObject.optionsSaveSuccessMessage,this.optionsSaveErrorMessage=Cyr2LatTablesObject.optionsSaveErrorMessage,this.addWrapper(),this.addMessageLines(),this.moveTabs(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus()}return r(e,[{key:"getHeaders",value:function(){return[].concat(i(document.querySelectorAll(this.HEADER_SELECTOR)))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return[].concat(i(document.querySelectorAll(this.TABLE_SELECTOR)))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input")))}},{key:"getLabels",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label")))}},{key:"getPlusButtons",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS)))}},{key:"isActiveTableChanged",value:function(){var e=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[e])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"saveActiveTable",value:function(){var e=this;if(this.isActiveTableChanged()){var t=this.getActiveTable(),n=document.createElement("form");return n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(t.cloneNode(!0)),[].concat(i(t.querySelectorAll("input"))).map((function(e){return n.querySelector("#"+e.id).value=e.value})),[].concat(i(this.optionsForm.querySelectorAll('input[type="hidden"]'))).map((function(e){return n.appendChild(e.cloneNode(!0))})),document.body.appendChild(n),fetch(this.optionsForm.getAttribute("action"),{method:n.method,body:new URLSearchParams([].concat(i(new FormData(n))))}).then((function(t){return t.ok?(e.showMessage(e.successMessage,e.optionsSaveSuccessMessage),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,e.optionsSaveErrorMessage),t.json()})).finally((function(){n.parentNode.removeChild(n),e.setSubmitStatus()}))}}},{key:"getTableData",value:function(e){var t=this,n=[].concat(i(e.querySelectorAll("input"))),r={};return n.forEach((function(e){var n=document.querySelector(t.OPTIONS_FORM_SELECTOR+' label[for="'+e.id+'"]');r[n.innerHTML]=e.value})),r}},{key:"getTablesData",value:function(){var e=this;return this.getTables().map((function(t){return e.getTableData(t)}))}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.insertBefore(t,this.optionsForm.firstChild),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error")}},{key:"moveTabs",value:function(){var e=document.querySelector(".ctl-settings-tabs");e&&this.optionsForm.insertBefore(e,this.optionsForm.firstChild)}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var e=this.getLastCell();e.parentElement.insertBefore(e.cloneNode(!0),e.nextElementSibling);var t=(e=this.getLastCell()).querySelector("label"),n=e.querySelector("input"),r=n.id.split("-"),i=r[0]+"-"+(parseInt(r[1])+1);t.htmlFor=i,t.innerHTML="",n.id=i,n.value="",n.setAttribute("value",""),this.replaceName(n,""),this.bindEvents(),this.editLabel(t)}},{key:"hideTables",value:function(){var e=this,t=0;this.getTables().map((function(n,r){n.classList.add("ctl-table"),e.CURRENT_STUB_ID===n.previousElementSibling.id&&(t=r,n.classList.add(e.ACTIVE_TABLE_CLASS));var i=document.createElement("div");return i.classList.add(e.PLUS_CLASS),i.innerHTML=e.plusButton,n.querySelector("td").appendChild(i),null})),this.getHeaders().map((function(n,r){return n.classList.add("nav-tab"),n.dataset.index=r,e.wrapper.appendChild(n),r===t&&(n.classList.add(e.CURRENT_NAV_TAB_CLASS),n.classList.add(e.ACTIVE_NAV_TAB_CLASS)),null}))}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map((function(t,n,r){return t.onclick=function(t){t.preventDefault();var n=t.target.dataset.index;if(n===e.getActiveIndex())return!1;e.saveActiveTable(),r.map((function(t){return t.classList.remove(e.ACTIVE_NAV_TAB_CLASS)})),r[n].classList.add(e.ACTIVE_NAV_TAB_CLASS);var i=e.getTables();return i.map((function(t){return t.classList.remove(e.ACTIVE_TABLE_CLASS)})),i[n].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),!1},null})),this.getInputs().map((function(t){return t.oninput=function(){e.setSubmitStatus()},null})),this.getLabels().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1},null})),this.editLabelInput.onblur=function(){e.saveLabel()},this.editLabelInput.onkeyup=function(t){"Escape"===t.key&&e.saveLabel(!0),"Enter"===t.key&&e.saveLabel()},this.getPlusButtons().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1},null})),this.submitButton.onclick=function(t){return t.preventDefault(),e.saveActiveTable(),!1}}},{key:"editLabel",value:function(e){e.parentNode.appendChild(this.editLabelInput),this.editLabelInput.value=e.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(e){return[].concat(i(this.getActiveTable().querySelectorAll("label"))).reduce((function(t,n){return t&&n.innerHTML!==e}),!0)}},{key:"saveLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var t=this.editLabelInput.value.trim();if(""===t){var n=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),n.parentNode.removeChild(n),void this.setSubmitStatus()}var r=this.editLabelInput.parentNode.querySelector("label");if(e||t===r.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(t)){var i=this.editLabelInput.parentNode.querySelector("input");this.hideEditLabelInput(),r.innerHTML=t,this.replaceName(i,t),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(e,t){e.name=e.name.replace(/(.+\[.+])\[.*]/g,"$1["+t+"]")}},{key:"clearMessage",value:function(e){e.innerHTML="",e.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(e,t){var n=this;e.innerHTML=t,e.classList.add("active"),this.msgTimer=setTimeout((function(){n.clearMessages()}),5e3)}}]),e}();t.default=s}]);
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nyb3NzLWZldGNoL2Rpc3QvYnJvd3Nlci1wb255ZmlsbC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvdGFibGVzL2FwcC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvdGFibGVzL3RhYmxlcy5qcyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsImdsb2JhbCIsInNlbGYiLCJ0aGlzIiwiX19zZWxmX18iLCJGIiwiZmV0Y2giLCJET01FeGNlcHRpb24iLCJzdXBwb3J0IiwiQmxvYiIsImUiLCJ2aWV3Q2xhc3NlcyIsImlzQXJyYXlCdWZmZXJWaWV3IiwiQXJyYXlCdWZmZXIiLCJpc1ZpZXciLC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biAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLl9ib2R5QmxvYikge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUodGhpcy5fYm9keUJsb2IpXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fYm9keUFycmF5QnVmZmVyKSB7XG4gICAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShuZXcgQmxvYihbdGhpcy5fYm9keUFycmF5QnVmZmVyXSkpXG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5fYm9keUZvcm1EYXRhKSB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdjb3VsZCBub3QgcmVhZCBGb3JtRGF0YSBib2R5IGFzIGJsb2InKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUobmV3IEJsb2IoW3RoaXMuX2JvZHlUZXh0XSkpXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIHRoaXMuYXJyYXlCdWZmZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuX2JvZHlBcnJheUJ1ZmZlcikge1xuICAgICAgICAgIHJldHVybiBjb25zdW1lZCh0aGlzKSB8fCBQcm9taXNlLnJlc29sdmUodGhpcy5fYm9keUFycmF5QnVmZmVyKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0aGlzLmJsb2IoKS50aGVuKHJlYWRCbG9iQXNBcnJheUJ1ZmZlcilcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG5cbiAgICB0aGlzLnRleHQgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhciByZWplY3RlZCA9IGNvbnN1bWVkKHRoaXMpO1xuICAgICAgaWYgKHJlamVjdGVkKSB7XG4gICAgICAgIHJldHVybiByZWplY3RlZFxuICAgICAgfVxuXG4gICAgICBpZiAodGhpcy5fYm9keUJsb2IpIHtcbiAgICAgICAgcmV0dXJuIH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x0XHR0aGlzLmNsZWFyTWVzc2FnZXMoKTtcblx0XHR9LCA1MDAwICk7XG5cdH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVGFibGVzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==
classes/class-settings.php DELETED
@@ -1,785 +0,0 @@
1
- <?php
2
- /**
3
- * Plugin Settings.
4
- *
5
- * @package cyr-to-lat
6
- */
7
-
8
- namespace Cyr_To_Lat;
9
-
10
- use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
11
-
12
- /**
13
- * Class Settings
14
- *
15
- * @class Settings
16
- */
17
- class Settings {
18
-
19
- /**
20
- * Admin screen id.
21
- */
22
- const SCREEN_ID = 'settings_page_cyr-to-lat';
23
-
24
- /**
25
- * Option group.
26
- */
27
- const OPTION_GROUP = 'cyr_to_lat_group';
28
-
29
- /**
30
- * Option page.
31
- */
32
- const PAGE = 'cyr-to-lat';
33
-
34
- /**
35
- * Plugin options name.
36
- */
37
- const OPTION_NAME = 'cyr_to_lat_settings';
38
-
39
- /**
40
- * Script handle.
41
- */
42
- const HANDLE = 'cyr-to-lat-settings';
43
-
44
- /**
45
- * Script localization object.
46
- */
47
- const OBJECT = 'Cyr2LatSettingsObject';
48
-
49
- /**
50
- * Form fields.
51
- *
52
- * @var array
53
- */
54
- public $form_fields;
55
-
56
- /**
57
- * Plugin options.
58
- *
59
- * @var array
60
- */
61
- public $settings;
62
-
63
- /**
64
- * Served locales.
65
- *
66
- * @var array
67
- */
68
- protected $locales = [];
69
-
70
- /**
71
- * Settings constructor.
72
- */
73
- public function __construct() {
74
- add_action( 'plugins_loaded', [ $this, 'init' ] );
75
- }
76
-
77
- /**
78
- * Init plugin.
79
- */
80
- public function init() {
81
- $this->load_plugin_textdomain();
82
- $this->init_form_fields();
83
- $this->init_settings();
84
- $this->init_hooks();
85
- }
86
-
87
- /**
88
- * Init class hooks.
89
- */
90
- public function init_hooks() {
91
- add_filter(
92
- 'plugin_action_links_' . plugin_basename( constant( 'CYR_TO_LAT_FILE' ) ),
93
- [ $this, 'add_settings_link' ],
94
- 10,
95
- 4
96
- );
97
-
98
- add_action( 'admin_menu', [ $this, 'add_settings_page' ] );
99
- add_action( 'current_screen', [ $this, 'setup_sections' ] );
100
- add_action( 'current_screen', [ $this, 'setup_fields' ] );
101
-
102
- add_filter( 'pre_update_option_' . self::OPTION_NAME, [ $this, 'pre_update_option_filter' ], 10, 3 );
103
-
104
- add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
105
- add_action( 'in_admin_header', [ $this, 'in_admin_header' ] );
106
- }
107
-
108
- /**
109
- * Add link to plugin setting page on plugins page.
110
- *
111
- * @param array $actions An array of plugin action links. By default this can include 'activate',
112
- * 'deactivate', and 'delete'. With Multisite active this can also include
113
- * 'network_active' and 'network_only' items.
114
- * @param string $plugin_file Path to the plugin file relative to the plugins directory.
115
- * @param array $plugin_data An array of plugin data. See `get_plugin_data()`.
116
- * @param string $context The plugin context. By default this can include 'all', 'active', 'inactive',
117
- * 'recently_activated', 'upgrade', 'mustuse', 'dropins', and 'search'.
118
- *
119
- * @return array|mixed Plugin links
120
- * @noinspection PhpUnusedParameterInspection
121
- */
122
- public function add_settings_link( $actions, $plugin_file, $plugin_data, $context ) {
123
- $ctl_actions = [
124
- 'settings' =>
125
- '<a href="' . admin_url( 'options-general.php?page=' . self::PAGE ) .
126
- '" aria-label="' . esc_attr__( 'View Cyr To Lat settings', 'cyr2lat' ) . '">' .
127
- esc_html__( 'Settings', 'cyr2lat' ) . '</a>',
128
- ];
129
-
130
- return array_merge( $ctl_actions, $actions );
131
- }
132
-
133
- /**
134
- * Init locales.
135
- */
136
- protected function init_locales() {
137
- if ( ! empty( $this->locales ) ) {
138
- return;
139
- }
140
-
141
- $this->locales = [
142
- 'iso9' => [
143
- 'label' => __( 'ISO9 Table', 'cyr2lat' ),
144
- ],
145
- 'bel' => [
146
- 'label' => __( 'bel Table', 'cyr2lat' ),
147
- ],
148
- 'uk' => [
149
- 'label' => __( 'uk Table', 'cyr2lat' ),
150
- ],
151
- 'bg_BG' => [
152
- 'label' => __( 'bg_BG Table', 'cyr2lat' ),
153
- ],
154
- 'mk_MK' => [
155
- 'label' => __( 'mk_MK Table', 'cyr2lat' ),
156
- ],
157
- 'sr_RS' => [
158
- 'label' => __( 'sr_RS Table', 'cyr2lat' ),
159
- ],
160
- 'el' => [
161
- 'label' => __( 'el Table', 'cyr2lat' ),
162
- ],
163
- 'hy' => [
164
- 'label' => __( 'hy Table', 'cyr2lat' ),
165
- ],
166
- 'ka_GE' => [
167
- 'label' => __( 'ka_GE Table', 'cyr2lat' ),
168
- ],
169
- 'kk' => [
170
- 'label' => __( 'kk Table', 'cyr2lat' ),
171
- ],
172
- 'he_IL' => [
173
- 'label' => __( 'he_IL Table', 'cyr2lat' ),
174
- ],
175
- 'zh_CN' => [
176
- 'label' => __( 'zh_CN Table', 'cyr2lat' ),
177
- ],
178
- ];
179
- }
180
-
181
- /**
182
- * Get current locale.
183
- *
184
- * @return string
185
- */
186
- private function get_current_locale() {
187
- $current_locale = get_locale();
188
-
189
- return array_key_exists( $current_locale, $this->locales ) ? $current_locale : 'iso9';
190
- }
191
-
192
- /**
193
- * Init options form fields.
194
- */
195
- public function init_form_fields() {
196
- $this->init_locales();
197
-
198
- $current_locale = $this->get_current_locale();
199
-
200
- $this->form_fields = [];
201
-
202
- foreach ( $this->locales as $locale => $info ) {
203
- $current = ( $locale === $current_locale ) ? '<br>' . __( '(current)', 'cyr2lat' ) : '';
204
-
205
- $this->form_fields[ $locale ] = [
206
- 'label' => $info['label'] . $current,
207
- 'section' => $locale . '_section',
208
- 'type' => 'table',
209
- 'placeholder' => '',
210
- 'helper' => '',
211
- 'supplemental' => '',
212
- 'default' => Conversion_Tables::get( $locale ),
213
- ];
214
- }
215
- }
216
-
217
- /**
218
- * Initialise Settings.
219
- *
220
- * Store all settings in a single database entry
221
- * and make sure the $settings array is either the default
222
- * or the settings stored in the database.
223
- */
224
- public function init_settings() {
225
- $this->settings = get_option( self::OPTION_NAME, null );
226
-
227
- $form_fields = $this->get_form_fields();
228
-
229
- // If there are no settings defined, use defaults.
230
- if ( ! is_array( $this->settings ) ) {
231
- $this->settings = array_merge( array_fill_keys( array_keys( $form_fields ), '' ), wp_list_pluck( $form_fields, 'default' ) );
232
- } else {
233
- $this->settings = array_merge( wp_list_pluck( $form_fields, 'default' ), $this->settings );
234
- }
235
- }
236
-
237
- /**
238
- * Get the form fields after they are initialized.
239
- *
240
- * @return array of options
241
- */
242
- public function get_form_fields() {
243
- if ( empty( $this->form_fields ) ) {
244
- $this->init_form_fields();
245
- }
246
-
247
- return array_map( [ $this, 'set_defaults' ], $this->form_fields );
248
- }
249
-
250
- /**
251
- * Set default required properties for each field.
252
- *
253
- * @param array $field Settings field.
254
- *
255
- * @return array
256
- */
257
- protected function set_defaults( $field ) {
258
- if ( ! isset( $field['default'] ) ) {
259
- $field['default'] = '';
260
- }
261
-
262
- return $field;
263
- }
264
-
265
- /**
266
- * Add settings page to the menu.
267
- */
268
- public function add_settings_page() {
269
- $parent_slug = 'options-general.php';
270
- $page_title = __( 'Cyr To Lat', 'cyr2lat' );
271
- $menu_title = __( 'Cyr To Lat', 'cyr2lat' );
272
- $capability = 'manage_options';
273
- $slug = self::PAGE;
274
- $callback = [ $this, 'settings_page' ];
275
- add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $slug, $callback );
276
- }
277
-
278
- /**
279
- * Settings page.
280
- */
281
- public function settings_page() {
282
- if ( ! $this->is_options_screen() ) {
283
- return;
284
- }
285
-
286
- ?>
287
- <div class="wrap">
288
- <h2 id="title">
289
- <?php
290
- // Admin panel title.
291
- echo( esc_html( __( 'Cyr To Lat Plugin Options', 'cyr2lat' ) ) );
292
- ?>
293
- </h2>
294
-
295
- <form id="ctl-options" action="<?php echo esc_url( admin_url( 'options.php' ) ); ?>" method="post">
296
- <?php
297
- do_settings_sections( self::PAGE ); // Sections with options.
298
- settings_fields( self::OPTION_GROUP ); // Hidden protection fields.
299
- submit_button();
300
- ?>
301
- </form>
302
-
303
- <form id="ctl-convert-existing-slugs" action="" method="post">
304
- <input type="hidden" name="ctl-convert" />
305
- <?php
306
- wp_nonce_field( self::OPTION_GROUP . '-options' );
307
- submit_button( __( 'Convert Existing Slugs', 'cyr2lat' ), 'secondary', 'ctl-convert-button' );
308
- ?>
309
- </form>
310
-
311
- <div id="appreciation">
312
- <h2>
313
- <?php echo esc_html( __( 'Your appreciation', 'cyr2lat' ) ); ?>
314
- </h2>
315
- <a
316
- target="_blank"
317
- href="https://wordpress.org/support/view/plugin-reviews/cyr2lat?rate=5#postform">
318
- <?php echo esc_html( __( 'Leave a ★★★★★ plugin review on WordPress.org', 'cyr2lat' ) ); ?>
319
- </a>
320
- </div>
321
- </div>
322
- <?php
323
- }
324
-
325
- /**
326
- * Setup settings sections.
327
- */
328
- public function setup_sections() {
329
- if ( ! $this->is_options_screen() ) {
330
- return;
331
- }
332
-
333
- foreach ( $this->form_fields as $form_field ) {
334
- add_settings_section(
335
- $form_field['section'],
336
- $form_field['label'],
337
- [ $this, 'section_callback' ],
338
- self::PAGE
339
- );
340
- }
341
- }
342
-
343
- /**
344
- * Section callback.
345
- *
346
- * @param array $arguments Section arguments.
347
- */
348
- public function section_callback( $arguments ) {
349
- $locale = str_replace( '_section', '', $arguments['id'] );
350
- if ( $this->get_current_locale() === $locale ) {
351
- echo '<div id="ctl-current"></div>';
352
- }
353
- }
354
-
355
- /**
356
- * Setup settings fields.
357
- */
358
- public function setup_fields() {
359
- if ( ! $this->is_options_screen() ) {
360
- return;
361
- }
362
-
363
- register_setting( self::OPTION_GROUP, self::OPTION_NAME );
364
-
365
- foreach ( $this->form_fields as $key => $field ) {
366
- $field['field_id'] = $key;
367
-
368
- add_settings_field(
369
- $key,
370
- $field['label'],
371
- [ $this, 'field_callback' ],
372
- self::PAGE,
373
- $field['section'],
374
- $field
375
- );
376
- }
377
- }
378
-
379
- /**
380
- * Output settings field.
381
- *
382
- * @param array $arguments Field arguments.
383
- */
384
- public function field_callback( $arguments ) {
385
- if ( ! isset( $arguments['field_id'] ) ) {
386
- return;
387
- }
388
-
389
- $value = $this->get_option( $arguments['field_id'] );
390
-
391
- // Check which type of field we want.
392
- switch ( $arguments['type'] ) {
393
- case 'text':
394
- case 'password':
395
- case 'number':
396
- printf(
397
- '<input name="%1$s[%2$s]" id="%2$s" type="%3$s" placeholder="%4$s" value="%5$s" class="regular-text" />',
398
- esc_html( self::OPTION_NAME ),
399
- esc_attr( $arguments['field_id'] ),
400
- esc_attr( $arguments['type'] ),
401
- esc_attr( $arguments['placeholder'] ),
402
- esc_html( $value )
403
- );
404
- break;
405
- case 'textarea':
406
- printf(
407
- '<textarea name="%1$s[%2$s]" id="%2$s" placeholder="%3$s" rows="5" cols="50">%4$s</textarea>',
408
- esc_html( self::OPTION_NAME ),
409
- esc_attr( $arguments['field_id'] ),
410
- esc_attr( $arguments['placeholder'] ),
411
- wp_kses_post( $value )
412
- );
413
- break;
414
- case 'checkbox':
415
- case 'radio':
416
- if ( 'checkbox' === $arguments['type'] ) {
417
- $arguments['options'] = [ 'yes' => '' ];
418
- }
419
-
420
- if ( ! empty( $arguments['options'] ) && is_array( $arguments['options'] ) ) {
421
- $options_markup = '';
422
- $iterator = 0;
423
- foreach ( $arguments['options'] as $key => $label ) {
424
- $iterator ++;
425
- $options_markup .= sprintf(
426
- '<label for="%2$s_%7$s"><input id="%2$s_%7$s" name="%1$s[%2$s]" type="%3$s" value="%4$s" %5$s /> %6$s</label><br/>',
427
- esc_html( self::OPTION_NAME ),
428
- $arguments['field_id'],
429
- $arguments['type'],
430
- $key,
431
- checked( $value, $key, false ),
432
- $label,
433
- $iterator
434
- );
435
- }
436
- printf(
437
- '<fieldset>%s</fieldset>',
438
- wp_kses(
439
- $options_markup,
440
- [
441
- 'label' => [
442
- 'for' => [],
443
- ],
444
- 'input' => [
445
- 'id' => [],
446
- 'name' => [],
447
- 'type' => [],
448
- 'value' => [],
449
- 'checked' => [],
450
- ],
451
- 'br' => [],
452
- ]
453
- )
454
- );
455
- }
456
- break;
457
- case 'select': // If it is a select dropdown.
458
- if ( ! empty( $arguments['options'] ) && is_array( $arguments['options'] ) ) {
459
- $options_markup = '';
460
- foreach ( $arguments['options'] as $key => $label ) {
461
- $options_markup .= sprintf(
462
- '<option value="%s" %s>%s</option>',
463
- $key,
464
- selected( $value, $key, false ),
465
- $label
466
- );
467
- }
468
- printf(
469
- '<select name="%1$s[%2$s]">%3$s</select>',
470
- esc_html( self::OPTION_NAME ),
471
- esc_html( $arguments['field_id'] ),
472
- wp_kses(
473
- $options_markup,
474
- [
475
- 'option' => [
476
- 'value' => [],
477
- 'selected' => [],
478
- ],
479
- ]
480
- )
481
- );
482
- }
483
- break;
484
- case 'multiple': // If it is a multiple select dropdown.
485
- if ( ! empty( $arguments['options'] ) && is_array( $arguments['options'] ) ) {
486
- $options_markup = '';
487
- foreach ( $arguments['options'] as $key => $label ) {
488
- $selected = '';
489
- if ( is_array( $value ) && in_array( $key, $value, true ) ) {
490
- $selected = selected( $key, $key, false );
491
- }
492
- $options_markup .= sprintf(
493
- '<option value="%s" %s>%s</option>',
494
- $key,
495
- $selected,
496
- $label
497
- );
498
- }
499
- printf(
500
- '<select multiple="multiple" name="%1$s[%2$s][]">%3$s</select>',
501
- esc_html( self::OPTION_NAME ),
502
- esc_html( $arguments['field_id'] ),
503
- wp_kses(
504
- $options_markup,
505
- [
506
- 'option' => [
507
- 'value' => [],
508
- 'selected' => [],
509
- ],
510
- ]
511
- )
512
- );
513
- }
514
- break;
515
- case 'table':
516
- if ( is_array( $value ) ) {
517
- $iterator = 0;
518
- foreach ( $value as $key => $cell_value ) {
519
- $id = $arguments['field_id'] . '-' . $iterator;
520
-
521
- echo '<div class="ctl-table-cell">';
522
- printf(
523
- '<label for="%1$s">%2$s</label>',
524
- esc_html( $id ),
525
- esc_html( $key )
526
- );
527
- printf(
528
- '<input name="%1$s[%2$s][%3$s]" id="%4$s" type="%5$s" placeholder="%6$s" value="%7$s" class="regular-text" />',
529
- esc_html( self::OPTION_NAME ),
530
- esc_attr( $arguments['field_id'] ),
531
- esc_attr( $key ),
532
- esc_attr( $id ),
533
- 'text',
534
- esc_attr( $arguments['placeholder'] ),
535
- esc_html( $cell_value )
536
- );
537
- echo '</div>';
538
-
539
- $iterator ++;
540
- }
541
- }
542
- break;
543
- default:
544
- break;
545
- }
546
-
547
- // If there is help text.
548
- $helper = $arguments['helper'];
549
- if ( $helper ) {
550
- printf( '<span class="helper"> %s</span>', esc_html( $helper ) );
551
- }
552
-
553
- // If there is supplemental text.
554
- $supplemental = $arguments['supplemental'];
555
- if ( $supplemental ) {
556
- printf( '<p class="description">%s</p>', esc_html( $supplemental ) );
557
- }
558
- }
559
-
560
- /**
561
- * Get plugin option.
562
- *
563
- * @param string $key Setting name.
564
- * @param mixed $empty_value Empty value for this setting.
565
- *
566
- * @return string|array The value specified for the option or a default value for the option.
567
- */
568
- public function get_option( $key, $empty_value = null ) {
569
- if ( empty( $this->settings ) ) {
570
- $this->init_settings();
571
- }
572
-
573
- // Get option default if unset.
574
- if ( ! isset( $this->settings[ $key ] ) ) {
575
- $form_fields = $this->get_form_fields();
576
- $this->settings[ $key ] = isset( $form_fields[ $key ] ) ? $this->get_field_default( $form_fields[ $key ] ) : '';
577
- }
578
-
579
- if ( '' === $this->settings[ $key ] && ! is_null( $empty_value ) ) {
580
- $this->settings[ $key ] = $empty_value;
581
- }
582
-
583
- return $this->settings[ $key ];
584
- }
585
-
586
- /**
587
- * Get a field default value. Defaults to '' if not set.
588
- *
589
- * @param array $field Setting field default value.
590
- *
591
- * @return string
592
- */
593
- protected function get_field_default( $field ) {
594
- return empty( $field['default'] ) ? '' : $field['default'];
595
- }
596
-
597
- /**
598
- * Set plugin option.
599
- *
600
- * @param string $key Setting name.
601
- * @param mixed $value Setting value.
602
- */
603
- public function set_option( $key, $value ) {
604
- if ( empty( $this->settings ) ) {
605
- $this->init_settings();
606
- }
607
-
608
- $this->settings[ $key ] = $value;
609
- update_option( self::OPTION_NAME, $this->settings );
610
- }
611
-
612
- /**
613
- * Filter plugin option update.
614
- *
615
- * @param mixed $value New option value.
616
- * @param mixed $old_value Old option value.
617
- * @param string $option Option name.
618
- *
619
- * @return mixed
620
- * @noinspection PhpUnusedParameterInspection
621
- */
622
- public function pre_update_option_filter( $value, $old_value, $option ) {
623
- if ( $value === $old_value ) {
624
- return $value;
625
- }
626
-
627
- // We save only one table, so merge with all existing tables.
628
- if ( is_array( $old_value ) && ( is_array( $value ) ) ) {
629
- $value = array_merge( $old_value, $value );
630
- }
631
-
632
- $form_fields = $this->get_form_fields();
633
- foreach ( $form_fields as $key => $form_field ) {
634
- if ( 'checkbox' === $form_field['type'] ) {
635
- $form_field_value = isset( $value[ $key ] ) ? $value[ $key ] : 'no';
636
- $form_field_value = '1' === $form_field_value || 'yes' === $form_field_value ? 'yes' : 'no';
637
- $value[ $key ] = $form_field_value;
638
- }
639
- }
640
-
641
- return $value;
642
- }
643
-
644
- /**
645
- * Enqueue class scripts.
646
- */
647
- public function admin_enqueue_scripts() {
648
- if ( ! $this->is_options_screen() ) {
649
- return;
650
- }
651
-
652
- wp_enqueue_script(
653
- self::HANDLE,
654
- constant( 'CYR_TO_LAT_URL' ) . '/dist/js/settings/app.js',
655
- [],
656
- constant( 'CYR_TO_LAT_VERSION' ),
657
- true
658
- );
659
-
660
- wp_localize_script(
661
- self::HANDLE,
662
- self::OBJECT,
663
- [
664
- 'optionsSaveSuccessMessage' => __( 'Options saved.', 'cyr2lat' ),
665
- 'optionsSaveErrorMessage' => __( 'Error saving options.', 'cyr2lat' ),
666
- ]
667
- );
668
-
669
- wp_enqueue_style(
670
- self::HANDLE,
671
- constant( 'CYR_TO_LAT_URL' ) . '/css/cyr-to-lat-admin.css',
672
- [],
673
- constant( 'CYR_TO_LAT_VERSION' )
674
- );
675
- }
676
-
677
- /**
678
- * Output convert confirmation popup.
679
- */
680
- public function in_admin_header() {
681
- if ( ! $this->is_options_screen() ) {
682
- return;
683
- }
684
-
685
- ?>
686
- <div id="ctl-confirm-popup">
687
- <div id="ctl-confirm-content">
688
- <p>
689
- <strong><?php esc_html_e( 'Important:', 'cyr2lat' ); ?></strong>
690
- <?php
691
- esc_html_e(
692
- 'This operation is irreversible. Please make sure that you have made backup copy of your database.',
693
- 'cyr2lat'
694
- );
695
- ?>
696
- </p>
697
- <p><?php esc_html_e( 'Are you sure to continue?', 'cyr2lat' ); ?></p>
698
- <div id="ctl-confirm-buttons">
699
- <input
700
- type="button" id="ctl-confirm-ok" class="button button-primary"
701
- value="<?php esc_html_e( 'OK', 'cyr2lat' ); ?>">
702
- <button
703
- type="button" id="ctl-confirm-cancel" class="button button-secondary">
704
- <?php esc_html_e( 'Cancel', 'cyr2lat' ); ?>
705
- </button>
706
- </div>
707
- </div>
708
- </div>
709
- <?php
710
- }
711
-
712
- /**
713
- * Load plugin text domain.
714
- */
715
- public function load_plugin_textdomain() {
716
- load_plugin_textdomain(
717
- 'cyr2lat',
718
- false,
719
- dirname( plugin_basename( constant( 'CYR_TO_LAT_FILE' ) ) ) . '/languages/'
720
- );
721
- }
722
-
723
- /**
724
- * Get transliteration table.
725
- *
726
- * @return array
727
- */
728
- public function get_table() {
729
- // List of locales: https://make.wordpress.org/polyglots/teams/.
730
- $locale = get_locale();
731
- $table = $this->get_option( $locale );
732
- if ( empty( $table ) ) {
733
- $table = $this->get_option( 'iso9' );
734
- }
735
-
736
- return $this->transpose_chinese_table( $table );
737
- }
738
-
739
- /**
740
- * Is current locale a Chinese one.
741
- *
742
- * @return bool
743
- */
744
- public function is_chinese_locale() {
745
- $chinese_locales = [ 'zh_CN', 'zh_HK', 'zh_SG', 'zh_TW' ];
746
-
747
- return in_array( get_locale(), $chinese_locales, true );
748
- }
749
-
750
- /**
751
- * Transpose Chinese table.
752
- *
753
- * Chinese tables are stored in different way, to show them compact.
754
- *
755
- * @param array $table Table.
756
- *
757
- * @return array
758
- */
759
- protected function transpose_chinese_table( $table ) {
760
- if ( ! $this->is_chinese_locale() ) {
761
- return $table;
762
- }
763
-
764
- $transposed_table = [];
765
- foreach ( $table as $key => $item ) {
766
- $hieroglyphs = Mbstring::mb_str_split( $item );
767
- foreach ( $hieroglyphs as $hieroglyph ) {
768
- $transposed_table[ $hieroglyph ] = $key;
769
- }
770
- }
771
-
772
- return $transposed_table;
773
- }
774
-
775
- /**
776
- * Is current admin screen the plugin options screen.
777
- *
778
- * @return bool
779
- */
780
- protected function is_options_screen() {
781
- $current_screen = get_current_screen();
782
-
783
- return $current_screen && ( 'options' === $current_screen->id || self::SCREEN_ID === $current_screen->id );
784
- }
785
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cyr-to-lat.php CHANGED
@@ -2,21 +2,23 @@
2
  /**
3
  * Cyr-To-Lat
4
  *
5
- * Plugin Name: Cyr-To-Lat
6
- * Plugin URI: https://wordpress.org/plugins/cyr2lat/
7
- * Description: Converts Cyrillic characters in post and term slugs to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov.
8
- * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
9
- * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
- * Requires at least: 5.1
11
- * Tested up to: 5.7
12
- * Version: 4.6.4
13
- * Stable tag: 4.6.4
14
- *
15
- * Text Domain: cyr2lat
16
- * Domain Path: /languages/
17
  *
18
- * @package cyr-to-lat
19
- * @author Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
 
 
 
 
 
 
 
 
 
 
20
  */
21
 
22
  namespace Cyr_To_Lat;
@@ -34,7 +36,7 @@ if ( defined( 'CYR_TO_LAT_VERSION' ) ) {
34
  /**
35
  * Plugin version.
36
  */
37
- define( 'CYR_TO_LAT_VERSION', '4.6.4' );
38
 
39
  /**
40
  * Path to the plugin dir.
@@ -79,14 +81,9 @@ define( 'CYR_TO_LAT_REQUIRED_MAX_INPUT_VARS', 1000 );
79
  /**
80
  * Init plugin on plugin load.
81
  */
82
- require_once constant( 'CYR_TO_LAT_PATH' ) . '/vendor/autoload.php';
83
-
84
- $cyr_to_lat_requirements = new Requirements();
85
-
86
- if ( ! $cyr_to_lat_requirements->are_requirements_met() ) {
87
- return;
88
- }
89
 
90
  global $cyr_to_lat_plugin;
91
 
92
  $cyr_to_lat_plugin = new Main();
 
2
  /**
3
  * Cyr-To-Lat
4
  *
5
+ * @package cyr-to-lat
6
+ * @author Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
7
+ * @license GPL-2.0-or-later
8
+ * @wordpress-plugin
 
 
 
 
 
 
 
 
9
  *
10
+ * Plugin Name: Cyr-To-Lat
11
+ * Plugin URI: https://wordpress.org/plugins/cyr2lat/
12
+ * Description: Converts Cyrillic characters in post and term slugs to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov.
13
+ * Version: 5.0.0
14
+ * Requires at least: 5.1
15
+ * Requires PHP: 5.6.20
16
+ * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
17
+ * Author URI: https://profiles.wordpress.org/sergeybiryukov/
18
+ * License: GPL v2 or later
19
+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html
20
+ * Text Domain: cyr2lat
21
+ * Domain Path: /languages/
22
  */
23
 
24
  namespace Cyr_To_Lat;
36
  /**
37
  * Plugin version.
38
  */
39
+ define( 'CYR_TO_LAT_VERSION', '5.0.0' );
40
 
41
  /**
42
  * Path to the plugin dir.
81
  /**
82
  * Init plugin on plugin load.
83
  */
84
+ require_once 'vendor/autoload.php';
 
 
 
 
 
 
85
 
86
  global $cyr_to_lat_plugin;
87
 
88
  $cyr_to_lat_plugin = new Main();
89
+ $cyr_to_lat_plugin->init();
dist/js/settings/app.js DELETED
@@ -1,2 +0,0 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){n(1),t.exports=n(2)},function(t,e){var n=function(t){function e(){this.fetch=!1,this.DOMException=t.DOMException}return e.prototype=t,new e}("undefined"!=typeof self?self:this);!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function d(t){this.map={},t instanceof d?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function b(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=f(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(t,e){t=l(t),e=c(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},d.prototype.delete=function(t){delete this.map[l(t)]},d.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},d.prototype.set=function(t,e){this.map[l(t)]=c(e)},d.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},d.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),h(t)},d.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),h(t)},d.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),h(t)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function E(t,e){var n,r,i=(e=e||{}).body;if(t instanceof E){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new d(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),m.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function S(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function L(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new d(e.headers),this.url=e.url||"",this._initBody(t)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},v.call(E.prototype),v.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},L.error=function(){var t=new L(null,{status:0,statusText:""});return t.type="error",t};var T=[301,302,303,307,308];L.redirect=function(t,e){if(-1===T.indexOf(e))throw new RangeError("Invalid status code");return new L(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function _(t,n){return new Promise((function(r,o){var s=new E(t,n);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;r(new L(i,n))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}_.polyfill=!0,t.fetch||(t.fetch=_,t.Headers=d,t.Request=E,t.Response=L),e.Headers=d,e.Request=E,e.Response=L,e.fetch=_}({})}(n),delete n.fetch.polyfill,(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e},function(t,e,n){"use strict";var r,i=n(3),o=(r=i)&&r.__esModule?r:{default:r};document.addEventListener("DOMContentLoaded",(function(){new o.default}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.optionsSaveSuccessMessage=Cyr2LatSettingsObject.optionsSaveSuccessMessage,this.optionsSaveErrorMessage=Cyr2LatSettingsObject.optionsSaveErrorMessage,this.addWrapper(),this.addMessageLines(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus()}return r(t,[{key:"getHeaders",value:function(){return[].concat(i(document.querySelectorAll(this.HEADER_SELECTOR)))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return[].concat(i(document.querySelectorAll(this.TABLE_SELECTOR)))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input")))}},{key:"getLabels",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label")))}},{key:"getPlusButtons",value:function(){return[].concat(i(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS)))}},{key:"isActiveTableChanged",value:function(){var t=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[t])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"saveActiveTable",value:function(){var t=this;if(this.isActiveTableChanged()){var e=this.getActiveTable(),n=document.createElement("form");return n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(e.cloneNode(!0)),[].concat(i(e.querySelectorAll("input"))).map((function(t){return n.querySelector("#"+t.id).value=t.value})),[].concat(i(this.optionsForm.querySelectorAll('input[type="hidden"]'))).map((function(t){return n.appendChild(t.cloneNode(!0))})),document.body.appendChild(n),fetch(this.optionsForm.getAttribute("action"),{method:n.method,body:new URLSearchParams([].concat(i(new FormData(n))))}).then((function(e){return e.ok?(t.showMessage(t.successMessage,t.optionsSaveSuccessMessage),t.tablesData=t.getTablesData()):t.showMessage(t.errorMessage,t.optionsSaveErrorMessage),e.json()})).finally((function(){n.parentNode.removeChild(n),t.setSubmitStatus()}))}}},{key:"getTableData",value:function(t){var e=this,n=[].concat(i(t.querySelectorAll("input"))),r={};return n.forEach((function(t){var n=document.querySelector(e.OPTIONS_FORM_SELECTOR+' label[for="'+t.id+'"]');r[n.innerHTML]=t.value})),r}},{key:"getTablesData",value:function(){var t=this;return this.getTables().map((function(e){return t.getTableData(e)}))}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(t){var e=document.createElement("div");return e.id=t,this.optionsForm.insertBefore(e,this.optionsForm.firstChild),e}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error")}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var t=this.getLastCell();t.parentElement.insertBefore(t.cloneNode(!0),t.nextElementSibling);var e=(t=this.getLastCell()).querySelector("label"),n=t.querySelector("input"),r=n.id.split("-"),i=r[0]+"-"+(parseInt(r[1])+1);e.htmlFor=i,e.innerHTML="",n.id=i,n.value="",n.setAttribute("value",""),this.replaceName(n,""),this.bindEvents(),this.editLabel(e)}},{key:"hideTables",value:function(){var t=this,e=0;this.getTables().map((function(n,r){n.classList.add("ctl-table"),t.CURRENT_STUB_ID===n.previousElementSibling.id&&(e=r,n.classList.add(t.ACTIVE_TABLE_CLASS));var i=document.createElement("div");return i.classList.add(t.PLUS_CLASS),i.innerHTML=t.plusButton,n.querySelector("td").appendChild(i),null})),this.getHeaders().map((function(n,r){return n.classList.add("nav-tab"),n.dataset.index=r,t.wrapper.appendChild(n),r===e&&(n.classList.add(t.CURRENT_NAV_TAB_CLASS),n.classList.add(t.ACTIVE_NAV_TAB_CLASS)),null}))}},{key:"bindEvents",value:function(){var t=this;this.getHeaders().map((function(e,n,r){return e.onclick=function(e){e.preventDefault();var n=e.target.dataset.index;if(n===t.getActiveIndex())return!1;t.saveActiveTable(),r.map((function(e){return e.classList.remove(t.ACTIVE_NAV_TAB_CLASS)})),r[n].classList.add(t.ACTIVE_NAV_TAB_CLASS);var i=t.getTables();return i.map((function(e){return e.classList.remove(t.ACTIVE_TABLE_CLASS)})),i[n].classList.add(t.ACTIVE_TABLE_CLASS),t.setSubmitStatus(),!1},null})),this.getInputs().map((function(e){return e.oninput=function(){t.setSubmitStatus()},null})),this.getLabels().map((function(e){return e.onclick=function(e){return e.preventDefault(),t.editLabel(e.target),!1},null})),this.editLabelInput.onblur=function(){t.saveLabel()},this.editLabelInput.onkeyup=function(e){"Escape"===e.key&&t.saveLabel(!0),"Enter"===e.key&&t.saveLabel()},this.getPlusButtons().map((function(e){return e.onclick=function(e){return e.preventDefault(),t.addCell(e.target),!1},null})),this.submitButton.onclick=function(e){return e.preventDefault(),t.saveActiveTable(),!1},document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(e){return e.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(e){e.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(e){e.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}},{key:"editLabel",value:function(t){t.parentNode.appendChild(this.editLabelInput),this.editLabelInput.value=t.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(t){return[].concat(i(this.getActiveTable().querySelectorAll("label"))).reduce((function(e,n){return e&&n.innerHTML!==t}),!0)}},{key:"saveLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var e=this.editLabelInput.value.trim();if(""===e){var n=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),n.parentNode.removeChild(n),void this.setSubmitStatus()}var r=this.editLabelInput.parentNode.querySelector("label");if(t||e===r.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(e)){var i=this.editLabelInput.parentNode.querySelector("input");this.hideEditLabelInput(),r.innerHTML=e,this.replaceName(i,e),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(t,e){t.name=t.name.replace(/(.+\[.+])\[.*]/g,"$1["+e+"]")}},{key:"clearMessage",value:function(t){t.innerHTML="",t.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(t,e){var n=this;t.innerHTML=e,t.classList.add("active"),this.msgTimer=setTimeout((function(){n.clearMessages()}),5e3)}}]),t}();e.default=o}]);
2
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nyb3NzLWZldGNoL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jb25zdW1lZCh0aGlzKSB8fCBQcm9taXNlLnJlc29sdmUodGhpcy5fYm9keUFycmF5QnVmZmVyKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0aGlzLmJsb2IoKS50aGVuKHJlYWRCbG9iQXNBcnJheUJ1ZmZlcilcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG5cbiAgICB0aGlzLnRleHQgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhciByZWplY3RlZCA9IGNvbnN1bWVkKHRoaXMpO1xuICAgICAgaWYgKHJlamVjdGVkKSB7XG4gICAgICAgIHJldHVybiByZWplY3RlZFxuICAgICAgfVxuXG4gICAgICBpZiAodGhpcy5fYm9keUJsb2IpIHtcbiAgICAgICAgcmV0dXJuIHJlYWRCbG9iQXNUZXh0KHRoaXMuX2JvZHlCbG9iKVxuICAgICAgfSBlbHNlIGlmICh0aGlzLl9ib2R5QXJyYXlCdWZmZXIpIHtcbiAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShyZWFkQXJyYXlCdWZmZXJBc1RleHQodGhpcy5fYm9keUFycmF5QnVmZmVyKSlcbiAgICAgIH0gZWxzZSBpZiAodGhpcy5fYm9keUZvcm1EYXRhKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignY291bGQgbm90IHJlYWQgRm9ybURhdGEgYm9keSBhcyB0ZXh0JylcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUodGhpcy5fYm9keVRleHQpXG4gICAgICB9XG4gICAgfTtcblxuICAgIGlmIChzdXBwb3J0LmZvcm1EYXRhKSB7XG4gICAgICB0aGlzLmZvcm1EYXRhID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnRleHQoKS50aGVuKGRlY29kZSlcbiAgICAgIH07XG4gICAgfVxuXG4gICAgdGhpcy5qc29uID0gZnVuY3Rpb24oKSB7XG4gICAgICByZXR1cm4gdGhp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cblx0ICovXG5cdHNob3dNZXNzYWdlKCBlbCwgbWVzc2FnZSApIHtcblx0XHRlbC5pbm5lckhUTUwgPSBtZXNzYWdlO1xuXHRcdGVsLmNsYXNzTGlzdC5hZGQoICdhY3RpdmUnICk7XG5cblx0XHR0aGlzLm1zZ1RpbWVyID0gc2V0VGltZW91dCggKCkgPT4ge1xuXHRcdFx0dGhpcy5jbGVhck1lc3NhZ2VzKCk7XG5cdFx0fSwgNTAwMCApO1xuXHR9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNldHRpbmdzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==
 
 
languages/cyr2lat-ru_RU.mo CHANGED
Binary file
languages/cyr2lat-ru_RU.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
- "POT-Creation-Date: 2021-02-10 14:55+0200\n"
5
- "PO-Revision-Date: 2021-02-10 14:57+0200\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
@@ -17,96 +17,219 @@ msgstr ""
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: .git\n"
20
- "X-Poedit-SearchPathExcluded-1: .make\n"
21
- "X-Poedit-SearchPathExcluded-2: assets\n"
22
- "X-Poedit-SearchPathExcluded-3: css\n"
23
- "X-Poedit-SearchPathExcluded-4: dist\n"
24
- "X-Poedit-SearchPathExcluded-5: js\n"
25
- "X-Poedit-SearchPathExcluded-6: languages\n"
26
  "X-Poedit-SearchPathExcluded-7: node_modules\n"
27
- "X-Poedit-SearchPathExcluded-8: src\n"
28
  "X-Poedit-SearchPathExcluded-9: tests\n"
29
  "X-Poedit-SearchPathExcluded-10: vendor\n"
30
 
31
- #: classes/background-processes/class-post-conversion-process.php:73