Loco Translate - Version 2.4.3

Version Description

  • Improved fix for default syncing of msgstr fields
  • Reverted accidental removal of js debug flag
  • Minor fixes to API error messages
  • Removed use of jQuery.browser
  • Bugfix for new preferences in usermeta
Download this release

Release Info

Developer timwhitlock
Plugin Icon 128x128 Loco Translate
Version 2.4.3
Comparing to
See all releases

Code changes from version 2.4.2 to 2.4.3

languages/loco-translate.pot CHANGED
@@ -1,9 +1,9 @@
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
- "Project-Id-Version: Loco Translate 2.4.2-dev\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2020-08-10 12:48+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.4.2-dev; wp-5.5-RC2-48740"
17
 
18
  #: src/fs/FileWriter.php:214
19
  #, php-format
@@ -436,7 +436,7 @@ msgstr ""
436
  msgid "Disallow"
437
  msgstr ""
438
 
439
- #: src/data/Settings.php:170 src/admin/file/EditController.php:190
440
  #: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:177
441
  #: tpl/admin/config/apis.php:122 tpl/admin/config/prefs.php:45
442
  #: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
@@ -490,13 +490,13 @@ msgid "%s translation"
490
  msgstr ""
491
 
492
  #. button for adding a new string when manually editing a POT file
493
- #: src/admin/file/EditController.php:215
494
  msgctxt "Editor"
495
  msgid "Add"
496
  msgstr ""
497
 
498
  #. Button that opens window for auto-translating
499
- #: src/admin/file/EditController.php:226
500
  msgctxt "Editor"
501
  msgid "Auto"
502
  msgstr ""
@@ -520,7 +520,7 @@ msgid "Context not loaded"
520
  msgstr ""
521
 
522
  #. Button for downloading a PO, MO or POT file
523
- #: src/admin/file/EditController.php:228
524
  msgctxt "Editor"
525
  msgid "Download"
526
  msgstr ""
@@ -532,19 +532,19 @@ msgid "Plural"
532
  msgstr ""
533
 
534
  #. button for removing a string when manually editing a POT file
535
- #: src/admin/file/EditController.php:217
536
  msgctxt "Editor"
537
  msgid "Remove"
538
  msgstr ""
539
 
540
  #. Button that reloads current screen
541
- #: src/admin/file/EditController.php:224
542
  msgctxt "Editor"
543
  msgid "Revert"
544
  msgstr ""
545
 
546
  #. Button that saves translations to disk
547
- #: src/admin/file/EditController.php:220
548
  msgctxt "Editor"
549
  msgid "Save"
550
  msgstr ""
@@ -574,13 +574,13 @@ msgid "Suggest translation"
574
  msgstr ""
575
 
576
  #. Button that runs in-editor sync/operation
577
- #: src/admin/file/EditController.php:222
578
  msgctxt "Editor"
579
  msgid "Sync"
580
  msgstr ""
581
 
582
  #. Button that toggles between "code" and regular text editing modes
583
- #: src/admin/file/EditController.php:234
584
  msgctxt "Editor"
585
  msgid "Toggle code view"
586
  msgstr ""
@@ -591,7 +591,7 @@ msgid "Toggle Fuzzy"
591
  msgstr ""
592
 
593
  #. Button that toggles invisible characters
594
- #: src/admin/file/EditController.php:232
595
  msgctxt "Editor"
596
  msgid "Toggle invisibles"
597
  msgstr ""
@@ -813,7 +813,7 @@ msgid ""
813
  msgstr ""
814
 
815
  #. Placeholder text for text filter above editor
816
- #: src/admin/file/EditController.php:230
817
  msgid "Filter translations"
818
  msgstr ""
819
 
@@ -864,7 +864,7 @@ msgstr ""
864
  msgid "Grant access to roles"
865
  msgstr ""
866
 
867
- #: src/admin/file/EditController.php:218 tpl/admin/file/edit-po.php:45
868
  #: tpl/admin/file/edit-po.php:65
869
  msgid "Help"
870
  msgstr ""
@@ -1048,7 +1048,7 @@ msgstr ""
1048
  msgid "Loco Translate %s"
1049
  msgstr ""
1050
 
1051
- #: src/data/Settings.php:168
1052
  msgid ""
1053
  "Loco Translate 2.4 supports third party translation providers. Set up your "
1054
  "API keys in the plugin settings!"
@@ -1238,7 +1238,7 @@ msgstr[0] ""
1238
  msgstr[1] ""
1239
 
1240
  #. Where %2$s is the maximum size of a file that will be included and %3$s is the largest encountered
1241
- #: src/ajax/SyncController.php:75
1242
  #, php-format
1243
  msgid ""
1244
  "One file has been skipped because it's %3$s. (Max is %2$s). Check all "
@@ -1526,7 +1526,7 @@ msgid "Sets"
1526
  msgstr ""
1527
 
1528
  #: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
1529
- #: src/data/Settings.php:169 src/admin/file/EditController.php:189
1530
  #: tpl/admin/file/edit-po.php:62 tpl/admin/common/inc-fsconn.php:18
1531
  #: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
1532
  msgid "Settings"
@@ -1778,7 +1778,7 @@ msgid "This information is for developers to find problems in the bundle setup"
1778
  msgstr ""
1779
 
1780
  #. Warning when POT file is opened in the file editor. It can be disabled in settings.
1781
- #: src/admin/file/EditController.php:188
1782
  msgid ""
1783
  "This is NOT a translation file. Manual editing of source strings is not "
1784
  "recommended."
@@ -1857,12 +1857,12 @@ msgid "Translation progress %s%%"
1857
  msgstr ""
1858
 
1859
  #. Where %s is the name of the invalid POT file
1860
- #: src/ajax/SyncController.php:54 src/admin/file/EditController.php:150
1861
  #, php-format
1862
  msgid "Translation template is invalid (%s)"
1863
  msgstr ""
1864
 
1865
- #: src/admin/file/EditController.php:145
1866
  #, php-format
1867
  msgid "Translations don't match template. Run sync to update from %s"
1868
  msgstr ""
1
  #, fuzzy
2
  msgid ""
3
  msgstr ""
4
+ "Project-Id-Version: Loco Translate 2.4.3\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-08-28 08:57+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.4.3; wp-5.5"
17
 
18
  #: src/fs/FileWriter.php:214
19
  #, php-format
436
  msgid "Disallow"
437
  msgstr ""
438
 
439
+ #: src/data/Settings.php:171 src/admin/file/EditController.php:196
440
  #: src/admin/bundle/LocaleController.php:130 tpl/admin/config/settings.php:177
441
  #: tpl/admin/config/apis.php:122 tpl/admin/config/prefs.php:45
442
  #: tpl/admin/common/inc-fsconn.php:16 tpl/admin/common/inc-fsconn.php:41
490
  msgstr ""
491
 
492
  #. button for adding a new string when manually editing a POT file
493
+ #: src/admin/file/EditController.php:221
494
  msgctxt "Editor"
495
  msgid "Add"
496
  msgstr ""
497
 
498
  #. Button that opens window for auto-translating
499
+ #: src/admin/file/EditController.php:232
500
  msgctxt "Editor"
501
  msgid "Auto"
502
  msgstr ""
520
  msgstr ""
521
 
522
  #. Button for downloading a PO, MO or POT file
523
+ #: src/admin/file/EditController.php:234
524
  msgctxt "Editor"
525
  msgid "Download"
526
  msgstr ""
532
  msgstr ""
533
 
534
  #. button for removing a string when manually editing a POT file
535
+ #: src/admin/file/EditController.php:223
536
  msgctxt "Editor"
537
  msgid "Remove"
538
  msgstr ""
539
 
540
  #. Button that reloads current screen
541
+ #: src/admin/file/EditController.php:230
542
  msgctxt "Editor"
543
  msgid "Revert"
544
  msgstr ""
545
 
546
  #. Button that saves translations to disk
547
+ #: src/admin/file/EditController.php:226
548
  msgctxt "Editor"
549
  msgid "Save"
550
  msgstr ""
574
  msgstr ""
575
 
576
  #. Button that runs in-editor sync/operation
577
+ #: src/admin/file/EditController.php:228
578
  msgctxt "Editor"
579
  msgid "Sync"
580
  msgstr ""
581
 
582
  #. Button that toggles between "code" and regular text editing modes
583
+ #: src/admin/file/EditController.php:240
584
  msgctxt "Editor"
585
  msgid "Toggle code view"
586
  msgstr ""
591
  msgstr ""
592
 
593
  #. Button that toggles invisible characters
594
+ #: src/admin/file/EditController.php:238
595
  msgctxt "Editor"
596
  msgid "Toggle invisibles"
597
  msgstr ""
813
  msgstr ""
814
 
815
  #. Placeholder text for text filter above editor
816
+ #: src/admin/file/EditController.php:236
817
  msgid "Filter translations"
818
  msgstr ""
819
 
864
  msgid "Grant access to roles"
865
  msgstr ""
866
 
867
+ #: src/admin/file/EditController.php:224 tpl/admin/file/edit-po.php:45
868
  #: tpl/admin/file/edit-po.php:65
869
  msgid "Help"
870
  msgstr ""
1048
  msgid "Loco Translate %s"
1049
  msgstr ""
1050
 
1051
+ #: src/data/Settings.php:169
1052
  msgid ""
1053
  "Loco Translate 2.4 supports third party translation providers. Set up your "
1054
  "API keys in the plugin settings!"
1238
  msgstr[1] ""
1239
 
1240
  #. Where %2$s is the maximum size of a file that will be included and %3$s is the largest encountered
1241
+ #: src/ajax/SyncController.php:73
1242
  #, php-format
1243
  msgid ""
1244
  "One file has been skipped because it's %3$s. (Max is %2$s). Check all "
1526
  msgstr ""
1527
 
1528
  #: src/mvc/AdminRouter.php:67 src/mvc/AdminRouter.php:72
1529
+ #: src/data/Settings.php:170 src/admin/file/EditController.php:195
1530
  #: tpl/admin/file/edit-po.php:62 tpl/admin/common/inc-fsconn.php:18
1531
  #: tpl/admin/common/inc-fsconn.php:43 tpl/admin/errors/no-backups.php:24
1532
  msgid "Settings"
1778
  msgstr ""
1779
 
1780
  #. Warning when POT file is opened in the file editor. It can be disabled in settings.
1781
+ #: src/admin/file/EditController.php:194
1782
  msgid ""
1783
  "This is NOT a translation file. Manual editing of source strings is not "
1784
  "recommended."
1857
  msgstr ""
1858
 
1859
  #. Where %s is the name of the invalid POT file
1860
+ #: src/ajax/SyncController.php:54 src/admin/file/EditController.php:156
1861
  #, php-format
1862
  msgid "Translation template is invalid (%s)"
1863
  msgstr ""
1864
 
1865
+ #: src/admin/file/EditController.php:151
1866
  #, php-format
1867
  msgid "Translations don't match template. Run sync to update from %s"
1868
  msgstr ""
lib/data/locales.php CHANGED
@@ -2,4 +2,4 @@
2
  /**
3
  * Compiled data. Do not edit.
4
  */
