Cyr-To-Lat - Version trunk

Version Description

Download this release

Release Info

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

Code changes from version 5.2.0 to trunk

assets/js/converter/app.js CHANGED
@@ -1,2 +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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nyb3NzLWZldGNoL2Rpc3QvYnJvd3Nlci1wb255ZmlsbC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvY29udmVydGVyL2FwcC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvY29udmVydGVyL2NvbnZlcnRlci5qcyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsImdsb2JhbCIsInNlbGYiLCJ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blx0XHRkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCB0aGlzLkNPTkZJUk1fQ0FOQ0VMX1NFTEVDVE9SICkub25jbGljayA9IChcblx0XHRcdGV2ZW50XG5cdFx0KSA9PiB7XG5cdFx0XHRldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblx0XHRcdHRoaXMuaGlkZUNvbmZpcm1Qb3B1cCgpO1xuXHRcdH07XG5cdH1cblxuXHQvKipcblx0ICogSGlkZSBjb25maXJtYXRpb24gcG9wdXAuXG5cdCAqL1xuXHRoaWRlQ29uZmlybVBvcHVwKCkge1xuXHRcdHRoaXMuY29uZmlybVBvcHVwLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG5cdH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29udmVydGVyO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2Nyb3NzLWZldGNoL2Rpc3QvYnJvd3Nlci1wb255ZmlsbC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvY29udmVydGVyL2FwcC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvanMvY29udmVydGVyL2NvbnZlcnRlci5qcyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlc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G5cblx0XHRkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCB0aGlzLkNPTkZJUk1fT0tfU0VMRUNUT1IgKS5vbmNsaWNrID0gKFxuXHRcdFx0ZXZlbnRcblx0XHQpID0+IHtcblx0XHRcdGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpO1xuXHRcdFx0dGhpcy5oaWRlQ29uZmlybVBvcHVwKCk7XG5cdFx0XHRkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCB0aGlzLkNPTlZFUlRfRk9STV9TRUxFQ1RPUiApLnN1Ym1pdCgpO1xuXHRcdH07XG5cblx0XHRkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCB0aGlzLkNPTkZJUk1fQ0FOQ0VMX1NFTEVDVE9SICkub25jbGljayA9IChcblx0XHRcdGV2ZW50XG5cdFx0KSA9PiB7XG5cdFx0XHRldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblx0XHRcdHRoaXMuaGlkZUNvbmZpcm1Qb3B1cCgpO1xuXHRcdH07XG5cdH1cblxuXHQvKipcblx0ICogSGlkZSBjb25maXJtYXRpb24gcG9wdXAuXG5cdCAqL1xuXHRoaWRlQ29uZmlybVBvcHVwKCkge1xuXHRcdHRoaXMuY29uZmlybVBvcHVwLnN0eWxlLmRpc3BsYXkgPSAnbm9uZSc7XG5cdH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29udmVydGVyO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==
assets/js/tables/app.js CHANGED
@@ -1,2 +1,2 @@
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAi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TUxEaXZFbGVtZW50fSBtZXNzYWdlIE1lc3NhZ2UuXG5cdCAqL1xuXHRjbGVhck1lc3NhZ2UoIG1lc3NhZ2UgKSB7XG5cdFx0bWVzc2FnZS5pbm5lckhUTUwgPSAnJztcblx0XHRtZXNzYWdlLmNsYXNzTGlzdC5yZW1vdmUoICdhY3RpdmUnICk7XG5cdH1cblxuXHQvKipcblx0ICogQ2xlYXIgbWVzc2FnZXMuXG5cdCAqL1xuXHRjbGVhck1lc3NhZ2VzKCkge1xuXHRcdHRoaXMuY2xlYXJNZXNzYWdlKCB0aGlzLnN1Y2Nlc3NNZXNzYWdlICk7XG5cdFx0dGhpcy5jbGVhck1lc3NhZ2UoIHRoaXMuZXJyb3JNZXNzYWdlICk7XG5cdFx0Y2xlYXJUaW1lb3V0KCB0aGlzLm1zZ1RpbWVyICk7XG5cdH1cblxuXHQvKipcblx0ICogU2hvdyBtZXNzYWdlLlxuXHQgKlxuXHQgKiBAcGFyYW0ge0hUTUxEaXZFbGVtZW50fSBlbCBFbGVtZW50LlxuXHQgKiBAcGFyYW0ge3N0cmluZ30gbWVzc2FnZSBNZXNzYWdlLlxuXHQgKi9cblx0c2hvd01lc3NhZ2UoIGVsLCBtZXNzYWdlICkge1xuXHRcdGVsLmlubmVySFRNTCA9IG1lc3NhZ2U7XG5cdFx0ZWwuY2xhc3NMaXN0LmFkZCggJ2FjdGl2ZScgKTtcblxuXHRcdHRoaXMubXNnVGltZXIgPSBzZXRUaW1lb3V0KCAoKSA9PiB7XG5cdFx0XHR0aGlzLmNsZWFyTWVzc2FnZXMoKTtcblx0XHR9LCA1MDAwICk7XG5cdH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgVGFibGVzO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==
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()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iIifQ==
auth.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "github-oauth": {
3
- "github.com": "ghs_Wz2uCvngOk1ZpX3dHUHfjLmTxdkhal1IDpnF"
4
- }
5
- }
 
 
 
 
 
cyr-to-lat.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: Cyr-To-Lat
11
  * Plugin URI: https://wordpress.org/plugins/cyr2lat/
12
  * Description: Convert Non-Latin 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.2.0
14
  * Requires at least: 5.1
15
  * Requires PHP: 5.6.20
16
  * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
