Cyr-To-Lat - Version 4.4.0

Version Description

(18.04.2020) = * Full flexibility to edit transliteration table: now it is possible to add/remove transliteration pairs on the settings page * Ability to edit not only values in the transliteration table, but also keys * Saving active table via ajax * Watching changes in active table * Auto-saving of changed table * Info about the current locale on settings page * Making table with current locale active at setting page load * Chinese language added * Fixed: slug not updated at woocommerce product duplication

Download this release

Release Info

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

Code changes from version 4.3.5 to 4.4.0

classes/class-conversion-tables.php CHANGED
@@ -974,6 +974,7 @@ class Conversion_Tables {
974
  'Zuo' => '昨左佐做作坐座阼唑嘬怍胙祚酢',
975
  ];
976
  break;
 
977
  default:
978
  $table = [
979
  'А' => 'A',
974
  'Zuo' => '昨左佐做作坐座阼唑嘬怍胙祚酢',
975
  ];
976
  break;
977
+ case 'iso9':
978
  default:
979
  $table = [
980
  'А' => 'A',
classes/class-main.php CHANGED
@@ -359,10 +359,17 @@ class Main {
359
  * @return mixed
360
  */
361
  public function ctl_sanitize_post_name( $data, $postarr = [] ) {
 
 
362
  if ( ! $this->ctl_is_gutenberg_editor_active() ) {
363
  return $data;
364
  }
365
 
 
 
 
 
 
366
  if (
367
  ! $data['post_name'] && $data['post_title'] &&
368
  ! in_array( $data['post_status'], [ 'auto-draft', 'revision' ], true )
359
  * @return mixed
360
  */
361
  public function ctl_sanitize_post_name( $data, $postarr = [] ) {
362
+ global $current_screen;
363
+
364
  if ( ! $this->ctl_is_gutenberg_editor_active() ) {
365
  return $data;
366
  }
367
 
368
+ // Run code only on post edit screen.
369
+ if ( ! ( $current_screen && 'post' === $current_screen->base ) ) {
370
+ return $data;
371
+ }
372
+
373
  if (
374
  ! $data['post_name'] && $data['post_title'] &&
375
  ! in_array( $data['post_status'], [ 'auto-draft', 'revision' ], true )
classes/class-settings.php CHANGED
@@ -45,25 +45,32 @@ class Settings {
45
  const OPTION_NAME = 'cyr_to_lat_settings';
46
 
47
  /**
48
- * Plugin options.
49
  *
50
  * @var array
51
  */
52
- private $options;
53
 
54
  /**
55
- * Form fields.
56
  *
57
  * @var array
58
  */
59
- public $form_fields;
60
 
61
  /**
62
  * Plugin options.
63
  *
64
  * @var array
65
  */
66
- public $settings;
 
 
 
 
 
 
 
67
 
68
  /**
69
  * Settings constructor.
@@ -127,101 +134,81 @@ class Settings {
127
  }
128
 
129
  /**
130
- * Init options form fields.
131
  */
132
- public function init_form_fields() {
133
- $this->form_fields = [
 
 
 
 
134
  'iso9' => [
135
- 'label' => __( 'ISO9 Table', 'cyr2lat' ),
136
- 'section' => 'iso9_section',
137
- 'type' => 'table',
138
- 'placeholder' => '',
139
- 'helper' => '',
140
- 'supplemental' => '',
141
- 'default' => Conversion_Tables::get(),
142
  ],
143
  'bel' => [
144
- 'label' => __( 'bel Table', 'cyr2lat' ),
145
- 'section' => 'bel_section',
146
- 'type' => 'table',
147
- 'placeholder' => '',
148
- 'helper' => '',
149
- 'supplemental' => '',
150
- 'default' => Conversion_Tables::get( 'bel' ),
151
  ],
152
  'uk' => [
153
- 'label' => __( 'uk Table', 'cyr2lat' ),
154
- 'section' => 'uk_section',
155
- 'type' => 'table',
156
- 'placeholder' => '',
157
- 'helper' => '',
158
- 'supplemental' => '',
159
- 'default' => Conversion_Tables::get( 'uk' ),
160
  ],
161
  'bg_BG' => [
162
- 'label' => __( 'bg_BG Table', 'cyr2lat' ),
163
- 'section' => 'bg_BG_section',
164
- 'type' => 'table',
165
- 'placeholder' => '',
166
- 'helper' => '',
167
- 'supplemental' => '',
168
- 'default' => Conversion_Tables::get( 'bg_BG' ),
169
  ],
170
  'mk_MK' => [
171
- 'label' => __( 'mk_MK Table', 'cyr2lat' ),
172
- 'section' => 'mk_MK_section',
173
- 'type' => 'table',
174
- 'placeholder' => '',
175
- 'helper' => '',
176
- 'supplemental' => '',
177
- 'default' => Conversion_Tables::get( 'mk_MK' ),
178
  ],
179
  'sr_RS' => [
180
- 'label' => __( 'sr_RS Table', 'cyr2lat' ),
181
- 'section' => 'sr_RS_section',
182
- 'type' => 'table',
183
- 'placeholder' => '',
184
- 'helper' => '',
185
- 'supplemental' => '',
186
- 'default' => Conversion_Tables::get( 'sr_RS' ),
187
  ],
188
  'ka_GE' => [
189
- 'label' => __( 'ka_GE Table', 'cyr2lat' ),
190
- 'section' => 'ka_GE_section',
191
- 'type' => 'table',
192
- 'placeholder' => '',
193
- 'helper' => '',
194
- 'supplemental' => '',
195
- 'default' => Conversion_Tables::get( 'ka_GE' ),
196
  ],
197
  'kk' => [
198
- 'label' => __( 'kk Table', 'cyr2lat' ),
199
- 'section' => 'kk_section',
200
- 'type' => 'table',
201
- 'placeholder' => '',
202
- 'helper' => '',
203
- 'supplemental' => '',
204
- 'default' => Conversion_Tables::get( 'kk' ),
205
  ],
206
  'he_IL' => [
207
- 'label' => __( 'he_IL Table', 'cyr2lat' ),
208
- 'section' => 'he_IL_section',
209
- 'type' => 'table',
210
- 'placeholder' => '',
211
- 'helper' => '',
212
- 'supplemental' => '',
213
- 'default' => Conversion_Tables::get( 'he_IL' ),
214
  ],
215
  'zh_CN' => [
216
- 'label' => __( 'zh_CN Table', 'cyr2lat' ),
217
- 'section' => 'zh_CN_section',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  'type' => 'table',
219
  'placeholder' => '',
220
  'helper' => '',
221
  'supplemental' => '',
222
- 'default' => Conversion_Tables::get( 'zh_CN' ),
223
- ],
224
- ];
225
  }
226
 
227
  /**
@@ -356,60 +343,14 @@ class Settings {
356
  return;
357
  }
358
 
359
- add_settings_section(
360
- 'iso9_section',
361
- __( 'ISO9 Table', 'cyr2lat' ),
362
- [ $this, 'cyr_to_lat_section' ],
363
- self::PAGE
364
- );
365
- add_settings_section(
366
- 'bel_section',
367
- __( 'bel Table', 'cyr2lat' ),
368
- [ $this, 'cyr_to_lat_section' ],
369
- self::PAGE
370
- );
371
- add_settings_section(
372
- 'uk_section',
373
- __( 'uk Table', 'cyr2lat' ),
374
- [ $this, 'cyr_to_lat_section' ],
375
- self::PAGE
376
- );
377
- add_settings_section(
378
- 'bg_BG_section',
379
- __( 'bg_BG Table', 'cyr2lat' ),
380
- [ $this, 'cyr_to_lat_section' ],
381
- self::PAGE
382
- );
383
- add_settings_section(
384
- 'mk_MK_section',
385
- __( 'mk_MK Table', 'cyr2lat' ),
386
- [ $this, 'cyr_to_lat_section' ],
387
- self::PAGE
388
- );
389
- add_settings_section(
390
- 'sr_RS_section',
391
- __( 'sr_RS Table', 'cyr2lat' ),
392
- [ $this, 'cyr_to_lat_section' ],
393
- self::PAGE
394
- );
395
- add_settings_section(
396
- 'ka_GE_section',
397
- __( 'ka_GE Table', 'cyr2lat' ),
398
- [ $this, 'cyr_to_lat_section' ],
399
- self::PAGE
400
- );
401
- add_settings_section(
402
- 'kk_section',
403
- __( 'kk Table', 'cyr2lat' ),
404
- [ $this, 'cyr_to_lat_section' ],
405
- self::PAGE
406
- );
407
- add_settings_section(
408
- 'he_IL_section',
409
- __( 'he_IL Table', 'cyr2lat' ),
410
- [ $this, 'cyr_to_lat_section' ],
411
- self::PAGE
412
- );
413
  }
414
 
415
  /**
@@ -418,6 +359,10 @@ class Settings {
418
  * @param array $arguments Section arguments.
419
  */
420
  public function cyr_to_lat_section( $arguments ) {
 
 
 
 
421
  }
422
 
423
  /**
@@ -696,6 +641,11 @@ class Settings {
696
  return $value;
697
  }
698
 
 
 
 
 
 
699
  $form_fields = $this->get_form_fields();
700
  foreach ( $form_fields as $key => $form_field ) {
701
  switch ( $form_field['type'] ) {
45
  const OPTION_NAME = 'cyr_to_lat_settings';
46
 
47
  /**
48
+ * Form fields.
49
  *
50
  * @var array
51
  */
52
+ public $form_fields;
53
 
54
  /**
55
+ * Plugin options.
56
  *
57
  * @var array
58
  */
59
+ public $settings;
60
 
61
  /**
62
  * Plugin options.
63
  *
64
  * @var array
65
  */
66
+ private $options;
67
+
68
+ /**
69
+ * Served locales.
70
+ *
71
+ * @var array
72
+ */
73
+ protected $locales = [];
74
 
75
  /**
76
  * Settings constructor.
134
  }
135
 
136
  /**
137
+ * Init locales.
138
  */
139
+ protected function init_locales() {
140
+ if ( ! empty( $this->locales ) ) {
141
+ return;
142
+ }
143
+
144
+ $this->locales = [
145
  'iso9' => [
146
+ 'label' => __( 'ISO9 Table', 'cyr2lat' ),
 
 
 
 
 
 
147
  ],
148
  'bel' => [
149
+ 'label' => __( 'bel Table', 'cyr2lat' ),
 
 
 
 
 
 
150
  ],
151
  'uk' => [
152
+ 'label' => __( 'uk Table', 'cyr2lat' ),
 
 
 
 
 
 
153
  ],
154
  'bg_BG' => [
155
+ 'label' => __( 'bg_BG Table', 'cyr2lat' ),
 
 
 
 
 
 
156
  ],
157
  'mk_MK' => [
158
+ 'label' => __( 'mk_MK Table', 'cyr2lat' ),
 
 
 
 
 
 
159
  ],
160
  'sr_RS' => [
161
+ 'label' => __( 'sr_RS Table', 'cyr2lat' ),
 
 
 
 
 
 
162
  ],
163
  'ka_GE' => [
164
+ 'label' => __( 'ka_GE Table', 'cyr2lat' ),
 
 
 
 
 
 
165
  ],
166
  'kk' => [
167
+ 'label' => __( 'kk Table', 'cyr2lat' ),
 
 
 
 
 
 
168
  ],
169
  'he_IL' => [
170
+ 'label' => __( 'he_IL Table', 'cyr2lat' ),
 
 
 
 
 
 
171
  ],
172
  'zh_CN' => [
173
+ 'label' => __( 'zh_CN Table', 'cyr2lat' ),
174
+ ],
175
+ ];
176
+ }
177
+
178
+ /**
179
+ * Get current locale.
180
+ *
181
+ * @return string
182
+ */
183
+ private function get_current_locale() {
184
+ $current_locale = get_locale();
185
+
186
+ return in_array( $current_locale, array_keys( $this->locales ), true ) ? $current_locale : 'iso9';
187
+ }
188
+
189
+ /**
190
+ * Init options form fields.
191
+ */
192
+ public function init_form_fields() {
193
+ $this->init_locales();
194
+
195
+ $current_locale = $this->get_current_locale();
196
+
197
+ $this->form_fields = [];
198
+
199
+ foreach ( $this->locales as $locale => $info ) {
200
+ $current = ( $locale === $current_locale ) ? '<br>' . __( '(current)', 'cyr2lat' ) : '';
201
+
202
+ $this->form_fields[ $locale ] = [
203
+ 'label' => $info['label'] . $current,
204
+ 'section' => $locale . '_section',
205
  'type' => 'table',
206
  'placeholder' => '',
207
  'helper' => '',
208
  'supplemental' => '',
209
+ 'default' => Conversion_Tables::get( $locale ),
210
+ ];
211
+ }
212
  }
213
 
214
  /**
343
  return;
344
  }
345
 
346
+ foreach ( $this->form_fields as $form_field ) {
347
+ add_settings_section(
348
+ $form_field['section'],
349
+ $form_field['label'],
350
+ [ $this, 'cyr_to_lat_section' ],
351
+ self::PAGE
352
+ );
353
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  }
355
 
356
  /**
359
  * @param array $arguments Section arguments.
360
  */
361
  public function cyr_to_lat_section( $arguments ) {
362
+ $locale = str_replace( '_section', '', $arguments['id'] );
363
+ if ( $this->get_current_locale() === $locale ) {
364
+ echo '<div id="ctl-current"></div>';
365
+ }
366
  }
367
 
368
  /**
641
  return $value;
642
  }
643
 
644
+ // We save only one table, so merge with all existing tables.
645
+ if ( is_array( $old_value ) && ( is_array( $value ) ) ) {
646
+ $value = array_merge( $old_value, $value );
647
+ }
648
+
649
  $form_fields = $this->get_form_fields();
650
  foreach ( $form_fields as $key => $form_field ) {
651
  switch ( $form_field['type'] ) {
css/cyr-to-lat-admin.css CHANGED
@@ -6,6 +6,29 @@
6
  display: none;
7
  }
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  #ctl-options .nav-tab-wrapper {
10
  width: 125px;
11
  float: left;
@@ -41,16 +64,22 @@ body.js #ctl-options .ctl-table {
41
  }
42
 
43
  #ctl-options .nav-tab-active {
44
- background: #f1f1f1;
45
  border-bottom: 1px solid #ccc;
46
  }
47
 
 
 
 
 
48
  .ctl-table.active {
49
  display: block;
50
  }
51
 
52
  .ctl-table-cell {
53
  float: left;
 
 
54
  }
55
 
56
  .ctl-table-cell label {
@@ -62,7 +91,45 @@ body.js #ctl-options .ctl-table {
62
 
63
  .ctl-table-cell input {
64
  width: 3em !important;
65
- display: inline-block !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  #donate {
6
  display: none;
7
  }
8
 
9
+ #ctl-success, #ctl-error {
10
+ max-height: 0;
11
+ color: #fff;
12
+ font-size: 14px;
13
+ padding: 0;
14
+ transition: 0.5s all;
15
+ }
16
+
17
+ #ctl-success {
18
+ background: #8BC34A;
19
+ }
20
+
21
+ #ctl-error {
22
+ background: #FF9800;
23
+ }
24
+
25
+ #ctl-success.active, #ctl-error.active {
26
+ padding: 10px 25px;
27
+ max-height: 34px;
28
+ height: 14px;
29
+ line-height: 14px;
30
+ }
31
+
32
  #ctl-options .nav-tab-wrapper {
33
  width: 125px;
34
  float: left;
64
  }
65
 
66
  #ctl-options .nav-tab-active {
67
+ background: #fff;
68
  border-bottom: 1px solid #ccc;
69
  }
70
 
71
+ .nav-tab-current {
72
+ box-shadow: 0 0 5px 5px #fff;
73
+ }
74
+
75
  .ctl-table.active {
76
  display: block;
77
  }
78
 
79
  .ctl-table-cell {
80
  float: left;
81
+ position: relative;
82
+ margin-bottom: 1em;
83
  }
84
 
85
  .ctl-table-cell label {
91
 
92
  .ctl-table-cell input {
93
  width: 3em !important;
94
+ display: inline-block;
95
+ }
96
+
97
+ .ctl-table-cell #ctl-edit-label {
98
+ position: absolute;
99
+ top: 0;
100
+ left: 0;
101
+ width: 2.4em !important;
102
+ padding: 0;
103
+ border: 1px solid #007cba;
104
+ box-shadow: 0 0 0 1px #007cba;
105
+ outline: 2px solid #0000;
106
+ border-radius: 4px;
107
+ line-height: 2;
108
+ }
109
+
110
+ .ctl-edit-label-error {
111
+ background: #FF9800;
112
+ }
113
+
114
+ .ctl-plus {
115
+ position: relative;
116
+ float: left;
117
+ display: inline-block;
118
+ }
119
+
120
+ .ctl-plus button {
121
+ border: none;
122
+ cursor: pointer;
123
+ height: 24px;
124
+ width: 24px;
125
+ padding: 0;
126
+ position: absolute;
127
+ top: 0.35em;
128
+ left: 1.8em;
129
+ }
130
+
131
+ .ctl-plus button:focus {
132
+ outline: none;
133
  }
134
 
135
  #donate {
cyr-to-lat.php CHANGED
@@ -9,8 +9,8 @@
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 5.1
11
  * Tested up to: 5.4
12
- * Version: 4.3.5
13
- * Stable tag: 4.3.5
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
@@ -34,7 +34,7 @@ if ( defined( 'CYR_TO_LAT_VERSION' ) ) {
34
  /**
35
  * Plugin version.
36
  */
37
- define( 'CYR_TO_LAT_VERSION', '4.3.5' );
38
 
39
  /**
40
  * Path to the plugin dir.
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 5.1
11
  * Tested up to: 5.4
12
+ * Version: 4.4.0
13
+ * Stable tag: 4.4.0
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
34
  /**
35
  * Plugin version.
36
  */
37
+ define( 'CYR_TO_LAT_VERSION', '4.4.0' );
38
 
39
  /**
40
  * Path to the plugin dir.
dist/js/settings/app.js CHANGED
@@ -1 +1 @@
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){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),f(t)},c.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},c.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),f(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=c,t.Request=b,t.Response=v,t.fetch=function(t,r){return new Promise((function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new c,t.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 s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;n(new v(o,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),s.send(void 0===i._bodyInit?null:i._bodyInit)}))},t.fetch.polyfill=!0}function a(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 u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function c(t){this.map={},t instanceof c?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 d(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function h(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else 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):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(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(h)}),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=d(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)},e.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var r,n,o=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=(r=e.method||this.method||"GET",n=r.toUpperCase(),i.indexOf(n)>-1?n:r),this.mode=e.mode||this.mode||null,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 m(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 v(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},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}}();function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hideTables(),this.bindEvents()}return n(t,[{key:"hideTables",value:function(){[].concat(o(document.querySelectorAll("#ctl-options table"))).map((function(t,e){if(t.classList.add("ctl-table"),0===e){t.classList.add("active");var r=document.createElement("ul");r.classList.add("nav-tab-wrapper"),t.parentNode.insertBefore(r,t)}})),[].concat(o(document.querySelectorAll("#ctl-options h2"))).map((function(t,e){t.classList.add("nav-tab"),t.dataset.index=e,document.querySelector("#ctl-options ul").appendChild(t),0===e&&t.classList.add("nav-tab-active")}))}},{key:"bindEvents",value:function(){[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map((function(t){t.onclick=function(t){t.preventDefault();var e=t.target.dataset.index,r=[].concat(o(document.querySelectorAll("#ctl-options ul h2")));r.map((function(t){t.classList.remove("nav-tab-active")})),r[e].classList.add("nav-tab-active");var n=[].concat(o(document.querySelectorAll(".ctl-table")));return n.map((function(t){t.classList.remove("active")})),n[e].classList.add("active"),!1}}))}}]),t}();e.default=i}]);
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){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,r="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,s="ArrayBuffer"in e;if(s)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=function(e){return e&&DataView.prototype.isPrototypeOf(e)},u=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};p.prototype.append=function(e,t){e=d(e),t=h(t);var n=this.map[e];this.map[e]=n?n+","+t:t},p.prototype.delete=function(e){delete this.map[d(e)]},p.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},p.prototype.set=function(e,t){this.map[d(e)]=h(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},n&&(p.prototype[Symbol.iterator]=p.prototype.entries);var l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];T.prototype.clone=function(){return new T(this,{body:this._bodyInit})},L.call(T.prototype),L.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var c=[301,302,303,307,308];E.redirect=function(e,t){if(-1===c.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.Headers=p,e.Request=T,e.Response=E,e.fetch=function(e,t){return new Promise((function(n,i){var s=new T(e,t),o=new XMLHttpRequest;o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new p,e.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)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new E(i,r))},o.onerror=function(){i(new TypeError("Network request failed"))},o.ontimeout=function(){i(new TypeError("Network request failed"))},o.open(s.method,s.url,!0),"include"===s.credentials&&(o.withCredentials=!0),"responseType"in o&&r&&(o.responseType="blob"),s.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),o.send(void 0===s._bodyInit?null:s._bodyInit)}))},e.fetch.polyfill=!0}function d(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 h(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?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 y(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function b(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=b(t);return t.readAsArrayBuffer(e),n}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(r&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(s&&r&&a(e))this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!s||!ArrayBuffer.prototype.isPrototypeOf(e)&&!u(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=m(e)}else 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):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=y(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?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=y(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=b(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)},i&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}function T(e,t){var n,r,i=(t=t||{}).body;if(e instanceof T){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),l.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function S(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 E(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},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.addWrapper(),this.addMessageLines(),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){n.querySelector("#"+e.id).value=e.value})),[].concat(i(this.optionsForm.querySelectorAll('input[type="hidden"]'))).map((function(e){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,"Options saved."),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,"Error saving options."),t.json()})).finally((function(){n.remove(),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.prepend(this.wrapper)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.prepend(t),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error")}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var 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");i.classList.add(e.PLUS_CLASS),i.innerHTML=e.plusButton,n.querySelector("td").appendChild(i)})),this.getHeaders().map((function(n,r){n.classList.add("nav-tab"),n.dataset.index=r,e.wrapper.appendChild(n),r===t&&n.classList.add(e.CURRENT_NAV_TAB_CLASS,e.ACTIVE_NAV_TAB_CLASS)}))}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map((function(t,n,r){t.onclick=function(t){t.preventDefault();var n=t.target.dataset.index;if(n===e.getActiveIndex())return!1;e.saveActiveTable(),r.map((function(t){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){t.classList.remove(e.ACTIVE_TABLE_CLASS)})),i[n].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),!1}})),this.getInputs().map((function(t){t.oninput=function(){e.setSubmitStatus()}})),this.getLabels().map((function(t){t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1}})),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){t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1}})),document.querySelector(this.SUBMIT_SELECTOR).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(),n=this.editLabelInput.parentNode.querySelector("label"),r=this.editLabelInput.parentNode.querySelector("input");if(""===t){var i=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),i.remove(),void this.setSubmitStatus()}e||t===n.innerHTML?this.hideEditLabelInput():this.isUniqueLabel(t)?(this.hideEditLabelInput(),n.innerHTML=t,this.replaceName(r,t),this.setSubmitStatus()):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}]);
languages/cyr2lat-ru_RU.mo CHANGED
Binary file
languages/cyr2lat-ru_RU.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
- "POT-Creation-Date: 2019-12-28 01:01+0200\n"
5
- "PO-Revision-Date: 2019-12-28 01:01+0200\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.4\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
@@ -28,75 +28,69 @@ msgstr ""
28
  "X-Poedit-SearchPathExcluded-9: tests\n"
29
  "X-Poedit-SearchPathExcluded-10: vendor\n"
30
 
31
- #. phpcs:enable
32
- #: classes/background-processes/class-post-conversion-process.php:71
33
  msgid "Post slug converted:"
34
  msgstr "Ярлык поста сконвертирован:"
35
 
36
- #: classes/background-processes/class-post-conversion-process.php:83
37
  msgid "Post slugs conversion completed."
38
  msgstr "Конвертация ярлыков постов завершена."
39
 
40
- #. phpcs:enable
41
- #: classes/background-processes/class-term-conversion-process.php:70
42
  msgid "Term slug converted:"
43
  msgstr "Ярлык термина сконвертирован:"
44
 
45
- #: classes/background-processes/class-term-conversion-process.php:82
46
  msgid "Term slugs conversion completed."
47
  msgstr "Конвертация ярлыков терминов завершена."
48
 
49
- #: classes/class-converter.php:119
50
  msgid "Cyr To Lat converts existing post slugs in the background process."
51
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
52
 
53
- #: classes/class-converter.php:126
54
  msgid "Cyr To Lat converts existing term slugs in the background process."
55
  msgstr ""
56
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
57
 
58
- #: classes/class-converter.php:133
59
  msgid "Cyr To Lat completed conversion of existing post slugs."
60
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
61
 
62
- #: classes/class-converter.php:140
63
  msgid "Cyr To Lat completed conversion of existing term slugs."
64
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
65
 
66
- #: classes/class-converter.php:206
67
  msgid "Post slugs conversion started."
68
  msgstr "Начата конвертация ярлыков постов."
69
 
70
- #: classes/class-converter.php:208
71
  msgid "Cyr To Lat started conversion of existing post slugs."
72
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
73
 
74
- #: classes/class-converter.php:215
75
  msgid "Cyr To Lat has not found existing post slugs for conversion."
76
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
77
 
78
- #: classes/class-converter.php:234
79
  msgid "Term slugs conversion started."
80
  msgstr "Начата конвертация ярлыков терминов."
81
 
82
- #: classes/class-converter.php:236
83
  msgid "Cyr To Lat started conversion of existing term slugs."
84
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
85
 
86
- #: classes/class-converter.php:243
87
  msgid "Cyr To Lat has not found existing term slugs for conversion."
88
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
89
 
90
- #: classes/class-requirements.php:53
91
- msgid "Unable to get filesystem access."
92
- msgstr "Невозможно получить доступ к файловой системе."
93
-
94
- #: classes/class-requirements.php:91
95
  msgid "Cyr To Lat plugin has been deactivated."
96
  msgstr "Плагин Cyr To Lat был деактивирован."
97
 
98
  #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
99
- #: classes/class-requirements.php:105
100
  #, php-format
101
  msgid ""
102
  "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
@@ -105,8 +99,12 @@ msgstr ""
105
  "На сервере установлен PHP версии %1$s, однако для Cyr To Lat %2$s требуется "
106
  "хотя бы %3$s."
107
 
 
 
 
 
108
  #. translators: 1: max_input_vars value, 2: Cyr To Lat version, 3: Minimum required max_input_vars
109
- #: classes/class-requirements.php:127
110
  #, php-format
111
  msgid ""
112
  "Your server is running PHP with max_input_vars=%1$d but Cyr To Lat %2$s "
@@ -116,20 +114,28 @@ msgstr ""
116
  "требуется хотя бы %3$d."
117
 
118
  #. translators: 1: .user.ini filename
119
- #: classes/class-requirements.php:131
120
  #, php-format
121
  msgid "We have updated settings in %s."
122
  msgstr "Мы обновили настройки в %s."
123
 
124
  #. translators: 1: Wait time in seconds
125
- #: classes/class-requirements.php:141
126
  #, php-format
127
  msgid "Please try again in %d s."
128
  msgstr "Пожалуйста, попробуйте снова через %d сек."
129
 
130
- #: classes/class-requirements.php:143
131
- msgid "Please try again."
132
- msgstr "Пожалуйста, попробуйте снова."
 
 
 
 
 
 
 
 
133
 
134
  #: classes/class-settings.php:122
135
  msgid "View Cyr To Lat settings"
@@ -139,43 +145,43 @@ msgstr "Посмотреть настройки Cyr To Lat"
139
  msgid "Settings"
140
  msgstr "Настройки"
141
 
142
- #: classes/class-settings.php:135 classes/class-settings.php:361
143
  msgid "ISO9 Table"
144
  msgstr "Таблица ISO9"
145
 
146
- #: classes/class-settings.php:144 classes/class-settings.php:367
147
  msgid "bel Table"
148
  msgstr "Таблица bel"
149
 
150
- #: classes/class-settings.php:153 classes/class-settings.php:373
151
  msgid "uk Table"
152
  msgstr "Таблица uk"
153
 
154
- #: classes/class-settings.php:162 classes/class-settings.php:379
155
  msgid "bg_BG Table"
156
  msgstr "Таблица bg_BG"
157
 
158
- #: classes/class-settings.php:171 classes/class-settings.php:385
159
  msgid "mk_MK Table"
160
  msgstr "Таблица mk_MK"
161
 
162
- #: classes/class-settings.php:180 classes/class-settings.php:391
163
  msgid "sr_RS Table"
164
  msgstr "Таблица sr_RS"
165
 
166
- #: classes/class-settings.php:189 classes/class-settings.php:397
167
  msgid "ka_GE Table"
168
  msgstr "Таблица ka_GE"
169
 
170
- #: classes/class-settings.php:198 classes/class-settings.php:403
171
  msgid "kk Table"
172
  msgstr "Таблица kk"
173
 
174
- #: classes/class-settings.php:207 classes/class-settings.php:409
175
  msgid "he_IL Table"
176
  msgstr "Таблица he_IL"
177
 
178
- #: classes/class-settings.php:216 classes/class-settings.php:415
179
  msgid "zh_CN Table"
180
  msgstr "Таблица zh_CN"
181
 
@@ -208,12 +214,19 @@ msgstr "Ваша оценка"
208
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
209
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
210
 
 
 
 
 
211
  #. translators: %d: cron interval
212
  #: lib/wp-background-processing/class-wp-background-process.php:399
213
  #, php-format
214
  msgid "Every %d Minutes"
215
  msgstr "Каждые %d минут"
216
 
 
 
 
217
  #~ msgid "Unable to get filesystem access"
218
  #~ msgstr "Невозможно получить доступ к файловой системе"
219
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
+ "POT-Creation-Date: 2020-04-05 21:15+0300\n"
5
+ "PO-Revision-Date: 2020-04-05 21:17+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.3\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
28
  "X-Poedit-SearchPathExcluded-9: tests\n"
29
  "X-Poedit-SearchPathExcluded-10: vendor\n"
30
 
31
+ #: classes/background-processes/class-post-conversion-process.php:72
 
32
  msgid "Post slug converted:"
33
  msgstr "Ярлык поста сконвертирован:"
34
 
35
+ #: classes/background-processes/class-post-conversion-process.php:84
36
  msgid "Post slugs conversion completed."
37
  msgstr "Конвертация ярлыков постов завершена."
38
 
39
+ #: classes/background-processes/class-term-conversion-process.php:71
 
40
  msgid "Term slug converted:"
41
  msgstr "Ярлык термина сконвертирован:"
42
 
43
+ #: classes/background-processes/class-term-conversion-process.php:83
44
  msgid "Term slugs conversion completed."
45
  msgstr "Конвертация ярлыков терминов завершена."
46
 
47
+ #: classes/class-converter.php:105
48
  msgid "Cyr To Lat converts existing post slugs in the background process."
49
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
50
 
51
+ #: classes/class-converter.php:112
52
  msgid "Cyr To Lat converts existing term slugs in the background process."
53
  msgstr ""
54
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
55
 
56
+ #: classes/class-converter.php:119
57
  msgid "Cyr To Lat completed conversion of existing post slugs."
58
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
59
 
60
+ #: classes/class-converter.php:126
61
  msgid "Cyr To Lat completed conversion of existing term slugs."
62
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
63
 
64
+ #: classes/class-converter.php:197
65
  msgid "Post slugs conversion started."
66
  msgstr "Начата конвертация ярлыков постов."
67
 
68
+ #: classes/class-converter.php:199
69
  msgid "Cyr To Lat started conversion of existing post slugs."
70
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
71
 
72
+ #: classes/class-converter.php:206
73
  msgid "Cyr To Lat has not found existing post slugs for conversion."
74
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
75
 
76
+ #: classes/class-converter.php:225
77
  msgid "Term slugs conversion started."
78
  msgstr "Начата конвертация ярлыков терминов."
79
 
80
+ #: classes/class-converter.php:227
81
  msgid "Cyr To Lat started conversion of existing term slugs."
82
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
83
 
84
+ #: classes/class-converter.php:234
85
  msgid "Cyr To Lat has not found existing term slugs for conversion."
86
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
87
 
88
+ #: classes/class-requirements.php:99
 
 
 
 
89
  msgid "Cyr To Lat plugin has been deactivated."
90
  msgstr "Плагин Cyr To Lat был деактивирован."
91
 
92
  #. translators: 1: Current PHP version number, 2: Cyr To Lat version, 3: Minimum required PHP version number
93
+ #: classes/class-requirements.php:113
94
  #, php-format
95
  msgid ""
96
  "Your server is running PHP version %1$s but Cyr To Lat %2$s requires at "
99
  "На сервере установлен PHP версии %1$s, однако для Cyr To Lat %2$s требуется "
100
  "хотя бы %3$s."
101
 
102
+ #: classes/class-requirements.php:134
103
+ msgid "Unable to get filesystem access."
104
+ msgstr "Невозможно получить доступ к файловой системе."
105
+
106
  #. translators: 1: max_input_vars value, 2: Cyr To Lat version, 3: Minimum required max_input_vars
107
+ #: classes/class-requirements.php:151
108
  #, php-format
109
  msgid ""
110
  "Your server is running PHP with max_input_vars=%1$d but Cyr To Lat %2$s "
114
  "требуется хотя бы %3$d."
115
 
116
  #. translators: 1: .user.ini filename
117
+ #: classes/class-requirements.php:155
118
  #, php-format
119
  msgid "We have updated settings in %s."
120
  msgstr "Мы обновили настройки в %s."
121
 
122
  #. translators: 1: Wait time in seconds
123
+ #: classes/class-requirements.php:158
124
  #, php-format
125
  msgid "Please try again in %d s."
126
  msgstr "Пожалуйста, попробуйте снова через %d сек."
127
 
128
+ #: classes/class-requirements.php:224
129
+ msgid "Please increase max input vars limit up to 1500."
130
+ msgstr "Пожалуйста, увеличьте лимит max input vars до 1500."
131
+
132
+ #: classes/class-requirements.php:227
133
+ msgid ""
134
+ "See: <a href=\"http://sevenspark.com/docs/ubermenu-3/faqs/menu-item-limit\" "
135
+ "target=\"_blank\">Increasing max input vars limit.</a>"
136
+ msgstr ""
137
+ "См.: <a href=\"http://sevenspark.com/docs/ubermenu-3/faqs/menu-item-limit\" "
138
+ "target=\"_blank\">Увеличение лимита max input vars.</a>"
139
 
140
  #: classes/class-settings.php:122
141
  msgid "View Cyr To Lat settings"
145
  msgid "Settings"
146
  msgstr "Настройки"
147
 
148
+ #: classes/class-settings.php:135
149
  msgid "ISO9 Table"
150
  msgstr "Таблица ISO9"
151
 
152
+ #: classes/class-settings.php:144
153
  msgid "bel Table"
154
  msgstr "Таблица bel"
155
 
156
+ #: classes/class-settings.php:153
157
  msgid "uk Table"
158
  msgstr "Таблица uk"
159
 
160
+ #: classes/class-settings.php:162
161
  msgid "bg_BG Table"
162
  msgstr "Таблица bg_BG"
163
 
164
+ #: classes/class-settings.php:171
165
  msgid "mk_MK Table"
166
  msgstr "Таблица mk_MK"
167
 
168
+ #: classes/class-settings.php:180
169
  msgid "sr_RS Table"
170
  msgstr "Таблица sr_RS"
171
 
172
+ #: classes/class-settings.php:189
173
  msgid "ka_GE Table"
174
  msgstr "Таблица ka_GE"
175
 
176
+ #: classes/class-settings.php:198
177
  msgid "kk Table"
178
  msgstr "Таблица kk"
179
 
180
+ #: classes/class-settings.php:207
181
  msgid "he_IL Table"
182
  msgstr "Таблица he_IL"
183
 
184
+ #: classes/class-settings.php:216
185
  msgid "zh_CN Table"
186
  msgstr "Таблица zh_CN"
187
 
214
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
215
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
216
 
217
+ #: classes/class-settings.php:363
218
+ msgid "(current)"
219
+ msgstr "(текущая)"
220
+
221
  #. translators: %d: cron interval
222
  #: lib/wp-background-processing/class-wp-background-process.php:399
223
  #, php-format
224
  msgid "Every %d Minutes"
225
  msgstr "Каждые %d минут"
226
 
227
+ #~ msgid "Please try again."
228
+ #~ msgstr "Пожалуйста, попробуйте снова."
229
+
230
  #~ msgid "Unable to get filesystem access"
231
  #~ msgstr "Невозможно получить доступ к файловой системе"
232
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.4
6
- Stable tag: 4.3.5
7
  Requires PHP: 5.6.20
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
@@ -13,11 +13,11 @@ Converts Cyrillic characters in post, page and term slugs to Latin characters.
13
  Converts Cyrillic characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
14
 
15
  = Features =
 
16
  * Converts any number of existing post, page and term slugs in background processes
17
  * Saves existing post and page permalinks integrity
18
  * Performs transliteration of attachment file names
19
- * Includes Russian, Belorussian, Ukrainian, Bulgarian, Macedonian, Serbian, Georgian, Kazakh, and Hebrew characters
20
- * Transliteration table can be customized without editing the plugin by itself
21
  * [Officially compatible with WPML](https://wpml.org/plugin/cyr-to-lat/)
22
 
23
  ![WPML Certificate](https://ps.w.org/cyr2lat/assets/Cyr-To-Lat---WPML-Compatibility-Certificate-240x250.png)
@@ -91,6 +91,17 @@ Yes you can!
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
 
 
 
 
 
94
  = 4.3.5 (28.03.2020) =
95
  * Tested up to WordPress 5.4
96
  * Fixed bug with disappearing of WooCommerce attributes
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.4
6
+ Stable tag: 4.4.0
7
  Requires PHP: 5.6.20
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
13
  Converts Cyrillic characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
14
 
15
  = Features =
16
+ * The only plugin with fully editable transliteration table. Allows add/remove and edit pairs like 'Я' => 'Ya', or even 'Пиво' => 'Beer'
17
  * Converts any number of existing post, page and term slugs in background processes
18
  * Saves existing post and page permalinks integrity
19
  * Performs transliteration of attachment file names
20
+ * Includes Russian, Belorussian, Ukrainian, Bulgarian, Macedonian, Serbian, Georgian, Kazakh, Hebrew, and Chinese characters
 
21
  * [Officially compatible with WPML](https://wpml.org/plugin/cyr-to-lat/)
22
 
23
  ![WPML Certificate](https://ps.w.org/cyr2lat/assets/Cyr-To-Lat---WPML-Compatibility-Certificate-240x250.png)
91
 
92
  == Changelog ==
93
 
94
+ = 4.4.0 (18.04.2020) =
95
+ * Full flexibility to edit transliteration table: now it is possible to add/remove transliteration pairs on the settings page
96
+ * Ability to edit not only values in the transliteration table, but also keys
97
+ * Saving active table via ajax
98
+ * Watching changes in active table
99
+ * Auto-saving of changed table
100
+ * Info about the current locale on settings page
101
+ * Making table with current locale active at setting page load
102
+ * Chinese language added
103
+ * Fixed: slug not updated at woocommerce product duplication
104
+
105
  = 4.3.5 (28.03.2020) =
106
  * Tested up to WordPress 5.4
107
  * Fixed bug with disappearing of WooCommerce attributes
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit460c17ef6a9eaa75f4cb75bec3b19218::getLoader();
vendor/composer/LICENSE CHANGED
@@ -1,56 +1,21 @@
1
- Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
- Upstream-Name: Composer
3
- Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
4
- Source: https://github.com/composer/composer
5
 
6
- Files: *
7
- Copyright: 2016, Nils Adermann <naderman@naderman.de>
8
- 2016, Jordi Boggiano <j.boggiano@seld.be>
9
- License: Expat
10
 
11
- Files: src/Composer/Util/TlsHelper.php
12
- Copyright: 2016, Nils Adermann <naderman@naderman.de>
13
- 2016, Jordi Boggiano <j.boggiano@seld.be>
14
- 2013, Evan Coury <me@evancoury.com>
15
- License: Expat and BSD-2-Clause
 
16
 
17
- License: BSD-2-Clause
18
- Redistribution and use in source and binary forms, with or without modification,
19
- are permitted provided that the following conditions are met:
20
- .
21
- * Redistributions of source code must retain the above copyright notice,
22
- this list of conditions and the following disclaimer.
23
- .
24
- * Redistributions in binary form must reproduce the above copyright notice,
25
- this list of conditions and the following disclaimer in the documentation
26
- and/or other materials provided with the distribution.
27
- .
28
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
32
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
33
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
35
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
 
39
- License: Expat
40
- Permission is hereby granted, free of charge, to any person obtaining a copy
41
- of this software and associated documentation files (the "Software"), to deal
42
- in the Software without restriction, including without limitation the rights
43
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
- copies of the Software, and to permit persons to whom the Software is furnished
45
- to do so, subject to the following conditions:
46
- .
47
- The above copyright notice and this permission notice shall be included in all
48
- copies or substantial portions of the Software.
49
- .
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
56
- THE SOFTWARE.
 
 
 
 
1
 
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
 
 
 
3
 
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
 
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852
6
  {
7
  private static $loader;
8
 
@@ -13,21 +13,24 @@ class ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852
13
  }
14
  }
15
 
 
 
 
16
  public static function getLoader()
17
  {
18
  if (null !== self::$loader) {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit889b56da8e5c956977b4e015c55d5852::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +51,19 @@ class ComposerAutoloaderInit889b56da8e5c956977b4e015c55d5852
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire889b56da8e5c956977b4e015c55d5852($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire889b56da8e5c956977b4e015c55d5852($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit460c17ef6a9eaa75f4cb75bec3b19218
6
  {
7
  private static $loader;
8
 
13
  }
14
  }
15
 
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
  public static function getLoader()
20
  {
21
  if (null !== self::$loader) {
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit460c17ef6a9eaa75f4cb75bec3b19218', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit460c17ef6a9eaa75f4cb75bec3b19218', '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_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire460c17ef6a9eaa75f4cb75bec3b19218($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire460c17ef6a9eaa75f4cb75bec3b19218($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit889b56da8e5c956977b4e015c55d5852
8
  {
9
  public static $files = array (
10
  '344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
@@ -44,9 +44,9 @@ class ComposerStaticInit889b56da8e5c956977b4e015c55d5852
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
- $loader->prefixLengthsPsr4 = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$prefixLengthsPsr4;
48
- $loader->prefixDirsPsr4 = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$prefixDirsPsr4;
49
- $loader->classMap = ComposerStaticInit889b56da8e5c956977b4e015c55d5852::$classMap;
50
 
51
  }, null, ClassLoader::class);
52
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218
8
  {
9
  public static $files = array (
10
  '344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
44
  public static function getInitializer(ClassLoader $loader)
45
  {
46
  return \Closure::bind(function () use ($loader) {
47
+ $loader->prefixLengthsPsr4 = ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218::$prefixLengthsPsr4;
48
+ $loader->prefixDirsPsr4 = ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218::$prefixDirsPsr4;
49
+ $loader->classMap = ComposerStaticInit460c17ef6a9eaa75f4cb75bec3b19218::$classMap;
50
 
51
  }, null, ClassLoader::class);
52
  }