5
- return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'bel'=>array(0=>'Belarusian',1=>'Беларуская мова'),'bg_BG'=>array(0=>'Bulgarian',1=>'Български'),'bn_BD'=>array(0=>'Bengali (Bangladesh)',1=>'বাংলা'),'bo'=>array(0=>'Tibetan',1=>'བོད་ཡིག'),'bs_BA'=>array(0=>'Bosnian',1=>'Bosanski'),'ca'=>array(0=>'Catalan',1=>'Català'),'ceb'=>array(0=>'Cebuano',1=>'Cebuano'),'cs_CZ'=>array(0=>'Czech',1=>'Čeština'),'cy'=>array(0=>'Welsh',1=>'Cymraeg'),'da_DK'=>array(0=>'Danish',1=>'Dansk'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'et'=>array(0=>'Estonian',1=>'Eesti'),'eu'=>array(0=>'Basque',1=>'Euskara'),'fa_IR'=>array(0=>'Persian',1=>'فارسی'),'fi'=>array(0=>'Finnish',1=>'Suomi'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'fr_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fr_BE'=>array(0=>'French (Belgium)',1=>'Français de Belgique'),'fur'=>array(0=>'Friulian',1=>'Friulian'),'gd'=>array(0=>'Scottish Gaelic',1=>'Gàidhlig'),'gl_ES'=>array(0=>'Galician',1=>'Galego'),'gu'=>array(0=>'Gujarati',1=>'ગુજરાતી'),'haz'=>array(0=>'Hazaragi',1=>'هزاره گی'),'he_IL'=>array(0=>'Hebrew',1=>'עִבְרִית'),'hi_IN'=>array(0=>'Hindi',1=>'हिन्दी'),'hr'=>array(0=>'Croatian',1=>'Hrvatski'),'hu_HU'=>array(0=>'Hungarian',1=>'Magyar'),'hy'=>array(0=>'Armenian',1=>'Հայերեն'),'id_ID'=>array(0=>'Indonesian',1=>'Bahasa Indonesia'),'is_IS'=>array(0=>'Icelandic',1=>'Íslenska'),'it_IT'=>array(0=>'Italian',1=>'Italiano'),'ja'=>array(0=>'Japanese',1=>'日本語'),'jv_ID'=>array(0=>'Javanese',1=>'Basa Jawa'),'ka_GE'=>array(0=>'Georgian',1=>'ქართული'),'kab'=>array(0=>'Kabyle',1=>'Taqbaylit'),'kk'=>array(0=>'Kazakh',1=>'Қазақ тілі'),'km'=>array(0=>'Khmer',1=>'ភាសាខ្មែរ'),'ko_KR'=>array(0=>'Korean',1=>'한국어'),'ckb'=>array(0=>'Kurdish (Sorani)',1=>'كوردی‎'),'lo'=>array(0=>'Lao',1=>'ພາສາລາວ'),'lt_LT'=>array(0=>'Lithuanian',1=>'Lietuvių kalba'),'lv'=>array(0=>'Latvian',1=>'Latviešu valoda'),'mk_MK'=>array(0=>'Macedonian',1=>'Македонски јазик'),'ml_IN'=>array(0=>'Malayalam',1=>'മലയാളം'),'mn'=>array(0=>'Mongolian',1=>'Монгол'),'mr'=>array(0=>'Marathi',1=>'मराठी'),'ms_MY'=>array(0=>'Malay',1=>'Bahasa Melayu'),'my_MM'=>array(0=>'Myanmar (Burmese)',1=>'ဗမာစာ'),'nb_NO'=>array(0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'),'ne_NP'=>array(0=>'Nepali',1=>'नेपाली'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'nl_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nn_NO'=>array(0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'),'oci'=>array(0=>'Occitan',1=>'Occitan'),'pa_IN'=>array(0=>'Punjabi',1=>'ਪੰਜਾਬੀ'),'pl_PL'=>array(0=>'Polish',1=>'Polski'),'ps'=>array(0=>'Pashto',1=>'پښتو'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'rhg'=>array(0=>'Rohingya',1=>'Ruáinga'),'ro_RO'=>array(0=>'Romanian',1=>'Română'),'ru_RU'=>array(0=>'Russian',1=>'Русский'),'sah'=>array(0=>'Sakha',1=>'Сахалыы'),'si_LK'=>array(0=>'Sinhala',1=>'සිංහල'),'sk_SK'=>array(0=>'Slovak',1=>'Slovenčina'),'sl_SI'=>array(0=>'Slovenian',1=>'Slovenščina'),'sq'=>array(0=>'Albanian',1=>'Shqip'),'sr_RS'=>array(0=>'Serbian',1=>'Српски језик'),'sv_SE'=>array(0=>'Swedish',1=>'Svenska'),'szl'=>array(0=>'Silesian',1=>'Ślōnskŏ gŏdka'),'ta_IN'=>array(0=>'Tamil',1=>'தமிழ்'),'te'=>array(0=>'Telugu',1=>'తెలుగు'),'th'=>array(0=>'Thai',1=>'ไทย'),'tl'=>array(0=>'Tagalog',1=>'Tagalog'),'tr_TR'=>array(0=>'Turkish',1=>'Türkçe'),'tt_RU'=>array(0=>'Tatar',1=>'Татар теле'),'tah'=>array(0=>'Tahitian',1=>'Reo Tahiti'),'ug_CN'=>array(0=>'Uighur',1=>'ئۇيغۇرچە'),'uk'=>array(0=>'Ukrainian',1=>'Українська'),'ur'=>array(0=>'Urdu',1=>'اردو'),'uz_UZ'=>array(0=>'Uzbek',1=>'O‘zbekcha'),'vi'=>array(0=>'Vietnamese',1=>'Tiếng Việt'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '),'zh_CN'=>array(0=>'Chinese (China)',1=>'简体中文'),'zh_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'));
2
  /**
3
  * Compiled data. Do not edit.
4
  */
5
+ return array('af'=>array(0=>'Afrikaans',1=>'Afrikaans'),'ar'=>array(0=>'Arabic',1=>'العربية'),'ary'=>array(0=>'Moroccan Arabic',1=>'العربية المغربية'),'as'=>array(0=>'Assamese',1=>'অসমীয়া'),'azb'=>array(0=>'South Azerbaijani',1=>'گؤنئی آذربایجان'),'az'=>array(0=>'Azerbaijani',1=>'Azərbaycan dili'),'bel'=>array(0=>'Belarusian',1=>'Беларуская мова'),'bg_BG'=>array(0=>'Bulgarian',1=>'Български'),'bn_BD'=>array(0=>'Bengali (Bangladesh)',1=>'বাংলা'),'bo'=>array(0=>'Tibetan',1=>'བོད་ཡིག'),'bs_BA'=>array(0=>'Bosnian',1=>'Bosanski'),'ca'=>array(0=>'Catalan',1=>'Català'),'ceb'=>array(0=>'Cebuano',1=>'Cebuano'),'cs_CZ'=>array(0=>'Czech',1=>'Čeština'),'cy'=>array(0=>'Welsh',1=>'Cymraeg'),'da_DK'=>array(0=>'Danish',1=>'Dansk'),'de_CH_informal'=>array(0=>'German (Switzerland, Informal)',1=>'Deutsch (Schweiz, Du)'),'de_DE'=>array(0=>'German',1=>'Deutsch'),'de_DE_formal'=>array(0=>'German (Formal)',1=>'Deutsch (Sie)'),'de_CH'=>array(0=>'German (Switzerland)',1=>'Deutsch (Schweiz)'),'dzo'=>array(0=>'Dzongkha',1=>'རྫོང་ཁ'),'el'=>array(0=>'Greek',1=>'Ελληνικά'),'en_CA'=>array(0=>'English (Canada)',1=>'English (Canada)'),'en_AU'=>array(0=>'English (Australia)',1=>'English (Australia)'),'en_GB'=>array(0=>'English (UK)',1=>'English (UK)'),'en_ZA'=>array(0=>'English (South Africa)',1=>'English (South Africa)'),'en_NZ'=>array(0=>'English (New Zealand)',1=>'English (New Zealand)'),'eo'=>array(0=>'Esperanto',1=>'Esperanto'),'es_GT'=>array(0=>'Spanish (Guatemala)',1=>'Español de Guatemala'),'es_AR'=>array(0=>'Spanish (Argentina)',1=>'Español de Argentina'),'es_VE'=>array(0=>'Spanish (Venezuela)',1=>'Español de Venezuela'),'es_CL'=>array(0=>'Spanish (Chile)',1=>'Español de Chile'),'es_MX'=>array(0=>'Spanish (Mexico)',1=>'Español de México'),'es_CR'=>array(0=>'Spanish (Costa Rica)',1=>'Español de Costa Rica'),'es_PE'=>array(0=>'Spanish (Peru)',1=>'Español de Perú'),'es_CO'=>array(0=>'Spanish (Colombia)',1=>'Español de Colombia'),'es_ES'=>array(0=>'Spanish (Spain)',1=>'Español'),'et'=>array(0=>'Estonian',1=>'Eesti'),'eu'=>array(0=>'Basque',1=>'Euskara'),'fa_IR'=>array(0=>'Persian',1=>'فارسی'),'fi'=>array(0=>'Finnish',1=>'Suomi'),'fr_BE'=>array(0=>'French (Belgium)',1=>'Français de Belgique'),'fr_FR'=>array(0=>'French (France)',1=>'Français'),'fr_CA'=>array(0=>'French (Canada)',1=>'Français du Canada'),'fur'=>array(0=>'Friulian',1=>'Friulian'),'gd'=>array(0=>'Scottish Gaelic',1=>'Gàidhlig'),'gl_ES'=>array(0=>'Galician',1=>'Galego'),'gu'=>array(0=>'Gujarati',1=>'ગુજરાતી'),'haz'=>array(0=>'Hazaragi',1=>'هزاره گی'),'he_IL'=>array(0=>'Hebrew',1=>'עִבְרִית'),'hi_IN'=>array(0=>'Hindi',1=>'हिन्दी'),'hr'=>array(0=>'Croatian',1=>'Hrvatski'),'hu_HU'=>array(0=>'Hungarian',1=>'Magyar'),'hy'=>array(0=>'Armenian',1=>'Հայերեն'),'id_ID'=>array(0=>'Indonesian',1=>'Bahasa Indonesia'),'is_IS'=>array(0=>'Icelandic',1=>'Íslenska'),'it_IT'=>array(0=>'Italian',1=>'Italiano'),'ja'=>array(0=>'Japanese',1=>'日本語'),'jv_ID'=>array(0=>'Javanese',1=>'Basa Jawa'),'ka_GE'=>array(0=>'Georgian',1=>'ქართული'),'kab'=>array(0=>'Kabyle',1=>'Taqbaylit'),'kk'=>array(0=>'Kazakh',1=>'Қазақ тілі'),'km'=>array(0=>'Khmer',1=>'ភាសាខ្មែរ'),'ko_KR'=>array(0=>'Korean',1=>'한국어'),'ckb'=>array(0=>'Kurdish (Sorani)',1=>'كوردی‎'),'lo'=>array(0=>'Lao',1=>'ພາສາລາວ'),'lt_LT'=>array(0=>'Lithuanian',1=>'Lietuvių kalba'),'lv'=>array(0=>'Latvian',1=>'Latviešu valoda'),'mk_MK'=>array(0=>'Macedonian',1=>'Македонски јазик'),'ml_IN'=>array(0=>'Malayalam',1=>'മലയാളം'),'mn'=>array(0=>'Mongolian',1=>'Монгол'),'mr'=>array(0=>'Marathi',1=>'मराठी'),'ms_MY'=>array(0=>'Malay',1=>'Bahasa Melayu'),'my_MM'=>array(0=>'Myanmar (Burmese)',1=>'ဗမာစာ'),'nb_NO'=>array(0=>'Norwegian (Bokmål)',1=>'Norsk bokmål'),'ne_NP'=>array(0=>'Nepali',1=>'नेपाली'),'nl_NL_formal'=>array(0=>'Dutch (Formal)',1=>'Nederlands (Formeel)'),'nl_NL'=>array(0=>'Dutch',1=>'Nederlands'),'nl_BE'=>array(0=>'Dutch (Belgium)',1=>'Nederlands (België)'),'nn_NO'=>array(0=>'Norwegian (Nynorsk)',1=>'Norsk nynorsk'),'oci'=>array(0=>'Occitan',1=>'Occitan'),'pa_IN'=>array(0=>'Punjabi',1=>'ਪੰਜਾਬੀ'),'pl_PL'=>array(0=>'Polish',1=>'Polski'),'ps'=>array(0=>'Pashto',1=>'پښتو'),'pt_BR'=>array(0=>'Portuguese (Brazil)',1=>'Português do Brasil'),'pt_PT_ao90'=>array(0=>'Portuguese (Portugal, AO90)',1=>'Português (AO90)'),'pt_PT'=>array(0=>'Portuguese (Portugal)',1=>'Português'),'rhg'=>array(0=>'Rohingya',1=>'Ruáinga'),'ro_RO'=>array(0=>'Romanian',1=>'Română'),'ru_RU'=>array(0=>'Russian',1=>'Русский'),'sah'=>array(0=>'Sakha',1=>'Сахалыы'),'si_LK'=>array(0=>'Sinhala',1=>'සිංහල'),'sk_SK'=>array(0=>'Slovak',1=>'Slovenčina'),'sl_SI'=>array(0=>'Slovenian',1=>'Slovenščina'),'sq'=>array(0=>'Albanian',1=>'Shqip'),'sr_RS'=>array(0=>'Serbian',1=>'Српски језик'),'sv_SE'=>array(0=>'Swedish',1=>'Svenska'),'szl'=>array(0=>'Silesian',1=>'Ślōnskŏ gŏdka'),'ta_IN'=>array(0=>'Tamil',1=>'தமிழ்'),'te'=>array(0=>'Telugu',1=>'తెలుగు'),'th'=>array(0=>'Thai',1=>'ไทย'),'tl'=>array(0=>'Tagalog',1=>'Tagalog'),'tr_TR'=>array(0=>'Turkish',1=>'Türkçe'),'tt_RU'=>array(0=>'Tatar',1=>'Татар теле'),'tah'=>array(0=>'Tahitian',1=>'Reo Tahiti'),'ug_CN'=>array(0=>'Uighur',1=>'ئۇيغۇرچە'),'uk'=>array(0=>'Ukrainian',1=>'Українська'),'ur'=>array(0=>'Urdu',1=>'اردو'),'uz_UZ'=>array(0=>'Uzbek',1=>'O‘zbekcha'),'vi'=>array(0=>'Vietnamese',1=>'Tiếng Việt'),'zh_HK'=>array(0=>'Chinese (Hong Kong)',1=>'香港中文版 '),'zh_TW'=>array(0=>'Chinese (Taiwan)',1=>'繁體中文'),'zh_CN'=>array(0=>'Chinese (China)',1=>'简体中文'));
loco.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Loco Translate
4
  Plugin URI: https://wordpress.org/plugins/loco-translate/
5
  Description: Translate themes and plugins directly in WordPress
6
  Author: Tim Whitlock
7
- Version: 2.4.2
8
  Author URI: https://localise.biz/wordpress/plugin
9
  Text Domain: loco-translate
10
  Domain Path: /languages/
@@ -30,7 +30,7 @@ function loco_plugin_file(){
30
  * @return string
31
  */
32
  function loco_plugin_version(){
33
- return '2.4.2';
34
  }
35
 
36
 
4
  Plugin URI: https://wordpress.org/plugins/loco-translate/
5
  Description: Translate themes and plugins directly in WordPress
6
  Author: Tim Whitlock
7
+ Version: 2.4.3
8
  Author URI: https://localise.biz/wordpress/plugin
9
  Text Domain: loco-translate
10
  Domain Path: /languages/
30
  * @return string
31
  */
32
  function loco_plugin_version(){
33
+ return '2.4.3';
34
  }
35
 
36
 
pub/js/min/admin.js CHANGED
@@ -1,18 +1,18 @@
1
  (function(x,u,k,I){var m=function(){function g(e){throw Error("Failed to require "+e);}var e={};return{register:function(g,n){e[g]=n},require:function(k,n){return e[k]||g(n)},include:function(k,n,d){return e[k]||(d?g(n):null)}}}();m.register("$1",function(g,e,k){function n(d){var c=typeof d;if("string"===c)if(/[^ <>!=()%^&|?:n0-9]/.test(d))console.error("Invalid plural: "+d);else return new Function("n","return "+d);"function"!==c&&(d=function(b){return 1!=b});return d}g.init=function(d){function c(a,
2
- l,c){return(a=b[a])&&a[c]?a[c]:l||""}d=n(d);var b={};return{_:function(a){return c(a,a,0)},_x:function(a,b){return c(b+"\u0004"+a,a,0)},_n:function(a,b,f){f=Number(d(f));isNaN(f)&&(f=0);return c(a,f?b:a,f)},load:function(a){b=a||{};return this},pluraleq:function(a){d=n(a);return this}}};return g}({},x,u));m.register("$2",function(g,e,m){g.ie=function(){var e=k&&k.browser||{},d=e.msie&&11>Number(e.version),e=null;return function(){return d}}();g.init=function(){return g};return g}({},x,u));m.register("$3",
3
- function(g,e,k){Number.prototype.format=function(e){e=Math.pow(10,e||0);var d=Math.round(e*this)/e;e=[];var d=String(d),c=d.split("."),d=c[0],c=c[1],b=d.length;do e.unshift(d.substring(b-3,b));while(0<(b-=3));d=e.join(",");if(e=c){e=c;for(var a,c=e.length;"0"===e.charAt(--c);)a=c;a&&(e=e.substring(0,a));e=c=e}e&&(d+="."+c);return d};Number.prototype.percent=function(e){var d=0,c=this&&e?100*(this/e):0;if(0===c)return"0";if(100===c)return"100";if(99<c)c=Math.min(c,99.9),e=c.format(++d);else if(0.5>
4
- c){c=Math.max(c,1E-4);do e=c.format(++d);while("0"===e&&4>d);e=e.substr(1)}else e=c.format(0);return e};return g}({},x,u));m.register("$4",function(g,e,k){Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var d,c=Object(this),b=c.length>>>0;if(0===b)return-1;d=0;1<arguments.length&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&Infinity!=d&&-Infinity!=d&&(d=(0<d||-1)*Math.floor(Math.abs(d))));if(d>=b)return-1;for(d=0<=d?d:Math.max(b-Math.abs(d),0);d<b;d++)if(d in
5
- c&&c[d]===e)return d;return-1});return g}({},x,u));m.register("$5",function(g,e,m){e.JSON||(e.JSON={parse:k.parseJSON,stringify:null});return g=e.JSON}({},x,u));m.register("$6",function(g,e,k){g.trim=function(e,d){for(d||(d=" \n");e&&-1!==d.indexOf(e.substr(0,1));)e=e.substr(1);for(;e&&-1!==d.indexOf(e.substr(-1));)e=e.substr(0,e.length-1);return e};g.sprintf=function(e){var d=0,c,b=[].slice.call(arguments,1);return e.replace(/%([sud%])/g,function(a,l){if("%"===l)return"%";c=b[d++];return String(c)||
6
- ""})};return g}({},x,u));m.register("$21",function(g,e,k){function n(d){return function(c,b){for(var a=c[d]||0;(c=c.offsetParent)&&c!==(b||k.body);)a+=c[d]||0;return a}}g.top=n("offsetTop");g.left=n("offsetLeft");g.el=function(d,c){var b=k.createElement(d||"div");c&&(b.className=c);return b};g.txt=function(d){return k.createTextNode(d||"")};return g}({},x,u));m.register("$7",function(g,e,A){function n(a,b,l){function c(){f();z=setTimeout(b,l)}function f(){z&&clearTimeout(z);z=null}var z;c();k(a).mouseenter(f).mouseleave(c);
7
- return{die:function(){f();k(a).off("mouseenter mouseleave")}}}function d(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();k(e).triggerHandler("resize")})});return a}function c(a,b){function c(b){q[z]=null;d(k(a),250);f&&f.die();var l;if(l=b)b.stopPropagation(),b.preventDefault(),l=!1;return l}function l(b){f&&f.die();return f=n(a,c,b)}var f,z,w,h=k(a),r=h.find("button");0===r.length&&(h.addClass("is-dismissible"),r=k('<button type="button" class="notice-dismiss"> </a>').appendTo(h));
8
  r.off("click").click(c);k(e).triggerHandler("resize");v();z=q.length;q.push(c);b&&(f=l(b));return{link:function(b,l){var c=l||b,z=k(a).find("nav"),c=k("<nav></nav>").append(k("<a></a>").attr("href",b).text(c));w?(w.push(c.html()),z.html(w.join("<span> | </span>"))):(w=[c.html()],k(a).addClass("has-nav").append(c));return this},stick:function(){f&&f.die();f=null;q[z]=null;return this},slow:function(a){l(a||1E4);return this}}}function b(a,b,c){var l=m.require("$21","dom.js").el;a=k('<div class="notice notice-'+
9
  a+' loco-notice inline"></div>').prependTo(k("#loco-notices"));var f=k(l("p"));c=k(l("span")).text(c);b=k(l("strong","has-icon")).text(b+": ");f.append(b).append(c).appendTo(a);return a}function a(a,l,f,w){a=b(f,l,a).css("opacity","0").fadeTo(500,1);k(e).triggerHandler("resize");return c(a,w)}function l(b){return a(b,r,"warning")}function f(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var l=-1===b.className.indexOf("notice-success")?null:5E3;c(b,
10
- l)}})}var q=[],h=e.console||{log:function(){}},v=Date.now||function(){return(new Date).getTime()},B,r,w,C;g.error=function(b){return a(b,B,"error")};g.warn=l;g.info=function(b){return a(b,w,"info")};g.success=function(b){return a(b,C,"success",5E3)};g.warning=l;g.log=function(){h.log.apply(h,arguments)};g.debug=function(a,b){(h.error||h.log)("Loco: "+a);b&&h.log(b)};g.clear=function(){for(var a=-1,b,l=q,c=l.length;++a<c;)(b=l[a])&&b.call&&b();q=[];return g};g.create=b;g.raise=function(a){(g[a.type]||
11
- g.error).call(g,a.message)};g.convert=c;g.init=function(a){B=a._("Error");r=a._("Warning");w=a._("Notice");C=a._("OK");setTimeout(f,1E3);return g};return g}({},x,u));m.register("$8",function(g,e,A){function n(a){var b=k("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function d(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,
12
  "")):t._("Server returned invalid data")}function c(a,b,l){a[b]=l}function b(a,b,l){a.push({name:b,value:l})}function a(a,b,l){a.append(b,l)}function l(a,b,l,c){function f(b,c,v){if("abort"!==c){var z=q||{_:function(a){return a}},e=b.status,r=b.responseText,s=n(r),C=b.getResponseHeader("Content-Type")||"text/html",g=b.getResponseHeader("Content-Length")||r.length;"success"===c&&v?y.error(v):(y.error(d(s)+".\n"+z._("Check console output for debugging information")),y.debug("Ajax failure for "+a,{status:e,
13
  error:c,message:v,output:r}),"parsererror"===c&&(v="Response not JSON"),y.log([z._("Provide the following text when reporting a problem")+":","----","Status "+e+' "'+(v||z._("Unknown error"))+'" ('+C+" "+g+" bytes)",s,"===="].join("\n")));l&&l.call&&l(b,c,v);h=b}}c.url=v;c.dataType="json";var y=m.require("$7","notices.js").clear();h=null;return k.ajax(c).fail(f).done(function(a,l,c){var z=a&&a.data,h=a&&a.notices,w=h&&h.length;for(!z||a.error?f(c,l,a&&a.error&&a.error.message):b&&b(z,l,c);w--;)y.raise(h[w])})}
14
  var f={},q,h,v=e.ajaxurl||"/wp-admin/admin-ajax.php";g.init=function(a){f=a.nonces||f;return g};g.localise=function(a){q=a;return g};g.xhr=function(){return h};g.strip=n;g.parse=d;g.submit=function(a,b,c){function f(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function h(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function v(a){a.find(".button-primary").removeClass("loading");a.find("button").each(h);a.find("input").each(h);a.find("select").each(h);a.find("textarea").each(h);
15
- a.removeClass("disabled loading")}var d=k(a),q=d.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(f);a.find("input").each(f);a.find("select").each(f);a.find("textarea").each(f);a.addClass("disabled loading")})(d);return l(a.route.value,function(a,l,c){v(d);b&&b(a,l,c)},function(a,b,l){v(d);c&&c(a,b,l)},{type:a.method,data:q})};g.post=function(h,v,w,d){var q,y=!0;v=v||{};(q=f[h])||(e.console&&console.error&&console.error('No nonce for "'+h+'"'),q="");var J=
16
  q;e.FormData&&v instanceof FormData?(y=!1,q=a):q=Array.isArray(v)?b:c;q(v,"action","loco_json");q(v,"route",h);q(v,"loco-nonce",J);return l(h,w,d,{type:"post",data:v,processData:y,contentType:y?"application/x-www-form-urlencoded; charset=UTF-8":!1})};g.setNonce=function(a,b){f[a]=b;return g};return g}({},x,u));m.register("$22",{arab:1,aran:1,hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,
17
  lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$9",function(g,e,k){function n(){}var d,c=m.require("$22","rtl.json");g.init=function(){return new n};g.cast=function(b){return b instanceof n?b:"string"===typeof b?g.parse(b):g.clone(b)};g.clone=function(b){var a,l=new n;for(a in b)l[a]=b[a];return l};g.parse=function(b){if(!(d||(d=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(b))return null;var a=new n;a.lang=RegExp.$1.toLowerCase();if(b=RegExp.$2)a.region=
18
  b.toUpperCase();if(b=RegExp.$3)a.variant=b.toLowerCase();return a};e=n.prototype;e.isValid=function(){return!!this.lang};e.isKnown=function(){var b=this.lang;return!(!b||"zxx"===b)};e.toString=function(b){b=b||"_";var a,l=this.lang||"zxx";if(a=this.region)l+=b+a;if(a=this.variant)l+=b+a;return l};e.getIcon=function(){for(var b=3,a,l,c=["variant","region","lang"],q=[];0!==b--;)if(a=c[b],l=this[a])q.push(a),q.push(a+"-"+l.toLowerCase());return q.join(" ")};e.isRTL=function(){return!!c[String(this.lang).toLowerCase()]};
@@ -28,9 +28,9 @@ e=null;return g}({},x,u));m.register("$23",{"\u00e1":"a","\u00e0":"a","\u0103":"
28
  "\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9","\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9","\u1fd0":"\u03b9","\u1fd6":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf",
29
  "\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5","\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5","\u1f7b":"\u03c5","\u1f7a":"\u03c5","\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9",
30
  "\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9","\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9","\u1ff4":"\u03c9","\u1f7c":"\u03c9","\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});
31
- m.register("$10",function(g,e,k){g.init=function(){function e(a){return h[a]||a}function d(a,b,l,c){b=a.split(b);for(var f=b.length;0!==f--;)(a=b[f])&&null==c[a]&&(l.push(a),c[a]=!0);return l}function c(a){return d(String(a||"").toLowerCase().replace(f,e),q,[],{})}function b(a,b){for(var c=[],h={},C,s=b.length,y=q;0!==s--;)(C=b[s])&&d(String(C||"").toLowerCase().replace(f,e),y,c,h);l[a]=c}function a(a,b){var c=[],f=-1,h=l,q=h.length,d,e,g,p,z,F,n=a.length,k=b?!0:!1;a:for(;++f<q;)if(g=h[f],null!=g&&
32
  (p=g.length)){z=0;b:for(;z<n;z++){F=a[z];for(d=0;d<p;d++)if(e=g[d],0===e.indexOf(F))continue b;continue a}c.push(k?b[f]:f)}return c}var l=[],f=/[^a-z0-9]/g,q=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,h=m.require("$23","flatten.json");return{split:c,pull:function(b,c){return a(b,c)},find:function(b,l){return a(c(b),l)},add:function(a,b){l[a]=c(b)},push:function(a){b(l.length,a)},index:function(a,c){b(a,c)},size:function(){return l.length},clear:function(){l=
33
- []},remove:function(a){l[a]=null}}};return g}({},x,u));m.register("$11",function(g,e,m){g.listen=function(g,d){function c(){r[f?"show":"hide"]()}function b(a){B&&g.setAttribute("size",2+a.length);f=a;c();return a}function a(){q=null;d(f)}function l(){var c=g.value;v&&c===v&&(c="");c!==f&&(q&&clearTimeout(q),b(c),h?q=setTimeout(a,h):a())}g instanceof jQuery&&(g=g[0]);var f,q,h=150,v=e.attachEvent&&g.getAttribute("placeholder"),B=1===Number(g.size),r=k('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){g.value=
34
  "";l();return!1});b(g.value);k(g).on("input blur focus",function(){l();return!0}).after(r);c();return{delay:function(a){h=a},ping:function(c){c?(q&&clearTimeout(q),c=g.value,v&&c===v&&(c=""),b(c),a(),c=void 0):c=l();return c},val:function(a){if(null==a)return f;q&&clearTimeout(q);g.value=b(a);c()},el:function(){return g},blur:function(a){return k(g).on("blur",a)}}};return g}({},x,u));m.register("$12",function(g,e,m){function n(b,a){this.$element=k(b);this.options=a;this.enabled=!0;this.fixTitle()}
35
  g.init=function(b,a){var l={fade:!0,offset:5,delayIn:d,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(l=k.extend({},l,a));b.tipsy(l)};g.delays=function(b,a){d=b||150;c=a||100};g.kill=function(){k("div.tipsy").remove()};g.text=function(b,a){a.data("tipsy").setTitle(b)};var d,c;g.delays();k(m.body).on("overlayOpened overlayClosing",function(b){g.kill();return!0});n.prototype={show:function(){var b=this.getTitle();if(b&&this.enabled){var a=this.tip();a.find(".tipsy-inner")[this.options.html?
36
  "html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(m.body);var b=(b=this.options.anchor)?this.$element.find(b):this.$element,b=k.extend({},b.offset(),{width:b[0].offsetWidth,height:b[0].offsetHeight}),c=a[0].offsetWidth,f=a[0].offsetHeight,d="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,h;switch(d.charAt(0)){case "n":h={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-c/2};break;case "s":h={top:b.top-
@@ -53,23 +53,23 @@ c.scrollLeft;return!0};p[f]=function(a){q(a,function(a,b){var c=h()-z[a],f=F[a]-
53
  "snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,h){s();var f=c.scrollLeft,l=a>f?1:-1,z=Math[1===l?"min":"max"],d=Math.round(16*b*l);return y=m.require("$50","fps.js").loop(function(b){b&&(f=Math.max(0,z(a,f+d)),c.scrollLeft=f,a===f&&(s(),h&&h(f)))},c)}}};g.start=function(b,c){return n(b,a,c,!1)};g.move=function(a,b){return n(a,l,b,!1)};g.end=function(a,b){return n(a,f,b,!1)};var q=g.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||
54
  "touch")===a.pointerType&&c(0,a);else for(var h=-1,f=(a.originalEvent||a).changedTouches||[];++h<f.length;)c(h,f[h])},h=Date.now||function(){return(new Date).getTime()};return g}({},x,u));m.register("$51",function(g,e,m){g.init=function(e){function d(){l.style.top=String(-e.scrollTop)+"px";return!0}function c(){var a=l;a.textContent=e.value;a.innerHTML=a.innerHTML.replace(/[ \t]/g,b).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function b(a){return'<span class="x'+
55
  a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var a=e.parentNode,l=a.insertBefore(m.createElement("div"),e);k(e).on("input",c).on("scroll",d);k(a).addClass("has-mirror");l.className="ta-mirror";var f=e.offsetWidth-e.clientWidth;2<f&&(l.style.marginRight=String(f-2)+"px");c();d();return{kill:function(){k(e).off("input",c).off("scroll",d);a.removeChild(l);l=null;k(a).removeClass("has-mirror")}}};return g}({},x,u));m.register("$30",function(g,e,k){function n(b,a){for(var c=0,f=-1,q=a&&e[a],h=d[b]||[],
56
- g=h.length;++f<g;)callback=h[f],"function"===typeof callback&&(callback(q),c++);return c}var d={},c;g.load=function(b,a,c){function f(){g&&(clearTimeout(g),g=null);B&&(B.onreadystatechange=null,B=B=B.onload=null);b&&(delete d[b],b=null)}function q(a,h){var d=B&&B.readyState;if(h||!d||"loaded"===d||"complete"===d)h||n(b,c),f()}function h(){if(0===n(b))throw Error('Failed to load "'+(c||b)+'"');f()}if(c&&e[c])"function"===typeof a&&a(e[c]);else if(null!=d[b])d[b].push(a);else{d[b]=[a];var g=setTimeout(h,
57
- 4E3),B=k.createElement("script");B.setAttribute("src",b);B.setAttribute("async","true");B.onreadystatechange=q;B.onload=q;B.onerror=h;B.onabort=f;k.getElementsByTagName("head")[0].appendChild(B)}};g.stat=function(b){var a;if(!(a=c)){for(var l,f,d=k.getElementsByTagName("script"),h=-1,e=d.length;++h<e;)if(a=d[h].getAttribute("src"))if(l=a.indexOf("/lib/vendor"),-1!==l){f=a.substr(0,l);break}a=c=f||"/static"}return a+b};return g}({},x,u));m.register("$16",function(g,e,A){function n(a,b){a.setReadOnly(!1);
58
  a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()})}function d(a){a.off("change");a.off("focus");a.off("blur")}function c(a){d(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function b(b,c){function f(){this.HighlightRules=l}var l=a(c),d=b.require,e=d("ace/lib/oop");e.inherits(l,d("ace/mode/text_highlight_rules").TextHighlightRules);e.inherits(f,d("ace/mode/text").Mode);return new f}
59
  function a(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"constant.language",regex:/<!\[CDATA\[/},{token:"constant.language",regex:/\]\]>/},{token:"locked",regex:/<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/},{token:"locked",regex:/<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/},{token:"constant.language",regex:/<\/?[:a-z]+[^>]*>/}]},c=l(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",
60
  regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
61
  {token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
62
  next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function l(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
63
- case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case q:return f||"%%"}}var f,q="auto";g.init=function(a,f,l){var g,w=!1,C=l||q,s=a.parentNode,y=s.appendChild(A.createElement("div"));k(s).addClass("has-proxy has-ace");m.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
64
  function(l){if(y){if(!l)throw Error("Failed to load code editor");g=l.edit(y);var d=g.session,e=g.renderer;g.$blockScrolling=Infinity;g.setShowInvisibles(w);g.setWrapBehavioursEnabled(!1);g.setBehavioursEnabled(!1);g.setHighlightActiveLine(!1);d.setUseSoftTabs(!1);e.setShowGutter(!0);e.setPadding(10);e.setScrollMargin(8);d.setMode(b(l,C));g.setValue(a.value,-1);d.setUseWrapMode(!0);f?n(g,f):c(g)}},"ace");return{kill:function(){g&&(d(g),g.destroy(),g=null);y&&(s.removeChild(y),k(s).removeClass("has-proxy has-ace"),
65
  y=null);return this},disable:function(){g&&c(g);f=null;return this},enable:function(a){f=a;g&&n(g,a);return this},resize:function(){g&&g.resize();return this},val:function(a){g&&a!==g.getValue()&&g.setValue(a,-1);return this},invs:function(a){a=a||!1;w!==a&&(w=a,g&&g.setShowInvisibles(a));return this},strf:function(a){a=a||q;a!==C&&(C=a,g&&g.session.setMode(b(e.ace,a)));return this},focus:function(){return this}}};g.strf=function(a,b){q=a;f=b;return g};return g}({},x,u));m.register("$52",function(g,
66
- e,A){function n(a,b){function c(){return b.val(a.getContent())}a.on("input",c);a.on("change",c);a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()});a.setMode("design")}function d(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function c(a){d(a);a.setMode("readonly")}var b=0;g.load=function(a){var b=m.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return g};g.init=function(a,l){function f(a){B=a;r="<p>"===a.substr(0,3)&&
67
- "</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function e(a){h=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!r&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===B||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(f(a),b)};l?(n(a,l),l.reset()):c(a);k(s).removeClass("loading")}var h,v=!1,B="",r=!1,
68
- w=a.parentNode,C=w.parentNode,s=w.appendChild(A.createElement("div")),y=C.insertBefore(A.createElement("nav"),w);y.id="_tb"+String(++b);k(w).addClass("has-proxy has-mce");k(s).addClass("mce-content-body loading").html(f(a.value));g.load(function(a){if(!a)throw Error("Failed to load HTML editor");s&&a.init({inline:!0,target:s,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+y.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
69
  block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
70
  entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:e})});return{val:function(b){b=f(b);null==h?(a.value=b,k(s).html(b)):h.getContent()!==b&&h.setContent(b);l&&l.val(b);return this},kill:function(){h&&(l&&l.val(h.getContent()),d(h),h.destroy(),h=null);s&&(w.removeChild(s),k(w).removeClass("has-proxy has-mce"),s=null);y&&(C.removeChild(y),y=null);return this},enable:function(a){l=a;h&&n(h,a);return this},disable:function(){h&&c(h);l=null;return this},
71
- focus:function(){h&&l&&h.focus();return this},invs:function(a){a=a||!1;v!==a&&(v=a,k(w)[a?"addClass":"removeClass"]("show-invs"));return this}}};return g}({},x,u));m.register("$48",function(g,e,A){function n(b){function a(){e&&(g.off("input",l),e=!1)}function l(){var a=b.value;a!==w&&(g.trigger("changing",[a,w]),w=a)}function f(){l();e&&C!==w&&g.trigger("changed",[w])}function d(){c=b;C=w;e||(g.on("input",l),e=!0);g.trigger("editFocus");r.addClass("has-focus");return!0}function h(){c===b&&(c=null);
72
- g.trigger("editBlur");r.removeClass("has-focus");e&&(f(),a());return!0}var e=!1,g=k(b),r=k(b.parentNode),w=b.value,C;g.blur(h).focus(d);return{val:function(a){w!==a&&(b.value=a,g.triggerHandler("input"),w=a);return!0},kill:function(){a();g.off("blur",h).off("focus",d)},fire:function(){w=null;l()},ping:f,blur:h,focus:d,reset:function(){C=w=b.value}}}function d(b){this.e=b}var c;g._new=function(b){return new d(b)};g.init=function(b){var a=new d(b);b.disabled?(b.removeAttribute("disabled"),a.disable()):
73
  b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=d.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var b=this.p;b&&(b.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(b,a){var c=this.l;c&&!a&&(this.disable(),c=null);this.val(b||"");a&&!c&&this.enable();return this};TextAreaPrototype.val=function(b){var a=this.e;if(null==b)return a.value;var c=this.l,f=this.p;f&&f.val(b);c&&c.val(b);c||a.value===b||(a.value=b,k(a).triggerHandler("input"));return this};
74
  TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var b=this.p;b?b.focus():k(this.e).focus()};TextAreaPrototype.focused=function(){return c&&c===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(b,a){var c=this.e;if(1===arguments.length)return c.getAttribute(b);null==a?c.removeAttribute(b):c.setAttribute(b,a);return this};TextAreaPrototype.editable=
75
  function(){return!!this.l};TextAreaPrototype.enable=function(){var b=this.p;this.e.removeAttribute("readonly");this.listen();b&&b.enable&&b.enable(this.l);return this};TextAreaPrototype.disable=function(){var b=this.p;this.e.setAttribute("readonly",!0);this.unlisten();b&&b.disable&&b.disable();return this};TextAreaPrototype.listen=function(){var b=this.l;b&&b.kill();this.l=n(this.e);return this};TextAreaPrototype.unlisten=function(){var b=this.l;b&&(b.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
@@ -77,39 +77,39 @@ function(b,a){var c=this.i||!1;if(a||c!==b)this._i&&(this._i.kill(),delete this.
77
  !0),c&&this.focus());return this};TextAreaPrototype.setStrf=function(b){this["%"]=b;"code"===this.m&&this.p.strf(b);return this};TextAreaPrototype.name=function(b){this.e.setAttribute("name",b);return this};TextAreaPrototype.placeholder=function(b){this.e.setAttribute("placeholder",b);return this};TextAreaPrototype.redraw=function(){var b=this.p;b&&b.resize&&b.resize()};TextAreaPrototype=null;return g}({},x,u));m.register("$49",function(g,e,m){function n(a){var b=e.console;b&&b.error&&b.error(a)}
78
  function d(a){var b=m.createElement("div");a&&b.setAttribute("class",a);return b}function c(a){return function(){a.resize();return this}}function b(a){return function(b){for(var c=b.target,f=c.$index;null==f&&"DIV"!==c.nodeName&&(c=c.parentElement);)f=c.$index;null!=f&&(b.stopImmediatePropagation(),a.select(f));return!0}}function a(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function l(a){return function(b){var c;c=b.keyCode;if(40===c)c=1;else if(38===c)c=-1;else return!0;if(b.shiftKey||
79
  b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function f(a,b,c){function f(a){n("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(h){var d=b||0,e=c?-1:1,z=a.rows||[];h.sort(function(a,b){return e*(z[a]||f(a)).cellVal(d).localeCompare((z[b]||f(b)).cellVal(d))})}}function q(a){this.w=a}function h(a){this.t=a;this.length=0}function v(a,b,c){var f=m.createElement("div");f.className=c||"";this._=f;this.d=b||[];this.i=
80
- a||0;this.length=b.length}function B(a){this.live=a;this.rows=[]}g.create=function(a){return new q(a)};var r=q.prototype;r.init=function(f){var h=this.w,e=h.id,g=h.splity(e+"-thead",e+"-tbody"),q=g[0],g=g[1],r=[],p=[],z=[],F=[];if(f)this.ds=f,this.idxs=p,this._idxs=null;else if(!(f=this.ds))throw Error("No datasource");q.css.push("wg-thead");g.css.push("wg-tbody");f.eachCol(function(a,b,c){z[a]=e+"-col-"+b;F[a]=c||b});for(var N=d(),B=-1,n=z.length,m=d("wg-cols"),A=q.splitx.apply(q,z);++B<n;)A[B].header(F[B]),
81
- m.appendChild(N.cloneNode(!1)).setAttribute("for",z[B]);f.eachRow(function(a,b,c){r[a]=new v(a,b,c);p[a]=a});this.rows=r;this.cols=m;this.ww=null;this.root=N=g.body;this.head=q;q.redraw=c(this);q=g.fixed=A[0].bodyY()||20;h.lock().resize(q,g);h.css.push("is-table");h.restyle();this.sc?this._re_sort(n):f.sort&&f.sort(p);this.redrawDirty();this.render();k(N).attr("tabindex","-1").on("keydown",l(this)).on("mousedown",b(this)).on("scroll",a(this));return this};r.clear=function(){for(var a=this.pages||
82
- [],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};r.render=function(){for(var a,b,c=[],f=this.rows||[],h=-1,d,e=this.idxs,z=e.length,l=this.idxr={},g=this.r,q=this._r,v=this.root,k=this.cols;++h<z;){0===h%100&&(a=k.cloneNode(!0),b=new B(a),b.h=2200,b.insert(v),c.push(b));d=e[h];l[d]=h;a=f[d];if(null==a)throw Error("Render error, no data at ["+d+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
83
  this.redrawDirty();this.redraw();null==g?null!=q&&(a=f[q])&&a.page&&(delete this._r,this.select(q,!0)):(a=f[g])&&a.page?this.select(g,!0):(this.deselect(),this._r=g);return this};r.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,f=c.cells[0],h=f.body.childNodes,d=h.length,e=this.pages||[],z=e.length;for(c.redraw.call(f);++a<d;)b[a]=h[a].style.width;if(z){c=this.mx;for(a=this.mn;a<=c;a++)e[a].widths(b);this.redrawDirty()&&this.redraw()}};r.redrawDirty=function(){var a=!1,b=this.root,c=
84
  b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};r.redraw=function(){for(var a=0,b=-1,c=null,f=null,h=this.ww,d=this.sy,e=this.vh,z=this.mn,l=this.mx,g=Math.max(0,d-100),d=e+d+100,q=this.pages||[],v=q.length;++b<v&&!(a>d);)e=q[b],a+=e.height(),a<g||(null===c&&(c=b),f=b,e.rendered||e.render(h));if(z!==c){if(null!==z&&c>z)for(b=z;b<c;b++){e=q[b];if(!e)throw Error("Shit!");e.rendered&&e.sleep()}this.mn=c}if(l!==f){if(null!==l&&f<l)for(b=l;b>f;b--)e=q[b],
85
  e.rendered&&e.sleep();this.mx=f}};r.selected=function(){return this.r};r.thead=function(){return this.w.cells[0]};r.tbody=function(){return this.w.cells[1]};r.tr=function(a){return(a=this.row(a))?a.cells():[]};r.row=function(a){return this.rows[a]};r.td=function(a,b){return this.tr(a)[b]};r.next=function(a,b,c){null==c&&(c=this.r||0);var f=this.idxs,h=f.length,d=(this.idxr||{})[c];for(c=d;c!==(d+=a)&&!(0<=d&&h>d);)if(b&&h)d=1===a?-1:h,b=!1;else return null;c=f[d];return null==c||null==this.rows[c]?
86
- (n("Bad next: ["+d+"] does not map to data row"),null):c};r.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};r.deselect=function(a){var b=this.r;null!=b&&(this.r=null,k(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};r.selectRow=function(a,b){return this.select(this.idxs[a])};r.select=function(a,b){var c=this.rows[a],f=c&&c.page;if(!f)return this.deselect(!1),n("Row is filtered out"),this;this.deselect(!0);var h,d=
87
- this.w.cells[1];f.rendered||(h=f.top(),d.scrollY(h),this.redrawDirty()&&this.redraw());if(!c.rendered)return f.rendered||n("Failed to render page"),n("Row ["+c.i+"] not rendered"),this;f=c.cells();k(f).addClass("selected");this.r=a;b||(h=d.scrollY(),k(this.root).focus(),h!==d.scrollY()&&d.scrollY(h));d.scrollTo(f[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};r.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};r.filter=
88
- function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};r.each=function(a){for(var b,c=-1,f=this.rows||[],h=this.idxs||[],d=h.length;++c<d;)b=h[c],a(f[b],c,b);return this};r.sortable=function(a){var b=this.sc||(this.sc=new h(this));b.has(a)||b.add(a);return this};r._re_sort=function(a){var b=-1,c=this.sc,f=c.active;for(this.sc=c=new h(this);++b<a;)c.add(b);f&&(b=this.head.indexOf(f.id),-1===b&&(b=Math.min(f.idx,a-1)),this.sort(b,f.desc));return this};r._sort=
89
  function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};r.sort=function(a,b){this._sort(this.idxs,f(this,a,b));this.sc.activate(a,b);return this};r=null;r=h.prototype;r.has=function(a){return null!=this[a]};r.add=function(a){var b=this,c=b.t.head.cells[a];b[a]={desc:null,idx:a,id:c.id};b.length++;c.addClass("wg-sortable").on("click",function(c){if("header"===c.target.nodeName.toLowerCase())return c.stopImmediatePropagation(),b.toggle(a),!1});return b};r.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
90
- return this};r.activate=function(a,b){var c,f;c=this.active;var h=this[a],d=this.t.head.cells;c&&(f=d[c.idx])&&(f.removeClass(c.css),c!==h&&f.restyle());(f=d[a])?(h.desc=b,this.active=h,c="wg-"+(b?"desc":"asc"),f.addClass(c).restyle(),h.css=c):this.active=null;return this};r=null;r=v.prototype;r.render=function(a){var b,c=[],f=this._,h=this.length;if(f){for(this.c=c;0!==h--;)b=f.cloneNode(!1),c[h]=this.update(h,b),b.$index=this.i,a[h].appendChild(b);this._=null}else for(c=this.c;0!==h--;)a[h].appendChild(c[h]);
91
- this.rendered=!0;return this};r.update=function(a,b){var c=b||this.c[a]||{},f=(this.d[a]||function(){})()||"\u00a0";null==f.innerHTML?c.textContent=f:c.innerHTML=f.innerHTML;return c};r.cells=function(){return this.c||[this._]};r.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};r.destroy=function(){this.page=null;this.rendered=!1};r.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};r=null;r=B.prototype;r.size=function(){return this.rows.length};
92
- r.insert=function(a){var b=this.h,c=d("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};r.top=function(){return(this.rendered?this.live:this.dead).offsetTop};r.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||n("row has zero height");return a};r.render=function(a){for(var b,c=-1,f=this.rows,h=f.length,d=this.dead,e=this.live,z=e.childNodes;++c<h;)b=f[c],b.rendered||b.render(z);h=a.length;for(c=0;c<
93
- h;c++)z[c].style.width=a[c];d.parentNode.replaceChild(e,d);this.rendered=!0;this.h=null;return this};r.sleep=function(){var a=this.height(),b=this.live,c=this.dead;c.style.height=String(a)+"px";b.parentNode.replaceChild(c,b);this.rendered=!1;this.h=a;return this};r.sleepH=function(a){a*=this.rows.length;var b=this.dead;b&&(b.style.height=String(a)+"px");this.rendered||(this.h=a);return this};r.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
94
- r.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};r=null;return g}({},x,u));m.register("$40",function(g,e,A){function n(a,b){var c=a.id,f=c&&w[c],h=f&&f.parent();if(!f||!h)return null;var d=h.dir===r,c=d?"X":"Y",e="page"+c,d=d?B:v,l=d(h.el),c=b["offset"+c],g=h.el,q=g.className;null==c&&(c=b[e]-d(a));c&&(l+=c);g.className=q+" is-resizing";return{done:function(){g.className=q},move:function(a){h.resize(a[e]-l,
95
- f);return!0}}}function d(a,c){function f(){k(A).off("mousemove",h);s&&(s.done(),s=null);return!0}function h(a){s?s.move(a):f();return!0}if(s)return!0;s=n(a.target,a);if(!s)return!0;k(A).one("mouseup",f).on("mousemove",h);return b(a)}function c(a,b){var c=b.type;"touchmove"===c?s&&s.move(b):"touchstart"===c?s=n(a.target,b):"touchend"===c&&s&&(s.done(),s=null)}function b(a){a.stopPropagation();a.preventDefault();return!1}function a(a){var b=C;b&&b.redraw();a&&a.redraw();return C=a}function l(b,c){var f=
96
- k(c).on("editFocus",function(){f.trigger("wgFocus",[a(b)])}).on("editBlur",function(){f.trigger("wgBlur",[a(null)])})}function f(a){var b=a.id,c=a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[c||"wg-root","wg-cell"];this._cn=c;w[b]=this;this.clear()}var q=m.include("$46","html.js")||m.include("$2","html.js",!0),h=m.require("$21","dom.js"),v=h.top,B=h.left,r=1,w={},C,s=!1;g.init=function(a){var b=new f(a);b.redraw();m.require("$47","touch.js").ok(function(b){b.dragger(a,c)});k(a).mousedown(d);
97
  return b};e=f.prototype;e.fire=function(a,b){var c=k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};e.each=function(a){for(var b=-1,c=this.cells,f=c.length;++b<f;)a(c[b],b);return this};e.indexOf=function(a){return(a=w[a.id||String(a)])&&a.pid===this.id?a.index:-1};e.on=function(){return this.$("on",arguments)};e.off=function(){return this.$("off",arguments)};e.find=function(a){return k(this.el).find(a)};e.$=function(a,b){k.fn[a].apply(k(this.el),b);return this};e.addClass=function(a){this.css.push(a);
98
  return this};e.removeClass=function(a){a=this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};e.parent=function(){return this.pid&&w[this.pid]};e.splitx=function(){return this._split(r,arguments)};e.splity=function(){return this._split(2,arguments)};e._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,e=b.length,l=1/e,g=0;++c<e;){d=h.el();this.body.appendChild(d);for(var q=d,v=b[c],k=v,r=1;w[v];)v=k+"-"+ ++r;q.id=v;d=new f(d);d.index=c;d.pid=this.id;d._locale(this.lang,
99
  this.rtl);d.pos=g;g+=l;this.cells.push(d);this.length++}this.dir=a;this.redraw();return this.cells};e.destroy=function(){this.clear();delete w[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";k(a).off();return this};e.exists=function(){return this===w[this.id]};e.clear=function(){for(var a=this.el,b=this.cells,c=this.field,f=this.body,d=this.nav,e=this.length||0;0!==e--;)delete w[b[e].destroy().id];this.cells=[];this.length=0;d&&(a.removeChild(d),this.nav=null);f&&(c&&
100
- (q.ie()&&k(f).triggerHandler("blur"),c.destroy(),this.field=null),this.table&&(this.table=null),a===f.parentNode&&a.removeChild(f));this.body=a.appendChild(h.el("","wg-body"));this._h=null;return this};e.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,f=this.cells,h=k(this.el)[this.dir===r?"width":"height"](),d=f[c+1],c=f[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(d?d.pos*h:h)-pad;min=c?c.pos*h:0;b.pos=Math.min(max,Math.max(min,a))/h;this.redraw();return this};e.distribute=
101
- function(a){for(var b=-1,c=0,f,h=this.cells,d=a.length;++b<d&&(f=h[++c]);)f.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};e.distribution=function(){for(var a=[],b=0,c=this.cells,f=c.length-1;b<f;)a[b]=c[++b].pos;return a};e.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");this.field&&(a.push("is-field"),
102
- this.field.editable()?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};e.redraw=function(a){this.restyle();var b=this.el,c=this.body,f=this.field;if(c){var h,d=b.clientWidth||0,e=b.clientHeight||0,l=c.offsetTop||0,e=l>e?0:e-l;this._h!==e&&(this._h=e,c.style.height=String(e)+"px",h=f);this._w!==d&&(this._w=d,h=f);h&&h.redraw()}c=this.length;d=1;e=this.nav;for(l=2===this.dir?"height":"width";0!==c--;)f=this.cells[c],e?h=1:(f.fixed&&
103
- (f.pos=f.fixed/k(b)[l]()),h=d-f.pos,d=f.pos),f.el.style[l]=String(100*h)+"%",f.redraw(a);return this};e.contents=function(a,b){var c=this.el,f=this.body;if(null==a)return f.innerHTML;this.length?this.clear():f&&(c.removeChild(f),f=null);f||(this.body=f=c.appendChild(h.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?k(f)._html(a):a&&this.append(a);this.redraw();return this};e.textarea=function(a,b){var c=this.field;if(c){var f=c.editable();c.reload(a,
104
  b);f!==b&&this.restyle()}else this.length&&this.clear(),f=h.el("textarea"),f.setAttribute("wrap","virtual"),f.value=a,this.contents(f),c=m.require("$48","field.js")._new(f)[b?"enable":"disable"](),l(this,f),this.field=c,this.restyle();this.lang||this.locale("en");return c};e.locale=function(a){a=m.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};e._locale=function(a,b,c){var f=this.body;if(c||a!==this.lang)this.lang=a,f&&f.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=
105
  b,f&&f.setAttribute("dir",b?"RTL":"LTR");return this};e.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,f=this.navigated();if(null!=f)return b[f].editable();for(;++f<c;){for(f=0;f<c;c++);if(a=b[f].editable())return a}};e.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};e.append=function(a){a&&(a.nodeType?q.init(this.body.appendChild(a)):q.init(k(a).appendTo(this.body)));return this};e.prepend=function(a){var b=
106
  this.body;if(a.nodeType){var c=b.firstChild;q.init(c?b.insertBefore(a,c):b.appendChild(a))}else q.init(k(a).prependTo(b));return this};e.before=function(a){var b=this.body;a.nodeType?q.init(this.el.insertBefore(a,b)):q.init(k(a).insertBefore(b));return this};e.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=h.txt(a||"");this.el.insertBefore(h.el("header",b),this.body).appendChild(this.t);this.redraw();return this};e.title=function(a){var b=this.t;if(b)return b.nodeValue=
107
- a||"",b;this.header(a);return this.t};e.titled=function(){var a=this.t;return a&&a.nodeValue};e.bodyY=function(){return v(this.body,this.el)};e.scrollY=function(a){if(I===a)return this.body.scrollTop;this.body.scrollTop=a};e.tabulate=function(a){var b=this.table;b?b.clear():b=m.require("$49","wgtable.js").create(this);b.init(a);return this.table=b};e.lock=function(){this.body.className+=" locked";return this};e.scrollTo=function(a,b){var c,f=this.body;c=f.scrollTop;var h=v(a,f);if(c>h)c=h;else{var d=
108
- f.clientHeight,h=h+k(a).outerHeight();if(d+c<h)c=h-d;else return}b?f.scrollTop=c:k(f).stop(!0).animate({scrollTop:c},250)};e.navigize=function(a,c){function f(a){var b=e[a],c=q[a],d=k(b.el).show();c.addClass("active");g=a;v.data("idx",a);b.fire("wgTabSelect",[a]);return d}var d=this,e=d.cells,l=d.nav,g,q=[];l&&d.el.removeChild(l);var l=d.nav=d.el.insertBefore(h.el("nav","wg-tabs"),d.body),v=k(l).on("click",function(a){var c=k(a.target).data("idx");if(null==c)return!0;if(null!=g){var h=q[g];k(e[g].el).hide();
109
- h.removeClass("active")}f(c);d.redraw();return b(a)});null==c&&(c=v.data("idx")||0);d.each(function(b,c){q[c]=k('<a href="#'+b.id+'"></a>').data("idx",c).text(a[c]).appendTo(v);b.pos=0;k(b.el).hide()});f(e[c]?c:0);d.lock();d.redraw();return d};e.navigated=function(){var a=this.nav;if(a)return k(a).data("idx")};e=null;return g}({},x,u));m.register("$24",function(g,e,A){function n(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||
110
  b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function d(a,b,c){b=k(a.title(b).parentNode);var f=b.find("span.lang");c?(c=m.require("$38","locale.js").cast(c),f.length||(f=k("<span></span>").prependTo(b)),f.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(f.remove(),c="en");a.locale(c);return b}function c(a,b,c){b.click(function(b){var f=a.fire(c,[b.target]);f||b.preventDefault();return f})}function b(){this.dirty=0}m.require("$3",
111
- "number.js");var a="poUpdate",l="changing",f="changed",q=0,h=1,v=2,B=3,r=4,w=5,C,s,y=m.require("$37","string.js").html,x=m.require("$6","string.js").sprintf;g.extend=function(a){return a.prototype=new b};g.localise=function(a){s=a;return g};var u=function(){var a=A.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent.trim()||b.trim()}}(),p=b.prototype=m.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);
112
- p.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};p.localise=function(a){a||(a=s||m.require("$1","t.js").init());var b=[];b[q]=a._x("Source text","Editor")+":";b[B]=a._x("%s translation","Editor")+":";b[r]=a._x("Context","Editor")+":";b[w]=a._x("Comments","Editor")+":";b[h]=a._x("Single","Editor")+":";b[v]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Toggle Fuzzy","Editor");b[9]=
113
  a._x("Suggest translation","Editor");this.labels=b;this.t=a;return this};p.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=m.require("$40","wingrid.js").init(a);k(e).on("resize",b);this.redraw=b;k(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();C=b});this.destroy=function(){c.destroy();k(e).off("resize",b)};this.rootDiv=a;return c};p.$=function(){return k(this.rootDiv)};p.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));
114
  return!0}).on("wgRowDeselect",function(a,c,f){f||b.loadNothing();return!0})};p.setSourceCell=function(a){this.sourceCell=a};p.setTargetCell=function(a){this.targetCell=a};p.next=function(a,b,c){for(var f=this.listTable,d=f.selected(),h=d,e,l=this.po;null!=(d=f.next(a,c,d));){if(h===d){d=null;break}if(b&&(e=l.row(d),e.translated(0)))continue;break}null!=d&&f.select(d,!0);return d};p.current=function(a){var b=this.active;if(null==a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();
115
  return this};p.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};p.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};p.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};p.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};p.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||
@@ -121,21 +121,21 @@ b&&f.thead().distribute(b);f.tbody().$(e?"addClass":"removeClass",["is-rtl"]);a.
121
  this.updateListCell(a,"source");this.updateListCell(a,"target");return this};p.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,f;this.pasteMessage(a);b&&this.setSrcMeta(a,b)&&b.redraw();c&&(f=c.navigated()||0,f=this.setTrgMeta(a,f,c),!b&&this.setSrcMeta(a,c)&&(f=!0),f&&c.redraw());return this};p.setStatus=function(){return null};p.setSrcMeta=function(a,b){var f=[],d,h=!1,e=this.$smeta,l=this.labels,g=[],q=a.tags(),v=q&&q.length;if(d=a.context())g.push("<span>"+y(l[r])+"</span>"),
122
  g.push("<mark>"+y(d)+"</mark>");if(v&&this.getTag)for(g.push("<span>Tagged:</span>");0<=--v;)(d=this.getTag(q[v]))&&g.push('<mark class="tag">'+y(d.mod_name)+"</mark>");g.length&&f.push(g.join(" "));if(this.getMono()&&(d=a.refs())&&(q=d.split(/\s/),v=q.length)){for(g=[];0<=--v;)d=q[v],g.push("<code>"+y(d)+"</code>");f.push('<p class="has-icon icon-file">'+g.join(" ")+"</p>")}(d=a.notes())&&f.push('<p class="has-icon icon-info">'+y(d,!0)+"</p>");f.length?(e||(e=b.find("div.meta"),e.length||(e=k('<div class="meta"></div>').insertAfter(b.header())),
123
  c(this,e,"poMeta"),this.$smeta=e),e.html(f.join("\n")).show(),h=!0):e&&e.text()&&(e.text("").hide(),h=!0);return h};p.setTrgMeta=function(a,b,c){var f=[],d=!1,h=this.$tmeta;b=(a=a.errors(b))&&a.length;var e;if(b)for(e=0;e<b;e++)f.push('<p class="has-icon icon-warn">'+y(a[e],!0)+".</p>");f.length?(h||(h=c.find("div.meta"),h.length||(h=k('<div class="meta"></div>').insertAfter(c.header())),this.$tmeta=h),h.html(f.join("\n")).show(),d=!0):h&&h.text()&&(h.text("").hide(),d=!0);return d};p.loadMessage=