@@ -19,6 +19,10 @@
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,7 +40,7 @@ if ( defined( 'CYR_TO_LAT_VERSION' ) ) {
36
  /**
37
  * Plugin version.
38
  */
39
- define( 'CYR_TO_LAT_VERSION', '5.2.0' );
40
 
41
  /**
42
  * Path to the plugin dir.
10
  * Plugin Name: Cyr-To-Lat
11
  * Plugin URI: https://wordpress.org/plugins/cyr2lat/
12
  * Description: Convert Non-Latin 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.3.0
14
  * Requires at least: 5.1
15
  * Requires PHP: 5.6.20
16
  * Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
19
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
20
  * Text Domain: cyr2lat
21
  * Domain Path: /languages/
22
+ *
23
+ *
24
+ * WC requires at least: 3.0
25
+ * WC tested up to: 6.5
26
  */
27
 
28
  namespace Cyr_To_Lat;
40
  /**
41
  * Plugin version.
42
  */
43
+ define( 'CYR_TO_LAT_VERSION', '5.3.0' );
44
 
45
  /**
46
  * Path to the plugin dir.
readme.txt CHANGED
@@ -2,9 +2,11 @@
2
  Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 5.1
5
- Tested up to: 5.8
6
- Stable tag: 5.2.0
7
  Requires PHP: 5.6.20
 
 
8
 
9
  Convert Non-Latin characters in post, page and term slugs to Latin characters.
10
 
@@ -25,6 +27,10 @@ Converts Cyrillic characters in post, page and term slugs to Latin characters. U
25
 
26
  Based on the original Rus-To-Lat plugin by Anton Skorobogatov.
27
 
 
 
 
 
28
  == Screenshots ==
29
 
30
  1. Tables settings page
@@ -188,6 +194,41 @@ Yes you can!
188
 
189
  == Changelog ==
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  = 5.2.0 (27.07.2021) =
192
  * Add support for categories and tags in other languages with wpml.
193
 
2
  Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 5.1
5
+ Tested up to: 6.0
6
+ Stable tag: 5.3.0
7
  Requires PHP: 5.6.20
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Convert Non-Latin characters in post, page and term slugs to Latin characters.
12
 
27
 
28
  Based on the original Rus-To-Lat plugin by Anton Skorobogatov.
29
 
30
+ Sponsored by [Blackfire](https://www.blackfire.io/).
31
+
32
+ <img src="https://ps.w.org/cyr2lat/assets/blackfire-io_secondary_horizontal_transparent-250x62.png" alt="Blackfire Logo" />
33
+
34
  == Screenshots ==
35
 
36
  1. Tables settings page
194
 
195
  == Changelog ==
196
 
197
+ = 5.3.0 (23.05.2022) =
198
+ * Tested with WordPress 6.0 and WooCommerce 6.5.
199
+
200
+ = 5.2.7 (14.02.2022) =
201
+ * Tested with WooCommerce 6.2.
202
+ * Added PHP 8.1 support.
203
+
204
+ = 5.2.6 (25.12.2021) =
205
+ * Revert fix made in 5.2.5 for 404 with WPML, as it created several issues on the frontend.
206
+ * Fix again 404 on archives created with WPML before activation of cyr2lat.
207
+
208
+ = 5.2.5 (19.12.2021) =
209
+ * Tested up to WordPress 5.9 and WooCommerce 6.0.
210
+ * Fix issue with Polylang - do not modify admin language when editing a post.
211
+ * Fix issue with JetPack - fatal error on synchronisation.
212
+ * Fix 404 on archives created with WPML before activation of cyr2lat.
213
+
214
+ = 5.2.4 (07.09.2021) =
215
+ * Fix issue with not showing WooCommerce variable product attributes.
216
+ * Fix issue with Elementor and WPML, endless loop.
217
+
218
+ = 5.2.3 (07.09.2021) =
219
+ * Fix issue with WP Foro plugin - transliterate topic slug when created on frontend.
220
+ * Fix bug with Polylang on REST request.
221
+
222
+ = 5.2.2 (06.09.2021) =
223
+ * Fix issue caused by the bug in Jetpack sync.
224
+ * Optimize code related to WPML locale filtering.
225
+ * Fix endless loading of a taxonomy page with WPML.
226
+ * Fix 'nothing found' on a taxonomy page with WPML.
227
+
228
+ = 5.2.1 (29.07.2021) =
229
+ * Determine WPML language only once to improve performance.
230
+ * Avoid notice on bad SQL request when taxonomies are empty.
231
+
232
  = 5.2.0 (27.07.2021) =
233
  * Add support for categories and tags in other languages with wpml.
234
 
src/php/Settings/Abstracts/SettingsBase.php CHANGED
@@ -395,6 +395,15 @@ abstract class SettingsBase {
395
  * Setup tabs section.
396
  */
397
  public function setup_tabs_section() {
 
 
 
 
 
 
 
 
 
398
  $tab = $this->get_active_tab();
399
 
400
  add_settings_section(
@@ -447,7 +456,7 @@ abstract class SettingsBase {
447
  * @return bool
448
  */
449
  protected function is_tab_active( $tab ) {
450
- $current_tab_name = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_STRING );
451
 
452
  if ( null === $current_tab_name && ! $tab->is_tab() ) {
453
  return true;
@@ -959,6 +968,10 @@ abstract class SettingsBase {
959
  * @return bool
960
  */
961
  protected function is_options_screen() {
 
 
 
 
962
  $current_screen = get_current_screen();
963
 
964
  $screen_id = $this->screen_id();
395
  * Setup tabs section.
396
  */
397
  public function setup_tabs_section() {
398
+ /**
399
+ * Protection from the bug in \Automattic\Jetpack\Sync\Sender::get_items_to_send(),
400
+ * which sets screen without loading of wp-admin/includes/template.php,
401
+ * where add_settings_section() is defined.
402
+ */
403
+ if ( ! function_exists( 'add_settings_section' ) ) {
404
+ return;
405
+ }
406
+
407
  $tab = $this->get_active_tab();
408
 
409
  add_settings_section(
456
  * @return bool
457
  */
458
  protected function is_tab_active( $tab ) {
459
+ $current_tab_name = filter_input( INPUT_GET, 'tab', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
460
 
461
  if ( null === $current_tab_name && ! $tab->is_tab() ) {
462
  return true;
968
  * @return bool
969
  */
970
  protected function is_options_screen() {
971
+ if ( ! function_exists( 'get_current_screen' ) ) {
972
+ return false;
973
+ }
974
+
975
  $current_screen = get_current_screen();
976
 
977
  $screen_id = $this->screen_id();
src/php/Settings/Tables.php CHANGED
@@ -264,6 +264,10 @@ class Tables extends PluginSettingsBase {
264
  * Setup settings sections.
265
  */
266
  public function setup_sections() {
 
 
 
 
267
  foreach ( $this->form_fields as $form_field ) {
268
  add_settings_section(
269
  $form_field['section'],
264
  * Setup settings sections.
265
  */
266
  public function setup_sections() {
267
+ if ( ! $this->is_options_screen() ) {
268
+ return;
269
+ }
270
+
271
  foreach ( $this->form_fields as $form_field ) {
272
  add_settings_section(
273
  $form_field['section'],
src/php/class-main.php CHANGED
@@ -24,6 +24,13 @@ use Cyr_To_Lat\Symfony\Polyfill\Mbstring\Mbstring;
24
  */
25
  class Main {
26
 
 
 
 
 
 
 
 
27
  /**
28
  * Plugin settings.
29
  *
@@ -92,12 +99,34 @@ class Main {
92
  *
93
  * @var string
94
  */
95
- private $pll_locale = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  /**
98
  * Main constructor.
99
  */
100
  public function __construct() {
 
101
  $this->settings = new Settings();
102
  $this->admin_notices = new Admin_Notices();
103
  $requirements = new Requirements( $this->settings, $this->admin_notices );
@@ -116,11 +145,12 @@ class Main {
116
  $this->admin_notices
117
  );
118
 
119
- if ( defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ) {
120
  $this->cli = new WP_CLI( $this->converter );
121
  }
122
 
123
- $this->acf = new ACF( $this->settings );
 
124
  }
125
 
126
  /**
@@ -129,7 +159,7 @@ class Main {
129
  * @noinspection PhpUndefinedClassInspection
130
  */
131
  public function init() {
132
- if ( defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ) {
133
  try {
134
  /**
135
  * Method WP_CLI::add_command() accepts class as callable.
@@ -153,16 +183,23 @@ class Main {
153
  add_filter( 'sanitize_file_name', [ $this, 'sanitize_filename' ], 10, 2 );
154
  add_filter( 'wp_insert_post_data', [ $this, 'sanitize_post_name' ], 10, 2 );
155
  add_filter( 'pre_insert_term', [ $this, 'pre_insert_term_filter' ], PHP_INT_MAX, 2 );
156
- add_filter( 'get_terms_args', [ $this, 'get_terms_args_filter' ], PHP_INT_MAX, 2 );
 
 
 
157
 
158
  if ( class_exists( Polylang::class ) ) {
159
  add_filter( 'locale', [ $this, 'pll_locale_filter' ] );
160
  }
161
 
162
  if ( class_exists( SitePress::class ) ) {
 
 
163
  // We cannot use locale filter here
164
  // as WPML reverts locale at PHP_INT_MAX in \WPML\ST\MO\Hooks\LanguageSwitch::filterLocale.
165
  add_filter( 'ctl_locale', [ $this, 'wpml_locale_filter' ], - PHP_INT_MAX );
 
 
166
  }
167
  }
168
 
@@ -195,32 +232,37 @@ class Main {
195
  return $pre;
196
  }
197
 
198
- $term = '';
199
  if ( $this->is_term ) {
200
- $sql = $wpdb->prepare(
 
 
 
 
 
 
 
 
201
  "SELECT slug FROM $wpdb->terms t LEFT JOIN $wpdb->term_taxonomy tt
202
  ON t.term_id = tt.term_id
203
  WHERE t.name = %s",
204
  $title
205
  );
206
- $sql .= ' AND tt.taxonomy IN (' . $this->prepare_in( $this->taxonomies ) . ')';
 
 
 
207
 
208
  // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
209
  // phpcs:ignore WordPress.DB.DirectDatabaseQuery
210
  $term = $wpdb->get_var( $sql );
211
  // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
212
 
213
- // Make sure we search in the db only once being called from wp_insert_term().
214
- $this->is_term = false;
215
- }
216
-
217
- if ( ! empty( $term ) ) {
218
- $title = $term;
219
- } else {
220
- $title = $this->is_wc_attribute_taxonomy( $title ) ? $title : $this->transliterate( $title );
221
  }
222
 
223
- return $title;
224
  }
225
 
226
  /**
@@ -272,14 +314,14 @@ class Main {
272
  }
273
 
274
  /**
275
- * Fix string encoding on MacOS.
276
  *
277
  * @param string $string String.
 
278
  *
279
  * @return string
280
  */
281
- private function fix_mac_string( $string ) {
282
- $table = $this->get_filtered_table();
283
  $fix_table = Conversion_Tables::get_fix_table_for_mac();
284
 
285
  $fix = [];
@@ -319,15 +361,6 @@ class Main {
319
  return $string;
320
  }
321
 
322
- /**
323
- * Get transliteration table.
324
- *
325
- * @return array
326
- */
327
- private function get_filtered_table() {
328
- return (array) apply_filters( 'ctl_table', $this->settings->get_table() );
329
- }
330
-
331
  /**
332
  * Transliterate string using a table.
333
  *
@@ -336,9 +369,9 @@ class Main {
336
  * @return string
337
  */
338
  public function transliterate( $string ) {
339
- $table = $this->get_filtered_table();
340
 
341
- $string = $this->fix_mac_string( $string );
342
  $string = $this->split_chinese_string( $string, $table );
343
 
344
  return strtr( $string, $table );
@@ -434,8 +467,8 @@ class Main {
434
  public function pre_insert_term_filter( $term, $taxonomy ) {
435
  if (
436
  0 === $term ||
437
- '' === trim( $term ) ||
438
- is_wp_error( $term )
439
  ) {
440
  return $term;
441
  }
@@ -475,6 +508,7 @@ class Main {
475
  if ( false === $rest_locale ) {
476
  return $locale;
477
  }
 
478
  if ( $rest_locale ) {
479
  $this->pll_locale = $rest_locale;
480
 
@@ -485,6 +519,10 @@ class Main {
485
  return $locale;
486
  }
487
 
 
 
 
 
488
  $pll_get_post_language = $this->pll_locale_filter_with_classic_editor();
489
  if ( $pll_get_post_language ) {
490
  $this->pll_locale = $pll_get_post_language;
@@ -537,19 +575,19 @@ class Main {
537
  // phpcs:disable WordPress.Security.NonceVerification.Recommended
538
  if ( isset( $_POST['post_ID'] ) ) {
539
  $pll_get_post_language = pll_get_post_language(
540
- (int) filter_input( INPUT_POST, 'post_ID', FILTER_SANITIZE_STRING ),
541
  'locale'
542
  );
543
  }
544
  if ( isset( $_POST['pll_post_id'] ) ) {
545
  $pll_get_post_language = pll_get_post_language(
546
- (int) filter_input( INPUT_POST, 'pll_post_id', FILTER_SANITIZE_STRING ),
547
  'locale'
548
  );
549
  }
550
  if ( isset( $_GET['post'] ) ) {
551
  $pll_get_post_language = pll_get_post_language(
552
- (int) filter_input( INPUT_GET, 'post', FILTER_SANITIZE_STRING ),
553
  'locale'
554
  );
555
  }
@@ -574,7 +612,7 @@ class Main {
574
  // phpcs:disable WordPress.Security.NonceVerification.Missing
575
  if ( isset( $_POST['term_lang_choice'] ) ) {
576
  $pll_get_language = PLL()->model->get_language(
577
- filter_input( INPUT_POST, 'term_lang_choice', FILTER_SANITIZE_STRING )
578
  );
579
 
580
  if ( $pll_get_language ) {
@@ -595,16 +633,47 @@ class Main {
595
  * @return string
596
  */
597
  public function wpml_locale_filter( $locale ) {
598
- $language_code = wpml_get_current_language();
599
- $languages = apply_filters( 'wpml_active_languages', null );
600
-
601
- if ( isset( $languages[ $language_code ] ) ) {
602
- return $languages[ $language_code ]['default_locale'];
603
  }
604
 
605
  return $locale;
606
  }
607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
  /**
609
  * Changes array of items into string of items, separated by comma and sql-escaped
610
  *
24
  */
25
  class Main {
26
 
27
+ /**
28
+ * Request type.
29
+ *
30
+ * @var Request
31
+ */
32
+ protected $request;
33
+
34
  /**
35
  * Plugin settings.
36
  *
99
  *
100
  * @var string
101
  */
102
+ private $pll_locale;
103
+
104
+ /**
105
+ * WPML locale.
106
+ *
107
+ * @var string
108
+ */
109
+ protected $wpml_locale;
110
+
111
+ /**
112
+ * WPML languages.
113
+ *
114
+ * @var array
115
+ */
116
+ protected $wpml_languages;
117
+
118
+ /**
119
+ * Current request is frontend.
120
+ *
121
+ * @var bool|null
122
+ */
123
+ protected $is_frontend;
124
 
125
  /**
126
  * Main constructor.
127
  */
128
  public function __construct() {
129
+ $this->request = new Request();
130
  $this->settings = new Settings();
131
  $this->admin_notices = new Admin_Notices();
132
  $requirements = new Requirements( $this->settings, $this->admin_notices );
145
  $this->admin_notices
146
  );
147
 
148
+ if ( $this->request->is_cli() ) {
149
  $this->cli = new WP_CLI( $this->converter );
150
  }
151
 
152
+ $this->acf = new ACF( $this->settings );
153
+ $this->is_frontend = $this->request->is_frontend();
154
  }
155
 
156
  /**
159
  * @noinspection PhpUndefinedClassInspection
160
  */
161
  public function init() {
162
+ if ( $this->request->is_cli() ) {
163
  try {
164
  /**
165
  * Method WP_CLI::add_command() accepts class as callable.
183
  add_filter( 'sanitize_file_name', [ $this, 'sanitize_filename' ], 10, 2 );
184
  add_filter( 'wp_insert_post_data', [ $this, 'sanitize_post_name' ], 10, 2 );
185
  add_filter( 'pre_insert_term', [ $this, 'pre_insert_term_filter' ], PHP_INT_MAX, 2 );
186
+
187
+ if ( ! $this->is_frontend || class_exists( SitePress::class ) ) {
188
+ add_filter( 'get_terms_args', [ $this, 'get_terms_args_filter' ], PHP_INT_MAX, 2 );
189
+ }
190
 
191
  if ( class_exists( Polylang::class ) ) {
192
  add_filter( 'locale', [ $this, 'pll_locale_filter' ] );
193
  }
194
 
195
  if ( class_exists( SitePress::class ) ) {
196
+ $this->wpml_locale = $this->get_wpml_locale();
197
+
198
  // We cannot use locale filter here
199
  // as WPML reverts locale at PHP_INT_MAX in \WPML\ST\MO\Hooks\LanguageSwitch::filterLocale.
200
  add_filter( 'ctl_locale', [ $this, 'wpml_locale_filter' ], - PHP_INT_MAX );
201
+
202
+ add_action( 'wpml_language_has_switched', [ $this, 'wpml_language_has_switched' ], 10, 3 );
203
  }
204
  }
205
 
232
  return $pre;
233
  }
234
 
 
235
  if ( $this->is_term ) {
236
+ // Make sure we search in the db only once being called from wp_insert_term().
237
+ $this->is_term = false;
238
+
239
+ // Fix case when showing previously created categories in cyrillic with WPML.
240
+ if ( $this->is_frontend && class_exists( SitePress::class ) ) {
241
+ return $title;
242
+ }
243
+
244
+ $sql = $wpdb->prepare(
245
  "SELECT slug FROM $wpdb->terms t LEFT JOIN $wpdb->term_taxonomy tt
246
  ON t.term_id = tt.term_id
247
  WHERE t.name = %s",
248
  $title
249
  );
250
+
251
+ if ( $this->taxonomies ) {
252
+ $sql .= ' AND tt.taxonomy IN (' . $this->prepare_in( $this->taxonomies ) . ')';
253
+ }
254
 
255
  // phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
256
  // phpcs:ignore WordPress.DB.DirectDatabaseQuery
257
  $term = $wpdb->get_var( $sql );
258
  // phpcs:enable WordPress.DB.PreparedSQL.NotPrepared
259
 
260
+ if ( ! empty( $term ) ) {
261
+ return $term;
262
+ }
 
 
 
 
 
263
  }
264
 
265
+ return $this->is_wc_attribute_taxonomy( $title ) ? $title : $this->transliterate( $title );
266
  }
267
 
268
  /**
314
  }
315
 
316
  /**
317
+ * Fix string encoding on macOS.
318
  *
319
  * @param string $string String.
320
+ * @param array $table Conversion table.
321
  *
322
  * @return string
323
  */
324
+ private function fix_mac_string( $string, $table ) {
 
325
  $fix_table = Conversion_Tables::get_fix_table_for_mac();
326
 
327
  $fix = [];
361
  return $string;
362
  }
363
 
 
 
 
 
 
 
 
 
 
364
  /**
365
  * Transliterate string using a table.
366
  *
369
  * @return string
370
  */
371
  public function transliterate( $string ) {
372
+ $table = (array) apply_filters( 'ctl_table', $this->settings->get_table() );
373
 
374
+ $string = $this->fix_mac_string( $string, $table );
375
  $string = $this->split_chinese_string( $string, $table );
376
 
377
  return strtr( $string, $table );
467
  public function pre_insert_term_filter( $term, $taxonomy ) {
468
  if (
469
  0 === $term ||
470
+ is_wp_error( $term ) ||
471
+ '' === trim( $term )
472
  ) {
473
  return $term;
474
  }
508
  if ( false === $rest_locale ) {
509
  return $locale;
510
  }
511
+
512
  if ( $rest_locale ) {
513
  $this->pll_locale = $rest_locale;
514
 
519
  return $locale;
520
  }
521
 
522
+ if ( ! $this->request->is_post() ) {
523
+ return $locale;
524
+ }
525
+
526
  $pll_get_post_language = $this->pll_locale_filter_with_classic_editor();
527
  if ( $pll_get_post_language ) {
528
  $this->pll_locale = $pll_get_post_language;
575
  // phpcs:disable WordPress.Security.NonceVerification.Recommended
576
  if ( isset( $_POST['post_ID'] ) ) {
577
  $pll_get_post_language = pll_get_post_language(
578
+ (int) filter_input( INPUT_POST, 'post_ID', FILTER_SANITIZE_FULL_SPECIAL_CHARS ),
579
  'locale'
580
  );
581
  }
582
  if ( isset( $_POST['pll_post_id'] ) ) {
583
  $pll_get_post_language = pll_get_post_language(
584
+ (int) filter_input( INPUT_POST, 'pll_post_id', FILTER_SANITIZE_FULL_SPECIAL_CHARS ),
585
  'locale'
586
  );
587
  }
588
  if ( isset( $_GET['post'] ) ) {
589
  $pll_get_post_language = pll_get_post_language(
590
+ (int) filter_input( INPUT_GET, 'post', FILTER_SANITIZE_FULL_SPECIAL_CHARS ),
591
  'locale'
592
  );
593
  }
612
  // phpcs:disable WordPress.Security.NonceVerification.Missing
613
  if ( isset( $_POST['term_lang_choice'] ) ) {
614
  $pll_get_language = PLL()->model->get_language(
615
+ filter_input( INPUT_POST, 'term_lang_choice', FILTER_SANITIZE_FULL_SPECIAL_CHARS )
616
  );
617
 
618
  if ( $pll_get_language ) {
633
  * @return string
634
  */
635
  public function wpml_locale_filter( $locale ) {
636
+ if ( $this->wpml_locale ) {
637
+ return $this->wpml_locale;
 
 
 
638
  }
639
 
640
  return $locale;
641
  }
642
 
643
+ /**
644
+ * Get wpml locale.
645
+ *
646
+ * @return string|null
647
+ */
648
+ protected function get_wpml_locale() {
649
+ $language_code = wpml_get_current_language();
650
+ $this->wpml_languages = (array) apply_filters( 'wpml_active_languages', [] );
651
+
652
+ return (
653
+ isset( $this->wpml_languages[ $language_code ] ) ?
654
+ $this->wpml_languages[ $language_code ]['default_locale'] :
655
+ null
656
+ );
657
+ }
658
+
659
+ /**
660
+ * Save switched locale.
661
+ *
662
+ * @param null|string $language_code Language code to switch into.
663
+ * @param bool|string $cookie_lang Optionally also switch the cookie language to the value given.
664
+ * @param string $original_language Original language.
665
+ *
666
+ * @noinspection PhpUnusedParameterInspection
667
+ */
668
+ public function wpml_language_has_switched( $language_code, $cookie_lang, $original_language ) {
669
+ $language_code = (string) $language_code;
670
+
671
+ $this->wpml_locale =
672
+ isset( $this->wpml_languages[ $language_code ] ) ?
673
+ $this->wpml_languages[ $language_code ]['default_locale'] :
674
+ null;
675
+ }
676
+
677
  /**
678
  * Changes array of items into string of items, separated by comma and sql-escaped
679
  *
src/php/class-request.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Determine request type.
4
+ *
5
+ * @package cyr-to-lat
6
+ */
7
+
8
+ namespace Cyr_To_Lat;
9
+
10
+ use WP_Rewrite;
11
+
12
+ /**
13
+ * Class Request
14
+ */
15
+ class Request {
16
+
17
+ /**
18
+ * Is frontend.
19
+ *
20
+ * @return bool
21
+ */
22
+ public function is_frontend() {
23
+ return ! ( wp_doing_ajax() || is_admin() || $this->is_cli() || $this->is_rest() );
24
+ }
25
+
26
+ /**
27
+ * Check if it is a CLI request
28
+ *
29
+ * @return bool
30
+ */
31
+ public function is_cli() {
32
+ return defined( 'WP_CLI' ) && constant( 'WP_CLI' );
33
+ }
34
+
35
+ /**
36
+ * Checks if the current request is a WP REST API request.
37
+ *
38
+ * Case #1: After WP_REST_Request initialisation
39
+ * Case #2: Support "plain" permalink settings
40
+ * Case #3: It can happen that WP_Rewrite is not yet initialized,
41
+ * so do this (wp-settings.php)
42
+ * Case #4: URL Path begins with wp-json/ (your REST prefix)
43
+ * Also supports WP installations in subfolders
44
+ *
45
+ * @return bool
46
+ * @author matzeeable
47
+ */
48
+ public function is_rest() {
49
+ if ( ! isset( $_SERVER['REQUEST_URI'] ) ) {
50
+ return false;
51
+ }
52
+
53
+ // Case #1.
54
+ if ( defined( 'REST_REQUEST' ) && constant( 'REST_REQUEST' ) ) {
55
+ return true;
56
+ }
57
+
58
+ // Case #2.
59
+ if ( filter_input( INPUT_GET, 'rest_route', FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) {
60
+ return true;
61
+ }
62
+
63
+ // Case #3.
64
+ global $wp_rewrite;
65
+
66
+ if ( null === $wp_rewrite ) {
67
+ // @codeCoverageIgnoreStart
68
+ // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
69
+ $wp_rewrite = new WP_Rewrite();
70
+ // @codeCoverageIgnoreEnd
71
+ }
72
+
73
+ // Case #4.
74
+ return (bool) $this->get_rest_route();
75
+ }
76
+
77
+ /**
78
+ * Get REST route.
79
+ * Returns route if it is a REST request, otherwise empty string.
80
+ *
81
+ * @return string
82
+ */
83
+ protected function get_rest_route() {
84
+ $current_path = wp_parse_url( add_query_arg( [] ), PHP_URL_PATH );
85
+ $rest_path = wp_parse_url( trailingslashit( rest_url() ), PHP_URL_PATH );
86
+
87
+ $is_rest = 0 === strpos( $current_path, $rest_path );
88
+
89
+ return $is_rest ? substr( $current_path, strlen( $rest_path ) ) : '';
90
+ }
91
+
92
+ /**
93
+ * If current request is POST.
94
+ *
95
+ * @return bool
96
+ */
97
+ public function is_post() {
98
+ $request_method = filter_var(
99
+ isset( $_SERVER['REQUEST_METHOD'] ) ? wp_unslash( $_SERVER['REQUEST_METHOD'] ) : '',
100
+ FILTER_SANITIZE_FULL_SPECIAL_CHARS
101
+ );
102
+
103
+ return 'POST' === $request_method;
104
+ }
105
+ }
vendor/autoload.php CHANGED
@@ -2,6 +2,11 @@
2
 
3
  // autoload.php @generated by Composer
4
 
 
 
 
 
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitb6b80d8d25d79e642dcd5e27493a9b6e::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ if (PHP_VERSION_ID < 50600) {
6
+ echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
+ exit(1);
8
+ }
9
+
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit0714ade671e040cd271d9ffc07e5f3a4::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -42,30 +42,75 @@ namespace Composer\Autoload;
42
  */
43
  class ClassLoader
44
  {
 
45
  private $vendorDir;
46
 
47
  // PSR-4
 
 
 
 
48
  private $prefixLengthsPsr4 = array();
 
 
 
 
49
  private $prefixDirsPsr4 = array();
 
 
 
 
50
  private $fallbackDirsPsr4 = array();
51
 
52
  // PSR-0
 
 
 
 
53
  private $prefixesPsr0 = array();
 
 
 
 
54
  private $fallbackDirsPsr0 = array();
55
 
 
56
  private $useIncludePath = false;
 
 
 
 
 
57
  private $classMap = array();
 
 
58
  private $classMapAuthoritative = false;
 
 
 
 
 
59
  private $missingClasses = array();
 
 
60
  private $apcuPrefix;
61
 
 
 
 
62
  private static $registeredLoaders = array();
63
 
 
 
 
64
  public function __construct($vendorDir = null)
65
  {
66
  $this->vendorDir = $vendorDir;
67
  }
68
 
 
 
 
69
  public function getPrefixes()
70
  {
71
  if (!empty($this->prefixesPsr0)) {
@@ -75,28 +120,47 @@ class ClassLoader
75
  return array();
76
  }
77
 
 
 
 
 
78
  public function getPrefixesPsr4()
79
  {
80
  return $this->prefixDirsPsr4;
81
  }
82
 
 
 
 
 
83
  public function getFallbackDirs()
84
  {
85
  return $this->fallbackDirsPsr0;
86
  }
87
 
 
 
 
 
88
  public function getFallbackDirsPsr4()
89
  {
90
  return $this->fallbackDirsPsr4;
91
  }
92
 
 
 
 
 
93
  public function getClassMap()
94
  {
95
  return $this->classMap;
96
  }
97
 
98
  /**
99
- * @param array $classMap Class to filename map
 
 
 
100
  */
101
  public function addClassMap(array $classMap)
102
  {
@@ -111,9 +175,11 @@ class ClassLoader
111
  * Registers a set of PSR-0 directories for a given prefix, either
112
  * appending or prepending to the ones previously set for this prefix.
113
  *
114
- * @param string $prefix The prefix
115
- * @param array|string $paths The PSR-0 root directories
116
- * @param bool $prepend Whether to prepend the directories
 
 
117
  */
118
  public function add($prefix, $paths, $prepend = false)
119
  {
@@ -156,11 +222,13 @@ class ClassLoader
156
  * Registers a set of PSR-4 directories for a given namespace, either
157
  * appending or prepending to the ones previously set for this namespace.
158
  *
159
- * @param string $prefix The prefix/namespace, with trailing '\\'
160
- * @param array|string $paths The PSR-4 base directories
161
- * @param bool $prepend Whether to prepend the directories
162
  *
163
  * @throws \InvalidArgumentException
 
 
164
  */
165
  public function addPsr4($prefix, $paths, $prepend = false)
166
  {
@@ -204,8 +272,10 @@ class ClassLoader
204
  * Registers a set of PSR-0 directories for a given prefix,
205
  * replacing any others previously set for this prefix.
206
  *
207
- * @param string $prefix The prefix
208
- * @param array|string $paths The PSR-0 base directories
 
 
209
  */
210
  public function set($prefix, $paths)
211
  {
@@ -220,10 +290,12 @@ class ClassLoader
220
  * Registers a set of PSR-4 directories for a given namespace,
221
  * replacing any others previously set for this namespace.
222
  *
223
- * @param string $prefix The prefix/namespace, with trailing '\\'
224
- * @param array|string $paths The PSR-4 base directories
225
  *
226
  * @throws \InvalidArgumentException
 
 
227
  */
228
  public function setPsr4($prefix, $paths)
229
  {
@@ -243,6 +315,8 @@ class ClassLoader
243
  * Turns on searching the include path for class files.
244
  *
245
  * @param bool $useIncludePath
 
 
246
  */
247
  public function setUseIncludePath($useIncludePath)
248
  {
@@ -265,6 +339,8 @@ class ClassLoader
265
  * that have not been registered with the class map.
266
  *
267
  * @param bool $classMapAuthoritative
 
 
268
  */
269
  public function setClassMapAuthoritative($classMapAuthoritative)
270
  {
@@ -285,6 +361,8 @@ class ClassLoader
285
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
286
  *
287
  * @param string|null $apcuPrefix
 
 
288
  */
289
  public function setApcuPrefix($apcuPrefix)
290
  {
@@ -305,6 +383,8 @@ class ClassLoader
305
  * Registers this instance as an autoloader.
306
  *
307
  * @param bool $prepend Whether to prepend the autoloader or not
 
 
308
  */
309
  public function register($prepend = false)
310
  {
@@ -324,6 +404,8 @@ class ClassLoader
324
 
325
  /**
326
  * Unregisters this instance as an autoloader.
 
 
327
  */
328
  public function unregister()
329
  {
@@ -403,6 +485,11 @@ class ClassLoader
403
  return self::$registeredLoaders;
404
  }
405
 
 
 
 
 
 
406
  private function findFileWithExtension($class, $ext)
407
  {
408
  // PSR-4 lookup
@@ -474,6 +561,10 @@ class ClassLoader
474
  * Scope isolated include.
475
  *
476
  * Prevents access to $this/self from included files.
 
 
 
 
477
  */
478
  function includeFile($file)
479
  {
42
  */
43
  class ClassLoader
44
  {
45
+ /** @var ?string */
46
  private $vendorDir;
47
 
48
  // PSR-4
49
+ /**
50
+ * @var array[]
51
+ * @psalm-var array<string, array<string, int>>
52
+ */
53
  private $prefixLengthsPsr4 = array();
54
+ /**
55
+ * @var array[]
56
+ * @psalm-var array<string, array<int, string>>
57
+ */
58
  private $prefixDirsPsr4 = array();
59
+ /**
60
+ * @var array[]
61
+ * @psalm-var array<string, string>
62
+ */
63
  private $fallbackDirsPsr4 = array();
64
 
65
  // PSR-0
66
+ /**
67
+ * @var array[]
68
+ * @psalm-var array<string, array<string, string[]>>
69
+ */
70
  private $prefixesPsr0 = array();
71
+ /**
72
+ * @var array[]
73
+ * @psalm-var array<string, string>
74
+ */
75
  private $fallbackDirsPsr0 = array();
76
 
77
+ /** @var bool */
78
  private $useIncludePath = false;
79
+
80
+ /**
81
+ * @var string[]
82
+ * @psalm-var array<string, string>
83
+ */
84
  private $classMap = array();
85
+
86
+ /** @var bool */
87
  private $classMapAuthoritative = false;
88
+
89
+ /**
90
+ * @var bool[]
91
+ * @psalm-var array<string, bool>
92
+ */
93
  private $missingClasses = array();
94
+
95
+ /** @var ?string */
96
  private $apcuPrefix;
97
 
98
+ /**
99
+ * @var self[]
100
+ */
101
  private static $registeredLoaders = array();
102
 
103
+ /**
104
+ * @param ?string $vendorDir
105
+ */
106
  public function __construct($vendorDir = null)
107
  {
108
  $this->vendorDir = $vendorDir;
109
  }
110
 
111
+ /**
112
+ * @return string[]
113
+ */
114
  public function getPrefixes()
115
  {
116
  if (!empty($this->prefixesPsr0)) {
120
  return array();
121
  }
122
 
123
+ /**
124
+ * @return array[]
125
+ * @psalm-return array<string, array<int, string>>
126
+ */
127
  public function getPrefixesPsr4()
128
  {
129
  return $this->prefixDirsPsr4;
130
  }
131
 
132
+ /**
133
+ * @return array[]
134
+ * @psalm-return array<string, string>
135
+ */
136
  public function getFallbackDirs()
137
  {
138
  return $this->fallbackDirsPsr0;
139
  }
140
 
141
+ /**
142
+ * @return array[]
143
+ * @psalm-return array<string, string>
144
+ */
145
  public function getFallbackDirsPsr4()
146
  {
147
  return $this->fallbackDirsPsr4;
148
  }
149
 
150
+ /**
151
+ * @return string[] Array of classname => path
152
+ * @psalm-return array<string, string>
153
+ */
154
  public function getClassMap()
155
  {
156
  return $this->classMap;
157
  }
158
 
159
  /**
160
+ * @param string[] $classMap Class to filename map
161
+ * @psalm-param array<string, string> $classMap
162
+ *
163
+ * @return void
164
  */
165
  public function addClassMap(array $classMap)
166
  {
175
  * Registers a set of PSR-0 directories for a given prefix, either
176
  * appending or prepending to the ones previously set for this prefix.
177
  *
178
+ * @param string $prefix The prefix
179
+ * @param string[]|string $paths The PSR-0 root directories
180
+ * @param bool $prepend Whether to prepend the directories
181
+ *
182
+ * @return void
183
  */
184
  public function add($prefix, $paths, $prepend = false)
185
  {
222
  * Registers a set of PSR-4 directories for a given namespace, either
223
  * appending or prepending to the ones previously set for this namespace.
224
  *
225
+ * @param string $prefix The prefix/namespace, with trailing '\\'
226
+ * @param string[]|string $paths The PSR-4 base directories
227
+ * @param bool $prepend Whether to prepend the directories
228
  *
229
  * @throws \InvalidArgumentException
230
+ *
231
+ * @return void
232
  */
233
  public function addPsr4($prefix, $paths, $prepend = false)
234
  {
272
  * Registers a set of PSR-0 directories for a given prefix,
273
  * replacing any others previously set for this prefix.
274
  *
275
+ * @param string $prefix The prefix
276
+ * @param string[]|string $paths The PSR-0 base directories
277
+ *
278
+ * @return void
279
  */
280
  public function set($prefix, $paths)
281
  {
290
  * Registers a set of PSR-4 directories for a given namespace,
291
  * replacing any others previously set for this namespace.
292
  *
293
+ * @param string $prefix The prefix/namespace, with trailing '\\'
294
+ * @param string[]|string $paths The PSR-4 base directories
295
  *
296
  * @throws \InvalidArgumentException
297
+ *
298
+ * @return void
299
  */
300
  public function setPsr4($prefix, $paths)
301
  {
315
  * Turns on searching the include path for class files.
316
  *
317
  * @param bool $useIncludePath
318
+ *
319
+ * @return void
320
  */
321
  public function setUseIncludePath($useIncludePath)
322
  {
339
  * that have not been registered with the class map.
340
  *
341
  * @param bool $classMapAuthoritative
342
+ *
343
+ * @return void
344
  */
345
  public function setClassMapAuthoritative($classMapAuthoritative)
346
  {
361
  * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
362
  *
363
  * @param string|null $apcuPrefix
364
+ *
365
+ * @return void
366
  */
367
  public function setApcuPrefix($apcuPrefix)
368
  {
383
  * Registers this instance as an autoloader.
384
  *
385
  * @param bool $prepend Whether to prepend the autoloader or not
386
+ *
387
+ * @return void
388
  */
389
  public function register($prepend = false)
390
  {
404
 
405
  /**
406
  * Unregisters this instance as an autoloader.
407
+ *
408
+ * @return void
409
  */
410
  public function unregister()
411
  {
485
  return self::$registeredLoaders;
486
  }
487
 
488
+ /**
489
+ * @param string $class
490
+ * @param string $ext
491
+ * @return string|false
492
+ */
493
  private function findFileWithExtension($class, $ext)
494
  {
495
  // PSR-4 lookup
561
  * Scope isolated include.
562
  *
563
  * Prevents access to $this/self from included files.
564
+ *
565
+ * @param string $file
566
+ * @return void
567
+ * @private
568
  */
569
  function includeFile($file)
570
  {
vendor/composer/InstalledVersions.php CHANGED
@@ -20,12 +20,27 @@ use Composer\Semver\VersionParser;
20
  *
21
  * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
  *
23
- * To require it's presence, you can require `composer-runtime-api ^2.0`
 
 
24
  */
25
  class InstalledVersions
26
  {
 
 
 
 
27
  private static $installed;
 
 
 
 
28
  private static $canGetVendors;
 
 
 
 
 
29
  private static $installedByVendor = array();
30
 
31
  /**
@@ -228,7 +243,7 @@ class InstalledVersions
228
 
229
  /**
230
  * @return array
231
- * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
232
  */
233
  public static function getRootPackage()
234
  {
@@ -242,7 +257,7 @@ class InstalledVersions
242
  *
243
  * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
244
  * @return array[]
245
- * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
246
  */
247
  public static function getRawData()
248
  {
@@ -265,7 +280,7 @@ class InstalledVersions
265
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
266
  *
267
  * @return array[]
268
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
269
  */
270
  public static function getAllRawData()
271
  {
@@ -288,7 +303,7 @@ class InstalledVersions
288
  * @param array[] $data A vendor/composer/installed.php data set
289
  * @return void
290
  *
291
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
292
  */
293
  public static function reload($data)
294
  {
@@ -298,7 +313,7 @@ class InstalledVersions
298
 
299
  /**
300
  * @return array[]
301
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
302
  */
303
  private static function getInstalled()
304
  {
20
  *
21
  * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
  *
23
+ * To require its presence, you can require `composer-runtime-api ^2.0`
24
+ *
25
+ * @final
26
  */
27
  class InstalledVersions
28
  {
29
+ /**
30
+ * @var mixed[]|null
31
+ * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
32
+ */
33
  private static $installed;
34
+
35
+ /**
36
+ * @var bool|null
37
+ */
38
  private static $canGetVendors;
39
+
40
+ /**
41
+ * @var array[]
42
+ * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
43
+ */
44
  private static $installedByVendor = array();
45
 
46
  /**
243
 
244
  /**
245
  * @return array
246
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
247
  */
248
  public static function getRootPackage()
249
  {
257
  *
258
  * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259
  * @return array[]
260
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
261
  */
262
  public static function getRawData()
263
  {
280
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
  *
282
  * @return array[]
283
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
284
  */
285
  public static function getAllRawData()
286
  {
303
  * @param array[] $data A vendor/composer/installed.php data set
304
  * @return void
305
  *
306
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
307
  */
308
  public static function reload($data)
309
  {
313
 
314
  /**
315
  * @return array[]
316
+ * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
317
  */
318
  private static function getInstalled()
319
  {
vendor/composer/autoload_classmap.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
@@ -16,6 +16,7 @@ return array(
16
  'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => $baseDir . '/lib/wp-background-processing/class-wp-background-process.php',
17
  'Cyr_To_Lat\\Main' => $baseDir . '/src/php/class-main.php',
18
  'Cyr_To_Lat\\Post_Conversion_Process' => $baseDir . '/src/php/background-processes/class-post-conversion-process.php',
 
19
  'Cyr_To_Lat\\Requirements' => $baseDir . '/src/php/class-requirements.php',
20
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsBase' => $baseDir . '/src/php/Settings/Abstracts/SettingsBase.php',
21
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsInterface' => $baseDir . '/src/php/Settings/Abstracts/SettingsInterface.php',
2
 
3
  // autoload_classmap.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
16
  'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => $baseDir . '/lib/wp-background-processing/class-wp-background-process.php',
17
  'Cyr_To_Lat\\Main' => $baseDir . '/src/php/class-main.php',
18
  'Cyr_To_Lat\\Post_Conversion_Process' => $baseDir . '/src/php/background-processes/class-post-conversion-process.php',
19
+ 'Cyr_To_Lat\\Request' => $baseDir . '/src/php/class-request.php',
20
  'Cyr_To_Lat\\Requirements' => $baseDir . '/src/php/class-requirements.php',
21
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsBase' => $baseDir . '/src/php/Settings/Abstracts/SettingsBase.php',
22
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsInterface' => $baseDir . '/src/php/Settings/Abstracts/SettingsInterface.php',
vendor/composer/autoload_files.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_files.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_files.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_namespaces.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_namespaces.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_psr4.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
- $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
2
 
3
  // autoload_psr4.php @generated by Composer
4
 
5
+ $vendorDir = dirname(__DIR__);
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitb6b80d8d25d79e642dcd5e27493a9b6e
6
  {
7
  private static $loader;
8
 
@@ -22,52 +22,34 @@ class ComposerAutoloaderInitb6b80d8d25d79e642dcd5e27493a9b6e
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitb6b80d8d25d79e642dcd5e27493a9b6e', 'loadClassLoader'), true, true);
26
- self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
- spl_autoload_unregister(array('ComposerAutoloaderInitb6b80d8d25d79e642dcd5e27493a9b6e', 'loadClassLoader'));
28
 
29
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
- if ($useStaticLoader) {
31
- require __DIR__ . '/autoload_static.php';
32
-
33
- call_user_func(\Composer\Autoload\ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e::getInitializer($loader));
34
- } else {
35
- $map = require __DIR__ . '/autoload_namespaces.php';
36
- foreach ($map as $namespace => $path) {
37
- $loader->set($namespace, $path);
38
- }
39
-
40
- $map = require __DIR__ . '/autoload_psr4.php';
41
- foreach ($map as $namespace => $path) {
42
- $loader->setPsr4($namespace, $path);
43
- }
44
-
45
- $classMap = require __DIR__ . '/autoload_classmap.php';
46
- if ($classMap) {
47
- $loader->addClassMap($classMap);
48
- }
49
- }
50
 
51
  $loader->register(true);
52
 
53
- if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e::$files;
55
- } else {
56
- $includeFiles = require __DIR__ . '/autoload_files.php';
57
- }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequireb6b80d8d25d79e642dcd5e27493a9b6e($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequireb6b80d8d25d79e642dcd5e27493a9b6e($fileIdentifier, $file)
 
 
 
 
 
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
- require $file;
70
-
71
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
 
 
72
  }
73
  }
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit0714ade671e040cd271d9ffc07e5f3a4
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit0714ade671e040cd271d9ffc07e5f3a4', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit0714ade671e040cd271d9ffc07e5f3a4', 'loadClassLoader'));
28
 
29
+ require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit0714ade671e040cd271d9ffc07e5f3a4::getInitializer($loader));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  $loader->register(true);
33
 
34
+ $includeFiles = \Composer\Autoload\ComposerStaticInit0714ade671e040cd271d9ffc07e5f3a4::$files;
 
 
 
 
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
+ composerRequire0714ade671e040cd271d9ffc07e5f3a4($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
40
  }
41
  }
42
 
43
+ /**
44
+ * @param string $fileIdentifier
45
+ * @param string $file
46
+ * @return void
47
+ */
48
+ function composerRequire0714ade671e040cd271d9ffc07e5f3a4($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
 
 
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
52
+
53
+ require $file;
54
  }
55
  }
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e
8
  {
9
  public static $files = array (
10
  '344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
@@ -21,6 +21,7 @@ class ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e
21
  'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => __DIR__ . '/../..' . '/lib/wp-background-processing/class-wp-background-process.php',
22
  'Cyr_To_Lat\\Main' => __DIR__ . '/../..' . '/src/php/class-main.php',
23
  'Cyr_To_Lat\\Post_Conversion_Process' => __DIR__ . '/../..' . '/src/php/background-processes/class-post-conversion-process.php',
 
24
  'Cyr_To_Lat\\Requirements' => __DIR__ . '/../..' . '/src/php/class-requirements.php',
25
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsBase' => __DIR__ . '/../..' . '/src/php/Settings/Abstracts/SettingsBase.php',
26
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsInterface' => __DIR__ . '/../..' . '/src/php/Settings/Abstracts/SettingsInterface.php',
@@ -36,7 +37,7 @@ class ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e
36
  public static function getInitializer(ClassLoader $loader)
37
  {
38
  return \Closure::bind(function () use ($loader) {
39
- $loader->classMap = ComposerStaticInitb6b80d8d25d79e642dcd5e27493a9b6e::$classMap;
40
 
41
  }, null, ClassLoader::class);
42
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit0714ade671e040cd271d9ffc07e5f3a4
8
  {
9
  public static $files = array (
10
  '344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
21
  'Cyr_To_Lat\\KAGG\\WP_Background_Processing\\WP_Background_Process' => __DIR__ . '/../..' . '/lib/wp-background-processing/class-wp-background-process.php',
22
  'Cyr_To_Lat\\Main' => __DIR__ . '/../..' . '/src/php/class-main.php',
23
  'Cyr_To_Lat\\Post_Conversion_Process' => __DIR__ . '/../..' . '/src/php/background-processes/class-post-conversion-process.php',
24
+ 'Cyr_To_Lat\\Request' => __DIR__ . '/../..' . '/src/php/class-request.php',
25
  'Cyr_To_Lat\\Requirements' => __DIR__ . '/../..' . '/src/php/class-requirements.php',
26
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsBase' => __DIR__ . '/../..' . '/src/php/Settings/Abstracts/SettingsBase.php',
27
  'Cyr_To_Lat\\Settings\\Abstracts\\SettingsInterface' => __DIR__ . '/../..' . '/src/php/Settings/Abstracts/SettingsInterface.php',
37
  public static function getInitializer(ClassLoader $loader)
38
  {
39
  return \Closure::bind(function () use ($loader) {
40
+ $loader->classMap = ComposerStaticInit0714ade671e040cd271d9ffc07e5f3a4::$classMap;
41
 
42
  }, null, ClassLoader::class);
43
  }
vendor/composer/installed.php CHANGED
@@ -1,22 +1,22 @@
1
  <?php return array(
2
  'root' => array(
3
- 'pretty_version' => '5.2.0',
4
- 'version' => '5.2.0.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '9c6c7dd69a1f5aebba4ea83166e00056c79c93d5',
9
  'name' => 'mihdan/cyr2lat',
10
  'dev' => false,
11
  ),
12
  'versions' => array(
13
  'mihdan/cyr2lat' => array(
14
- 'pretty_version' => '5.2.0',
15
- 'version' => '5.2.0.0',
16
  'type' => 'wordpress-plugin',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '9c6c7dd69a1f5aebba4ea83166e00056c79c93d5',
20
  'dev_requirement' => false,
21
  ),
22
  ),
1
  <?php return array(
2
  'root' => array(
3
+ 'pretty_version' => '5.3.0',
4
+ 'version' => '5.3.0.0',
5
  'type' => 'wordpress-plugin',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '5753831154667bde5b997318a06d63d3f37517ef',
9
  'name' => 'mihdan/cyr2lat',
10
  'dev' => false,
11
  ),
12
  'versions' => array(
13
  'mihdan/cyr2lat' => array(
14
+ 'pretty_version' => '5.3.0',
15
+ 'version' => '5.3.0.0',
16
  'type' => 'wordpress-plugin',
17
  'install_path' => __DIR__ . '/../../',
18