124
- function(b){function c(a,b){var f=b?a.split(" "):a.split(" ",1);a=f[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);f[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return f.join(" ")}function e(a,f){var l=I,k=L[q];a.off();a.titled()!==k&&d(a,k,f||"en");k=!1;p.setSrcMeta(b,a)&&(k=!0);if(b.plural()){var k=-1,r=[],B=[],n=a.id+"-",m=b.sourceForms()||f&&f.plurals||["One","Other"],w=m.length;if(2!==w||"="===m[0].charAt(0)&&"=1"!==m[0])for(;++k<w;)r[k]=n+String(k),B[k]=
125
- c(m[k])+":";else r=[n+"-0",n+"-1"],B=[L[h],L[v]];a.splity.apply(a,r);a.each(function(a,c){a.header(B[c]).textarea(b.source(null,c),l).setStrf(D).setMode(y).setInvs(u)});a.lock();l&&a.each(function(a,b){g(a,b)})}else k&&a.redraw(),a.textarea(b.source(),l).setStrf(D).setMode(y).setInvs(u),l&&g(a,0)}function g(c,d){c.on(l,function(a,c){b.source(c,d);0===d&&p.updateListCell(b,"source");p.unsave(b,d)}).on(f,function(){0===d&&p.po.reIndex(b);p.dict&&p.rebuildSearch();p.fire(a,[b])})}function k(a,f,h){M&&
126
- a.eachTextarea(function(a){a.ping()});a.off();var e=f.isKnown()&&f.label||"Target",e=x(L[B],e);a.titled()!==e&&d(a,e,f);e=!1;!this.sourceCell&&p.setSrcMeta(b,a)&&(e=!0);p.setTrgMeta(b,h,a)&&(e=!0);p.setStatus(b,h);if(b.pluralized()){var l=[],g=[],q=a.id+"-",v=b.targetForms()||f.plurals||["One","Other"],e=v.length,r=function(a){var b=v[a];g.push(b?c(b,!0):"Form "+a);l.push(q+String(a))};for(b.each(r);(f=l.length)<e;)r(f);a.splitx.apply(a,l);a.each(function(a,c){var f=M&&!b.disabled(c);a.textarea(b.translation(c),
127
  f).setStrf(D).setMode(y).setInvs(u);M&&n(a,c)});a.navigize(g,h||null).on("wgTabSelect",function(c,f){var d=M&&c.cell.editable();d&&d.focus();p.setTrgMeta(b,f,a);p.setStatus(b,f);p.fire("poTab",[f])})}else e&&a.redraw(),a.textarea(b.translation(),M&&!b.disabled(0)).setStrf(D).setMode(y).setInvs(u),M&&n(a,0)}function n(c,d){c.on(l,function(a,c,f){b.translate(c,d);0===d&&p.updateListCell(b,"target");b.fuzzy(d)?p.fuzzy(!1,b,d):p.unsave(b,d);""===c?(p.fire("poEmpty",[!0,b,d]),p.setStatus(b,d)):""===f&&
128
  (p.fire("poEmpty",[!1,b,d]),p.setStatus(b,d))}).on(f,function(){p.dict&&p.rebuildSearch();p.fire(a,[b])})}function m(c){c.off();var h=L[r];c.titled()!==h&&(d(c,h),p.setStatus(null));c.textarea(b.context(),!0).setMode(y).setInvs(u);X&&c.on(l,function(a,c){b.context(c);p.updateListCell(b,"source");p.unsave(b,O)}).on(f,function(){p.po.reIndex(b);p.dict&&p.rebuildSearch();p.fire(a,[b])})}function s(a){var c=L[w];a.titled()!==c&&d(a,c);a.off().on(l,function(a,c){b.comment(c);p.fire("poComment",[b,c]);
129
- p.unsave(b,O)}).textarea(b.comment(),!0)}var p=this,y=p.mode,A=b.isHTML(),u=p.inv||!1,E=this.fmt||null,D=b.format()||null,H=b.is(p.active),O=0,T=p.sourceCell,S=p.targetCell,U=p.contextCell,V=p.commentCell,M=p.editable.target,I=p.editable.source,X=p.editable.context,P=C,Y=p.sourceLocale,W=p.targetLocale,L=p.labels;p.html!==A&&(p.html=A,"code"!==p.mode&&(y=A?"html":"",p.setMode(y)));p.active=b;T&&e(T,Y);U&&m(U);S&&W&&(O=S.navigated()||0,k(S,W,O));V&&s(V);P&&(P.exists()||(P=P.parent()),(A=P.editable())&&
130
- A.focus());E!==D&&(this.fmt=D);H||p.fire("poSelected",[b,O])};p.unloadActive=function(){function a(b){b&&b.text("").hide()}function b(a){a&&a.off().clear()}a(this.$smeta);a(this.$tmeta);b(this.sourceCell);b(this.contextCell);b(this.targetCell);this.commentCell&&this.commentCell.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};p.loadNothing=function(){var a,b=this.t,c=this.mode||"",f=this.inv||!1,d=this.fmt;this.unloadActive();this.setStatus(null);(a=this.commentCell)&&
131
  a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(f),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(f),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(f),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};p.updateListCell=function(a,b){var c=this.getListColumns()[b],f=this.po.indexOf(a);(f=this.listTable.row(f))&&
132
  f.rendered&&f.update(c)};p.cellText=function(a){return(a=-1!==a.indexOf("<")||-1!==a.indexOf("&")?u(a):a.trim())||"\u00a0"};p.fuzzy=function(a,b,c){b=b||this.active;var f=b.fuzzy(c);!0!==a||f?!1===a&&f&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return f};p.flag=function(b,c,f){if(!c){c=this.active;f=this.getTargetOffset();if(null==f)return null;f&&c.targetForms()&&(f=0)}var d=c.flagged(f);if(null==b)return d;if(d===b||b&&!c.translated(f)||!this.fire("poFlag",
133
  [b,d,c,f]))return!1;c.flag(b,f);this.fire(a,[c])&&this.unsave(c,f);this.setStatus(c,f);return!0};p.add=function(b,c){var f,d=this.po.get(b,c);d?f=this.po.indexOf(d):(f=this.po.length,d=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[d]),this.fire(a,[d]));this.lastSearch&&this.filter("");this.listTable.select(f);return d};p.del=function(b){if(b=b||this.active){var c=this.lastSearch,f=this.po.del(b);null!=f&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),this.dict&&
134
  this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(f=Math.min(f,this.po.length-1),this.listTable.select(f))))}};p.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};p.setMode=function(a){if(this.mode!==a){this.mode=a;this.callTextareas(function(b){b.setMode(a)});var b=this.active,c=this.sourceCell;b&&b.refs()&&c&&this.setSrcMeta(b,c)&&c.redraw()}return this};p.getMono=function(){return"code"===this.mode};
135
- p.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};p.getInvs=function(){return this.inv||!1};p.callTextareas=function(a){var b=this.targetCell;b&&b.eachTextarea(a);(b=this.contextCell)&&b.eachTextarea(a);(b=this.sourceCell)&&b.eachTextarea(a);return this};p.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};p=null;return g}({},x,u));m.register("$13",function(g,e,A){function n(){this.init()._validate();
136
  this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function d(a){a=k('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');m.require("$12","tooltip.js").init(a);return a}function c(a){return d("cloud").attr("title",a.labels[8]+" (Ctrl-U)").click(function(b){b.preventDefault();a.focus().fuzzy(!a.fuzzy())})}function b(a){return d("robot").attr("title",a.labels[9]+" (Ctrl-J)").click(function(b){b.preventDefault();a.fire("poHint")})}e=m.require("$24",
137
  "base.js");g.init=function(a){var b=new n;a=b.setRootCell(a);var c=a.splity("po-list","po-edit"),d=c[0],h=c[1],c=h.splitx("po-trans","po-comment"),e=c[0],g=c[1].header("Loading.."),c=e.splity("po-source","po-target"),e=c[0].header("Loading.."),c=c[1].header("Loading..");a.distribute([0.34]);h.distribute([0.8]);b.setListCell(d);b.setSourceCell(e);b.setTargetCell(c);b.commentCell=g;b.editable.source=!1;return b};e=n.prototype=e.extend(n);e.getListHeadings=function(){var a=this.t||{_x:function(a){return a}},
138
- b=[a._x("Source text","Editor")];this.targetLocale&&(b[1]=a._x("Translation","Editor"));return b};e.getListColumns=function(){var a={source:0};this.targetLocale&&(a.target=1);return a};e.getListEntry=function(a){var b=this.cellText,c=[function(){var c,f=b(a.source()||""),d=a.context();return d?(c=A.createElement("p"),c.appendChild(A.createElement("mark")).innerText=d,c.appendChild(A.createTextNode("\u00a0"+f)),c):f}];this.targetLocale&&(c[1]=function(){return b(a.translation()||"")});return c};e.stats=
139
  function(){var a=this.po,b=a.length,c=0,d=0,h=0;a.each(function(a,b){b.fuzzy()?h++:b.translated()?c++:d++});return{t:b,p:c.percent(b)+"%",f:h,u:d}};e.unlock=function(){var a=this.targetLocale;this._unlocked||(this.editable={source:!0,context:!0,target:!1},this.po&&this.po.unlock(),this.contextCell=this.targetCell,delete this.targetCell,a&&(this._unlocked=a,delete this.targetLocale,this.reload(),this.fire("poLock",[!1])),this.active&&this.loadMessage(this.active))};e.lock=function(){var a=this._unlocked;
140
  a&&(this.targetLocale=a,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};e.locked=function(){return!this._unlocked};e.setStatus=function(a){var d=this.$tnav;if(null==a)d&&(d.remove(),this.$tnav=null);else{d||(this.$tnav=d=k("<nav></nav>").append(c(this)).append(b(this)).appendTo(this.targetCell.header()));var f=
141
  [];a.translated()?a.fuzzy()&&f.push("po-fuzzy"):f.push("po-empty");d.attr("class",f.join(" "))}};e.getSorter=function(){function a(a,c){var f=a.weight(),d=c.weight();return f===d?b(a,c):f>d?-1:1}function b(a,c){return a.hash().localeCompare(c.hash())}var c=this;return function(d){var h=c.po,e=c.locked()?a:b;d.sort(function(a,b){return e(h.row(a),h.row(b))})}};return g}({},x,u));m.register("$14",function(g,e,m){var n={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73,hint:74},d={38:!0,
@@ -149,8 +149,8 @@ return k.join('"\n"')+'"'},prefix:function(a,b){var c=a.split(e);return b+c.join
149
  m.register("$27",function(g,e,k){function n(){}g.extend=function(d){return d.prototype=new n};e=n.prototype=m.require("$39","abstract.js").init(["add","load"]);e.row=function(d){return this.rows[d]};e.lock=function(d){return this.locale(d||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};e.unlock=function(){var d=this.loc;this.loc=null;return d};e.locale=function(d){null==d?d=this.loc:this.loc=d=m.require("$38","locale.js").cast(d);return d};e.each=function(d){this.rows.each(d);return this};
150
  e.indexOf=function(d){"object"!==typeof d&&(d=this.get(d));if(!d)return-1;null==d.idx&&(d.idx=this.rows.indexOf(d.hash()));return d.idx};e.get=function(d){return this.rows&&this.rows.get(d)};e.has=function(d){return this.rows&&this.rows.has(d)};e.del=function(d){d=this.indexOf(d);if(-1!==d){var c=this.rows.cut(d,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(b,a,c){a.idx=c}),d}};e.reIndex=function(d,c){var b=this.indexOf(d),a=d.hash(),e=this.rows.indexOf(a);return e===
151
  b?b:-1!==e?(c=(c||0)+1,d.source("Error, duplicate "+String(c)+": "+d.source()),this.reIndex(d,c)):this.rows.key(b,a)};e.sort=function(d){this.rows.sort(d);return this};e["export"]=function(){for(var d=-1,c=this.rows,b=c.length,a=m.require("$41","list.js").init();++d<b;)a.push(c[d]);return a};e=null;return g}({},x,u));m.register("$28",function(g,e,m){function n(){function d(a){return/<[a-z]+[^>]*>/i.test(a)||/&(#\d+|#x[0-9a-f]|[a-z]+);/i.test(a)?k("<p></p>").html(a).text():a}function c(a){return a.replace(/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo]/g,
152
- "%s")}function b(a){return a.replace(/[^\sa-z0-9]+/ig," ")}function a(a){return a.trim().replace(/\s+/g," ")}function e(f){return a(b(d(c(f).toLowerCase())))}var f={},g={};return{add:function(a){var b=e(a.source());(f[b]||(f[b]=[])).push(a);g[a.hash()]=a},match:function(h){var k=e(h.source()),k=f[k],n;if(n=k){n=k.length;var r=k[0];if(1!==n)for(var m=7,C,s=h.source(),y=h.context(),A;0<=--n;)if(h=0,C=k[n],!(C.context()!==y&&++h>=m)){A=C.source();if(s!==A){if(++h>=m)continue;s=s.toLowerCase();A=A.toLowerCase();
153
- if(s!==A){if(++h>=m)continue;s=c(s);A=c(A);if(s!==A){if(++h>=m)continue;s=d(s);A=d(A);if(s!==A){if(++h>=m)continue;s=b(s);A=b(A);if(s!==A){if(++h>=m)continue;s=a(s);A=a(A);if(s!==A&&++h>=m)continue}}}}}m=h;r=C;if(0===h)break}delete g[r.hash()];n=r.copy()}return n},unmatched:function(){var a,b,c=[];for(a in g)b=g[a],c.push(b);return c}}}g.merge=function(d,c){var b=d.rows,a=c.rows,g=[],f=[],q=[],h=n();b.each(function(b,c){a.has(b)||(c.translated()?h.add(c):q.push(c))});d.clear();a.each(function(a,c){try{var q=
154
  b.get(a),k;q?(k=q.flagged(0),q.merge(c),q.flagged(0)!==k&&f.push(q)):(q=h.match(c))?(q.merge(c),f.push(q)):(q=c.copy(),g.push(q));d.add(q,"")}catch(n){e.console&&console.error(String(n))}});d.header("POT-Creation-Date",c.header("POT-Creation-Date")||d.now());return{add:g,fuz:f,del:q.concat(h.unmatched())}};return g}({},x,u));m.register("$29",function(g,e,k){function n(c,b,a){if(null==a)return c[b]||"";c[b]=a||"";return c}function d(){this._id=this.id=""}g.extend=function(c){return c.prototype=new d};
155
  e=d.prototype;e.flag=function(c,b){var a=this.flg||(this.flg=[]);if(null!=b)a[b]=c;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=c;return this};e.flagged=function(c){var b=this.flg||[];if(null!=c)return b[c]||0;for(c=b.length;0!==c--;)if(b[c])return!0;return!1};e.flags=function(){for(var c,b={},a=[],d=this.flg||[],f=d.length;0!==f--;)c=d[f],b[c]||(b[c]=!0,a.push(c));return a};e.flaggedAs=function(c,b){var a=this.flg||[];if(null!=b)return c===a[b]||0;for(var d=a.length;0!==
156
  d--;)if(a[d]===c)return!0;return!1};e.fuzzy=function(c,b){var a=this.flaggedAs(4,c);null!=b&&this.flag(b?4:0,c);return a};e.source=function(c,b){if(null==c)return this.src[b||0]||"";this.src[b||0]=c;return this};e.plural=function(c,b){if(null==c)return this.src[b||1]||"";this.src[b||1]=c||"";return this};e.sourceForms=function(){return this.srcF};e.targetForms=function(){return this.msgF};e.each=function(c){for(var b=-1,a=this.src,d=this.msg,f=Math.max(a.length,d.length);++b<f;)c(b,a[b],d[b]);return this};
@@ -171,29 +171,29 @@ d)return 1;if(c<d)return-1;if(b){c=this.hash().toLowerCase();d=a.hash().toLowerC
171
  e=k("<ol></ol>").attr("class",a.type);++d<f;)k("<li></li>").html(b[d]).appendTo(e);e.find("li").eq(a.line-1).attr("class","highlighted");c().dialog("close").html("").dialog("option","title",a.path+":"+a.line).append(e).dialog("open")}}function g(a){a=a.target;var b=k(a).find("li.highlighted")[0],b=Math.max(0,(b&&b.offsetTop||0)-Math.floor(a.clientHeight/2));a.scrollTop=b}var f;return{load:function(f){c().html('<div class="loco-loading"></div>').dialog("option","title","Loading..").off("dialogopen").dialog("open").on("dialogopen",
172
  g);f=k.extend({ref:f,path:d.popath},d.project||{});e.ajax.post("fsReference",f,a,b)}}};return g}({},x,u));m.register("$31",function(g,e,k){function n(d){this.api=d;this.chars=0}g.create=function(d){return new n(d)};e=n.prototype;e.init=function(d,c){function b(a){var b={length:0,html:a.html,sources:[]};m.push(b);return w[a.html?1:0]=b}function a(a,d){var m=a.source(null,d);if(m&&(a.untranslated(d)||c)){var r=n[m];if(r)r.push(a);else{var r=m.length,u=e.isHtml(m),u=w[u?1:0],p=u.sources;if(u.length+
173
  r>k||p.length===h)u=b(u),p=u.sources;p.push(m);n[m]=[a];u.length+=r;f+=r;g+=1}}}var e=this.api,f=0,g=0,h=50,k=5E3,n={},m=[],w=[];b({html:!1});b({html:!0});d.each(function(b,c){a(c,0);a(c,1)});w=null;this.map=n;this.chars=f;this.length=g;this.batches=m;this.locale=d.locale()};e.abort=function(){this.state="abort";return this};e.dispatch=function(){function d(a,b){function d(c,e,g){b!==g&&(a===e||1<c&&f.source(null,1)===a)&&(f.translate(b,c),k++,y++);return k}if(!c())return!1;if(!b)return!0;var f,e=
174
- n[a]||[],h=e.length,l=-1,k;for(u++;++l<h;)if(f=e[l])k=0,f.each(d),k&&g("each",[f]);return!0}function c(){return"abort"===h.state?(k&&(k.abort(),f()),!1):!0}function b(){var b=m.shift(),c;b?(c=b.sources)&&c.length?k.batch(c,w,b.html,d).fail(a).always(e):e():f()}function a(){h.abort();f()}function e(){s++;g("prog",[s,A]);c()&&b()}function f(){k=m=null;g("done")}function g(a,b){for(var c=p[a]||[],d=c.length;0<=--d;)c[d].apply(null,b)}var h=this,k=h.api,n=h.map,m=h.batches||[],w=h.locale,u=0,s=0,y=0,
175
- x=h.length,A=m.length,p={done:[],each:[],prog:[]};h.state="";b();return{done:function(a){p.done.push(a);return this},each:function(a){p.each.push(a);return this},prog:function(a){p.prog.push(a);return this},stat:function(){return{todo:function(){return Math.max(x-u,0)},did:function(){return u}}}}};return g}({},x,u));m.register("$42",{nn:["no"]});m.register("$32",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Yandex.Translate"};d.getId=function(){return"yandex"};
176
- d.getUrl=function(){return"https://translate.yandex.com/"};d.parseError=function(c){return c&&c.code&&200!==c.code&&c.message?String(this)+" error "+c.code+": "+c.message:""};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1;++e<f&&!1!==d(c[e],a[e]||"",b););}var e=this;a=a?"html":"plain";var g=this.mapLang(b,m.require("$42","yandex.json"));return e._call({url:"https://translate.yandex.net/api/v1.5/tr.json/translate?format="+a+"&lang=en-"+g,method:"POST",traditional:!0,data:{key:e.key(),
177
- text:c}}).done(function(a,b,c){a&&200===a.code?f(a.text||[]):(e.stderr(e.parseError(a)||e.odderr(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$43",{zh:["zh","zh-CN","zh-TW"],he:["iw"],jv:["jw"]});m.register("$33",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Google Translate"};d.getId=function(){return"google"};d.getUrl=function(){return"https://translate.google.com/"};d.parseError=function(c){if(c.error){for(var b=
178
- [],a=c.error.errors||[],d=a.length,f=-1;++f<d;)b.push(a[f].message||"");return String(this)+" error "+c.error.code+": "+b.join(";")}return""};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1,g;++e<f&&(g=a[e]||{},!1!==d(c[e],g.translatedText||"",b)););}var e=this;a=a?"html":"text";var g=e.mapLang(b,m.require("$43","google.json"));return e._call({url:"https://translation.googleapis.com/language/translate/v2?source=en&target="+g+"&format="+a,method:"POST",traditional:!0,data:{key:e.key(),
179
- q:c}}).done(function(a,b,c){a.data?f(a.data.translations||[]):(e.stderr(e.parseError(a)||e.odderr(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$44",{nn:["no"],pt:["pt","pt-pt"],sr:["sr-Cyrl","sr-Latn"],sr_RS:["sr-Cyrl"],tlh:["tlh-Latn","tlh-Piqd"],zh:["zh-Hans","zh-Hant"],zh_CN:["zh-Hans"],zh_HK:["zh-Hans"],zh_SG:["zh-Hans"],zh_TW:["zh-Hant"]});m.register("$34",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Microsoft Translator text API"};
180
  d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function f(a){for(var f=-1,e;++f<k&&(e=a[f]||{},e=e.translations||[],e=e[0]||{},!1!==d(c[f],e.text||"",b)););}var e=this,g=[],k=c.length,n=-1;a=a?"html":"plain";for(var r=e.mapLang(b,m.require("$44","ms.json"));++n<k;)g.push({text:c[n]});return e._call({url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to="+
181
- r+"&textType="+a,method:"POST",data:JSON.stringify(g),headers:{"Content-Type":"application/json; charset=UTF-8","Ocp-Apim-Subscription-Key":this.key(),"Ocp-Apim-Subscription-Region":e.param("region")||"global"}}).done(function(a,b,c){a&&a.length?f(a):(e.stderr(e.parseError(a)||e.odderr(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$45",{pt:["pt-PT","pt-BR"]});m.register("$35",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"DeepL Translator"};
182
- d.getId=function(){return"deepl"};d.getUrl=function(){return"https://www.deepl.com/translator"};d.parseError=function(c){return c.message};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1,g;++e<f&&(g=a[e]||{},!1!==d(c[e],g.text||"",b)););}var e=this;a=e.mapLang(b,m.require("$45","deepl.json"));return e._call({url:"https://api.deepl.com/v2/translate",method:"POST",traditional:!0,data:{source_lang:"EN",target_lang:a.toUpperCase(),preserve_formatting:"1",auth_key:e.key(),text:c}}).done(function(a,
183
- b,c){a.translations?f(a.translations):(e.stderr(e.parseError(a)||e.odderr(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$36",function(g,e,m){function n(){}g.create=function(d){(n.prototype=new d).batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1;++e<f&&!1!==d(c[e],a[e],b););}var g=e.loco.ajax;a={hook:this.getId(),type:a?"html":"text",locale:String(b),sources:c};var h=k.Deferred();this.abortable(g.post("apis",a,function(a){f(a&&a.targets||[]);h.resolve()},
184
- function(){f([]);h.reject()}));return h.promise()};return new n};return g}({},x,u));m.register("$18",function(g,e,u){function n(){this.inf={}}function d(){var a=u.createElement("p"),b=/&(#\d+|#x[0-9a-f]|[a-z]+);/i,c=/<[a-z]+\s/i,d,e;return{sniff:function(g){if(g===d)return e;d=g;if(b.test(g)||c.test(g))if(a.innerHTML=g,a.textContent!==g)return e=!0;return e=!1}}}var c=n.prototype;c.init=function(a){this.inf=a||{}};c.param=function(a){return this.inf[a]||""};c.key=function(){return this.param("key")};
185
- c.getId=function(){return this.param("id")||"none"};c.getUrl=function(){return this.param("url")||"#"};c.toString=function(){return this.param("name")||this.getId()};c.stderr=function(a){var b=(e.loco||{}).notices||e.console;b&&b.error&&b.error(String(a))};c.odderr=function(a){var b=String(this);return(a=a&&a.status)&&200!==a?b+(": Responded status "+a):b+": Unknown error"};c.parseError=function(a){return""};c.mapLang=function(a,b){var c=String(a).replace("-","_"),d=a.lang,e=b[c]||b[d]||[],g=e.length;
186
- if(0===g)return d;if(1<g)for(var c=c.toLowerCase(),d=-1,k;++d<g;)if(k=e[d],k.toLowerCase().replace("-","_")===c)return k;return e[0]};c.translate=function(a,b,c){return this.batch([a],b,this.isHtml(a),c)};c.batch=function(){return{always:function(a){a()}}};c._call=function(a){var b=this;b.state=null;a.cache=!0;a.dataType="json";a.error=function(a,c,d){try{var e=a.responseText,g=e&&m.require("$5","json.js").parse(e);d=g&&b.parseError(g)||d}catch(k){}b.stderr(d?String(b)+": "+d:b.odderr(a))};return b.abortable(k.ajax(a))};
187
- c.abortable=function(a){var b=this;a.always(function(){b.$r===a&&(b.$r=null)});return b.$r=a};c.abort=function(){var a=this.$r;a&&a.abort()};c.isHtml=function(a){return(b||(b=d())).sniff(a)};c.createJob=function(){return m.require("$31","job.js").create(this)};g.create=function(a){var b;b=a.id;b="yandex"===b?m.require("$32","yandex.js").create(n):"google"===b?m.require("$33","google.js").create(n):"microsoft"===b?m.require("$34","ms.js").create(n):"deepl"===b?m.require("$35","deepl.js").create(n):
188
- m.require("$36","custom.js").create(n);b.init(a);return b};g.suggest=function(a,b,c,d){var e,g,k=a.length;for(e=0;e<k;e++)g=a[e],g.translate(b,c,d)};var b;return g}({},x,u));m.register("$19",function(g,e,m){g.init=function(g){function d(){G||(H.click(h),G=k('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:580,modal:!0,autoOpen:!1,closeOnEscape:!0}).on("change",'input[name="connection_type"]',function(){this.checked&&k("#ssh-keys").toggleClass("hidden",
189
- "ssh"!==k(this).val())}));return G}function c(){R&&(b(k(s)),R=!1);if(E&&I){var a=I,c=k(Q);c.find("span.loco-msg").text(a);K||(c.removeClass("jshide").hide().fadeIn(500),K=!0)}else K&&(b(k(Q)),K=!1)}function b(a){a.slideUp(250).fadeOut(250,function(){k(this).addClass("jshide")})}function a(){if(E)return G&&G.dialog("close"),c(),k(g).find('button[type="submit"]').attr("disabled",!1),k(e).triggerHandler("resize"),x&&x(!0),!0;z&&G?(R||(k(s).removeClass("jshide").hide().fadeIn(500),R=!0),K&&(b(k(Q)),K=
190
- !1)):c();k(g).find('input[type="submit"]').attr("disabled",!0);x&&x(!1);return!1}function l(a){var b,c,d=w||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:k('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function f(a){a.preventDefault();a=k(a.target).serializeArray();r(a);D=!0;return!1}function q(a){a.preventDefault();G.dialog("close");return!1}function h(a){a.preventDefault();G.dialog("open").find('input[name="connection_type"]').change();return!1}function v(b){E=b.authed;
191
- y=b.method;k(s).find("span.loco-msg").text(b.message||"Something went wrong.");I=b.warning||"";b.notice&&p.notices.info(b.notice);if(E)"direct"!==y&&(w=b.creds,l(g),D&&b.success&&p.notices.success(b.success)),a();else if(b.reason)p.notices.info(b.reason);else if(b=b.prompt){var c=d();c.html(b).find("form").submit(f);c.dialog("option","title",c.find("h2").remove().text());c.find("button.cancel-button").show().click(q);c.find('input[type="submit"]').addClass("button-primary");a();k(e).triggerHandler("resize")}else p.notices.error("Server didn't return credentials, nor a prompt for credentials")}
192
- function u(){a()}function r(a){D=!1;p.ajax.setNonce("fsConnect",N).post("fsConnect",a,v,u);return a}var w,x,s=g,y=null,D=!1,E=!1,p=e.loco,z=g.path.value,F=g.auth.value,N=g["loco-nonce"].value,H=k(s).find("button.button-primary"),Q=m.getElementById(s.id+"-warn"),R=!1,K=!1,I="",G;p.notices.convert(Q).stick();g.connection_type?(w={},w.connection_type=g.connection_type.value,E=!0):z&&F&&r({path:z,auth:F});a();return{applyCreds:function(a){if(a.nodeType)l(a);else{var b,c=w||{};for(b in c)c.hasOwnProperty(b)&&
193
- (a[b]=c[b])}return this},setForm:function(b){g=b;a();l(b);return this},connect:function(){z=g.path.value;F=g.auth.value;r(k(g).serializeArray());return this},listen:function(a){x=a;E&&a(!0);return this}}};return g}({},x,u));m.register("$20",function(g,e,u){function n(e,f,g,h){f="n"===g?c(f):b(f);h&&(f=a(f));return d([].sort,[f])(e)}function d(a,b){return function(c){a.apply(c,b);return c}}function c(a){return function(b,c){var d=b&&b[a]||0,e=c&&c[a]||0;return d===e?0:d>e?1:-1}}function b(a){return function(b,
194
- c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function a(a){return function(b,c){return-1*a(b,c)}}g.init=function(a){function b(a){var c=-1,d=a.length;for(k("tr",s).remove();++c<d;)s.appendChild(a[c].$)}function c(a){r=a?A.find(a,d):d.slice(0);x&&(a=e[x],r=n(r,x,a.type,a.desc));b(r)}var d=[],e=[],g=0,r,u,x,s=a.getElementsByTagName("tbody")[0],y=a.getElementsByTagName("thead")[0],A=m.require("$10","fulltext.js").init();y&&s&&(k("th",y).each(function(a,c){var l=c.getAttribute("data-sort-type");
195
- l&&(a=g,k(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var g=e[c],l=g.type,m=!(g.desc=!g.desc);r=n(r||d.slice(0),c,l,m);b(r);u&&u.removeClass("loco-desc loco-asc");u=k(g.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");x=c;return!1}),e[g]={$:c,type:l});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):g++}),k("tr",s).each(function(a,b){var c,f,g,k=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(f in e){c=m[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,
196
- ""))&&k.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(e[f].type){case "n":g=Number(g)}l[f]=g}d[a]=l;A.index(a,k)}),a=k('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],y=k(a.form),1<d.length?m.require("$11","LocoTextListener.js").listen(a,c):y.hide(),y.on("submit",function(a){a.preventDefault();return!1})))};return g}({},x,u));var D=x.loco||{},H=D.conf||{$v:[0,0]};x=m.require("$1","t.js").init();u=H.wplang;D.version=function(g){return H.$v[g||
197
- 0]};m.require("$2","html.js");m.require("$3","number.js");m.require("$4","array.js");m.require("$5","json.js");D.l10n=x;x.load(H.wpl10n);u&&x.pluraleq(u.pluraleq);D.string=m.require("$6","string.js");D.notices=m.require("$7","notices.js").init(x);D.ajax=m.require("$8","ajax.js").init(H).localise(x);D.locale=m.require("$9","wplocale.js");D.fulltext=m.require("$10","fulltext.js");D.watchtext=m.require("$11","LocoTextListener.js").listen;D.tooltip=m.require("$12","tooltip.js");D.po={ed:m.require("$13",
198
- "poedit.js"),kbd:m.require("$14","hotkeys.js"),init:m.require("$15","po.js").create,ace:m.require("$16","ace.js").strf("php"),ref:m.require("$17","refs.js")};D.apis=m.require("$18","apis.js");D.fs=m.require("$19","fsconn.js");k("#loco-admin.wrap table.wp-list-table").each(function(g,e){m.require("$20","tables.js").init(e)});D.validate=function(g){return"2.4.2"!==(/^\d+\.\d+\.\d+/.exec(g&&g[0]||"")&&RegExp.lastMatch)?(D.notices.warn("admin.js is the wrong version (2.4.2). Please empty all relevant caches and reload this page."),
199
- !1):!0}})(window,document,window.jQuery);
1
  (function(x,u,k,I){var m=function(){function g(e){throw Error("Failed to require "+e);}var e={};return{register:function(g,n){e[g]=n},require:function(k,n){return e[k]||g(n)},include:function(k,n,d){return e[k]||(d?g(n):null)}}}();m.register("$1",function(g,e,k){function n(d){var c=typeof d;if("string"===c)if(/[^ <>!=()%^&|?:n0-9]/.test(d))console.error("Invalid plural: "+d);else return new Function("n","return "+d);"function"!==c&&(d=function(b){return 1!=b});return d}g.init=function(d){function c(a,
2
+ l,c){return(a=b[a])&&a[c]?a[c]:l||""}d=n(d);var b={};return{_:function(a){return c(a,a,0)},_x:function(a,b){return c(b+"\u0004"+a,a,0)},_n:function(a,b,f){f=Number(d(f));isNaN(f)&&(f=0);return c(a,f?b:a,f)},load:function(a){b=a||{};return this},pluraleq:function(a){d=n(a);return this}}};return g}({},x,u));m.register("$2",function(g,e,k){g.ie=function(){var n=!1,d=0;e.attachEvent&&e.navigator&&/MSIE (\d+)\./.exec(String(navigator.appVersion))&&(d=Number(RegExp.$1),n=11>d);return function(){return n}}();
3
+ g.init=function(){return g};return g}({},x,u));m.register("$3",function(g,e,k){Number.prototype.format=function(e){e=Math.pow(10,e||0);var d=Math.round(e*this)/e;e=[];var d=String(d),c=d.split("."),d=c[0],c=c[1],b=d.length;do e.unshift(d.substring(b-3,b));while(0<(b-=3));d=e.join(",");if(e=c){e=c;for(var a,c=e.length;"0"===e.charAt(--c);)a=c;a&&(e=e.substring(0,a));e=c=e}e&&(d+="."+c);return d};Number.prototype.percent=function(e){var d=0,c=this&&e?100*(this/e):0;if(0===c)return"0";if(100===c)return"100";
4
+ if(99<c)c=Math.min(c,99.9),e=c.format(++d);else if(0.5>c){c=Math.max(c,1E-4);do e=c.format(++d);while("0"===e&&4>d);e=e.substr(1)}else e=c.format(0);return e};return g}({},x,u));m.register("$4",function(g,e,k){Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var d,c=Object(this),b=c.length>>>0;if(0===b)return-1;d=0;1<arguments.length&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&Infinity!=d&&-Infinity!=d&&(d=(0<d||-1)*Math.floor(Math.abs(d))));if(d>=b)return-1;
5
+ for(d=0<=d?d:Math.max(b-Math.abs(d),0);d<b;d++)if(d in c&&c[d]===e)return d;return-1});return g}({},x,u));m.register("$5",function(g,e,m){e.JSON||(e.JSON={parse:k.parseJSON,stringify:null});return g=e.JSON}({},x,u));m.register("$6",function(g,e,k){g.trim=function(e,d){for(d||(d=" \n");e&&-1!==d.indexOf(e.substr(0,1));)e=e.substr(1);for(;e&&-1!==d.indexOf(e.substr(-1));)e=e.substr(0,e.length-1);return e};g.sprintf=function(e){var d=0,c,b=[].slice.call(arguments,1);return e.replace(/%([sud%])/g,function(a,
6
+ l){if("%"===l)return"%";c=b[d++];return String(c)||""})};return g}({},x,u));m.register("$21",function(g,e,k){function n(d){return function(c,b){for(var a=c[d]||0;(c=c.offsetParent)&&c!==(b||k.body);)a+=c[d]||0;return a}}g.top=n("offsetTop");g.left=n("offsetLeft");g.el=function(d,c){var b=k.createElement(d||"div");c&&(b.className=c);return b};g.txt=function(d){return k.createTextNode(d||"")};return g}({},x,u));m.register("$7",function(g,e,B){function n(a,b,c){function l(){f();z=setTimeout(b,c)}function f(){z&&
7
+ clearTimeout(z);z=null}var z;l();k(a).mouseenter(f).mouseleave(l);return{die:function(){f();k(a).off("mouseenter mouseleave")}}}function d(a,b){a.fadeTo(b,0,function(){a.slideUp(b,function(){a.remove();k(e).triggerHandler("resize")})});return a}function c(a,b){function c(b){q[z]=null;d(k(a),250);f&&f.die();var l;if(l=b)b.stopPropagation(),b.preventDefault(),l=!1;return l}function l(b){f&&f.die();return f=n(a,c,b)}var f,z,w,h=k(a),r=h.find("button");0===r.length&&(h.addClass("is-dismissible"),r=k('<button type="button" class="notice-dismiss"> </a>').appendTo(h));
8
  r.off("click").click(c);k(e).triggerHandler("resize");v();z=q.length;q.push(c);b&&(f=l(b));return{link:function(b,l){var c=l||b,z=k(a).find("nav"),c=k("<nav></nav>").append(k("<a></a>").attr("href",b).text(c));w?(w.push(c.html()),z.html(w.join("<span> | </span>"))):(w=[c.html()],k(a).addClass("has-nav").append(c));return this},stick:function(){f&&f.die();f=null;q[z]=null;return this},slow:function(a){l(a||1E4);return this}}}function b(a,b,c){var l=m.require("$21","dom.js").el;a=k('<div class="notice notice-'+
9
  a+' loco-notice inline"></div>').prependTo(k("#loco-notices"));var f=k(l("p"));c=k(l("span")).text(c);b=k(l("strong","has-icon")).text(b+": ");f.append(b).append(c).appendTo(a);return a}function a(a,l,f,w){a=b(f,l,a).css("opacity","0").fadeTo(500,1);k(e).triggerHandler("resize");return c(a,w)}function l(b){return a(b,r,"warning")}function f(){k("#loco-notices").find("div.notice").each(function(a,b){if(-1===b.className.indexOf("jshide")){var l=-1===b.className.indexOf("notice-success")?null:5E3;c(b,
10
+ l)}})}var q=[],h=e.console||{log:function(){}},v=Date.now||function(){return(new Date).getTime()},A,r,w,C;g.error=function(b){return a(b,A,"error")};g.warn=l;g.info=function(b){return a(b,w,"info")};g.success=function(b){return a(b,C,"success",5E3)};g.warning=l;g.log=function(){h.log.apply(h,arguments)};g.debug=function(a,b){(h.error||h.log)("Loco: "+a);b&&h.log(b)};g.clear=function(){for(var a=-1,b,l=q,c=l.length;++a<c;)(b=l[a])&&b.call&&b();q=[];return g};g.create=b;g.raise=function(a){(g[a.type]||
11
+ g.error).call(g,a.message)};g.convert=c;g.init=function(a){A=a._("Error");r=a._("Warning");w=a._("Notice");C=a._("OK");setTimeout(f,1E3);return g};return g}({},x,u));m.register("$8",function(g,e,B){function n(a){var b=k("<pre>"+a+"</pre>").text();b&&(b=b.replace(/[\r\n]+/g,"\n").replace(/(^|\n)\s+/g,"$1").replace(/\s+$/,""));b||(b=a)||(b="Blank response from server");return b}function d(a){return(a=a.split(/[\r\n]/)[0])?(a=a.replace(/ +in +\S+ on line \d+/,""),a=a.replace(/^[()! ]+Fatal error:\s*/,
12
  "")):t._("Server returned invalid data")}function c(a,b,l){a[b]=l}function b(a,b,l){a.push({name:b,value:l})}function a(a,b,l){a.append(b,l)}function l(a,b,l,c){function f(b,c,v){if("abort"!==c){var z=q||{_:function(a){return a}},e=b.status,r=b.responseText,s=n(r),C=b.getResponseHeader("Content-Type")||"text/html",g=b.getResponseHeader("Content-Length")||r.length;"success"===c&&v?y.error(v):(y.error(d(s)+".\n"+z._("Check console output for debugging information")),y.debug("Ajax failure for "+a,{status:e,
13
  error:c,message:v,output:r}),"parsererror"===c&&(v="Response not JSON"),y.log([z._("Provide the following text when reporting a problem")+":","----","Status "+e+' "'+(v||z._("Unknown error"))+'" ('+C+" "+g+" bytes)",s,"===="].join("\n")));l&&l.call&&l(b,c,v);h=b}}c.url=v;c.dataType="json";var y=m.require("$7","notices.js").clear();h=null;return k.ajax(c).fail(f).done(function(a,l,c){var z=a&&a.data,h=a&&a.notices,w=h&&h.length;for(!z||a.error?f(c,l,a&&a.error&&a.error.message):b&&b(z,l,c);w--;)y.raise(h[w])})}
14
  var f={},q,h,v=e.ajaxurl||"/wp-admin/admin-ajax.php";g.init=function(a){f=a.nonces||f;return g};g.localise=function(a){q=a;return g};g.xhr=function(){return h};g.strip=n;g.parse=d;g.submit=function(a,b,c){function f(a,b){b.disabled?b.setAttribute("data-was-disabled","true"):b.disabled=!0}function h(a,b){b.getAttribute("data-was-disabled")||(b.disabled=!1)}function v(a){a.find(".button-primary").removeClass("loading");a.find("button").each(h);a.find("input").each(h);a.find("select").each(h);a.find("textarea").each(h);
15
+ a.removeClass("disabled loading")}var d=k(a),q=d.serialize();(function(a){a.find(".button-primary").addClass("loading");a.find("button").each(f);a.find("input").each(f);a.find("select").each(f);a.find("textarea").each(f);a.addClass("disabled loading")})(d);return l(a.route.value,function(a,c,l){v(d);b&&b(a,c,l)},function(a,b,l){v(d);c&&c(a,b,l)},{type:a.method,data:q})};g.post=function(h,v,w,d){var q,y=!0;v=v||{};(q=f[h])||(e.console&&console.error&&console.error('No nonce for "'+h+'"'),q="");var J=
16
  q;e.FormData&&v instanceof FormData?(y=!1,q=a):q=Array.isArray(v)?b:c;q(v,"action","loco_json");q(v,"route",h);q(v,"loco-nonce",J);return l(h,w,d,{type:"post",data:v,processData:y,contentType:y?"application/x-www-form-urlencoded; charset=UTF-8":!1})};g.setNonce=function(a,b){f[a]=b;return g};return g}({},x,u));m.register("$22",{arab:1,aran:1,hebr:1,nkoo:1,syrc:1,syrn:1,syrj:1,syre:1,samr:1,mand:1,mend:1,thaa:1,adlm:1,cprt:1,phnx:1,armi:1,prti:1,phli:1,phlp:1,phlv:1,avst:1,mani:1,khar:1,orkh:1,ital:1,
17
  lydi:1,ar:1,ary:1,ckb:1,dv:1,fa:1,he:1,nqo:1,ps:1,ur:1,yi:1});m.register("$9",function(g,e,k){function n(){}var d,c=m.require("$22","rtl.json");g.init=function(){return new n};g.cast=function(b){return b instanceof n?b:"string"===typeof b?g.parse(b):g.clone(b)};g.clone=function(b){var a,l=new n;for(a in b)l[a]=b[a];return l};g.parse=function(b){if(!(d||(d=/^([a-z]{2,3})(?:[-_]([a-z]{2}))?(?:[-_]([a-z0-9]{3,8}))?$/i)).exec(b))return null;var a=new n;a.lang=RegExp.$1.toLowerCase();if(b=RegExp.$2)a.region=
18
  b.toUpperCase();if(b=RegExp.$3)a.variant=b.toLowerCase();return a};e=n.prototype;e.isValid=function(){return!!this.lang};e.isKnown=function(){var b=this.lang;return!(!b||"zxx"===b)};e.toString=function(b){b=b||"_";var a,l=this.lang||"zxx";if(a=this.region)l+=b+a;if(a=this.variant)l+=b+a;return l};e.getIcon=function(){for(var b=3,a,l,c=["variant","region","lang"],q=[];0!==b--;)if(a=c[b],l=this[a])q.push(a),q.push(a+"-"+l.toLowerCase());return q.join(" ")};e.isRTL=function(){return!!c[String(this.lang).toLowerCase()]};
28
  "\u1fc2":"\u03b7","\u1fc6":"\u03b7","\u1fc7":"\u03b7","\u1fc3":"\u03b7","\u1f30":"\u03b9","\u1f34":"\u03b9","\u1f32":"\u03b9","\u1f36":"\u03b9","\u1f31":"\u03b9","\u1f35":"\u03b9","\u1f33":"\u03b9","\u1f37":"\u03b9","\u03af":"\u03b9","\u1f77":"\u03b9","\u1f76":"\u03b9","\u1fd0":"\u03b9","\u1fd6":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u1fd3":"\u03b9","\u1fd2":"\u03b9","\u1fd7":"\u03b9","\u1fd1":"\u03b9","\u1f40":"\u03bf","\u1f44":"\u03bf","\u1f42":"\u03bf","\u1f41":"\u03bf","\u1f45":"\u03bf",
29
  "\u1f43":"\u03bf","\u03cc":"\u03bf","\u1f79":"\u03bf","\u1f78":"\u03bf","\u1fe4":"\u03c1","\u1fe5":"\u03c1","\u1f50":"\u03c5","\u1f54":"\u03c5","\u1f52":"\u03c5","\u1f56":"\u03c5","\u1f51":"\u03c5","\u1f55":"\u03c5","\u1f53":"\u03c5","\u1f57":"\u03c5","\u03cd":"\u03c5","\u1f7b":"\u03c5","\u1f7a":"\u03c5","\u1fe0":"\u03c5","\u1fe6":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u1fe3":"\u03c5","\u1fe2":"\u03c5","\u1fe7":"\u03c5","\u1fe1":"\u03c5","\u1f60":"\u03c9","\u1f64":"\u03c9","\u1fa4":"\u03c9",
30
  "\u1f62":"\u03c9","\u1fa2":"\u03c9","\u1f66":"\u03c9","\u1fa6":"\u03c9","\u1fa0":"\u03c9","\u1f61":"\u03c9","\u1f65":"\u03c9","\u1fa5":"\u03c9","\u1f63":"\u03c9","\u1fa3":"\u03c9","\u1f67":"\u03c9","\u1fa7":"\u03c9","\u1fa1":"\u03c9","\u03ce":"\u03c9","\u1f7d":"\u03c9","\u1ff4":"\u03c9","\u1f7c":"\u03c9","\u1ff2":"\u03c9","\u1ff6":"\u03c9","\u1ff7":"\u03c9","\u1ff3":"\u03c9","\u0491":"\u0433","\u0450":"\u0435","\u0451":"\u0435","\u04c2":"\u0436","\u045d":"\u0438","\u04e3":"\u0438","\u04ef":"\u0443"});
31
+ m.register("$10",function(g,e,k){g.init=function(){function e(a){return h[a]||a}function d(a,b,c,l){b=a.split(b);for(var f=b.length;0!==f--;)(a=b[f])&&null==l[a]&&(c.push(a),l[a]=!0);return c}function c(a){return d(String(a||"").toLowerCase().replace(f,e),q,[],{})}function b(a,b){for(var c=[],h={},C,s=b.length,y=q;0!==s--;)(C=b[s])&&d(String(C||"").toLowerCase().replace(f,e),y,c,h);l[a]=c}function a(a,b){var c=[],f=-1,h=l,q=h.length,d,e,g,p,z,F,n=a.length,k=b?!0:!1;a:for(;++f<q;)if(g=h[f],null!=g&&
32
  (p=g.length)){z=0;b:for(;z<n;z++){F=a[z];for(d=0;d<p;d++)if(e=g[d],0===e.indexOf(F))continue b;continue a}c.push(k?b[f]:f)}return c}var l=[],f=/[^a-z0-9]/g,q=/[\-_\s.?!;:,*^+=~`"(){}<>\[\]\/\\\u00a0\u1680\u180e\u2000-\u206f\u2e00-\u2e7f\u3000-\u303f]+/,h=m.require("$23","flatten.json");return{split:c,pull:function(b,c){return a(b,c)},find:function(b,l){return a(c(b),l)},add:function(a,b){l[a]=c(b)},push:function(a){b(l.length,a)},index:function(a,c){b(a,c)},size:function(){return l.length},clear:function(){l=
33
+ []},remove:function(a){l[a]=null}}};return g}({},x,u));m.register("$11",function(g,e,m){g.listen=function(g,d){function c(){r[f?"show":"hide"]()}function b(a){A&&g.setAttribute("size",2+a.length);f=a;c();return a}function a(){q=null;d(f)}function l(){var c=g.value;v&&c===v&&(c="");c!==f&&(q&&clearTimeout(q),b(c),h?q=setTimeout(a,h):a())}g instanceof jQuery&&(g=g[0]);var f,q,h=150,v=e.attachEvent&&g.getAttribute("placeholder"),A=1===Number(g.size),r=k('<a href="#clear" tabindex="-1" class="icon clear"><span>clear</span></a>').click(function(){g.value=
34
  "";l();return!1});b(g.value);k(g).on("input blur focus",function(){l();return!0}).after(r);c();return{delay:function(a){h=a},ping:function(c){c?(q&&clearTimeout(q),c=g.value,v&&c===v&&(c=""),b(c),a(),c=void 0):c=l();return c},val:function(a){if(null==a)return f;q&&clearTimeout(q);g.value=b(a);c()},el:function(){return g},blur:function(a){return k(g).on("blur",a)}}};return g}({},x,u));m.register("$12",function(g,e,m){function n(b,a){this.$element=k(b);this.options=a;this.enabled=!0;this.fixTitle()}
35
  g.init=function(b,a){var l={fade:!0,offset:5,delayIn:d,delayOut:c,anchor:b.attr("data-anchor"),gravity:b.attr("data-gravity")||"s"};a&&(l=k.extend({},l,a));b.tipsy(l)};g.delays=function(b,a){d=b||150;c=a||100};g.kill=function(){k("div.tipsy").remove()};g.text=function(b,a){a.data("tipsy").setTitle(b)};var d,c;g.delays();k(m.body).on("overlayOpened overlayClosing",function(b){g.kill();return!0});n.prototype={show:function(){var b=this.getTitle();if(b&&this.enabled){var a=this.tip();a.find(".tipsy-inner")[this.options.html?
36
  "html":"text"](b);a[0].className="tipsy";a.remove().css({top:0,left:0}).prependTo(m.body);var b=(b=this.options.anchor)?this.$element.find(b):this.$element,b=k.extend({},b.offset(),{width:b[0].offsetWidth,height:b[0].offsetHeight}),c=a[0].offsetWidth,f=a[0].offsetHeight,d="function"==typeof this.options.gravity?this.options.gravity.call(this.$element[0]):this.options.gravity,h;switch(d.charAt(0)){case "n":h={top:b.top+b.height+this.options.offset,left:b.left+b.width/2-c/2};break;case "s":h={top:b.top-
53
  "snapInterval(0px,"+a+"px)",c.style["-ms-scroll-snap-type"]="mandatory",c.style["-ms-scroll-chaining"]="none")},scroll:function(a,b,h){s();var f=c.scrollLeft,l=a>f?1:-1,z=Math[1===l?"min":"max"],d=Math.round(16*b*l);return y=m.require("$50","fps.js").loop(function(b){b&&(f=Math.max(0,z(a,f+d)),c.scrollLeft=f,a===f&&(s(),h&&h(f)))},c)}}};g.start=function(b,c){return n(b,a,c,!1)};g.move=function(a,b){return n(a,l,b,!1)};g.end=function(a,b){return n(a,f,b,!1)};var q=g.each=function(a,c){if(b)(a.MSPOINTER_TYPE_TOUCH||
54
  "touch")===a.pointerType&&c(0,a);else for(var h=-1,f=(a.originalEvent||a).changedTouches||[];++h<f.length;)c(h,f[h])},h=Date.now||function(){return(new Date).getTime()};return g}({},x,u));m.register("$51",function(g,e,m){g.init=function(e){function d(){l.style.top=String(-e.scrollTop)+"px";return!0}function c(){var a=l;a.textContent=e.value;a.innerHTML=a.innerHTML.replace(/[ \t]/g,b).split(/(?:\n|\r\n?)/).join('<span class="eol crlf"></span>\r\n')+'<span class="eol eof"></span>';return!0}function b(a){return'<span class="x'+
55
  a.charCodeAt(0).toString(16)+'">'+a+"</span>"}var a=e.parentNode,l=a.insertBefore(m.createElement("div"),e);k(e).on("input",c).on("scroll",d);k(a).addClass("has-mirror");l.className="ta-mirror";var f=e.offsetWidth-e.clientWidth;2<f&&(l.style.marginRight=String(f-2)+"px");c();d();return{kill:function(){k(e).off("input",c).off("scroll",d);a.removeChild(l);l=null;k(a).removeClass("has-mirror")}}};return g}({},x,u));m.register("$30",function(g,e,k){function n(b,a){for(var c=0,f=-1,q=a&&e[a],h=d[b]||[],
56
+ g=h.length;++f<g;)callback=h[f],"function"===typeof callback&&(callback(q),c++);return c}var d={},c;g.load=function(b,a,c){function f(){g&&(clearTimeout(g),g=null);A&&(A.onreadystatechange=null,A=A=A.onload=null);b&&(delete d[b],b=null)}function q(a,h){var d=A&&A.readyState;if(h||!d||"loaded"===d||"complete"===d)h||n(b,c),f()}function h(){if(0===n(b))throw Error('Failed to load "'+(c||b)+'"');f()}if(c&&e[c])"function"===typeof a&&a(e[c]);else if(null!=d[b])d[b].push(a);else{d[b]=[a];var g=setTimeout(h,
57
+ 4E3),A=k.createElement("script");A.setAttribute("src",b);A.setAttribute("async","true");A.onreadystatechange=q;A.onload=q;A.onerror=h;A.onabort=f;k.getElementsByTagName("head")[0].appendChild(A)}};g.stat=function(b){var a;if(!(a=c)){for(var l,f,d=k.getElementsByTagName("script"),h=-1,e=d.length;++h<e;)if(a=d[h].getAttribute("src"))if(l=a.indexOf("/lib/vendor"),-1!==l){f=a.substr(0,l);break}a=c=f||"/static"}return a+b};return g}({},x,u));m.register("$16",function(g,e,B){function n(a,b){a.setReadOnly(!1);
58
  a.on("change",function(a,c){return b.val(c.getValue())});a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()})}function d(a){a.off("change");a.off("focus");a.off("blur")}function c(a){d(a);a.setReadOnly(!0);a.setHighlightGutterLine(!1);a.setHighlightActiveLine(!1)}function b(b,c){function f(){this.HighlightRules=l}var l=a(c),d=b.require,e=d("ace/lib/oop");e.inherits(l,d("ace/mode/text_highlight_rules").TextHighlightRules);e.inherits(f,d("ace/mode/text").Mode);return new f}
59
  function a(a){return function(){var b={start:[{token:"empty_line",regex:/^$/},{token:"constant.language",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"constant.language",regex:/<!\[CDATA\[/},{token:"constant.language",regex:/\]\]>/},{token:"locked",regex:/<(?:xliff:)?(?:g|ph)[^>]*>[^<]*<\/(?:xliff:)?(?:g|ph)>/},{token:"locked",regex:/<(?:xliff:)?(bx|ex|x)[^\/>]*\/>/},{token:"constant.language",regex:/<\/?[:a-z]+[^>]*>/}]},c=l(a);"icu"===a?b={start:b.start.concat([{token:"icu-quoted",
60
  regex:/'([{}][^']*)?'/},{token:"printf",regex:"{[^!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(?:number|date|time|spellout|ordinal|duration)[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*(,[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]*[^{}]+)?)?}"},
61
  {token:"icu",regex:/{/,next:"icuName"},{token:"icu",regex:/}/,next:"icuType"}]),icuName:[{token:"icu",regex:"[\\s\\u0085\\u200E\\u200F\\u2028\\u2029]+"},{token:"icu.name",regex:"[^\\s\\u0085\\u200E\\u200F\\u2028\\u2029!-/:-@\\[-^{-~\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a9\u00ab\u00ac\u00ae\u00b0\u00b1\u00b6\u00bb\u00bf\u00d7\u00f7\\u2010-\\u2027\\u2030-\\u203E\\u2041-\\u2053\\u2055-\\u205E\\u2190-\\u245F\\u2500-\\u2775\\u2794-\\u2BFF\\u2E00-\\u2E7F\\u3001-\\u3003\\u3008-\\u3020\\u3030\\uFD3E\\uFD3F\\uFE45\\uFE46]+",
62
  next:"icuType"},{defaultToken:"icu",next:"icuType"}],icuType:[{token:"icu",regex:/[{}]/,next:"start"},{defaultToken:"icu"}]}:c&&b.start.push({token:"printf",regex:c});this.$rules=b}}function l(a){switch(a){case "objc":return/%(?:\d+\$)?[-+'0# ]*\d*(?:\.\d+|\.\*(?:\d+\$)?)?(?:hh?|ll?|[qjzTL])?[sScCdDioOuUxXfFeEgGaAp%@]/;case "java":return/%(?:\d+\$)?[-+,(0# ]*\d*(?:\.\d+)?(?:[bBhHsScCdoxXeEfgGaA%n]|[tT][HIklMSLNpzZsQBbhAaCYyjmdeRTrDFc])/;case "php":return/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo%]/;
63
+ case "python":return/%(?:\([a-z]+\))?[-+0# ]*(?:\d+|\*)?(?:\.\d+|\.\*)?(?:[hlL])?[sdiouxXeEfFgGcra%]/;case "javascript":return/%(?:[1-9]\d*\$)?\+?(?:0|'[^$])?-?\d*(?:\.\d+)?[b-gijostTuvxX%]/;case "auto":return/%(?:\d+\$|\([a-z]+\))?(?:[-+0]?\d*(\.\d+)?[duxoefgaDUXOEFGA]|[@scSC%])/;case q:return f||"%%"}}var f,q="auto";g.init=function(a,f,l){var g,w=!1,C=l||q,s=a.parentNode,y=s.appendChild(B.createElement("div"));k(s).addClass("has-proxy has-ace");m.require("$30","remote.js").load("https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js",
64
  function(l){if(y){if(!l)throw Error("Failed to load code editor");g=l.edit(y);var d=g.session,e=g.renderer;g.$blockScrolling=Infinity;g.setShowInvisibles(w);g.setWrapBehavioursEnabled(!1);g.setBehavioursEnabled(!1);g.setHighlightActiveLine(!1);d.setUseSoftTabs(!1);e.setShowGutter(!0);e.setPadding(10);e.setScrollMargin(8);d.setMode(b(l,C));g.setValue(a.value,-1);d.setUseWrapMode(!0);f?n(g,f):c(g)}},"ace");return{kill:function(){g&&(d(g),g.destroy(),g=null);y&&(s.removeChild(y),k(s).removeClass("has-proxy has-ace"),
65
  y=null);return this},disable:function(){g&&c(g);f=null;return this},enable:function(a){f=a;g&&n(g,a);return this},resize:function(){g&&g.resize();return this},val:function(a){g&&a!==g.getValue()&&g.setValue(a,-1);return this},invs:function(a){a=a||!1;w!==a&&(w=a,g&&g.setShowInvisibles(a));return this},strf:function(a){a=a||q;a!==C&&(C=a,g&&g.session.setMode(b(e.ace,a)));return this},focus:function(){return this}}};g.strf=function(a,b){q=a;f=b;return g};return g}({},x,u));m.register("$52",function(g,
66
+ e,B){function n(a,b){function c(){return b.val(a.getContent())}a.on("input",c);a.on("change",c);a.on("focus",function(){return b.focus()});a.on("blur",function(){return b.blur()});a.setMode("design")}function d(a){a.off("input");a.off("change");a.off("focus");a.off("blur")}function c(a){d(a);a.setMode("readonly")}var b=0;g.load=function(a){var b=m.require("$30","remote.js");b.load(b.stat("/lib/tinymce.min.js"),a,"tinymce");return g};g.init=function(a,l){function f(a){A=a;r="<p>"===a.substr(0,3)&&
67
+ "</p>"===a.substr(-4);return a.replace(/(<\/?)script/ig,"$1loco:script")}function e(a){h=a;a._getContent=a.getContent;a.getContent=function(a){a=this._getContent(a);a=a.replace(/(<\/?)loco:script/ig,"$1script");if(!r&&"<p>"===a.substr(0,3)&&"</p>"===a.substr(-4)){var b=a.substr(3,a.length-7);if(b===A||-1===b.indexOf("</p>"))a=b}return a};a._setContent=a.setContent;a.setContent=function(a,b){return this._setContent(f(a),b)};l?(n(a,l),l.reset()):c(a);k(s).removeClass("loading")}var h,v=!1,A="",r=!1,
68
+ w=a.parentNode,C=w.parentNode,s=w.appendChild(B.createElement("div")),y=C.insertBefore(B.createElement("nav"),w);y.id="_tb"+String(++b);k(w).addClass("has-proxy has-mce");k(s).addClass("mce-content-body loading").html(f(a.value));g.load(function(a){if(!a)throw Error("Failed to load HTML editor");s&&a.init({inline:!0,target:s,hidden_input:!1,theme:"modern",skin:!1,plugins:"link lists",browser_spellcheck:!0,menubar:!1,fixed_toolbar_container:"#"+y.id,toolbar:"formatselect | bold italic link unlink | bullist numlist outdent indent",
69
  block_formats:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h4;Heading 4=h4;Heading 5=h5;Heading 6=h6;",forced_root_block:"p",relative_urls:!1,convert_urls:!1,remove_script_host:!1,document_base_url:"",allow_script_urls:!1,formats:{alignleft:{classes:"alignleft"},alignright:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"alignright"},aligncenter:{selector:"p,h1,h2,h3,h4,span,strong,em,a",classes:"aligncenter"},strikethrough:{inline:"del"}},fix_list_elements:!0,extended_valid_elements:"span,b,i,u,loco:script",
70
  entities:"38,amp,60,lt,62,gt,160,nbsp",entity_encoding:"named",keep_styles:!1,init_instance_callback:e})});return{val:function(b){b=f(b);null==h?(a.value=b,k(s).html(b)):h.getContent()!==b&&h.setContent(b);l&&l.val(b);return this},kill:function(){h&&(l&&l.val(h.getContent()),d(h),h.destroy(),h=null);s&&(w.removeChild(s),k(w).removeClass("has-proxy has-mce"),s=null);y&&(C.removeChild(y),y=null);return this},enable:function(a){l=a;h&&n(h,a);return this},disable:function(){h&&c(h);l=null;return this},
71
+ focus:function(){h&&l&&h.focus();return this},invs:function(a){a=a||!1;v!==a&&(v=a,k(w)[a?"addClass":"removeClass"]("show-invs"));return this}}};return g}({},x,u));m.register("$48",function(g,e,B){function n(b){function a(){g&&(A.off("input",d),g=!1)}function d(){var a=b.value;a!==w&&(A.trigger("changing",[a,w]),w=a)}function f(){d();g&&C!==w&&A.trigger("changed",[w])}function e(){c=b;C=w;g||(A.on("input",d),g=!0);A.trigger("editFocus");r.addClass("has-focus");return!0}function h(){c===b&&(c=null);
72
+ A.trigger("editBlur");r.removeClass("has-focus");g&&(f(),a());return!0}var g=!1,A=k(b),r=k(b.parentNode),w=b.value,C;A.blur(h).focus(e);return{val:function(a){w!==a&&(b.value=a,A.triggerHandler("input"),w=a);return!0},kill:function(){a();A.off("blur",h).off("focus",e)},fire:function(){w=null;d()},ping:f,blur:h,focus:e,reset:function(){C=w=b.value}}}function d(b){this.e=b}var c;g._new=function(b){return new d(b)};g.init=function(b){var a=new d(b);b.disabled?(b.removeAttribute("disabled"),a.disable()):
73
  b.readOnly?a.disable():a.enable();return a};TextAreaPrototype=d.prototype;TextAreaPrototype.destroy=function(){this.unlisten();var b=this.p;b&&(b.kill(),this.p=null);this.e=null};TextAreaPrototype.reload=function(b,a){var c=this.l;c&&!a&&(this.disable(),c=null);this.val(b||"");a&&!c&&this.enable();return this};TextAreaPrototype.val=function(b){var a=this.e;if(null==b)return a.value;var c=this.l,f=this.p;f&&f.val(b);c&&c.val(b);c||a.value===b||(a.value=b,k(a).triggerHandler("input"));return this};
74
  TextAreaPrototype.fire=function(){this.l&&this.l.fire();return this};TextAreaPrototype.ping=function(){this.l&&this.l.ping();return this};TextAreaPrototype.focus=function(){var b=this.p;b?b.focus():k(this.e).focus()};TextAreaPrototype.focused=function(){return c&&c===this.el};TextAreaPrototype.parent=function(){return this.e.parentNode};TextAreaPrototype.attr=function(b,a){var c=this.e;if(1===arguments.length)return c.getAttribute(b);null==a?c.removeAttribute(b):c.setAttribute(b,a);return this};TextAreaPrototype.editable=
75
  function(){return!!this.l};TextAreaPrototype.enable=function(){var b=this.p;this.e.removeAttribute("readonly");this.listen();b&&b.enable&&b.enable(this.l);return this};TextAreaPrototype.disable=function(){var b=this.p;this.e.setAttribute("readonly",!0);this.unlisten();b&&b.disable&&b.disable();return this};TextAreaPrototype.listen=function(){var b=this.l;b&&b.kill();this.l=n(this.e);return this};TextAreaPrototype.unlisten=function(){var b=this.l;b&&(b.kill(),this.l=null);return this};TextAreaPrototype.setInvs=
77
  !0),c&&this.focus());return this};TextAreaPrototype.setStrf=function(b){this["%"]=b;"code"===this.m&&this.p.strf(b);return this};TextAreaPrototype.name=function(b){this.e.setAttribute("name",b);return this};TextAreaPrototype.placeholder=function(b){this.e.setAttribute("placeholder",b);return this};TextAreaPrototype.redraw=function(){var b=this.p;b&&b.resize&&b.resize()};TextAreaPrototype=null;return g}({},x,u));m.register("$49",function(g,e,m){function n(a){var b=e.console;b&&b.error&&b.error(a)}
78
  function d(a){var b=m.createElement("div");a&&b.setAttribute("class",a);return b}function c(a){return function(){a.resize();return this}}function b(a){return function(b){for(var c=b.target,f=c.$index;null==f&&"DIV"!==c.nodeName&&(c=c.parentElement);)f=c.$index;null!=f&&(b.stopImmediatePropagation(),a.select(f));return!0}}function a(a){return function(){a.redrawDirty()&&a.redraw();return!0}}function l(a){return function(b){var c;c=b.keyCode;if(40===c)c=1;else if(38===c)c=-1;else return!0;if(b.shiftKey||
79
  b.ctrlKey||b.metaKey||b.altKey)return!0;a.selectNext(c);b.stopPropagation();b.preventDefault();return!1}}function f(a,b,c){function f(a){n("row["+a+"] disappeared");return{cellVal:function(){return""}}}return function(h){var d=b||0,e=c?-1:1,z=a.rows||[];h.sort(function(a,b){return e*(z[a]||f(a)).cellVal(d).localeCompare((z[b]||f(b)).cellVal(d))})}}function q(a){this.w=a}function h(a){this.t=a;this.length=0}function v(a,b,c){var f=m.createElement("div");f.className=c||"";this._=f;this.d=b||[];this.i=
80
+ a||0;this.length=b.length}function A(a){this.live=a;this.rows=[]}g.create=function(a){return new q(a)};var r=q.prototype;r.init=function(f){var h=this.w,e=h.id,g=h.splity(e+"-thead",e+"-tbody"),q=g[0],g=g[1],r=[],p=[],z=[],F=[];if(f)this.ds=f,this.idxs=p,this._idxs=null;else if(!(f=this.ds))throw Error("No datasource");q.css.push("wg-thead");g.css.push("wg-tbody");f.eachCol(function(a,b,c){z[a]=e+"-col-"+b;F[a]=c||b});for(var N=d(),A=-1,n=z.length,m=d("wg-cols"),B=q.splitx.apply(q,z);++A<n;)B[A].header(F[A]),
81
+ m.appendChild(N.cloneNode(!1)).setAttribute("for",z[A]);f.eachRow(function(a,b,c){r[a]=new v(a,b,c);p[a]=a});this.rows=r;this.cols=m;this.ww=null;this.root=N=g.body;this.head=q;q.redraw=c(this);q=g.fixed=B[0].bodyY()||20;h.lock().resize(q,g);h.css.push("is-table");h.restyle();this.sc?this._re_sort(n):f.sort&&f.sort(p);this.redrawDirty();this.render();k(N).attr("tabindex","-1").on("keydown",l(this)).on("mousedown",b(this)).on("scroll",a(this));return this};r.clear=function(){for(var a=this.pages||
82
+ [],b=a.length;0!==b--;)a[b].destroy();this.pages=[];this.sy=this.mx=this.mn=this.vh=null;void 0;return this};r.render=function(){for(var a,b,c=[],f=this.rows||[],h=-1,d,e=this.idxs,z=e.length,l=this.idxr={},g=this.r,q=this._r,v=this.root,k=this.cols;++h<z;){0===h%100&&(a=k.cloneNode(!0),b=new A(a),b.h=2200,b.insert(v),c.push(b));d=e[h];l[d]=h;a=f[d];if(null==a)throw Error("Render error, no data at ["+d+"]");a.page=b;b.rows.push(a)}b&&100!==b.size()&&b.sleepH(22);this.pages=c;this.mx=this.mn=null;
83
  this.redrawDirty();this.redraw();null==g?null!=q&&(a=f[q])&&a.page&&(delete this._r,this.select(q,!0)):(a=f[g])&&a.page?this.select(g,!0):(this.deselect(),this._r=g);return this};r.resize=function(){var a=-1,b=this.ww||(this.ww=[]),c=this.w,f=c.cells[0],h=f.body.childNodes,d=h.length,e=this.pages||[],z=e.length;for(c.redraw.call(f);++a<d;)b[a]=h[a].style.width;if(z){c=this.mx;for(a=this.mn;a<=c;a++)e[a].widths(b);this.redrawDirty()&&this.redraw()}};r.redrawDirty=function(){var a=!1,b=this.root,c=
84
  b.scrollTop,b=b.clientHeight;this.sy!==c&&(a=!0,this.sy=c);this.vh!==b&&(a=!0,this.vh=b);return a};r.redraw=function(){for(var a=0,b=-1,c=null,f=null,h=this.ww,d=this.sy,e=this.vh,z=this.mn,l=this.mx,g=Math.max(0,d-100),d=e+d+100,q=this.pages||[],v=q.length;++b<v&&!(a>d);)e=q[b],a+=e.height(),a<g||(null===c&&(c=b),f=b,e.rendered||e.render(h));if(z!==c){if(null!==z&&c>z)for(b=z;b<c;b++){e=q[b];if(!e)throw Error("Shit!");e.rendered&&e.sleep()}this.mn=c}if(l!==f){if(null!==l&&f<l)for(b=l;b>f;b--)e=q[b],
85
  e.rendered&&e.sleep();this.mx=f}};r.selected=function(){return this.r};r.thead=function(){return this.w.cells[0]};r.tbody=function(){return this.w.cells[1]};r.tr=function(a){return(a=this.row(a))?a.cells():[]};r.row=function(a){return this.rows[a]};r.td=function(a,b){return this.tr(a)[b]};r.next=function(a,b,c){null==c&&(c=this.r||0);var f=this.idxs,h=f.length,d=(this.idxr||{})[c];for(c=d;c!==(d+=a)&&!(0<=d&&h>d);)if(b&&h)d=1===a?-1:h,b=!1;else return null;c=f[d];return null==c||null==this.rows[c]?
86
+ (n("Bad next: ["+d+"] does not map to data row"),null):c};r.selectNext=function(a,b,c){a=this.next(a,b);null!=a&&this.r!==a&&this.select(a,c);return this};r.deselect=function(a){var b=this.r;null!=b&&(this.r=null,k(this.tr(b)).removeClass("selected"),this.w.fire("wgRowDeselect",[b,a]));return this};r.selectRow=function(a,b){return this.select(this.idxs[a])};r.select=function(a,b){var c=this.rows[a],f=c&&c.page;if(!f)return this.deselect(!1),n("Row is filtered out"),this;this.deselect(!0);var d,h=
87
+ this.w.cells[1];f.rendered||(d=f.top(),h.scrollY(d),this.redrawDirty()&&this.redraw());if(!c.rendered)return f.rendered||n("Failed to render page"),n("Row ["+c.i+"] not rendered"),this;f=c.cells();k(f).addClass("selected");this.r=a;b||(d=h.scrollY(),k(this.root).focus(),d!==h.scrollY()&&h.scrollY(d));h.scrollTo(f[0],!0);this.w.fire("wgRowSelect",[a,c.data()]);return this};r.unfilter=function(){this._idxs&&(this.idxs=this._sort(this._idxs),this._idxs=null,this.clear().render());return this};r.filter=
88
+ function(a){this._idxs||(this._idxs=this.idxs);this.idxs=this._sort(a);return this.clear().render()};r.each=function(a){for(var b,c=-1,f=this.rows||[],d=this.idxs||[],h=d.length;++c<h;)b=d[c],a(f[b],c,b);return this};r.sortable=function(a){var b=this.sc||(this.sc=new h(this));b.has(a)||b.add(a);return this};r._re_sort=function(a){var b=-1,c=this.sc,f=c.active;for(this.sc=c=new h(this);++b<a;)c.add(b);f&&(b=this.head.indexOf(f.id),-1===b&&(b=Math.min(f.idx,a-1)),this.sort(b,f.desc));return this};r._sort=
89
  function(a,b){b?(this.s=b,b(a)):(b=this.s)&&b(a);return a};r.sort=function(a,b){this._sort(this.idxs,f(this,a,b));this.sc.activate(a,b);return this};r=null;r=h.prototype;r.has=function(a){return null!=this[a]};r.add=function(a){var b=this,c=b.t.head.cells[a];b[a]={desc:null,idx:a,id:c.id};b.length++;c.addClass("wg-sortable").on("click",function(c){if("header"===c.target.nodeName.toLowerCase())return c.stopImmediatePropagation(),b.toggle(a),!1});return b};r.toggle=function(a){this.t.sort(a,!this[a].desc).clear().render();
90
+ return this};r.activate=function(a,b){var c,f;c=this.active;var d=this[a],h=this.t.head.cells;c&&(f=h[c.idx])&&(f.removeClass(c.css),c!==d&&f.restyle());(f=h[a])?(d.desc=b,this.active=d,c="wg-"+(b?"desc":"asc"),f.addClass(c).restyle(),d.css=c):this.active=null;return this};r=null;r=v.prototype;r.render=function(a){var b,c=[],f=this._,d=this.length;if(f){for(this.c=c;0!==d--;)b=f.cloneNode(!1),c[d]=this.update(d,b),b.$index=this.i,a[d].appendChild(b);this._=null}else for(c=this.c;0!==d--;)a[d].appendChild(c[d]);
91
+ this.rendered=!0;return this};r.update=function(a,b){var c=b||this.c[a]||{},f=(this.d[a]||function(){})()||"\u00a0";null==f.innerHTML?c.textContent=f:c.innerHTML=f.innerHTML;return c};r.cells=function(){return this.c||[this._]};r.data=function(){for(var a=-1,b=[],c=this.length;++a<c;)b[a]=this.cellVal(a);return b};r.destroy=function(){this.page=null;this.rendered=!1};r.cellVal=function(a){a=this.d[a]()||"";return String(a.textContent||a)};r=null;r=A.prototype;r.size=function(){return this.rows.length};
92
+ r.insert=function(a){var b=this.h,c=d("wg-dead");c.style.height=String(b)+"px";a.appendChild(c);return this.dead=c};r.top=function(){return(this.rendered?this.live:this.dead).offsetTop};r.height=function(){var a=this.h;null==a&&(this.h=a=this.rendered?this.live.firstChild.offsetHeight:this.dead.offsetHight);a||n("row has zero height");return a};r.render=function(a){for(var b,c=-1,f=this.rows,d=f.length,h=this.dead,e=this.live,z=e.childNodes;++c<d;)b=f[c],b.rendered||b.render(z);d=a.length;for(c=0;c<
93
+ d;c++)z[c].style.width=a[c];h.parentNode.replaceChild(e,h);this.rendered=!0;this.h=null;return this};r.sleep=function(){var a=this.height(),b=this.live,c=this.dead;c.style.height=String(a)+"px";b.parentNode.replaceChild(c,b);this.rendered=!1;this.h=a;return this};r.sleepH=function(a){a*=this.rows.length;var b=this.dead;b&&(b.style.height=String(a)+"px");this.rendered||(this.h=a);return this};r.widths=function(a){for(var b=this.live.childNodes,c=a.length;0!==c--;)b[c].style.width=a[c];return this};
94
+ r.destroy=function(){var a=this.rendered?this.live:this.dead,b=this.rows,c=b.length;for(a.parentNode.removeChild(a);0!==c--;)b[c].destroy()};r=null;return g}({},x,u));m.register("$40",function(g,e,B){function n(a,b){var c=a.id,f=c&&w[c],d=f&&f.parent();if(!f||!d)return null;var h=d.dir===r,c=h?"X":"Y",e="page"+c,h=h?A:v,l=h(d.el),c=b["offset"+c],g=d.el,q=g.className;null==c&&(c=b[e]-h(a));c&&(l+=c);g.className=q+" is-resizing";return{done:function(){g.className=q},move:function(a){d.resize(a[e]-l,
95
+ f);return!0}}}function d(a,c){function f(){k(B).off("mousemove",d);s&&(s.done(),s=null);return!0}function d(a){s?s.move(a):f();return!0}if(s)return!0;s=n(a.target,a);if(!s)return!0;k(B).one("mouseup",f).on("mousemove",d);return b(a)}function c(a,b){var c=b.type;"touchmove"===c?s&&s.move(b):"touchstart"===c?s=n(a.target,b):"touchend"===c&&s&&(s.done(),s=null)}function b(a){a.stopPropagation();a.preventDefault();return!1}function a(a){var b=C;b&&b.redraw();a&&a.redraw();return C=a}function l(b,c){var f=
96
+ k(c).on("editFocus",function(){f.trigger("wgFocus",[a(b)])}).on("editBlur",function(){f.trigger("wgBlur",[a(null)])})}function f(a){var b=a.id,c=a.className;this.id=b;this.el=a;this.pos=this.index=0;this.css=[c||"wg-root","wg-cell"];this._cn=c;w[b]=this;this.clear()}var q=m.include("$46","html.js")||m.include("$2","html.js",!0),h=m.require("$21","dom.js"),v=h.top,A=h.left,r=1,w={},C,s=!1;g.init=function(a){var b=new f(a);b.redraw();m.require("$47","touch.js").ok(function(b){b.dragger(a,c)});k(a).mousedown(d);
97
  return b};e=f.prototype;e.fire=function(a,b){var c=k.Event(a);c.cell=this;k(this.el).trigger(c,b);return this};e.each=function(a){for(var b=-1,c=this.cells,f=c.length;++b<f;)a(c[b],b);return this};e.indexOf=function(a){return(a=w[a.id||String(a)])&&a.pid===this.id?a.index:-1};e.on=function(){return this.$("on",arguments)};e.off=function(){return this.$("off",arguments)};e.find=function(a){return k(this.el).find(a)};e.$=function(a,b){k.fn[a].apply(k(this.el),b);return this};e.addClass=function(a){this.css.push(a);
98
  return this};e.removeClass=function(a){a=this.css.indexOf(a);-1!==a&&this.css.splice(a,1);return this};e.parent=function(){return this.pid&&w[this.pid]};e.splitx=function(){return this._split(r,arguments)};e.splity=function(){return this._split(2,arguments)};e._split=function(a,b){(this.length||this.field)&&this.clear();for(var c=-1,d,e=b.length,l=1/e,g=0;++c<e;){d=h.el();this.body.appendChild(d);for(var q=d,v=b[c],k=v,r=1;w[v];)v=k+"-"+ ++r;q.id=v;d=new f(d);d.index=c;d.pid=this.id;d._locale(this.lang,
99
  this.rtl);d.pos=g;g+=l;this.cells.push(d);this.length++}this.dir=a;this.redraw();return this.cells};e.destroy=function(){this.clear();delete w[this.id];var a=this.el;a.innerHTML="";this.body=null;a.className=this._cn||"";k(a).off();return this};e.exists=function(){return this===w[this.id]};e.clear=function(){for(var a=this.el,b=this.cells,c=this.field,f=this.body,d=this.nav,e=this.length||0;0!==e--;)delete w[b[e].destroy().id];this.cells=[];this.length=0;d&&(a.removeChild(d),this.nav=null);f&&(c&&
100
+ (q.ie()&&k(f).triggerHandler("blur"),c.destroy(),this.field=null),this.table&&(this.table=null),a===f.parentNode&&a.removeChild(f));this.body=a.appendChild(h.el("","wg-body"));this._h=null;return this};e.resize=function(a,b){if(!b&&(b=this.cells[1],!b))return;var c=b.index,f=this.cells,d=k(this.el)[this.dir===r?"width":"height"](),h=f[c+1],c=f[c-1];pad=(b.body||b.el.firstChild).offsetTop||0;max=(h?h.pos*d:d)-pad;min=c?c.pos*d:0;b.pos=Math.min(max,Math.max(min,a))/d;this.redraw();return this};e.distribute=
101
+ function(a){for(var b=-1,c=0,f,d=this.cells,h=a.length;++b<h&&(f=d[++c]);)f.pos=Math.max(0,Math.min(1,a[b]));this.redraw();return this};e.distribution=function(){for(var a=[],b=0,c=this.cells,f=c.length-1;b<f;)a[b]=c[++b].pos;return a};e.restyle=function(){var a=this.css.concat();0===this.index?a.push("first"):a.push("not-first");this.dir&&(a.push("wg-split"),2===this.dir?a.push("wg-split-y"):a.push("wg-split-x"));this.t&&a.push("has-title");this.nav&&a.push("has-nav");this.field&&(a.push("is-field"),
102
+ this.field.editable()?a.push("is-editable"):a.push("is-readonly"));a=a.join(" ");a!==this._css&&(this._css=a,this.el.className=a);return this};e.redraw=function(a){this.restyle();var b=this.el,c=this.body,f=this.field;if(c){var d,h=b.clientWidth||0,e=b.clientHeight||0,l=c.offsetTop||0,e=l>e?0:e-l;this._h!==e&&(this._h=e,c.style.height=String(e)+"px",d=f);this._w!==h&&(this._w=h,d=f);d&&d.redraw()}c=this.length;h=1;e=this.nav;for(l=2===this.dir?"height":"width";0!==c--;)f=this.cells[c],e?d=1:(f.fixed&&
103
+ (f.pos=f.fixed/k(b)[l]()),d=h-f.pos,h=f.pos),f.el.style[l]=String(100*d)+"%",f.redraw(a);return this};e.contents=function(a,b){var c=this.el,f=this.body;if(null==a)return f.innerHTML;this.length?this.clear():f&&(c.removeChild(f),f=null);f||(this.body=f=c.appendChild(h.el("",b||"wg-content")),this._h=null,(c=this.lang)&&this._locale(c,this.rtl,!0));"string"===typeof a?k(f)._html(a):a&&this.append(a);this.redraw();return this};e.textarea=function(a,b){var c=this.field;if(c){var f=c.editable();c.reload(a,
104
  b);f!==b&&this.restyle()}else this.length&&this.clear(),f=h.el("textarea"),f.setAttribute("wrap","virtual"),f.value=a,this.contents(f),c=m.require("$48","field.js")._new(f)[b?"enable":"disable"](),l(this,f),this.field=c,this.restyle();this.lang||this.locale("en");return c};e.locale=function(a){a=m.require("$38","locale.js").cast(a);return this._locale(String(a),a.isRTL())};e._locale=function(a,b,c){var f=this.body;if(c||a!==this.lang)this.lang=a,f&&f.setAttribute("lang",a);if(c||b!==this.rtl)this.rtl=
105
  b,f&&f.setAttribute("dir",b?"RTL":"LTR");return this};e.editable=function(){var a=this.field;if(a)return a.editable()?a:null;var b=this.cells,c=b.length,f=this.navigated();if(null!=f)return b[f].editable();for(;++f<c;){for(f=0;f<c;c++);if(a=b[f].editable())return a}};e.eachTextarea=function(a){var b=this.field;b?a(b):this.each(function(b){b.eachTextarea(a)});return this};e.append=function(a){a&&(a.nodeType?q.init(this.body.appendChild(a)):q.init(k(a).appendTo(this.body)));return this};e.prepend=function(a){var b=
106
  this.body;if(a.nodeType){var c=b.firstChild;q.init(c?b.insertBefore(a,c):b.appendChild(a))}else q.init(k(a).prependTo(b));return this};e.before=function(a){var b=this.body;a.nodeType?q.init(this.el.insertBefore(a,b)):q.init(k(a).insertBefore(b));return this};e.header=function(a,b){if(null==a&&null==b)return this.el.getElementsByTagName("header")[0];this.t=h.txt(a||"");this.el.insertBefore(h.el("header",b),this.body).appendChild(this.t);this.redraw();return this};e.title=function(a){var b=this.t;if(b)return b.nodeValue=
107
+ a||"",b;this.header(a);return this.t};e.titled=function(){var a=this.t;return a&&a.nodeValue};e.bodyY=function(){return v(this.body,this.el)};e.scrollY=function(a){if(I===a)return this.body.scrollTop;this.body.scrollTop=a};e.tabulate=function(a){var b=this.table;b?b.clear():b=m.require("$49","wgtable.js").create(this);b.init(a);return this.table=b};e.lock=function(){this.body.className+=" locked";return this};e.scrollTo=function(a,b){var c,f=this.body;c=f.scrollTop;var d=v(a,f);if(c>d)c=d;else{var h=
108
+ f.clientHeight,d=d+k(a).outerHeight();if(h+c<d)c=d-h;else return}b?f.scrollTop=c:k(f).stop(!0).animate({scrollTop:c},250)};e.navigize=function(a,c){function f(a){var b=e[a],c=q[a],d=k(b.el).show();c.addClass("active");g=a;v.data("idx",a);b.fire("wgTabSelect",[a]);return d}var d=this,e=d.cells,l=d.nav,g,q=[];l&&d.el.removeChild(l);var l=d.nav=d.el.insertBefore(h.el("nav","wg-tabs"),d.body),v=k(l).on("click",function(a){var c=k(a.target).data("idx");if(null==c)return!0;if(null!=g){var h=q[g];k(e[g].el).hide();
109
+ h.removeClass("active")}f(c);d.redraw();return b(a)});null==c&&(c=v.data("idx")||0);d.each(function(b,c){q[c]=k('<a href="#'+b.id+'"></a>').data("idx",c).text(a[c]).appendTo(v);b.pos=0;k(b.el).hide()});f(e[c]?c:0);d.lock();d.redraw();return d};e.navigated=function(){var a=this.nav;if(a)return k(a).data("idx")};e=null;return g}({},x,u));m.register("$24",function(g,e,B){function n(a){var b=[];a&&(a.saved()||b.push("po-unsaved"),a.fuzzy()?b.push("po-fuzzy"):a.flagged()&&b.push("po-flagged"),a.translation()||
110
  b.push("po-empty"),a.comment()&&b.push("po-comment"));return b.join(" ")}function d(a,b,c){b=k(a.title(b).parentNode);var f=b.find("span.lang");c?(c=m.require("$38","locale.js").cast(c),f.length||(f=k("<span></span>").prependTo(b)),f.attr("lang",c.lang).attr("class",c.getIcon()||"lang region region-"+(c.region||"zz").toLowerCase())):(f.remove(),c="en");a.locale(c);return b}function c(a,b,c){b.click(function(b){var f=a.fire(c,[b.target]);f||b.preventDefault();return f})}function b(){this.dirty=0}m.require("$3",
111
+ "number.js");var a="poUpdate",l="changing",f="changed",q=0,h=1,v=2,A=3,r=4,w=5,C,s,y=m.require("$37","string.js").html,x=m.require("$6","string.js").sprintf;g.extend=function(a){return a.prototype=new b};g.localise=function(a){s=a;return g};var u=function(){var a=B.createElement("p");return function(b){a.innerHTML=b.replace("src=","x=");return a.textContent.trim()||b.trim()}}(),p=b.prototype=m.require("$39","abstract.js").init(["getListColumns","getListHeadings","getListEntry"],["editable","t"]);
112
+ p.init=function(){this.localise();this.editable={source:!0,target:!0};this.mode="";this.html=!1;return this};p.localise=function(a){a||(a=s||m.require("$1","t.js").init());var b=[];b[q]=a._x("Source text","Editor")+":";b[A]=a._x("%s translation","Editor")+":";b[r]=a._x("Context","Editor")+":";b[w]=a._x("Comments","Editor")+":";b[h]=a._x("Single","Editor")+":";b[v]=a._x("Plural","Editor")+":";b[6]=a._x("Untranslated","Editor");b[7]=a._x("Translated","Editor");b[8]=a._x("Toggle Fuzzy","Editor");b[9]=
113
  a._x("Suggest translation","Editor");this.labels=b;this.t=a;return this};p.setRootCell=function(a){function b(a){c.redraw(!0,a);return!0}var c=m.require("$40","wingrid.js").init(a);k(e).on("resize",b);this.redraw=b;k(a).on("wgFocus wgBlur",function(a,b){a.stopPropagation();C=b});this.destroy=function(){c.destroy();k(e).off("resize",b)};this.rootDiv=a;return c};p.$=function(){return k(this.rootDiv)};p.setListCell=function(a){var b=this;b.listCell=a;a.on("wgRowSelect",function(a,c){b.loadMessage(b.po.row(c));
114
  return!0}).on("wgRowDeselect",function(a,c,f){f||b.loadNothing();return!0})};p.setSourceCell=function(a){this.sourceCell=a};p.setTargetCell=function(a){this.targetCell=a};p.next=function(a,b,c){for(var f=this.listTable,d=f.selected(),h=d,e,l=this.po;null!=(d=f.next(a,c,d));){if(h===d){d=null;break}if(b&&(e=l.row(d),e.translated(0)))continue;break}null!=d&&f.select(d,!0);return d};p.current=function(a){var b=this.active;if(null==a)return b;a?a.is(b)?this.reloadMessage(a):this.loadMessage(a):this.unloadActive();
115
  return this};p.getTargetOffset=function(){if(this.active)return this.targetCell&&this.targetCell.navigated()||0};p.getTargetEditable=function(){return this.editable.target&&this.targetCell&&this.targetCell.editable()};p.getSourceEditable=function(){return this.editable.source&&this.sourceCell&&this.sourceCell.editable()};p.getContextEditable=function(){return this.editable.context&&this.contextCell&&this.contextCell.editable()};p.getFirstEditable=function(){return this.getTargetEditable()||this.getSourceEditable()||
121
  this.updateListCell(a,"source");this.updateListCell(a,"target");return this};p.reloadMessage=function(a){var b=this.sourceCell,c=this.targetCell,f;this.pasteMessage(a);b&&this.setSrcMeta(a,b)&&b.redraw();c&&(f=c.navigated()||0,f=this.setTrgMeta(a,f,c),!b&&this.setSrcMeta(a,c)&&(f=!0),f&&c.redraw());return this};p.setStatus=function(){return null};p.setSrcMeta=function(a,b){var f=[],d,h=!1,e=this.$smeta,l=this.labels,g=[],q=a.tags(),v=q&&q.length;if(d=a.context())g.push("<span>"+y(l[r])+"</span>"),
122
  g.push("<mark>"+y(d)+"</mark>");if(v&&this.getTag)for(g.push("<span>Tagged:</span>");0<=--v;)(d=this.getTag(q[v]))&&g.push('<mark class="tag">'+y(d.mod_name)+"</mark>");g.length&&f.push(g.join(" "));if(this.getMono()&&(d=a.refs())&&(q=d.split(/\s/),v=q.length)){for(g=[];0<=--v;)d=q[v],g.push("<code>"+y(d)+"</code>");f.push('<p class="has-icon icon-file">'+g.join(" ")+"</p>")}(d=a.notes())&&f.push('<p class="has-icon icon-info">'+y(d,!0)+"</p>");f.length?(e||(e=b.find("div.meta"),e.length||(e=k('<div class="meta"></div>').insertAfter(b.header())),
123
  c(this,e,"poMeta"),this.$smeta=e),e.html(f.join("\n")).show(),h=!0):e&&e.text()&&(e.text("").hide(),h=!0);return h};p.setTrgMeta=function(a,b,c){var f=[],d=!1,h=this.$tmeta;b=(a=a.errors(b))&&a.length;var e;if(b)for(e=0;e<b;e++)f.push('<p class="has-icon icon-warn">'+y(a[e],!0)+".</p>");f.length?(h||(h=c.find("div.meta"),h.length||(h=k('<div class="meta"></div>').insertAfter(c.header())),this.$tmeta=h),h.html(f.join("\n")).show(),d=!0):h&&h.text()&&(h.text("").hide(),d=!0);return d};p.loadMessage=
124
+ function(b){function c(a,b){var f=b?a.split(" "):a.split(" ",1);a=f[0];"="===a.charAt(0)&&(a=a.substr(1),a=["zero","one","two"][Number(a)]||a);f[0]=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase();return f.join(" ")}function e(a,f){var l=I,k=L[q];a.off();a.titled()!==k&&d(a,k,f||"en");k=!1;p.setSrcMeta(b,a)&&(k=!0);if(b.plural()){var k=-1,r=[],A=[],n=a.id+"-",m=b.sourceForms()||f&&f.plurals||["One","Other"],w=m.length;if(2!==w||"="===m[0].charAt(0)&&"=1"!==m[0])for(;++k<w;)r[k]=n+String(k),A[k]=
125
+ c(m[k])+":";else r=[n+"-0",n+"-1"],A=[L[h],L[v]];a.splity.apply(a,r);a.each(function(a,c){a.header(A[c]).textarea(b.source(null,c),l).setStrf(D).setMode(y).setInvs(u)});a.lock();l&&a.each(function(a,b){g(a,b)})}else k&&a.redraw(),a.textarea(b.source(),l).setStrf(D).setMode(y).setInvs(u),l&&g(a,0)}function g(c,d){c.on(l,function(a,c){b.source(c,d);0===d&&p.updateListCell(b,"source");p.unsave(b,d)}).on(f,function(){0===d&&p.po.reIndex(b);p.dict&&p.rebuildSearch();p.fire(a,[b])})}function k(a,f,h){M&&
126
+ a.eachTextarea(function(a){a.ping()});a.off();var e=f.isKnown()&&f.label||"Target",e=x(L[A],e);a.titled()!==e&&d(a,e,f);e=!1;!this.sourceCell&&p.setSrcMeta(b,a)&&(e=!0);p.setTrgMeta(b,h,a)&&(e=!0);p.setStatus(b,h);if(b.pluralized()){var l=[],g=[],q=a.id+"-",v=b.targetForms()||f.plurals||["One","Other"],e=v.length,r=function(a){var b=v[a];g.push(b?c(b,!0):"Form "+a);l.push(q+String(a))};for(b.each(r);(f=l.length)<e;)r(f);a.splitx.apply(a,l);a.each(function(a,c){var f=M&&!b.disabled(c);a.textarea(b.translation(c),
127
  f).setStrf(D).setMode(y).setInvs(u);M&&n(a,c)});a.navigize(g,h||null).on("wgTabSelect",function(c,f){var d=M&&c.cell.editable();d&&d.focus();p.setTrgMeta(b,f,a);p.setStatus(b,f);p.fire("poTab",[f])})}else e&&a.redraw(),a.textarea(b.translation(),M&&!b.disabled(0)).setStrf(D).setMode(y).setInvs(u),M&&n(a,0)}function n(c,d){c.on(l,function(a,c,f){b.translate(c,d);0===d&&p.updateListCell(b,"target");b.fuzzy(d)?p.fuzzy(!1,b,d):p.unsave(b,d);""===c?(p.fire("poEmpty",[!0,b,d]),p.setStatus(b,d)):""===f&&
128
  (p.fire("poEmpty",[!1,b,d]),p.setStatus(b,d))}).on(f,function(){p.dict&&p.rebuildSearch();p.fire(a,[b])})}function m(c){c.off();var h=L[r];c.titled()!==h&&(d(c,h),p.setStatus(null));c.textarea(b.context(),!0).setMode(y).setInvs(u);X&&c.on(l,function(a,c){b.context(c);p.updateListCell(b,"source");p.unsave(b,O)}).on(f,function(){p.po.reIndex(b);p.dict&&p.rebuildSearch();p.fire(a,[b])})}function s(a){var c=L[w];a.titled()!==c&&d(a,c);a.off().on(l,function(a,c){b.comment(c);p.fire("poComment",[b,c]);
129
+ p.unsave(b,O)}).textarea(b.comment(),!0)}var p=this,y=p.mode,B=b.isHTML(),u=p.inv||!1,E=this.fmt||null,D=b.format()||null,H=b.is(p.active),O=0,T=p.sourceCell,S=p.targetCell,U=p.contextCell,V=p.commentCell,M=p.editable.target,I=p.editable.source,X=p.editable.context,P=C,Y=p.sourceLocale,W=p.targetLocale,L=p.labels;p.html!==B&&(p.html=B,"code"!==p.mode&&(y=B?"html":"",p.setMode(y)));p.active=b;T&&e(T,Y);U&&m(U);S&&W&&(O=S.navigated()||0,k(S,W,O));V&&s(V);P&&(P.exists()||(P=P.parent()),(B=P.editable())&&
130
+ B.focus());E!==D&&(this.fmt=D);H||p.fire("poSelected",[b,O])};p.unloadActive=function(){function a(b){b&&b.text("").hide()}function b(a){a&&a.off().clear()}a(this.$smeta);a(this.$tmeta);b(this.sourceCell);b(this.contextCell);b(this.targetCell);this.commentCell&&this.commentCell.off();this.active&&(this.fire("poDeselected",[this.active]),this.active=null);return this};p.loadNothing=function(){var a,b=this.t,c=this.mode||"",f=this.inv||!1,d=this.fmt;this.unloadActive();this.setStatus(null);(a=this.commentCell)&&
131
  a.textarea("",!1);if(a=this.sourceCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(f),a.title(b._x("Source text not loaded","Editor")+":");if(a=this.contextCell)a.textarea("",!1).setMode(c).setInvs(f),a.title(b._x("Context not loaded","Editor")+":");if(a=this.targetCell)a.textarea("",!1).setStrf(d).setMode(c).setInvs(f),a.title(b._x("Translation not loaded","Editor")+":");this.fire("poSelected",[null])};p.updateListCell=function(a,b){var c=this.getListColumns()[b],f=this.po.indexOf(a);(f=this.listTable.row(f))&&
132
  f.rendered&&f.update(c)};p.cellText=function(a){return(a=-1!==a.indexOf("<")||-1!==a.indexOf("&")?u(a):a.trim())||"\u00a0"};p.fuzzy=function(a,b,c){b=b||this.active;var f=b.fuzzy(c);!0!==a||f?!1===a&&f&&this.flag(0,b,c)&&this.fire("poFuzzy",[b,!1,c]):this.flag(4,b,c)&&this.fire("poFuzzy",[b,!0,c]);return f};p.flag=function(b,c,f){if(!c){c=this.active;f=this.getTargetOffset();if(null==f)return null;f&&c.targetForms()&&(f=0)}var d=c.flagged(f);if(null==b)return d;if(d===b||b&&!c.translated(f)||!this.fire("poFlag",
133
  [b,d,c,f]))return!1;c.flag(b,f);this.fire(a,[c])&&this.unsave(c,f);this.setStatus(c,f);return!0};p.add=function(b,c){var f,d=this.po.get(b,c);d?f=this.po.indexOf(d):(f=this.po.length,d=this.po.add(b,c),this.load(this.po,-1),this.fire("poAdd",[d]),this.fire(a,[d]));this.lastSearch&&this.filter("");this.listTable.select(f);return d};p.del=function(b){if(b=b||this.active){var c=this.lastSearch,f=this.po.del(b);null!=f&&(this.unsave(b),this.fire("poDel",[b]),this.fire(a,[b]),this.reload(),this.dict&&
134
  this.rebuildSearch(),this.active&&this.active.equals(b)&&this.unloadActive(),this.po.length&&(c&&this.filter(c),this.active||(f=Math.min(f,this.po.length-1),this.listTable.select(f))))}};p.setMono=function(a){return this.setMode(a?"code":this.html?"html":"")};p.setMode=function(a){if(this.mode!==a){this.mode=a;this.callTextareas(function(b){b.setMode(a)});var b=this.active,c=this.sourceCell;b&&b.refs()&&c&&this.setSrcMeta(b,c)&&c.redraw()}return this};p.getMono=function(){return"code"===this.mode};
135
+ p.setInvs=function(a){(this.inv||!1)!==a&&(this.inv=a,this.callTextareas(function(b){b.setInvs(a)}),this.fire("poInvs",[a]));return this};p.getInvs=function(){return this.inv||!1};p.callTextareas=function(a){var b=this.targetCell;b&&b.eachTextarea(a);(b=this.contextCell)&&b.eachTextarea(a);(b=this.sourceCell)&&b.eachTextarea(a);return this};p.focus=function(){var a=this.getTargetEditable();a&&a.focus();return this};p=null;return g}({},x,u));m.register("$13",function(g,e,B){function n(){this.init()._validate();
136
  this.sourceLocale={lang:"en",label:"English",plurals:["One","Other"]}}function d(a){a=k('<button type="button" class="button button-small icon icon-'+a+' hastip"></button>');m.require("$12","tooltip.js").init(a);return a}function c(a){return d("cloud").attr("title",a.labels[8]+" (Ctrl-U)").click(function(b){b.preventDefault();a.focus().fuzzy(!a.fuzzy())})}function b(a){return d("robot").attr("title",a.labels[9]+" (Ctrl-J)").click(function(b){b.preventDefault();a.fire("poHint")})}e=m.require("$24",
137
  "base.js");g.init=function(a){var b=new n;a=b.setRootCell(a);var c=a.splity("po-list","po-edit"),d=c[0],h=c[1],c=h.splitx("po-trans","po-comment"),e=c[0],g=c[1].header("Loading.."),c=e.splity("po-source","po-target"),e=c[0].header("Loading.."),c=c[1].header("Loading..");a.distribute([0.34]);h.distribute([0.8]);b.setListCell(d);b.setSourceCell(e);b.setTargetCell(c);b.commentCell=g;b.editable.source=!1;return b};e=n.prototype=e.extend(n);e.getListHeadings=function(){var a=this.t||{_x:function(a){return a}},
138
+ b=[a._x("Source text","Editor")];this.targetLocale&&(b[1]=a._x("Translation","Editor"));return b};e.getListColumns=function(){var a={source:0};this.targetLocale&&(a.target=1);return a};e.getListEntry=function(a){var b=this.cellText,c=[function(){var c,f=b(a.source()||""),d=a.context();return d?(c=B.createElement("p"),c.appendChild(B.createElement("mark")).innerText=d,c.appendChild(B.createTextNode("\u00a0"+f)),c):f}];this.targetLocale&&(c[1]=function(){return b(a.translation()||"")});return c};e.stats=
139
  function(){var a=this.po,b=a.length,c=0,d=0,h=0;a.each(function(a,b){b.fuzzy()?h++:b.translated()?c++:d++});return{t:b,p:c.percent(b)+"%",f:h,u:d}};e.unlock=function(){var a=this.targetLocale;this._unlocked||(this.editable={source:!0,context:!0,target:!1},this.po&&this.po.unlock(),this.contextCell=this.targetCell,delete this.targetCell,a&&(this._unlocked=a,delete this.targetLocale,this.reload(),this.fire("poLock",[!1])),this.active&&this.loadMessage(this.active))};e.lock=function(){var a=this._unlocked;
140
  a&&(this.targetLocale=a,delete this._unlocked,this.po&&this.po.lock(a),this.editable={source:!1,context:!1,target:!0},this.targetCell=this.contextCell,delete this.contextCell,this.reload(),this.fire("poLock",[!0,a]),this.active&&this.loadMessage(this.active))};e.locked=function(){return!this._unlocked};e.setStatus=function(a){var d=this.$tnav;if(null==a)d&&(d.remove(),this.$tnav=null);else{d||(this.$tnav=d=k("<nav></nav>").append(c(this)).append(b(this)).appendTo(this.targetCell.header()));var f=
141
  [];a.translated()?a.fuzzy()&&f.push("po-fuzzy"):f.push("po-empty");d.attr("class",f.join(" "))}};e.getSorter=function(){function a(a,c){var f=a.weight(),d=c.weight();return f===d?b(a,c):f>d?-1:1}function b(a,c){return a.hash().localeCompare(c.hash())}var c=this;return function(d){var h=c.po,e=c.locked()?a:b;d.sort(function(a,b){return e(h.row(a),h.row(b))})}};return g}({},x,u));m.register("$14",function(g,e,m){var n={copy:66,clear:75,save:83,fuzzy:85,next:40,prev:38,enter:13,invis:73,hint:74},d={38:!0,
149
  m.register("$27",function(g,e,k){function n(){}g.extend=function(d){return d.prototype=new n};e=n.prototype=m.require("$39","abstract.js").init(["add","load"]);e.row=function(d){return this.rows[d]};e.lock=function(d){return this.locale(d||{lang:"zxx",label:"Unknown",nplurals:1,pluraleq:"n!=1"})};e.unlock=function(){var d=this.loc;this.loc=null;return d};e.locale=function(d){null==d?d=this.loc:this.loc=d=m.require("$38","locale.js").cast(d);return d};e.each=function(d){this.rows.each(d);return this};
150
  e.indexOf=function(d){"object"!==typeof d&&(d=this.get(d));if(!d)return-1;null==d.idx&&(d.idx=this.rows.indexOf(d.hash()));return d.idx};e.get=function(d){return this.rows&&this.rows.get(d)};e.has=function(d){return this.rows&&this.rows.has(d)};e.del=function(d){d=this.indexOf(d);if(-1!==d){var c=this.rows.cut(d,1);if(c&&c.length)return this.length=this.rows.length,this.rows.each(function(b,a,c){a.idx=c}),d}};e.reIndex=function(d,c){var b=this.indexOf(d),a=d.hash(),e=this.rows.indexOf(a);return e===
151
  b?b:-1!==e?(c=(c||0)+1,d.source("Error, duplicate "+String(c)+": "+d.source()),this.reIndex(d,c)):this.rows.key(b,a)};e.sort=function(d){this.rows.sort(d);return this};e["export"]=function(){for(var d=-1,c=this.rows,b=c.length,a=m.require("$41","list.js").init();++d<b;)a.push(c[d]);return a};e=null;return g}({},x,u));m.register("$28",function(g,e,m){function n(){function d(a){return/<[a-z]+[^>]*>/i.test(a)||/&(#\d+|#x[0-9a-f]|[a-z]+);/i.test(a)?k("<p></p>").html(a).text():a}function c(a){return a.replace(/%(?:\d+\$)?(?:'.|[-+0 ])*\d*(?:\.\d+)?[suxXbcdeEfFgGo]/g,
152
+ "%s")}function b(a){return a.replace(/[^\sa-z0-9]+/ig," ")}function a(a){return a.trim().replace(/\s+/g," ")}function e(f){return a(b(d(c(f).toLowerCase())))}var f={},g={};return{add:function(a){var b=e(a.source());(f[b]||(f[b]=[])).push(a);g[a.hash()]=a},match:function(h){var k=e(h.source()),k=f[k],n;if(n=k){n=k.length;var r=k[0];if(1!==n)for(var m=7,C,s=h.source(),y=h.context(),B;0<=--n;)if(h=0,C=k[n],!(C.context()!==y&&++h>=m)){B=C.source();if(s!==B){if(++h>=m)continue;s=s.toLowerCase();B=B.toLowerCase();
153
+ if(s!==B){if(++h>=m)continue;s=c(s);B=c(B);if(s!==B){if(++h>=m)continue;s=d(s);B=d(B);if(s!==B){if(++h>=m)continue;s=b(s);B=b(B);if(s!==B){if(++h>=m)continue;s=a(s);B=a(B);if(s!==B&&++h>=m)continue}}}}}m=h;r=C;if(0===h)break}delete g[r.hash()];n=r.copy()}return n},unmatched:function(){var a,b,c=[];for(a in g)b=g[a],c.push(b);return c}}}g.merge=function(d,c){var b=d.rows,a=c.rows,g=[],f=[],q=[],h=n();b.each(function(b,c){a.has(b)||(c.translated()?h.add(c):q.push(c))});d.clear();a.each(function(a,c){try{var q=
154
  b.get(a),k;q?(k=q.flagged(0),q.merge(c),q.flagged(0)!==k&&f.push(q)):(q=h.match(c))?(q.merge(c),f.push(q)):(q=c.copy(),g.push(q));d.add(q,"")}catch(n){e.console&&console.error(String(n))}});d.header("POT-Creation-Date",c.header("POT-Creation-Date")||d.now());return{add:g,fuz:f,del:q.concat(h.unmatched())}};return g}({},x,u));m.register("$29",function(g,e,k){function n(c,b,a){if(null==a)return c[b]||"";c[b]=a||"";return c}function d(){this._id=this.id=""}g.extend=function(c){return c.prototype=new d};
155
  e=d.prototype;e.flag=function(c,b){var a=this.flg||(this.flg=[]);if(null!=b)a[b]=c;else for(var d=Math.max(a.length,this.src.length,this.msg.length);0!==d--;)a[d]=c;return this};e.flagged=function(c){var b=this.flg||[];if(null!=c)return b[c]||0;for(c=b.length;0!==c--;)if(b[c])return!0;return!1};e.flags=function(){for(var c,b={},a=[],d=this.flg||[],f=d.length;0!==f--;)c=d[f],b[c]||(b[c]=!0,a.push(c));return a};e.flaggedAs=function(c,b){var a=this.flg||[];if(null!=b)return c===a[b]||0;for(var d=a.length;0!==
156
  d--;)if(a[d]===c)return!0;return!1};e.fuzzy=function(c,b){var a=this.flaggedAs(4,c);null!=b&&this.flag(b?4:0,c);return a};e.source=function(c,b){if(null==c)return this.src[b||0]||"";this.src[b||0]=c;return this};e.plural=function(c,b){if(null==c)return this.src[b||1]||"";this.src[b||1]=c||"";return this};e.sourceForms=function(){return this.srcF};e.targetForms=function(){return this.msgF};e.each=function(c){for(var b=-1,a=this.src,d=this.msg,f=Math.max(a.length,d.length);++b<f;)c(b,a[b],d[b]);return this};
171
  e=k("<ol></ol>").attr("class",a.type);++d<f;)k("<li></li>").html(b[d]).appendTo(e);e.find("li").eq(a.line-1).attr("class","highlighted");c().dialog("close").html("").dialog("option","title",a.path+":"+a.line).append(e).dialog("open")}}function g(a){a=a.target;var b=k(a).find("li.highlighted")[0],b=Math.max(0,(b&&b.offsetTop||0)-Math.floor(a.clientHeight/2));a.scrollTop=b}var f;return{load:function(f){c().html('<div class="loco-loading"></div>').dialog("option","title","Loading..").off("dialogopen").dialog("open").on("dialogopen",
172
  g);f=k.extend({ref:f,path:d.popath},d.project||{});e.ajax.post("fsReference",f,a,b)}}};return g}({},x,u));m.register("$31",function(g,e,k){function n(d){this.api=d;this.chars=0}g.create=function(d){return new n(d)};e=n.prototype;e.init=function(d,c){function b(a){var b={length:0,html:a.html,sources:[]};m.push(b);return w[a.html?1:0]=b}function a(a,d){var m=a.source(null,d);if(m&&(a.untranslated(d)||c)){var r=n[m];if(r)r.push(a);else{var r=m.length,u=e.isHtml(m),u=w[u?1:0],p=u.sources;if(u.length+
173
  r>k||p.length===h)u=b(u),p=u.sources;p.push(m);n[m]=[a];u.length+=r;f+=r;g+=1}}}var e=this.api,f=0,g=0,h=50,k=5E3,n={},m=[],w=[];b({html:!1});b({html:!0});d.each(function(b,c){a(c,0);a(c,1)});w=null;this.map=n;this.chars=f;this.length=g;this.batches=m;this.locale=d.locale()};e.abort=function(){this.state="abort";return this};e.dispatch=function(){function d(a,b){function d(c,e,g){b!==g&&(a===e||1<c&&f.source(null,1)===a)&&(f.translate(b,c),k++,y++);return k}if(!c())return!1;if(!b)return!0;var f,e=
174
+ n[a]||[],h=e.length,l=-1,k;for(u++;++l<h;)if(f=e[l])k=0,f.each(d),k&&g("each",[f]);return!0}function c(){return"abort"===h.state?(k&&(k.abort(),f()),!1):!0}function b(){var b=m.shift(),c;b?(c=b.sources)&&c.length?k.batch(c,w,b.html,d).fail(a).always(e):e():f()}function a(){h.abort();f()}function e(){s++;g("prog",[s,B]);c()&&b()}function f(){k=m=null;g("done")}function g(a,b){for(var c=p[a]||[],d=c.length;0<=--d;)c[d].apply(null,b)}var h=this,k=h.api,n=h.map,m=h.batches||[],w=h.locale,u=0,s=0,y=0,
175
+ x=h.length,B=m.length,p={done:[],each:[],prog:[]};h.state="";b();return{done:function(a){p.done.push(a);return this},each:function(a){p.each.push(a);return this},prog:function(a){p.prog.push(a);return this},stat:function(){return{todo:function(){return Math.max(x-u,0)},did:function(){return u}}}}};return g}({},x,u));m.register("$42",{nn:["no"]});m.register("$32",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Yandex.Translate"};d.getId=function(){return"yandex"};
176
+ d.getUrl=function(){return"https://translate.yandex.com/"};d.parseError=function(c){return c&&c.code&&200!==c.code&&c.message?"Error "+c.code+": "+c.message:""};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1;++e<f&&!1!==d(c[e],a[e]||"",b););}var e=this;a=a?"html":"plain";var g=this.mapLang(b,m.require("$42","yandex.json"));return e._call({url:"https://translate.yandex.net/api/v1.5/tr.json/translate?format="+a+"&lang=en-"+g,method:"POST",traditional:!0,data:{key:e.key(),text:c}}).done(function(a,
177
+ b,c){a&&200===a.code?f(a.text||[]):(e.stderr(e.parseError(a)||e.httpError(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$43",{zh:["zh","zh-CN","zh-TW"],he:["iw"],jv:["jw"]});m.register("$33",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Google Translate"};d.getId=function(){return"google"};d.getUrl=function(){return"https://translate.google.com/"};d.parseError=function(c){if(c.error){for(var b=[],a=c.error.errors||
178
+ [],d=a.length,f=-1;++f<d;)b.push(a[f].message||"");return"Error "+c.error.code+": "+b.join(";")}return""};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1,g;++e<f&&(g=a[e]||{},!1!==d(c[e],g.translatedText||"",b)););}var e=this;a=a?"html":"text";var g=e.mapLang(b,m.require("$43","google.json"));return e._call({url:"https://translation.googleapis.com/language/translate/v2?source=en&target="+g+"&format="+a,method:"POST",traditional:!0,data:{key:e.key(),q:c}}).done(function(a,b,c){a.data?
179
+ f(a.data.translations||[]):(e.stderr(e.parseError(a)||e.httpError(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$44",{nn:["no"],pt:["pt","pt-pt"],sr:["sr-Cyrl","sr-Latn"],sr_RS:["sr-Cyrl"],tlh:["tlh-Latn","tlh-Piqd"],zh:["zh-Hans","zh-Hant"],zh_CN:["zh-Hans"],zh_HK:["zh-Hans"],zh_SG:["zh-Hans"],zh_TW:["zh-Hant"]});m.register("$34",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=function(){return"Microsoft Translator text API"};
180
  d.getId=function(){return"microsoft"};d.getUrl=function(){return"https://aka.ms/MicrosoftTranslatorAttribution"};d.parseError=function(c){return c&&c.error?c.error.message:""};d.batch=function(c,b,a,d){function f(a){for(var f=-1,e;++f<k&&(e=a[f]||{},e=e.translations||[],e=e[0]||{},!1!==d(c[f],e.text||"",b)););}var e=this,g=[],k=c.length,n=-1;a=a?"html":"plain";for(var r=e.mapLang(b,m.require("$44","ms.json"));++n<k;)g.push({text:c[n]});return e._call({url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=en&to="+
181
+ r+"&textType="+a,method:"POST",data:JSON.stringify(g),headers:{"Content-Type":"application/json; charset=UTF-8","Ocp-Apim-Subscription-Key":this.key(),"Ocp-Apim-Subscription-Region":e.param("region")||"global"}}).done(function(a,b,c){a&&a.length?f(a):(e.stderr(e.parseError(a)||e.httpError(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$45",{pt:["pt-PT","pt-BR"]});m.register("$35",function(g,e,k){function n(){}g.create=function(d){d=n.prototype=new d;d.toString=
182
+ function(){return"DeepL Translator"};d.getId=function(){return"deepl"};d.getUrl=function(){return"https://www.deepl.com/translator"};d.parseError=function(c){return c.message};d.batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1,g;++e<f&&(g=a[e]||{},!1!==d(c[e],g.text||"",b)););}var e=this;a=e.mapLang(b,m.require("$45","deepl.json"));return e._call({url:"https://api.deepl.com/v2/translate",method:"POST",traditional:!0,data:{source_lang:"EN",target_lang:a.toUpperCase(),preserve_formatting:"1",
183
+ auth_key:e.key(),text:c}}).done(function(a,b,c){a.translations?f(a.translations):(e.stderr(e.parseError(a)||e.httpError(c)),f([]))}).fail(function(){f([])})};return new n};return g}({},x,u));m.register("$36",function(g,e,m){function n(){}g.create=function(d){(n.prototype=new d).batch=function(c,b,a,d){function f(a){for(var f=c.length,e=-1;++e<f&&!1!==d(c[e],a[e],b););}var g=e.loco.ajax;a={hook:this.getId(),type:a?"html":"text",locale:String(b),sources:c};var h=k.Deferred();this.abortable(g.post("apis",
184
+ a,function(a){f(a&&a.targets||[]);h.resolve()},function(){f([]);h.reject()}));return h.promise()};return new n};return g}({},x,u));m.register("$18",function(g,e,u){function n(){this.inf={}}function d(){var a=u.createElement("p"),b=/&(#\d+|#x[0-9a-f]|[a-z]+);/i,c=/<[a-z]+\s/i,d,e;return{sniff:function(g){if(g===d)return e;d=g;if(b.test(g)||c.test(g))if(a.innerHTML=g,a.textContent!==g)return e=!0;return e=!1}}}var c=n.prototype;c.init=function(a){this.inf=a||{}};c.param=function(a){return this.inf[a]||
185
+ ""};c.key=function(){return this.param("key")};c.getId=function(){return this.param("id")||"none"};c.getUrl=function(){return this.param("url")||"#"};c.toString=function(){return this.param("name")||this.getId()};c.stderr=function(a){var b=(e.loco||{}).notices||e.console;b&&b.error&&b.error(String(this)+": "+String(a))};c.httpError=function(a){return(a=a&&a.status)&&200!==a?"Responded status "+a:"Unknown error"};c.parseError=function(){return""};c.mapLang=function(a,b){var c=String(a).replace("-",
186
+ "_"),d=a.lang,e=b[c]||b[d]||[],g=e.length;if(0===g)return d;if(1<g)for(var c=c.toLowerCase(),d=-1,k;++d<g;)if(k=e[d],k.toLowerCase().replace("-","_")===c)return k;return e[0]};c.translate=function(a,b,c){return this.batch([a],b,this.isHtml(a),c)};c.batch=function(){return{always:function(a){a()}}};c._call=function(a){var b=this;b.state=null;a.cache=!0;a.dataType="json";a.error=function(a,c,d){try{var e=a.responseText,g=e&&m.require("$5","json.js").parse(e);d=g&&b.parseError(g)||d}catch(k){}b.stderr(d||
187
+ b.httpError(a))};return b.abortable(k.ajax(a))};c.abortable=function(a){var b=this;a.always(function(){b.$r===a&&(b.$r=null)});return b.$r=a};c.abort=function(){var a=this.$r;a&&a.abort()};c.isHtml=function(a){return(b||(b=d())).sniff(a)};c.createJob=function(){return m.require("$31","job.js").create(this)};g.create=function(a){var b;b=a.id;b="yandex"===b?m.require("$32","yandex.js").create(n):"google"===b?m.require("$33","google.js").create(n):"microsoft"===b?m.require("$34","ms.js").create(n):"deepl"===
188
+ b?m.require("$35","deepl.js").create(n):m.require("$36","custom.js").create(n);b.init(a);return b};g.suggest=function(a,b,c,d){var e,g,k=a.length;for(e=0;e<k;e++)g=a[e],g.translate(b,c,d)};var b;return g}({},x,u));m.register("$19",function(g,e,m){g.init=function(g){function d(){G||(H.click(h),G=k('<div id="loco-fs-creds"></div>').dialog({dialogClass:"request-filesystem-credentials-dialog loco-modal",minWidth:580,modal:!0,autoOpen:!1,closeOnEscape:!0}).on("change",'input[name="connection_type"]',function(){this.checked&&
189
+ k("#ssh-keys").toggleClass("hidden","ssh"!==k(this).val())}));return G}function c(){R&&(b(k(s)),R=!1);if(E&&I){var a=I,c=k(Q);c.find("span.loco-msg").text(a);K||(c.removeClass("jshide").hide().fadeIn(500),K=!0)}else K&&(b(k(Q)),K=!1)}function b(a){a.slideUp(250).fadeOut(250,function(){k(this).addClass("jshide")})}function a(){if(E)return G&&G.dialog("close"),c(),k(g).find('button[type="submit"]').attr("disabled",!1),k(e).triggerHandler("resize"),x&&x(!0),!0;z&&G?(R||(k(s).removeClass("jshide").hide().fadeIn(500),
190
+ R=!0),K&&(b(k(Q)),K=!1)):c();k(g).find('input[type="submit"]').attr("disabled",!0);x&&x(!1);return!1}function l(a){var b,c,d=w||{};for(b in d)d.hasOwnProperty(b)&&(c=d[b],a[b]?a[b].value=c:k('<input type="hidden" />').attr("name",b).appendTo(a).val(c))}function f(a){a.preventDefault();a=k(a.target).serializeArray();r(a);D=!0;return!1}function q(a){a.preventDefault();G.dialog("close");return!1}function h(a){a.preventDefault();G.dialog("open").find('input[name="connection_type"]').change();return!1}
191
+ function v(b){E=b.authed;y=b.method;k(s).find("span.loco-msg").text(b.message||"Something went wrong.");I=b.warning||"";b.notice&&p.notices.info(b.notice);if(E)"direct"!==y&&(w=b.creds,l(g),D&&b.success&&p.notices.success(b.success)),a();else if(b.reason)p.notices.info(b.reason);else if(b=b.prompt){var c=d();c.html(b).find("form").submit(f);c.dialog("option","title",c.find("h2").remove().text());c.find("button.cancel-button").show().click(q);c.find('input[type="submit"]').addClass("button-primary");
192
+ a();k(e).triggerHandler("resize")}else p.notices.error("Server didn't return credentials, nor a prompt for credentials")}function u(){a()}function r(a){D=!1;p.ajax.setNonce("fsConnect",N).post("fsConnect",a,v,u);return a}var w,x,s=g,y=null,D=!1,E=!1,p=e.loco,z=g.path.value,F=g.auth.value,N=g["loco-nonce"].value,H=k(s).find("button.button-primary"),Q=m.getElementById(s.id+"-warn"),R=!1,K=!1,I="",G;p.notices.convert(Q).stick();g.connection_type?(w={},w.connection_type=g.connection_type.value,E=!0):
193
+ z&&F&&r({path:z,auth:F});a();return{applyCreds:function(a){if(a.nodeType)l(a);else{var b,c=w||{};for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])}return this},setForm:function(b){g=b;a();l(b);return this},connect:function(){z=g.path.value;F=g.auth.value;r(k(g).serializeArray());return this},listen:function(a){x=a;E&&a(!0);return this}}};return g}({},x,u));m.register("$20",function(g,e,u){function n(e,f,g,h){f="n"===g?c(f):b(f);h&&(f=a(f));return d([].sort,[f])(e)}function d(a,b){return function(c){a.apply(c,
194
+ b);return c}}function c(a){return function(b,c){var d=b&&b[a]||0,e=c&&c[a]||0;return d===e?0:d>e?1:-1}}function b(a){return function(b,c){return(b&&b[a]||"").localeCompare(c&&c[a]||"")}}function a(a){return function(b,c){return-1*a(b,c)}}g.init=function(a){function b(a){var c=-1,d=a.length;for(k("tr",s).remove();++c<d;)s.appendChild(a[c].$)}function c(a){r=a?B.find(a,d):d.slice(0);x&&(a=e[x],r=n(r,x,a.type,a.desc));b(r)}var d=[],e=[],g=0,r,u,x,s=a.getElementsByTagName("tbody")[0],y=a.getElementsByTagName("thead")[0],
195
+ B=m.require("$10","fulltext.js").init();y&&s&&(k("th",y).each(function(a,c){var l=c.getAttribute("data-sort-type");l&&(a=g,k(c).addClass("loco-sort").click(function(c){c.preventDefault();c=a;var g=e[c],l=g.type,m=!(g.desc=!g.desc);r=n(r||d.slice(0),c,l,m);b(r);u&&u.removeClass("loco-desc loco-asc");u=k(g.$).addClass(m?"loco-desc":"loco-asc").removeClass(m?"loco-asc":"loco-desc");x=c;return!1}),e[g]={$:c,type:l});c.hasAttribute("colspan")?g+=Number(c.getAttribute("colspan")):g++}),k("tr",s).each(function(a,
196
+ b){var c,f,g,k=[],l={_:a,$:b},m=b.getElementsByTagName("td");for(f in e){c=m[f];(g=c.textContent.replace(/(^\s+|\s+$)/g,""))&&k.push(g);c.hasAttribute("data-sort-value")&&(g=c.getAttribute("data-sort-value"));switch(e[f].type){case "n":g=Number(g)}l[f]=g}d[a]=l;B.index(a,k)}),a=k('form.loco-filter input[type="text"]',a.parentNode),a.length&&(a=a[0],y=k(a.form),1<d.length?m.require("$11","LocoTextListener.js").listen(a,c):y.hide(),y.on("submit",function(a){a.preventDefault();return!1})))};return g}({},
197
+ x,u));var D=x.loco||{},H=D.conf||{$v:[0,0]};x=m.require("$1","t.js").init();u=H.wplang;D.version=function(g){return H.$v[g||0]};m.require("$2","html.js");m.require("$3","number.js");m.require("$4","array.js");m.require("$5","json.js");D.l10n=x;x.load(H.wpl10n);u&&x.pluraleq(u.pluraleq);D.string=m.require("$6","string.js");D.notices=m.require("$7","notices.js").init(x);D.ajax=m.require("$8","ajax.js").init(H).localise(x);D.locale=m.require("$9","wplocale.js");D.fulltext=m.require("$10","fulltext.js");
198
+ D.watchtext=m.require("$11","LocoTextListener.js").listen;D.tooltip=m.require("$12","tooltip.js");D.po={ed:m.require("$13","poedit.js"),kbd:m.require("$14","hotkeys.js"),init:m.require("$15","po.js").create,ace:m.require("$16","ace.js").strf("php"),ref:m.require("$17","refs.js")};D.apis=m.require("$18","apis.js");D.fs=m.require("$19","fsconn.js");k("#loco-admin.wrap table.wp-list-table").each(function(g,e){m.require("$20","tables.js").init(e)});D.validate=function(g){return"2.4.3"!==(/^\d+\.\d+\.\d+/.exec(g&&
199
+ g[0]||"")&&RegExp.lastMatch)?(D.notices.warn("admin.js is the wrong version (2.4.3). Please empty all relevant caches and reload this page."),!1):!0}})(window,document,window.jQuery);
pub/js/min/editor.js CHANGED
@@ -1 +1 @@
1
- !function(S,_){var C=S.loco,i=C&&C.conf,p=document.getElementById("loco-editor-inner");if(C&&i&&p){var D,t,z,n,f=!!i.WP_DEBUG,r=C.po.ref&&C.po.ref.init(C,i),l=null,a=null,o=i.multipart,T=C.l10n,h=C.string.sprintf,I=i.locale,m=C.po.init(I).wrap(i.powrap),s=!I,e=document.getElementById("loco-actions"),c=i.popath,u=i.potpath,d=document.getElementById("loco-fs"),g=d&&C.fs.init(d),v=!i.readonly,b=i.apis||[],j={};!o||S.FormData&&S.Blob||(o=!1,C.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),r||C.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");var y,w,x=(w=parseInt(_(p).css("min-height")||0),function(){var t=function(t,n){for(var o=t.offsetTop||0;(t=t.offsetParent)&&t!==n;)o+=t.offsetTop||0;return o}(p,document.body),n=S.innerHeight,o=Math.max(w,n-t-20);y!==o&&(p.style.height=String(o)+"px",y=o)});x(),_(S).resize(x),p.innerHTML="",D=C.po.ed.init(p).localise(T),C.po.kbd.init(D).add("save",v?function(){D.dirty&&F()}:P).add("hint",I&&v&&U||P).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var k={save:v&&function(n){function o(){n.disabled=!0}function t(){n.disabled=!1}function e(){t(),_(n).removeClass("loco-loading")}return n,D.on("poUnsaved",function(){t(),_(n).addClass("button-primary")}).on("poSave",function(){o(),_(n).removeClass("button-primary")}),a=_.extend({path:c},i.project||{}),_(n).click(function(t){return t.preventDefault(),o(),_(n).addClass("loco-loading"),F(e),!1}),!0},sync:v&&function(n){var t=i.project;if(t){function o(){n.disabled=!0}function e(){n.disabled=!1}function a(){e(),_(n).removeClass("loco-loading")}D.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),l={bundle:t.bundle,domain:t.domain,type:s?"pot":"po",sync:u||"",fallback:i.fallback||""},_(n).click(function(t){return t.preventDefault(),o(),_(n).addClass("loco-loading"),M(a),!1}),e()}return!0},revert:function(t){return D.on("poUnsaved",function(){t.disabled=!1}).on("poSave",function(){t.disabled=!0}),_(t).click(function(t){return t.preventDefault(),location.reload(),!1}),!0},invs:function(t){var o=_(t);return t.disabled=!1,D.on("poInvs",function(t,n){o[n?"addClass":"removeClass"]("inverted")}),o.click(function(t){return t.preventDefault(),D.setInvs(!D.getInvs()),!1}),C.tooltip.init(o),!0},code:function(t){var o=_(t);return t.disabled=!1,o.click(function(t){t.preventDefault();var n=!D.getMono();return o[n?"addClass":"removeClass"]("inverted"),D.setMono(n),!1}),C.tooltip.init(o),!0},source:O,binary:s?null:O};s?(k.add=v&&function(t){return t.disabled=!1,_(t).click(function(t){t.preventDefault();var n,o=1,e=/(\d+)$/;for(n="New message";m.get(n);)o=e.exec(n)?Math.max(o,RegExp.$1):o,n="New message "+ ++o;return D.add(n),!1}),!0},k.del=v&&function(t){return t.disabled=!1,_(t).click(function(t){return t.preventDefault(),D.del(),!1}),!0}):k.auto=function(t){function n(){t.disabled=!1}return D.on("poUnsaved",function(){t.disabled=!0}).on("poSave poAuto",function(){n()}),_(t).click(q),n(),!0},_("#loco-toolbar").find("button").each(function(t,n){var o=n.getAttribute("data-loco"),e=k[o];e&&e(n,o)||_(n).addClass("loco-noop")}),_(e).submit(P),function(n){function e(t){_(n.parentNode)[t||null==t?"removeClass":"addClass"]("invalid")}D.searchable(C.fulltext.init()),n.disabled=!1,n.value="";var a=C.watchtext(n,function(t){e(D.filter(t,!0))});D.on("poFilter",function(t,n,o){a.val(n||""),e(o)}).on("poMerge",function(t,n){var o=a.val();o&&D.filter(o)})}(document.getElementById("loco-search")),D.on("poUnsaved",function(){S.onbeforeunload=N}).on("poSave",function(){A(),S.onbeforeunload=null}).on("poHint",U).on("poUpdate",A).on("poMeta",function(t,n){var o,e,a=(e="CODE",(o=n).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||!r||(r.load(a.textContent),t.preventDefault(),!1)}),m.load(i.podata),D.load(m),(I=D.targetLocale)?I.isRTL()&&_(p).addClass("trg-rtl"):D.unlock(),A(),delete C.conf,i=k=null}function M(d){C.ajax.post("sync",l,function(t){var n=[],o=m,e=t.po,a=t.pot,i=C.po.init().load(e),r=o.merge(i),l=r.add.length,s=r.del.length,c=r.fuz.length,u=T;D.load(o),l||s||c?(a?n.push(h(u._("Merged from %s"),a)):n.push(u._("Merged from source code")),l&&n.push(h(u._n("1 new string added","%s new strings added",l),l)),s&&n.push(h(u._n("1 obsolete string removed","%s obsolete strings removed",s),s)),c&&n.push(h(u._n("1 string marked Fuzzy","%s strings marked Fuzzy",c),c)),_(p).trigger("poUnsaved",[]),A(),f&&S.console&&function(t,n){function o(t){var n=t.source(),o=t.context();return o?"["+o+"] "+n:n}var e=-1,a=n.add.length;for(;++e<a;)t.log(" + "+o(n.add[e]));for(a=n.del.length,e=0;e<a;e++)t.log(" - "+o(n.del[e]));for(a=n.fuz.length,e=0;e<a;e++)t.log(" ~ "+o(n.fuz[e]))}(console,r)):a?n.push(h(u._("Strings up to date with %s"),a)):n.push(u._("Strings up to date with source code")),C.notices.success(n.join(". ")),_(p).trigger("poMerge",[t]),d&&d()},d)}function E(){return t=t||function(){for(var t,n=-1,o=[],e=b,a=e.length;++n<a;)try{t=e[n],o.push(C.apis.create(t))}catch(t){C.notices.error(String(t))}return o}()}function U(){b.length?function(){var p=T,t=D.current(),n=D.getTargetOffset(),o=t&&t.source(null,n),f='lang="'+String(I)+'" dir="'+(I.isRTL()?"RTL":"LTR")+'"',g=99;if(!o)return;function e(t){return!t.isDefaultPrevented()&&(!(0<=(n=t.which-49)&&n<10&&(o=b&&b.find("button.button-primary").eq(n))&&1===o.length)||(t.preventDefault(),t.stopPropagation(),o.click(),!1));var n,o}function a(t,n,o,e){var a=e.getId(),i=x[a],r=String(i+1),l=e.getUrl(),s=p._("Use this translation"),c=String(e),u=y&&y[a],d=_('<button class="button button-primary"></button>').attr("tabindex",String(1+g+i)).on("click",function(e,a){return function(t){t.preventDefault(),t.stopPropagation(),v();var n=D.current(),o=D.getTargetOffset();n&&n.source(null,o)===e?(n.translate(a,o),D.focus().reloadMessage(n)):C.notices.warn("Source changed since suggestion")}}(t,n));d.attr("accesskey",r),1<h.length&&(s+=" ("+r+")"),d.text(s),u&&u.replaceWith(_('<div class="loco-api loco-api-'+a+'"></div>').append(_('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",l).text(c)).append(_("<blockquote "+f+"></blockquote>").text(n||"FAILED")).append(d)),b.dialog("option","position",{my:"center",at:"center",of:S}),++w===m&&(b&&b.dialog("option","title",p._("Suggested translations")+" — "+o.label),g+=w),0===i&&d.focus()}function v(t){b&&null==t&&b.dialog("close"),y=b=null,_(S).off("keydown",e)}function i(e){return function(t,n,o){a(t,u[e.getId()]=n,o,e)}}var b=(z=z||_('<div id="loco-hint"></div>').dialog({dialogClass:"loco-modal",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,minHeight:400})).html("").append(_('<div class="loco-api"><p>Source text:</p></div>').append(_('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",p._("Loading suggestions")+"...").off("dialogclose").on("dialogclose",v).dialog("open"),r=t.translation(n);r&&_('<div class="loco-api"><p>Current translation:</p></div>').append(_("<blockquote "+f+"></blockquote>").text(r)).append(_('<button class="button"></button>').attr("tabindex",String(++g)).text(p._("Keep this translation")).on("click",function(t){t.preventDefault(),v()})).appendTo(b);var l,s,h=E(),m=h.length,c=-1,u=j[o]||(j[o]={}),y={},w=0,x={};for(;++c<m;)l=h[c],b.append((d=l,void 0,k=_('<div class="loco-api loco-api-loading"></div>').text("Calling "+d+" ..."),y[d.getId()]=k)),s=l.getId(),x[s]=c,u[s]?a(o,u[s],I,l):l.translate(o,I,i(l));var d,k;_(S).on("keydown",e)}():L()}function q(t){return t.preventDefault(),b.length?function(){var e,a,i,r=0,l=T,n=!1,s=B().dialog("open"),t=s.find("form"),c=t.find("button.button-primary"),o=_("#loco-job-progress");function u(){c[0].disabled=!0}function d(){c.removeClass("loco-loading")}function p(t){o.text(t)}function f(t){var n=function(t){for(var n,o=E(),e=o.length,a=-1;++a<e;)if((n=o[a]).getId()===t)return n;C.notices.error("No "+t+" client")}(_(t.api).val()),o=t.existing.checked;p("Calculating...."),(e=n.createJob()).init(m,o),a=n.toString(),p(h(l._("%s unique source strings."),e.length.format(0))+" "+h(l._("%s characters will be sent for translation."),e.chars.format(0))),e.length?c[0].disabled=!1:u(),i=null}function g(t){e&&(n&&t.fuzzy(0,!0),D.pasteMessage(t),t===D.active&&D.setStatus(t),D.unsave(t,0),r++)}function v(t,n){var o=n?100*t/n:0;p(h(l._("Translation progress %s%%"),o.format(0)))}function b(){if(d(),e&&i){var t=i.todo();t&&C.notices.warn(h(l._n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",t),t.format(0))).slow();var n=[],o=i.did();o&&n.push(h(l._n("%s string translated via %s","%s strings translated via %s",o),o.format(0),a)),r?n.push(h(l._n("%s string updated","%s strings updated",r),r.format(0))):n.push(l._("Nothing needed updating")),C.notices.success(n.join(". ")).slow(),i=e=null}r&&(A(),D.rebuildSearch()),s&&(s.off("dialogclose").dialog("close"),s=null),D.fire("poAuto")}d(),u(),C.notices.clear(),t.off("submit change"),f(t[0]),t.on("change",function(t){var n=t.target,o=n.name;return"api"!==o&&"existing"!==o||f(n.form),!0}).on("submit",function(t){t.preventDefault(),c.addClass("loco-loading"),u(),v(r=0),n=t.target.fuzzy.checked,i=e.dispatch().done(b).each(g).prog(v).stat()}),s.off("dialogclose").on("dialogclose",function(){e.abort(),s=null,b()})}():L(),!1}function B(){return n||(n=_("#loco-auto")).dialog({dialogClass:"loco-modal",appendTo:"#loco-admin.wrap",title:n.attr("title"),modal:!0,closeOnEscape:!0,resizable:!1,position:{my:"top",at:"top",of:"#loco-content"}}),n}function L(){B().dialog("open")}function F(n){var t=_.extend({locale:String(m.locale()||"")},a||{});g&&g.applyCreds(t),o?(t=function(t){var n,o=new FormData;for(n in t)t.hasOwnProperty(n)&&o.append(n,t[n]);return o}(t)).append("po",new Blob([String(m)],{type:"application/x-gettext"}),String(t.path).split("/").pop()||"untitled.po"):t.data=String(m),C.ajax.post("save",t,function(t){n&&n(),D.save(!0),_("#loco-po-modified").text(t.datetime||"[datetime error]")},n)}function N(){return T._("Your changes will be lost if you continue without saving")}function O(e,a){return e.disabled=!1,_(e).click(function(t){var n=e.form,o=c;return"binary"===a&&(o=o.replace(/\.po$/,".mo")),n.path.value=o,n.source.value=m.toString(),!0}),!0}function P(t){return t.preventDefault(),!1}function A(){var t=T,n=D.stats(),o=n.t,e=n.f,a=n.u,i=h(t._n("1 string","%s strings",o),o.format(0)),r=[];I&&(i=h(t._("%s%% translated"),n.p.replace("%",""))+", "+i,e&&r.push(h(t._("%s fuzzy"),e.format(0))),a&&r.push(h(t._("%s untranslated"),a.format(0))),r.length&&(i+=" ("+r.join(", ")+")")),_("#loco-po-status").text(i)}}(window,window.jQuery);
1
+ !function(S,C){var _=S.loco,i=_&&_.conf,p=document.getElementById("loco-editor-inner");if(_&&i&&p){var D,t,z,n,f=!!i.WP_DEBUG,r=_.po.ref&&_.po.ref.init(_,i),l=null,a=null,o=i.multipart,T=_.l10n,b=_.string.sprintf,I=i.locale,m=_.po.init(I).wrap(i.powrap),s=!I,e=document.getElementById("loco-actions"),c=i.popath,u=i.potpath,d=document.getElementById("loco-fs"),g=d&&_.fs.init(d),v=!i.readonly,h=i.apis||[],j={};!o||S.FormData&&S.Blob||(o=!1,_.notices.warn("Your browser doesn't support Ajax file uploads. Falling back to standard postdata")),r||_.notices.warn("admin.js is out of date. Please empty your browser cache and reload the page.");var y,w,x=(w=parseInt(C(p).css("min-height")||0),function(){var t=function(t,n){for(var o=t.offsetTop||0;(t=t.offsetParent)&&t!==n;)o+=t.offsetTop||0;return o}(p,document.body),n=S.innerHeight,o=Math.max(w,n-t-20);y!==o&&(p.style.height=String(o)+"px",y=o)});x(),C(S).resize(x),p.innerHTML="",D=_.po.ed.init(p).localise(T),_.po.kbd.init(D).add("save",v?function(){D.dirty&&F()}:P).add("hint",I&&v&&U||P).enable("copy","clear","enter","next","prev","fuzzy","save","invis","hint");var k={save:v&&function(n){function o(){n.disabled=!0}function t(){n.disabled=!1}function e(){t(),C(n).removeClass("loco-loading")}return n,D.on("poUnsaved",function(){t(),C(n).addClass("button-primary")}).on("poSave",function(){o(),C(n).removeClass("button-primary")}),a=C.extend({path:c},i.project||{}),C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),F(e),!1}),!0},sync:v&&function(n){var t=i.project;if(t){function o(){n.disabled=!0}function e(){n.disabled=!1}function a(){e(),C(n).removeClass("loco-loading")}D.on("poUnsaved",function(){o()}).on("poSave",function(){e()}),l={bundle:t.bundle,domain:t.domain,type:s?"pot":"po",sync:u||"",strip:"pot"===String(i.syncmode).toLowerCase()?"1":""},C(n).click(function(t){return t.preventDefault(),o(),C(n).addClass("loco-loading"),M(a),!1}),e()}return!0},revert:function(t){return D.on("poUnsaved",function(){t.disabled=!1}).on("poSave",function(){t.disabled=!0}),C(t).click(function(t){return t.preventDefault(),location.reload(),!1}),!0},invs:function(t){var o=C(t);return t.disabled=!1,D.on("poInvs",function(t,n){o[n?"addClass":"removeClass"]("inverted")}),o.click(function(t){return t.preventDefault(),D.setInvs(!D.getInvs()),!1}),_.tooltip.init(o),!0},code:function(t){var o=C(t);return t.disabled=!1,o.click(function(t){t.preventDefault();var n=!D.getMono();return o[n?"addClass":"removeClass"]("inverted"),D.setMono(n),!1}),_.tooltip.init(o),!0},source:O,binary:s?null:O};s?(k.add=v&&function(t){return t.disabled=!1,C(t).click(function(t){t.preventDefault();var n,o=1,e=/(\d+)$/;for(n="New message";m.get(n);)o=e.exec(n)?Math.max(o,RegExp.$1):o,n="New message "+ ++o;return D.add(n),!1}),!0},k.del=v&&function(t){return t.disabled=!1,C(t).click(function(t){return t.preventDefault(),D.del(),!1}),!0}):k.auto=function(t){function n(){t.disabled=!1}return D.on("poUnsaved",function(){t.disabled=!0}).on("poSave poAuto",function(){n()}),C(t).click(L),n(),!0},C("#loco-toolbar").find("button").each(function(t,n){var o=n.getAttribute("data-loco"),e=k[o];e&&e(n,o)||C(n).addClass("loco-noop")}),C(e).submit(P),function(n){function e(t){C(n.parentNode)[t||null==t?"removeClass":"addClass"]("invalid")}D.searchable(_.fulltext.init()),n.disabled=!1,n.value="";var a=_.watchtext(n,function(t){e(D.filter(t,!0))});D.on("poFilter",function(t,n,o){a.val(n||""),e(o)}).on("poMerge",function(t,n){var o=a.val();o&&D.filter(o)})}(document.getElementById("loco-search")),D.on("poUnsaved",function(){S.onbeforeunload=N}).on("poSave",function(){A(),S.onbeforeunload=null}).on("poHint",U).on("poUpdate",A).on("poMeta",function(t,n){var o,e,a=(e="CODE",(o=n).tagName===e?o:o.getElementsByTagName(e)[0]);return!a||!r||(r.load(a.textContent),t.preventDefault(),!1)}),m.load(i.podata),D.load(m),(I=D.targetLocale)?I.isRTL()&&C(p).addClass("trg-rtl"):D.unlock(),A(),delete _.conf,i=k=null}function M(d){_.ajax.post("sync",l,function(t){var n=[],o=m,e=t.po,a=t.pot,i=_.po.init().load(e),r=o.merge(i),l=r.add.length,s=r.del.length,c=r.fuz.length,u=T;D.load(o),l||s||c?(a?n.push(b(u._("Merged from %s"),a)):n.push(u._("Merged from source code")),l&&n.push(b(u._n("1 new string added","%s new strings added",l),l)),s&&n.push(b(u._n("1 obsolete string removed","%s obsolete strings removed",s),s)),c&&n.push(b(u._n("1 string marked Fuzzy","%s strings marked Fuzzy",c),c)),C(p).trigger("poUnsaved",[]),A(),f&&S.console&&function(t,n){function o(t){var n=t.source(),o=t.context();return o?"["+o+"] "+n:n}var e=-1,a=n.add.length;for(;++e<a;)t.log(" + "+o(n.add[e]));for(a=n.del.length,e=0;e<a;e++)t.log(" - "+o(n.del[e]));for(a=n.fuz.length,e=0;e<a;e++)t.log(" ~ "+o(n.fuz[e]))}(console,r)):a?n.push(b(u._("Strings up to date with %s"),a)):n.push(u._("Strings up to date with source code")),_.notices.success(n.join(". ")),C(p).trigger("poMerge",[t]),d&&d()},d)}function E(){return t=t||function(){for(var t,n=-1,o=[],e=h,a=e.length;++n<a;)try{t=e[n],o.push(_.apis.create(t))}catch(t){_.notices.error(String(t))}return o}()}function U(){h.length?function(){var p=T,t=D.current(),n=D.getTargetOffset(),o=t&&t.source(null,n),f='lang="'+String(I)+'" dir="'+(I.isRTL()?"RTL":"LTR")+'"',g=99;if(!o)return;function e(t){return!t.isDefaultPrevented()&&(!(0<=(n=t.which-49)&&n<10&&(o=h&&h.find("button.button-primary").eq(n))&&1===o.length)||(t.preventDefault(),t.stopPropagation(),o.click(),!1));var n,o}function a(t,n,o,e){var a=e.getId(),i=x[a],r=String(i+1),l=e.getUrl(),s=p._("Use this translation"),c=String(e),u=y&&y[a],d=C('<button class="button button-primary"></button>').attr("tabindex",String(1+g+i)).on("click",function(e,a){return function(t){t.preventDefault(),t.stopPropagation(),v();var n=D.current(),o=D.getTargetOffset();n&&n.source(null,o)===e?(n.translate(a,o),D.focus().reloadMessage(n)):_.notices.warn("Source changed since suggestion")}}(t,n));d.attr("accesskey",r),1<b.length&&(s+=" ("+r+")"),d.text(s),u&&u.replaceWith(C('<div class="loco-api loco-api-'+a+'"></div>').append(C('<a class="loco-api-credit" target="_blank" tabindex="-1"></a>').attr("href",l).text(c)).append(C("<blockquote "+f+"></blockquote>").text(n||"FAILED")).append(d)),h.dialog("option","position",{my:"center",at:"center",of:S}),++w===m&&(h&&h.dialog("option","title",p._("Suggested translations")+" — "+o.label),g+=w),0===i&&d.focus()}function v(t){h&&null==t&&h.dialog("close"),y=h=null,C(S).off("keydown",e)}function i(e){return function(t,n,o){a(t,u[e.getId()]=n,o,e)}}var h=(z=z||C('<div id="loco-hint"></div>').dialog({dialogClass:"loco-modal",modal:!0,autoOpen:!1,closeOnEscape:!0,resizable:!1,minHeight:400})).html("").append(C('<div class="loco-api"><p>Source text:</p></div>').append(C('<blockquote lang="en"></blockquote>').text(o))).dialog("option","title",p._("Loading suggestions")+"...").off("dialogclose").on("dialogclose",v).dialog("open"),r=t.translation(n);r&&C('<div class="loco-api"><p>Current translation:</p></div>').append(C("<blockquote "+f+"></blockquote>").text(r)).append(C('<button class="button"></button>').attr("tabindex",String(++g)).text(p._("Keep this translation")).on("click",function(t){t.preventDefault(),v()})).appendTo(h);var l,s,b=E(),m=b.length,c=-1,u=j[o]||(j[o]={}),y={},w=0,x={};for(;++c<m;)l=b[c],h.append((d=l,void 0,k=C('<div class="loco-api loco-api-loading"></div>').text("Calling "+d+" ..."),y[d.getId()]=k)),s=l.getId(),x[s]=c,u[s]?a(o,u[s],I,l):l.translate(o,I,i(l));var d,k;C(S).on("keydown",e)}():B()}function L(t){return t.preventDefault(),h.length?function(){var e,a,i,r=0,l=T,n=!1,s=q().dialog("open"),t=s.find("form"),c=t.find("button.button-primary"),o=C("#loco-job-progress");function u(){c[0].disabled=!0}function d(){c.removeClass("loco-loading")}function p(t){o.text(t)}function f(t){var n=function(t){for(var n,o=E(),e=o.length,a=-1;++a<e;)if((n=o[a]).getId()===t)return n;_.notices.error("No "+t+" client")}(C(t.api).val()),o=t.existing.checked;p("Calculating...."),(e=n.createJob()).init(m,o),a=n.toString(),p(b(l._("%s unique source strings."),e.length.format(0))+" "+b(l._("%s characters will be sent for translation."),e.chars.format(0))),e.length?c[0].disabled=!1:u(),i=null}function g(t){e&&(n&&t.fuzzy(0,!0),D.pasteMessage(t),t===D.active&&D.setStatus(t),D.unsave(t,0),r++)}function v(t,n){var o=n?100*t/n:0;p(b(l._("Translation progress %s%%"),o.format(0)))}function h(){if(d(),e&&i){var t=i.todo();t&&_.notices.warn(b(l._n("Translation job aborted with one string remaining","Translation job aborted with %s strings remaining",t),t.format(0))).slow();var n=[],o=i.did();o&&n.push(b(l._n("%s string translated via %s","%s strings translated via %s",o),o.format(0),a)),r?n.push(b(l._n("%s string updated","%s strings updated",r),r.format(0))):n.push(l._("Nothing needed updating")),_.notices.success(n.join(". ")).slow(),i=e=null}r&&(A(),D.rebuildSearch()),s&&(s.off("dialogclose").dialog("close"),s=null),D.fire("poAuto")}d(),u(),_.notices.clear(),t.off("submit change"),f(t[0]),t.on("change",function(t){var n=t.target,o=n.name;return"api"!==o&&"existing"!==o||f(n.form),!0}).on("submit",function(t){t.preventDefault(),c.addClass("loco-loading"),u(),v(r=0),n=t.target.fuzzy.checked,i=e.dispatch().done(h).each(g).prog(v).stat()}),s.off("dialogclose").on("dialogclose",function(){e.abort(),s=null,h()})}():B(),!1}function q(){return n||(n=C("#loco-auto")).dialog({dialogClass:"loco-modal",appendTo:"#loco-admin.wrap",title:n.attr("title"),modal:!0,closeOnEscape:!0,resizable:!1,position:{my:"top",at:"top",of:"#loco-content"}}),n}function B(){q().dialog("open")}function F(n){var t=C.extend({locale:String(m.locale()||"")},a||{});g&&g.applyCreds(t),o?(t=function(t){var n,o=new FormData;for(n in t)t.hasOwnProperty(n)&&o.append(n,t[n]);return o}(t)).append("po",new Blob([String(m)],{type:"application/x-gettext"}),String(t.path).split("/").pop()||"untitled.po"):t.data=String(m),_.ajax.post("save",t,function(t){n&&n(),D.save(!0),C("#loco-po-modified").text(t.datetime||"[datetime error]")},n)}function N(){return T._("Your changes will be lost if you continue without saving")}function O(e,a){return e.disabled=!1,C(e).click(function(t){var n=e.form,o=c;return"binary"===a&&(o=o.replace(/\.po$/,".mo")),n.path.value=o,n.source.value=m.toString(),!0}),!0}function P(t){return t.preventDefault(),!1}function A(){var t=T,n=D.stats(),o=n.t,e=n.f,a=n.u,i=b(t._n("1 string","%s strings",o),o.format(0)),r=[];I&&(i=b(t._("%s%% translated"),n.p.replace("%",""))+", "+i,e&&r.push(b(t._("%s fuzzy"),e.format(0))),a&&r.push(b(t._("%s untranslated"),a.format(0))),r.length&&(i+=" ("+r.join(", ")+")")),C("#loco-po-status").text(i)}}(window,window.jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: translation, translators, localization, localisation, l10n, i18n, Gettext,
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
  Tested up to: 5.5
7
- Stable tag: 2.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,6 +100,13 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
100
 
101
  == Changelog ==
102
 
 
 
 
 
 
 
 
103
  = 2.4.2 =
104
  * Added loco_file_written hook
105
  * Improved script tampering warning
@@ -360,7 +367,7 @@ We don't collect your data or snoop on you. See the [plugin privacy notice](http
360
 
361
  == Upgrade Notice ==
362
 
363
- = 2.4.2 =
364
  * Various improvements and bugfixes
365
 
366
 
4
  Requires at least: 4.1
5
  Requires PHP: 5.2.4
6
  Tested up to: 5.5
7
+ Stable tag: 2.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
100
 
101
  == Changelog ==
102
 
103
+ = 2.4.3 =
104
+ * Improved fix for default syncing of msgstr fields
105
+ * Reverted accidental removal of js debug flag
106
+ * Minor fixes to API error messages
107
+ * Removed use of jQuery.browser
108
+ * Bugfix for new preferences in usermeta
109
+
110
  = 2.4.2 =
111
  * Added loco_file_written hook
112
  * Improved script tampering warning
367
 
368
  == Upgrade Notice ==
369
 
370
+ = 2.4.3 =
371
  * Various improvements and bugfixes
372
 
373
 
src/admin/file/EditController.php CHANGED
@@ -119,12 +119,18 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
119
 
120
  // Establish PO/POT edit mode
121
  $potfile = null;
 
122
  $locale = $this->getLocale();
123
  if( $locale instanceof Loco_Locale ){
124
  // alternative POT file may be forced by PO headers
125
  if( $head->has('X-Loco-Template') ){
126
  $potfile = new Loco_fs_File( $head['X-Loco-Template'] );
127
  $potfile->normalize( $bundle->getDirectoryPath() );
 
 
 
 
 
128
  }
129
  // else use project-configured template, assuming there is one
130
  // no way to get configured POT if invalid project
@@ -200,7 +206,7 @@ class Loco_admin_file_EditController extends Loco_admin_file_BaseController {
200
  'multipart' => (bool) $settings->ajax_files,
201
  'locale' => $locale ? $locale->jsonSerialize() : null,
202
  'potpath' => $locale && $potfile ? $potfile->getRelativePath($wp_content) : null,
203
- 'fallback' => $locale ? $head['X-Loco-Fallback'] : null,
204
  'popath' => $this->get('path'),
205
  'readonly' => $readonly,
206
  'project' => $project ? array (
119
 
120
  // Establish PO/POT edit mode
121
  $potfile = null;
122
+ $syncmode = null;
123
  $locale = $this->getLocale();
124
  if( $locale instanceof Loco_Locale ){
125
  // alternative POT file may be forced by PO headers
126
  if( $head->has('X-Loco-Template') ){
127
  $potfile = new Loco_fs_File( $head['X-Loco-Template'] );
128
  $potfile->normalize( $bundle->getDirectoryPath() );
129
+ // sync mode permits copying of translations since 2.4.3
130
+ // legacy sync behaviour was copy msgstr fields when they exist (no strip)
131
+ if( $head->has('X-Loco-Template-Mode') ){
132
+ $syncmode = $head['X-Loco-Template-Mode'];
133
+ }
134
  }
135
  // else use project-configured template, assuming there is one
136
  // no way to get configured POT if invalid project
206
  'multipart' => (bool) $settings->ajax_files,
207
  'locale' => $locale ? $locale->jsonSerialize() : null,
208
  'potpath' => $locale && $potfile ? $potfile->getRelativePath($wp_content) : null,
209
+ 'syncmode' => $syncmode,
210
  'popath' => $this->get('path'),
211
  'readonly' => $readonly,
212
  'project' => $project ? array (
src/ajax/MsginitController.php CHANGED
@@ -96,10 +96,15 @@ class Loco_ajax_MsginitController extends Loco_ajax_common_BundleController {
96
  // relative path from bundle root to the template/source this file was created from
97
  if( $potfile && $post->link ){
98
  $headers['X-Loco-Template'] = $potfile->getRelativePath( $bundle->getDirectoryPath() );
 
 
 
 
99
  // without strip argument we need to remember the source PO is effectively a fallback locale
100
- if( ! $post->strip ) {
101
  $fallback = $potfile instanceof Loco_fs_LocaleFile ? $potfile->getLocale() : $locale;
102
  $headers['X-Loco-Fallback'] = (string) $fallback;
 
103
  }
104
  }
105
 
96
  // relative path from bundle root to the template/source this file was created from
97
  if( $potfile && $post->link ){
98
  $headers['X-Loco-Template'] = $potfile->getRelativePath( $bundle->getDirectoryPath() );
99
+ // legacy behaviour was to sync source AND target strings in the absence of the following
100
+ if( $post->strip ){
101
+ $headers['X-Loco-Template-Mode'] = 'POT';
102
+ }
103
  // without strip argument we need to remember the source PO is effectively a fallback locale
104
+ else {
105
  $fallback = $potfile instanceof Loco_fs_LocaleFile ? $potfile->getLocale() : $locale;
106
  $headers['X-Loco-Fallback'] = (string) $fallback;
107
+ $headers['X-Loco-Template-Mode'] = 'PO';
108
  }
109
  }
110
 
src/ajax/SyncController.php CHANGED
@@ -53,12 +53,10 @@ class Loco_ajax_SyncController extends Loco_mvc_AjaxController {
53
  // translators: Where %s is the name of the invalid POT file
54
  throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
55
  }
56
- // Force stripping of msgstr fields if template is user-defined and "copy translations" was not selected
57
- // note that bundle-configured templates will be synced as is, so if PO is configured, msgstr will merge
58
- if( 'pot' !== $potfile->extension() && ! $post->fallback ) {
59
  $data->strip();
60
  }
61
-
62
  }
63
  // else sync with source code
64
  else {
53
  // translators: Where %s is the name of the invalid POT file
54
  throw new Loco_error_ParseException( sprintf( __('Translation template is invalid (%s)','loco-translate'), $potfile->basename() ) );
55
  }
56
+ // strip msgstr fields from PO files if template is user-defined and "copy translations" was not selected.
57
+ if( '1' === $post->strip ){
 
58
  $data->strip();
59
  }
 
60
  }
61
  // else sync with source code
62
  else {
src/data/Preferences.php CHANGED
@@ -88,13 +88,15 @@ class Loco_data_Preferences extends Loco_data_Serializable {
88
  */
89
  public function fetch(){
90
  $data = get_user_meta( $this->user_id, 'loco_prefs', true );
91
- try {
 
92
  $this->setUnserialized($data);
 
 
 
 
93
  }
94
- catch( InvalidArgumentException $e ){
95
- return false;
96
- }
97
- return true;
98
  }
99
 
100
 
88
  */
89
  public function fetch(){
90
  $data = get_user_meta( $this->user_id, 'loco_prefs', true );
91
+ // See comments in Loco_data_Settings
92
+ if( is_array($data) ){
93
  $this->setUnserialized($data);
94
+ $copy = new Loco_data_Preferences;
95
+ $this->exchangeArray( $copy->getArrayCopy() + $this->getArrayCopy() );
96
+ $this->clean();
97
+ return true;
98
  }
99
+ return false;
 
 
 
100
  }
101
 
102
 
src/data/Settings.php CHANGED
@@ -135,7 +135,8 @@ class Loco_data_Settings extends Loco_data_Serializable {
135
  * @return bool whether settings where previously saved
136
  */
137
  public function fetch(){
138
- if( $data = get_option('loco_settings') ){
 
139
  $copy = new Loco_data_Settings;
140
  $copy->setUnserialized($data);
141
  // preserve any defaults not in previously saved data
135
  * @return bool whether settings where previously saved
136
  */
137
  public function fetch(){
138
+ $data = get_option('loco_settings');
139
+ if( is_array($data) ){
140
  $copy = new Loco_data_Settings;
141
  $copy->setUnserialized($data);
142
  // preserve any defaults not in previously saved data
src/mvc/AdminController.php CHANGED
@@ -208,17 +208,17 @@ abstract class Loco_mvc_AdminController extends Loco_mvc_Controller {
208
  // we will use this to ensure scripts are not cached by browser, or hijacked by other plugins
209
  $jsConf->offsetSet('$v', array( loco_plugin_version(), $GLOBALS['wp_version']) );
210
  $jsConf->offsetSet('$js', array_keys($this->scripts) );
 
211
  // localize script if translations in memory
212
  if( is_textdomain_loaded('loco-translate') ){
213
  $strings = new Loco_js_Strings;
214
- $jsConf['wpl10n'] = $strings->compile();
215
  $strings->unhook();
216
  unset( $strings );
217
  // add currently loaded locale for passing plural equation into js.
218
  // note that plural rules come from our data, because MO is not trusted.
219
  $tag = apply_filters( 'plugin_locale', get_locale(), 'loco-translate' );
220
- $jsConf['wplang'] = Loco_Locale::parse($tag);
221
- $jsConf['WP_DEBUG'] = loco_debugging();
222
  }
223
  }
224
  // take benchmark for debugger to be rendered in footer
208
  // we will use this to ensure scripts are not cached by browser, or hijacked by other plugins
209
  $jsConf->offsetSet('$v', array( loco_plugin_version(), $GLOBALS['wp_version']) );
210
  $jsConf->offsetSet('$js', array_keys($this->scripts) );
211
+ $jsConf->offsetSet('WP_DEBUG', loco_debugging() );
212
  // localize script if translations in memory
213
  if( is_textdomain_loaded('loco-translate') ){
214
  $strings = new Loco_js_Strings;
215
+ $jsConf->offsetSet('wpl10n',$strings->compile());
216
  $strings->unhook();
217
  unset( $strings );
218
  // add currently loaded locale for passing plural equation into js.
219
  // note that plural rules come from our data, because MO is not trusted.
220
  $tag = apply_filters( 'plugin_locale', get_locale(), 'loco-translate' );
221
+ $jsConf->offsetSet('wplang', Loco_Locale::parse($tag) );
 
222
  }
223
  }
224
  // take benchmark for debugger to be rendered in footer